signalk-onaplotter 0.0.0-stage → 0.1.0

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 (482) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +52 -2
  3. package/index.js +310 -0
  4. package/package.json +28 -4
  5. package/public/OnaPlotter.styles.css +365 -0
  6. package/public/OnaPlotter.styles.css.br +0 -0
  7. package/public/OnaPlotter.styles.css.gz +0 -0
  8. package/public/_framework/Microsoft.AspNetCore.Components.Web.lzlha3sebn.wasm +0 -0
  9. package/public/_framework/Microsoft.AspNetCore.Components.Web.lzlha3sebn.wasm.br +0 -0
  10. package/public/_framework/Microsoft.AspNetCore.Components.Web.lzlha3sebn.wasm.gz +0 -0
  11. package/public/_framework/Microsoft.AspNetCore.Components.WebAssembly.hgb9kb1ko8.wasm +0 -0
  12. package/public/_framework/Microsoft.AspNetCore.Components.WebAssembly.hgb9kb1ko8.wasm.br +0 -0
  13. package/public/_framework/Microsoft.AspNetCore.Components.WebAssembly.hgb9kb1ko8.wasm.gz +0 -0
  14. package/public/_framework/Microsoft.AspNetCore.Components.ctlimky0ld.wasm +0 -0
  15. package/public/_framework/Microsoft.AspNetCore.Components.ctlimky0ld.wasm.br +0 -0
  16. package/public/_framework/Microsoft.AspNetCore.Components.ctlimky0ld.wasm.gz +0 -0
  17. package/public/_framework/Microsoft.Extensions.Configuration.Abstractions.ex1njydbd4.wasm +0 -0
  18. package/public/_framework/Microsoft.Extensions.Configuration.Abstractions.ex1njydbd4.wasm.br +0 -0
  19. package/public/_framework/Microsoft.Extensions.Configuration.Abstractions.ex1njydbd4.wasm.gz +0 -0
  20. package/public/_framework/Microsoft.Extensions.Configuration.EnvironmentVariables.dufoils7aa.wasm +0 -0
  21. package/public/_framework/Microsoft.Extensions.Configuration.EnvironmentVariables.dufoils7aa.wasm.br +0 -0
  22. package/public/_framework/Microsoft.Extensions.Configuration.EnvironmentVariables.dufoils7aa.wasm.gz +0 -0
  23. package/public/_framework/Microsoft.Extensions.Configuration.Json.2cwa6dgvjw.wasm +0 -0
  24. package/public/_framework/Microsoft.Extensions.Configuration.Json.2cwa6dgvjw.wasm.br +0 -0
  25. package/public/_framework/Microsoft.Extensions.Configuration.Json.2cwa6dgvjw.wasm.gz +0 -0
  26. package/public/_framework/Microsoft.Extensions.Configuration.tf0s85350j.wasm +0 -0
  27. package/public/_framework/Microsoft.Extensions.Configuration.tf0s85350j.wasm.br +0 -0
  28. package/public/_framework/Microsoft.Extensions.Configuration.tf0s85350j.wasm.gz +0 -0
  29. package/public/_framework/Microsoft.Extensions.DependencyInjection.Abstractions.ykrsa5qwvj.wasm +0 -0
  30. package/public/_framework/Microsoft.Extensions.DependencyInjection.Abstractions.ykrsa5qwvj.wasm.br +0 -0
  31. package/public/_framework/Microsoft.Extensions.DependencyInjection.Abstractions.ykrsa5qwvj.wasm.gz +0 -0
  32. package/public/_framework/Microsoft.Extensions.DependencyInjection.q4ogihpz4g.wasm +0 -0
  33. package/public/_framework/Microsoft.Extensions.DependencyInjection.q4ogihpz4g.wasm.br +0 -0
  34. package/public/_framework/Microsoft.Extensions.DependencyInjection.q4ogihpz4g.wasm.gz +0 -0
  35. package/public/_framework/Microsoft.Extensions.Diagnostics.Abstractions.w51v02shrt.wasm +0 -0
  36. package/public/_framework/Microsoft.Extensions.Diagnostics.Abstractions.w51v02shrt.wasm.br +0 -0
  37. package/public/_framework/Microsoft.Extensions.Diagnostics.Abstractions.w51v02shrt.wasm.gz +0 -0
  38. package/public/_framework/Microsoft.Extensions.Diagnostics.jdah25iecf.wasm +0 -0
  39. package/public/_framework/Microsoft.Extensions.Diagnostics.jdah25iecf.wasm.br +0 -0
  40. package/public/_framework/Microsoft.Extensions.Diagnostics.jdah25iecf.wasm.gz +0 -0
  41. package/public/_framework/Microsoft.Extensions.Hosting.Abstractions.2esolmyrj5.wasm +0 -0
  42. package/public/_framework/Microsoft.Extensions.Hosting.Abstractions.2esolmyrj5.wasm.br +0 -0
  43. package/public/_framework/Microsoft.Extensions.Hosting.Abstractions.2esolmyrj5.wasm.gz +0 -0
  44. package/public/_framework/Microsoft.Extensions.Logging.Abstractions.zwtdylwuov.wasm +0 -0
  45. package/public/_framework/Microsoft.Extensions.Logging.Abstractions.zwtdylwuov.wasm.br +0 -0
  46. package/public/_framework/Microsoft.Extensions.Logging.Abstractions.zwtdylwuov.wasm.gz +0 -0
  47. package/public/_framework/Microsoft.Extensions.Logging.xmx5eyc5ch.wasm +0 -0
  48. package/public/_framework/Microsoft.Extensions.Logging.xmx5eyc5ch.wasm.br +0 -0
  49. package/public/_framework/Microsoft.Extensions.Logging.xmx5eyc5ch.wasm.gz +0 -0
  50. package/public/_framework/Microsoft.Extensions.Options.bxcwufxpzd.wasm +0 -0
  51. package/public/_framework/Microsoft.Extensions.Options.bxcwufxpzd.wasm.br +0 -0
  52. package/public/_framework/Microsoft.Extensions.Options.bxcwufxpzd.wasm.gz +0 -0
  53. package/public/_framework/Microsoft.Extensions.Primitives.r28g7oh1t8.wasm +0 -0
  54. package/public/_framework/Microsoft.Extensions.Primitives.r28g7oh1t8.wasm.br +0 -0
  55. package/public/_framework/Microsoft.Extensions.Primitives.r28g7oh1t8.wasm.gz +0 -0
  56. package/public/_framework/Microsoft.JSInterop.WebAssembly.kthmj8ue8z.wasm +0 -0
  57. package/public/_framework/Microsoft.JSInterop.WebAssembly.kthmj8ue8z.wasm.br +0 -0
  58. package/public/_framework/Microsoft.JSInterop.WebAssembly.kthmj8ue8z.wasm.gz +0 -0
  59. package/public/_framework/Microsoft.JSInterop.z69euz7ekt.wasm +0 -0
  60. package/public/_framework/Microsoft.JSInterop.z69euz7ekt.wasm.br +0 -0
  61. package/public/_framework/Microsoft.JSInterop.z69euz7ekt.wasm.gz +0 -0
  62. package/public/_framework/OnaPlotter.g1oyk97tth.wasm +0 -0
  63. package/public/_framework/OnaPlotter.g1oyk97tth.wasm.br +0 -0
  64. package/public/_framework/OnaPlotter.g1oyk97tth.wasm.gz +0 -0
  65. package/public/_framework/System.Collections.0y3lxq9yiz.wasm +0 -0
  66. package/public/_framework/System.Collections.0y3lxq9yiz.wasm.br +0 -0
  67. package/public/_framework/System.Collections.0y3lxq9yiz.wasm.gz +0 -0
  68. package/public/_framework/System.Collections.Concurrent.y1gijyulzg.wasm +0 -0
  69. package/public/_framework/System.Collections.Concurrent.y1gijyulzg.wasm.br +0 -0
  70. package/public/_framework/System.Collections.Concurrent.y1gijyulzg.wasm.gz +0 -0
  71. package/public/_framework/System.Collections.Immutable.bv8sm0hn96.wasm +0 -0
  72. package/public/_framework/System.Collections.Immutable.bv8sm0hn96.wasm.br +0 -0
  73. package/public/_framework/System.Collections.Immutable.bv8sm0hn96.wasm.gz +0 -0
  74. package/public/_framework/System.Collections.NonGeneric.demk1o8khk.wasm +0 -0
  75. package/public/_framework/System.Collections.NonGeneric.demk1o8khk.wasm.br +0 -0
  76. package/public/_framework/System.Collections.NonGeneric.demk1o8khk.wasm.gz +0 -0
  77. package/public/_framework/System.Collections.Specialized.ybmtdn8n9q.wasm +0 -0
  78. package/public/_framework/System.Collections.Specialized.ybmtdn8n9q.wasm.br +0 -0
  79. package/public/_framework/System.Collections.Specialized.ybmtdn8n9q.wasm.gz +0 -0
  80. package/public/_framework/System.ComponentModel.Primitives.hdixdh1geb.wasm +0 -0
  81. package/public/_framework/System.ComponentModel.Primitives.hdixdh1geb.wasm.br +0 -0
  82. package/public/_framework/System.ComponentModel.Primitives.hdixdh1geb.wasm.gz +0 -0
  83. package/public/_framework/System.ComponentModel.TypeConverter.80a5fdjdf1.wasm +0 -0
  84. package/public/_framework/System.ComponentModel.TypeConverter.80a5fdjdf1.wasm.br +0 -0
  85. package/public/_framework/System.ComponentModel.TypeConverter.80a5fdjdf1.wasm.gz +0 -0
  86. package/public/_framework/System.ComponentModel.er3kikotc9.wasm +0 -0
  87. package/public/_framework/System.ComponentModel.er3kikotc9.wasm.br +0 -0
  88. package/public/_framework/System.ComponentModel.er3kikotc9.wasm.gz +0 -0
  89. package/public/_framework/System.Console.ztyrgmguq9.wasm +0 -0
  90. package/public/_framework/System.Console.ztyrgmguq9.wasm.br +0 -0
  91. package/public/_framework/System.Console.ztyrgmguq9.wasm.gz +0 -0
  92. package/public/_framework/System.Diagnostics.DiagnosticSource.8ovi6htwue.wasm +0 -0
  93. package/public/_framework/System.Diagnostics.DiagnosticSource.8ovi6htwue.wasm.br +0 -0
  94. package/public/_framework/System.Diagnostics.DiagnosticSource.8ovi6htwue.wasm.gz +0 -0
  95. package/public/_framework/System.IO.Pipelines.ehyowalz06.wasm +0 -0
  96. package/public/_framework/System.IO.Pipelines.ehyowalz06.wasm.br +0 -0
  97. package/public/_framework/System.IO.Pipelines.ehyowalz06.wasm.gz +0 -0
  98. package/public/_framework/System.Linq.77nzpgno3g.wasm +0 -0
  99. package/public/_framework/System.Linq.77nzpgno3g.wasm.br +0 -0
  100. package/public/_framework/System.Linq.77nzpgno3g.wasm.gz +0 -0
  101. package/public/_framework/System.Memory.96u3edrscq.wasm +0 -0
  102. package/public/_framework/System.Memory.96u3edrscq.wasm.br +0 -0
  103. package/public/_framework/System.Memory.96u3edrscq.wasm.gz +0 -0
  104. package/public/_framework/System.Net.Http.04zi0q3bww.wasm +0 -0
  105. package/public/_framework/System.Net.Http.04zi0q3bww.wasm.br +0 -0
  106. package/public/_framework/System.Net.Http.04zi0q3bww.wasm.gz +0 -0
  107. package/public/_framework/System.Net.Http.Json.dfsls33yd0.wasm +0 -0
  108. package/public/_framework/System.Net.Http.Json.dfsls33yd0.wasm.br +0 -0
  109. package/public/_framework/System.Net.Http.Json.dfsls33yd0.wasm.gz +0 -0
  110. package/public/_framework/System.Net.Primitives.3bql0h4h9x.wasm +0 -0
  111. package/public/_framework/System.Net.Primitives.3bql0h4h9x.wasm.br +0 -0
  112. package/public/_framework/System.Net.Primitives.3bql0h4h9x.wasm.gz +0 -0
  113. package/public/_framework/System.Net.WebSockets.Client.yabl5yso4d.wasm +0 -0
  114. package/public/_framework/System.Net.WebSockets.Client.yabl5yso4d.wasm.br +0 -0
  115. package/public/_framework/System.Net.WebSockets.Client.yabl5yso4d.wasm.gz +0 -0
  116. package/public/_framework/System.Net.WebSockets.btb8u9bs63.wasm +0 -0
  117. package/public/_framework/System.Net.WebSockets.btb8u9bs63.wasm.br +0 -0
  118. package/public/_framework/System.Net.WebSockets.btb8u9bs63.wasm.gz +0 -0
  119. package/public/_framework/System.ObjectModel.y2vjd96rm0.wasm +0 -0
  120. package/public/_framework/System.ObjectModel.y2vjd96rm0.wasm.br +0 -0
  121. package/public/_framework/System.ObjectModel.y2vjd96rm0.wasm.gz +0 -0
  122. package/public/_framework/System.Private.CoreLib.18u2ssdtkz.wasm +0 -0
  123. package/public/_framework/System.Private.CoreLib.18u2ssdtkz.wasm.br +0 -0
  124. package/public/_framework/System.Private.CoreLib.18u2ssdtkz.wasm.gz +0 -0
  125. package/public/_framework/System.Private.Uri.lipib74a1x.wasm +0 -0
  126. package/public/_framework/System.Private.Uri.lipib74a1x.wasm.br +0 -0
  127. package/public/_framework/System.Private.Uri.lipib74a1x.wasm.gz +0 -0
  128. package/public/_framework/System.Private.Xml.Linq.01wrv6yr49.wasm +0 -0
  129. package/public/_framework/System.Private.Xml.Linq.01wrv6yr49.wasm.br +0 -0
  130. package/public/_framework/System.Private.Xml.Linq.01wrv6yr49.wasm.gz +0 -0
  131. package/public/_framework/System.Private.Xml.h7x38gg1kw.wasm +0 -0
  132. package/public/_framework/System.Private.Xml.h7x38gg1kw.wasm.br +0 -0
  133. package/public/_framework/System.Private.Xml.h7x38gg1kw.wasm.gz +0 -0
  134. package/public/_framework/System.Runtime.InteropServices.JavaScript.fymien2tnc.wasm +0 -0
  135. package/public/_framework/System.Runtime.InteropServices.JavaScript.fymien2tnc.wasm.br +0 -0
  136. package/public/_framework/System.Runtime.InteropServices.JavaScript.fymien2tnc.wasm.gz +0 -0
  137. package/public/_framework/System.Runtime.InteropServices.h45u78t9gg.wasm +0 -0
  138. package/public/_framework/System.Runtime.InteropServices.h45u78t9gg.wasm.br +0 -0
  139. package/public/_framework/System.Runtime.InteropServices.h45u78t9gg.wasm.gz +0 -0
  140. package/public/_framework/System.Runtime.nqxxfenwc0.wasm +0 -0
  141. package/public/_framework/System.Runtime.nqxxfenwc0.wasm.br +0 -0
  142. package/public/_framework/System.Runtime.nqxxfenwc0.wasm.gz +0 -0
  143. package/public/_framework/System.Security.Cryptography.r8xdxuwcik.wasm +0 -0
  144. package/public/_framework/System.Security.Cryptography.r8xdxuwcik.wasm.br +0 -0
  145. package/public/_framework/System.Security.Cryptography.r8xdxuwcik.wasm.gz +0 -0
  146. package/public/_framework/System.Text.Encodings.Web.8tv8c2qml7.wasm +0 -0
  147. package/public/_framework/System.Text.Encodings.Web.8tv8c2qml7.wasm.br +0 -0
  148. package/public/_framework/System.Text.Encodings.Web.8tv8c2qml7.wasm.gz +0 -0
  149. package/public/_framework/System.Text.Json.vlj0ri24nf.wasm +0 -0
  150. package/public/_framework/System.Text.Json.vlj0ri24nf.wasm.br +0 -0
  151. package/public/_framework/System.Text.Json.vlj0ri24nf.wasm.gz +0 -0
  152. package/public/_framework/System.Text.RegularExpressions.syst47d0hk.wasm +0 -0
  153. package/public/_framework/System.Text.RegularExpressions.syst47d0hk.wasm.br +0 -0
  154. package/public/_framework/System.Text.RegularExpressions.syst47d0hk.wasm.gz +0 -0
  155. package/public/_framework/System.Threading.3w9td3odjb.wasm +0 -0
  156. package/public/_framework/System.Threading.3w9td3odjb.wasm.br +0 -0
  157. package/public/_framework/System.Threading.3w9td3odjb.wasm.gz +0 -0
  158. package/public/_framework/System.Web.HttpUtility.s6p043ak0k.wasm +0 -0
  159. package/public/_framework/System.Web.HttpUtility.s6p043ak0k.wasm.br +0 -0
  160. package/public/_framework/System.Web.HttpUtility.s6p043ak0k.wasm.gz +0 -0
  161. package/public/_framework/System.Xml.Linq.6jrwceho2h.wasm +0 -0
  162. package/public/_framework/System.Xml.Linq.6jrwceho2h.wasm.br +0 -0
  163. package/public/_framework/System.Xml.Linq.6jrwceho2h.wasm.gz +0 -0
  164. package/public/_framework/System.Xml.ReaderWriter.au2hkgm2hw.wasm +0 -0
  165. package/public/_framework/System.Xml.ReaderWriter.au2hkgm2hw.wasm.br +0 -0
  166. package/public/_framework/System.Xml.ReaderWriter.au2hkgm2hw.wasm.gz +0 -0
  167. package/public/_framework/System.Xml.XDocument.pllf66tpew.wasm +0 -0
  168. package/public/_framework/System.Xml.XDocument.pllf66tpew.wasm.br +0 -0
  169. package/public/_framework/System.Xml.XDocument.pllf66tpew.wasm.gz +0 -0
  170. package/public/_framework/System.n1lgwvdeih.wasm +0 -0
  171. package/public/_framework/System.n1lgwvdeih.wasm.br +0 -0
  172. package/public/_framework/System.n1lgwvdeih.wasm.gz +0 -0
  173. package/public/_framework/blazor.webassembly.js +2 -0
  174. package/public/_framework/blazor.webassembly.js.br +0 -0
  175. package/public/_framework/blazor.webassembly.js.gz +0 -0
  176. package/public/_framework/blazor.webassembly.js.map +1 -0
  177. package/public/_framework/blazor.webassembly.js.map.br +0 -0
  178. package/public/_framework/blazor.webassembly.js.map.gz +0 -0
  179. package/public/_framework/dotnet.js +462 -0
  180. package/public/_framework/dotnet.js.br +0 -0
  181. package/public/_framework/dotnet.js.gz +0 -0
  182. package/public/_framework/dotnet.native.0yslzj0e9x.wasm +0 -0
  183. package/public/_framework/dotnet.native.0yslzj0e9x.wasm.br +0 -0
  184. package/public/_framework/dotnet.native.0yslzj0e9x.wasm.gz +0 -0
  185. package/public/_framework/dotnet.native.ijy01f6viz.js +5502 -0
  186. package/public/_framework/dotnet.native.ijy01f6viz.js.br +0 -0
  187. package/public/_framework/dotnet.native.ijy01f6viz.js.gz +0 -0
  188. package/public/_framework/dotnet.runtime.uyfhwbfd13.js +4 -0
  189. package/public/_framework/dotnet.runtime.uyfhwbfd13.js.br +0 -0
  190. package/public/_framework/dotnet.runtime.uyfhwbfd13.js.gz +0 -0
  191. package/public/apple-touch-icon-180.png +0 -0
  192. package/public/appsettings.json +1 -0
  193. package/public/css/app.css +1 -0
  194. package/public/css/app.css.br +0 -0
  195. package/public/css/app.css.gz +0 -0
  196. package/public/css/bootstrap/bootstrap.min.css +5 -0
  197. package/public/css/bootstrap/bootstrap.min.css.br +0 -0
  198. package/public/css/bootstrap/bootstrap.min.css.gz +0 -0
  199. package/public/favicon.svg +19 -0
  200. package/public/favicon.svg.br +0 -0
  201. package/public/favicon.svg.gz +0 -0
  202. package/public/fonts/InterVariable.woff2 +0 -0
  203. package/public/icon-192.png +0 -0
  204. package/public/icon-512.png +0 -0
  205. package/public/index.html +208 -0
  206. package/public/js/activeRouteLayer.js +10 -0
  207. package/public/js/activeRouteLayer.js.br +0 -0
  208. package/public/js/activeRouteLayer.js.gz +0 -0
  209. package/public/js/aisLayer.js +12 -0
  210. package/public/js/aisLayer.js.br +0 -0
  211. package/public/js/aisLayer.js.gz +0 -0
  212. package/public/js/anchorLayer.js +1 -0
  213. package/public/js/anchorLayer.js.br +0 -0
  214. package/public/js/anchorLayer.js.gz +0 -0
  215. package/public/js/atonLayer.js +24 -0
  216. package/public/js/atonLayer.js.br +0 -0
  217. package/public/js/atonLayer.js.gz +0 -0
  218. package/public/js/boatIcons.js +1 -0
  219. package/public/js/boatIcons.js.br +0 -0
  220. package/public/js/boatIcons.js.gz +0 -0
  221. package/public/js/chartDownshift.js +1 -0
  222. package/public/js/chartDownshift.js.br +0 -0
  223. package/public/js/chartDownshift.js.gz +0 -0
  224. package/public/js/courseLineLayer.js +1 -0
  225. package/public/js/courseLineLayer.js.br +0 -0
  226. package/public/js/courseLineLayer.js.gz +0 -0
  227. package/public/js/deadman.js +1 -0
  228. package/public/js/deadman.js.br +0 -0
  229. package/public/js/deadman.js.gz +0 -0
  230. package/public/js/dragGhost.js +1 -0
  231. package/public/js/dragGhost.js.br +0 -0
  232. package/public/js/dragGhost.js.gz +0 -0
  233. package/public/js/errorRelayBoot.js +2 -0
  234. package/public/js/errorRelayBoot.js.br +0 -0
  235. package/public/js/errorRelayBoot.js.gz +0 -0
  236. package/public/js/format.js +1 -0
  237. package/public/js/format.js.br +0 -0
  238. package/public/js/format.js.gz +0 -0
  239. package/public/js/geoMath.js +1 -0
  240. package/public/js/geoMath.js.br +0 -0
  241. package/public/js/geoMath.js.gz +0 -0
  242. package/public/js/geomPixels.js +1 -0
  243. package/public/js/geomPixels.js.br +0 -0
  244. package/public/js/geomPixels.js.gz +0 -0
  245. package/public/js/historyMapLayer.js +1 -0
  246. package/public/js/historyMapLayer.js.br +0 -0
  247. package/public/js/historyMapLayer.js.gz +0 -0
  248. package/public/js/keyboardShortcuts.js +1 -0
  249. package/public/js/keyboardShortcuts.js.br +0 -0
  250. package/public/js/keyboardShortcuts.js.gz +0 -0
  251. package/public/js/laylineLayer.js +1 -0
  252. package/public/js/laylineLayer.js.br +0 -0
  253. package/public/js/laylineLayer.js.gz +0 -0
  254. package/public/js/leafletInterop.XG3NAVS4.js +170 -0
  255. package/public/js/leafletInterop.XG3NAVS4.js.br +0 -0
  256. package/public/js/leafletInterop.XG3NAVS4.js.gz +0 -0
  257. package/public/js/leafletInterop.js +1 -0
  258. package/public/js/mapRotation.js +1 -0
  259. package/public/js/mapRotation.js.br +0 -0
  260. package/public/js/mapRotation.js.gz +0 -0
  261. package/public/js/marinePoiLayer.js +35 -0
  262. package/public/js/marinePoiLayer.js.br +0 -0
  263. package/public/js/marinePoiLayer.js.gz +0 -0
  264. package/public/js/markerLayer.js +1 -0
  265. package/public/js/markerLayer.js.br +0 -0
  266. package/public/js/markerLayer.js.gz +0 -0
  267. package/public/js/measureLayer.js +1 -0
  268. package/public/js/measureLayer.js.br +0 -0
  269. package/public/js/measureLayer.js.gz +0 -0
  270. package/public/js/noteLayer.js +32 -0
  271. package/public/js/noteLayer.js.br +0 -0
  272. package/public/js/noteLayer.js.gz +0 -0
  273. package/public/js/overzoomLayer.js +1 -0
  274. package/public/js/overzoomLayer.js.br +0 -0
  275. package/public/js/overzoomLayer.js.gz +0 -0
  276. package/public/js/ownBoatPopup.js +1 -0
  277. package/public/js/ownBoatPopup.js.br +1 -0
  278. package/public/js/ownBoatPopup.js.gz +0 -0
  279. package/public/js/platform/audioAlert.js +1 -0
  280. package/public/js/platform/audioAlert.js.br +0 -0
  281. package/public/js/platform/audioAlert.js.gz +0 -0
  282. package/public/js/platform/fileTransfer.js +1 -0
  283. package/public/js/platform/fileTransfer.js.br +0 -0
  284. package/public/js/platform/fileTransfer.js.gz +0 -0
  285. package/public/js/platform/fullscreen.js +1 -0
  286. package/public/js/platform/fullscreen.js.br +0 -0
  287. package/public/js/platform/fullscreen.js.gz +0 -0
  288. package/public/js/platform/themeApply.js +1 -0
  289. package/public/js/platform/themeApply.js.br +0 -0
  290. package/public/js/platform/themeApply.js.gz +0 -0
  291. package/public/js/platform/viewport.js +1 -0
  292. package/public/js/platform/viewport.js.br +0 -0
  293. package/public/js/platform/viewport.js.gz +0 -0
  294. package/public/js/platform/wakeLock.js +1 -0
  295. package/public/js/platform/wakeLock.js.br +0 -0
  296. package/public/js/platform/wakeLock.js.gz +0 -0
  297. package/public/js/polygonEditLayer.js +1 -0
  298. package/public/js/polygonEditLayer.js.br +0 -0
  299. package/public/js/polygonEditLayer.js.gz +0 -0
  300. package/public/js/popupHelpers.js +1 -0
  301. package/public/js/popupHelpers.js.br +0 -0
  302. package/public/js/popupHelpers.js.gz +0 -0
  303. package/public/js/radarLayer.js +1 -0
  304. package/public/js/radarLayer.js.br +0 -0
  305. package/public/js/radarLayer.js.gz +0 -0
  306. package/public/js/radarProtobuf.js +1 -0
  307. package/public/js/radarProtobuf.js.br +0 -0
  308. package/public/js/radarProtobuf.js.gz +0 -0
  309. package/public/js/rangeScale.js +1 -0
  310. package/public/js/rangeScale.js.br +0 -0
  311. package/public/js/rangeScale.js.gz +0 -0
  312. package/public/js/regionLayer.js +10 -0
  313. package/public/js/regionLayer.js.br +0 -0
  314. package/public/js/regionLayer.js.gz +0 -0
  315. package/public/js/routeEditLayer.js +1 -0
  316. package/public/js/routeEditLayer.js.br +0 -0
  317. package/public/js/routeEditLayer.js.gz +0 -0
  318. package/public/js/routeLayer.js +10 -0
  319. package/public/js/routeLayer.js.br +0 -0
  320. package/public/js/routeLayer.js.gz +0 -0
  321. package/public/js/searchBoxJs.js +1 -0
  322. package/public/js/searchBoxJs.js.br +0 -0
  323. package/public/js/trackRuns.js +1 -0
  324. package/public/js/trackRuns.js.br +0 -0
  325. package/public/js/trackRuns.js.gz +0 -0
  326. package/public/js/version.g.js +1 -0
  327. package/public/js/visibility.js +1 -0
  328. package/public/js/visibility.js.br +0 -0
  329. package/public/js/visibility.js.gz +0 -0
  330. package/public/js/waypointLayer.js +44 -0
  331. package/public/js/waypointLayer.js.br +0 -0
  332. package/public/js/waypointLayer.js.gz +0 -0
  333. package/public/js/weatherLayer.js +1 -0
  334. package/public/js/weatherLayer.js.br +0 -0
  335. package/public/js/weatherLayer.js.gz +0 -0
  336. package/public/lib/bootstrap/dist/css/bootstrap-grid.css +4085 -0
  337. package/public/lib/bootstrap/dist/css/bootstrap-grid.css.br +0 -0
  338. package/public/lib/bootstrap/dist/css/bootstrap-grid.css.gz +0 -0
  339. package/public/lib/bootstrap/dist/css/bootstrap-grid.css.map +1 -0
  340. package/public/lib/bootstrap/dist/css/bootstrap-grid.css.map.br +0 -0
  341. package/public/lib/bootstrap/dist/css/bootstrap-grid.css.map.gz +0 -0
  342. package/public/lib/bootstrap/dist/css/bootstrap-grid.min.css +6 -0
  343. package/public/lib/bootstrap/dist/css/bootstrap-grid.min.css.br +0 -0
  344. package/public/lib/bootstrap/dist/css/bootstrap-grid.min.css.gz +0 -0
  345. package/public/lib/bootstrap/dist/css/bootstrap-grid.min.css.map +1 -0
  346. package/public/lib/bootstrap/dist/css/bootstrap-grid.min.css.map.br +0 -0
  347. package/public/lib/bootstrap/dist/css/bootstrap-grid.min.css.map.gz +0 -0
  348. package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.css +4084 -0
  349. package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.br +0 -0
  350. package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.gz +0 -0
  351. package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map +1 -0
  352. package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map.br +0 -0
  353. package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map.gz +0 -0
  354. package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css +6 -0
  355. package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.br +0 -0
  356. package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.gz +0 -0
  357. package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map +1 -0
  358. package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map.br +0 -0
  359. package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map.gz +0 -0
  360. package/public/lib/bootstrap/dist/css/bootstrap-reboot.css +597 -0
  361. package/public/lib/bootstrap/dist/css/bootstrap-reboot.css.br +0 -0
  362. package/public/lib/bootstrap/dist/css/bootstrap-reboot.css.gz +0 -0
  363. package/public/lib/bootstrap/dist/css/bootstrap-reboot.css.map +1 -0
  364. package/public/lib/bootstrap/dist/css/bootstrap-reboot.css.map.br +0 -0
  365. package/public/lib/bootstrap/dist/css/bootstrap-reboot.css.map.gz +0 -0
  366. package/public/lib/bootstrap/dist/css/bootstrap-reboot.min.css +6 -0
  367. package/public/lib/bootstrap/dist/css/bootstrap-reboot.min.css.br +0 -0
  368. package/public/lib/bootstrap/dist/css/bootstrap-reboot.min.css.gz +0 -0
  369. package/public/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map +1 -0
  370. package/public/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map.br +0 -0
  371. package/public/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map.gz +0 -0
  372. package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css +594 -0
  373. package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.br +0 -0
  374. package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.gz +0 -0
  375. package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map +1 -0
  376. package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map.br +0 -0
  377. package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map.gz +0 -0
  378. package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css +6 -0
  379. package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.br +0 -0
  380. package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.gz +0 -0
  381. package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map +1 -0
  382. package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map.br +0 -0
  383. package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map.gz +0 -0
  384. package/public/lib/bootstrap/dist/css/bootstrap-utilities.css +5402 -0
  385. package/public/lib/bootstrap/dist/css/bootstrap-utilities.css.br +0 -0
  386. package/public/lib/bootstrap/dist/css/bootstrap-utilities.css.gz +0 -0
  387. package/public/lib/bootstrap/dist/css/bootstrap-utilities.css.map +1 -0
  388. package/public/lib/bootstrap/dist/css/bootstrap-utilities.css.map.br +0 -0
  389. package/public/lib/bootstrap/dist/css/bootstrap-utilities.css.map.gz +0 -0
  390. package/public/lib/bootstrap/dist/css/bootstrap-utilities.min.css +6 -0
  391. package/public/lib/bootstrap/dist/css/bootstrap-utilities.min.css.br +0 -0
  392. package/public/lib/bootstrap/dist/css/bootstrap-utilities.min.css.gz +0 -0
  393. package/public/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map +1 -0
  394. package/public/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map.br +0 -0
  395. package/public/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map.gz +0 -0
  396. package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css +5393 -0
  397. package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.br +0 -0
  398. package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.gz +0 -0
  399. package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map +1 -0
  400. package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map.br +0 -0
  401. package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map.gz +0 -0
  402. package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css +6 -0
  403. package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.br +0 -0
  404. package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.gz +0 -0
  405. package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map +1 -0
  406. package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map.br +0 -0
  407. package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map.gz +0 -0
  408. package/public/lib/bootstrap/dist/css/bootstrap.css +12057 -0
  409. package/public/lib/bootstrap/dist/css/bootstrap.css.br +0 -0
  410. package/public/lib/bootstrap/dist/css/bootstrap.css.gz +0 -0
  411. package/public/lib/bootstrap/dist/css/bootstrap.css.map +1 -0
  412. package/public/lib/bootstrap/dist/css/bootstrap.css.map.br +0 -0
  413. package/public/lib/bootstrap/dist/css/bootstrap.css.map.gz +0 -0
  414. package/public/lib/bootstrap/dist/css/bootstrap.min.css +6 -0
  415. package/public/lib/bootstrap/dist/css/bootstrap.min.css.br +0 -0
  416. package/public/lib/bootstrap/dist/css/bootstrap.min.css.gz +0 -0
  417. package/public/lib/bootstrap/dist/css/bootstrap.min.css.map +1 -0
  418. package/public/lib/bootstrap/dist/css/bootstrap.min.css.map.br +0 -0
  419. package/public/lib/bootstrap/dist/css/bootstrap.min.css.map.gz +0 -0
  420. package/public/lib/bootstrap/dist/css/bootstrap.rtl.css +12030 -0
  421. package/public/lib/bootstrap/dist/css/bootstrap.rtl.css.br +0 -0
  422. package/public/lib/bootstrap/dist/css/bootstrap.rtl.css.gz +0 -0
  423. package/public/lib/bootstrap/dist/css/bootstrap.rtl.css.map +1 -0
  424. package/public/lib/bootstrap/dist/css/bootstrap.rtl.css.map.br +0 -0
  425. package/public/lib/bootstrap/dist/css/bootstrap.rtl.css.map.gz +0 -0
  426. package/public/lib/bootstrap/dist/css/bootstrap.rtl.min.css +6 -0
  427. package/public/lib/bootstrap/dist/css/bootstrap.rtl.min.css.br +0 -0
  428. package/public/lib/bootstrap/dist/css/bootstrap.rtl.min.css.gz +0 -0
  429. package/public/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map +1 -0
  430. package/public/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map.br +0 -0
  431. package/public/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map.gz +0 -0
  432. package/public/lib/bootstrap/dist/js/bootstrap.bundle.js +6314 -0
  433. package/public/lib/bootstrap/dist/js/bootstrap.bundle.js.br +0 -0
  434. package/public/lib/bootstrap/dist/js/bootstrap.bundle.js.gz +0 -0
  435. package/public/lib/bootstrap/dist/js/bootstrap.bundle.js.map +1 -0
  436. package/public/lib/bootstrap/dist/js/bootstrap.bundle.js.map.br +0 -0
  437. package/public/lib/bootstrap/dist/js/bootstrap.bundle.js.map.gz +0 -0
  438. package/public/lib/bootstrap/dist/js/bootstrap.bundle.min.js +7 -0
  439. package/public/lib/bootstrap/dist/js/bootstrap.bundle.min.js.br +0 -0
  440. package/public/lib/bootstrap/dist/js/bootstrap.bundle.min.js.gz +0 -0
  441. package/public/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map +1 -0
  442. package/public/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map.br +0 -0
  443. package/public/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map.gz +0 -0
  444. package/public/lib/bootstrap/dist/js/bootstrap.esm.js +4447 -0
  445. package/public/lib/bootstrap/dist/js/bootstrap.esm.js.br +0 -0
  446. package/public/lib/bootstrap/dist/js/bootstrap.esm.js.gz +0 -0
  447. package/public/lib/bootstrap/dist/js/bootstrap.esm.js.map +1 -0
  448. package/public/lib/bootstrap/dist/js/bootstrap.esm.js.map.br +0 -0
  449. package/public/lib/bootstrap/dist/js/bootstrap.esm.js.map.gz +0 -0
  450. package/public/lib/bootstrap/dist/js/bootstrap.esm.min.js +7 -0
  451. package/public/lib/bootstrap/dist/js/bootstrap.esm.min.js.br +0 -0
  452. package/public/lib/bootstrap/dist/js/bootstrap.esm.min.js.gz +0 -0
  453. package/public/lib/bootstrap/dist/js/bootstrap.esm.min.js.map +1 -0
  454. package/public/lib/bootstrap/dist/js/bootstrap.esm.min.js.map.br +0 -0
  455. package/public/lib/bootstrap/dist/js/bootstrap.esm.min.js.map.gz +0 -0
  456. package/public/lib/bootstrap/dist/js/bootstrap.js +4494 -0
  457. package/public/lib/bootstrap/dist/js/bootstrap.js.br +0 -0
  458. package/public/lib/bootstrap/dist/js/bootstrap.js.gz +0 -0
  459. package/public/lib/bootstrap/dist/js/bootstrap.js.map +1 -0
  460. package/public/lib/bootstrap/dist/js/bootstrap.js.map.br +0 -0
  461. package/public/lib/bootstrap/dist/js/bootstrap.js.map.gz +0 -0
  462. package/public/lib/bootstrap/dist/js/bootstrap.min.js +7 -0
  463. package/public/lib/bootstrap/dist/js/bootstrap.min.js.br +0 -0
  464. package/public/lib/bootstrap/dist/js/bootstrap.min.js.gz +0 -0
  465. package/public/lib/bootstrap/dist/js/bootstrap.min.js.map +1 -0
  466. package/public/lib/bootstrap/dist/js/bootstrap.min.js.map.br +0 -0
  467. package/public/lib/bootstrap/dist/js/bootstrap.min.js.map.gz +0 -0
  468. package/public/lib/leaflet/dist/images/layers-2x.png +0 -0
  469. package/public/lib/leaflet/dist/images/layers.png +0 -0
  470. package/public/lib/leaflet/dist/images/marker-icon-2x.png +0 -0
  471. package/public/lib/leaflet/dist/images/marker-icon.png +0 -0
  472. package/public/lib/leaflet/dist/images/marker-shadow.png +0 -0
  473. package/public/lib/leaflet/dist/leaflet.css +661 -0
  474. package/public/lib/leaflet/dist/leaflet.css.br +0 -0
  475. package/public/lib/leaflet/dist/leaflet.css.gz +0 -0
  476. package/public/lib/leaflet/dist/leaflet.js +6 -0
  477. package/public/lib/leaflet/dist/leaflet.js.br +0 -0
  478. package/public/lib/leaflet/dist/leaflet.js.gz +0 -0
  479. package/public/manifest.json +30 -0
  480. package/public/manifest.json.br +0 -0
  481. package/public/manifest.json.gz +0 -0
  482. package/public/service-worker.js +1741 -0
@@ -0,0 +1 @@
1
+ let r=null,u=null,a=!1;const s=["pointerdown","keydown","touchstart"],l={capture:!0,passive:!0};function f(){if(!r||r.state==="closed"){const t=window.AudioContext||window.webkitAudioContext;if(!t)return null;r=new t,r.addEventListener("statechange",y)}return r}function y(){r&&r.state!=="running"&&c()}function m(t){if(t.state==="running")return;let n;try{n=t.resume()}catch{c();return}n&&typeof n.then=="function"&&n.then(()=>{t.state!=="running"&&c()},()=>c())}function d(){T();try{const t=f();t&&m(t)}catch{}}function c(){if(!(a||typeof document>"u")){a=!0;for(const t of s)document.addEventListener(t,d,l)}}function T(){if(a){a=!1;for(const t of s)document.removeEventListener(t,d,l)}}c();function p(t,n){const e=f();if(!e)return;m(e);const o=e.createOscillator(),i=e.createGain();o.connect(i),i.connect(e.destination),o.type="square",o.frequency.value=t,i.gain.value=.15,i.gain.setValueAtTime(.15,e.currentTime),i.gain.exponentialRampToValueAtTime(.001,e.currentTime+n/1e3),o.start(e.currentTime),o.stop(e.currentTime+n/1e3)}function v(){p(880,200),setTimeout(()=>p(660,200),250)}export function startAlarm(t){stopAlarm(),v(),u=setInterval(v,t||3e3)}export function stopAlarm(){u&&(clearInterval(u),u=null)}export function isAlarmActive(){return u!==null}
@@ -0,0 +1 @@
1
+ export function triggerFileDownload(a,e){const t=e instanceof Blob?e:new Blob([e],{type:"application/octet-stream"}),o=URL.createObjectURL(t),r=document.createElement("a");r.href=o,r.download=a,document.body.appendChild(r),r.click(),setTimeout(()=>{URL.revokeObjectURL(o),r.remove()},100)}export async function shareOrCopy(a,e){if(typeof navigator.share=="function")try{return await navigator.share({title:a,text:e}),"shared"}catch(t){if(t&&t.name==="AbortError")return"cancelled"}if(navigator.clipboard&&typeof navigator.clipboard.writeText=="function")try{return await navigator.clipboard.writeText(e),"copied"}catch{}return"unavailable"}
@@ -0,0 +1 @@
1
+ let r=null,n=null,c=null;function i(){const e=navigator.userAgent;return/iPad|iPhone|iPod/.test(e)||navigator.maxTouchPoints>1&&/Mac/.test(navigator.platform)}function o(){try{return window.matchMedia("(display-mode: fullscreen), (display-mode: standalone)").matches||window.navigator.standalone===!0}catch{return!1}}function s(){return!!(document.fullscreenElement||document.webkitFullscreenElement)}function a(){return i()?o()||document.documentElement.classList.contains("ios-fullbleed"):s()}function l(){if(r)try{r.invokeMethodAsync("OnFullscreenChanged",a())}catch{}}export function subscribe(e){r=e,document.addEventListener("fullscreenchange",l),document.addEventListener("webkitfullscreenchange",l)}export function unsubscribe(){document.removeEventListener("fullscreenchange",l),document.removeEventListener("webkitfullscreenchange",l),n&&c&&n.removeEventListener("click",c),n=null,c=null,r=null}export function toggle(){if(i()){document.documentElement.classList.toggle("ios-fullbleed"),l();return}if(s()){const e=document.exitFullscreen||document.webkitExitFullscreen;if(e)try{const t=e.call(document);t&&t.catch&&t.catch(()=>{})}catch{}}else{const e=document.documentElement,t=e.requestFullscreen||e.webkitRequestFullscreen;if(t)try{const u=t.call(e);u&&u.catch&&u.catch(()=>{})}catch{}}}export function attachTrigger(e){!e||e===n||(n&&c&&n.removeEventListener("click",c),n=e,c=t=>{t.preventDefault(),toggle()},e.addEventListener("click",c))}export function getState(){return a()}export function isSupported(){return o()?!1:i()?!0:!!document.fullscreenEnabled}
@@ -0,0 +1 @@
1
+ export function setNightMode(e){const t=document.documentElement;for(const o of["soft","amber","red","dusk"])t.classList.remove("night-mode-"+o);t.classList.toggle("night-mode-global",!!e)}export function setTheme(e){const t=document.documentElement,o=["light","dark","system","high-contrast"];for(const d of o)t.classList.remove("theme-"+d);const s=o.includes(e)?e:"system";t.classList.add("theme-"+s);let n;s==="dark"?n="dark":s==="system"?n=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":n="light",t.setAttribute("data-bs-theme",n),m(s)}let i=null,c=null;function m(e){const t=document.documentElement,o=e==="light"||e==="high-contrast",s=e==="system",n=()=>{const d=!!(typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches),l=o||s&&d;t.classList.toggle("theme-effective-light",l)};n(),i&&c&&(i.removeEventListener("change",c),i=null,c=null),s&&typeof window<"u"&&window.matchMedia&&(i=window.matchMedia("(prefers-color-scheme: light)"),c=()=>n(),i.addEventListener("change",c))}
@@ -0,0 +1 @@
1
+ export function isMobile(){try{return window.matchMedia("(max-width: 600px)").matches}catch{return!1}}const s='button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])';export function focusWrapTarget(t,r,n){const i=t.length;if(i===0)return null;const e=t[0],o=t[i-1];return t.includes(r)?n&&r===e?o:!n&&r===o?e:null:n?o:e}const u=new WeakSet;export function attachFocusTrap(t,r=globalThis.document){!t||u.has(t)||(u.add(t),t.addEventListener("keydown",n=>{if(n.key!=="Tab")return;const i=Array.from(t.querySelectorAll(s)),e=focusWrapTarget(i,r.activeElement,n.shiftKey);e!==null&&(n.preventDefault(),e.focus())}))}
@@ -0,0 +1 @@
1
+ let e=null,i=!1,n=!1;async function a(){if("wakeLock"in navigator&&!e)try{e=await navigator.wakeLock.request("screen"),e.addEventListener("release",()=>{e=null})}catch{e=null}}function l(){const t=e;if(e=null,t)try{t.release()}catch{}}export async function setWakeLock(t){i=!!t,i?(await a(),n||(n=!0,document.addEventListener("visibilitychange",()=>{i&&document.visibilityState==="visible"&&a()}))):l()}
@@ -0,0 +1 @@
1
+ import{attachDragGhost as m}from"./dragGhost.js";const f="#a78bfa";let c=null,s=!1,e=null,t=[],a=[],l=null,r=null;export function init(o){c=o}export function isActive(){return s}function y(o){return L.divIcon({className:"edit-wp-icon",html:`<div class="edit-wp-circle edit-poly-circle">${o}</div>`,iconSize:[24,24],iconAnchor:[12,12]})}let p=!1;function x(){p||(p=!0,requestAnimationFrame(()=>{p=!1,u()}))}function u(){e&&(t.length>=3?(r&&(e.removeLayer(r),r=null),l?l.setLatLngs(t):l=L.polygon(t,{color:f,weight:2,fillColor:f,fillOpacity:.18,dashArray:"6,4"}).addTo(e)):t.length===2?(l&&(e.removeLayer(l),l=null),r?r.setLatLngs(t):r=L.polyline(t,{color:f,weight:2,dashArray:"6,4",opacity:.8}).addTo(e)):(l&&(e.removeLayer(l),l=null),r&&(e.removeLayer(r),r=null)))}function h(o,n){m(o,{container:()=>e,color:()=>f,icon:{className:"edit-wp-ghost-icon",html:'<div class="edit-wp-ghost-circle"></div>',size:24},tooltipOffset:-18,onDrag:i=>{t[n]=[i.lat,i.lng],x()}})}export function addPolygonVertexInternal(o,n){const i=t.length;t.push([o,n]);const d=L.marker([o,n],{icon:y(i+1),draggable:!0,zIndexOffset:800}).addTo(e);h(d,i),a.push(d),u()}export function startPolygonEdit(){stopPolygonEdit(),s=!0,e=L.layerGroup().addTo(c)}export function loadPolygonForEdit(o){if(stopPolygonEdit(),s=!0,e=L.layerGroup().addTo(c),!!o)for(const n of o)addPolygonVertexInternal(n[0],n[1])}export function stopPolygonEdit(){s=!1,e&&c&&c.removeLayer(e),e=null,t=[],a=[],l=null,r=null}export function getPolygonEditCoords(){return t}export function undoLastPolygonVertex(){if(t.length===0)return;t.pop();const o=a.pop();o&&e&&e.removeLayer(o),u()}export function removePolygonEditVertex(o){if(!(o<0||o>=t.length)){t.splice(o,1);for(const n of a)e&&e.removeLayer(n);a=[];for(let n=0;n<t.length;n++){const[i,d]=t[n],g=L.marker([i,d],{icon:y(n+1),draggable:!0,zIndexOffset:800}).addTo(e);h(g,n),a.push(g)}u()}}export function dispose(){s=!1,e=null,t=[],a=[],l=null,r=null,c=null}
Binary file
Binary file
@@ -0,0 +1 @@
1
+ const u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},d=/[&<>"']/g;export function esc(t){return t==null?"":String(t).replace(d,i=>u[i])}export function wireDeleteConfirm(t,i,s,l,f){const r=t.getElement();if(!r)return;const e=r.querySelector(i);if(!e||e._wired)return;e._wired=!0;const o=e.textContent;let n=null;const c=()=>{e.classList.remove("confirming"),e.textContent=o,n&&(clearTimeout(n),n=null)};e.addEventListener("click",()=>{if(!e.classList.contains("confirming")){e.classList.add("confirming"),e.textContent="Really?",n=setTimeout(c,3e3);return}c();const a=f();a&&a.invokeMethodAsync(s,l).catch(()=>{})}),t.once("popupclose",c)}export function wireClick(t,i,s,l,f=[],r={}){const e=t.getElement();if(!e)return;const o=e.querySelector(i);!o||o._wired||(o._wired=!0,o.addEventListener("click",async n=>{r.swallow&&(n.preventDefault(),n.stopPropagation()),r.close==="before"&&t._source?.closePopup();const c=s();if(c)try{await c.invokeMethodAsync(l,...f)}catch{}r.close==="after"&&t._source?.closePopup()}))}
Binary file
Binary file
@@ -0,0 +1 @@
1
+ import{decodeRadarMessage as C}from"./radarProtobuf.js";import{rangeRingLabel as X}from"./format.js";const k=(()=>{const s=new Array(256).fill(null),t=(e,n)=>{s[e]=n};t(0,"#00000000");for(let e=1;e<=4;e++)t(e,"#0000c8ff");for(let e=5;e<=9;e++)t(e,"#00c800ff");for(let e=10;e<=15;e++)t(e,"#c80000ff");t(16,"#c8c8c8ff"),t(17,"#c8c800ff"),t(18,"#90d0f0ff");for(let e=19;e<256;e++){const n=Math.min(1,(e-19)/237),i=Math.round(255*(1-.7*n));t(e,`#${i.toString(16).padStart(2,"0").repeat(3)}ff`)}return s})(),o=new Map;let u={lat:null,lon:null,headingRad:0},w=!0,_=4,P=0,b=!1;export function setRangeRingsConfig(s,t){w=!!s;const e=Number(t);_=Number.isFinite(e)?Math.max(1,Math.min(8,Math.round(e))):4;for(const n of o.values()){if(!n.map||typeof n.map.getPanes!="function")continue;const i=n.map.getPanes();if(!(!i||!i.overlayPane))try{n.refreshRangeRings()}catch(a){console.warn("[radar] refreshRangeRings threw; dropping overlay",a);try{n.destroy()}catch{}}}}export function enableRadarOverlay(s,t){if(o.has(t.radarId))return;const e=new B(s.map,t);o.set(t.radarId,e),e.paused=b,e.connect()}export function disableRadarOverlay(s){const t=o.get(s);t&&(t.destroy(),o.delete(s))}export function tearDownAllRadarOverlays(){for(const s of o.values())try{s.destroy()}catch{}o.clear()}export function setRadarUseWireBearing(s){const t=!!s;for(const e of o.values())e.useWireBearing=t}export function setRadarBearingCorrection(s){const t=Number(s);P=Number.isFinite(t)?Math.max(-180,Math.min(180,t)):0;for(const e of o.values())e._updateTotalAlignment()}export function setRadarRange(s,t){const e=o.get(s);e&&e.setRange(t)}export function setBoatState(s,t,e){const n=e??0;if(!(u.lat===s&&u.lon===t&&u.headingRad===n)){u={lat:s,lon:t,headingRad:n};for(const i of o.values())i.onBoatStateChanged()}}export function setRadarPaused(s){b=!!s;for(const t of o.values())b?t.pause():t.resume()}export function getActiveRadarCount(){return o.size}function I(s,t,e){const n=e/111320;return[s+n,t]}function Y(s){const t=X(s/1852);return t?t.replace(/ nm$/,'<span class="radar-ring-label-unit"> nm</span>'):""}class B{constructor(t,e){this.map=t,this.radarId=e.radarId,this.spokeDataUrl=e.spokeDataUrl,this.spokes=e.spokesPerRevolution,this.maxSpokeLen=e.maxSpokeLength,this.range=e.range||1e3,this.opacity=e.opacity??.75,this.useWireBearing=!!e.useWireBearing,this.totalAlignmentSpokes=0,this._updateTotalAlignment(),this.canvasSize=Math.max(1,this.maxSpokeLen>>1),this.canvas=document.createElement("canvas"),this.canvas.width=this.canvasSize,this.canvas.height=this.canvasSize,this.ctx=this.canvas.getContext("2d"),this.ctx.imageSmoothingEnabled=!1,this.imageData=this.ctx.createImageData(this.canvasSize,this.canvasSize),this.imageData32=new Uint32Array(this.imageData.data.buffer,this.imageData.data.byteOffset,this.imageData.data.byteLength/4),this.xLut=new Int16Array(this.spokes*this.maxSpokeLen),this.yLut=new Int16Array(this.spokes*this.maxSpokeLen),this._computeLuts(),this.byteToRgba=new Uint8ClampedArray(256*4),this.byteToRgba32=new Uint32Array(this.byteToRgba.buffer),this._setLegend(e.legend),this.layer=null,this.ws=null,this.lastRange=0,this.destroyed=!1,this.paused=!1,this._retryTimer=null,this._refreshPending=!1,this._paintPending=!1,this._paintDirty={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0},this._zoomActive=!1,this._onZoomStart=()=>{this._zoomActive=!0},this._onZoomEnd=()=>{this._zoomActive=!1},t.on("zoomstart",this._onZoomStart),t.on("zoomend",this._onZoomEnd)}_computeLuts(){const t=(this.canvasSize-1)/2,e=(this.canvasSize-1)/2,n=this.canvasSize/(2*this.maxSpokeLen),i=2*Math.PI/this.spokes;for(let a=0;a<this.spokes;a++){const r=a*i-Math.PI/2,l=Math.cos(r),c=Math.sin(r),g=a*this.maxSpokeLen;for(let h=0;h<this.maxSpokeLen;h++)this.xLut[g+h]=Math.round(t+h*n*l),this.yLut[g+h]=Math.round(e+h*n*c)}}_setLegend(t){if((n=>{for(let i=0;i<256;i++){const a=n[i],r=a?v(a):p;this.byteToRgba[i*4+0]=r[0],this.byteToRgba[i*4+1]=r[1],this.byteToRgba[i*4+2]=r[2],this.byteToRgba[i*4+3]=r[3]}})(k),t&&Array.isArray(t.pixels)){t.pixels.length>256&&console.warn("[radar] legend has",t.pixels.length,"pixels; truncating to 256");for(let n=0;n<t.pixels.length&&n<256;n++){const i=t.pixels[n];if(z(i,n,t)){this.byteToRgba[n*4+0]=0,this.byteToRgba[n*4+1]=0,this.byteToRgba[n*4+2]=0,this.byteToRgba[n*4+3]=0;continue}const a=x(i&&i.color);this.byteToRgba[n*4+0]=a[0],this.byteToRgba[n*4+1]=a[1],this.byteToRgba[n*4+2]=a[2],this.byteToRgba[n*4+3]=a[3]}}}connect(){this._openWebsocket(),this.refreshRangeRings()}pause(){if(this.paused=!0,this._retryTimer&&(clearTimeout(this._retryTimer),this._retryTimer=null),this.ws){try{this.ws.close()}catch{}this.ws=null}}resume(){this.paused&&(this.paused=!1,this._reconnectMs=null,this.ws||this._openWebsocket())}_openWebsocket(){if(this.destroyed||this.paused||this.ws)return;let t;try{t=new WebSocket(this.spokeDataUrl)}catch(e){console.warn("[radar] failed to open spoke WS",this.radarId,e),this._retryLater();return}t.binaryType="arraybuffer",this.ws=t,t.addEventListener("open",()=>{this._reconnectMs=null}),t.addEventListener("message",e=>{this.ws===t&&this._onFrame(e.data)}),t.addEventListener("close",()=>{this.destroyed||this.paused||this.ws!==t||(this.ws=null,this._retryLater())}),t.addEventListener("error",()=>{})}_retryLater(){this._reconnectMs==null&&(this._reconnectMs=3e3);const t=this._reconnectMs;this._reconnectMs=Math.min(t*2,6e4),this._retryTimer=setTimeout(()=>{this._retryTimer=null,this._openWebsocket()},t)}_onFrame(t){if(this.destroyed||this._zoomActive)return;let e;try{e=C(new Uint8Array(t))}catch(r){console.warn("[radar] bad spoke frame",r);return}const n=e.spokes;if(n.length===0)return;const i=n[0].range;i&&i!==this.lastRange&&(this._clearCanvas(),this.lastRange=i,this.range=i,this._scheduleReposition());const a=this._paintDirty;for(const r of n)this._paintSpoke(r,a);a.maxX>=a.minX&&a.maxY>=a.minY&&this._schedulePaint(),this.layer||this._scheduleReposition()}_clearCanvas(){this.imageData32.fill(0),this.ctx.clearRect(0,0,this.canvasSize,this.canvasSize);const t=this._paintDirty;t.minX=1/0,t.minY=1/0,t.maxX=-1/0,t.maxY=-1/0}_schedulePaint(){this._paintPending||(this._paintPending=!0,requestAnimationFrame(()=>{this._paintPending=!1,this._flushPaint()}))}_flushPaint(){if(this.destroyed)return;const t=this._paintDirty;if(t.maxX<t.minX||t.maxY<t.minY)return;const e=t.maxX-t.minX+1,n=t.maxY-t.minY+1;this.ctx.putImageData(this.imageData,0,0,t.minX,t.minY,e,n),t.minX=1/0,t.minY=1/0,t.maxX=-1/0,t.maxY=-1/0}_paintSpoke(t,e){const i=this._spokeIndex(t)*this.maxSpokeLen,a=this.imageData32,r=this.canvasSize,l=this.byteToRgba32,c=this.xLut,g=this.yLut,h=Math.min(t.data.length,this.maxSpokeLen),y=t.data;for(let f=0;f<h;f++){const D=y[f],T=l[D],m=c[i+f],d=g[i+f],R=d*r+m;if(T===0){if(a[R]===0)continue;a[R]=0}else a[R]=T;m<e.minX&&(e.minX=m),m>e.maxX&&(e.maxX=m),d<e.minY&&(e.minY=d),d>e.maxY&&(e.maxY=d)}}_updateTotalAlignment(){this.totalAlignmentSpokes=Math.round(P*this.spokes/360)}_spokeIndex(t){return M(t,u.headingRad,this.spokes,this.useWireBearing,this.totalAlignmentSpokes)}setRange(t){!t||t===this.range||(this._clearCanvas(),this.range=t,this._scheduleReposition(),this.refreshRangeRings())}onBoatStateChanged(){this._scheduleReposition(),this._rangeRings?this._updateRangeRingsCentre():this.refreshRangeRings()}refreshRangeRings(){if(this._rangeRings&&(this._rangeRings.remove(),this._rangeRings=null,this._rangeRingCircles=null,this._rangeRingLabels=null),!w)return;const{lat:t,lon:e}=u;if(t==null||e==null||!this.range)return;const n=L.layerGroup(),i=[],a=[];for(let r=1;r<=_;r++){const l=r/_*this.range,c=r===_,g=L.circle([t,e],{radius:l,color:"#94a3b8",weight:c?2:1,opacity:c?.9:.4,dashArray:c?null:"4,5",fill:!1,interactive:!1,pane:"overlayPane"}).addTo(n);i.push(g);const h=I(t,e,l),y="radar-ring-label"+(c?" radar-ring-label--active":""),f=L.marker(h,{icon:L.divIcon({className:y,html:Y(l),iconSize:[60,18],iconAnchor:[30,18]}),interactive:!1,keyboard:!1,pane:"overlayPane"}).addTo(n);a.push({marker:f,range:l})}n.addTo(this.map),this._rangeRings=n,this._rangeRingCircles=i,this._rangeRingLabels=a}_updateRangeRingsCentre(){if(!this._rangeRingCircles)return;const{lat:t,lon:e}=u;if(!(t==null||e==null)){for(const n of this._rangeRingCircles)n.setLatLng([t,e]);if(this._rangeRingLabels)for(const n of this._rangeRingLabels)n.marker.setLatLng(I(t,e,n.range))}}_scheduleReposition(){this._refreshPending||(this._refreshPending=!0,requestAnimationFrame(()=>{this._refreshPending=!1,this._reposition()}))}_reposition(){if(this.destroyed)return;const{lat:t,lon:e}=u;t==null||e==null||(this._ensureLayer(t,e),this.layer.updateAnchor(t,e,this.range))}_ensureLayer(t,e){this.layer||(this.canvas.style.opacity=String(this.opacity),this.canvas.classList.add("radar-overlay"),this.layer=new E(this.canvas,t,e,this.range),this.layer.addTo(this.map))}destroy(){if(this.destroyed=!0,this._retryTimer&&(clearTimeout(this._retryTimer),this._retryTimer=null),this.ws){try{this.ws.close()}catch{}this.ws=null}this.layer&&(this.layer.remove(),this.layer=null),this._rangeRings&&(this._rangeRings.remove(),this._rangeRings=null,this._rangeRingCircles=null,this._rangeRingLabels=null),this.map&&this._onZoomStart&&(this.map.off("zoomstart",this._onZoomStart),this.map.off("zoomend",this._onZoomEnd),this._onZoomStart=null,this._onZoomEnd=null),this.xLut=null,this.yLut=null,this.imageData=null,this.canvas=null}}const p=[0,0,0,0];function v(s){return typeof s!="string"||s[0]!=="#"?p:s.length===7?[parseInt(s.slice(1,3),16),parseInt(s.slice(3,5),16),parseInt(s.slice(5,7),16),255]:s.length===9?[parseInt(s.slice(1,3),16),parseInt(s.slice(3,5),16),parseInt(s.slice(5,7),16),parseInt(s.slice(7,9),16)]:p}function x(s){return s?typeof s=="string"?v(s):typeof s=="object"?[s.r|0,s.g|0,s.b|0,s.a==null?255:s.a|0]:p:p}function S(s,t){return(s%t+t)%t}function A(s,t){return Math.round(s*t/(2*Math.PI))}function M(s,t,e,n,i=0){return n&&s.bearing!=null?S(s.bearing+i,e):S(s.angle+i+A(t,e),e)}function z(s,t,e){if(!s||s.type!=="normal")return!1;if(typeof e?.mediumReturn=="number"&&t>=1&&t<e.mediumReturn)return!0;const n=x(s.color);return n[2]>n[0]&&n[2]>n[1]}export const _internal={DEFAULT_LEGEND_PIXELS:k,parseHexRgba:v,parseLegendColor:x,shouldSuppressLowReturn:z,wrapSpoke:S,headingToSpokeOffset:A,computeSpokeIndex:M};const E=L.Layer.extend({initialize(s,t,e,n){this._canvas=s,this._anchorLat=t,this._anchorLon=e,this._range=n,s.style.position="absolute",s.style.pointerEvents="none",s.style.imageRendering="pixelated"},onAdd(s){return this._map=s,s.getPanes().overlayPane.appendChild(this._canvas),s.on("zoomend viewreset",this._reset,this),s.on("zoomanim",this._animateZoom,this),this._reset(),this},onRemove(s){return this._canvas.parentNode===s.getPanes().overlayPane&&s.getPanes().overlayPane.removeChild(this._canvas),s.off("zoomend viewreset",this._reset,this),s.off("zoomanim",this._animateZoom,this),this._map=null,this},updateAnchor(s,t,e){this._anchorLat=s,this._anchorLon=t,this._range=e,this._reset()},_reset(){if(!this._map)return;const s=this._geoBounds(),t=this._map.latLngToLayerPoint(s.getNorthWest()),n=this._map.latLngToLayerPoint(s.getSouthEast()).subtract(t);L.DomUtil.setPosition(this._canvas,t),this._canvas.style.width=`${n.x}px`,this._canvas.style.height=`${n.y}px`},_animateZoom(s){const t=this._geoBounds(),e=this._map.getZoomScale(s.zoom),n=this._map._latLngBoundsToNewLayerBounds(t,s.zoom,s.center).min;L.DomUtil.setTransform(this._canvas,n,e)},_geoBounds(){const t=111320*Math.cos(this._anchorLat*Math.PI/180)||1,e=this._range/111320,n=this._range/t;return L.latLngBounds([this._anchorLat-e,this._anchorLon-n],[this._anchorLat+e,this._anchorLon+n])}});
Binary file
Binary file
@@ -0,0 +1 @@
1
+ let u=null;const i=new Uint8Array(0),a=[],h=[];export function decodeRadarMessage(r){const t=(u??=new b(new Uint8Array(1))).reset(r);let e=0;for(;!t.atEnd();){const n=t.varint(),o=n>>>3,s=n&7;if(o===2&&s===2){const d=t.varint(),l=t.offset+d;let f=a[e];f===void 0&&(f={angle:0,bearing:void 0,range:0,data:i,lat:void 0,lon:void 0},a[e]=f),c(t,l,f),e++}else t.skip(s)}h.length=e;for(let n=0;n<e;n++)h[n]=a[n];for(let n=e;n<a.length;n++)a[n].data!==i&&(a[n].data=i);return{spokes:h}}function c(r,t,e){for(e.angle=0,e.bearing=void 0,e.range=0,e.data=i,e.lat=void 0,e.lon=void 0;r.offset<t;){const n=r.varint(),o=n>>>3,s=n&7;switch(o){case 1:e.angle=r.varint();break;case 2:e.bearing=r.varint();break;case 3:e.range=r.varint();break;case 4:r.varint();break;case 5:e.data=r.bytes();break;case 6:e.lat=r.double();break;case 7:e.lon=r.double();break;default:r.skip(s);break}}}class b{constructor(t){this.reset(t)}reset(t){return this.buf=t,this.offset=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this}atEnd(){return this.offset>=this.buf.length}varint(){let t=0,e=0;for(;;){if(this.offset>=this.buf.length)throw new Error("radar: varint ran off end");const n=this.buf[this.offset++];if(e<28?t|=(n&127)<<e:t+=(n&127)*Math.pow(2,e),!(n&128))break;if(e+=7,e>63)throw new Error("radar: varint > 10 bytes")}return t<0?t+4294967296:t}bytes(){const t=this.varint(),e=this.offset,n=e+t;if(n>this.buf.length)throw new Error("radar: bytes len ran off end");return this.offset=n,new Uint8Array(this.buf.buffer,this.buf.byteOffset+e,t)}double(){if(this.offset+8>this.buf.length)throw new Error("radar: double ran off end");const t=this.view.getFloat64(this.offset,!0);return this.offset+=8,t}skip(t){switch(t){case 0:this.varint();break;case 1:if(this.offset+8>this.buf.length)throw new Error("radar: 64-fixed ran off end");this.offset+=8;break;case 2:{const e=this.varint();if(this.offset+e>this.buf.length)throw new Error("radar: skip bytes ran off end");this.offset+=e;break}case 5:if(this.offset+4>this.buf.length)throw new Error("radar: 32-fixed ran off end");this.offset+=4;break;default:throw new Error("radar: unknown wire type "+t)}}}
Binary file
Binary file
@@ -0,0 +1 @@
1
+ export const RANGE_SCALE_NM_LADDER=[.02,.05,.1,.2,.5,1,2,5,10,20,50,100,200,500];export function pickRangeScale(t,r,c){const n=RANGE_SCALE_NM_LADDER[0];if(!(t>0)||!Number.isFinite(t))return{niceNm:n,label:o(n),widthPx:c};let e=n;for(const i of RANGE_SCALE_NM_LADDER)i<=t&&(e=i);const a=Math.round(r*(e/t)),f=Math.min(r,Math.max(c,a));return{niceNm:e,label:o(e),widthPx:f}}function o(t){return t>=1?`${t} nm`:`${t.toFixed(2).replace(/0+$/,"").replace(/\.$/,"")} nm`}
Binary file
Binary file
@@ -0,0 +1,10 @@
1
+ import{MarkerLayer as T}from"./markerLayer.js";import{esc as C,wireClick as E,wireDeleteConfirm as F}from"./popupHelpers.js";import{fitPadding as S}from"./mapRotation.js";const y=new T;let u=null,h=null,$=null,M=null,A=null,c=null;const _="#dc2626",N="rgba(220, 38, 38, 0.20)";function U(e,t,n,o){const i=C(t||"(untitled region)"),f=n?C(n).replace(/\n/g,"<br/>"):"",r=o&&o.isHazard,a=o&&o.createdAt?B(o.createdAt):null,s=o&&typeof o.areaSqM=="number"&&o.areaSqM>0?O(o.areaSqM):null,p=o?z(o):null,l=[];return r&&l.push('<div class="region-popup-meta region-popup-hazard"><span aria-hidden="true">&#9888;</span> Hazard area</div>'),s&&l.push(`<div class="region-popup-meta"><span class="region-popup-k">Area:</span> ${C(s)}</div>`),p&&l.push(`<div class="region-popup-meta"><span class="region-popup-k">Coords:</span> ${C(p)}</div>`),a&&l.push(`<div class="region-popup-meta"><span class="region-popup-k">Created:</span> ${C(a)}</div>`),`
2
+ <div class="region-popup-inner ${r?"region-popup-hazard-bg":""}">
3
+ <div class="region-popup-title">${i}</div>
4
+ ${f?`<div class="region-popup-body">${f}</div>`:""}
5
+ ${l.join("")}
6
+ <div class="region-popup-actions">
7
+ <button class="region-edit-btn" type="button">Edit</button>
8
+ <button class="region-delete-btn" type="button">Delete</button>
9
+ </div>
10
+ </div>`}function O(e){return e<1e4?Math.round(e).toLocaleString("en-GB")+" m\xB2":e<1e6?(e/1e4).toFixed(1)+" ha":(e/1e6).toFixed(2)+" km\xB2"}function z(e){if(typeof e.centerLat=="number"&&typeof e.centerLon=="number"&&typeof e.radiusMeters=="number")return`${e.centerLat.toFixed(5)}, ${e.centerLon.toFixed(5)} r ${Math.round(e.radiusMeters)} m`;if(typeof e.centroidLat=="number"&&typeof e.centroidLon=="number"){const t=e.vertexCount?`, ${e.vertexCount} vertices`:"";return`${e.centroidLat.toFixed(5)}, ${e.centroidLon.toFixed(5)}${t}`}return null}function B(e){const t=new Date(e);if(isNaN(t.getTime()))return null;const n=o=>String(o).padStart(2,"0");return`${t.getUTCFullYear()}-${n(t.getUTCMonth()+1)}-${n(t.getUTCDate())} ${n(t.getUTCHours())}:${n(t.getUTCMinutes())} UTC`}function H(e){if(!Array.isArray(e)||e.length<3)return null;let t=0,n=0,o=0;const i=e.length;for(let r=0;r<i;r++){const[a,s]=e[r],[p,l]=e[(r+1)%i],d=s*p-l*a;t+=d,n+=(s+l)*d,o+=(a+p)*d}if(t===0){let r=0,a=0;for(const[s,p]of e)r+=p,a+=s;return[a/i,r/i]}const f=3*t;return[o/f,n/f]}export function init(e,t){u=e,h=t.colors,$=t.getDotNetRef,M=t.getEditModeFlags,A=t.editModeAddPoint,y.setMap(e)}export function addRegion(e,t,n,o,i,f,r,a,s,p){if(!u||y.has(e)||!Array.isArray(t)||t.length===0)return;const l=L.layerGroup(),d=typeof r=="number"&&typeof a=="number",m=d?[r,a]:H(t[0]),k={isHazard:!!i,areaSqM:f,centerLat:d?r:null,centerLon:d?a:null,radiusMeters:d?s:null,centroidLat:m?m[0]:null,centroidLon:m?m[1]:null,vertexCount:t[0].length,createdAt:p},P=U(e,n,o,k),R=i?_:h.region,D=i?N:h.region;for(const w of t){const v=L.polygon(w,{color:R,fillColor:D,fillOpacity:i?1:.18,weight:i?2.4:1.8,opacity:.92});v.bindPopup(P,{className:"region-popup",maxWidth:280}),v.on("click",x=>{const b=M();if(b.routeEdit||b.polygonEdit||b.measure){L.DomEvent.stopPropagation(x);const g=x.latlng;if(!g)return;b.routeEdit?A("route",g.lat,g.lng):b.polygonEdit?A("polygon",g.lat,g.lng):A("measure",g.lat,g.lng),v.closePopup()}}),v.on("popupopen",x=>{F(x.popup,".region-delete-btn","DeleteRegion",e,$),E(x.popup,".region-edit-btn",$,"EditRegion",[e],{close:"before",swallow:!0})}),l.addLayer(v)}if(i&&m){const w=L.marker(m,{icon:L.divIcon({className:"region-hazard-glyph",html:'<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true" focusable="false"><path d="M8 1.8 L14.4 13 L1.6 13 Z" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round"/><line x1="8" y1="6" x2="8" y2="9.5" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="8" cy="11.4" r="0.95" fill="currentColor"/></svg>',iconSize:[24,24],iconAnchor:[12,12]}),interactive:!1,keyboard:!1,zIndexOffset:200});l.addLayer(w)}l.addTo(u),y.set(e,l)}export function removeRegion(e){y.remove(e)}export function clearRegions(){y.clear()}export function focusRegion(e,t){const n=y.get(e);if(!(!n||!u)){if(Array.isArray(t)&&t.length>0){const o=L.latLngBounds(t);u.fitBounds(o,{padding:S(40),maxZoom:14})}n.eachLayer(o=>(o.openPopup&&o.openPopup(),!1))}}export function setCirclePreview(e,t,n){if(u){if(c){c.setLatLng([e,t]),c.setRadius(n);return}c=L.circle([e,t],{radius:n,color:h.current,fillColor:h.current,fillOpacity:.12,weight:1.6,dashArray:"4,4",interactive:!1}).addTo(u)}}export function clearCirclePreview(){c&&u&&(u.removeLayer(c),c=null)}export function dispose(){if(y.clear(),c&&u)try{u.removeLayer(c)}catch{}c=null,u=null,h=null,$=null,M=null,A=null}
Binary file
Binary file
@@ -0,0 +1 @@
1
+ import{haversineMeters as w,NM_PER_METER as M}from"./geoMath.js";import{attachDragGhost as S}from"./dragGhost.js";let l=null,d=null,x=null,f=!1,o=null,e=[],c=[],a=null,u=null,p=[],g=!1;export function init(t,n){l=t,d=n.colors,x=n.pointToSegmentPixels}export function isActive(){return f}export function consumeSuppressNextMapClick(){return g?(g=!1,!0):!1}function T(t){return L.divIcon({className:"edit-wp-icon",html:`<div class="edit-wp-circle">${t}</div>`,iconSize:[24,24],iconAnchor:[12,12]})}let y=!1;function N(){y||(y=!0,requestAnimationFrame(()=>{y=!1,m()}))}function P(t){return t<1e3?`${t.toFixed(0)} m`:`${(t*M).toFixed(2)} nm`}function C(){if(o)for(const t of p)o.removeLayer(t);p=[]}function I(){if(C(),!(!o||e.length<2))for(let t=1;t<e.length;t++){const n=e[t-1],r=e[t],i=(n[0]+r[0])/2,h=(n[1]+r[1])/2,s=w(n[0],n[1],r[0],r[1]),E=L.tooltip({permanent:!0,direction:"center",className:"route-edit-leg-tooltip",interactive:!1}).setLatLng([i,h]).setContent(P(s)).addTo(o);p.push(E)}}function m(){if(!a&&e.length>=2){a=L.polyline(e,{color:d.current,weight:2.5,opacity:.8,dashArray:"8,6"}).addTo(o),u=L.polyline(e,{color:d.current,weight:40,opacity:0,interactive:!0,className:"route-edit-hit-line"}).addTo(o);const t=n=>{L.DomEvent.stopPropagation(n),A(n.latlng)};u.on("click",t),a.on("click",t)}else a&&(a.setLatLngs(e),u&&u.setLatLngs(e));I()}function A(t){if(e.length<2||!l)return;const n=l.latLngToLayerPoint(t);let r=0,i=1/0;for(let s=0;s<e.length-1;s++){const E=l.latLngToLayerPoint(L.latLng(e[s][0],e[s][1])),R=l.latLngToLayerPoint(L.latLng(e[s+1][0],e[s+1][1])),k=x(n,E,R);k<i&&(i=k,r=s)}const h=r+1;e.splice(h,0,[t.lat,t.lng]),g=!0,v()}function v(){if(o){for(const t of c)o.removeLayer(t);c=[];for(let t=0;t<e.length;t++){const[n,r]=e[t],i=L.marker([n,r],{icon:T(t+1),draggable:!0,zIndexOffset:800}).addTo(o);b(i,t),c.push(i)}m()}}function b(t,n){S(t,{container:()=>o,color:()=>d.current,icon:{className:"edit-wp-ghost-icon",html:'<div class="edit-wp-ghost-circle"></div>',size:24},tooltipOffset:-18,onDrag:r=>{e[n]=[r.lat,r.lng],N()}})}export function addEditWaypoint(t,n){const r=e.length;e.push([t,n]);const i=L.marker([t,n],{icon:T(r+1),draggable:!0,zIndexOffset:800}).addTo(o);b(i,r),c.push(i),m()}export function startRouteEdit(){stopRouteEdit(),f=!0,o=L.layerGroup().addTo(l)}export function stopRouteEdit(){f=!1,o&&l&&l.removeLayer(o),o=null,e=[],c=[],a=null,u=null,p=[]}export function getEditRouteCoords(){return e}export function reverseEditRoute(){e.length<2||(e.reverse(),v(),m())}export function removeRouteEditWaypoint(t){t<0||t>=e.length||(e.splice(t,1),e.length<2&&a&&o&&(o.removeLayer(a),u&&o.removeLayer(u),a=null,u=null),v())}export function loadRouteForEdit(t){stopRouteEdit(),f=!0,o=L.layerGroup().addTo(l);for(const n of t)addEditWaypoint(n[0],n[1])}export function dispose(){f=!1,o=null,e=[],c=[],a=null,u=null,p=[],g=!1,l=null,d=null,x=null}
Binary file
Binary file
@@ -0,0 +1,10 @@
1
+ import{MarkerLayer as A}from"./markerLayer.js";import{esc as P,wireClick as R,wireDeleteConfirm as C}from"./popupHelpers.js";import*as T from"./measureLayer.js";import{addEditWaypoint as k,isActive as $}from"./routeEditLayer.js";import{addPolygonVertexInternal as D,isActive as w}from"./polygonEditLayer.js";const a=new A;let c=null,u=null,g=null;export function init(t,n){c=t,u=n.colors,g=n.getDotNetRef,a.setMap(t)}export function dispose(){a.clear(),c=null,u=null,g=null}export function addRoute(t,n,o,i){if(!c||a.has(t))return;const l=L.polyline(o,{color:u.route,weight:2.5,opacity:.8}).addTo(c),p=L.polyline(o,{color:u.route,weight:36,opacity:0,interactive:!0}).addTo(c),y=typeof i=="number"&&isFinite(i)?i:0,f={className:"route-popup",maxWidth:320,autoClose:!0},m=()=>x(t,n,o.length,y);l.bindPopup(m(),f),p.bindPopup(m(),f);const v=(e,h)=>{if($()||w()||T.isActive()){L.DomEvent.stopPropagation(e);const s=e.latlng;if(!s)return;T.isActive()?T.addMeasurePoint(s.lat,s.lng):$()?k(s.lat,s.lng):w()&&D(s.lat,s.lng),h.closePopup()}};l.on("click",e=>v(e,l)),p.on("click",e=>v(e,p));const d=e=>{R(e.popup,".route-activate-btn",g,"ActivateRouteById",[t],{close:"after"}),R(e.popup,".route-edit-btn",g,"EditRouteById",[t],{close:"before"}),C(e.popup,".route-delete-btn","DeleteRouteById",t,g)};l.on("popupopen",d),p.on("popupopen",d);const b=L.layerGroup([l,p]).addTo(c),r=n?P(n):"";for(let e=0;e<o.length;e++){const h=L.circleMarker(o[e],{radius:4,color:u.route,fillColor:u.route,fillOpacity:1,weight:1});h.bindTooltip(r?`${r} [${e+1}]`:`WPT ${e+1}`,{className:"bearing-tooltip"}),h.addTo(b)}a.set(t,b)}function x(t,n,o,i){return`
2
+ <div class="route-popup-body">
3
+ <div class="route-popup-title">${P(n||`Route ${t.substring(0,6)}`)}</div>
4
+ <div class="route-popup-meta">${o} WP &middot; ${i.toFixed(1)} nm</div>
5
+ <div class="route-popup-actions">
6
+ <button class="route-activate-btn" type="button">Activate</button>
7
+ <button class="route-edit-btn" type="button">Edit</button>
8
+ <button class="route-delete-btn" type="button">Delete</button>
9
+ </div>
10
+ </div>`}export function removeRoute(t){a.remove(t)}export function updateRoute(t,n,o,i){if(!c)return;const l=a.get(t);if(!l)return addRoute(t,n,o,i);const p=l.getLayers();if(p.length<2)return a.remove(t),addRoute(t,n,o,i);const[y,f,...m]=p;y.setLatLngs(o),f.setLatLngs(o);const v=typeof i=="number"&&isFinite(i)?i:0,d=x(t,n,o.length,v);y.setPopupContent(d),f.setPopupContent(d);for(const r of m)l.removeLayer(r);const b=n?P(n):"";for(let r=0;r<o.length;r++){const e=L.circleMarker(o[r],{radius:4,color:u.route,fillColor:u.route,fillOpacity:1,weight:1});e.bindTooltip(b?`${b} [${r+1}]`:`WPT ${r+1}`,{className:"bearing-tooltip"}),e.addTo(l)}}
Binary file
Binary file
@@ -0,0 +1 @@
1
+ export function setValue(t,u){t&&(t.value=u??"")}export function focus(t){if(t)try{t.focus()}catch{}}
Binary file
@@ -0,0 +1 @@
1
+ export class TrackRuns{constructor(s,t,e){this.createLine=s,this.removeLine=t,this.maxSegments=e,this.runs=[],this.segmentCount=0}reset(){this.runs=[],this.segmentCount=0}seed(s){this.reset();for(const t of s)t.coords&&t.coords.length>=2&&this._start(t.coords,t.bucket);this._trim()}append(s,t,e,i,h){const n=this.runs[this.runs.length-1];n&&n.bucket===e&&n.endLat===i&&n.endLon===h?(n.line.addLatLng([s,t]),n.segments++,n.endLat=s,n.endLon=t,this.segmentCount++):this._start([[i,h],[s,t]],e),this.segmentCount>this.maxSegments&&this._trim()}_start(s,t){const e=s[s.length-1],i={line:this.createLine(s,t),bucket:t,segments:s.length-1,endLat:e[0],endLon:e[1]};this.runs.push(i),this.segmentCount+=i.segments}_trim(){let s=this.segmentCount-this.maxSegments;for(;s>0&&this.runs.length>0;){const t=this.runs[0];if(t.segments<=s)this.removeLine(t.line),this.runs.shift(),this.segmentCount-=t.segments,s-=t.segments;else{const e=t.line.getLatLngs();e.splice(0,s),t.line.setLatLngs(e),t.segments-=s,this.segmentCount-=s,s=0}}}}export function splitTrackRuns(o,s=()=>!0){const t=[];let e=null,i=null;for(const h of o){if(!s(h)){i=null,e=null;continue}const n=[h[0],h[1]];if(i){const r=h[2];(!e||e.bucket!==r)&&(e={bucket:r,latlngs:[i]},t.push(e)),e.latlngs.push(n)}i=n}return t}
Binary file
Binary file
@@ -0,0 +1 @@
1
+ window.OnaPlotterBuild={hash:"c6ed850",utc:"2026-11-17 07:55"};
@@ -0,0 +1 @@
1
+ let s=!1;export function attachVisibilityListener(i,e){s||(s=!0,document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&i&&i.invokeMethodAsync(e).catch(()=>{})}))}let t=null;export function attachVisibilityEdges(i,e,n){detachVisibilityEdges(),t=()=>{const c=document.visibilityState==="visible"?e:n;!c||!i||i.invokeMethodAsync(c).catch(()=>{})},document.addEventListener("visibilitychange",t),document.visibilityState==="hidden"&&n&&i&&i.invokeMethodAsync(n).catch(()=>{})}export function detachVisibilityEdges(){t&&(document.removeEventListener("visibilitychange",t),t=null)}
Binary file
Binary file
@@ -0,0 +1,44 @@
1
+ import{MarkerLayer as O}from"./markerLayer.js";import{esc as u,wireClick as S,wireDeleteConfirm as _}from"./popupHelpers.js";import{latLonDms as $,latDms as x,lonDms as I,mobElapsed as A}from"./format.js";import{haversineMeters as B,bearingDeg as H,NM_PER_METER as F}from"./geoMath.js";const v=new O;let s=null,y=null,m=null,T=null,M=null,N=null;export function init(t,e){s=t,y=e.colors,m=e.getDotNetRef,T=e.getEditModeFlags,M=e.editModeAddPoint,N=e.getOwnMmsi??null,v.setMap(t)}function E(t,e,o,n){const a=t||(e?e.substring(0,8):"Waypoint"),i=$(o,n,", ");return`<div class="wp-tooltip-name">${u(a)}</div><div class="wp-tooltip-coords">${u(i)}</div>`}function D(t){if(!t)return"\u2014";const e=new Date(t);if(Number.isNaN(e.getTime()))return"\u2014";const o=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],n=a=>String(a).padStart(2,"0");return`${o[e.getDay()]} ${e.getFullYear()}-${n(e.getMonth()+1)}-${n(e.getDate())} ${n(e.getHours())}:${n(e.getMinutes())}`}function G(t,e,o,n,a){const i=u(e||t.substring(0,8)),r=$(o,n,", "),l=D(a);return`
2
+ <div class="note-popup-inner waypoint-popup-inner">
3
+ <div class="note-popup-title">${i}</div>
4
+ <div class="note-popup-meta">
5
+ <div><span class="note-popup-meta-label">Coords:</span> <code>${u(r)}</code></div>
6
+ <div><span class="note-popup-meta-label">Created:</span> ${u(l)}</div>
7
+ </div>
8
+ <div class="note-popup-actions">
9
+ <button class="waypoint-go-btn map-btn" type="button"
10
+ title="Navigate to this waypoint">Go</button>
11
+ <button class="waypoint-edit-btn map-btn" type="button"
12
+ title="Edit name + description">Edit</button>
13
+ <button class="waypoint-share-btn map-btn" type="button"
14
+ title="Share this waypoint via system share or copy to clipboard">Share</button>
15
+ <button class="waypoint-delete-btn note-delete-btn" type="button">Delete</button>
16
+ </div>
17
+ </div>`}let R=null,z=null;function q(t){return t?R??=L.divIcon({className:"mob-icon",html:'<div class="mob-pulse"></div>',iconSize:[20,20],iconAnchor:[10,10]}):z??=L.divIcon({className:"mob-icon mob-icon-inactive",html:'<div class="mob-pulse mob-pulse-inactive"></div>',iconSize:[20,20],iconAnchor:[10,10]})}const f=new Map;let d=0,b=0,g=null;function V(){g==null&&(g=setInterval(Y,1e4))}function Z(){g!=null&&(f.size>0||(clearInterval(g),g=null))}function Y(){for(const t of f.values())t.pinLabel&&t.pinLabel.setContent(C(t))}function h(t){return String(t).padStart(2,"0")}function k(t){return t?A((Date.now()-t.getTime())/1e3):""}function C(t){const{lat:e,lon:o,createdAt:n}=t,a=h(n.getHours()),i=h(n.getMinutes()),r=h(n.getSeconds()),l=k(n);return`<strong>MOB ${a}:${i}:${r}</strong> <span class="mob-elapsed">${l}</span><br>`+$(e,o)}function j(t){const{lat:e,lon:o,createdAt:n}=t,a=h(n.getHours()),i=h(n.getMinutes()),r=h(n.getSeconds()),l=k(n),p=N?N():null,c=p?`<tr><td>MMSI</td><td>${u(String(p))}</td></tr>`:"";return`
18
+ <div class="mob-popup-body">
19
+ <div class="mob-popup-title">MOB <span class="mob-popup-elapsed">${l}</span></div>
20
+ <table class="mob-popup-table">
21
+ <tr><td>Time</td><td>${a}:${i}:${r}</td></tr>
22
+ <tr><td>Lat</td><td>${u(x(e))}</td></tr>
23
+ <tr><td>Lon</td><td>${u(I(o))}</td></tr>
24
+ ${c}
25
+ </table>
26
+ <div class="mob-popup-actions">
27
+ <button class="mob-popup-go-btn" type="button" data-ona-mob-go="1">GO</button>
28
+ <button class="mob-popup-share-btn" type="button" data-ona-mob-share="1">Share</button>
29
+ </div>
30
+ </div>`}function J(t,e){return o=>{const n=o.popup.getElement();if(!n)return;const a=n.querySelector("[data-ona-mob-go]"),i=n.querySelector("[data-ona-mob-share]");a&&!a._wired&&(a._wired=!0,a.addEventListener("click",()=>{if(!s)return;const r=Math.max(s.getZoom(),15);s.setView([e.lat,e.lon],r)})),i&&!i._wired&&(i._wired=!0,i.addEventListener("click",()=>{const r=m?m():null;r&&r.invokeMethodAsync("WaypointShare",t).catch(()=>{})}))}}function K(t){if(t){const e=new Date(t);if(!Number.isNaN(e.getTime()))return e}return new Date}function Q(t,e,o,n,a){const i={lat:e,lon:o,createdAt:K(n),circle:null,line:null,midLabel:null,pinLabel:null,marker:a};i.circle=L.circle([e,o],{radius:50,color:y.mob,fillColor:y.mob,fillOpacity:.15,weight:2}).addTo(s),i.line=L.polyline([[d,b],[e,o]],{color:y.mob,weight:2,dashArray:"4,4"}).addTo(s),i.midLabel=L.tooltip({permanent:!0,direction:"center",className:"mob-tooltip"}).setLatLng([(d+e)/2,(b+o)/2]).setContent("MOB").addTo(s),i.pinLabel=L.tooltip({permanent:!0,direction:"right",offset:[12,0],className:"mob-point-label"}).setLatLng([e,o]).setContent(C(i)).addTo(s),a.bindPopup(()=>j(i),{className:"mob-popup",maxWidth:280,autoPan:!0,autoPanPadding:[24,24],keepInView:!0}),a.on("popupopen",J(t,i)),f.set(t,i),V(),(d!==0||b!==0)&&P(i)}function P(t){const e=B(d,b,t.lat,t.lon)*F,o=H(d,b,t.lat,t.lon);t.line&&t.line.setLatLngs([[d,b],[t.lat,t.lon]]),t.midLabel&&(t.midLabel.setLatLng([(d+t.lat)/2,(b+t.lon)/2]),t.midLabel.setContent(`${o.toFixed(0)}&deg; / ${e.toFixed(2)} nm`))}function U(t){const e=f.get(t);e&&(s&&(e.circle&&s.removeLayer(e.circle),e.line&&s.removeLayer(e.line),e.midLabel&&s.removeLayer(e.midLabel),e.pinLabel&&s.removeLayer(e.pinLabel)),f.delete(t),Z())}export function setBoatPosition(t,e){if(d=t,b=e,f.size!==0)for(const o of f.values())P(o)}export function addWaypointMarker(t,e,o,n,a,i,r){if(!s||v.has(t))return;if(i){const w=L.marker([e,o],{icon:q(!!r),zIndexOffset:2e3});w.bindTooltip(E(n,t,e,o),{permanent:!1,direction:"right",offset:[10,0],className:"bearing-tooltip"}),r?Q(t,e,o,a,w):W(w,t,e,o,n,a,!0),w.addTo(s),v.set(t,w);return}const l=L.circleMarker([e,o],{radius:6,color:y.waypoint,fillColor:y.waypoint,fillOpacity:1,weight:2,interactive:!1}),p=L.circleMarker([e,o],{radius:22,opacity:0,fillOpacity:0,weight:0,interactive:!0});W(p,t,e,o,n,a,!1);const c=L.layerGroup([l,p]).addTo(s);v.set(t,c)}function W(t,e,o,n,a,i,r){if(t.bindTooltip(E(a,e,o,n),{permanent:!1,direction:"right",offset:[10,0],className:"bearing-tooltip"}),r){const l=u(a||e.substring(0,8)),p=$(o,n,", "),c=D(i);t.bindPopup(`
31
+ <div class="note-popup-inner waypoint-popup-inner">
32
+ <div class="note-popup-title">${l}</div>
33
+ <div class="note-popup-meta">
34
+ <div><span class="note-popup-meta-label">Coords:</span> <code>${u(p)}</code></div>
35
+ <div><span class="note-popup-meta-label">Created:</span> ${u(c)}</div>
36
+ <div><span class="note-popup-meta-label">Status:</span> <em>cleared MOB</em></div>
37
+ </div>
38
+ <div class="note-popup-actions">
39
+ <button class="waypoint-go-btn map-btn" type="button"
40
+ title="Navigate to this waypoint">Go</button>
41
+ <button class="waypoint-share-btn map-btn" type="button"
42
+ title="Share this waypoint via system share or copy to clipboard">Share</button>
43
+ </div>
44
+ </div>`,{className:"note-popup",maxWidth:320,autoClose:!0,closeButton:!1})}else t.bindPopup(G(e,a,o,n,i),{className:"note-popup",maxWidth:320,autoClose:!0,closeButton:!1});t.on("click",l=>{const p=T();if(p.routeEdit||p.polygonEdit||p.measure){L.DomEvent.stopPropagation(l);const c=l.latlng||t.getLatLng();p.routeEdit?M("route",c.lat,c.lng):p.polygonEdit?M("polygon",c.lat,c.lng):M("measure",c.lat,c.lng),t.closePopup()}}),t.on("popupopen",l=>{S(l.popup,".waypoint-go-btn",m,"WaypointGoTo",[e]),S(l.popup,".waypoint-share-btn",m,"WaypointShare",[e]),r||(S(l.popup,".waypoint-edit-btn",m,"WaypointEdit",[e]),_(l.popup,".waypoint-delete-btn","DeleteWaypoint",e,m))})}export function removeWaypointMarker(t){s&&(U(t),v.remove(t))}export function dispose(){g!=null&&(clearInterval(g),g=null),f.clear(),d=0,b=0,v.clear(),s=null,y=null,m=null,T=null,M=null,N=null}
Binary file
Binary file
@@ -0,0 +1 @@
1
+ const o=.5;let r=null,t=null,a=.5;const i="weatherPane";export function init(e){if(r=e,!e.getPane(i)){const n=e.createPane(i);n.style.zIndex="250",n.style.pointerEvents="none"}}export function setWeatherOverlay(e,n){clearWeatherOverlay(),!(!r||!e)&&(typeof n=="number"&&isFinite(n)&&(a=Math.min(.95,Math.max(.05,n))),t=L.tileLayer(e,{maxNativeZoom:12,maxZoom:22,opacity:a,errorTileUrl:"",attribution:"&copy; RainViewer",pane:i}).addTo(r))}export function setWeatherOverlayOpacity(e){typeof e!="number"||!isFinite(e)||(a=Math.min(.95,Math.max(.05,e)),t&&t.setOpacity(a))}export function clearWeatherOverlay(){t&&r&&(r.removeLayer(t),t=null)}export function dispose(){t=null,r=null}
Binary file
Binary file