@maptiler/geocoding-control 2.1.7 → 3.0.0-rc.2

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 (338) hide show
  1. package/CODE_OF_CONDUCT.md +46 -0
  2. package/CONTRIBUTING.md +72 -0
  3. package/README.md +115 -43
  4. package/SECURITY.md +16 -0
  5. package/dist/index.js +860 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.umd.js +263 -0
  8. package/dist/index.umd.js.map +1 -0
  9. package/dist/leaflet.public.js +1251 -0
  10. package/dist/leaflet.public.js.map +1 -0
  11. package/dist/leaflet.public.umd.js +276 -0
  12. package/dist/leaflet.public.umd.js.map +1 -0
  13. package/dist/maplibregl.js +1275 -0
  14. package/dist/maplibregl.js.map +1 -0
  15. package/dist/maplibregl.umd.js +276 -0
  16. package/dist/maplibregl.umd.js.map +1 -0
  17. package/dist/maptilersdk.js +1283 -0
  18. package/dist/maptilersdk.js.map +1 -0
  19. package/dist/maptilersdk.umd.js +276 -0
  20. package/dist/maptilersdk.umd.js.map +1 -0
  21. package/dist/src/components/clear-icon.d.ts +10 -0
  22. package/dist/src/components/fail-icon.d.ts +10 -0
  23. package/dist/src/components/loading-icon.d.ts +10 -0
  24. package/dist/src/components/marker.d.ts +10 -0
  25. package/dist/src/components/reverse-geocoding-icon.d.ts +10 -0
  26. package/dist/src/components/search-icon.d.ts +10 -0
  27. package/dist/src/controls/base-control.d.ts +44 -0
  28. package/dist/src/controls/leaflet-control.d.ts +27 -0
  29. package/dist/src/controls/leaflet-events.d.ts +42 -0
  30. package/dist/src/controls/leaflet-options.d.ts +84 -0
  31. package/dist/src/controls/maplibregl-control.d.ts +34 -0
  32. package/dist/src/controls/maplibregl-events.d.ts +44 -0
  33. package/dist/src/controls/maplibregl-options.d.ts +104 -0
  34. package/dist/src/controls/maptilersdk-control.d.ts +7 -0
  35. package/dist/src/controls/maptilersdk-events.d.ts +2 -0
  36. package/dist/src/controls/maptilersdk-options.d.ts +10 -0
  37. package/dist/src/controls/openlayers-control.d.ts +35 -0
  38. package/dist/src/controls/openlayers-events.d.ts +43 -0
  39. package/dist/src/controls/openlayers-options.d.ts +83 -0
  40. package/dist/src/geocoder/geocoder-events.d.ts +46 -0
  41. package/dist/src/geocoder/geocoder-feature-item.d.ts +22 -0
  42. package/{svelte/types.d.ts → dist/src/geocoder/geocoder-options.d.ts} +23 -143
  43. package/dist/src/geocoder/geocoder.d.ts +113 -0
  44. package/dist/src/index.d.ts +9 -0
  45. package/dist/src/leaflet.public.d.ts +7 -0
  46. package/dist/src/maplibregl.d.ts +7 -0
  47. package/dist/src/maptilersdk.d.ts +7 -0
  48. package/dist/src/openlayers.public.d.ts +7 -0
  49. package/dist/src/types.d.ts +46 -0
  50. package/dist/src/utils/geo-utils.d.ts +6 -0
  51. package/dist/src/utils/mask.d.ts +2 -0
  52. package/dist/src/utils/proximity.d.ts +2 -0
  53. package/package.json +84 -112
  54. package/MapLibreBasedGeocodingControl.d.ts +0 -3072
  55. package/geo-coordinates-parser.t.d.ts +0 -8
  56. package/geoUtils.d.ts +0 -3
  57. package/leaflet-controller.d.ts +0 -12
  58. package/leaflet-controller.js +0 -2475
  59. package/leaflet-controller.js.map +0 -1
  60. package/leaflet-controller.umd.js +0 -2
  61. package/leaflet-controller.umd.js.map +0 -1
  62. package/leaflet.d.ts +0 -131
  63. package/leaflet.js +0 -5082
  64. package/leaflet.js.map +0 -1
  65. package/leaflet.umd.js +0 -14
  66. package/leaflet.umd.js.map +0 -1
  67. package/maplibregl-controller.d.ts +0 -19
  68. package/maplibregl-controller.js +0 -2418
  69. package/maplibregl-controller.js.map +0 -1
  70. package/maplibregl-controller.umd.js +0 -2
  71. package/maplibregl-controller.umd.js.map +0 -1
  72. package/maplibregl.d.ts +0 -2509
  73. package/maplibregl.js +0 -5142
  74. package/maplibregl.js.map +0 -1
  75. package/maplibregl.umd.js +0 -14
  76. package/maplibregl.umd.js.map +0 -1
  77. package/maptilersdk.d.ts +0 -2504
  78. package/maptilersdk.js +0 -5152
  79. package/maptilersdk.js.map +0 -1
  80. package/maptilersdk.umd.js +0 -14
  81. package/maptilersdk.umd.js.map +0 -1
  82. package/mask.d.ts +0 -2
  83. package/openlayers-controller.d.ts +0 -15
  84. package/openlayers-controller.js +0 -2174
  85. package/openlayers-controller.js.map +0 -1
  86. package/openlayers-controller.umd.js +0 -2
  87. package/openlayers-controller.umd.js.map +0 -1
  88. package/openlayers.d.ts +0 -109
  89. package/openlayers.js +0 -5045
  90. package/openlayers.js.map +0 -1
  91. package/openlayers.umd.js +0 -14
  92. package/openlayers.umd.js.map +0 -1
  93. package/proximity.d.ts +0 -2
  94. package/react.d.ts +0 -45
  95. package/react.js +0 -2795
  96. package/react.js.map +0 -1
  97. package/react.umd.js +0 -14
  98. package/react.umd.js.map +0 -1
  99. package/style.css +0 -1
  100. package/svelte/ClearIcon.svelte +0 -12
  101. package/svelte/ClearIcon.svelte.d.ts +0 -25
  102. package/svelte/FailIcon.svelte +0 -12
  103. package/svelte/FailIcon.svelte.d.ts +0 -25
  104. package/svelte/FeatureItem.svelte +0 -246
  105. package/svelte/FeatureItem.svelte.d.ts +0 -26
  106. package/svelte/GeocodingControl.svelte +0 -921
  107. package/svelte/GeocodingControl.svelte.d.ts +0 -105
  108. package/svelte/LoadingIcon.svelte +0 -40
  109. package/svelte/LoadingIcon.svelte.d.ts +0 -25
  110. package/svelte/MapLibreBasedGeocodingControl.d.ts +0 -3072
  111. package/svelte/MapLibreBasedGeocodingControl.js +0 -210
  112. package/svelte/MarkerIcon.svelte +0 -71
  113. package/svelte/MarkerIcon.svelte.d.ts +0 -18
  114. package/svelte/ReverseGeocodingIcon.svelte +0 -12
  115. package/svelte/ReverseGeocodingIcon.svelte.d.ts +0 -25
  116. package/svelte/SearchIcon.svelte +0 -26
  117. package/svelte/SearchIcon.svelte.d.ts +0 -25
  118. package/svelte/geo-coordinates-parser.t.d.ts +0 -8
  119. package/svelte/geo-coordinates-parser.t.js +0 -1
  120. package/svelte/geoUtils.d.ts +0 -3
  121. package/svelte/geoUtils.js +0 -18
  122. package/svelte/info.json +0 -1
  123. package/svelte/leaflet-controller.d.ts +0 -12
  124. package/svelte/leaflet-controller.js +0 -274
  125. package/svelte/leaflet.d.ts +0 -131
  126. package/svelte/leaflet.js +0 -116
  127. package/svelte/maplibregl-controller.d.ts +0 -19
  128. package/svelte/maplibregl-controller.js +0 -279
  129. package/svelte/maplibregl.d.ts +0 -2509
  130. package/svelte/maplibregl.js +0 -17
  131. package/svelte/maptilersdk.d.ts +0 -2504
  132. package/svelte/maptilersdk.js +0 -32
  133. package/svelte/mask.d.ts +0 -2
  134. package/svelte/mask.js +0 -54
  135. package/svelte/openlayers-controller.d.ts +0 -15
  136. package/svelte/openlayers-controller.js +0 -283
  137. package/svelte/openlayers.d.ts +0 -109
  138. package/svelte/openlayers.js +0 -178
  139. package/svelte/proximity.d.ts +0 -2
  140. package/svelte/proximity.js +0 -60
  141. package/svelte/react.d.ts +0 -45
  142. package/svelte/react.js +0 -106
  143. package/svelte/types.js +0 -1
  144. package/svelte/vanilla.d.ts +0 -61
  145. package/svelte/vanilla.js +0 -101
  146. package/svelte/vite-env.d.ts +0 -2
  147. package/types.d.ts +0 -391
  148. package/vanilla.d.ts +0 -61
  149. package/vanilla.js +0 -2799
  150. package/vanilla.js.map +0 -1
  151. package/vanilla.umd.js +0 -14
  152. package/vanilla.umd.js.map +0 -1
  153. /package/{icons → dist/icons}/10pin.svg +0 -0
  154. /package/{icons → dist/icons}/9pin.svg +0 -0
  155. /package/{icons → dist/icons}/advertising_column.svg +0 -0
  156. /package/{icons → dist/icons}/aerodrome.svg +0 -0
  157. /package/{icons → dist/icons}/alcohol.svg +0 -0
  158. /package/{icons → dist/icons}/alpine_hut.svg +0 -0
  159. /package/{icons → dist/icons}/amusement_arcade.svg +0 -0
  160. /package/{icons → dist/icons}/amusement_park.svg +0 -0
  161. /package/{icons → dist/icons}/apartment.svg +0 -0
  162. /package/{icons → dist/icons}/archaeological_site.svg +0 -0
  163. /package/{icons → dist/icons}/area.svg +0 -0
  164. /package/{icons → dist/icons}/art.svg +0 -0
  165. /package/{icons → dist/icons}/arts_centre.svg +0 -0
  166. /package/{icons → dist/icons}/artwork.svg +0 -0
  167. /package/{icons → dist/icons}/audioguide.svg +0 -0
  168. /package/{icons → dist/icons}/bag.svg +0 -0
  169. /package/{icons → dist/icons}/beauty.svg +0 -0
  170. /package/{icons → dist/icons}/bed.svg +0 -0
  171. /package/{icons → dist/icons}/bell_tower.svg +0 -0
  172. /package/{icons → dist/icons}/beverages.svg +0 -0
  173. /package/{icons → dist/icons}/bicycle_repair_station.svg +0 -0
  174. /package/{icons → dist/icons}/biergarten.svg +0 -0
  175. /package/{icons → dist/icons}/bird_hide.svg +0 -0
  176. /package/{icons → dist/icons}/boat_rental.svg +0 -0
  177. /package/{icons → dist/icons}/bookmaker.svg +0 -0
  178. /package/{icons → dist/icons}/books.svg +0 -0
  179. /package/{icons → dist/icons}/bowl.svg +0 -0
  180. /package/{icons → dist/icons}/bowling_alley.svg +0 -0
  181. /package/{icons → dist/icons}/bunker.svg +0 -0
  182. /package/{icons → dist/icons}/bureau_de_change.svg +0 -0
  183. /package/{icons → dist/icons}/bus_station.svg +0 -0
  184. /package/{icons → dist/icons}/bust.svg +0 -0
  185. /package/{icons → dist/icons}/camping.svg +0 -0
  186. /package/{icons → dist/icons}/car_parts.svg +0 -0
  187. /package/{icons → dist/icons}/car_wash.svg +0 -0
  188. /package/{icons → dist/icons}/caravan_park.svg +0 -0
  189. /package/{icons → dist/icons}/carpet.svg +0 -0
  190. /package/{icons → dist/icons}/cattle_grid.svg +0 -0
  191. /package/{icons → dist/icons}/cave_entrance.svg +0 -0
  192. /package/{icons → dist/icons}/chalet.svg +0 -0
  193. /package/{icons → dist/icons}/charity.svg +0 -0
  194. /package/{icons → dist/icons}/chemist.svg +0 -0
  195. /package/{icons → dist/icons}/chimney.svg +0 -0
  196. /package/{icons → dist/icons}/church.svg +0 -0
  197. /package/{icons → dist/icons}/city_gate.svg +0 -0
  198. /package/{icons → dist/icons}/clinic.svg +0 -0
  199. /package/{icons → dist/icons}/clothes.svg +0 -0
  200. /package/{icons → dist/icons}/coffee.svg +0 -0
  201. /package/{icons → dist/icons}/community_centre.svg +0 -0
  202. /package/{icons → dist/icons}/computer.svg +0 -0
  203. /package/{icons → dist/icons}/consulate.svg +0 -0
  204. /package/{icons → dist/icons}/copyshop.svg +0 -0
  205. /package/{icons → dist/icons}/cosmetics.svg +0 -0
  206. /package/{icons → dist/icons}/courthouse.svg +0 -0
  207. /package/{icons → dist/icons}/crane.svg +0 -0
  208. /package/{icons → dist/icons}/dairy.svg +0 -0
  209. /package/{icons → dist/icons}/deli.svg +0 -0
  210. /package/{icons → dist/icons}/department_store.svg +0 -0
  211. /package/{icons → dist/icons}/diy.svg +0 -0
  212. /package/{icons → dist/icons}/electronics.svg +0 -0
  213. /package/{icons → dist/icons}/embankment.svg +0 -0
  214. /package/{icons → dist/icons}/embassy.svg +0 -0
  215. /package/{icons → dist/icons}/excrement_bags.svg +0 -0
  216. /package/{icons → dist/icons}/fabric.svg +0 -0
  217. /package/{icons → dist/icons}/farmyard.svg +0 -0
  218. /package/{icons → dist/icons}/ferry.svg +0 -0
  219. /package/{icons → dist/icons}/firepit.svg +0 -0
  220. /package/{icons → dist/icons}/firestation.svg +0 -0
  221. /package/{icons → dist/icons}/fishing.svg +0 -0
  222. /package/{icons → dist/icons}/fitness.svg +0 -0
  223. /package/{icons → dist/icons}/ford.svg +0 -0
  224. /package/{icons → dist/icons}/fort.svg +0 -0
  225. /package/{icons → dist/icons}/fortress.svg +0 -0
  226. /package/{icons → dist/icons}/full-height_turnstile.svg +0 -0
  227. /package/{icons → dist/icons}/generator_wind.svg +0 -0
  228. /package/{icons → dist/icons}/golf_pin.svg +0 -0
  229. /package/{icons → dist/icons}/greengrocer.svg +0 -0
  230. /package/{icons → dist/icons}/guest_house.svg +0 -0
  231. /package/{icons → dist/icons}/helipad.svg +0 -0
  232. /package/{icons → dist/icons}/hifi.svg +0 -0
  233. /package/{icons → dist/icons}/hostel.svg +0 -0
  234. /package/{icons → dist/icons}/hotel.svg +0 -0
  235. /package/{icons → dist/icons}/housenumber.svg +0 -0
  236. /package/{icons → dist/icons}/houseware.svg +0 -0
  237. /package/{icons → dist/icons}/hunting_stand.svg +0 -0
  238. /package/{icons → dist/icons}/interior_decoration.svg +0 -0
  239. /package/{icons → dist/icons}/internet_cafe.svg +0 -0
  240. /package/{icons → dist/icons}/kindergarten.svg +0 -0
  241. /package/{icons → dist/icons}/kissing_gate.svg +0 -0
  242. /package/{icons → dist/icons}/manor.svg +0 -0
  243. /package/{icons → dist/icons}/map.svg +0 -0
  244. /package/{icons → dist/icons}/marker_reverse.svg +0 -0
  245. /package/{icons → dist/icons}/marker_selected.svg +0 -0
  246. /package/{icons → dist/icons}/marker_unselected.svg +0 -0
  247. /package/{icons → dist/icons}/marketplace.svg +0 -0
  248. /package/{icons → dist/icons}/massage.svg +0 -0
  249. /package/{icons → dist/icons}/mast.svg +0 -0
  250. /package/{icons → dist/icons}/mast_communications.svg +0 -0
  251. /package/{icons → dist/icons}/mast_lighting.svg +0 -0
  252. /package/{icons → dist/icons}/medical_supply.svg +0 -0
  253. /package/{icons → dist/icons}/memorial.svg +0 -0
  254. /package/{icons → dist/icons}/miniature_golf.svg +0 -0
  255. /package/{icons → dist/icons}/motel.svg +0 -0
  256. /package/{icons → dist/icons}/mountain_range.svg +0 -0
  257. /package/{icons → dist/icons}/multifaith.svg +0 -0
  258. /package/{icons → dist/icons}/musical_instrument.svg +0 -0
  259. /package/{icons → dist/icons}/newsagent.svg +0 -0
  260. /package/{icons → dist/icons}/nightclub.svg +0 -0
  261. /package/{icons → dist/icons}/ocean.svg +0 -0
  262. /package/{icons → dist/icons}/office.svg +0 -0
  263. /package/{icons → dist/icons}/outdoor_seating.svg +0 -0
  264. /package/{icons → dist/icons}/palace.svg +0 -0
  265. /package/{icons → dist/icons}/parcel_locker.svg +0 -0
  266. /package/{icons → dist/icons}/parking_space.svg +0 -0
  267. /package/{icons → dist/icons}/parking_tickets.svg +0 -0
  268. /package/{icons → dist/icons}/pet.svg +0 -0
  269. /package/{icons → dist/icons}/photo.svg +0 -0
  270. /package/{icons → dist/icons}/picnic.svg +0 -0
  271. /package/{icons → dist/icons}/plaque.svg +0 -0
  272. /package/{icons → dist/icons}/poi.svg +0 -0
  273. /package/{icons → dist/icons}/post_box.svg +0 -0
  274. /package/{icons → dist/icons}/post_office.svg +0 -0
  275. /package/{icons → dist/icons}/postal_code.svg +0 -0
  276. /package/{icons → dist/icons}/pub.svg +0 -0
  277. /package/{icons → dist/icons}/public_bath.svg +0 -0
  278. /package/{icons → dist/icons}/public_bookcase.svg +0 -0
  279. /package/{icons → dist/icons}/public_building.svg +0 -0
  280. /package/{icons → dist/icons}/public_transport_tickets.svg +0 -0
  281. /package/{icons → dist/icons}/reverse.svg +0 -0
  282. /package/{icons → dist/icons}/river.svg +0 -0
  283. /package/{icons → dist/icons}/road.svg +0 -0
  284. /package/{icons → dist/icons}/saddle.svg +0 -0
  285. /package/{icons → dist/icons}/sauna.svg +0 -0
  286. /package/{icons → dist/icons}/sea.svg +0 -0
  287. /package/{icons → dist/icons}/second_hand.svg +0 -0
  288. /package/{icons → dist/icons}/shintoist.svg +0 -0
  289. /package/{icons → dist/icons}/shoe.svg +0 -0
  290. /package/{icons → dist/icons}/shower.svg +0 -0
  291. /package/{icons → dist/icons}/shrine.svg +0 -0
  292. /package/{icons → dist/icons}/sikhist.svg +0 -0
  293. /package/{icons → dist/icons}/slipway.svg +0 -0
  294. /package/{icons → dist/icons}/snowmobile.svg +0 -0
  295. /package/{icons → dist/icons}/social_facility.svg +0 -0
  296. /package/{icons → dist/icons}/sports.svg +0 -0
  297. /package/{icons → dist/icons}/sprite.json +0 -0
  298. /package/{icons → dist/icons}/sprite.png +0 -0
  299. /package/{icons → dist/icons}/sprite@2x.json +0 -0
  300. /package/{icons → dist/icons}/sprite@2x.png +0 -0
  301. /package/{icons → dist/icons}/stationery.svg +0 -0
  302. /package/{icons → dist/icons}/stile.svg +0 -0
  303. /package/{icons → dist/icons}/stone.svg +0 -0
  304. /package/{icons → dist/icons}/storage_tank.svg +0 -0
  305. /package/{icons → dist/icons}/stream.svg +0 -0
  306. /package/{icons → dist/icons}/street.svg +0 -0
  307. /package/{icons → dist/icons}/supermarket.svg +0 -0
  308. /package/{icons → dist/icons}/tea.svg +0 -0
  309. /package/{icons → dist/icons}/telescope_dish.svg +0 -0
  310. /package/{icons → dist/icons}/telescope_dome.svg +0 -0
  311. /package/{icons → dist/icons}/ticket.svg +0 -0
  312. /package/{icons → dist/icons}/tobacco.svg +0 -0
  313. /package/{icons → dist/icons}/tower_cantilever_communication.svg +0 -0
  314. /package/{icons → dist/icons}/tower_cooling.svg +0 -0
  315. /package/{icons → dist/icons}/tower_dish.svg +0 -0
  316. /package/{icons → dist/icons}/tower_dome.svg +0 -0
  317. /package/{icons → dist/icons}/tower_generic.svg +0 -0
  318. /package/{icons → dist/icons}/tower_lattice.svg +0 -0
  319. /package/{icons → dist/icons}/tower_lattice_communication.svg +0 -0
  320. /package/{icons → dist/icons}/tower_lattice_lighting.svg +0 -0
  321. /package/{icons → dist/icons}/tower_lighting.svg +0 -0
  322. /package/{icons → dist/icons}/townhall.svg +0 -0
  323. /package/{icons → dist/icons}/toys.svg +0 -0
  324. /package/{icons → dist/icons}/trade.svg +0 -0
  325. /package/{icons → dist/icons}/traffic_light.svg +0 -0
  326. /package/{icons → dist/icons}/train_station.svg +0 -0
  327. /package/{icons → dist/icons}/travel_agency.svg +0 -0
  328. /package/{icons → dist/icons}/tyres.svg +0 -0
  329. /package/{icons → dist/icons}/university.svg +0 -0
  330. /package/{icons → dist/icons}/variety_store.svg +0 -0
  331. /package/{icons → dist/icons}/vehicle_inspection.svg +0 -0
  332. /package/{icons → dist/icons}/vending_machine.svg +0 -0
  333. /package/{icons → dist/icons}/video.svg +0 -0
  334. /package/{icons → dist/icons}/video_games.svg +0 -0
  335. /package/{icons → dist/icons}/waste_disposal.svg +0 -0
  336. /package/{icons → dist/icons}/water_well.svg +0 -0
  337. /package/{icons → dist/icons}/waterfall.svg +0 -0
  338. /package/{icons → dist/icons}/wilderness_hut.svg +0 -0
package/vanilla.js DELETED
@@ -1,2799 +0,0 @@
1
- var Fi = Object.defineProperty;
2
- var ji = Object.getPrototypeOf;
3
- var Gi = Reflect.get;
4
- var Pt = (i) => {
5
- throw TypeError(i);
6
- };
7
- var Hi = (i, e, t) => e in i ? Fi(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
8
- var vt = (i, e, t) => Hi(i, typeof e != "symbol" ? e + "" : e, t), Lt = (i, e, t) => e.has(i) || Pt("Cannot " + t);
9
- var re = (i, e, t) => (Lt(i, e, "read from private field"), t ? t.call(i) : e.get(i)), _t = (i, e, t) => e.has(i) ? Pt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), Bt = (i, e, t, n) => (Lt(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t), Ft = (i, e, t) => (Lt(i, e, "access private method"), t);
10
- var jt = (i, e, t) => Gi(ji(i), t, e);
11
- function j() {
12
- }
13
- function Zi(i, e) {
14
- for (const t in e) i[t] = e[t];
15
- return (
16
- /** @type {T & S} */
17
- i
18
- );
19
- }
20
- function ai(i) {
21
- return i();
22
- }
23
- function Gt() {
24
- return /* @__PURE__ */ Object.create(null);
25
- }
26
- function he(i) {
27
- i.forEach(ai);
28
- }
29
- function li(i) {
30
- return typeof i == "function";
31
- }
32
- function Ee(i, e) {
33
- return i != i ? e == e : i !== e || i && typeof i == "object" || typeof i == "function";
34
- }
35
- let $e;
36
- function X(i, e) {
37
- return i === e ? !0 : ($e || ($e = document.createElement("a")), $e.href = e, i === $e.href);
38
- }
39
- function qi(i) {
40
- return Object.keys(i).length === 0;
41
- }
42
- function Qi(i, e, t, n) {
43
- if (i) {
44
- const r = ui(i, e, t, n);
45
- return i[0](r);
46
- }
47
- }
48
- function ui(i, e, t, n) {
49
- return i[1] && n ? Zi(t.ctx.slice(), i[1](n(e))) : t.ctx;
50
- }
51
- function Ki(i, e, t, n) {
52
- return i[2], e.dirty;
53
- }
54
- function Vi(i, e, t, n, r, l) {
55
- if (r) {
56
- const u = ui(e, t, n, l);
57
- i.p(u, r);
58
- }
59
- }
60
- function Yi(i) {
61
- if (i.ctx.length > 32) {
62
- const e = [], t = i.ctx.length / 32;
63
- for (let n = 0; n < t; n++)
64
- e[n] = -1;
65
- return e;
66
- }
67
- return -1;
68
- }
69
- function it(i) {
70
- return i ?? "";
71
- }
72
- function N(i, e) {
73
- i.appendChild(e);
74
- }
75
- function A(i, e, t) {
76
- i.insertBefore(e, t || null);
77
- }
78
- function I(i) {
79
- i.parentNode && i.parentNode.removeChild(i);
80
- }
81
- function R(i) {
82
- return document.createElement(i);
83
- }
84
- function fe(i) {
85
- return document.createElementNS("http://www.w3.org/2000/svg", i);
86
- }
87
- function Le(i) {
88
- return document.createTextNode(i);
89
- }
90
- function ee() {
91
- return Le(" ");
92
- }
93
- function Xi() {
94
- return Le("");
95
- }
96
- function Q(i, e, t, n) {
97
- return i.addEventListener(e, t, n), () => i.removeEventListener(e, t, n);
98
- }
99
- function Ji(i) {
100
- return function(e) {
101
- return e.preventDefault(), i.call(this, e);
102
- };
103
- }
104
- function a(i, e, t) {
105
- t == null ? i.removeAttribute(e) : i.getAttribute(e) !== t && i.setAttribute(e, t);
106
- }
107
- function xi(i) {
108
- return Array.from(i.childNodes);
109
- }
110
- function Ge(i, e) {
111
- e = "" + e, i.data !== e && (i.data = /** @type {string} */
112
- e);
113
- }
114
- function Ht(i, e) {
115
- i.value = e ?? "";
116
- }
117
- function Oe(i, e, t) {
118
- i.classList.toggle(e, !!t);
119
- }
120
- function $i(i, e, { bubbles: t = !1, cancelable: n = !1 } = {}) {
121
- return new CustomEvent(i, { detail: e, bubbles: t, cancelable: n });
122
- }
123
- let He;
124
- function je(i) {
125
- He = i;
126
- }
127
- function ci() {
128
- if (!He) throw new Error("Function called outside component initialization");
129
- return He;
130
- }
131
- function en(i) {
132
- ci().$$.on_destroy.push(i);
133
- }
134
- function di() {
135
- const i = ci();
136
- return (e, t, { cancelable: n = !1 } = {}) => {
137
- const r = i.$$.callbacks[e];
138
- if (r) {
139
- const l = $i(
140
- /** @type {string} */
141
- e,
142
- t,
143
- { cancelable: n }
144
- );
145
- return r.slice().forEach((u) => {
146
- u.call(i, l);
147
- }), !l.defaultPrevented;
148
- }
149
- return !0;
150
- };
151
- }
152
- function tn(i, e) {
153
- const t = i.$$.callbacks[e.type];
154
- t && t.slice().forEach((n) => n.call(this, e));
155
- }
156
- const We = [], wt = [];
157
- let ze = [];
158
- const Zt = [], nn = /* @__PURE__ */ Promise.resolve();
159
- let Et = !1;
160
- function rn() {
161
- Et || (Et = !0, nn.then(fi));
162
- }
163
- function St(i) {
164
- ze.push(i);
165
- }
166
- const yt = /* @__PURE__ */ new Set();
167
- let Ce = 0;
168
- function fi() {
169
- if (Ce !== 0)
170
- return;
171
- const i = He;
172
- do {
173
- try {
174
- for (; Ce < We.length; ) {
175
- const e = We[Ce];
176
- Ce++, je(e), sn(e.$$);
177
- }
178
- } catch (e) {
179
- throw We.length = 0, Ce = 0, e;
180
- }
181
- for (je(null), We.length = 0, Ce = 0; wt.length; ) wt.pop()();
182
- for (let e = 0; e < ze.length; e += 1) {
183
- const t = ze[e];
184
- yt.has(t) || (yt.add(t), t());
185
- }
186
- ze.length = 0;
187
- } while (We.length);
188
- for (; Zt.length; )
189
- Zt.pop()();
190
- Et = !1, yt.clear(), je(i);
191
- }
192
- function sn(i) {
193
- if (i.fragment !== null) {
194
- i.update(), he(i.before_update);
195
- const e = i.dirty;
196
- i.dirty = [-1], i.fragment && i.fragment.p(i.ctx, e), i.after_update.forEach(St);
197
- }
198
- }
199
- function on(i) {
200
- const e = [], t = [];
201
- ze.forEach((n) => i.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), ze = e;
202
- }
203
- const tt = /* @__PURE__ */ new Set();
204
- let we;
205
- function Be() {
206
- we = {
207
- r: 0,
208
- c: [],
209
- p: we
210
- // parent group
211
- };
212
- }
213
- function Fe() {
214
- we.r || he(we.c), we = we.p;
215
- }
216
- function P(i, e) {
217
- i && i.i && (tt.delete(i), i.i(e));
218
- }
219
- function q(i, e, t, n) {
220
- if (i && i.o) {
221
- if (tt.has(i)) return;
222
- tt.add(i), we.c.push(() => {
223
- tt.delete(i), n && (t && i.d(1), n());
224
- }), i.o(e);
225
- } else n && n();
226
- }
227
- function qt(i) {
228
- return (i == null ? void 0 : i.length) !== void 0 ? i : Array.from(i);
229
- }
230
- function an(i, e) {
231
- q(i, 1, 1, () => {
232
- e.delete(i.key);
233
- });
234
- }
235
- function ln(i, e, t, n, r, l, u, s, d, c, f, L) {
236
- let b = i.length, E = l.length, g = b;
237
- const p = {};
238
- for (; g--; ) p[i[g].key] = g;
239
- const D = [], k = /* @__PURE__ */ new Map(), W = /* @__PURE__ */ new Map(), B = [];
240
- for (g = E; g--; ) {
241
- const w = L(r, l, g), _ = t(w);
242
- let S = u.get(_);
243
- S ? B.push(() => S.p(w, e)) : (S = c(_, w), S.c()), k.set(_, D[g] = S), _ in p && W.set(_, Math.abs(g - p[_]));
244
- }
245
- const K = /* @__PURE__ */ new Set(), C = /* @__PURE__ */ new Set();
246
- function M(w) {
247
- P(w, 1), w.m(s, f), u.set(w.key, w), f = w.first, E--;
248
- }
249
- for (; b && E; ) {
250
- const w = D[E - 1], _ = i[b - 1], S = w.key, U = _.key;
251
- w === _ ? (f = w.first, b--, E--) : k.has(U) ? !u.has(S) || K.has(S) ? M(w) : C.has(U) ? b-- : W.get(S) > W.get(U) ? (C.add(S), M(w)) : (K.add(U), b--) : (d(_, u), b--);
252
- }
253
- for (; b--; ) {
254
- const w = i[b];
255
- k.has(w.key) || d(w, u);
256
- }
257
- for (; E; ) M(D[E - 1]);
258
- return he(B), D;
259
- }
260
- function _e(i) {
261
- i && i.c();
262
- }
263
- function me(i, e, t) {
264
- const { fragment: n, after_update: r } = i.$$;
265
- n && n.m(e, t), St(() => {
266
- const l = i.$$.on_mount.map(ai).filter(li);
267
- i.$$.on_destroy ? i.$$.on_destroy.push(...l) : he(l), i.$$.on_mount = [];
268
- }), r.forEach(St);
269
- }
270
- function ge(i, e) {
271
- const t = i.$$;
272
- t.fragment !== null && (on(t.after_update), he(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
273
- }
274
- function un(i, e) {
275
- i.$$.dirty[0] === -1 && (We.push(i), rn(), i.$$.dirty.fill(0)), i.$$.dirty[e / 31 | 0] |= 1 << e % 31;
276
- }
277
- function Se(i, e, t, n, r, l, u = null, s = [-1]) {
278
- const d = He;
279
- je(i);
280
- const c = i.$$ = {
281
- fragment: null,
282
- ctx: [],
283
- // state
284
- props: l,
285
- update: j,
286
- not_equal: r,
287
- bound: Gt(),
288
- // lifecycle
289
- on_mount: [],
290
- on_destroy: [],
291
- on_disconnect: [],
292
- before_update: [],
293
- after_update: [],
294
- context: new Map(e.context || (d ? d.$$.context : [])),
295
- // everything else
296
- callbacks: Gt(),
297
- dirty: s,
298
- skip_bound: !1,
299
- root: e.target || d.$$.root
300
- };
301
- u && u(c.root);
302
- let f = !1;
303
- if (c.ctx = t ? t(i, e.props || {}, (L, b, ...E) => {
304
- const g = E.length ? E[0] : b;
305
- return c.ctx && r(c.ctx[L], c.ctx[L] = g) && (!c.skip_bound && c.bound[L] && c.bound[L](g), f && un(i, L)), b;
306
- }) : [], c.update(), f = !0, he(c.before_update), c.fragment = n ? n(c.ctx) : !1, e.target) {
307
- if (e.hydrate) {
308
- const L = xi(e.target);
309
- c.fragment && c.fragment.l(L), L.forEach(I);
310
- } else
311
- c.fragment && c.fragment.c();
312
- e.intro && P(i.$$.fragment), me(i, e.target, e.anchor), fi();
313
- }
314
- je(d);
315
- }
316
- class pe {
317
- constructor() {
318
- /**
319
- * ### PRIVATE API
320
- *
321
- * Do not use, may change at any time
322
- *
323
- * @type {any}
324
- */
325
- vt(this, "$$");
326
- /**
327
- * ### PRIVATE API
328
- *
329
- * Do not use, may change at any time
330
- *
331
- * @type {any}
332
- */
333
- vt(this, "$$set");
334
- }
335
- /** @returns {void} */
336
- $destroy() {
337
- ge(this, 1), this.$destroy = j;
338
- }
339
- /**
340
- * @template {Extract<keyof Events, string>} K
341
- * @param {K} type
342
- * @param {((e: Events[K]) => void) | null | undefined} callback
343
- * @returns {() => void}
344
- */
345
- $on(e, t) {
346
- if (!li(t))
347
- return j;
348
- const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
349
- return n.push(t), () => {
350
- const r = n.indexOf(t);
351
- r !== -1 && n.splice(r, 1);
352
- };
353
- }
354
- /**
355
- * @param {Partial<Props>} props
356
- * @returns {void}
357
- */
358
- $set(e) {
359
- this.$$set && !qi(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
360
- }
361
- }
362
- const cn = "4";
363
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(cn);
364
- function dn(i) {
365
- let e, t;
366
- return {
367
- c() {
368
- e = fe("svg"), t = fe("path"), a(t, "d", "M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"), a(e, "viewBox", "0 0 14 14"), a(e, "width", "13"), a(e, "height", "13"), a(e, "class", "svelte-en2qvf");
369
- },
370
- m(n, r) {
371
- A(n, e, r), N(e, t);
372
- },
373
- p: j,
374
- i: j,
375
- o: j,
376
- d(n) {
377
- n && I(e);
378
- }
379
- };
380
- }
381
- class mi extends pe {
382
- constructor(e) {
383
- super(), Se(this, e, null, dn, Ee, {});
384
- }
385
- }
386
- function fn(i) {
387
- let e, t;
388
- return {
389
- c() {
390
- e = fe("svg"), t = fe("path"), a(t, "d", "M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"), a(e, "viewBox", "0 0 30 30"), a(e, "fill", "none"), a(e, "xmlns", "http://www.w3.org/2000/svg"), a(e, "class", "svelte-d2loi5");
391
- },
392
- m(n, r) {
393
- A(n, e, r), N(e, t);
394
- },
395
- p: j,
396
- i: j,
397
- o: j,
398
- d(n) {
399
- n && I(e);
400
- }
401
- };
402
- }
403
- class gi extends pe {
404
- constructor(e) {
405
- super(), Se(this, e, null, fn, Ee, {});
406
- }
407
- }
408
- function mn(i) {
409
- let e, t;
410
- return {
411
- c() {
412
- e = R("img"), X(e.src, t = /*iconsBaseUrl*/
413
- i[3] + "area.svg") || a(e, "src", t), a(
414
- e,
415
- "alt",
416
- /*placeType*/
417
- i[7]
418
- ), a(
419
- e,
420
- "title",
421
- /*placeType*/
422
- i[7]
423
- ), a(e, "class", "svelte-w9y5n9");
424
- },
425
- m(n, r) {
426
- A(n, e, r);
427
- },
428
- p(n, r) {
429
- r & /*iconsBaseUrl*/
430
- 8 && !X(e.src, t = /*iconsBaseUrl*/
431
- n[3] + "area.svg") && a(e, "src", t), r & /*placeType*/
432
- 128 && a(
433
- e,
434
- "alt",
435
- /*placeType*/
436
- n[7]
437
- ), r & /*placeType*/
438
- 128 && a(
439
- e,
440
- "title",
441
- /*placeType*/
442
- n[7]
443
- );
444
- },
445
- d(n) {
446
- n && I(e);
447
- }
448
- };
449
- }
450
- function gn(i) {
451
- let e, t;
452
- return {
453
- c() {
454
- e = R("img"), X(e.src, t = /*iconsBaseUrl*/
455
- i[3] + "reverse.svg") || a(e, "src", t), a(
456
- e,
457
- "alt",
458
- /*placeType*/
459
- i[7]
460
- ), a(
461
- e,
462
- "title",
463
- /*placeType*/
464
- i[7]
465
- ), a(e, "class", "svelte-w9y5n9");
466
- },
467
- m(n, r) {
468
- A(n, e, r);
469
- },
470
- p(n, r) {
471
- r & /*iconsBaseUrl*/
472
- 8 && !X(e.src, t = /*iconsBaseUrl*/
473
- n[3] + "reverse.svg") && a(e, "src", t), r & /*placeType*/
474
- 128 && a(
475
- e,
476
- "alt",
477
- /*placeType*/
478
- n[7]
479
- ), r & /*placeType*/
480
- 128 && a(
481
- e,
482
- "title",
483
- /*placeType*/
484
- n[7]
485
- );
486
- },
487
- d(n) {
488
- n && I(e);
489
- }
490
- };
491
- }
492
- function hn(i) {
493
- let e, t;
494
- return {
495
- c() {
496
- e = R("img"), X(e.src, t = /*iconsBaseUrl*/
497
- i[3] + "poi.svg") || a(e, "src", t), a(
498
- e,
499
- "alt",
500
- /*placeType*/
501
- i[7]
502
- ), a(
503
- e,
504
- "title",
505
- /*placeType*/
506
- i[7]
507
- ), a(e, "class", "svelte-w9y5n9");
508
- },
509
- m(n, r) {
510
- A(n, e, r);
511
- },
512
- p(n, r) {
513
- r & /*iconsBaseUrl*/
514
- 8 && !X(e.src, t = /*iconsBaseUrl*/
515
- n[3] + "poi.svg") && a(e, "src", t), r & /*placeType*/
516
- 128 && a(
517
- e,
518
- "alt",
519
- /*placeType*/
520
- n[7]
521
- ), r & /*placeType*/
522
- 128 && a(
523
- e,
524
- "title",
525
- /*placeType*/
526
- n[7]
527
- );
528
- },
529
- d(n) {
530
- n && I(e);
531
- }
532
- };
533
- }
534
- function bn(i) {
535
- let e, t;
536
- return {
537
- c() {
538
- e = R("img"), X(e.src, t = /*iconsBaseUrl*/
539
- i[3] + "postal_code.svg") || a(e, "src", t), a(
540
- e,
541
- "alt",
542
- /*placeType*/
543
- i[7]
544
- ), a(
545
- e,
546
- "title",
547
- /*placeType*/
548
- i[7]
549
- ), a(e, "class", "svelte-w9y5n9");
550
- },
551
- m(n, r) {
552
- A(n, e, r);
553
- },
554
- p(n, r) {
555
- r & /*iconsBaseUrl*/
556
- 8 && !X(e.src, t = /*iconsBaseUrl*/
557
- n[3] + "postal_code.svg") && a(e, "src", t), r & /*placeType*/
558
- 128 && a(
559
- e,
560
- "alt",
561
- /*placeType*/
562
- n[7]
563
- ), r & /*placeType*/
564
- 128 && a(
565
- e,
566
- "title",
567
- /*placeType*/
568
- n[7]
569
- );
570
- },
571
- d(n) {
572
- n && I(e);
573
- }
574
- };
575
- }
576
- function vn(i) {
577
- let e, t;
578
- return {
579
- c() {
580
- e = R("img"), X(e.src, t = /*iconsBaseUrl*/
581
- i[3] + "street.svg") || a(e, "src", t), a(
582
- e,
583
- "alt",
584
- /*placeType*/
585
- i[7]
586
- ), a(
587
- e,
588
- "title",
589
- /*placeType*/
590
- i[7]
591
- ), a(e, "class", "svelte-w9y5n9");
592
- },
593
- m(n, r) {
594
- A(n, e, r);
595
- },
596
- p(n, r) {
597
- r & /*iconsBaseUrl*/
598
- 8 && !X(e.src, t = /*iconsBaseUrl*/
599
- n[3] + "street.svg") && a(e, "src", t), r & /*placeType*/
600
- 128 && a(
601
- e,
602
- "alt",
603
- /*placeType*/
604
- n[7]
605
- ), r & /*placeType*/
606
- 128 && a(
607
- e,
608
- "title",
609
- /*placeType*/
610
- n[7]
611
- );
612
- },
613
- d(n) {
614
- n && I(e);
615
- }
616
- };
617
- }
618
- function Ln(i) {
619
- let e, t;
620
- return {
621
- c() {
622
- e = R("img"), X(e.src, t = /*iconsBaseUrl*/
623
- i[3] + "road.svg") || a(e, "src", t), a(
624
- e,
625
- "alt",
626
- /*placeType*/
627
- i[7]
628
- ), a(
629
- e,
630
- "title",
631
- /*placeType*/
632
- i[7]
633
- ), a(e, "class", "svelte-w9y5n9");
634
- },
635
- m(n, r) {
636
- A(n, e, r);
637
- },
638
- p(n, r) {
639
- r & /*iconsBaseUrl*/
640
- 8 && !X(e.src, t = /*iconsBaseUrl*/
641
- n[3] + "road.svg") && a(e, "src", t), r & /*placeType*/
642
- 128 && a(
643
- e,
644
- "alt",
645
- /*placeType*/
646
- n[7]
647
- ), r & /*placeType*/
648
- 128 && a(
649
- e,
650
- "title",
651
- /*placeType*/
652
- n[7]
653
- );
654
- },
655
- d(n) {
656
- n && I(e);
657
- }
658
- };
659
- }
660
- function _n(i) {
661
- let e, t;
662
- return {
663
- c() {
664
- e = R("img"), X(e.src, t = /*iconsBaseUrl*/
665
- i[3] + "housenumber.svg") || a(e, "src", t), a(
666
- e,
667
- "alt",
668
- /*placeType*/
669
- i[7]
670
- ), a(
671
- e,
672
- "title",
673
- /*placeType*/
674
- i[7]
675
- ), a(e, "class", "svelte-w9y5n9");
676
- },
677
- m(n, r) {
678
- A(n, e, r);
679
- },
680
- p(n, r) {
681
- r & /*iconsBaseUrl*/
682
- 8 && !X(e.src, t = /*iconsBaseUrl*/
683
- n[3] + "housenumber.svg") && a(e, "src", t), r & /*placeType*/
684
- 128 && a(
685
- e,
686
- "alt",
687
- /*placeType*/
688
- n[7]
689
- ), r & /*placeType*/
690
- 128 && a(
691
- e,
692
- "title",
693
- /*placeType*/
694
- n[7]
695
- );
696
- },
697
- d(n) {
698
- n && I(e);
699
- }
700
- };
701
- }
702
- function yn(i) {
703
- let e, t, n, r;
704
- return {
705
- c() {
706
- e = R("img"), X(e.src, t = /*imageUrl*/
707
- i[5]) || a(e, "src", t), a(
708
- e,
709
- "alt",
710
- /*category*/
711
- i[4]
712
- ), a(
713
- e,
714
- "title",
715
- /*placeType*/
716
- i[7]
717
- ), a(e, "class", "svelte-w9y5n9");
718
- },
719
- m(l, u) {
720
- A(l, e, u), n || (r = Q(
721
- e,
722
- "error",
723
- /*error_handler*/
724
- i[14]
725
- ), n = !0);
726
- },
727
- p(l, u) {
728
- u & /*imageUrl*/
729
- 32 && !X(e.src, t = /*imageUrl*/
730
- l[5]) && a(e, "src", t), u & /*category*/
731
- 16 && a(
732
- e,
733
- "alt",
734
- /*category*/
735
- l[4]
736
- ), u & /*placeType*/
737
- 128 && a(
738
- e,
739
- "title",
740
- /*placeType*/
741
- l[7]
742
- );
743
- },
744
- d(l) {
745
- l && I(e), n = !1, r();
746
- }
747
- };
748
- }
749
- function wn(i) {
750
- let e, t;
751
- return {
752
- c() {
753
- e = R("div"), a(e, "class", "sprite-icon svelte-w9y5n9"), a(e, "style", t = `
754
- width: ${/*spriteIcon*/
755
- i[6].width / ie}px;
756
- height: ${/*spriteIcon*/
757
- i[6].height / ie}px;
758
- background-image: url(${/*iconsBaseUrl*/
759
- i[3]}sprite${pt}.png);
760
- background-position: -${/*spriteIcon*/
761
- i[6].x / ie}px -${/*spriteIcon*/
762
- i[6].y / ie}px;
763
- background-size: ${se.width / ie}px ${se.height / ie}px;
764
- `), a(
765
- e,
766
- "title",
767
- /*placeType*/
768
- i[7]
769
- );
770
- },
771
- m(n, r) {
772
- A(n, e, r);
773
- },
774
- p(n, r) {
775
- r & /*spriteIcon, iconsBaseUrl*/
776
- 72 && t !== (t = `
777
- width: ${/*spriteIcon*/
778
- n[6].width / ie}px;
779
- height: ${/*spriteIcon*/
780
- n[6].height / ie}px;
781
- background-image: url(${/*iconsBaseUrl*/
782
- n[3]}sprite${pt}.png);
783
- background-position: -${/*spriteIcon*/
784
- n[6].x / ie}px -${/*spriteIcon*/
785
- n[6].y / ie}px;
786
- background-size: ${se.width / ie}px ${se.height / ie}px;
787
- `) && a(e, "style", t), r & /*placeType*/
788
- 128 && a(
789
- e,
790
- "title",
791
- /*placeType*/
792
- n[7]
793
- );
794
- },
795
- d(n) {
796
- n && I(e);
797
- }
798
- };
799
- }
800
- function Qt(i) {
801
- let e, t;
802
- return {
803
- c() {
804
- e = R("span"), t = Le(
805
- /*placeType*/
806
- i[7]
807
- ), a(e, "class", "secondary svelte-w9y5n9");
808
- },
809
- m(n, r) {
810
- A(n, e, r), N(e, t);
811
- },
812
- p(n, r) {
813
- r & /*placeType*/
814
- 128 && Ge(
815
- t,
816
- /*placeType*/
817
- n[7]
818
- );
819
- },
820
- d(n) {
821
- n && I(e);
822
- }
823
- };
824
- }
825
- function En(i) {
826
- let e, t, n, r, l, u, s, d, c, f = (
827
- /*isReverse*/
828
- (i[8] ? (
829
- /*feature*/
830
- i[0].place_name
831
- ) : (
832
- /*feature*/
833
- i[0].place_name.replace(/,.*/, "")
834
- )) + ""
835
- ), L, b, E = (
836
- /*showPlaceType*/
837
- i[2] === "always" || /*showPlaceType*/
838
- i[2] !== "never" && !/*feature*/
839
- i[0].address && !/*feature*/
840
- i[0].id.startsWith("road.") && !/*feature*/
841
- i[0].id.startsWith("address.") && !/*feature*/
842
- i[0].id.startsWith("postal_code.") && (!/*feature*/
843
- i[0].id.startsWith("poi.") || !/*imageUrl*/
844
- i[5]) && !/*isReverse*/
845
- i[8]
846
- ), g, p, D = (
847
- /*isReverse*/
848
- (i[8] ? "" : (
849
- /*feature*/
850
- i[0].place_name.replace(/[^,]*,?\s*/, "")
851
- )) + ""
852
- ), k, W, B, K, C, M;
853
- function w(v, m) {
854
- return m & /*feature*/
855
- 1 && (t = null), m & /*feature*/
856
- 1 && (n = null), m & /*feature*/
857
- 1 && (r = null), m & /*feature*/
858
- 1 && (l = null), se && /*spriteIcon*/
859
- v[6] ? wn : (
860
- /*imageUrl*/
861
- v[5] ? yn : (
862
- /*feature*/
863
- v[0].address ? _n : (t == null && (t = !!/*feature*/
864
- v[0].id.startsWith("road.")), t ? Ln : (n == null && (n = !!/*feature*/
865
- v[0].id.startsWith("address.")), n ? vn : (r == null && (r = !!/*feature*/
866
- v[0].id.startsWith("postal_code.")), r ? bn : (l == null && (l = !!/*feature*/
867
- v[0].id.startsWith("poi.")), l ? hn : (
868
- /*isReverse*/
869
- v[8] ? gn : mn
870
- )))))
871
- )
872
- );
873
- }
874
- let _ = w(i, -1), S = _(i), U = E && Qt(i);
875
- return {
876
- c() {
877
- e = R("li"), S.c(), u = ee(), s = R("span"), d = R("span"), c = R("span"), L = Le(f), b = ee(), U && U.c(), g = ee(), p = R("span"), k = Le(D), a(c, "class", "primary svelte-w9y5n9"), a(d, "class", "svelte-w9y5n9"), a(p, "class", "line2 svelte-w9y5n9"), a(s, "class", "texts svelte-w9y5n9"), a(e, "tabindex", "-1"), a(e, "role", "option"), a(e, "aria-selected", W = /*style*/
878
- i[1] === "selected"), a(e, "aria-checked", B = /*style*/
879
- i[1] === "picked"), a(e, "class", K = it(
880
- /*style*/
881
- i[1]
882
- ) + " svelte-w9y5n9");
883
- },
884
- m(v, m) {
885
- A(v, e, m), S.m(e, null), N(e, u), N(e, s), N(s, d), N(d, c), N(c, L), N(d, b), U && U.m(d, null), N(s, g), N(s, p), N(p, k), C || (M = [
886
- Q(
887
- e,
888
- "mouseenter",
889
- /*mouseenter_handler*/
890
- i[13]
891
- ),
892
- Q(
893
- e,
894
- "focus",
895
- /*focus_handler*/
896
- i[15]
897
- ),
898
- Q(
899
- e,
900
- "click",
901
- /*click_handler*/
902
- i[16]
903
- )
904
- ], C = !0);
905
- },
906
- p(v, [m]) {
907
- _ === (_ = w(v, m)) && S ? S.p(v, m) : (S.d(1), S = _(v), S && (S.c(), S.m(e, u))), m & /*isReverse, feature*/
908
- 257 && f !== (f = /*isReverse*/
909
- (v[8] ? (
910
- /*feature*/
911
- v[0].place_name
912
- ) : (
913
- /*feature*/
914
- v[0].place_name.replace(/,.*/, "")
915
- )) + "") && Ge(L, f), m & /*showPlaceType, feature, imageUrl, isReverse*/
916
- 293 && (E = /*showPlaceType*/
917
- v[2] === "always" || /*showPlaceType*/
918
- v[2] !== "never" && !/*feature*/
919
- v[0].address && !/*feature*/
920
- v[0].id.startsWith("road.") && !/*feature*/
921
- v[0].id.startsWith("address.") && !/*feature*/
922
- v[0].id.startsWith("postal_code.") && (!/*feature*/
923
- v[0].id.startsWith("poi.") || !/*imageUrl*/
924
- v[5]) && !/*isReverse*/
925
- v[8]), E ? U ? U.p(v, m) : (U = Qt(v), U.c(), U.m(d, null)) : U && (U.d(1), U = null), m & /*isReverse, feature*/
926
- 257 && D !== (D = /*isReverse*/
927
- (v[8] ? "" : (
928
- /*feature*/
929
- v[0].place_name.replace(/[^,]*,?\s*/, "")
930
- )) + "") && Ge(k, D), m & /*style*/
931
- 2 && W !== (W = /*style*/
932
- v[1] === "selected") && a(e, "aria-selected", W), m & /*style*/
933
- 2 && B !== (B = /*style*/
934
- v[1] === "picked") && a(e, "aria-checked", B), m & /*style*/
935
- 2 && K !== (K = it(
936
- /*style*/
937
- v[1]
938
- ) + " svelte-w9y5n9") && a(e, "class", K);
939
- },
940
- i: j,
941
- o: j,
942
- d(v) {
943
- v && I(e), S.d(), U && U.d(), C = !1, he(M);
944
- }
945
- };
946
- }
947
- const hi = typeof devicePixelRatio > "u" ? 1 : devicePixelRatio > 1.25, pt = hi ? "@2x" : "", ie = hi ? 2 : 1;
948
- let se, et;
949
- function Sn(i, e, t) {
950
- let n, r, l, { feature: u } = e, { style: s = "default" } = e, { showPlaceType: d } = e, { missingIconsCache: c } = e, { iconsBaseUrl: f } = e;
951
- const L = di();
952
- let b, E, g, p;
953
- function D() {
954
- et ?? (et = fetch(`${f}sprite${pt}.json`).then((_) => _.json()).then((_) => {
955
- se = _;
956
- }).catch(() => {
957
- se = null;
958
- }));
959
- }
960
- function k() {
961
- E && c.add(E), W();
962
- }
963
- function W() {
964
- se !== void 0 ? B() : (D(), et == null || et.then(B));
965
- }
966
- function B() {
967
- do {
968
- if (p--, t(4, b = n == null ? void 0 : n[p]), t(6, g = b ? se == null ? void 0 : se.icons[b] : void 0), g)
969
- break;
970
- t(5, E = b ? f + b.replace(/ /g, "_") + ".svg" : void 0);
971
- } while (p > -1 && (!E || c.has(E)));
972
- }
973
- function K(_) {
974
- tn.call(this, i, _);
975
- }
976
- const C = () => k(), M = () => L("select", void 0), w = (_) => {
977
- document.activeElement !== _.target && L("select", void 0);
978
- };
979
- return i.$$set = (_) => {
980
- "feature" in _ && t(0, u = _.feature), "style" in _ && t(1, s = _.style), "showPlaceType" in _ && t(2, d = _.showPlaceType), "missingIconsCache" in _ && t(11, c = _.missingIconsCache), "iconsBaseUrl" in _ && t(3, f = _.iconsBaseUrl);
981
- }, i.$$.update = () => {
982
- var _, S, U, v, m;
983
- i.$$.dirty & /*feature*/
984
- 1 && t(12, n = (_ = u.properties) == null ? void 0 : _.categories), i.$$.dirty & /*feature*/
985
- 1 && t(8, r = u.place_type[0] === "reverse"), i.$$.dirty & /*feature*/
986
- 1 && t(7, l = ((U = (S = u.properties) == null ? void 0 : S.categories) == null ? void 0 : U.join(", ")) ?? ((m = (v = u.properties) == null ? void 0 : v.place_type_name) == null ? void 0 : m[0]) ?? u.place_type[0]), i.$$.dirty & /*categories*/
987
- 4096 && (p = (n == null ? void 0 : n.length) ?? 0, W());
988
- }, [
989
- u,
990
- s,
991
- d,
992
- f,
993
- b,
994
- E,
995
- g,
996
- l,
997
- r,
998
- L,
999
- k,
1000
- c,
1001
- n,
1002
- K,
1003
- C,
1004
- M,
1005
- w
1006
- ];
1007
- }
1008
- class pn extends pe {
1009
- constructor(e) {
1010
- super(), Se(this, e, Sn, En, Ee, {
1011
- feature: 0,
1012
- style: 1,
1013
- showPlaceType: 2,
1014
- missingIconsCache: 11,
1015
- iconsBaseUrl: 3
1016
- });
1017
- }
1018
- }
1019
- function kn(i) {
1020
- let e;
1021
- return {
1022
- c() {
1023
- e = R("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="loading-icon svelte-1ocfouu"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', a(e, "class", "svelte-1ocfouu");
1024
- },
1025
- m(t, n) {
1026
- A(t, e, n);
1027
- },
1028
- p: j,
1029
- i: j,
1030
- o: j,
1031
- d(t) {
1032
- t && I(e);
1033
- }
1034
- };
1035
- }
1036
- class Tn extends pe {
1037
- constructor(e) {
1038
- super(), Se(this, e, null, kn, Ee, {});
1039
- }
1040
- }
1041
- function Nn(i) {
1042
- let e, t;
1043
- return {
1044
- c() {
1045
- e = fe("svg"), t = fe("path"), a(t, "d", "M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"), a(e, "viewBox", "0 0 60.006 21.412"), a(e, "width", "14"), a(e, "height", "20"), a(e, "class", "svelte-en2qvf");
1046
- },
1047
- m(n, r) {
1048
- A(n, e, r), N(e, t);
1049
- },
1050
- p: j,
1051
- i: j,
1052
- o: j,
1053
- d(n) {
1054
- n && I(e);
1055
- }
1056
- };
1057
- }
1058
- class Mn extends pe {
1059
- constructor(e) {
1060
- super(), Se(this, e, null, Nn, Ee, {});
1061
- }
1062
- }
1063
- function Cn(i) {
1064
- let e, t, n;
1065
- return {
1066
- c() {
1067
- e = fe("svg"), t = fe("circle"), n = fe("path"), a(t, "cx", "4.789"), a(t, "cy", "4.787"), a(t, "r", "3.85"), a(t, "class", "svelte-1aq105l"), a(n, "d", "M12.063 12.063 7.635 7.635"), a(n, "class", "svelte-1aq105l"), a(e, "xmlns", "http://www.w3.org/2000/svg"), a(e, "width", "13"), a(e, "height", "13"), a(e, "viewBox", "0 0 13 13"), a(e, "class", "svelte-1aq105l");
1068
- },
1069
- m(r, l) {
1070
- A(r, e, l), N(e, t), N(e, n);
1071
- },
1072
- p: j,
1073
- i: j,
1074
- o: j,
1075
- d(r) {
1076
- r && I(e);
1077
- }
1078
- };
1079
- }
1080
- class Wn extends pe {
1081
- constructor(e) {
1082
- super(), Se(this, e, null, Cn, Ee, {});
1083
- }
1084
- }
1085
- function On(i, e, t) {
1086
- const n = e[1], r = e[0], l = n - r;
1087
- return i === n && t ? i : ((i - r) % l + l) % l + r;
1088
- }
1089
- function Kt(i) {
1090
- const e = [...i];
1091
- return e[2] < e[0] && (Math.abs((e[0] + e[2] + 360) / 2) > Math.abs((e[0] - 360 + e[2]) / 2) ? e[0] -= 360 : e[2] += 360), e;
1092
- }
1093
- let Ae;
1094
- async function zn(i, e, t) {
1095
- const n = i == null ? void 0 : i.getCenterAndZoom();
1096
- for (const r of e ?? [])
1097
- if (!(n && (r.minZoom != null && r.minZoom > n[0] || r.maxZoom != null && r.maxZoom < n[0]))) {
1098
- if (r.type === "fixed")
1099
- return r.coordinates.join(",");
1100
- e: if (r.type === "client-geolocation") {
1101
- if (Ae && r.cachedLocationExpiry && Ae.time + r.cachedLocationExpiry > Date.now()) {
1102
- if (!Ae.coords)
1103
- break e;
1104
- return Ae.coords;
1105
- }
1106
- let l;
1107
- try {
1108
- return l = await new Promise((u, s) => {
1109
- t.signal.addEventListener("abort", () => {
1110
- s(Error("aborted"));
1111
- }), navigator.geolocation.getCurrentPosition(
1112
- (d) => {
1113
- u(
1114
- [d.coords.longitude, d.coords.latitude].map((c) => c.toFixed(6)).join(",")
1115
- );
1116
- },
1117
- (d) => {
1118
- s(d);
1119
- },
1120
- r
1121
- );
1122
- }), l;
1123
- } catch {
1124
- } finally {
1125
- r.cachedLocationExpiry && (Ae = {
1126
- time: Date.now(),
1127
- coords: l
1128
- });
1129
- }
1130
- if (t.signal.aborted)
1131
- return;
1132
- }
1133
- if (r.type === "server-geolocation")
1134
- return "ip";
1135
- if (n && r.type === "map-center")
1136
- return n[1].toFixed(6) + "," + n[2].toFixed(6);
1137
- }
1138
- }
1139
- const Rn = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i, Vt = /^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/, Yt = /^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i, Xt = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i, Jt = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i, xt = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;
1140
- function Dn(i) {
1141
- if (!["DMS", "DM", "DD"].includes(i))
1142
- throw new Error("invalid format specified");
1143
- if (this.decimalCoordinates && this.decimalCoordinates.trim()) {
1144
- const e = this.decimalCoordinates.split(",").map((E) => Number(E.trim())), t = Number(e[0]), n = Number(e[1]), r = Math.abs(t), l = Math.abs(n), u = t > 0 ? "N" : "S", s = n > 0 ? "E" : "W";
1145
- let d;
1146
- i == "DD" && (d = `${r}° ${u}, ${l}° ${s}`);
1147
- const c = Math.floor(r), f = Math.floor(l), L = (r - c) * 60, b = (l - f) * 60;
1148
- if (i == "DM") {
1149
- let E = $t(L, 3).toFixed(3).padStart(6, "0"), g = $t(b, 3).toFixed(3).padStart(6, "0");
1150
- E.endsWith(".000") && g.endsWith(".000") && (E = E.replace(/\.000$/, ""), g = g.replace(/\.000$/, "")), d = `${c}° ${E}' ${u}, ${f}° ${g}' ${s}`;
1151
- }
1152
- if (i == "DMS") {
1153
- const E = Math.floor(L), g = Math.floor(b);
1154
- let p = ((L - E) * 60).toFixed(1).padStart(4, "0"), D = ((b - g) * 60).toFixed(1).padStart(4, "0");
1155
- const k = E.toString().padStart(2, "0"), W = g.toString().padStart(2, "0");
1156
- p.endsWith(".0") && D.endsWith(".0") && (p = p.replace(/\.0$/, ""), D = D.replace(/\.0$/, "")), d = `${c}° ${k}' ${p}" ${u}, ${f}° ${W}' ${D}" ${s}`;
1157
- }
1158
- return d;
1159
- } else
1160
- throw new Error("no decimal coordinates to convert");
1161
- }
1162
- function $t(i, e) {
1163
- const t = Math.pow(10, e);
1164
- return Math.round((i + Number.EPSILON) * t) / t;
1165
- }
1166
- function kt(i, e) {
1167
- e || (e = 5), i = i.replace(/\s+/g, " ").trim();
1168
- let t = null, n = null, r = "", l = "", u = null, s = [], d = !1;
1169
- if (Rn.test(i))
1170
- throw new Error("invalid coordinate value");
1171
- if (Vt.test(i))
1172
- if (s = Vt.exec(i), d = Pe(s), d)
1173
- t = Math.abs(s[1]) + s[2] / 60, Number(s[1]) < 0 && (t *= -1), n = Math.abs(s[3]) + s[4] / 60, Number(s[3]) < 0 && (n *= -1), u = "DM";
1174
- else
1175
- throw new Error("invalid coordinate format");
1176
- else if (Yt.test(i))
1177
- if (s = Yt.exec(i), d = Pe(s), d) {
1178
- if (t = s[2], n = s[6], t.includes(",") && (t = t.replace(",", ".")), n.includes(",") && (n = n.replace(",", ".")), u = "DD", Number(Math.round(t)) == Number(t))
1179
- throw new Error("integer only coordinate provided");
1180
- if (Number(Math.round(n)) == Number(n))
1181
- throw new Error("integer only coordinate provided");
1182
- s[1] ? (r = s[1], l = s[5]) : s[4] && (r = s[4], l = s[8]);
1183
- } else
1184
- throw new Error("invalid decimal coordinate format");
1185
- else if (Xt.test(i))
1186
- if (s = Xt.exec(i), d = Pe(s), d)
1187
- t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, u = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, u = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[9])), s[11] && (n += s[11] / 60), s[13] && (n += s[13].replace(",", ".") / 3600), parseInt(s[9]) < 0 && (n = -1 * n), s[1] ? (r = s[1], l = s[8]) : s[7] && (r = s[7], l = s[14]);
1188
- else
1189
- throw new Error("invalid DMS coordinates format");
1190
- else if (Jt.test(i))
1191
- if (s = Jt.exec(i), d = Pe(s), d)
1192
- t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, u = "DM"), s[6] && (t += s[6] / 3600, u = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[10])), s[12] && (n += s[12] / 60), s[14] && (n += s[14] / 3600), parseInt(s[10]) < 0 && (n = -1 * n), s[1] ? (r = s[1], l = s[9]) : s[8] && (r = s[8], l = s[16]);
1193
- else
1194
- throw new Error("invalid DMS coordinates format");
1195
- else if (xt.test(i)) {
1196
- if (s = xt.exec(i), d = Pe(s), s.filter((c) => c).length <= 5)
1197
- throw new Error("invalid coordinates format");
1198
- if (d)
1199
- t = Math.abs(parseInt(s[2])), s[4] && (t += s[4].replace(",", ".") / 60, u = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, u = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[10])), s[12] && (n += s[12].replace(",", ".") / 60), s[14] && (n += s[14].replace(",", ".") / 3600), parseInt(s[10]) < 0 && (n = -1 * n), s[1] ? (r = s[1], l = s[9]) : s[8] && (r = s[8], l = s[16]);
1200
- else
1201
- throw new Error("invalid coordinates format");
1202
- }
1203
- if (d) {
1204
- if (Math.abs(n) >= 180)
1205
- throw new Error("invalid longitude value");
1206
- if (Math.abs(t) >= 90)
1207
- throw new Error("invalid latitude value");
1208
- if (r && !l || !r && l)
1209
- throw new Error("invalid coordinates value");
1210
- if (r && r == l)
1211
- throw new Error("invalid coordinates format");
1212
- t.toString().includes(",") && (t = t.replace(",", ".")), n.toString().includes(",") && (n = n.replace(",", "."));
1213
- let c = /S|SOUTH/i;
1214
- c.test(r) && t > 0 && (t = -1 * t), c = /W|WEST/i, c.test(l) && n > 0 && (n = -1 * n);
1215
- const f = s[0].trim();
1216
- let L, b;
1217
- const E = /[,/;\u0020]/g, g = f.match(E);
1218
- if (g == null) {
1219
- const k = Math.floor(i.length / 2);
1220
- L = f.substring(0, k).trim(), b = f.substring(k).trim();
1221
- } else {
1222
- let k;
1223
- g.length % 2 == 1 ? k = Math.floor(g.length / 2) : k = g.length / 2 - 1;
1224
- let W = 0;
1225
- if (k == 0)
1226
- W = f.indexOf(g[0]), L = f.substring(0, W).trim(), b = f.substring(W + 1).trim();
1227
- else {
1228
- let B = 0, K = 0;
1229
- for (; B <= k; )
1230
- W = f.indexOf(g[B], K), K = W + 1, B++;
1231
- L = f.substring(0, W).trim(), b = f.substring(W + 1).trim();
1232
- }
1233
- }
1234
- const p = L.split(".");
1235
- if (p.length == 2 && p[1] == 0 && p[1].length != 2)
1236
- throw new Error("invalid coordinates format");
1237
- const D = b.split(".");
1238
- if (D.length == 2 && D[1] == 0 && D[1].length != 2)
1239
- throw new Error("invalid coordinates format");
1240
- if (/^\d+$/.test(L) || /^\d+$/.test(b))
1241
- throw new Error("degree only coordinate/s provided");
1242
- return t = Number(Number(t).toFixed(e)), n = Number(Number(n).toFixed(e)), Object.freeze({
1243
- verbatimCoordinates: f,
1244
- verbatimLatitude: L,
1245
- verbatimLongitude: b,
1246
- decimalLatitude: t,
1247
- decimalLongitude: n,
1248
- decimalCoordinates: `${t},${n}`,
1249
- originalFormat: u,
1250
- closeEnough: Un,
1251
- toCoordinateFormat: Dn
1252
- });
1253
- } else
1254
- throw new Error("coordinates pattern match failed");
1255
- }
1256
- function Pe(i) {
1257
- if (!isNaN(i[0]))
1258
- return !1;
1259
- const e = [...i];
1260
- if (e.shift(), e.length % 2 > 0)
1261
- return !1;
1262
- const t = /^[-+]?\d+([\.,]\d+)?$/, n = /[eastsouthnorthwest]+/i, r = e.length / 2;
1263
- for (let l = 0; l < r; l++) {
1264
- const u = e[l], s = e[l + r], d = t.test(u) && t.test(s), c = n.test(u) && n.test(s), f = u == s;
1265
- if (!(u == null && s == null)) {
1266
- if (u == null || s == null)
1267
- return !1;
1268
- if (d || c || f)
1269
- continue;
1270
- return !1;
1271
- }
1272
- }
1273
- return !0;
1274
- }
1275
- function ei(i, e) {
1276
- const t = Math.abs(i - e);
1277
- return Number(t.toFixed(6)) <= 1e-5;
1278
- }
1279
- function Un(i) {
1280
- if (!i)
1281
- throw new Error("coords must be provided");
1282
- if (i.includes(",")) {
1283
- const e = i.split(",");
1284
- if (Number(e[0]) == NaN || Number(e[1]) == NaN)
1285
- throw new Error("coords are not valid decimals");
1286
- return ei(this.decimalLatitude, Number(e[0])) && ei(this.decimalLongitude, e[1]);
1287
- } else
1288
- throw new Error("coords being tested must be separated by a comma");
1289
- }
1290
- const In = Object.freeze({
1291
- DMS: "DMS",
1292
- DM: "DM",
1293
- DD: "DD"
1294
- });
1295
- kt.to = In;
1296
- const An = [
1297
- {
1298
- verbatimCoordinates: "40.123, -74.123",
1299
- verbatimLatitude: "40.123",
1300
- verbatimLongitude: "-74.123"
1301
- },
1302
- {
1303
- verbatimCoordinates: "40.123° N 74.123° W",
1304
- verbatimLatitude: "40.123° N",
1305
- verbatimLongitude: "74.123° W"
1306
- },
1307
- {
1308
- verbatimCoordinates: "40.123° N 74.123° W",
1309
- verbatimLatitude: "40.123° N",
1310
- verbatimLongitude: "74.123° W"
1311
- },
1312
- {
1313
- verbatimCoordinates: '40° 7´ 22.8" N 74° 7´ 22.8" W',
1314
- verbatimLatitude: '40° 7´ 22.8" N',
1315
- verbatimLongitude: '74° 7´ 22.8" W'
1316
- },
1317
- {
1318
- verbatimCoordinates: "40° 7.38’ , -74° 7.38’",
1319
- verbatimLatitude: "40° 7.38’",
1320
- verbatimLongitude: "-74° 7.38’"
1321
- },
1322
- {
1323
- verbatimCoordinates: "N40°7’22.8’’, W74°7’22.8’’",
1324
- verbatimLatitude: "N40°7’22.8’’",
1325
- verbatimLongitude: "W74°7’22.8’’"
1326
- },
1327
- {
1328
- verbatimCoordinates: '40°7’22.8"N, 74°7’22.8"W',
1329
- verbatimLatitude: '40°7’22.8"N',
1330
- verbatimLongitude: '74°7’22.8"W'
1331
- },
1332
- {
1333
- verbatimCoordinates: `40°7'22.8"N, 74°7'22.8"W`,
1334
- verbatimLatitude: `40°7'22.8"N`,
1335
- verbatimLongitude: `74°7'22.8"W`
1336
- },
1337
- {
1338
- verbatimCoordinates: "40 7 22.8, -74 7 22.8",
1339
- verbatimLatitude: "40 7 22.8",
1340
- verbatimLongitude: "-74 7 22.8"
1341
- },
1342
- {
1343
- verbatimCoordinates: "40.123 -74.123",
1344
- verbatimLatitude: "40.123",
1345
- verbatimLongitude: "-74.123"
1346
- },
1347
- {
1348
- verbatimCoordinates: "40.123°,-74.123°",
1349
- verbatimLatitude: "40.123°",
1350
- verbatimLongitude: "-74.123°"
1351
- },
1352
- {
1353
- verbatimCoordinates: "40.123N74.123W",
1354
- verbatimLatitude: "40.123N",
1355
- verbatimLongitude: "74.123W"
1356
- },
1357
- {
1358
- verbatimCoordinates: "4007.38N7407.38W",
1359
- verbatimLatitude: "4007.38N",
1360
- verbatimLongitude: "7407.38W"
1361
- },
1362
- {
1363
- verbatimCoordinates: '40°7’22.8"N, 74°7’22.8"W',
1364
- verbatimLatitude: '40°7’22.8"N',
1365
- verbatimLongitude: '74°7’22.8"W'
1366
- },
1367
- {
1368
- verbatimCoordinates: "400722.8N740722.8W",
1369
- verbatimLatitude: "400722.8N",
1370
- verbatimLongitude: "740722.8W"
1371
- },
1372
- {
1373
- verbatimCoordinates: "N 40 7.38 W 74 7.38",
1374
- verbatimLatitude: "N 40 7.38",
1375
- verbatimLongitude: "W 74 7.38"
1376
- },
1377
- {
1378
- verbatimCoordinates: "40:7:22.8N 74:7:22.8W",
1379
- verbatimLatitude: "40:7:22.8N",
1380
- verbatimLongitude: "74:7:22.8W"
1381
- },
1382
- {
1383
- verbatimCoordinates: "40:7:23N,74:7:23W",
1384
- verbatimLatitude: "40:7:23N",
1385
- verbatimLongitude: "74:7:23W",
1386
- decimalLatitude: 40.1230555555,
1387
- decimalLongitude: -74.1230555555
1388
- },
1389
- {
1390
- verbatimCoordinates: '40°7’23"N 74°7’23"W',
1391
- verbatimLatitude: '40°7’23"N',
1392
- verbatimLongitude: '74°7’23"W',
1393
- decimalLatitude: 40.1230555555,
1394
- decimalLongitude: -74.12305555555555
1395
- },
1396
- {
1397
- verbatimCoordinates: '40°7’23"S 74°7’23"E',
1398
- verbatimLatitude: '40°7’23"S',
1399
- verbatimLongitude: '74°7’23"E',
1400
- decimalLatitude: -40.1230555555,
1401
- decimalLongitude: 74.12305555555555
1402
- },
1403
- {
1404
- verbatimCoordinates: '40°7’23" -74°7’23"',
1405
- verbatimLatitude: '40°7’23"',
1406
- verbatimLongitude: '-74°7’23"',
1407
- decimalLatitude: 40.1230555555,
1408
- decimalLongitude: -74.123055555
1409
- },
1410
- {
1411
- verbatimCoordinates: '40d 7’ 23" N 74d 7’ 23" W',
1412
- verbatimLatitude: '40d 7’ 23" N',
1413
- verbatimLongitude: '74d 7’ 23" W',
1414
- decimalLatitude: 40.1230555555,
1415
- decimalLongitude: -74.123055555
1416
- },
1417
- {
1418
- verbatimCoordinates: "40.123N 74.123W",
1419
- verbatimLatitude: "40.123N",
1420
- verbatimLongitude: "74.123W"
1421
- },
1422
- {
1423
- verbatimCoordinates: "40° 7.38, -74° 7.38",
1424
- verbatimLatitude: "40° 7.38",
1425
- verbatimLongitude: "-74° 7.38"
1426
- },
1427
- {
1428
- verbatimCoordinates: "40° 7.38, -74° 7.38",
1429
- verbatimLatitude: "40° 7.38",
1430
- verbatimLongitude: "-74° 7.38"
1431
- },
1432
- {
1433
- verbatimCoordinates: "40 7 22.8; -74 7 22.8",
1434
- verbatimLatitude: "40 7 22.8",
1435
- verbatimLongitude: "-74 7 22.8"
1436
- }
1437
- ], Pn = {
1438
- decimalLatitude: 40.123,
1439
- decimalLongitude: -74.123
1440
- }, Bn = [
1441
- {
1442
- verbatimCoordinates: `50°4'17.698"south, 14°24'2.826"east`,
1443
- verbatimLatitude: `50°4'17.698"south`,
1444
- verbatimLongitude: `14°24'2.826"east`,
1445
- decimalLatitude: -50.07158277777778,
1446
- decimalLongitude: 14.400785
1447
- },
1448
- {
1449
- verbatimCoordinates: "50d4m17.698S 14d24m2.826E",
1450
- verbatimLatitude: "50d4m17.698S",
1451
- verbatimLongitude: "14d24m2.826E",
1452
- decimalLatitude: -50.07158277777778,
1453
- decimalLongitude: 14.400785
1454
- },
1455
- {
1456
- verbatimCoordinates: "40:26:46N,79:56:55W",
1457
- verbatimLatitude: "40:26:46N",
1458
- verbatimLongitude: "79:56:55W",
1459
- decimalLatitude: 40.44611111111111,
1460
- decimalLongitude: -79.9486111111111
1461
- },
1462
- {
1463
- verbatimCoordinates: "40:26:46.302N 79:56:55.903W",
1464
- verbatimLatitude: "40:26:46.302N",
1465
- verbatimLongitude: "79:56:55.903W",
1466
- decimalLatitude: 40.446195,
1467
- decimalLongitude: -79.94886194444445
1468
- },
1469
- {
1470
- verbatimCoordinates: "40°26′47″N 79°58′36″W",
1471
- verbatimLatitude: "40°26′47″N",
1472
- verbatimLongitude: "79°58′36″W",
1473
- decimalLatitude: 40.44638888888889,
1474
- decimalLongitude: -79.97666666666667
1475
- },
1476
- {
1477
- verbatimCoordinates: "40d 26′ 47″ N 79d 58′ 36″ W",
1478
- verbatimLatitude: "40d 26′ 47″ N",
1479
- verbatimLongitude: "79d 58′ 36″ W",
1480
- decimalLatitude: 40.44638888888889,
1481
- decimalLongitude: -79.97666666666667
1482
- },
1483
- {
1484
- verbatimCoordinates: "40.446195N 79.948862W",
1485
- verbatimLatitude: "40.446195N",
1486
- verbatimLongitude: "79.948862W",
1487
- decimalLatitude: 40.446195,
1488
- decimalLongitude: -79.948862
1489
- },
1490
- {
1491
- verbatimCoordinates: "40,446195° 79,948862°",
1492
- verbatimLatitude: "40,446195°",
1493
- verbatimLongitude: "79,948862°",
1494
- decimalLatitude: 40.446195,
1495
- decimalLongitude: 79.948862
1496
- },
1497
- {
1498
- verbatimCoordinates: "40° 26.7717, -79° 56.93172",
1499
- verbatimLatitude: "40° 26.7717",
1500
- verbatimLongitude: "-79° 56.93172",
1501
- decimalLatitude: 40.446195,
1502
- decimalLongitude: -79.948862
1503
- },
1504
- {
1505
- verbatimCoordinates: "40.446195, -79.948862",
1506
- verbatimLatitude: "40.446195",
1507
- verbatimLongitude: "-79.948862",
1508
- decimalLatitude: 40.446195,
1509
- decimalLongitude: -79.948862
1510
- },
1511
- {
1512
- verbatimCoordinates: "40.123256; -74.123256",
1513
- verbatimLatitude: "40.123256",
1514
- verbatimLongitude: "-74.123256",
1515
- decimalLatitude: 40.123256,
1516
- decimalLongitude: -74.123256
1517
- },
1518
- {
1519
- verbatimCoordinates: "18°24S 22°45E",
1520
- verbatimLatitude: "18°24S",
1521
- verbatimLongitude: "22°45E",
1522
- decimalLatitude: -18.4,
1523
- decimalLongitude: 22.75
1524
- }
1525
- ], Fn = [
1526
- {
1527
- verbatimCoordinates: "10.432342S 10.6345345E",
1528
- verbatimLatitude: "10.432342S",
1529
- verbatimLongitude: "10.6345345E",
1530
- decimalLatitude: -10.432342,
1531
- decimalLongitude: 10.6345345
1532
- },
1533
- {
1534
- verbatimCoordinates: "10.00S 10.00E",
1535
- verbatimLatitude: "10.00S",
1536
- verbatimLongitude: "10.00E",
1537
- decimalLatitude: -10,
1538
- decimalLongitude: 10
1539
- },
1540
- {
1541
- verbatimCoordinates: "00.00S 01.00E",
1542
- verbatimLatitude: "00.00S",
1543
- verbatimLongitude: "01.00E",
1544
- decimalLatitude: 0,
1545
- decimalLongitude: 1
1546
- },
1547
- {
1548
- verbatimCoordinates: "18.24S 22.45E",
1549
- verbatimLatitude: "18.24S",
1550
- verbatimLongitude: "22.45E",
1551
- decimalLatitude: -18.4,
1552
- decimalLongitude: 22.75
1553
- },
1554
- {
1555
- verbatimCoordinates: "27deg 15min 45.2sec S 18deg 32min 53.7sec E",
1556
- verbatimLatitude: "27deg 15min 45.2sec S",
1557
- verbatimLongitude: "18deg 32min 53.7sec E",
1558
- decimalLatitude: -27.262555555555554,
1559
- decimalLongitude: 18.54825
1560
- },
1561
- {
1562
- verbatimCoordinates: "-23.3245° S / 28.2344° E",
1563
- verbatimLatitude: "-23.3245° S",
1564
- verbatimLongitude: "28.2344° E",
1565
- decimalLatitude: -23.3245,
1566
- decimalLongitude: 28.2344
1567
- },
1568
- {
1569
- verbatimCoordinates: "40° 26.7717 -79° 56.93172",
1570
- verbatimLatitude: "40° 26.7717",
1571
- verbatimLongitude: "-79° 56.93172",
1572
- decimalLatitude: 40.446195,
1573
- decimalLongitude: -79.948862
1574
- },
1575
- {
1576
- verbatimCoordinates: "27.15.45S 18.32.53E",
1577
- verbatimLatitude: "27.15.45S",
1578
- verbatimLongitude: "18.32.53E",
1579
- decimalLatitude: -27.2625,
1580
- decimalLongitude: 18.548055
1581
- },
1582
- {
1583
- verbatimCoordinates: "-27.15.45 18.32.53",
1584
- verbatimLatitude: "-27.15.45",
1585
- verbatimLongitude: "18.32.53",
1586
- decimalLatitude: -27.2625,
1587
- decimalLongitude: 18.548055
1588
- },
1589
- {
1590
- verbatimCoordinates: "27.15.45.2S 18.32.53.4E",
1591
- verbatimLatitude: "27.15.45.2S",
1592
- verbatimLongitude: "18.32.53.4E",
1593
- decimalLatitude: -27.262556,
1594
- decimalLongitude: 18.548167
1595
- },
1596
- {
1597
- verbatimCoordinates: "27.15.45,2S 18.32.53,4E",
1598
- verbatimLatitude: "27.15.45,2S",
1599
- verbatimLongitude: "18.32.53,4E",
1600
- decimalLatitude: -27.262556,
1601
- decimalLongitude: 18.548167
1602
- },
1603
- {
1604
- verbatimCoordinates: "S23.43563 ° E22.45634 °",
1605
- verbatimLatitude: "S23.43563 °",
1606
- verbatimLongitude: "E22.45634 °",
1607
- decimalLatitude: -23.43563,
1608
- decimalLongitude: 22.45634
1609
- },
1610
- {
1611
- verbatimCoordinates: "27,71372° S 23,07771° E",
1612
- verbatimLatitude: "27,71372° S",
1613
- verbatimLongitude: "23,07771° E",
1614
- decimalLatitude: -27.71372,
1615
- decimalLongitude: 23.07771
1616
- },
1617
- {
1618
- verbatimCoordinates: "27.45.34 S 23.23.23 E",
1619
- verbatimLatitude: "27.45.34 S",
1620
- verbatimLongitude: "23.23.23 E",
1621
- decimalLatitude: -27.759444,
1622
- decimalLongitude: 23.38972222
1623
- },
1624
- {
1625
- verbatimCoordinates: "S 27.45.34 E 23.23.23",
1626
- verbatimLatitude: "S 27.45.34",
1627
- verbatimLongitude: "E 23.23.23",
1628
- decimalLatitude: -27.759444,
1629
- decimalLongitude: 23.38972222
1630
- },
1631
- {
1632
- verbatimCoordinates: "53 16.3863,4 52.8171",
1633
- verbatimLatitude: "53 16.3863",
1634
- verbatimLongitude: "4 52.8171",
1635
- decimalLatitude: 53.273105,
1636
- decimalLongitude: 4.88029
1637
- },
1638
- {
1639
- verbatimCoordinates: "50 8.2914,-5 2.4447",
1640
- verbatimLatitude: "50 8.2914",
1641
- verbatimLongitude: "-5 2.4447",
1642
- decimalLatitude: 50.13819,
1643
- decimalLongitude: -5.040745
1644
- },
1645
- {
1646
- verbatimCoordinates: "N 48° 30,6410', E 18° 57,4583'",
1647
- verbatimLatitude: "N 48° 30,6410'",
1648
- verbatimLongitude: "E 18° 57,4583'",
1649
- decimalLatitude: 48.51068,
1650
- decimalLongitude: 18.95764
1651
- },
1652
- {
1653
- verbatimCoordinates: "1.23456, 18.33453",
1654
- verbatimLatitude: "1.23456",
1655
- verbatimLongitude: "18.33453",
1656
- decimalLatitude: 1.23456,
1657
- decimalLongitude: 18.33453
1658
- }
1659
- ];
1660
- function jn() {
1661
- const i = [];
1662
- return An.forEach((e) => {
1663
- e.decimalLatitude ? i.push(e) : i.push({ ...e, ...Pn });
1664
- }), [...i, ...Bn, ...Fn];
1665
- }
1666
- const Gn = jn();
1667
- kt.formats = Gn.map((i) => i.verbatimCoordinates);
1668
- const Hn = kt;
1669
- function ti(i, e, t) {
1670
- const n = i.slice();
1671
- return n[97] = e[t], n[99] = t, n;
1672
- }
1673
- function ii(i) {
1674
- let e, t, n, r, l;
1675
- return t = new mi({}), {
1676
- c() {
1677
- e = R("button"), _e(t.$$.fragment), a(e, "type", "button"), a(
1678
- e,
1679
- "title",
1680
- /*clearButtonTitle*/
1681
- i[3]
1682
- ), a(e, "class", "svelte-bz0zu3");
1683
- },
1684
- m(u, s) {
1685
- A(u, e, s), me(t, e, null), n = !0, r || (l = Q(
1686
- e,
1687
- "click",
1688
- /*click_handler_2*/
1689
- i[78]
1690
- ), r = !0);
1691
- },
1692
- p(u, s) {
1693
- (!n || s[0] & /*clearButtonTitle*/
1694
- 8) && a(
1695
- e,
1696
- "title",
1697
- /*clearButtonTitle*/
1698
- u[3]
1699
- );
1700
- },
1701
- i(u) {
1702
- n || (P(t.$$.fragment, u), n = !0);
1703
- },
1704
- o(u) {
1705
- q(t.$$.fragment, u), n = !1;
1706
- },
1707
- d(u) {
1708
- u && I(e), ge(t), r = !1, l();
1709
- }
1710
- };
1711
- }
1712
- function ni(i) {
1713
- let e, t;
1714
- return e = new Tn({}), {
1715
- c() {
1716
- _e(e.$$.fragment);
1717
- },
1718
- m(n, r) {
1719
- me(e, n, r), t = !0;
1720
- },
1721
- i(n) {
1722
- t || (P(e.$$.fragment, n), t = !0);
1723
- },
1724
- o(n) {
1725
- q(e.$$.fragment, n), t = !1;
1726
- },
1727
- d(n) {
1728
- ge(e, n);
1729
- }
1730
- };
1731
- }
1732
- function ri(i) {
1733
- let e, t, n, r, l;
1734
- return t = new Mn({}), {
1735
- c() {
1736
- e = R("button"), _e(t.$$.fragment), a(e, "type", "button"), a(
1737
- e,
1738
- "title",
1739
- /*reverseButtonTitle*/
1740
- i[10]
1741
- ), a(e, "class", "svelte-bz0zu3"), Oe(
1742
- e,
1743
- "active",
1744
- /*reverseActive*/
1745
- i[0]
1746
- );
1747
- },
1748
- m(u, s) {
1749
- A(u, e, s), me(t, e, null), n = !0, r || (l = Q(
1750
- e,
1751
- "click",
1752
- /*click_handler_3*/
1753
- i[79]
1754
- ), r = !0);
1755
- },
1756
- p(u, s) {
1757
- (!n || s[0] & /*reverseButtonTitle*/
1758
- 1024) && a(
1759
- e,
1760
- "title",
1761
- /*reverseButtonTitle*/
1762
- u[10]
1763
- ), (!n || s[0] & /*reverseActive*/
1764
- 1) && Oe(
1765
- e,
1766
- "active",
1767
- /*reverseActive*/
1768
- u[0]
1769
- );
1770
- },
1771
- i(u) {
1772
- n || (P(t.$$.fragment, u), n = !0);
1773
- },
1774
- o(u) {
1775
- q(t.$$.fragment, u), n = !1;
1776
- },
1777
- d(u) {
1778
- u && I(e), ge(t), r = !1, l();
1779
- }
1780
- };
1781
- }
1782
- function Zn(i) {
1783
- let e, t = [], n = /* @__PURE__ */ new Map(), r, l, u, s = qt(
1784
- /*listFeatures*/
1785
- i[13]
1786
- );
1787
- const d = (c) => (
1788
- /*feature*/
1789
- c[97].id + /*feature*/
1790
- (c[97].address ? "," + /*feature*/
1791
- c[97].address : "")
1792
- );
1793
- for (let c = 0; c < s.length; c += 1) {
1794
- let f = ti(i, s, c), L = d(f);
1795
- n.set(L, t[c] = si(L, f));
1796
- }
1797
- return {
1798
- c() {
1799
- e = R("ul");
1800
- for (let c = 0; c < t.length; c += 1)
1801
- t[c].c();
1802
- a(e, "class", "options svelte-bz0zu3"), a(e, "role", "listbox");
1803
- },
1804
- m(c, f) {
1805
- A(c, e, f);
1806
- for (let L = 0; L < t.length; L += 1)
1807
- t[L] && t[L].m(e, null);
1808
- r = !0, l || (u = [
1809
- Q(
1810
- e,
1811
- "mouseleave",
1812
- /*handleMouseLeave*/
1813
- i[27]
1814
- ),
1815
- Q(
1816
- e,
1817
- "blur",
1818
- /*blur_handler_1*/
1819
- i[83]
1820
- ),
1821
- Q(
1822
- e,
1823
- "keydown",
1824
- /*handleKeyDown*/
1825
- i[23]
1826
- )
1827
- ], l = !0);
1828
- },
1829
- p(c, f) {
1830
- f[0] & /*listFeatures, showPlaceType, selectedItemIndex, picked, missingIconsCache, iconsBaseUrl, handleMouseEnter, pick*/
1831
- 102823936 && (s = qt(
1832
- /*listFeatures*/
1833
- c[13]
1834
- ), Be(), t = ln(t, f, d, 1, c, s, n, e, an, si, null, ti), Fe());
1835
- },
1836
- i(c) {
1837
- if (!r) {
1838
- for (let f = 0; f < s.length; f += 1)
1839
- P(t[f]);
1840
- r = !0;
1841
- }
1842
- },
1843
- o(c) {
1844
- for (let f = 0; f < t.length; f += 1)
1845
- q(t[f]);
1846
- r = !1;
1847
- },
1848
- d(c) {
1849
- c && I(e);
1850
- for (let f = 0; f < t.length; f += 1)
1851
- t[f].d();
1852
- l = !1, he(u);
1853
- }
1854
- };
1855
- }
1856
- function qn(i) {
1857
- let e, t, n, r, l, u;
1858
- return t = new gi({}), {
1859
- c() {
1860
- e = R("div"), _e(t.$$.fragment), n = ee(), r = R("div"), l = Le(
1861
- /*noResultsMessage*/
1862
- i[8]
1863
- ), a(r, "class", "svelte-bz0zu3"), a(e, "class", "no-results svelte-bz0zu3");
1864
- },
1865
- m(s, d) {
1866
- A(s, e, d), me(t, e, null), N(e, n), N(e, r), N(r, l), u = !0;
1867
- },
1868
- p(s, d) {
1869
- (!u || d[0] & /*noResultsMessage*/
1870
- 256) && Ge(
1871
- l,
1872
- /*noResultsMessage*/
1873
- s[8]
1874
- );
1875
- },
1876
- i(s) {
1877
- u || (P(t.$$.fragment, s), u = !0);
1878
- },
1879
- o(s) {
1880
- q(t.$$.fragment, s), u = !1;
1881
- },
1882
- d(s) {
1883
- s && I(e), ge(t);
1884
- }
1885
- };
1886
- }
1887
- function Qn(i) {
1888
- let e = "", t;
1889
- return {
1890
- c() {
1891
- t = Le(e);
1892
- },
1893
- m(n, r) {
1894
- A(n, t, r);
1895
- },
1896
- p: j,
1897
- i: j,
1898
- o: j,
1899
- d(n) {
1900
- n && I(t);
1901
- }
1902
- };
1903
- }
1904
- function Kn(i) {
1905
- let e, t, n, r, l, u, s, d, c, f, L;
1906
- return t = new gi({}), d = new mi({}), {
1907
- c() {
1908
- e = R("div"), _e(t.$$.fragment), n = ee(), r = R("div"), l = Le(
1909
- /*errorMessage*/
1910
- i[7]
1911
- ), u = ee(), s = R("button"), _e(d.$$.fragment), a(r, "class", "svelte-bz0zu3"), a(s, "class", "svelte-bz0zu3"), a(e, "class", "error svelte-bz0zu3");
1912
- },
1913
- m(b, E) {
1914
- A(b, e, E), me(t, e, null), N(e, n), N(e, r), N(r, l), N(e, u), N(e, s), me(d, s, null), c = !0, f || (L = Q(
1915
- s,
1916
- "click",
1917
- /*click_handler_4*/
1918
- i[80]
1919
- ), f = !0);
1920
- },
1921
- p(b, E) {
1922
- (!c || E[0] & /*errorMessage*/
1923
- 128) && Ge(
1924
- l,
1925
- /*errorMessage*/
1926
- b[7]
1927
- );
1928
- },
1929
- i(b) {
1930
- c || (P(t.$$.fragment, b), P(d.$$.fragment, b), c = !0);
1931
- },
1932
- o(b) {
1933
- q(t.$$.fragment, b), q(d.$$.fragment, b), c = !1;
1934
- },
1935
- d(b) {
1936
- b && I(e), ge(t), ge(d), f = !1, L();
1937
- }
1938
- };
1939
- }
1940
- function si(i, e) {
1941
- var s;
1942
- let t, n, r;
1943
- function l() {
1944
- return (
1945
- /*mouseenter_handler*/
1946
- e[81](
1947
- /*i*/
1948
- e[99]
1949
- )
1950
- );
1951
- }
1952
- function u() {
1953
- return (
1954
- /*select_handler*/
1955
- e[82](
1956
- /*feature*/
1957
- e[97]
1958
- )
1959
- );
1960
- }
1961
- return n = new pn({
1962
- props: {
1963
- feature: (
1964
- /*feature*/
1965
- e[97]
1966
- ),
1967
- showPlaceType: (
1968
- /*showPlaceType*/
1969
- e[11]
1970
- ),
1971
- style: (
1972
- /*selectedItemIndex*/
1973
- e[15] === /*i*/
1974
- e[99] ? "selected" : (
1975
- /*picked*/
1976
- ((s = e[14]) == null ? void 0 : s.id) === /*feature*/
1977
- e[97].id ? "picked" : "default"
1978
- )
1979
- ),
1980
- missingIconsCache: (
1981
- /*missingIconsCache*/
1982
- e[21]
1983
- ),
1984
- iconsBaseUrl: (
1985
- /*iconsBaseUrl*/
1986
- e[12]
1987
- )
1988
- }
1989
- }), n.$on("mouseenter", l), n.$on("select", u), {
1990
- key: i,
1991
- first: null,
1992
- c() {
1993
- t = Xi(), _e(n.$$.fragment), this.first = t;
1994
- },
1995
- m(d, c) {
1996
- A(d, t, c), me(n, d, c), r = !0;
1997
- },
1998
- p(d, c) {
1999
- var L;
2000
- e = d;
2001
- const f = {};
2002
- c[0] & /*listFeatures*/
2003
- 8192 && (f.feature = /*feature*/
2004
- e[97]), c[0] & /*showPlaceType*/
2005
- 2048 && (f.showPlaceType = /*showPlaceType*/
2006
- e[11]), c[0] & /*selectedItemIndex, listFeatures, picked*/
2007
- 57344 && (f.style = /*selectedItemIndex*/
2008
- e[15] === /*i*/
2009
- e[99] ? "selected" : (
2010
- /*picked*/
2011
- ((L = e[14]) == null ? void 0 : L.id) === /*feature*/
2012
- e[97].id ? "picked" : "default"
2013
- )), c[0] & /*iconsBaseUrl*/
2014
- 4096 && (f.iconsBaseUrl = /*iconsBaseUrl*/
2015
- e[12]), n.$set(f);
2016
- },
2017
- i(d) {
2018
- r || (P(n.$$.fragment, d), r = !0);
2019
- },
2020
- o(d) {
2021
- q(n.$$.fragment, d), r = !1;
2022
- },
2023
- d(d) {
2024
- d && I(t), ge(n, d);
2025
- }
2026
- };
2027
- }
2028
- function Vn(i) {
2029
- let e, t, n, r, l, u, s, d, c, f, L, b, E, g, p, D, k, W, B, K = !1;
2030
- l = new Wn({});
2031
- let C = !/*abortController*/
2032
- i[20] && ii(i), M = (
2033
- /*abortController*/
2034
- i[20] && ni()
2035
- ), w = (
2036
- /*enableReverse*/
2037
- i[6] === "button" && ri(i)
2038
- );
2039
- const _ = (
2040
- /*#slots*/
2041
- i[70].default
2042
- ), S = Qi(
2043
- _,
2044
- i,
2045
- /*$$scope*/
2046
- i[69],
2047
- null
2048
- ), U = [Kn, Qn, qn, Zn], v = [];
2049
- function m(y, G) {
2050
- var ue, ke;
2051
- return (
2052
- /*error*/
2053
- y[19] ? 0 : !/*focusedDelayed*/
2054
- y[16] && !/*keepListOpen*/
2055
- y[4] ? 1 : (
2056
- /*listFeatures*/
2057
- ((ue = y[13]) == null ? void 0 : ue.length) === 0 ? 2 : (
2058
- /*listFeatures*/
2059
- (ke = y[13]) != null && ke.length && /*focusedDelayed*/
2060
- (y[16] || /*keepListOpen*/
2061
- y[4]) ? 3 : -1
2062
- )
2063
- )
2064
- );
2065
- }
2066
- return ~(g = m(i)) && (p = v[g] = U[g](i)), {
2067
- c() {
2068
- e = ee(), t = R("form"), n = R("div"), r = R("button"), _e(l.$$.fragment), u = ee(), s = R("input"), d = ee(), c = R("div"), C && C.c(), f = ee(), M && M.c(), L = ee(), w && w.c(), b = ee(), S && S.c(), E = ee(), p && p.c(), a(r, "class", "search-button svelte-bz0zu3"), a(r, "type", "button"), a(
2069
- s,
2070
- "placeholder",
2071
- /*placeholder*/
2072
- i[9]
2073
- ), a(
2074
- s,
2075
- "aria-label",
2076
- /*placeholder*/
2077
- i[9]
2078
- ), a(s, "class", "svelte-bz0zu3"), a(c, "class", "clear-button-container svelte-bz0zu3"), Oe(
2079
- c,
2080
- "displayable",
2081
- /*searchValue*/
2082
- i[1] !== ""
2083
- ), a(n, "class", "input-group svelte-bz0zu3"), a(t, "class", D = it(
2084
- /*className*/
2085
- i[2]
2086
- ) + " svelte-bz0zu3"), Oe(
2087
- t,
2088
- "can-collapse",
2089
- /*collapsed*/
2090
- i[5] && /*searchValue*/
2091
- i[1] === ""
2092
- );
2093
- },
2094
- m(y, G) {
2095
- A(y, e, G), A(y, t, G), N(t, n), N(n, r), me(l, r, null), N(n, u), N(n, s), i[72](s), Ht(
2096
- s,
2097
- /*searchValue*/
2098
- i[1]
2099
- ), N(n, d), N(n, c), C && C.m(c, null), N(c, f), M && M.m(c, null), N(n, L), w && w.m(n, null), N(n, b), S && S.m(n, null), N(t, E), ~g && v[g].m(t, null), k = !0, W || (B = [
2100
- Q(
2101
- r,
2102
- "click",
2103
- /*click_handler*/
2104
- i[71]
2105
- ),
2106
- Q(
2107
- s,
2108
- "input",
2109
- /*input_1_input_handler*/
2110
- i[73]
2111
- ),
2112
- Q(
2113
- s,
2114
- "focus",
2115
- /*focus_handler*/
2116
- i[74]
2117
- ),
2118
- Q(
2119
- s,
2120
- "blur",
2121
- /*blur_handler*/
2122
- i[75]
2123
- ),
2124
- Q(
2125
- s,
2126
- "click",
2127
- /*click_handler_1*/
2128
- i[76]
2129
- ),
2130
- Q(
2131
- s,
2132
- "keydown",
2133
- /*handleKeyDown*/
2134
- i[23]
2135
- ),
2136
- Q(
2137
- s,
2138
- "input",
2139
- /*handleInput*/
2140
- i[24]
2141
- ),
2142
- Q(
2143
- s,
2144
- "change",
2145
- /*change_handler*/
2146
- i[77]
2147
- ),
2148
- Q(t, "submit", Ji(
2149
- /*handleSubmit*/
2150
- i[22]
2151
- ))
2152
- ], W = !0);
2153
- },
2154
- p(y, G) {
2155
- (!k || G[0] & /*placeholder*/
2156
- 512) && a(
2157
- s,
2158
- "placeholder",
2159
- /*placeholder*/
2160
- y[9]
2161
- ), (!k || G[0] & /*placeholder*/
2162
- 512) && a(
2163
- s,
2164
- "aria-label",
2165
- /*placeholder*/
2166
- y[9]
2167
- ), G[0] & /*searchValue*/
2168
- 2 && s.value !== /*searchValue*/
2169
- y[1] && Ht(
2170
- s,
2171
- /*searchValue*/
2172
- y[1]
2173
- ), /*abortController*/
2174
- y[20] ? C && (Be(), q(C, 1, 1, () => {
2175
- C = null;
2176
- }), Fe()) : C ? (C.p(y, G), G[0] & /*abortController*/
2177
- 1048576 && P(C, 1)) : (C = ii(y), C.c(), P(C, 1), C.m(c, f)), /*abortController*/
2178
- y[20] ? M ? G[0] & /*abortController*/
2179
- 1048576 && P(M, 1) : (M = ni(), M.c(), P(M, 1), M.m(c, null)) : M && (Be(), q(M, 1, 1, () => {
2180
- M = null;
2181
- }), Fe()), (!k || G[0] & /*searchValue*/
2182
- 2) && Oe(
2183
- c,
2184
- "displayable",
2185
- /*searchValue*/
2186
- y[1] !== ""
2187
- ), /*enableReverse*/
2188
- y[6] === "button" ? w ? (w.p(y, G), G[0] & /*enableReverse*/
2189
- 64 && P(w, 1)) : (w = ri(y), w.c(), P(w, 1), w.m(n, b)) : w && (Be(), q(w, 1, 1, () => {
2190
- w = null;
2191
- }), Fe()), S && S.p && (!k || G[2] & /*$$scope*/
2192
- 128) && Vi(
2193
- S,
2194
- _,
2195
- y,
2196
- /*$$scope*/
2197
- y[69],
2198
- k ? Ki(
2199
- _,
2200
- /*$$scope*/
2201
- y[69],
2202
- G,
2203
- null
2204
- ) : Yi(
2205
- /*$$scope*/
2206
- y[69]
2207
- ),
2208
- null
2209
- );
2210
- let ue = g;
2211
- g = m(y), g === ue ? ~g && v[g].p(y, G) : (p && (Be(), q(v[ue], 1, 1, () => {
2212
- v[ue] = null;
2213
- }), Fe()), ~g ? (p = v[g], p ? p.p(y, G) : (p = v[g] = U[g](y), p.c()), P(p, 1), p.m(t, null)) : p = null), (!k || G[0] & /*className*/
2214
- 4 && D !== (D = it(
2215
- /*className*/
2216
- y[2]
2217
- ) + " svelte-bz0zu3")) && a(t, "class", D), (!k || G[0] & /*className, collapsed, searchValue*/
2218
- 38) && Oe(
2219
- t,
2220
- "can-collapse",
2221
- /*collapsed*/
2222
- y[5] && /*searchValue*/
2223
- y[1] === ""
2224
- );
2225
- },
2226
- i(y) {
2227
- k || (P(K), P(l.$$.fragment, y), P(C), P(M), P(w), P(S, y), P(p), k = !0);
2228
- },
2229
- o(y) {
2230
- q(K), q(l.$$.fragment, y), q(C), q(M), q(w), q(S, y), q(p), k = !1;
2231
- },
2232
- d(y) {
2233
- y && (I(e), I(t)), ge(l), i[72](null), C && C.d(), M && M.d(), w && w.d(), S && S.d(y), ~g && v[g].d(), W = !1, he(B);
2234
- }
2235
- };
2236
- }
2237
- function Yn(i, e, t) {
2238
- let n, r, l, { $$slots: u = {}, $$scope: s } = e;
2239
- const d = {
2240
- continental_marine: 4,
2241
- country: 4,
2242
- major_landform: 8,
2243
- region: 5,
2244
- subregion: 6,
2245
- county: 7,
2246
- joint_municipality: 8,
2247
- joint_submunicipality: 9,
2248
- municipality: 10,
2249
- municipal_district: 11,
2250
- locality: 12,
2251
- neighbourhood: 13,
2252
- place: 14,
2253
- postal_code: 14,
2254
- road: 16,
2255
- poi: 17,
2256
- address: 18,
2257
- "poi.peak": 15,
2258
- "poi.shop": 18,
2259
- "poi.cafe": 18,
2260
- "poi.restaurant": 18,
2261
- "poi.aerodrome": 13
2262
- };
2263
- let { class: c = void 0 } = e, { apiKey: f = void 0 } = e, { bbox: L = void 0 } = e, { clearButtonTitle: b = "clear" } = e, { clearOnBlur: E = !1 } = e, { clearListOnPick: g = !1 } = e, { keepListOpen: p = !1 } = e, { collapsed: D = !1 } = e, { country: k = void 0 } = e, { debounceSearch: W = 200 } = e, { enableReverse: B = "never" } = e, { errorMessage: K = "Something went wrong…" } = e, { filter: C = () => !0 } = e, { flyTo: M = !0 } = e, { fuzzyMatch: w = !0 } = e, { language: _ = void 0 } = e, { limit: S = void 0 } = e;
2264
- const U = 41415112612;
2265
- let { reverseGeocodingLimit: v = U } = e, { mapController: m = void 0 } = e, { minLength: y = 2 } = e, { noResultsMessage: G = "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!" } = e, { placeholder: ue = "Search" } = e, { proximity: ke = [{ type: "server-geolocation" }] } = e, { reverseActive: ce = B === "always" } = e, { reverseButtonTitle: Nt = "toggle reverse geocoding" } = e, { searchValue: V = "" } = e, { pickedResultStyle: Ze = "full-geometry" } = e, { showPlaceType: Mt = "if-needed" } = e, { showResultsWhileTyping: qe = !0 } = e, { selectFirst: Te = !0 } = e, { flyToSelected: Qe = !1 } = e, { markerOnSelected: Ke = !0 } = e, { types: rt = void 0 } = e;
2266
- const Ct = [];
2267
- let { reverseGeocodingTypes: Ve = Ct } = e, { exhaustiveReverseGeocoding: st = !1 } = e, { excludeTypes: ot = !1 } = e;
2268
- const Wt = void 0;
2269
- let { reverseGeocodingExcludeTypes: Ye = Wt } = e, { zoom: Xe = d } = e, { apiUrl: at = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: lt = {} } = e, { iconsBaseUrl: Ot = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.1.7/icons/" } = e, { adjustUrlQuery: ut = () => {
2270
- } } = e, { adjustUrl: ct = () => {
2271
- } } = e;
2272
- function vi(o) {
2273
- ne.focus(o);
2274
- }
2275
- function Li() {
2276
- ne.blur();
2277
- }
2278
- function zt(o, F = !0, H = !1) {
2279
- t(1, V = o), F ? (t(15, O = -1), Dt()) : (Ut(void 0, !H, H), setTimeout(() => {
2280
- ne.focus(), ne.select();
2281
- }));
2282
- }
2283
- function _i() {
2284
- t(13, T = void 0), t(14, h = void 0), t(15, O = -1);
2285
- }
2286
- function yi() {
2287
- t(64, Z = []), t(14, h = void 0);
2288
- }
2289
- let T, Z, h, Rt = "", ne, O = -1, oe, Je = [], ye, Ne, Me, dt, de = !1;
2290
- const wi = /* @__PURE__ */ new Set(), be = di();
2291
- en(() => {
2292
- m && (m.setEventHandler(void 0), m.indicateReverse(!1), m.setSelectedMarker(-1), m.setFeatures(void 0, void 0, !1));
2293
- });
2294
- function Dt(o) {
2295
- if (t(17, de = !1), Ne && (clearTimeout(Ne), Ne = void 0), O > -1 && T)
2296
- t(14, h = T[O]), t(1, V = h.place_type[0] === "reverse" ? h.place_name : h.place_name.replace(/,.*/, "")), t(19, oe = void 0), t(64, Z = void 0), t(15, O = -1);
2297
- else if (V) {
2298
- const F = o || !ft(V);
2299
- mt(V, { exact: !0 }).then(() => {
2300
- t(64, Z = T), t(14, h = void 0), F && Ei();
2301
- }).catch((H) => t(19, oe = H));
2302
- }
2303
- }
2304
- function ft(o) {
2305
- try {
2306
- return Hn(o, 6);
2307
- } catch {
2308
- return !1;
2309
- }
2310
- }
2311
- async function mt(o, { byId: F = !1, exact: H = !1 } = {}) {
2312
- var $, ae, ve;
2313
- t(19, oe = void 0), ye == null || ye.abort();
2314
- const x = new AbortController();
2315
- t(20, ye = x);
2316
- try {
2317
- const z = ft(o), De = new URL(at + "/" + encodeURIComponent(z ? z.decimalLongitude + "," + z.decimalLatitude : o) + ".json"), te = De.searchParams;
2318
- _ !== void 0 && te.set("language", Array.isArray(_) ? _.join(",") : _ ?? "");
2319
- const [bt] = (m == null ? void 0 : m.getCenterAndZoom()) ?? [];
2320
- let le = ($ = !z || Ve === Ct ? rt : Ve) == null ? void 0 : $.map((Y) => typeof Y == "string" ? Y : bt === void 0 || (Y[0] ?? 0) <= bt && bt < (Y[1] ?? 1 / 0) ? Y[2] : void 0).filter((Y) => Y !== void 0);
2321
- le && (le = [...new Set(le)], te.set("types", le.join(",")));
2322
- const At = !z || Ye === Wt ? ot : Ye;
2323
- if (At && te.set("excludeTypes", String(At)), L && te.set("bbox", L.map((Y) => Y.toFixed(6)).join(",")), k && te.set("country", Array.isArray(k) ? k.join(",") : k), !F && !z) {
2324
- const Y = await zn(m, ke, x);
2325
- Y && te.set("proximity", Y), (H || !qe) && te.set("autocomplete", "false"), te.set("fuzzyMatch", String(w));
2326
- }
2327
- const Ue = v === U ? S : v;
2328
- Ue !== void 0 && Ue > 1 && (le == null ? void 0 : le.length) !== 1 && console.warn("For reverse geocoding when limit > 1 then types must contain single value."), z ? (Ue === 1 || Ue !== void 0 && (st || (le == null ? void 0 : le.length) === 1)) && te.set("limit", String(Ue)) : S !== void 0 && te.set("limit", String(S)), f && te.set("key", f), ut(te), ct(De);
2329
- const Bi = De.searchParams.get("types") === "" && De.searchParams.get("excludeTypes") !== "true", xe = De.toString();
2330
- if (xe === Rt) {
2331
- F ? (g && t(13, T = void 0), t(14, h = Je[0])) : (t(13, T = Je), ((ae = T[O]) == null ? void 0 : ae.id) !== (r == null ? void 0 : r.id) && t(15, O = -1));
2332
- return;
2333
- }
2334
- Rt = xe;
2335
- let Ie;
2336
- if (Bi)
2337
- Ie = { type: "FeatureCollection", features: [] };
2338
- else {
2339
- const Y = await fetch(xe, { signal: x.signal, ...lt });
2340
- if (!Y.ok)
2341
- throw new Error(await Y.text());
2342
- Ie = await Y.json();
2343
- }
2344
- be("response", { url: xe, featureCollection: Ie }), F ? (g && t(13, T = void 0), t(14, h = Ie.features[0]), Je = [h]) : (t(13, T = Ie.features.filter(C)), z && T.unshift({
2345
- type: "Feature",
2346
- properties: {},
2347
- id: "reverse_" + z.decimalLongitude + "_" + z.decimalLatitude,
2348
- text: z.decimalLatitude + ", " + z.decimalLongitude,
2349
- place_name: z.decimalLatitude + ", " + z.decimalLongitude,
2350
- place_type: ["reverse"],
2351
- center: [z.decimalLongitude, z.decimalLatitude],
2352
- bbox: [
2353
- z.decimalLongitude,
2354
- z.decimalLatitude,
2355
- z.decimalLongitude,
2356
- z.decimalLatitude
2357
- ],
2358
- geometry: {
2359
- type: "Point",
2360
- coordinates: [z.decimalLongitude, z.decimalLatitude]
2361
- }
2362
- }), Je = T, ((ve = T[O]) == null ? void 0 : ve.id) !== (r == null ? void 0 : r.id) && t(15, O = -1), z && ne.focus());
2363
- } catch (z) {
2364
- if (z && typeof z == "object" && "name" in z && z.name === "AbortError")
2365
- return;
2366
- throw z;
2367
- } finally {
2368
- x === ye && t(20, ye = void 0);
2369
- }
2370
- }
2371
- function Ei() {
2372
- var x;
2373
- if (!(Z != null && Z.length) || !M)
2374
- return;
2375
- const o = [180, 90, -180, -90], F = !Z.some(($) => !$.matching_text);
2376
- let H;
2377
- for (const $ of Z) {
2378
- const ae = Re($);
2379
- if (H = H === void 0 ? ae : ae === void 0 ? H : Math.max(H, ae), F || !$.matching_text)
2380
- for (const ve of [0, 1, 2, 3])
2381
- o[ve] = Math[ve < 2 ? "min" : "max"](o[ve], ((x = $.bbox) == null ? void 0 : x[ve]) ?? $.center[ve % 2]);
2382
- }
2383
- m && Z.length > 0 && (h && o[0] === o[2] && o[1] === o[3] ? m.flyTo(h.center, Re(h)) : m.fitBounds(Kt(o), 50, H));
2384
- }
2385
- function gt() {
2386
- !h || !m || (!h.bbox || h.bbox[0] === h.bbox[2] && h.bbox[1] === h.bbox[3] ? m.flyTo(h.center, Re(h)) : m.fitBounds(Kt(h.bbox), 50, Re(h)));
2387
- }
2388
- function Re(o) {
2389
- var H;
2390
- if (!o.bbox || o.bbox[0] !== o.bbox[2] && o.bbox[1] !== o.bbox[3])
2391
- return;
2392
- const F = o.id.replace(/\..*/, "");
2393
- return (Array.isArray((H = o.properties) == null ? void 0 : H.categories) ? o.properties.categories.reduce(
2394
- (x, $) => {
2395
- const ae = Xe[F + "." + $];
2396
- return x === void 0 ? ae : ae === void 0 ? x : Math.max(x, ae);
2397
- },
2398
- void 0
2399
- ) : void 0) ?? Xe[F];
2400
- }
2401
- function Si(o) {
2402
- t(0, ce = B === "always"), t(13, T = void 0), t(14, h = void 0), t(15, O = -1), zt(o[1].toFixed(6) + ", " + On(o[0], [-180, 180], !0).toFixed(6), !1, !0);
2403
- }
2404
- function pi(o) {
2405
- if (!T)
2406
- return;
2407
- let F = o.key === "ArrowDown" ? 1 : o.key === "ArrowUp" ? -1 : 0;
2408
- F && (ne.focus(), t(17, de = !0), o.preventDefault(), h && O === -1 && t(15, O = T.findIndex((H) => H.id === (h == null ? void 0 : h.id))), O === (h || Te ? 0 : -1) && F === -1 && t(15, O = T.length), t(15, O += F), O >= T.length && t(15, O = -1), O < 0 && (h || Te) && t(15, O = 0));
2409
- }
2410
- function Ut(o, F = !0, H = !1) {
2411
- if (t(19, oe = void 0), t(14, h = void 0), t(17, de = !0), qe || H) {
2412
- if (Ne && clearTimeout(Ne), V.length < y)
2413
- return;
2414
- const x = V;
2415
- Ne = window.setTimeout(
2416
- () => {
2417
- mt(x).catch(($) => t(19, oe = $));
2418
- },
2419
- F ? W : 0
2420
- );
2421
- } else
2422
- t(13, T = void 0), t(19, oe = void 0);
2423
- }
2424
- function ht(o) {
2425
- h && (h == null ? void 0 : h.id) === (o == null ? void 0 : o.id) ? gt() : (t(14, h = o), t(1, V = o.place_name));
2426
- }
2427
- function It(o) {
2428
- t(15, O = o);
2429
- }
2430
- function ki() {
2431
- (!Te || h) && t(15, O = -1), Qe && gt();
2432
- }
2433
- const Ti = () => ne.focus();
2434
- function Ni(o) {
2435
- wt[o ? "unshift" : "push"](() => {
2436
- ne = o, t(18, ne);
2437
- });
2438
- }
2439
- function Mi() {
2440
- V = this.value, t(1, V), t(17, de), t(31, E), t(16, Me);
2441
- }
2442
- const Ci = () => t(17, de = !0), Wi = () => t(17, de = !1), Oi = () => t(17, de = !0), zi = () => t(14, h = void 0), Ri = () => {
2443
- t(1, V = ""), t(14, h = void 0), ne.focus();
2444
- }, Di = () => t(0, ce = !ce), Ui = () => t(19, oe = void 0), Ii = (o) => It(o), Ai = (o) => ht(o), Pi = () => {
2445
- };
2446
- return i.$$set = (o) => {
2447
- "class" in o && t(2, c = o.class), "apiKey" in o && t(29, f = o.apiKey), "bbox" in o && t(30, L = o.bbox), "clearButtonTitle" in o && t(3, b = o.clearButtonTitle), "clearOnBlur" in o && t(31, E = o.clearOnBlur), "clearListOnPick" in o && t(32, g = o.clearListOnPick), "keepListOpen" in o && t(4, p = o.keepListOpen), "collapsed" in o && t(5, D = o.collapsed), "country" in o && t(33, k = o.country), "debounceSearch" in o && t(34, W = o.debounceSearch), "enableReverse" in o && t(6, B = o.enableReverse), "errorMessage" in o && t(7, K = o.errorMessage), "filter" in o && t(35, C = o.filter), "flyTo" in o && t(36, M = o.flyTo), "fuzzyMatch" in o && t(37, w = o.fuzzyMatch), "language" in o && t(38, _ = o.language), "limit" in o && t(39, S = o.limit), "reverseGeocodingLimit" in o && t(40, v = o.reverseGeocodingLimit), "mapController" in o && t(41, m = o.mapController), "minLength" in o && t(42, y = o.minLength), "noResultsMessage" in o && t(8, G = o.noResultsMessage), "placeholder" in o && t(9, ue = o.placeholder), "proximity" in o && t(43, ke = o.proximity), "reverseActive" in o && t(0, ce = o.reverseActive), "reverseButtonTitle" in o && t(10, Nt = o.reverseButtonTitle), "searchValue" in o && t(1, V = o.searchValue), "pickedResultStyle" in o && t(44, Ze = o.pickedResultStyle), "showPlaceType" in o && t(11, Mt = o.showPlaceType), "showResultsWhileTyping" in o && t(45, qe = o.showResultsWhileTyping), "selectFirst" in o && t(46, Te = o.selectFirst), "flyToSelected" in o && t(47, Qe = o.flyToSelected), "markerOnSelected" in o && t(48, Ke = o.markerOnSelected), "types" in o && t(49, rt = o.types), "reverseGeocodingTypes" in o && t(50, Ve = o.reverseGeocodingTypes), "exhaustiveReverseGeocoding" in o && t(51, st = o.exhaustiveReverseGeocoding), "excludeTypes" in o && t(52, ot = o.excludeTypes), "reverseGeocodingExcludeTypes" in o && t(53, Ye = o.reverseGeocodingExcludeTypes), "zoom" in o && t(54, Xe = o.zoom), "apiUrl" in o && t(55, at = o.apiUrl), "fetchParameters" in o && t(56, lt = o.fetchParameters), "iconsBaseUrl" in o && t(12, Ot = o.iconsBaseUrl), "adjustUrlQuery" in o && t(57, ut = o.adjustUrlQuery), "adjustUrl" in o && t(58, ct = o.adjustUrl), "$$scope" in o && t(69, s = o.$$scope);
2448
- }, i.$$.update = () => {
2449
- if (i.$$.dirty[0] & /*enableReverse*/
2450
- 64 && t(0, ce = B === "always"), i.$$.dirty[0] & /*picked*/
2451
- 16384 | i.$$.dirty[1] & /*pickedResultStyle*/
2452
- 8192 && Ze !== "marker-only" && h && !h.address && h.geometry.type === "Point" && h.place_type[0] !== "reverse" && mt(h.id, { byId: !0 }).catch((o) => t(19, oe = o)), i.$$.dirty[0] & /*picked*/
2453
- 16384 | i.$$.dirty[1] & /*mapController, flyTo, clearListOnPick*/
2454
- 1058 | i.$$.dirty[2] & /*prevIdToFly*/
2455
- 8 && (m && h && h.id !== dt && M && (gt(), g && t(13, T = void 0), t(64, Z = void 0), t(15, O = -1)), t(65, dt = h == null ? void 0 : h.id)), i.$$.dirty[0] & /*focused, focusedDelayed*/
2456
- 196608 | i.$$.dirty[1] & /*clearOnBlur*/
2457
- 1 && setTimeout(() => {
2458
- t(16, Me = de), E && !Me && t(1, V = "");
2459
- }), i.$$.dirty[0] & /*searchValue, listFeatures*/
2460
- 8194 | i.$$.dirty[1] & /*minLength*/
2461
- 2048 && V.length < y && (t(13, T = void 0), t(19, oe = void 0), t(64, Z = T)), i.$$.dirty[0] & /*listFeatures, selectedItemIndex, picked*/
2462
- 57344 | i.$$.dirty[1] & /*selectFirst*/
2463
- 32768 && Te && T != null && T.length && O == -1 && !h && t(15, O = 0), i.$$.dirty[0] & /*listFeatures*/
2464
- 8192 | i.$$.dirty[2] & /*markedFeatures*/
2465
- 4 && Z !== T && t(64, Z = void 0), i.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
2466
- 73729 | i.$$.dirty[1] & /*mapController*/
2467
- 1024 | i.$$.dirty[2] & /*markedFeatures*/
2468
- 4 && m && m.setEventHandler((o) => {
2469
- switch (o.type) {
2470
- case "mapClick":
2471
- ce && Si(o.coordinates);
2472
- break;
2473
- case "markerClick":
2474
- {
2475
- const F = T == null ? void 0 : T.find((H) => H.id === o.id);
2476
- F && ht(F);
2477
- }
2478
- break;
2479
- case "markerMouseEnter":
2480
- Z && t(15, O = Me ? (T == null ? void 0 : T.findIndex((F) => F.id === o.id)) ?? -1 : -1);
2481
- break;
2482
- case "markerMouseLeave":
2483
- Z && t(15, O = -1);
2484
- break;
2485
- }
2486
- }), i.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
2487
- 40960 && t(66, r = T == null ? void 0 : T[O]), i.$$.dirty[1] & /*mapController, flyTo, flyToSelected*/
2488
- 66592 | i.$$.dirty[2] & /*selected*/
2489
- 16 && m && r && M && Qe && m.flyTo(r.center, Re(r)), i.$$.dirty[1] & /*pickedResultStyle*/
2490
- 8192 && t(68, n = Ze === "full-geometry-including-polygon-center-marker"), i.$$.dirty[1] & /*markerOnSelected, mapController*/
2491
- 132096 | i.$$.dirty[2] & /*showPolygonMarker*/
2492
- 64 && (Ke || m == null || m.setFeatures(void 0, void 0, n)), i.$$.dirty[0] & /*picked*/
2493
- 16384 | i.$$.dirty[1] & /*mapController, markerOnSelected*/
2494
- 132096 | i.$$.dirty[2] & /*markedFeatures, selected, showPolygonMarker*/
2495
- 84 && m && Ke && !Z && (m.setFeatures(r ? [r] : void 0, h, n), m.setSelectedMarker(r ? 0 : -1)), i.$$.dirty[0] & /*picked*/
2496
- 16384 | i.$$.dirty[1] & /*mapController*/
2497
- 1024 | i.$$.dirty[2] & /*markedFeatures, showPolygonMarker*/
2498
- 68 && m && m.setFeatures(Z, h, n), i.$$.dirty[0] & /*selectedItemIndex*/
2499
- 32768 | i.$$.dirty[1] & /*mapController*/
2500
- 1024 | i.$$.dirty[2] & /*markedFeatures*/
2501
- 4 && Z && m && m.setSelectedMarker(O), i.$$.dirty[0] & /*searchValue*/
2502
- 2 | i.$$.dirty[1] & /*mapController*/
2503
- 1024 && m) {
2504
- const o = ft(V);
2505
- m.setReverseMarker(o ? [o.decimalLongitude, o.decimalLatitude] : void 0);
2506
- }
2507
- i.$$.dirty[2] & /*selected*/
2508
- 16 && be("select", { feature: r }), i.$$.dirty[0] & /*picked*/
2509
- 16384 && be("pick", { feature: h }), i.$$.dirty[0] & /*listFeatures, focusedDelayed, keepListOpen*/
2510
- 73744 && t(67, l = !!(T != null && T.length) && (Me || p)), i.$$.dirty[2] & /*optionsVisible*/
2511
- 32 && be("optionsvisibilitychange", { optionsVisible: l }), i.$$.dirty[0] & /*listFeatures*/
2512
- 8192 && be("featureslisted", { features: T }), i.$$.dirty[2] & /*markedFeatures*/
2513
- 4 && be("featuresmarked", { features: Z }), i.$$.dirty[0] & /*reverseActive*/
2514
- 1 && be("reversetoggle", { reverse: ce }), i.$$.dirty[0] & /*searchValue*/
2515
- 2 && be("querychange", { query: V }), i.$$.dirty[0] & /*reverseActive*/
2516
- 1 | i.$$.dirty[1] & /*mapController*/
2517
- 1024 && m && m.indicateReverse(ce);
2518
- }, [
2519
- ce,
2520
- V,
2521
- c,
2522
- b,
2523
- p,
2524
- D,
2525
- B,
2526
- K,
2527
- G,
2528
- ue,
2529
- Nt,
2530
- Mt,
2531
- Ot,
2532
- T,
2533
- h,
2534
- O,
2535
- Me,
2536
- de,
2537
- ne,
2538
- oe,
2539
- ye,
2540
- wi,
2541
- Dt,
2542
- pi,
2543
- Ut,
2544
- ht,
2545
- It,
2546
- ki,
2547
- d,
2548
- f,
2549
- L,
2550
- E,
2551
- g,
2552
- k,
2553
- W,
2554
- C,
2555
- M,
2556
- w,
2557
- _,
2558
- S,
2559
- v,
2560
- m,
2561
- y,
2562
- ke,
2563
- Ze,
2564
- qe,
2565
- Te,
2566
- Qe,
2567
- Ke,
2568
- rt,
2569
- Ve,
2570
- st,
2571
- ot,
2572
- Ye,
2573
- Xe,
2574
- at,
2575
- lt,
2576
- ut,
2577
- ct,
2578
- vi,
2579
- Li,
2580
- zt,
2581
- _i,
2582
- yi,
2583
- Z,
2584
- dt,
2585
- r,
2586
- l,
2587
- n,
2588
- s,
2589
- u,
2590
- Ti,
2591
- Ni,
2592
- Mi,
2593
- Ci,
2594
- Wi,
2595
- Oi,
2596
- zi,
2597
- Ri,
2598
- Di,
2599
- Ui,
2600
- Ii,
2601
- Ai,
2602
- Pi
2603
- ];
2604
- }
2605
- let Xn = class extends pe {
2606
- constructor(e) {
2607
- super(), Se(
2608
- this,
2609
- e,
2610
- Yn,
2611
- Vn,
2612
- Ee,
2613
- {
2614
- ZOOM_DEFAULTS: 28,
2615
- class: 2,
2616
- apiKey: 29,
2617
- bbox: 30,
2618
- clearButtonTitle: 3,
2619
- clearOnBlur: 31,
2620
- clearListOnPick: 32,
2621
- keepListOpen: 4,
2622
- collapsed: 5,
2623
- country: 33,
2624
- debounceSearch: 34,
2625
- enableReverse: 6,
2626
- errorMessage: 7,
2627
- filter: 35,
2628
- flyTo: 36,
2629
- fuzzyMatch: 37,
2630
- language: 38,
2631
- limit: 39,
2632
- reverseGeocodingLimit: 40,
2633
- mapController: 41,
2634
- minLength: 42,
2635
- noResultsMessage: 8,
2636
- placeholder: 9,
2637
- proximity: 43,
2638
- reverseActive: 0,
2639
- reverseButtonTitle: 10,
2640
- searchValue: 1,
2641
- pickedResultStyle: 44,
2642
- showPlaceType: 11,
2643
- showResultsWhileTyping: 45,
2644
- selectFirst: 46,
2645
- flyToSelected: 47,
2646
- markerOnSelected: 48,
2647
- types: 49,
2648
- reverseGeocodingTypes: 50,
2649
- exhaustiveReverseGeocoding: 51,
2650
- excludeTypes: 52,
2651
- reverseGeocodingExcludeTypes: 53,
2652
- zoom: 54,
2653
- apiUrl: 55,
2654
- fetchParameters: 56,
2655
- iconsBaseUrl: 12,
2656
- adjustUrlQuery: 57,
2657
- adjustUrl: 58,
2658
- focus: 59,
2659
- blur: 60,
2660
- setQuery: 61,
2661
- clearList: 62,
2662
- clearMap: 63
2663
- },
2664
- null,
2665
- [-1, -1, -1, -1]
2666
- );
2667
- }
2668
- get ZOOM_DEFAULTS() {
2669
- return this.$$.ctx[28];
2670
- }
2671
- get focus() {
2672
- return this.$$.ctx[59];
2673
- }
2674
- get blur() {
2675
- return this.$$.ctx[60];
2676
- }
2677
- get setQuery() {
2678
- return this.$$.ctx[61];
2679
- }
2680
- get clearList() {
2681
- return this.$$.ctx[62];
2682
- }
2683
- get clearMap() {
2684
- return this.$$.ctx[63];
2685
- }
2686
- };
2687
- const Jn = new FinalizationRegistry((i) => {
2688
- i.$destroy();
2689
- });
2690
- var J, nt, bi;
2691
- const Tt = class Tt extends EventTarget {
2692
- constructor({ target: t, ...n }) {
2693
- super();
2694
- _t(this, nt);
2695
- _t(this, J);
2696
- Bt(this, J, new Xn({
2697
- target: t,
2698
- props: n
2699
- }));
2700
- for (const r of [
2701
- "select",
2702
- "pick",
2703
- "featureslisted",
2704
- "featuresmarked",
2705
- "response",
2706
- "optionsvisibilitychange",
2707
- "reversetoggle",
2708
- "querychange"
2709
- ])
2710
- re(this, J).$on(r, (l) => {
2711
- Ft(this, nt, bi).call(this, r, l.detail);
2712
- });
2713
- re(this, J).$on("select", (r) => {
2714
- const l = new CustomEvent(r.type, {
2715
- detail: r.detail
2716
- });
2717
- this.dispatchEvent(l);
2718
- }), Jn.register(this, re(this, J));
2719
- }
2720
- /**
2721
- * Update the control options.
2722
- *
2723
- * @param options options to update
2724
- */
2725
- setOptions(t) {
2726
- re(this, J).$set(t);
2727
- }
2728
- /**
2729
- * Set the content of search input box.
2730
- *
2731
- * @param value text to set
2732
- * @param submit perform the search
2733
- */
2734
- setQuery(t, n = !0) {
2735
- var r;
2736
- (r = re(this, J)) == null || r.setQuery(t, n);
2737
- }
2738
- /**
2739
- * Clear geocoding search results from the map.
2740
- */
2741
- clearMap() {
2742
- var t;
2743
- (t = re(this, J)) == null || t.clearMap();
2744
- }
2745
- /**
2746
- * Clear search result list.
2747
- */
2748
- clearList() {
2749
- var t;
2750
- (t = re(this, J)) == null || t.clearList();
2751
- }
2752
- /**
2753
- * Set reverse geocoding mode.
2754
- *
2755
- * @param reverseActive reverse geocoding active
2756
- */
2757
- setReverseMode(t) {
2758
- var n;
2759
- (n = re(this, J)) == null || n.$set({ reverseActive: t });
2760
- }
2761
- /**
2762
- * Focus the search input box.
2763
- *
2764
- * @param options [FocusOptions](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
2765
- */
2766
- focus(t) {
2767
- var n;
2768
- (n = re(this, J)) == null || n.focus(t);
2769
- }
2770
- /**
2771
- * Blur the search input box.
2772
- */
2773
- blur() {
2774
- var t;
2775
- (t = re(this, J)) == null || t.blur();
2776
- }
2777
- addEventListener(t, n, r) {
2778
- super.addEventListener(t, n, r);
2779
- }
2780
- removeEventListener(t, n, r) {
2781
- super.removeEventListener(t, n, r);
2782
- }
2783
- dispatchEvent(t) {
2784
- return super.dispatchEvent(t);
2785
- }
2786
- };
2787
- J = new WeakMap(), nt = new WeakSet(), bi = function(t, n) {
2788
- return jt(Tt.prototype, this, "dispatchEvent").call(
2789
- this,
2790
- new CustomEvent(t, {
2791
- detail: n
2792
- })
2793
- );
2794
- };
2795
- let oi = Tt;
2796
- export {
2797
- oi as GeocodingControl
2798
- };
2799
- //# sourceMappingURL=vanilla.js.map