@signalk/freeboard-sk 3.4.0-beta.0 → 3.4.0-beta.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 (96) hide show
  1. package/package.json +21 -13
  2. package/plugin/alarms/alarms.js +46 -112
  3. package/plugin/alarms/area-schemas.js +57 -0
  4. package/plugin/index.js +20 -38
  5. package/plugin/lib/fetch.js +5 -11
  6. package/plugin/vitest.config.mjs +0 -1
  7. package/public/3rdpartylicenses.txt +256 -251
  8. package/public/assets/features/imported-tracks-1.jpg +0 -0
  9. package/public/assets/features/imported-tracks-2.jpg +0 -0
  10. package/public/assets/features/own-vessel-display-2.jpg +0 -0
  11. package/public/assets/features/own-vessel-display-3.jpg +0 -0
  12. package/public/assets/features/own-vessel-display-4.jpg +0 -0
  13. package/public/assets/features/split-view-1.jpg +0 -0
  14. package/public/assets/features/split-view-2.jpg +0 -0
  15. package/public/assets/features/toolbar-overflow-1.jpg +0 -0
  16. package/public/assets/features/toolbar-overflow-2.jpg +0 -0
  17. package/public/assets/features-corpus.json +1 -1
  18. package/public/assets/help/index.html +72 -62
  19. package/public/assets/img/vessels/ATTRIBUTION.md +9 -0
  20. package/public/assets/img/vessels/self_catamaran.svg +2 -0
  21. package/public/assets/img/vessels/self_monohull.svg +2 -0
  22. package/public/assets/img/vessels/self_powerboat.svg +11 -0
  23. package/public/chunk-26ZBWNUQ.js +1 -0
  24. package/public/{chunk-L4ONBCRR.js → chunk-2DNFYKJI.js} +1 -1
  25. package/public/{chunk-3HO5JDYF.js → chunk-2YSXXOPC.js} +1 -1
  26. package/public/chunk-3D457EZY.js +1 -0
  27. package/public/chunk-3E3U7Z7O.js +1 -0
  28. package/public/chunk-3PBISOLT.js +4 -0
  29. package/public/{chunk-LNU63734.js → chunk-6FLQJLM2.js} +1 -1
  30. package/public/chunk-6W3TVG4T.js +1 -0
  31. package/public/chunk-6XBJQDQZ.js +1 -0
  32. package/public/chunk-7FANVIZX.js +1 -0
  33. package/public/{chunk-AQKT2J2C.js → chunk-7PF3OZ2P.js} +2 -2
  34. package/public/{chunk-MYBGWSLC.js → chunk-A7RX2LBX.js} +7 -7
  35. package/public/chunk-B5DI22LT.js +1 -0
  36. package/public/chunk-BZGM3F3K.js +1 -0
  37. package/public/chunk-CI2BDMX2.js +1 -0
  38. package/public/chunk-CKZDFNLJ.js +1 -0
  39. package/public/{chunk-J6MIIPAV.js → chunk-CSVULD7M.js} +1 -1
  40. package/public/chunk-CZWRDBMY.js +1 -0
  41. package/public/{chunk-QWUBBFQO.js → chunk-EKGFBNKZ.js} +1 -1
  42. package/public/{chunk-X6D4D6EN.js → chunk-EX2EX65O.js} +3 -3
  43. package/public/chunk-FFPCEPCR.js +7 -0
  44. package/public/chunk-FX2SMI5S.js +1 -0
  45. package/public/chunk-GJFI75CP.js +1706 -0
  46. package/public/{chunk-3UKG3D3M.js → chunk-GKG3KTBW.js} +1 -1
  47. package/public/{chunk-45ZTFAA5.js → chunk-I3RHGD62.js} +1 -1
  48. package/public/{chunk-MX5HWKAH.js → chunk-I6KNDLKZ.js} +1 -1
  49. package/public/chunk-IZEHULJO.js +2 -0
  50. package/public/chunk-L766X4HH.js +1 -0
  51. package/public/{chunk-3BUYRM6E.js → chunk-M4EXFQJE.js} +5 -5
  52. package/public/chunk-N6FC7TMF.js +1 -0
  53. package/public/chunk-NUFT6SHL.js +1 -0
  54. package/public/{chunk-ISXARX6U.js → chunk-O2XN7DIT.js} +1 -1
  55. package/public/chunk-ON6WKWFV.js +106 -0
  56. package/public/chunk-P2M2PBKT.js +1 -0
  57. package/public/chunk-PKC2MOZE.js +1 -0
  58. package/public/{chunk-LFAWLMM4.js → chunk-PU65TI55.js} +1 -1
  59. package/public/chunk-RYULE37H.js +1 -0
  60. package/public/{chunk-DD47QU4L.js → chunk-TKZSDI3W.js} +1 -1
  61. package/public/{chunk-62WHV6CJ.js → chunk-UBRYY245.js} +7 -7
  62. package/public/chunk-UIEE3YOF.js +1 -0
  63. package/public/chunk-UXZI7A6H.js +2 -0
  64. package/public/{chunk-T7ZWMXKZ.js → chunk-V44P57GA.js} +1 -1
  65. package/public/chunk-VAE47BFB.js +1 -0
  66. package/public/chunk-VCZ35SJT.js +1 -0
  67. package/public/chunk-VG2HTHDN.js +4402 -0
  68. package/public/chunk-XPTNBYFH.js +1 -0
  69. package/public/{chunk-YZN4NRWW.js → chunk-Z2OUIJPL.js} +1 -1
  70. package/public/{chunk-GVRPUNRX.js → chunk-ZFWDWQNT.js} +1 -1
  71. package/public/chunk-ZHXEZBYI.js +1 -0
  72. package/public/index.html +2 -2
  73. package/public/main-YMAIP3FL.js +358 -0
  74. package/public/{styles-BRU77GKR.css → styles-ADI62PD5.css} +1 -1
  75. package/public/{worker-UJD2XPGR.js → worker-2QCQHBWQ.js} +1 -1
  76. package/public/{worker-W3UMLYIU.js → worker-6BUXF663.js} +6 -6
  77. package/public/worker-CDFJSLG6.js +3 -0
  78. package/public/{worker-E75PSRY4.js → worker-OJDHVISM.js} +1 -1
  79. package/public/assets/img/vessels/self_blur.png +0 -0
  80. package/public/chunk-4YPS6TRI.js +0 -1
  81. package/public/chunk-5GKIE35D.js +0 -1
  82. package/public/chunk-6E2BDKCH.js +0 -106
  83. package/public/chunk-6HBY4BXL.js +0 -1
  84. package/public/chunk-7NFD4L3V.js +0 -1
  85. package/public/chunk-BXGNCKBA.js +0 -1
  86. package/public/chunk-I33LU6L4.js +0 -1
  87. package/public/chunk-KD22K3HF.js +0 -4289
  88. package/public/chunk-NCEQPEJE.js +0 -1
  89. package/public/chunk-NFXFAYGP.js +0 -1
  90. package/public/chunk-QVENIT7C.js +0 -1
  91. package/public/chunk-RG7WQ7O2.js +0 -1709
  92. package/public/chunk-ROVQT3EG.js +0 -1
  93. package/public/chunk-VFDN43NP.js +0 -2
  94. package/public/chunk-YSHHABBQ.js +0 -1
  95. package/public/main-D2JKS7F4.js +0 -468
  96. package/public/worker-PCWM7FLK.js +0 -3
@@ -321,6 +321,9 @@
321
321
  <br />
322
322
  <b>Left menu bar:</b>
323
323
  Provides access to functions that allow you control the map display.
324
+ If the screen is too short for every button, the ones that don't fit
325
+ are listed at the top of the <b>More Actions</b> menu, which moves to
326
+ the bottom of the bar.
324
327
  <ul>
325
328
  <li class="nobullet">
326
329
  <i class="material-icons">menu</i>
@@ -412,7 +415,11 @@
412
415
  </ul>
413
416
  <br />
414
417
  <b>Right menu bar:</b>
415
- Provides access to quick-actions and experiments.
418
+ Provides access to quick-actions and experiments. If the screen is too
419
+ short for every button, a
420
+ <i class="material-icons">more_horiz</i> button at the bottom of the
421
+ bar lists the ones that don't fit. See the Feature Browser →
422
+ <i>Toolbars on Small Screens</i>.
416
423
  <ul>
417
424
  <li class="nobullet">
418
425
  <i class="material-icons">av_timer</i>
@@ -484,6 +491,15 @@
484
491
  dark map backgrounds.
485
492
  </li>
486
493
 
494
+ <li class="nobullet">
495
+ <i class="material-icons">vertical_split</i>
496
+ <b>Split view:</b>
497
+ Opens a second chart beside or below the main one; press again to
498
+ close it. Shown when <b>Enable split view</b> is checked in
499
+ <a href="#settings">Settings</a>. See the Feature Browser →
500
+ <i>Split View</i>.
501
+ </li>
502
+
487
503
  <li class="nobullet">
488
504
  <img src="./img/command-autopilot.svg" />
489
505
  <b>Display Autopilot console:</b>
@@ -502,9 +518,10 @@
502
518
  <hr />
503
519
  <b>Context "Right click" Menu :</b>
504
520
  Click the right mouse button anywhere on the map to display a context
505
- menu. <br />
506
- The options available may vary based on the current application
507
- state.<br />
521
+ menu. On a touch screen, press and hold.<br />
522
+ The options available may vary based on the current application state.
523
+ Plugins can add their own commands at the bottom of the menu. See the
524
+ Feature Browser &rarr; <i>Extension Map Actions</i>.<br />
508
525
  <i
509
526
  >Note:The <b>"Add Note here"</b> option is only available at zoom
510
527
  levels where Notes are visible on the map.
@@ -760,6 +777,10 @@
760
777
  <br />
761
778
  Additionally resources can be exported to a GPX file by selecting the
762
779
  <b><i class="material-icons">save</i> Export</b> menu.
780
+ <br />
781
+ Tracks imported from GPX or GeoJSON files are listed under
782
+ <i class="material-icons">show_chart</i> <b>Tracks</b>. See the
783
+ Feature Browser &rarr; <i>Imported Tracks</i>.
763
784
  <hr />
764
785
  <ul>
765
786
  <li class="nobullet">
@@ -1296,11 +1317,11 @@
1296
1317
  </li>
1297
1318
  <li>
1298
1319
  <b>Time:</b> Click <i class="material-icons">schedule</i> to
1299
- show a time-varying chart (weather radar, satellite) at an
1300
- earlier frame, step or play through its frames, and return to
1301
- its newest frame. Closing the palette returns the chart to its
1302
- newest frame. See the Feature Browser &rarr;
1303
- <i>Time-varying Charts</i>.
1320
+ show a time-varying chart (weather radar, satellite, forecast)
1321
+ at another frame, step or play through its frames, and return
1322
+ to its newest frame (for a forecast, the current hour).
1323
+ Closing the palette does the same. See the Feature Browser
1324
+ &rarr; <i>Time-varying Charts</i>.
1304
1325
  </li>
1305
1326
  <li>
1306
1327
  <b>Cache Tiles:</b> Click
@@ -1466,7 +1487,7 @@
1466
1487
  <h5>GPX File</h5>
1467
1488
  <div>
1468
1489
  <div style="padding-left: 15px">
1469
- Select some or all of the Route and Waypoint resources contained
1490
+ Select some or all of the Waypoints, Routes and Tracks contained
1470
1491
  in the file.<br />
1471
1492
  <ul>
1472
1493
  <li>
@@ -1477,6 +1498,10 @@
1477
1498
  <b>Routes:</b> Click the checkbox to select all Routes or
1478
1499
  expand the list and select the Routes to import.
1479
1500
  </li>
1501
+ <li>
1502
+ <b>Tracks:</b> Click the checkbox to select all Tracks or
1503
+ expand the list and select the Tracks to import.
1504
+ </li>
1480
1505
  </ul>
1481
1506
  After selecting the resources click <b>Load Selected</b> to load
1482
1507
  the resources onto the Signal K server.
@@ -1572,7 +1597,9 @@
1572
1597
  </pre>
1573
1598
  <br />&nbsp;<br />
1574
1599
  <i
1575
- >For Track data see <a href="#resourcepaths">Resource Paths</a></i
1600
+ >A <i>MultiLineString</i> track can carry the time of each point
1601
+ in a <i>coordTimes</i> property. For how tracks are stored and
1602
+ listed, see the Feature Browser &rarr; Imported Tracks.</i
1576
1603
  >
1577
1604
  <br />&nbsp;<br />
1578
1605
  </div>
@@ -2184,6 +2211,12 @@
2184
2211
  <b><i class="material-icons">visibility_off</i></b> icon appears
2185
2212
  at the top right of screen.
2186
2213
  </li>
2214
+ <li>
2215
+ <b>Enable split view</b>: Check this box to show the
2216
+ <i class="material-icons">vertical_split</i>
2217
+ <b>Split view</b> button, which opens a second chart beside or
2218
+ below the main one. See the Feature Browser → <i>Split View</i>.
2219
+ </li>
2187
2220
  </ul>
2188
2221
  <ul>
2189
2222
  <li>
@@ -2421,7 +2454,7 @@
2421
2454
  <b>COURSE:</b><br />
2422
2455
  This section provides settings for course navigation.<br />
2423
2456
 
2424
- <b>Auto-advance to nextpoint on arrival</b>: Check this option to
2457
+ <b>Auto-advance to next point on arrival</b>: Check this option to
2425
2458
  automatically advance to the next route point once the target
2426
2459
  notification has been received.<br />
2427
2460
 
@@ -2430,23 +2463,24 @@
2430
2463
  Choose either:
2431
2464
  <ul>
2432
2465
  <li>
2433
- <b><i>perpendicularPassed</i></b> (advancement occurs immediately
2434
- notification is received.)
2466
+ <b><i>perpendicularPassed</i></b> (the vessel has passed the line
2467
+ through the destination, perpendicular to the leg.)
2435
2468
  </li>
2436
2469
  <li>
2437
- <b><i>arrivalCircleEntered</i></b> (advancement occurs once
2438
- <i>Time to Wait</i> has elapsed after notification has been
2439
- receieved.)
2470
+ <b><i>arrivalCircleEntered</i></b> (the vessel has entered the
2471
+ arrival circle.)
2440
2472
  </li>
2441
2473
  </ul>
2442
- <b>Arrival Circle Radius</b> Distance in meters from the destination
2443
- at which to trigger arrival notification.
2474
+ <b>Arrival Circle</b>: Distance in meters from the destination at
2475
+ which to trigger arrival notification.
2444
2476
  <br />
2445
- <b>Time to Wait</b>: Note: This option is only available when
2446
- <i>arrivalCircleEntered</i> has been selected as the notification
2447
- type.<br />
2448
- Select the period of time to elapse before the destination is set to
2449
- the next route point.<br />
2477
+ <b>Time to wait before advancing</b>: Select the period of time to
2478
+ elapse after the notification is received before the destination is
2479
+ set to the next route point: <b>Immediately</b>, or 1 to 30 seconds
2480
+ (default 5 secs). Available when
2481
+ <i>Auto-advance to next point on arrival</i> is checked. See the
2482
+ Feature Browser &rarr; <i>Following a Route</i> for the arrival
2483
+ countdown and how to cancel an advance.<br />
2450
2484
  <hr />
2451
2485
 
2452
2486
  <b>VESSELS:</b><br />
@@ -2454,8 +2488,12 @@
2454
2488
 
2455
2489
  <ul>
2456
2490
  <li>
2457
- <b>Vessel Icon Size</b>: Select size of your vessel to display on
2458
- the map. <br />
2491
+ <b>Vessel Icon</b>: Select the icon used for your vessel (original
2492
+ red sailboat, sailing monohull, catamaran or powerboat) and its
2493
+ size on the map. <br />
2494
+ <b>Show vessel at actual size when zoomed in</b>: Draw the vessel
2495
+ at its real length and beam when zoomed in closely. See the
2496
+ Feature Browser &rarr; Own Vessel Display.
2459
2497
  </li>
2460
2498
  <li>
2461
2499
  <b>Fixed Location Mode</b>: Select when operating from a fixed
@@ -2680,13 +2718,6 @@
2680
2718
  /><br />
2681
2719
 
2682
2720
  <br />&nbsp;<br />
2683
- Two types of resource layers are supported:
2684
- <ol>
2685
- <li>Tracks</li>
2686
- <li>Resource Sets</li>
2687
- </ol>
2688
-
2689
- <br />
2690
2721
  <ul>
2691
2722
  <li>
2692
2723
  <b>Fetch Radius</b>: When set, will only fetch resource set
@@ -2695,36 +2726,15 @@
2695
2726
  features.
2696
2727
  </li>
2697
2728
  </ul>
2729
+ <i
2730
+ >Note: Tracks are not selected here. Freeboard finds where the
2731
+ server keeps tracks by itself; see the Feature Browser &rarr;
2732
+ Imported Tracks.</i
2733
+ >
2734
+ <br />&nbsp;<br />
2698
2735
 
2699
- <h5>Tracks:</h5>
2700
- The Track data structure supported by Freeboard is generated via the
2701
- <b>Load from GPX</b> functionality.<br />
2702
- What Freeboard requires is that the
2703
- <i>/signalk/v2/api/resources/tracks</i> path is available from which
2704
- to write and retrieve track data.<br />
2705
- This requires the following action:
2706
- <ul>
2707
- <li>
2708
- Configure the
2709
- <b>Resources Provider</b> plugin to serve the <b>tracks</b> path.
2710
- </li>
2711
- <li>Re-start the Signal K server</li>
2712
- <li>
2713
- Once the server has re-started <b>Tracks</b> will appear in the
2714
- list of available resource paths.
2715
- </li>
2716
- <li>
2717
- Select <b>Tracks</b> and this will display the
2718
- <i class="material-icons">show_chart</i> <b>Tracks</b> entry in
2719
- the
2720
- <i class="material-icons">layers</i>
2721
- layers list.
2722
- </li>
2723
- </ul>
2724
- &nbsp;<br />
2725
-
2726
- Data from all other resource paths that you enable in Freeboard
2727
- Settings will be treated as ResourceSets.<br />
2736
+ Data from the resource paths that you enable in Freeboard Settings is
2737
+ treated as ResourceSets.<br />
2728
2738
 
2729
2739
  ResourceSets are a non-standard Signal K resource format that can be
2730
2740
  created to form collections of features that can be displayed in
@@ -0,0 +1,9 @@
1
+ # Own-vessel icon attribution
2
+
3
+ The `self_monohull.svg` and `self_catamaran.svg` outlines are adapted from
4
+ [Hoeken's anchor alarm](https://github.com/hoeken/hoekens-anchor-alarm), which
5
+ is licensed under the Apache License 2.0.
6
+
7
+ `self_powerboat.svg` is original artwork for Freeboard-SK.
8
+
9
+ The original `self.png` red sailboat is unchanged.
@@ -0,0 +1,2 @@
1
+ <?xml version='1.0' encoding='utf-8'?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:ns1="http://www.inkscape.org/namespaces/inkscape" xmlns:ns2="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" width="22.56" height="45.0" viewBox="-1.6074 -2.2472 163.9596 327.0332" version="1.1" id="svg1" xml:space="preserve" ns1:version="1.4 (e7c3feb1, 2024-10-09)" ns2:docname="catamaran.svg" ns1:export-filename="/Users/hoeken/Desktop/anchor alarm/png/catamaran.png" ns1:export-xdpi="81.122627" ns1:export-ydpi="81.122627"><ns2:namedview id="namedview1" pagecolor="#ffffff" bordercolor="#000000" borderopacity="0.25" ns1:showpageshadow="2" ns1:pageopacity="0.0" ns1:pagecheckerboard="0" ns1:deskcolor="#d1d1d1" ns1:document-units="mm" showguides="false" ns1:zoom="1.5017796" ns1:cx="206.08883" ns1:cy="152.81869" ns1:window-width="1512" ns1:window-height="916" ns1:window-x="0" ns1:window-y="38" ns1:window-maximized="0" ns1:current-layer="layer1"><ns1:page x="0" y="0" width="160.74472" height="320.62076" id="page7" margin="0" bleed="0" /></ns2:namedview><defs id="defs1"><ns1:path-effect effect="mirror_symmetry" start_point="78.156114,149.48637" end_point="78.156114,275.08221" center_point="78.156114,212.28429" id="path-effect5" is_visible="true" lpeversion="1.2" lpesatellites="" mode="free" discard_orig_path="false" fuse_paths="true" oposite_fuse="false" split_items="false" split_open="false" link_styles="false" /><ns1:path-effect effect="mirror_symmetry" start_point="101.9678,-5.1469308" end_point="101.9678,300.48561" center_point="101.9678,147.66934" id="path-effect4" is_visible="true" lpeversion="1.2" lpesatellites="" mode="free" discard_orig_path="false" fuse_paths="true" oposite_fuse="false" split_items="false" split_open="false" link_styles="false" /></defs><g ns1:groupmode="layer" id="layer2" ns1:label="Layer 2" style="display:none" transform="translate(1.9685626)" /><g ns1:label="Layer 1" ns1:groupmode="layer" id="layer1" transform="translate(-21.643042,17.46932)"><path style="opacity:1;fill:none;fill-opacity:1;stroke:#7f0000;stroke-width:5;stroke-linecap:round;stroke-dasharray:none;stroke-opacity:1;" d="M 101.95522,78.87848 V -13.937378" id="path2" ns2:nodetypes="cc" /><path style="fill:none;stroke:#7f0000;stroke-width:5;stroke-dasharray:none;stroke-opacity:1;" d="m 49.154211,15.820471 h 73.074479 32.85426" id="path3" ns2:nodetypes="ccc" /><path style="opacity:1;fill:#d32f2f;fill-opacity:1;fill-rule:nonzero;stroke:#7f0000;stroke-width:5;stroke-dasharray:none;stroke-opacity:1;" d="m 44.527344,-5.1308594 c -1.079489,0.09894 -2.191699,3.7050316 -3.232422,10.6015625 -5.036224,33.3734019 -7.978516,55.1757809 -7.978516,55.1757809 0,0 -2.758072,20.59215 -3.847656,30.921875 C 28.242815,103.19075 27.130892,115.47718 26.443359,126.49805 25.755826,137.51892 25.5,157.65234 25.5,157.65234 l -0.945313,37.76172 -0.300781,47.2793 -0.0957,22.74805 c 0,0 -0.655877,27.1066 2.164063,31.82031 1.185748,1.98205 4.42474,2.91587 6.34375,2.99414 6.633208,0.27053 14.855241,0.33395 21.935546,0.0176 4.084134,-0.18248 5.757616,-4.0654 6.144532,-5.6211 1.06604,-4.28627 -0.07441,-13.63577 0.626953,-24.18554 0.09495,-1.428 1.402456,-3.23864 2.832031,-3.22852 11.940382,0.0845 37.763672,-0.0371 37.763672,-0.0371 0,0 25.82134,0.12161 37.76172,0.0371 1.42957,-0.0101 2.73708,1.80052 2.83203,3.22852 0.70136,10.54977 -0.43909,19.89927 0.62695,24.18554 0.38692,1.5557 2.0604,5.43862 6.14453,5.6211 7.08031,0.31637 15.30234,0.25295 21.93555,-0.0176 1.91901,-0.0783 5.158,-1.01209 6.34375,-2.99414 2.81994,-4.71371 2.16406,-31.82031 2.16406,-31.82031 l -0.0957,-22.74805 -0.30078,-47.2793 -0.94531,-37.76172 c 0,0 -0.25583,-20.13342 -0.94336,-31.15429 -0.68754,-11.02087 -1.79946,-23.3073 -3.02539,-34.929691 -1.08959,-10.329725 -3.84766,-30.921875 -3.84766,-30.921875 0,0 -2.94229,-21.802379 -7.97852,-55.1757809 C 160.55918,-8.3223588 158.19578,-8.9532783 156.36523,5.3085937 151.7005,41.651703 146.33789,79.767578 146.33789,79.767578 H 101.96875 57.597656 c 0,0 -5.362612,-38.115875 -10.027344,-74.4589843 -0.915273,-7.130936 -1.96348,-10.5383935 -3.042968,-10.4394531 z" id="path4" ns2:nodetypes="scscccccsssssscccss" ns1:path-effect="#path-effect4" ns1:original-d="m 41.295517,5.47068 c -5.036224,33.373402 -7.978976,55.175252 -7.978976,55.175252 0,0 -2.758402,20.592867 -3.847986,30.922592 -1.225935,11.622386 -2.337265,23.909006 -3.024798,34.929876 -0.687533,11.02087 -0.944051,31.15367 -0.944051,31.15367 l -0.94405,37.76202 -0.300973,47.27983 -0.09666,22.74667 c 0,0 -0.655899,27.10703 2.164041,31.82074 1.185748,1.98205 4.42454,2.91674 6.34355,2.99501 6.633208,0.27053 14.856531,0.33277 21.936836,0.0164 4.084134,-0.18248 5.75764,-4.06421 6.144556,-5.61991 1.06604,-4.28627 -0.07474,-13.63698 0.626624,-24.18675 0.09495,-1.428 1.402578,-3.23699 2.832153,-3.22687 11.940382,0.0845 37.762017,-0.0388 37.762017,-0.0388 V 79.76789 H 57.597426 c 0,0 -5.363227,-38.115457 -10.027958,-74.4585665 C 45.73892,-8.9525486 43.376964,-8.3223819 41.295517,5.47068 Z" /></g><path style="opacity:1;fill:#d32f2f;fill-opacity:1;stroke:#7f0000;stroke-width:5;stroke-dasharray:none;stroke-opacity:1;" d="m 75.642578,149.47461 c -4.659389,0.0142 -14.649467,0.21546 -20.021484,1.59375 -8.926494,2.29026 -21.016835,4.56332 -25.814453,12.43164 -5.38787,8.83636 -7.762903,16.51801 -9.328125,26.94141 -3.36569,22.4134 -1.19428,48.40055 -0.341797,68.9414 0.05686,1.37014 1.461396,2.37615 2.511718,3.25781 1.10544,0.92794 2.512655,1.42913 3.833985,2.00977 2.961938,1.30158 6.043717,2.32551 9.132812,3.28711 4.328622,1.34745 8.733913,2.44731 13.150391,3.4707 4.536316,1.05116 9.081065,2.1438 13.699219,2.74024 5.196803,0.67118 15.691406,0.93359 15.691406,0.93359 0,0 10.494603,-0.26241 15.691406,-0.93359 4.618154,-0.59644 9.162904,-1.68908 13.699224,-2.74024 4.41647,-1.02339 8.82176,-2.12325 13.15039,-3.4707 3.08909,-0.9616 6.16892,-1.98553 9.13085,-3.28711 1.32133,-0.58064 2.7305,-1.08184 3.83594,-2.00977 1.05032,-0.88166 2.45486,-1.88767 2.51172,-3.25781 0.85248,-20.54085 3.02389,-46.528 -0.3418,-68.9414 -1.56522,-10.4234 -3.94025,-18.10505 -9.32812,-26.94141 -4.79762,-7.86832 -16.88796,-10.14138 -25.81445,-12.43164 -7.162694,-1.83772 -22.53516,-1.58203 -22.53516,-1.58203 0,0 -0.960542,-0.0165 -2.513672,-0.0117 z" id="path5" ns1:path-effect="#path-effect5" ns1:original-d="m 20.136292,259.38274 c -0.852483,-20.54085 -3.024397,-46.5278 0.341293,-68.9412 1.565222,-10.4234 3.941141,-18.10523 9.329011,-26.94159 4.797618,-7.86832 16.8874,-10.14124 25.813894,-12.4315 7.16269,-1.83772 22.535624,-1.58208 22.535624,-1.58208 v 125.59584 c 0,0 -10.495288,-0.26338 -15.692091,-0.93456 -4.618154,-0.59644 -9.161935,-1.6885 -13.698251,-2.73966 -4.416478,-1.02339 -8.821699,-2.12277 -13.150321,-3.47022 -3.089095,-0.9616 -6.17023,-1.986 -9.132168,-3.28758 -1.32133,-0.58064 -2.730069,-1.08114 -3.835509,-2.00907 -1.050322,-0.88166 -2.454619,-1.88824 -2.511482,-3.25838 z" ns2:nodetypes="ssssccssssss" transform="translate(1.9685626)" /></svg>
@@ -0,0 +1,2 @@
1
+ <?xml version='1.0' encoding='utf-8'?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:ns1="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:ns2="http://www.inkscape.org/namespaces/inkscape" width="13.0" height="45.0" viewBox="-1.1827 -3.2917 120.6383 417.4498" version="1.1" id="svg1" xml:space="preserve" ns1:docname="sailboat.svg" ns2:version="1.4 (e7c3feb1, 2024-10-09)" ns2:export-filename="/Users/hoeken/Desktop/anchor alarm/png/sailboat.png" ns2:export-xdpi="63.529999" ns2:export-ydpi="63.529999"><ns1:namedview id="namedview1" pagecolor="#ffffff" bordercolor="#000000" borderopacity="0.25" ns2:showpageshadow="2" ns2:pageopacity="0.0" ns2:pagecheckerboard="0" ns2:deskcolor="#d1d1d1" ns2:document-units="mm" ns2:zoom="0.44461178" ns2:cx="228.28905" ns2:cy="900.78586" ns2:window-width="1512" ns2:window-height="916" ns2:window-x="0" ns2:window-y="38" ns2:window-maximized="0" ns2:current-layer="layer1" /><defs id="defs1"><ns2:path-effect effect="mirror_symmetry" start_point="101.86718,-63.18502" end_point="102.29583,340.7398" center_point="102.0815,138.77739" id="path-effect2" is_visible="true" lpeversion="1.2" lpesatellites="" mode="free" discard_orig_path="false" fuse_paths="true" oposite_fuse="false" split_items="false" split_open="false" link_styles="false" /></defs><g ns2:label="Layer 1" ns2:groupmode="layer" id="layer1" transform="translate(-43.00172,66.184188)"><path style="fill:#d32f2f;fill-opacity:1;stroke:#7f0000;stroke-width:5;stroke-linejoin:round;stroke-dasharray:none" d="m 101.86719,-63.115234 -0.57227,0.148437 C 93.388941,-46.012815 90.530768,-39.557699 78.449219,-6.1777344 70.627392,16.501058 64.09974,40.09443 58.748047,63.523437 c -1.548846,6.917532 -2.804273,13.898253 -4.048828,20.876954 -1.347622,7.556639 -2.669431,15.122308 -3.701172,22.728519 -0.9357,6.89817 -1.577194,13.83354 -2.25586,20.76172 -0.713107,7.27976 -1.384022,14.56551 -1.908203,21.86132 -0.44139,6.14347 -0.820387,12.29386 -1.041015,18.44922 -0.225828,6.30044 -0.285896,12.60568 -0.289063,18.91016 -0.0034,6.74782 -0.03197,13.50201 0.289063,20.24219 0.306415,6.43318 1.020362,12.84019 1.5625,19.25781 0.544076,6.44056 1.031981,12.88723 1.697265,19.3164 0.715376,6.91324 1.601263,13.82496 2.466797,20.70313 1.210851,9.62231 4.509766,28.74414 4.509766,28.74414 L 59.5,312.95508 l 0.787109,3.65429 c 0,0 1.181722,4.71863 2.046875,6.98633 0.783774,2.05439 1.726421,4.05752 2.833985,5.95703 0.794696,1.36293 1.685628,2.68093 2.716797,3.875 0.97148,1.12495 2.040104,2.18754 3.240234,3.06446 1.546597,1.13007 3.230388,2.12471 5.03125,2.77734 1.716821,0.62217 3.566478,0.8028 5.376953,1.04102 1.628628,0.2143 3.27437,0.28783 4.916016,0.3457 5.277871,0.18605 15.842141,6e-5 15.845701,0 0.003,6e-5 10.57019,0.16405 15.84766,-0.0332 1.64152,-0.0614 3.28589,-0.13967 4.91406,-0.35743 1.80997,-0.24206 3.66146,-0.42692 5.37695,-1.05273 1.79948,-0.65645 3.4812,-1.65181 5.02539,-2.78516 1.19827,-0.87946 2.26334,-1.94525 3.23243,-3.07226 1.02863,-1.19626 1.91718,-2.51625 2.70898,-3.88086 1.10353,-1.90186 2.0409,-3.90684 2.82031,-5.96289 0.86034,-2.26953 2.03321,-6.99219 2.03321,-6.99219 l 0.77929,-3.6543 3.43164,-17.58984 c 0,0 3.26075,-19.12709 4.45118,-28.75195 0.85093,-6.87999 1.72117,-13.79424 2.42187,-20.70899 0.65164,-6.43056 1.12585,-12.87861 1.65625,-19.32031 0.52852,-6.41876 1.22872,-12.82595 1.52148,-19.25977 0.30673,-6.74084 0.26382,-13.49438 0.2461,-20.24218 -0.0165,-6.30446 -0.0909,-12.61217 -0.33008,-18.91211 -0.23369,-6.15488 -0.62565,-12.3028 -1.08008,-18.44531 -0.53966,-7.29469 -1.22652,-14.57919 -1.95508,-21.85743 -0.69336,-6.92672 -1.34849,-13.85969 -2.29882,-20.75586 -1.04789,-7.603996 -2.38635,-15.166937 -3.75,-22.720699 -1.25937,-6.976044 -2.52828,-13.954911 -4.0918,-20.86914 C 139.85445,40.014044 133.27619,16.435578 125.40625,-6.2265625 113.25388,-39.58081 110.38335,-46.029633 102.44141,-62.966797 Z" id="path1" ns1:nodetypes="cccssssssssssscccssssssscc" ns2:path-effect="#path-effect2" ns2:original-d="m 102.14121,-63.18502 -0.84696,0.218622 C 93.388269,-46.012416 90.530654,-39.557313 78.449105,-6.1773486 70.627278,16.501444 64.099611,40.094558 58.747918,63.523566 c -1.548846,6.917532 -2.803723,13.898848 -4.048278,20.877549 -1.347622,7.556639 -2.669542,15.121978 -3.701283,22.728185 -0.9357,6.89817 -1.576803,13.8337 -2.255469,20.76188 -0.713107,7.27977 -1.384292,14.56489 -1.908473,21.8607 -0.44139,6.14347 -0.820358,12.29322 -1.040986,18.44858 -0.225828,6.30044 -0.285996,12.60676 -0.289163,18.91124 -0.0034,6.74782 -0.03187,13.50121 0.289163,20.24139 0.306415,6.43318 1.019341,12.84061 1.561479,19.25823 0.544076,6.44056 1.032092,12.88689 1.697376,19.31606 0.715376,6.91324 1.601032,13.8259 2.466566,20.70407 1.210851,9.62231 4.510938,28.74277 4.510938,28.74277 l 3.469952,17.58109 0.787327,3.65329 c 0,0 1.181315,4.72018 2.046468,6.98788 0.783774,2.05439 1.72623,4.05726 2.833794,5.95677 0.794696,1.36293 1.686961,2.6807 2.71813,3.87477 0.97148,1.12495 2.038492,2.1882 3.238622,3.06512 1.546597,1.13007 3.230568,2.12333 5.03143,2.77596 1.716821,0.62217 3.567951,0.80278 5.378426,1.041 1.628628,0.2143 3.27412,0.28913 4.915766,0.347 5.27876,0.18608 15.846117,0 15.846117,0 z" /></g></svg>
@@ -0,0 +1,11 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="17" height="45" viewBox="0 0 32 64">
2
+ <title>Powerboat</title>
3
+ <path d="M16 2 C20 10 23 20 23.5 32 L23.5 57 C23.5 60 22 62 19.5 62 L12.5 62 C10 62 8.5 60 8.5 57 L8.5 32 C9 20 12 10 16 2 Z" fill="#d32f2f" stroke="#7f0000" stroke-width="2" stroke-linejoin="round"/>
4
+ <path d="M16 9 C18.5 15 20 23 20.5 33 L20.5 56 C20.5 57.5 20 58 18.5 58 L13.5 58 C12 58 11.5 57.5 11.5 56 L11.5 33 C12 23 13.5 15 16 9 Z" fill="#fff5f5" stroke="#7f0000" stroke-width="1"/>
5
+ <path d="M9.5 31 Q16 28 22.5 31" fill="none" stroke="#7f0000" stroke-width="1.2" stroke-linecap="round"/>
6
+ <path d="M10.5 32 L21.5 32 L20 41 L12 41 Z" fill="#f3f3f3" stroke="#7f0000" stroke-width="1.6" stroke-linejoin="round"/>
7
+ <rect x="10.5" y="44" width="11" height="11" rx="1.5" fill="#ffffff" stroke="#7f0000" stroke-width="1.4"/>
8
+ <rect x="12" y="46.5" width="3.4" height="5" rx="0.8" fill="#e8e8e8" stroke="#7f0000" stroke-width="0.8"/>
9
+ <rect x="16.6" y="46.5" width="3.4" height="5" rx="0.8" fill="#e8e8e8" stroke="#7f0000" stroke-width="0.8"/>
10
+ <path d="M10.5 58 Q16 56 21.5 58" fill="none" stroke="#7f0000" stroke-width="1.2" stroke-linecap="round"/>
11
+ </svg>
@@ -0,0 +1 @@
1
+ import{a as Ie,b as O,c as Ke,d as Ae,e as Be}from"./chunk-7PF3OZ2P.js";import{Ca as Pe,Da as De,Ea as Me,Wb as Ve,g as ee,l as _e,m as ye,n as ke,nb as Re,o as Ce,ob as Ge,p as ve,pb as Oe,qb as Xe,rb as Fe,sa as Ee,sb as We,u as Se,v as G}from"./chunk-VG2HTHDN.js";import{a as be,b as Te,c as we}from"./chunk-O2XN7DIT.js";import"./chunk-CI2BDMX2.js";import{b as ue}from"./chunk-M4EXFQJE.js";import{j as oe,k as re,l as se}from"./chunk-UBRYY245.js";import{a as he,b as ge,d as xe}from"./chunk-A7RX2LBX.js";import{a as fe}from"./chunk-ON6WKWFV.js";import"./chunk-Z2OUIJPL.js";import"./chunk-FX2SMI5S.js";import"./chunk-I3RHGD62.js";import{b as le,i as ce,j as pe,n as de,o as me}from"./chunk-EX2EX65O.js";import{$a as Z,Fa as j,Ga as N,Ja as U,La as z,Na as q,Oa as Q,Wa as Y,Ya as J,bb as te,gb as ie,jb as ae,rb as ne}from"./chunk-GJFI75CP.js";import"./chunk-6W3TVG4T.js";import"./chunk-7FANVIZX.js";import"./chunk-IZEHULJO.js";import"./chunk-RYULE37H.js";import{Db as y,Hb as g,Jb as p,Oa as c,T as B,Tb as E,Wa as v,X as T,Yb as l,Zb as H,_a as $,_b as P,ba as u,bc as D,ca as h,cc as M,d as K,dc as R,nb as f,o as A,ob as _,qb as V,rb as w,sb as S,tb as x,ub as r,vb as s,wb as L}from"./chunk-3PBISOLT.js";import"./chunk-ZHXEZBYI.js";import"./chunk-FFPCEPCR.js";import{g as b}from"./chunk-BZGM3F3K.js";var X=class{gpx;constructor(){this.init()}init(){this.gpx=new Ie,this.gpx.metadata.name="Signal K Resource Export",this.gpx.metadata.desc="Freeboard export of Signal K resources"}toXML(){return this.gpx.toXML()}setRoutes(i,e){if(e)e.forEach(t=>{i[t]&&this.gpx.rte.push(this.packageRoute(t,i[t]))});else for(let t in i)this.gpx.rte.push(this.packageRoute(t,i[t]))}packageRoute(i,e){let t=new Ke;t.extensions=t.extensions??{},t.extensions.signalk={},t.extensions.signalk.uuid=i,e.distance&&(t.extensions.signalk.distance=e.distance),t.name=e.name||null,t.desc=e.description||null,t.cmt=e.feature.properties.cmt||null,t.src=e.feature.properties.src||null,t.number=e.feature.properties.number||null,t.type=e.feature.properties.type||null;for(let a of e.feature.geometry.coordinates){let n=new O;n.lon=a[0],n.lat=a[1],n.ele=a[2]||null,t.rtept.push(n),this.gpx.updateBounds(n)}return t}setWaypoints(i,e){if(e)e.forEach(t=>{i[t]&&this.gpx.wpt.push(this.packageWaypoint(t,i[t]))});else for(let t in i)this.gpx.wpt.push(this.packageWaypoint(t,i[t]))}packageWaypoint(i,e){let t=new O;if(t.extensions=t.extensions||{},t.extensions.signalk={},t.extensions.signalk.uuid=i,t.name=e.name||"",t.desc=e.description||"",t.cmt=e.feature.properties.cmt||null,t.geoidHeight=e.feature.properties.geoidHeight||null,t.src=e.feature.properties.src||null,t.sym=e.feature.properties.sym||null,t.type=e.feature.properties.type||null,e.type==="waypoint"){let a=Se(e.feature.properties.skIcon);a?.gpxType&&(t.type=a.gpxType),a?.gpxSym&&(t.sym=a.gpxSym)}return t.fix=e.feature.properties.fix||null,t.sat=e.feature.properties.sat||null,t.hdop=e.feature.properties.hdop||null,t.vdop=e.feature.properties.vdop||null,t.pdop=e.feature.properties.pdop||null,t.ageOfGpsData=e.feature.properties.ageOfGpsData||null,t.dgpsid=e.feature.properties.dgpsid||null,t.lat=e.feature.geometry.coordinates[1],t.lon=e.feature.geometry.coordinates[0],t.ele=e.feature.geometry.coordinates[2]||null,this.gpx.updateBounds(t),t}setTracks(i,e){if(e)e.forEach(t=>{i[t]&&this.gpx.trk.push(this.packageTrack(t,i[t]))});else for(let t in i)this.gpx.trk.push(this.packageTrack(t,i[t]))}packageTrack(i,e){let t=new Ae;t.extensions=t.extensions||{},t.extensions.signalk={},t.extensions.signalk.uuid=i,t.name=e.feature.properties.name||null,t.desc=e.feature.properties.description||null,t.cmt=e.feature.properties.cmt||null,t.src=e.feature.properties.src||null,t.number=e.feature.properties.number||null,t.type=e.feature.properties.type||null;let a=e.feature.properties.coordTimes;return e.feature.geometry.coordinates.forEach((n,m)=>{let d=new Be;n.forEach((k,He)=>{let C=new O;C.lon=k[0],C.lat=k[1],C.ele=k[2]||null;let I=a?.[m]?.[He];I&&(C.datetime=new Date(I)),d.trkpt.push(C),this.gpx.updateBounds(C)}),t.trkseg.push(d)}),t}};var F=class o{resultSource;result$;sk2gpx=null;hasFSA;signalk=T(G);constructor(){this.resultSource=new K,this.result$=this.resultSource.asObservable(),this.hasFSA="showOpenFilePicker"in window}clear(){this.sk2gpx=null}prepData(i){let e={routes:[],waypoints:[],tracks:[]},t=1;return e.routes=i.routes.map(a=>{let n=a[1];return n.feature.id=a[0],n}),t=1,e.waypoints=i.waypoints.map(a=>{let n=a[1];return n.feature.id=a[0],n.name=n.name??`Wpt: ${t}`,t++,n}),e.tracks=i.tracks,e}saveToFile(i,e){let t=new X;this.sk2gpx=t;let a={},n={},m={};for(let d=0;d<e.rte.selected.length;d++)e.rte.selected[d]&&(a[i.routes[d].feature.id]=i.routes[d]);t.setRoutes(a);for(let d=0;d<e.wpt.selected.length;d++)e.wpt.selected[d]&&(n[i.waypoints[d].feature.id]=i.waypoints[d]);t.setWaypoints(n),(e.trk.tracks??[]).forEach(d=>{let k=this.signalk.uuid;m[k]=We(k,d)}),t.setTracks(m),this.hasFSA?this.fsaSaveFile():this.legacySaveToFile()}gpxXml(){if(!this.sk2gpx)throw new Error("No GPX export to save");return this.sk2gpx.toXML()}legacySaveToFile(){let i=new Blob([this.gpxXml()],{type:"text/xml"}),e=document.createElement("a");e.href=URL.createObjectURL(i),e.download="fb_export.gpx",e.click(),URL.revokeObjectURL(e.href),e.remove(),this.resultSource.next(-1)}fsaSaveFile(){window.showSaveFilePicker({types:[{description:"GPX file",accept:{"text/xml":[".gpx"]}}]}).then(i=>{i.createWritable().then(e=>{let t=new Blob([this.gpxXml()]);e.write(t).then(()=>{e.close(),this.resultSource.next(0)})}).catch(e=>{console.warn(e),this.resultSource.next(1)})}).catch(i=>{i?.name==="SecurityError"?this.legacySaveToFile():this.resultSource.next(-1)})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=B({token:o,factory:o.\u0275fac,providedIn:"root"})};var Ue=(o,i)=>i.context;function ze(o,i){o&1&&L(0,"mat-progress-bar",10)}function qe(o,i){if(o&1){let e=y();r(0,"div",19)(1,"div",20),l(2),s(),r(3,"div",21)(4,"mat-checkbox",22,0),g("change",function(){let a=u(e).$index,n=E(5),m=p(2);return h(m.checkWpt(n.checked,a))}),s()()()}if(o&2){let e=i.$implicit,t=i.$index,a=p(2);c(2),H(e.name),c(2),x("checked",a.selWaypoints[t])}}function Qe(o,i){if(o&1){let e=y();r(0,"div",12)(1,"mat-expansion-panel",13),g("opened",function(){u(e);let a=p();return h(a.display.expand.waypoints=!0)})("closed",function(){u(e);let a=p();return h(a.display.expand.waypoints=!1)}),r(2,"mat-expansion-panel-header",14)(3,"mat-panel-title")(4,"mat-icon",15),l(5,"place"),s(),l(6," \xA0"),r(7,"b"),l(8,"Waypoints:"),s()(),r(9,"mat-panel-description")(10,"div",16)(11,"mat-checkbox",17),g("change",function(a){u(e);let n=p();return h(n.checkWpt(a.checked,-1))})("click",function(a){return a.cancelBubble=!0}),s()()()(),r(12,"div",18),w(13,qe,6,2,"div",19,V),s()()()}if(o&2){let e=p();c(),x("expanded",e.display.expand.waypoints),c(10),x("indeterminate",e.display.someWptChecked)("checked",e.display.allWaypointsChecked)("disabled",e.resData.waypoints.length===0),c(2),S(e.resData.waypoints)}}function Ye(o,i){if(o&1){let e=y();r(0,"div",19)(1,"div",20)(2,"mat-icon",23),l(3,"directions"),s(),l(4),s(),r(5,"div",21)(6,"mat-checkbox",25,1),g("change",function(){let a=u(e).$index,n=E(7),m=p(2);return h(m.checkRte(n.checked,a))}),s()()()}if(o&2){let e=i.$implicit,t=i.$index,a=p(2);c(4),P(" ",e.name," "),c(2),x("checked",a.selRoutes[t])}}function Je(o,i){if(o&1){let e=y();r(0,"div",12)(1,"mat-expansion-panel",13),g("opened",function(){u(e);let a=p();return h(a.display.expand.routes=!0)})("closed",function(){u(e);let a=p();return h(a.display.expand.routes=!1)}),r(2,"mat-expansion-panel-header",14)(3,"mat-panel-title")(4,"mat-icon",23),l(5,"directions"),s(),l(6," \xA0"),r(7,"b"),l(8,"Routes:"),s()(),r(9,"mat-panel-description")(10,"div",16)(11,"mat-checkbox",24),g("change",function(a){u(e);let n=p();return h(n.checkRte(a.checked,-1))})("click",function(a){return a.cancelBubble=!0}),s()()()(),r(12,"div",18),w(13,Ye,8,2,"div",19,V),s()()()}if(o&2){let e=p();c(),x("expanded",e.display.expand.routes),c(10),x("indeterminate",e.display.someRteChecked)("checked",e.display.allRoutesChecked)("disabled",e.resData.routes.length==0),c(2),S(e.resData.routes)}}function Ze(o,i){o&1&&(r(0,"div",30),l(1," Only the positions gathered while Freeboard was open: the server has no recorded track for this vessel. "),s())}function et(o,i){if(o&1){let e=y();r(0,"div",19)(1,"div",20)(2,"mat-icon",26),l(3,"directions_boat"),s(),l(4),s(),r(5,"div",21)(6,"mat-checkbox",29,2),g("change",function(){let a=u(e).$index,n=E(7),m=p(2);return h(m.checkTrk(n.checked,a))}),s()()(),f(8,Ze,2,0,"div",30)}if(o&2){let e=i.$implicit,t=i.$index,a=p(2);c(4),P(" ",e.label," "),c(2),x("checked",a.selTracks[t]),c(2),_(e.tailOnly&&a.trackChoice==="displayed"?8:-1)}}function tt(o,i){o&1&&(r(0,"mat-option",37),l(1,"Track history range"),s())}function it(o,i){o&1&&(r(0,"div",30),l(1,"Choose a From time before the To time."),s())}function at(o,i){if(o&1){let e=y();r(0,"div",39)(1,"mat-form-field")(2,"mat-label"),l(3,"From"),s(),r(4,"input",40),R("ngModelChange",function(a){u(e);let n=p(3);return M(n.customFrom,a)||(n.customFrom=a),h(a)}),s()(),r(5,"mat-form-field")(6,"mat-label"),l(7,"To"),s(),r(8,"input",40),R("ngModelChange",function(a){u(e);let n=p(3);return M(n.customTo,a)||(n.customTo=a),h(a)}),s()()(),f(9,it,2,0,"div",30)}if(o&2){let e=p(3);c(4),D("ngModel",e.customFrom),c(4),D("ngModel",e.customTo),c(),_(e.customInvalid?9:-1)}}function nt(o,i){o&1&&(r(0,"div",30),l(1," Fetched from the server when you save, in the most detail it provides. "),s())}function ot(o,i){if(o&1){let e=y();r(0,"div",28)(1,"mat-form-field",31)(2,"mat-label"),l(3,"Track to export"),s(),r(4,"mat-select",32),R("ngModelChange",function(a){u(e);let n=p(2);return M(n.trackChoice,a)||(n.trackChoice=a),h(a)}),r(5,"mat-option",33),l(6,"As displayed"),s(),r(7,"mat-option",34),l(8,"Last 7 days"),s(),r(9,"mat-option",35),l(10,"Last 30 days"),s(),r(11,"mat-option",36),l(12,"All recorded"),s(),f(13,tt,2,0,"mat-option",37),r(14,"mat-option",38),l(15,"Custom range"),s()()(),f(16,at,10,3)(17,nt,2,0,"div",30),s()}if(o&2){let e=p(2);c(4),D("ngModel",e.trackChoice),c(9),_(e.historyRange?13:-1),c(3),_(e.trackChoice==="custom"?16:e.trackChoice!=="displayed"?17:-1)}}function rt(o,i){if(o&1){let e=y();r(0,"div",12)(1,"mat-expansion-panel",13),g("opened",function(){u(e);let a=p();return h(a.display.expand.tracks=!0)})("closed",function(){u(e);let a=p();return h(a.display.expand.tracks=!1)}),r(2,"mat-expansion-panel-header",14)(3,"mat-panel-title")(4,"mat-icon",26),l(5,"show_chart"),s(),l(6," \xA0"),r(7,"b"),l(8,"Tracks:"),s()(),r(9,"mat-panel-description")(10,"div",16)(11,"mat-checkbox",27),g("change",function(a){u(e);let n=p();return h(n.checkTrk(a.checked,-1))})("click",function(a){return a.cancelBubble=!0}),s()()()(),r(12,"div",18),w(13,et,9,3,null,null,Ue),s(),f(15,ot,18,3,"div",28),s()()}if(o&2){let e=p();c(),x("expanded",e.display.expand.tracks),c(10),x("indeterminate",e.display.someTrkChecked)("checked",e.display.allTracksChecked)("disabled",e.resData.tracks.length==0),c(2),S(e.resData.tracks),c(2),_(e.rangeAvailable?15:-1)}}var st=36e5;function $e(o){let i=new Date(o),e=t=>String(t).padStart(2,"0");return`${i.getFullYear()}-${e(i.getMonth()+1)}-${e(i.getDate())}T${e(i.getHours())}:${e(i.getMinutes())}`}function W(o){let i=o?new Date(o).getTime():NaN;return Number.isFinite(i)?i:null}var Le=class o{constructor(i,e,t,a,n){this.app=i;this.skres=e;this.facade=t;this.dialogRef=a;this.data=n}app;skres;facade;dialogRef;data;resData={routes:[],waypoints:[],tracks:[]};trackChoice="displayed";customFrom="";customTo="";fetching=!1;closed=!1;signalk=T(G);trackHistory=T(Me);selRoutes=[];selWaypoints=[];selTracks=[];display={notValid:!1,allRoutesChecked:!1,allWaypointsChecked:!1,allTracksChecked:!1,someWptChecked:!1,someRteChecked:!1,someTrkChecked:!1,saveRoutesOK:!1,saveWaypointsOK:!1,saveTracksOK:!1,routeViewer:!1,selCount:{routes:0,waypoints:0,tracks:0},expand:{routes:!1,waypoints:!1,tracks:!1}};unsubscribe=[];ngOnInit(){let i=Date.now();this.customFrom=$e(i-24*st),this.customTo=$e(i),this.loadResources(),this.data.initialChoice&&this.rangeAvailable&&(this.data.initialChoice!=="history"||this.historyRange)&&(this.trackChoice=this.data.initialChoice),this.unsubscribe.push(this.facade.result$.subscribe(e=>{this.dialogRef.close(e)}))}ngOnDestroy(){this.closed=!0,this.unsubscribe.forEach(i=>i.unsubscribe()),this.facade.clear()}loadResources(){return b(this,null,function*(){if(this.data.tracksOnly){this.data.waypoints=[],this.parseResourceData();return}this.data.routes.sort((i,e)=>i[1].name.localeCompare(e[1].name));try{this.app.sIsFetching.set(!0);let i=yield this.skres.listFromServer("waypoints");i.sort((e,t)=>e[1].name.localeCompare(t[1].name)),this.data.waypoints=i,this.app.sIsFetching.set(!1)}catch(i){this.app.sIsFetching.set(!1),this.resData.waypoints=[]}this.parseResourceData()})}get rangeAvailable(){return!!this.app.featureFlags().tracksApi}get historyRange(){return this.resData.tracks.some(i=>this.trackHistory.isShown(i.context))?this.trackHistory.range():void 0}chosenRange(){return Re(this.trackChoice,Date.now(),{history:this.historyRange,custom:{from:W(this.customFrom),to:W(this.customTo)}})}get customInvalid(){return this.trackChoice==="custom"&&!Ge({from:W(this.customFrom),to:W(this.customTo)})}get rangeUnusable(){return this.rangeAvailable&&this.trackChoice!=="displayed"&&this.chosenRange()===null}get canSave(){return!this.fetching&&!(this.display.saveTracksOK&&this.rangeUnusable)&&(this.display.saveRoutesOK||this.display.saveWaypointsOK||this.display.saveTracksOK)}save(){return b(this,null,function*(){let i;try{i=yield this.selectedTracks()}catch(e){if(this.closed)return;this.app.showAlert("GPX Save","Unable to fetch the recorded track from the server.");return}i===null||this.closed||this.facade.saveToFile(this.resData,{rte:{selected:this.selRoutes},wpt:{selected:this.selWaypoints},trk:{tracks:i}})})}selectedTracks(){return b(this,null,function*(){let i=this.resData.tracks.filter((n,m)=>this.selTracks[m]);if(i.length===0)return[];let e=this.rangeAvailable?this.chosenRange():null,t=Date.now(),a=[];this.fetching=!0;try{for(let n of i){let m=e===null?n.displayed:yield this.fetchTrack(n.context,e),d=Fe(n.label,m,t);if(!d)return this.app.showAlert("GPX Save",e===null?`There is no track to save for ${n.label}.`:`No track is recorded for ${n.label} in the selected range.`),null;a.push(d)}}finally{this.fetching=!1}return a})}fetchTrack(i,e){return b(this,null,function*(){let t=this.app.trackSource()?.provider,a=this.signalk.api.get(2,`/tracks?${Oe(i,e,t)}`);if(!a)throw new Error("Not connected");let n=yield A(a),m=ee(i,n,t);return{lines:m?.lines??[],times:m?.times??(m?.lines??[]).map(d=>d.map(()=>{}))}})}parseResourceData(){this.display.allRoutesChecked=!1,this.display.saveRoutesOK=!1,this.selRoutes=[],this.display.allWaypointsChecked=!1,this.display.saveWaypointsOK=!1,this.selWaypoints=[],this.display.allTracksChecked=!1,this.display.saveTracksOK=!1,this.selTracks=[],this.display.selCount={routes:0,waypoints:0,tracks:0},this.display.expand={routes:!1,waypoints:!1,tracks:!1},this.display.notValid=!1,this.resData=this.facade.prepData(this.data),this.resData.tracks=this.resData.tracks.filter(i=>this.rangeAvailable||Xe(i.displayed?.lines)),this.resData.routes.forEach(()=>{this.selRoutes.push(!1)}),this.selRoutes.length===1&&(this.selRoutes[0]=!0,this.display.allRoutesChecked=!0,this.display.expand.routes=!0,this.display.saveRoutesOK=!0),this.resData.waypoints.forEach(()=>{this.selWaypoints.push(!1)}),this.resData.tracks.forEach(()=>{this.selTracks.push(!1)}),this.data.tracksOnly&&this.selTracks.length!==0&&(this.checkTrk(!0,-1),this.display.expand.tracks=!0)}checkRte(i,e=-1){let t=0;if(e!==-1){this.selRoutes[e]=i,this.display.saveRoutesOK=i;for(let a of this.selRoutes)a&&t++;this.display.saveRoutesOK=t!==0,this.display.selCount.routes=t,this.display.allRoutesChecked=t===this.selRoutes.length}else{for(let a=0;a<this.selRoutes.length;a++)this.selRoutes[a]=i,this.display.saveRoutesOK=i,this.display.allRoutesChecked=i;this.display.selCount.routes=i?this.selRoutes.length:0}this.display.someRteChecked=!(this.display.allRoutesChecked||t===0)}checkWpt(i,e=-1){let t=0;if(e!==-1){this.selWaypoints[e]=i,this.display.saveWaypointsOK=i;for(let a of this.selWaypoints)a&&t++;this.display.saveWaypointsOK=t!==0,this.display.selCount.waypoints=t,this.display.allWaypointsChecked=t===this.selWaypoints.length}else{for(let a=0;a<this.selWaypoints.length;a++)this.selWaypoints[a]=i,this.display.saveWaypointsOK=i,this.display.allWaypointsChecked=i;this.display.selCount.waypoints=i?this.selWaypoints.length:0}this.display.someWptChecked=!(this.display.allWaypointsChecked||t===0)}checkTrk(i,e=-1){let t=0;if(e!==-1){this.selTracks[e]=i,this.display.saveTracksOK=i;for(let a of this.selTracks)a&&t++;this.display.saveTracksOK=t!==0,this.display.selCount.tracks=t,this.display.allTracksChecked=t===this.selTracks.length}else{for(let a=0;a<this.selTracks.length;a++)this.selTracks[a]=i,this.display.saveTracksOK=i,this.display.allTracksChecked=i;this.display.selCount.tracks=i?this.selTracks.length:0}this.display.someTrkChecked=!(this.display.allTracksChecked||t===0)}static \u0275fac=function(e){return new(e||o)(v(Ve),v(Ee),v(F),v(j),v(N))};static \u0275cmp=$({type:o,selectors:[["gpxsave-dialog"]],decls:19,vars:6,consts:[["wval",""],["rval",""],["tval",""],[1,"gpxsave-dialog"],[2,"background-color","transparent"],[2,"display","flex","width","100%"],["mat-raised-button","","matTooltip","Save selected resources","matTooltipPosition","right",2,"width","85px",3,"click","disabled"],[2,"flex","1 1 auto","text-align","center"],[2,"text-align","right"],["mat-icon-button","",3,"click"],["mode","indeterminate"],["mat-dialog-content","",2,"padding","2px"],[1,"card-group"],[3,"opened","closed","expanded"],[1,"panel-header"],[1,"icon-waypoint"],[1,"panel-description"],["matTooltip","Select all Waypoints","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],[1,"list-container-scrollable"],[1,"item-row"],[1,"name"],[1,"check"],["matTooltip","Select Waypoint","matTooltipPosition","below",3,"change","checked"],[1,"icon-route"],["matTooltip","Select all Routes","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],["matTooltip","Select this Route","matTooltipPosition","below",3,"change","checked"],[1,"icon-track"],["matTooltip","Select all Tracks","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],[1,"track-range"],["matTooltip","Select this Track","matTooltipPosition","below",3,"change","checked"],[1,"track-note"],[1,"track-range-select"],[3,"ngModelChange","ngModel"],["value","displayed"],["value","7d"],["value","30d"],["value","all"],["value","history"],["value","custom"],[1,"track-range-custom"],["matInput","","type","datetime-local",3,"ngModelChange","ngModel"]],template:function(e,t){e&1&&(r(0,"div",3)(1,"mat-toolbar",4)(2,"div",5)(3,"div")(4,"button",6),g("click",function(){return t.save()}),r(5,"mat-icon"),l(6,"save"),s(),l(7,"\xA0Save\xA0 "),s()(),r(8,"div",7),l(9),s(),r(10,"div",8)(11,"button",9),g("click",function(){return t.dialogRef.close(-1)}),r(12,"mat-icon"),l(13,"close"),s()()()()(),f(14,ze,1,0,"mat-progress-bar",10),r(15,"div",11),f(16,Qe,15,4,"div",12),f(17,Je,15,4,"div",12),f(18,rt,16,5,"div",12),s()()),e&2&&(c(4),x("disabled",!t.canSave),c(5),P(" ",t.data.tracksOnly?"Export track to GPX":"Export to GPX"," "),c(5),_(t.fetching?14:-1),c(2),_(t.resData.waypoints.length!==0?16:-1),c(),_(t.resData.routes.length!==0?17:-1),c(),_(t.resData.tracks.length!==0?18:-1))},dependencies:[Te,be,De,Pe,z,U,Q,q,Z,J,Y,oe,pe,ce,le,me,de,ue,ve,_e,ye,Ce,ke,se,re,we,fe,xe,ge,he,ne,te,ie,ae],styles:[".gpxsave-dialog[_ngcontent-%COMP%]{font-family:roboto;position:relative}.dialog-content[_ngcontent-%COMP%]{position:relative;min-height:300px;max-height:400px;width:100%;min-width:240px;overflow-y:auto}.dialog-icon[_ngcontent-%COMP%]{display:none}.card-group[_ngcontent-%COMP%]{padding:5px 5%}.card-group[_ngcontent-%COMP%] .panel-header[_ngcontent-%COMP%]{padding:0 5px}.card-group[_ngcontent-%COMP%] .panel-description[_ngcontent-%COMP%]{text-align:right;width:100%;padding-right:10px}.card-group-title[_ngcontent-%COMP%]{font-weight:700;font-size:10pt;font-family:Arial,Helvetica,sans-serif;padding:10px 0}button[_ngcontent-%COMP%]{min-width:unset;padding:unset}.item-row[_ngcontent-%COMP%]{display:flex;width:100%;padding:2px 0}.item-row[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{flex:1 1 auto;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;text-overflow:ellipsis;line-height:2.5em}.item-row[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{text-align:right;padding-right:15px}.track-note[_ngcontent-%COMP%]{font-size:.85em;opacity:.8;padding:0 15px 4px 30px}.track-range[_ngcontent-%COMP%]{padding:8px 5px 0}.track-range-select[_ngcontent-%COMP%]{width:100%}.track-range-custom[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:0 8px}.track-range-custom[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex:1 1 220px}@media only screen and (min-width:475px){button[_ngcontent-%COMP%]{min-width:inherit;padding:inherit}.dialog-content[_ngcontent-%COMP%]{min-width:400px}.dialog-icon[_ngcontent-%COMP%]{display:inline}}@media only screen and (min-width:800px){.card-group[_ngcontent-%COMP%]{padding:5px 5%}}"]})};export{Le as GPXExportDialog,W as fromLocalInput,$e as toLocalInput};
@@ -1 +1 @@
1
- import{a as b}from"./chunk-DD47QU4L.js";import"./chunk-NCEQPEJE.js";var k=9,E=256,v=257,A=12;function B(i,o,r){let c=o%8,t=Math.floor(o/8),h=8-c,w=o+r-(t+1)*8,l=8*(t+2)-(o+r),g=(t+2)*8-o;if(l=Math.max(0,l),t>=i.length)return console.warn("ran off the end of the buffer before finding EOI_CODE (end on input code)"),v;let u=i[t]&2**(8-c)-1;u<<=r-h;let s=u;if(t+1<i.length){let d=i[t+1]>>>l;d<<=Math.max(0,r-g),s+=d}if(w>8&&t+2<i.length){let d=(t+3)*8-(o+r),n=i[t+2]>>>d;s+=n}return s}function p(i,o){for(let r=o.length-1;r>=0;r--)i.push(o[r]);return i}function C(i){let o=new Uint16Array(4093),r=new Uint8Array(4093);for(let e=0;e<=257;e++)o[e]=4096,r[e]=e;let c=258,t=k,h=0;function w(){c=258,t=k}function l(e){let a=B(e,h,t);return h+=t,a}function g(e,a){return r[c]=a,o[c]=e,c++,c-1}function u(e){let a=[];for(let y=e;y!==4096;y=o[y])a.push(r[y]);return a}let s=[];w();let d=new Uint8Array(i),n=l(d),f;for(;n!==v;){if(n===E){for(w(),n=l(d);n===E;)n=l(d);if(n===v)break;if(n>E)throw new Error(`corrupted code at scanline ${n}`);{let e=u(n);p(s,e),f=n}}else if(n<c){let e=u(n);p(s,e),f!==void 0&&g(f,e[e.length-1]),f=n}else{if(f===void 0)throw new Error(`Invalid LZW code: ${n} with no previous code`);let e=u(f);if(!e)throw new Error(`Bogus entry. Not in dictionary, ${f} / ${c}, position: ${h}`);p(s,e),s.push(e[e.length-1]),g(f,e[e.length-1]),f=n}c+1>=2**t&&(t===A?f=void 0:t++),n=l(d)}return new Uint8Array(s)}var x=class extends b{decodeBlock(o){return C(o).buffer}};export{x as default};
1
+ import{a as b}from"./chunk-TKZSDI3W.js";import"./chunk-BZGM3F3K.js";var k=9,E=256,v=257,A=12;function B(i,o,r){let c=o%8,t=Math.floor(o/8),h=8-c,w=o+r-(t+1)*8,l=8*(t+2)-(o+r),g=(t+2)*8-o;if(l=Math.max(0,l),t>=i.length)return console.warn("ran off the end of the buffer before finding EOI_CODE (end on input code)"),v;let u=i[t]&2**(8-c)-1;u<<=r-h;let s=u;if(t+1<i.length){let d=i[t+1]>>>l;d<<=Math.max(0,r-g),s+=d}if(w>8&&t+2<i.length){let d=(t+3)*8-(o+r),n=i[t+2]>>>d;s+=n}return s}function p(i,o){for(let r=o.length-1;r>=0;r--)i.push(o[r]);return i}function C(i){let o=new Uint16Array(4093),r=new Uint8Array(4093);for(let e=0;e<=257;e++)o[e]=4096,r[e]=e;let c=258,t=k,h=0;function w(){c=258,t=k}function l(e){let a=B(e,h,t);return h+=t,a}function g(e,a){return r[c]=a,o[c]=e,c++,c-1}function u(e){let a=[];for(let y=e;y!==4096;y=o[y])a.push(r[y]);return a}let s=[];w();let d=new Uint8Array(i),n=l(d),f;for(;n!==v;){if(n===E){for(w(),n=l(d);n===E;)n=l(d);if(n===v)break;if(n>E)throw new Error(`corrupted code at scanline ${n}`);{let e=u(n);p(s,e),f=n}}else if(n<c){let e=u(n);p(s,e),f!==void 0&&g(f,e[e.length-1]),f=n}else{if(f===void 0)throw new Error(`Invalid LZW code: ${n} with no previous code`);let e=u(f);if(!e)throw new Error(`Bogus entry. Not in dictionary, ${f} / ${c}, position: ${h}`);p(s,e),s.push(e[e.length-1]),g(f,e[e.length-1]),f=n}c+1>=2**t&&(t===A?f=void 0:t++),n=l(d)}return new Uint8Array(s)}var x=class extends b{decodeBlock(o){return C(o).buffer}};export{x as default};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-64QDJX7X.js";import{a as r}from"./chunk-DD47QU4L.js";import"./chunk-NCEQPEJE.js";var o=class extends r{decodeBlock(t){return e(new Uint8Array(t)).buffer}};export{o as default};
1
+ import{a as e}from"./chunk-64QDJX7X.js";import{a as r}from"./chunk-TKZSDI3W.js";import"./chunk-BZGM3F3K.js";var o=class extends r{decodeBlock(t){return e(new Uint8Array(t)).buffer}};export{o as default};
@@ -0,0 +1 @@
1
+ import{c as y,d as S,e as k,g as E,k as R}from"./chunk-M4EXFQJE.js";import"./chunk-Z2OUIJPL.js";import"./chunk-FX2SMI5S.js";import{$a as h,Fa as b,Ga as I,Ia as L,Ja as C,Ka as w,La as P,Na as W,Oa as v,Ya as T}from"./chunk-GJFI75CP.js";import{d as B}from"./chunk-RYULE37H.js";import{$b as x,Db as M,Hb as c,Jb as _,Oa as l,Wa as r,Yb as o,Zb as D,_a as p,_b as A,ba as s,ca as g,rb as f,sb as u,ub as e,vb as a}from"./chunk-3PBISOLT.js";import"./chunk-BZGM3F3K.js";var F=(n,i)=>i.extension+"/"+i.widget.id;function O(n,i){if(n&1){let t=M();e(0,"button",4),c("click",function(){let m=s(t).$implicit,j=_();return g(j.dialogRef.close(m))}),e(1,"span",5),o(2),a(),e(3,"span",6),o(4),a()()}if(n&2){let t=i.$implicit;l(2),D(t.widget.title),l(2),x("",t.extensionName," \xB7 ",t.widget.size)}}var N=class n{constructor(i,t){this.dialogRef=i;this.data=t;this.anchorLabel=B[t.anchor]}dialogRef;data;anchorLabel;static \u0275fac=function(t){return new(t||n)(r(b),r(I))};static \u0275cmp=p({type:n,selectors:[["fb-plotterext-add-widget"]],decls:12,vars:1,consts:[["mat-dialog-title","",1,"pe-add-title"],["mat-list-item",""],["align","end"],["mat-button","",3,"click"],["mat-list-item","",3,"click"],["matListItemTitle",""],["matListItemLine",""]],template:function(t,d){t&1&&(e(0,"div",0)(1,"mat-icon"),o(2,"widgets"),a(),e(3,"span"),o(4),a()(),e(5,"mat-dialog-content")(6,"mat-action-list"),f(7,O,5,3,"button",1,F),a()(),e(9,"mat-dialog-actions",2)(10,"button",3),c("click",function(){return d.dialogRef.close()}),o(11,"Cancel"),a()()),t&2&&(l(4),A("Add widget \u2014 ",d.anchorLabel),l(3),u(d.data.candidates))},dependencies:[P,L,w,C,h,T,v,W,R,k,E,S,y],styles:[".pe-add-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}"]})};export{N as PlotterAddWidgetDialog};
@@ -0,0 +1 @@
1
+ import{a as i}from"./chunk-CI2BDMX2.js";import{a as t}from"./chunk-ZHXEZBYI.js";import"./chunk-FFPCEPCR.js";import"./chunk-BZGM3F3K.js";var a=t.Object({ids:t.Array(t.String()),visible:t.Boolean()}),o=t.Object({ids:t.Array(t.String()),style:t.Optional(t.Union([t.Literal("normal"),t.Literal("active"),t.Literal("warning"),t.Literal("alarm"),t.Null()])),colors:t.Optional(t.Union([t.Object({fg:t.Optional(t.String({pattern:i})),bg:t.Optional(t.String({pattern:i}))}),t.Null()])),badge:t.Optional(t.Union([t.Integer({minimum:0}),t.Null()]))});export{o as DecorateButtonsParams,a as SetVisibilityParams};