@signalk/freeboard-sk 3.0.0-beta.2 → 3.0.0-beta.4
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.
- package/package.json +2 -2
- package/public/3rdpartylicenses.txt +66 -66
- package/public/assets/img/wind/barbs/weatherStation-10.svg +4 -0
- package/public/assets/img/wind/barbs/weatherStation-15.svg +5 -0
- package/public/assets/img/wind/barbs/weatherStation-20.svg +5 -0
- package/public/assets/img/wind/barbs/weatherStation-25.svg +6 -0
- package/public/assets/img/wind/barbs/weatherStation-30.svg +6 -0
- package/public/assets/img/wind/barbs/weatherStation-35.svg +7 -0
- package/public/assets/img/wind/barbs/weatherStation-40.svg +7 -0
- package/public/assets/img/wind/barbs/weatherStation-45.svg +8 -0
- package/public/assets/img/wind/barbs/weatherStation-5.svg +4 -0
- package/public/assets/img/wind/barbs/weatherStation-50.svg +4 -0
- package/public/assets/img/wind/barbs/weatherStation-55.svg +5 -0
- package/public/assets/img/wind/barbs/weatherStation-60.svg +5 -0
- package/public/assets/img/wind/barbs/weatherStation-65.svg +6 -0
- package/public/assets/img/wind/barbs/weatherStation-70.svg +6 -0
- package/public/assets/img/wind/barbs/weatherStation-75.svg +7 -0
- package/public/{chunk-QNWLXTD7.js → chunk-25YKCA66.js} +1 -1
- package/public/{chunk-T5SYG6YH.js → chunk-2E6LEX6X.js} +1 -1
- package/public/{chunk-DBEAKA2P.js → chunk-5EMYKEQQ.js} +1 -1
- package/public/{chunk-EU3YXT24.js → chunk-6OLNESWL.js} +1 -1
- package/public/chunk-6U267SFF.js +1 -0
- package/public/chunk-74KWRC7R.js +1 -0
- package/public/chunk-CP3JNVJQ.js +3874 -0
- package/public/{chunk-RS6VYSOP.js → chunk-DI2Z6WN4.js} +1 -1
- package/public/{chunk-CSNMIJA3.js → chunk-E3NU2HIR.js} +2 -2
- package/public/chunk-J7PBTBQW.js +1 -0
- package/public/chunk-MDMA57E3.js +1 -0
- package/public/{chunk-2GXI757Z.js → chunk-PD24DQFJ.js} +1 -1
- package/public/{chunk-7OJ7YZPE.js → chunk-PEC6ZGZT.js} +1 -1
- package/public/{chunk-NM5IDVR6.js → chunk-QYCAVSMC.js} +1 -1
- package/public/{chunk-QEISFNRM.js → chunk-W672EMFZ.js} +1 -1
- package/public/{chunk-VVW6IUIY.js → chunk-WILLX6Y3.js} +1 -1
- package/public/{chunk-P5D5HOAL.js → chunk-XKSYGWTR.js} +15 -15
- package/public/index.html +1 -1
- package/public/{main-IO4X75OS.js → main-OEZGVDMV.js} +9 -9
- package/public/worker-4MQD26BS.js +3 -0
- package/public/chunk-4FRHLR6W.js +0 -3871
- package/public/chunk-C5EZE34F.js +0 -1
- package/public/chunk-EQZM5PXA.js +0 -1
- package/public/chunk-ORHNIL4Z.js +0 -1
- package/public/chunk-XP3I253N.js +0 -1
- package/public/worker-5T47RUMR.js +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signalk/freeboard-sk",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.4",
|
|
4
4
|
"description": "Openlayers chart plotter implementation for Signal K",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"signalk-webapp",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@signalk/server-api": "^2.24.0",
|
|
67
67
|
"geolib": "^3.3.3",
|
|
68
68
|
"google-protobuf": "^4.0.1",
|
|
69
|
-
"signalk-plotterext-bus": "^0.
|
|
69
|
+
"signalk-plotterext-bus": "^0.10.0",
|
|
70
70
|
"tslib": "^2.0.0",
|
|
71
71
|
"uuid": "^14.0.1"
|
|
72
72
|
},
|
|
@@ -794,6 +794,72 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
794
794
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
795
795
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
796
796
|
|
|
797
|
+
--------------------------------------------------------------------------------
|
|
798
|
+
Package: @angular/core
|
|
799
|
+
License: "MIT"
|
|
800
|
+
|
|
801
|
+
The MIT License
|
|
802
|
+
|
|
803
|
+
Copyright (c) 2010-2026 Google LLC. https://angular.dev/license
|
|
804
|
+
|
|
805
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
806
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
807
|
+
in the Software without restriction, including without limitation the rights
|
|
808
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
809
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
810
|
+
furnished to do so, subject to the following conditions:
|
|
811
|
+
|
|
812
|
+
The above copyright notice and this permission notice shall be included in
|
|
813
|
+
all copies or substantial portions of the Software.
|
|
814
|
+
|
|
815
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
816
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
817
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
818
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
819
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
820
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
821
|
+
THE SOFTWARE.
|
|
822
|
+
|
|
823
|
+
--------------------------------------------------------------------------------
|
|
824
|
+
Package: uuid
|
|
825
|
+
License: "MIT"
|
|
826
|
+
|
|
827
|
+
The MIT License (MIT)
|
|
828
|
+
|
|
829
|
+
Copyright (c) 2010-2020 Robert Kieffer and other contributors
|
|
830
|
+
|
|
831
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
832
|
+
|
|
833
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
834
|
+
|
|
835
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
836
|
+
|
|
837
|
+
--------------------------------------------------------------------------------
|
|
838
|
+
Package: signalk-plotterext-bus
|
|
839
|
+
License: "MIT"
|
|
840
|
+
|
|
841
|
+
MIT License
|
|
842
|
+
|
|
843
|
+
Copyright (c) 2026 Joel Kozikowski
|
|
844
|
+
|
|
845
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
846
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
847
|
+
in the Software without restriction, including without limitation the rights
|
|
848
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
849
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
850
|
+
furnished to do so, subject to the following conditions:
|
|
851
|
+
|
|
852
|
+
The above copyright notice and this permission notice shall be included in all
|
|
853
|
+
copies or substantial portions of the Software.
|
|
854
|
+
|
|
855
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
856
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
857
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
858
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
859
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
860
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
861
|
+
SOFTWARE.
|
|
862
|
+
|
|
797
863
|
--------------------------------------------------------------------------------
|
|
798
864
|
Package: @kolkov/angular-editor
|
|
799
865
|
License: "MIT"
|
|
@@ -986,72 +1052,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
986
1052
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
987
1053
|
SOFTWARE.
|
|
988
1054
|
|
|
989
|
-
--------------------------------------------------------------------------------
|
|
990
|
-
Package: uuid
|
|
991
|
-
License: "MIT"
|
|
992
|
-
|
|
993
|
-
The MIT License (MIT)
|
|
994
|
-
|
|
995
|
-
Copyright (c) 2010-2020 Robert Kieffer and other contributors
|
|
996
|
-
|
|
997
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
998
|
-
|
|
999
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
1000
|
-
|
|
1001
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1002
|
-
|
|
1003
|
-
--------------------------------------------------------------------------------
|
|
1004
|
-
Package: signalk-plotterext-bus
|
|
1005
|
-
License: "MIT"
|
|
1006
|
-
|
|
1007
|
-
MIT License
|
|
1008
|
-
|
|
1009
|
-
Copyright (c) 2026 Joel Kozikowski
|
|
1010
|
-
|
|
1011
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1012
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
1013
|
-
in the Software without restriction, including without limitation the rights
|
|
1014
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1015
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
1016
|
-
furnished to do so, subject to the following conditions:
|
|
1017
|
-
|
|
1018
|
-
The above copyright notice and this permission notice shall be included in all
|
|
1019
|
-
copies or substantial portions of the Software.
|
|
1020
|
-
|
|
1021
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1022
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1023
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1024
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1025
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1026
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1027
|
-
SOFTWARE.
|
|
1028
|
-
|
|
1029
|
-
--------------------------------------------------------------------------------
|
|
1030
|
-
Package: @angular/core
|
|
1031
|
-
License: "MIT"
|
|
1032
|
-
|
|
1033
|
-
The MIT License
|
|
1034
|
-
|
|
1035
|
-
Copyright (c) 2010-2026 Google LLC. https://angular.dev/license
|
|
1036
|
-
|
|
1037
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1038
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
1039
|
-
in the Software without restriction, including without limitation the rights
|
|
1040
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1041
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
1042
|
-
furnished to do so, subject to the following conditions:
|
|
1043
|
-
|
|
1044
|
-
The above copyright notice and this permission notice shall be included in
|
|
1045
|
-
all copies or substantial portions of the Software.
|
|
1046
|
-
|
|
1047
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1048
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1049
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1050
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1051
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1052
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1053
|
-
THE SOFTWARE.
|
|
1054
|
-
|
|
1055
1055
|
--------------------------------------------------------------------------------
|
|
1056
1056
|
Package: rxjs
|
|
1057
1057
|
License: "Apache-2.0"
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="44" viewBox="0 0 26 44">
|
|
2
|
+
<line x1="13" y1="42" x2="13" y2="8" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
3
|
+
<line x1="13" y1="8" x2="2" y2="2" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="44" viewBox="0 0 26 44">
|
|
2
|
+
<line x1="13" y1="42" x2="13" y2="8" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
3
|
+
<line x1="13" y1="8" x2="2" y2="2" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
4
|
+
<line x1="13" y1="13" x2="7.5" y2="10" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="44" viewBox="0 0 26 44">
|
|
2
|
+
<line x1="13" y1="42" x2="13" y2="8" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
3
|
+
<line x1="13" y1="8" x2="2" y2="2" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
4
|
+
<line x1="13" y1="13" x2="2" y2="7" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="44" viewBox="0 0 26 44">
|
|
2
|
+
<line x1="13" y1="42" x2="13" y2="8" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
3
|
+
<line x1="13" y1="8" x2="2" y2="2" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
4
|
+
<line x1="13" y1="13" x2="2" y2="7" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
5
|
+
<line x1="13" y1="18" x2="7.5" y2="15" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="44" viewBox="0 0 26 44">
|
|
2
|
+
<line x1="13" y1="42" x2="13" y2="8" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
3
|
+
<line x1="13" y1="8" x2="2" y2="2" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
4
|
+
<line x1="13" y1="13" x2="2" y2="7" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
5
|
+
<line x1="13" y1="18" x2="2" y2="12" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="44" viewBox="0 0 26 44">
|
|
2
|
+
<line x1="13" y1="42" x2="13" y2="8" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
3
|
+
<line x1="13" y1="8" x2="2" y2="2" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
4
|
+
<line x1="13" y1="13" x2="2" y2="7" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
5
|
+
<line x1="13" y1="18" x2="2" y2="12" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
6
|
+
<line x1="13" y1="23" x2="7.5" y2="20" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="44" viewBox="0 0 26 44">
|
|
2
|
+
<line x1="13" y1="42" x2="13" y2="8" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
3
|
+
<line x1="13" y1="8" x2="2" y2="2" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
4
|
+
<line x1="13" y1="13" x2="2" y2="7" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
5
|
+
<line x1="13" y1="18" x2="2" y2="12" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
6
|
+
<line x1="13" y1="23" x2="2" y2="17" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="44" viewBox="0 0 26 44">
|
|
2
|
+
<line x1="13" y1="42" x2="13" y2="8" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
3
|
+
<line x1="13" y1="8" x2="2" y2="2" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
4
|
+
<line x1="13" y1="13" x2="2" y2="7" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
5
|
+
<line x1="13" y1="18" x2="2" y2="12" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
6
|
+
<line x1="13" y1="23" x2="2" y2="17" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
7
|
+
<line x1="13" y1="28" x2="7.5" y2="25" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="44" viewBox="0 0 26 44">
|
|
2
|
+
<line x1="13" y1="42" x2="13" y2="8" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
3
|
+
<line x1="13" y1="13" x2="7.5" y2="10" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="44" viewBox="0 0 26 44">
|
|
2
|
+
<line x1="13" y1="42" x2="13" y2="8" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
3
|
+
<path d="M 13 8 L 1 9 L 13 16 Z" fill="#800000"/>
|
|
4
|
+
<line x1="13" y1="20" x2="7.5" y2="17" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="44" viewBox="0 0 26 44">
|
|
2
|
+
<line x1="13" y1="42" x2="13" y2="8" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
3
|
+
<path d="M 13 8 L 1 9 L 13 16 Z" fill="#800000"/>
|
|
4
|
+
<line x1="13" y1="20" x2="2" y2="14" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="44" viewBox="0 0 26 44">
|
|
2
|
+
<line x1="13" y1="42" x2="13" y2="8" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
3
|
+
<path d="M 13 8 L 1 9 L 13 16 Z" fill="#800000"/>
|
|
4
|
+
<line x1="13" y1="20" x2="2" y2="14" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
5
|
+
<line x1="13" y1="25" x2="7.5" y2="22" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="44" viewBox="0 0 26 44">
|
|
2
|
+
<line x1="13" y1="42" x2="13" y2="8" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
3
|
+
<path d="M 13 8 L 1 9 L 13 16 Z" fill="#800000"/>
|
|
4
|
+
<line x1="13" y1="20" x2="2" y2="14" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
5
|
+
<line x1="13" y1="25" x2="2" y2="19" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="44" viewBox="0 0 26 44">
|
|
2
|
+
<line x1="13" y1="42" x2="13" y2="8" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
3
|
+
<path d="M 13 8 L 1 9 L 13 16 Z" fill="#800000"/>
|
|
4
|
+
<line x1="13" y1="20" x2="2" y2="14" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
5
|
+
<line x1="13" y1="25" x2="2" y2="19" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
6
|
+
<line x1="13" y1="30" x2="7.5" y2="27" stroke="#800000" stroke-width="3" stroke-linecap="round"/>
|
|
7
|
+
</svg>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Qt,c as qt,i as $t,j as Ut,l as Ne,n as Gt,o as Wt}from"./chunk-
|
|
1
|
+
import{a as Qt,c as qt,i as $t,j as Ut,l as Ne,n as Gt,o as Wt}from"./chunk-PEC6ZGZT.js";import{$ as ke,$a as j,$c as Ot,Bd as De,Ca as R,Cc as _e,Cd as de,Da as k,Dc as We,Dd as Se,Ea as x,Ec as Fe,Ed as le,F as re,Fb as Ue,Fc as St,G as dt,Ga as B,H as F,Ha as L,Hb as Oe,Ia as N,Ic as Me,J as lt,Ja as h,Jc as Xe,Jd as Be,K as Ee,Ka as c,Kb as yt,Kc as wt,L as Q,La as o,Ld as Le,M as q,Ma as C,Md as Bt,Na as qe,Nb as Ct,Nc as It,Nd as Lt,O as d,Oa as $e,Od as Z,P as A,Q as O,R as mt,Rc as Tt,Rd as ie,S as pt,Sa as V,T as ve,Ta as X,Tc as Et,Td as K,U as ht,Ua as ee,Ub as ne,Ud as Y,Va as u,Vd as Nt,W as $,Wb as I,X as he,Xa as p,Xb as ze,Xd as Vt,Y as T,Ya as P,Za as D,Zc as At,Zd as jt,_ as Ae,_a as be,a as ct,ab as g,ac as Ge,ba as U,bb as v,bd as zt,c as z,ca as xe,ea as ut,fa as He,fb as S,gb as gt,h as Te,hb as w,hd as Rt,ia as s,ja as Qe,jb as te,jc as Re,k as st,ka as J,kb as m,ke as Ht,lb as E,lc as Mt,ma as bt,mb as y,nc as Pe,od as Pt,pa as _t,qa as b,qd as oe,ra as G,rc as Dt,sa as _,sd as Ft,tc as ae,ua as W,ub as vt,va as ue,vb as ye,wa as ft,xb as Ce,yb as kt,yd as ce,zb as xt,zd as se}from"./chunk-XKSYGWTR.js";import{a as pe}from"./chunk-EQVTEUXC.js";var yn=["*"],Cn=[[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],[["","mat-card-image",""],["","matCardImage",""],["","mat-card-sm-image",""],["","matCardImageSmall",""],["","mat-card-md-image",""],["","matCardImageMedium",""],["","mat-card-lg-image",""],["","matCardImageLarge",""],["","mat-card-xl-image",""],["","matCardImageXLarge",""]],"*"],Mn=[`mat-card-title, mat-card-subtitle,
|
|
2
2
|
[mat-card-title], [mat-card-subtitle],
|
|
3
3
|
[matCardTitle], [matCardSubtitle]`,`[mat-card-image], [matCardImage],
|
|
4
4
|
[mat-card-sm-image], [matCardImageSmall],
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as pe}from"./chunk-FEIJMPL7.js";import{A as le,
|
|
1
|
+
import{a as pe}from"./chunk-FEIJMPL7.js";import{A as le,E as re,f as H,g as j,h as N,i as Y,j as Z,k as ee,l as te,m as ie,n as ne,o as ae,r as oe,w as se}from"./chunk-CP3JNVJQ.js";import{a as A,b as L}from"./chunk-E3NU2HIR.js";import{i as U,j as z,k as q}from"./chunk-25YKCA66.js";import{a as B}from"./chunk-6OLNESWL.js";import"./chunk-QYCAVSMC.js";import{j as J,o as Q}from"./chunk-PEC6ZGZT.js";import{Cd as R,Da as f,Ea as x,Ed as X,Ga as b,Ha as v,Ia as T,Ja as u,Ka as a,La as o,Ma as C,Md as O,O as y,Od as W,P as d,Q as m,Rd as V,Ta as _,Td as F,Ud as K,Va as h,Xa as p,fb as w,ia as l,kb as r,ke as $,lb as P,mb as M,na as D,nb as S,qa as I,yd as E,zd as G}from"./chunk-XKSYGWTR.js";import{f as k}from"./chunk-EQVTEUXC.js";function de(s,t){if(s&1){let e=_();a(0,"button",11),h("click",function(){d(e);let i=p();return m(i.load())}),a(1,"mat-icon"),r(2,"file_upload"),o(),r(3," \xA0Load "),o()}if(s&2){let e=p();u("disabled",!e.display.loadRoutesOK&&!e.display.loadWaypointsOK&&!e.display.loadTracksOK)}}function me(s,t){s&1&&(a(0,"div",10)(1,"div")(2,"b"),r(3,"Invalid GPX Data:"),o(),C(4,"br")(5,"br"),a(6,"i"),r(7,"Selected file does not contain GPX data or"),C(8,"br"),r(9," does not correctly implement namespaced <extensions> attributes."),o()()())}function ue(s,t){s&1&&C(0,"mat-progress-bar",12)}function he(s,t){if(s&1){let e=_();a(0,"div",23)(1,"div",24),r(2),o(),a(3,"div",25)(4,"mat-checkbox",26,0),h("change",function(){let i=d(e).$index,c=w(5),g=p(4);return m(g.checkWpt(c.checked,i))}),o()()()}if(s&2){let e=t.$implicit,n=t.$index,i=p(4);l(2),P(e.name),l(2),u("checked",i.selWaypoints[n])}}function _e(s,t){if(s&1){let e=_();a(0,"div",13)(1,"mat-expansion-panel",16),h("opened",function(){d(e);let i=p(3);return m(i.display.expand.waypoints=!0)})("closed",function(){d(e);let i=p(3);return m(i.display.expand.waypoints=!1)}),a(2,"mat-expansion-panel-header",17)(3,"mat-panel-title")(4,"mat-icon",18),r(5,"place"),o(),r(6," \xA0\xA0 "),a(7,"b"),r(8,"Waypoints:"),o()(),a(9,"mat-panel-description")(10,"div",5)(11,"span",19),r(12),o(),a(13,"span",20)(14,"mat-checkbox",21),h("change",function(i){d(e);let c=p(3);return m(c.checkWpt(i.checked,-1))})("click",function(i){return i.cancelBubble=!0}),o()()()()(),a(15,"div",22),v(16,he,6,2,"div",23,b),o()()()}if(s&2){let e=p(3);l(),u("expanded",e.display.expand.waypoints),l(11),S(" (",e.display.selCount.waypoints," of ",e.gpxData==null?null:e.gpxData.waypoints.length,") "),l(2),u("indeterminate",e.display.someWptChecked)("checked",e.display.allWaypointsChecked)("disabled",e.gpxData.waypoints.length===0),l(2),T(e.gpxData.waypoints)}}function fe(s,t){if(s&1){let e=_();a(0,"div",23)(1,"div",24),r(2),o(),a(3,"div",25)(4,"mat-checkbox",29,1),h("change",function(){let i=d(e).$index,c=w(5),g=p(4);return m(g.checkRte(c.checked,i))}),o()()()}if(s&2){let e=t.$implicit,n=t.$index,i=p(4);l(2),P(e.name),l(2),u("checked",i.selRoutes[n])}}function xe(s,t){if(s&1){let e=_();a(0,"div",13)(1,"mat-expansion-panel",16),h("opened",function(){d(e);let i=p(3);return m(i.display.expand.routes=!0)})("closed",function(){d(e);let i=p(3);return m(i.display.expand.routes=!1)}),a(2,"mat-expansion-panel-header",17)(3,"mat-panel-title")(4,"mat-icon",27),r(5,"directions"),o(),r(6," \xA0\xA0 "),a(7,"b"),r(8,"Routes:"),o()(),a(9,"mat-panel-description")(10,"div",5)(11,"span",19),r(12),o(),a(13,"span",20)(14,"mat-checkbox",28),h("change",function(i){d(e);let c=p(3);return m(c.checkRte(i.checked,-1))})("click",function(i){return i.cancelBubble=!0}),o()()()()(),a(15,"div",22),v(16,fe,6,2,"div",23,b),o()()()}if(s&2){let e=p(3);l(),u("expanded",e.display.expand.routes),l(11),S(" (",e.display.selCount.routes," of ",e.gpxData==null?null:e.gpxData.routes.length,") "),l(2),u("indeterminate",e.display.someRteChecked)("checked",e.display.allRoutesChecked)("disabled",e.gpxData.routes.length==0),l(2),T(e.gpxData.routes)}}function ye(s,t){if(s&1){let e=_();a(0,"div",23)(1,"div",24),r(2),o(),a(3,"div",25)(4,"mat-checkbox",32,2),h("change",function(){let i=d(e).$index,c=w(5),g=p(4);return m(g.checkTrk(c.checked,i))}),o()()()}if(s&2){let e=t.$implicit,n=t.$index,i=p(4);l(2),P(e.name),l(2),u("checked",i.selTracks[n])}}function ge(s,t){if(s&1){let e=_();a(0,"div",13)(1,"mat-expansion-panel",16),h("opened",function(){d(e);let i=p(3);return m(i.display.expand.tracks=!0)})("closed",function(){d(e);let i=p(3);return m(i.display.expand.tracks=!1)}),a(2,"mat-expansion-panel-header",17)(3,"mat-panel-title")(4,"mat-icon",30),r(5,"show_chart"),o(),r(6," \xA0\xA0 "),a(7,"b"),r(8,"Tracks:"),o()(),a(9,"mat-panel-description")(10,"div",5)(11,"span",19),r(12),o(),a(13,"span",20)(14,"mat-checkbox",31),h("change",function(i){d(e);let c=p(3);return m(c.checkTrk(i.checked,-1))})("click",function(i){return i.cancelBubble=!0}),o()()()()(),a(15,"div",22),v(16,ye,6,2,"div",23,b),o()()()}if(s&2){let e=p(3);l(),u("expanded",e.display.expand.tracks),l(11),S(" (",e.display.selCount.tracks," of ",e.gpxData==null?null:e.gpxData.tracks.length,") "),l(2),u("indeterminate",e.display.someTrkChecked)("checked",e.display.allTracksChecked)("disabled",e.gpxData.tracks.length==0),l(2),T(e.gpxData.tracks)}}function Ce(s,t){if(s&1&&(a(0,"div",13)(1,"div",14)(2,"div"),r(3,"File:"),o(),a(4,"div",15),r(5),o()(),C(6,"mat-divider"),o(),f(7,_e,18,6,"div",13),f(8,xe,18,6,"div",13),f(9,ge,18,6,"div",13)),s&2){let e=p(2);l(5),M(" ",e.data.fileName," "),l(2),x(e.gpxData.waypoints.length!=0?7:-1),l(),x(e.gpxData.routes.length!=0?8:-1),l(),x(e.gpxData.tracks.length!=0&&e.app.featureFlags().resourceTracks?9:-1)}}function ke(s,t){if(s&1&&(a(0,"div",10),f(1,ue,1,0,"mat-progress-bar",12)(2,Ce,10,4),o()),s&2){let e=p();l(),x(e.app.sIsFetching()?1:2)}}var ce=class s{constructor(t){this.data=t}gpxData={name:"",routes:[],waypoints:[],tracks:[]};selRoutes=[];selectedRoute=null;selWaypoints=[];selTracks=[];display={notValid:!1,allRoutesChecked:!1,allWaypointsChecked:!1,allTracksChecked:!1,someWptChecked:!1,someRteChecked:!1,someTrkChecked:!1,loadRoutesOK:!1,loadWaypointsOK:!1,loadTracksOK:!1,routeViewer:!1,selCount:{routes:0,waypoints:0,tracks:0},expand:{routes:!1,waypoints:!1,tracks:!1}};errorCount=0;subCount=0;gpx;app=y(le);dialogRef=y(E);skres=y(re);signalk=y(oe);symbols=y(se);ngOnInit(){this.data.fileData=this.data.fileData||null,this.parseGPXData(this.data.fileData)}ngOnDestroy(){this.clear()}load(){this.uploadToServer({rte:{selected:this.selRoutes},wpt:{selected:this.selWaypoints},trk:{selected:this.selTracks}})}parseGPXData(t){return k(this,null,function*(){if(this.display.allRoutesChecked=!1,this.display.loadRoutesOK=!1,this.selRoutes=[],this.display.allWaypointsChecked=!1,this.display.loadWaypointsOK=!1,this.selWaypoints=[],this.display.allTracksChecked=!1,this.display.loadTracksOK=!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.gpxData=yield this.parseFileData(t),!this.gpxData){console.warn(`Selected file does not contain GPX data or
|
|
2
2
|
does not correctly implement namespaced <extensions> attributes`,"Invalid GPX Data:"),this.display.notValid=!0;return}this.gpxData.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.loadRoutesOK=!0,this.display.selCount.routes=1),this.gpxData.waypoints.forEach(()=>{this.selWaypoints.push(!1)}),this.selWaypoints.length===1&&(this.selWaypoints[0]=!0,this.display.allWaypointsChecked=!0,this.display.expand.waypoints=!0,this.display.loadWaypointsOK=!0,this.display.selCount.waypoints=1),this.gpxData.tracks.forEach(()=>{this.selTracks.push(!1)}),this.selTracks.length===1&&(this.selTracks[0]=!0,this.display.allTracksChecked=!0,this.display.expand.tracks=!0,this.display.loadTracksOK=!0,this.display.selCount.tracks=1)})}checkRte(t,e=-1){let n=0;if(e!==-1){this.selRoutes[e]=t,this.display.loadRoutesOK=t;for(let i of this.selRoutes)i&&n++;this.display.loadRoutesOK=n!==0,this.display.selCount.routes=n,this.display.allRoutesChecked=n===this.selRoutes.length}else{for(let i=0;i<this.selRoutes.length;i++)this.selRoutes[i]=t,this.display.loadRoutesOK=t,this.display.allRoutesChecked=t;this.display.selCount.routes=t?this.selRoutes.length:0}this.display.someRteChecked=!(this.display.allRoutesChecked||n===0)}checkWpt(t,e=-1){let n=0;if(e!==-1){this.selWaypoints[e]=t,this.display.loadWaypointsOK=t;for(let i of this.selWaypoints)i&&n++;this.display.loadWaypointsOK=n!==0,this.display.selCount.waypoints=n,this.display.allWaypointsChecked=n===this.selWaypoints.length}else{for(let i=0;i<this.selWaypoints.length;i++)this.selWaypoints[i]=t,this.display.loadWaypointsOK=t,this.display.allWaypointsChecked=t;this.display.selCount.waypoints=t?this.selWaypoints.length:0}this.display.someWptChecked=!(this.display.allWaypointsChecked||n===0)}checkTrk(t,e=-1){let n=0;if(e!==-1){this.selTracks[e]=t,this.display.loadTracksOK=t;for(let i of this.selTracks)i&&n++;this.display.loadTracksOK=n!==0,this.display.selCount.tracks=n,this.display.allTracksChecked=n===this.selTracks.length}else{for(let i=0;i<this.selTracks.length;i++)this.selTracks[i]=t,this.display.loadTracksOK=t,this.display.allTracksChecked=t;this.display.selCount.tracks=t?this.selTracks.length:0}this.display.someTrkChecked=!(this.display.allTracksChecked||n===0)}clear(){this.gpx=null}parseFileData(t){return k(this,null,function*(){let e={name:"",routes:[],waypoints:[],tracks:[]};if(this.gpx=new pe,this.app.sIsFetching.set(!0),!(yield this.gpx.parse(t)))return this.app.sIsFetching.set(!1),null;let n=1;return this.gpx.rte.forEach(i=>{e.routes.push({name:i.name!==""?i.name:`Rte: ${n}`,description:i.desc?i.desc:i.cmt?i.cmt:"",wptcount:i.rtept.length}),n++}),n=1,this.gpx.wpt.forEach(i=>{e.waypoints.push({name:i.name?i.name:`Wpt: ${n}`,description:i.desc?i.desc:i.cmt?i.cmt:""}),n++}),n=1,this.gpx.trk.forEach(i=>{e.tracks.push({name:i.name?i.name:`Trk: ${n}`,description:i.desc?i.desc:i.cmt?i.cmt:""}),n++}),this.app.sIsFetching.set(!1),e})}uploadToServer(t){return k(this,null,function*(){this.app.sIsFetching.set(!0),this.errorCount=0,this.subCount=0;for(let n=0;n<t.rte.selected.length;n++)t.rte.selected[n]&&this.transformRoute(this.gpx.rte[n]);for(let n=0;n<t.wpt.selected.length;n++)t.wpt.selected[n]&&this.transformWaypoint(this.gpx.wpt[n]);let e=[];for(let n=0;n<t.trk.selected.length;n++)if(t.trk.selected[n]){let i=this.transformTrack(this.gpx.trk[n]);this.subCount++;try{let c=yield this.skres.postToServer("tracks",i);this.subCount--,Math.floor(c.statusCode/100)===2?(e.push(c.id),this.app.debug("SUCCESS: Track added.")):this.errorCount++,this.checkComplete()}catch(c){this.errorCount++,this.subCount--,this.logError(c),this.checkComplete()}}e.length!==0&&this.skres.trackAddFromServer(e)})}errorList=[];logError(t){let e=t.error?t.error.message:t.message;this.errorList.push({status:t.status,message:e})}checkComplete(){this.subCount===0&&(this.app.sIsFetching.set(!1),this.app.saveConfig(),this.dialogRef.close({errCount:this.errorCount,errList:this.errorList}),this.app.debug(`GPXLoad: complete: ${this.errorCount}`))}transformRoute(t){let e=this.skres.buildRoute(t.rtept.map(i=>[i.lon,i.lat])),n=e[1];n.name=t.name??"",n.description=t.desc??"",t.cmt&&(n.feature.properties.cmt=t.cmt),t.src&&(n.feature.properties.src=t.src),t.number&&(n.feature.properties.number=t.number),t.type&&(n.feature.properties.type=t.type),n.feature.properties.coordinatesMeta=[],n.feature.properties.coordinatesMeta=t.rtept.map(i=>{let c={name:i.name??""};return i.cmt&&(c.description=i.cmt),c}),this.subCount++,this.signalk.api.put(this.app.skApiVersion,`/resources/routes/${e[0]}`,e[1]).subscribe(i=>{this.subCount--,Math.floor(i.statusCode/100)===2?(this.app.debug("SUCCESS: Route added."),this.skres.selectionAdd("routes",e[0])):this.errorCount++,this.checkComplete()},i=>{this.errorCount++,this.subCount--,this.logError(i),this.checkComplete()})}transformWaypoint(t){let e=this.skres.buildWaypoint([t.lon,t.lat]),n=e[1];if(t.ele&&n.feature.geometry.coordinates.push(t.ele),t.name&&t.name.length!==0&&(n.name=t.name),t.desc&&t.desc.length!==0&&(n.description=t.desc),t.type&&(n.type=t.type,n.feature.properties.type=t.type),t.cmt&&(n.feature.properties.cmt=t.cmt),t.src&&(n.feature.properties.src=t.src),t.sym){n.feature.properties.sym=t.sym;let i=this.symbols.resolveGpxSym(t.sym);i&&(n.type="waypoint",n.feature.properties.skIcon=i)}this.subCount++,this.signalk.api.put(this.app.skApiVersion,`/resources/waypoints/${e[0]}`,e[1]).subscribe(i=>{this.subCount--,Math.floor(i.statusCode/100)===2?(this.app.debug("SUCCESS: Waypoint added."),this.skres.selectionAdd("waypoints",e[0])):this.errorCount++,this.checkComplete()},i=>{this.errorCount++,this.subCount--,this.logError(i),this.checkComplete()})}transformTrack(t){let e={feature:{type:"Feature",geometry:{type:"MultiLineString",coordinates:[]},properties:{},id:""}};return t.trkseg&&t.trkseg.forEach(n=>{let i=[];n.trkpt.forEach(c=>{i.push([c.lon,c.lat])}),e.feature.geometry.coordinates.push(i)}),t.name&&t.name.length!==0?e.feature.properties.name=t.name:e.feature.properties.name=`gpxtrk #${Math.random().toString().slice(-5)}`,t.desc&&t.desc.length!==0&&(e.feature.properties.description=t.desc),t.cmt&&(e.feature.properties.cmt=t.cmt),t.src&&(e.feature.properties.src=t.src),t.type&&(e.feature.properties.type=t.type),e}static \u0275fac=function(e){return new(e||s)(D(G))};static \u0275cmp=I({type:s,selectors:[["gpxload-dialog"]],decls:13,vars:3,consts:[["wval",""],["rval",""],["tval",""],[1,"gpxload-dialog"],[2,"background-color","transparent"],[2,"display","flex","width","100%"],["mat-raised-button","","matTooltip","Load selected resources","matTooltipPosition","right",2,"width","85px",3,"disabled"],[2,"flex","1 1 auto","text-align","center"],[2,"text-align","right"],["mat-icon-button","",3,"click","disabled"],["mat-dialog-content",""],["mat-raised-button","","matTooltip","Load selected resources","matTooltipPosition","right",2,"width","85px",3,"click","disabled"],["mode","indeterminate"],[1,"card-group"],[2,"display","flex"],[2,"flex","1 1 auto","padding-left","10px","overflow","hidden","display","-webkit-box","-webkit-box-orient","vertical","-webkit-line-clamp","1","line-clamp","1","text-overflow","ellipsis"],[3,"opened","closed","expanded"],[2,"padding","0 12px"],[1,"icon-waypoint"],[1,"pnlSelectedItems"],[1,"pnlSelect"],["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"],["matTooltip","Select this Track","matTooltipPosition","below",3,"change","checked"]],template:function(e,n){e&1&&(a(0,"div",3)(1,"mat-toolbar",4)(2,"div",5)(3,"div"),f(4,de,4,1,"button",6),o(),a(5,"div",7),r(6,"Import GPX"),o(),a(7,"div",8)(8,"button",9),h("click",function(){return n.dialogRef.close(-1)}),a(9,"mat-icon"),r(10,"close"),o()()()()(),f(11,me,10,0,"div",10)(12,ke,3,1,"div",10),o()),e&2&&(l(4),x(n.app.sIsFetching()?-1:4),l(4),u("disabled",n.app.sIsFetching()),l(3),x(n.display.notValid?11:12))},dependencies:[ae,ne,N,j,X,R,K,F,V,W,O,U,J,Q,L,A,ie,Y,Z,te,ee,q,z,H,B,$],styles:[".gpxload-dialog[_ngcontent-%COMP%]{font-family:roboto;position:relative}.mat-expansion-panel-body[_ngcontent-%COMP%]{padding:0 12px 6px}.card-group-title[_ngcontent-%COMP%]{font-weight:700;font-size:10pt;font-family:Arial,Helvetica,sans-serif;padding:10px 0}.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}.pnlSelectedItems[_ngcontent-%COMP%]{display:none;line-height:2.9em}.pnlSelect[_ngcontent-%COMP%]{flex:1 1 auto;padding-left:3px;padding-right:3px;text-align:right}.txtSelect[_ngcontent-%COMP%]{display:none}button[_ngcontent-%COMP%]{min-width:unset;padding:unset}@media only screen and (min-width:400px){.pnlSelectedItems[_ngcontent-%COMP%]{display:inline}}@media only screen and (min-width:475px){.pnlSelectedItems[_ngcontent-%COMP%]{display:inline;line-height:2.9em}.txtSelect[_ngcontent-%COMP%]{display:inline}.pnlSelect[_ngcontent-%COMP%]{flex:1 1 auto;padding-left:20px;padding-right:15px;text-align:right}button[_ngcontent-%COMP%]{min-width:inherit;padding:inherit}}"]})};export{ce as GPXImportDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ue,b as w,c as me,d as he,e as fe}from"./chunk-FEIJMPL7.js";import{A as pe,C as ce,D as de,f as N,h as z,i as ee,j as te,k as ie,l as ae,m as ne,n as se,o as oe,r as re,v as le}from"./chunk-4FRHLR6W.js";import{b as H}from"./chunk-CSNMIJA3.js";import{i as q,j as J,k as Q}from"./chunk-QNWLXTD7.js";import{a as U}from"./chunk-EU3YXT24.js";import"./chunk-NM5IDVR6.js";import{j as Y,o as Z}from"./chunk-7OJ7YZPE.js";import{Bd as V,Ca as _,Da as k,Dd as I,Fa as v,Ga as b,Ha as C,Ia as f,J as R,Ja as s,Ka as r,Ld as K,N as D,Nd as B,O as m,P as h,Qd as $,Sa as x,Sd as A,Td as j,Ua as g,Wa as d,c as E,eb as T,ha as p,jb as c,je as L,kb as W,lb as G,ma as y,pa as O,xd as X,yd as F}from"./chunk-P5D5HOAL.js";import{f as M}from"./chunk-EQVTEUXC.js";var P=class{gpx;constructor(){this.init()}init(){this.gpx=new ue,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,t){if(t)t.forEach(e=>{i[e]&&this.gpx.rte.push(this.packageRoute(e,i[e]))});else for(let e in i)this.gpx.rte.push(this.packageRoute(e,i[e]))}packageRoute(i,t){let e=new me;e.extensions=e.extensions??{},e.extensions.signalk={},e.extensions.signalk.uuid=i,t.distance&&(e.extensions.signalk.distance=t.distance),e.name=t.name||null,e.desc=t.description||null,e.cmt=t.feature.properties.cmt||null,e.src=t.feature.properties.src||null,e.number=t.feature.properties.number||null,e.type=t.feature.properties.type||null;for(let a of t.feature.geometry.coordinates){let n=new w;n.lon=a[0],n.lat=a[1],n.ele=a[2]||null,e.rtept.push(n),this.gpx.updateBounds(n)}return e}setWaypoints(i,t){if(t)t.forEach(e=>{i[e]&&this.gpx.wpt.push(this.packageWaypoint(e,i[e]))});else for(let e in i)this.gpx.wpt.push(this.packageWaypoint(e,i[e]))}packageWaypoint(i,t){let e=new w;if(e.extensions=e.extensions||{},e.extensions.signalk={},e.extensions.signalk.uuid=i,e.name=t.name||"",e.desc=t.description||"",e.cmt=t.feature.properties.cmt||null,e.geoidHeight=t.feature.properties.geoidHeight||null,e.src=t.feature.properties.src||null,e.sym=t.feature.properties.sym||null,e.type=t.feature.properties.type||null,t.type==="waypoint"){let a=le(t.feature.properties.skIcon);a?.gpxType&&(e.type=a.gpxType),a?.gpxSym&&(e.sym=a.gpxSym)}return e.fix=t.feature.properties.fix||null,e.sat=t.feature.properties.sat||null,e.hdop=t.feature.properties.hdop||null,e.vdop=t.feature.properties.vdop||null,e.pdop=t.feature.properties.pdop||null,e.ageOfGpsData=t.feature.properties.ageOfGpsData||null,e.dgpsid=t.feature.properties.dgpsid||null,e.lat=t.feature.geometry.coordinates[1],e.lon=t.feature.geometry.coordinates[0],e.ele=t.feature.geometry.coordinates[2]||null,this.gpx.updateBounds(e),e}setTracks(i,t){if(t)t.forEach(e=>{i[e]&&this.gpx.trk.push(this.packageTrack(e,i[e]))});else for(let e in i)this.gpx.trk.push(this.packageTrack(e,i[e]))}packageTrack(i,t){let e=new he;e.extensions=e.extensions||{},e.extensions.signalk={},e.extensions.signalk.uuid=i,e.name=t.feature.properties.name||null,e.desc=t.feature.properties.description||null,e.cmt=t.feature.properties.cmt||null,e.src=t.feature.properties.src||null,e.number=t.feature.properties.number||null,e.type=t.feature.properties.type||null;for(let a of t.feature.geometry.coordinates){let n=new fe;for(let o of a){let u=new w;u.lon=o[0],u.lat=o[1],u.ele=o[2]||null,n.trkpt.push(u),this.gpx.updateBounds(u)}e.trkseg.push(n)}return e}};var S=class l{resultSource;result$;sk2gpx;hasFSA;signalk=D(re);constructor(){this.resultSource=new E,this.result$=this.resultSource.asObservable(),this.hasFSA="showOpenFilePicker"in window}clear(){this.sk2gpx=null}prepData(i){let t={routes:[],waypoints:[],tracks:[]},e=1;return t.routes=i.routes.map(a=>{let n=a[1];return n.feature.id=a[0],n}),e=1,t.waypoints=i.waypoints.map(a=>{let n=a[1];return n.feature.id=a[0],n.name=n.name??`Wpt: ${e}`,e++,n}),t.tracks=i.tracks,t}saveToFile(i,t){this.sk2gpx=new P;let e={},a={},n={};for(let o=0;o<t.rte.selected.length;o++)t.rte.selected[o]&&(e[i.routes[o].feature.id]=i.routes[o]);this.sk2gpx.setRoutes(e);for(let o=0;o<t.wpt.selected.length;o++)t.wpt.selected[o]&&(a[i.waypoints[o].feature.id]=i.waypoints[o]);this.sk2gpx.setWaypoints(a);for(let o=0;o<t.trk.selected.length;o++)if(t.trk.selected[o]){let u=this.signalk.uuid;n[u]=new ce,n[u].feature.id=u,n[u].feature.properties.name=`Vessel trail: ${Date().toString()}`,n[u].feature.geometry.coordinates.push(i.tracks[o])}this.sk2gpx.setTracks(n),this.hasFSA?this.fsaSaveFile():this.legacySaveToFile()}legacySaveToFile(){let i=new Blob([this.sk2gpx.toXML()],{type:"text/xml"}),t=document.createElement("a");t.href=URL.createObjectURL(i),t.download="fb_export.gpx",t.click(),URL.revokeObjectURL(t.href),t.remove(),this.resultSource.next(-1)}fsaSaveFile(){window.showSaveFilePicker({types:[{description:"GPX file",accept:{"text/xml":[".gpx"]}}]}).then(i=>{i.createWritable().then(t=>{let e=new Blob([this.sk2gpx.toXML()]);t.write(e).then(()=>{t.close(),this.resultSource.next(0)})}).catch(t=>{console.warn(t),this.resultSource.next(1)})}).catch(()=>{this.resultSource.next(-1)})}static \u0275fac=function(t){return new(t||l)};static \u0275prov=R({token:l,factory:l.\u0275fac,providedIn:"root"})};function _e(l,i){if(l&1){let t=x();s(0,"div",18)(1,"div",19),c(2),r(),s(3,"div",20)(4,"mat-checkbox",21,0),g("change",function(){let a=m(t).$index,n=T(5),o=d(2);return h(o.checkWpt(n.checked,a))}),r()()()}if(l&2){let t=i.$implicit,e=i.$index,a=d(2);p(2),W(t.name),p(2),f("checked",a.selWaypoints[e])}}function ke(l,i){if(l&1){let t=x();s(0,"div",11)(1,"mat-expansion-panel",12),g("opened",function(){m(t);let a=d();return h(a.display.expand.waypoints=!0)})("closed",function(){m(t);let a=d();return h(a.display.expand.waypoints=!1)}),s(2,"mat-expansion-panel-header",13)(3,"mat-panel-title")(4,"mat-icon",14),c(5,"place"),r(),c(6," \xA0"),s(7,"b"),c(8,"Waypoints:"),r()(),s(9,"mat-panel-description")(10,"div",15)(11,"mat-checkbox",16),g("change",function(a){m(t);let n=d();return h(n.checkWpt(a.checked,-1))})("click",function(a){return a.cancelBubble=!0}),r()()()(),s(12,"div",17),b(13,_e,6,2,"div",18,v),r()()()}if(l&2){let t=d();p(),f("expanded",t.display.expand.waypoints),p(10),f("indeterminate",t.display.someWptChecked)("checked",t.display.allWaypointsChecked)("disabled",t.resData.waypoints.length===0),p(2),C(t.resData.waypoints)}}function ve(l,i){if(l&1){let t=x();s(0,"div",18)(1,"div",19)(2,"mat-icon",22),c(3,"directions"),r(),c(4),r(),s(5,"div",20)(6,"mat-checkbox",24,1),g("change",function(){let a=m(t).$index,n=T(7),o=d(2);return h(o.checkRte(n.checked,a))}),r()()()}if(l&2){let t=i.$implicit,e=i.$index,a=d(2);p(4),G(" ",t.name," "),p(2),f("checked",a.selRoutes[e])}}function be(l,i){if(l&1){let t=x();s(0,"div",11)(1,"mat-expansion-panel",12),g("opened",function(){m(t);let a=d();return h(a.display.expand.routes=!0)})("closed",function(){m(t);let a=d();return h(a.display.expand.routes=!1)}),s(2,"mat-expansion-panel-header",13)(3,"mat-panel-title")(4,"mat-icon",22),c(5,"directions"),r(),c(6," \xA0"),s(7,"b"),c(8,"Routes:"),r()(),s(9,"mat-panel-description")(10,"div",15)(11,"mat-checkbox",23),g("change",function(a){m(t);let n=d();return h(n.checkRte(a.checked,-1))})("click",function(a){return a.cancelBubble=!0}),r()()()(),s(12,"div",17),b(13,ve,8,2,"div",18,v),r()()()}if(l&2){let t=d();p(),f("expanded",t.display.expand.routes),p(10),f("indeterminate",t.display.someRteChecked)("checked",t.display.allRoutesChecked)("disabled",t.resData.routes.length==0),p(2),C(t.resData.routes)}}function Ce(l,i){if(l&1){let t=x();s(0,"div",18)(1,"div",19)(2,"mat-icon",26),c(3,"directions_boat"),r(),c(4," Vessel Trail "),r(),s(5,"div",20)(6,"mat-checkbox",28,2),g("change",function(){let a=m(t).$index,n=T(7),o=d(2);return h(o.checkTrk(n.checked,a))}),r()()()}if(l&2){let t=i.$index,e=d(2);p(6),f("checked",e.selTracks[t])}}function Te(l,i){if(l&1){let t=x();s(0,"div",11)(1,"mat-expansion-panel",25)(2,"mat-expansion-panel-header",13)(3,"mat-panel-title")(4,"mat-icon",26),c(5,"show_chart"),r(),c(6," \xA0"),s(7,"b"),c(8,"Tracks:"),r()(),s(9,"mat-panel-description")(10,"div",15)(11,"mat-checkbox",27),g("change",function(a){m(t);let n=d();return h(n.checkTrk(a.checked,-1))})("click",function(a){return a.cancelBubble=!0}),r()()()(),s(12,"div",17),b(13,Ce,8,1,"div",18,v),r()()()}if(l&2){let t=d();p(),f("expanded",!1),p(10),f("indeterminate",!1)("checked",t.display.allTracksChecked)("disabled",t.resData.tracks.length==0),p(2),C(t.resData.tracks)}}var ge=class l{constructor(i,t,e,a,n){this.app=i;this.skres=t;this.facade=e;this.dialogRef=a;this.data=n}resData={routes:[],waypoints:[],tracks:[]};selRoutes=[];selectedRoute=null;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(){this.loadResources(),this.unsubscribe.push(this.facade.result$.subscribe(i=>{this.dialogRef.close(i)}))}ngOnDestroy(){this.unsubscribe.forEach(i=>i.unsubscribe()),this.facade.clear()}loadResources(){return M(this,null,function*(){this.data.routes.sort((i,t)=>i[1].name.localeCompare(t[1].name));try{this.app.sIsFetching.set(!0);let i=yield this.skres.listFromServer("waypoints");i.sort((t,e)=>t[1].name.localeCompare(e[1].name)),this.data.waypoints=i,this.app.sIsFetching.set(!1)}catch(i){this.app.sIsFetching.set(!1),this.resData.waypoints=[]}this.parseResourceData()})}save(){this.facade.saveToFile(this.resData,{rte:{selected:this.selRoutes},wpt:{selected:this.selWaypoints},trk:{selected:this.selTracks}})}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.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.selTracks.push(!1)}checkRte(i,t=-1){let e=0;if(t!==-1){this.selRoutes[t]=i,this.display.saveRoutesOK=i;for(let a of this.selRoutes)a&&e++;this.display.saveRoutesOK=e!==0,this.display.selCount.routes=e,this.display.allRoutesChecked=e===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||e===0)}checkWpt(i,t=-1){let e=0;if(t!==-1){this.selWaypoints[t]=i,this.display.saveWaypointsOK=i;for(let a of this.selWaypoints)a&&e++;this.display.saveWaypointsOK=e!==0,this.display.selCount.waypoints=e,this.display.allWaypointsChecked=e===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||e===0)}checkTrk(i,t=-1){let e=0;if(t!==-1){this.selTracks[t]=i,this.display.saveTracksOK=i;for(let a of this.selTracks)a&&e++;this.display.saveTracksOK=e!==0,this.display.selCount.tracks=e,this.display.allTracksChecked=e===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||e===0)}static \u0275fac=function(t){return new(t||l)(y(pe),y(de),y(S),y(X),y(F))};static \u0275cmp=O({type:l,selectors:[["gpxsave-dialog"]],decls:18,vars:4,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"],["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"],[3,"expanded"],[1,"icon-track"],["matTooltip","Vessel Trail to Track","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],["matTooltip","Select this Track","matTooltipPosition","below",3,"change","checked"]],template:function(t,e){t&1&&(s(0,"div",3)(1,"mat-toolbar",4)(2,"div",5)(3,"div")(4,"button",6),g("click",function(){return e.save()}),s(5,"mat-icon"),c(6,"save"),r(),c(7,"\xA0Save\xA0 "),r()(),s(8,"div",7),c(9,"Export to GPX"),r(),s(10,"div",8)(11,"button",9),g("click",function(){return e.dialogRef.close(-1)}),s(12,"mat-icon"),c(13,"close"),r()()()()(),s(14,"div",10),_(15,ke,15,4,"div",11),_(16,be,15,4,"div",11),_(17,Te,15,4,"div",11),r()()),t&2&&(p(4),f("disabled",!e.display.saveRoutesOK&&!e.display.saveWaypointsOK&&!e.display.saveTracksOK),p(11),k(e.resData.waypoints.length!==0?15:-1),p(),k(e.resData.routes.length!==0?16:-1),p(),k(!e.app.data.serverTrail&&e.resData.tracks.length!==0?17:-1))},dependencies:[oe,se,z,I,V,j,A,$,B,K,q,Y,Z,H,ne,ee,te,ae,ie,Q,J,N,U,L],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}@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{ge as GPXExportDialog};
|
|
1
|
+
import{a as ue,b as w,c as me,d as he,e as fe}from"./chunk-FEIJMPL7.js";import{A as pe,D as ce,E as de,f as N,h as z,i as ee,j as te,k as ie,l as ae,m as ne,n as se,o as oe,r as re,v as le}from"./chunk-CP3JNVJQ.js";import{b as H}from"./chunk-E3NU2HIR.js";import{i as q,j as J,k as Q}from"./chunk-25YKCA66.js";import{a as U}from"./chunk-6OLNESWL.js";import"./chunk-QYCAVSMC.js";import{j as Y,o as Z}from"./chunk-PEC6ZGZT.js";import{Cd as V,Da as _,Ea as k,Ed as I,Ga as v,Ha as b,Ia as C,Ja as f,K as R,Ka as s,La as r,Md as K,O as D,Od as B,P as m,Q as h,Rd as $,Ta as x,Td as A,Ud as j,Va as g,Xa as d,c as E,fb as T,ia as p,kb as c,ke as L,lb as W,mb as G,na as y,qa as O,yd as X,zd as F}from"./chunk-XKSYGWTR.js";import{f as M}from"./chunk-EQVTEUXC.js";var P=class{gpx;constructor(){this.init()}init(){this.gpx=new ue,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,t){if(t)t.forEach(e=>{i[e]&&this.gpx.rte.push(this.packageRoute(e,i[e]))});else for(let e in i)this.gpx.rte.push(this.packageRoute(e,i[e]))}packageRoute(i,t){let e=new me;e.extensions=e.extensions??{},e.extensions.signalk={},e.extensions.signalk.uuid=i,t.distance&&(e.extensions.signalk.distance=t.distance),e.name=t.name||null,e.desc=t.description||null,e.cmt=t.feature.properties.cmt||null,e.src=t.feature.properties.src||null,e.number=t.feature.properties.number||null,e.type=t.feature.properties.type||null;for(let a of t.feature.geometry.coordinates){let n=new w;n.lon=a[0],n.lat=a[1],n.ele=a[2]||null,e.rtept.push(n),this.gpx.updateBounds(n)}return e}setWaypoints(i,t){if(t)t.forEach(e=>{i[e]&&this.gpx.wpt.push(this.packageWaypoint(e,i[e]))});else for(let e in i)this.gpx.wpt.push(this.packageWaypoint(e,i[e]))}packageWaypoint(i,t){let e=new w;if(e.extensions=e.extensions||{},e.extensions.signalk={},e.extensions.signalk.uuid=i,e.name=t.name||"",e.desc=t.description||"",e.cmt=t.feature.properties.cmt||null,e.geoidHeight=t.feature.properties.geoidHeight||null,e.src=t.feature.properties.src||null,e.sym=t.feature.properties.sym||null,e.type=t.feature.properties.type||null,t.type==="waypoint"){let a=le(t.feature.properties.skIcon);a?.gpxType&&(e.type=a.gpxType),a?.gpxSym&&(e.sym=a.gpxSym)}return e.fix=t.feature.properties.fix||null,e.sat=t.feature.properties.sat||null,e.hdop=t.feature.properties.hdop||null,e.vdop=t.feature.properties.vdop||null,e.pdop=t.feature.properties.pdop||null,e.ageOfGpsData=t.feature.properties.ageOfGpsData||null,e.dgpsid=t.feature.properties.dgpsid||null,e.lat=t.feature.geometry.coordinates[1],e.lon=t.feature.geometry.coordinates[0],e.ele=t.feature.geometry.coordinates[2]||null,this.gpx.updateBounds(e),e}setTracks(i,t){if(t)t.forEach(e=>{i[e]&&this.gpx.trk.push(this.packageTrack(e,i[e]))});else for(let e in i)this.gpx.trk.push(this.packageTrack(e,i[e]))}packageTrack(i,t){let e=new he;e.extensions=e.extensions||{},e.extensions.signalk={},e.extensions.signalk.uuid=i,e.name=t.feature.properties.name||null,e.desc=t.feature.properties.description||null,e.cmt=t.feature.properties.cmt||null,e.src=t.feature.properties.src||null,e.number=t.feature.properties.number||null,e.type=t.feature.properties.type||null;for(let a of t.feature.geometry.coordinates){let n=new fe;for(let o of a){let u=new w;u.lon=o[0],u.lat=o[1],u.ele=o[2]||null,n.trkpt.push(u),this.gpx.updateBounds(u)}e.trkseg.push(n)}return e}};var S=class l{resultSource;result$;sk2gpx;hasFSA;signalk=D(re);constructor(){this.resultSource=new E,this.result$=this.resultSource.asObservable(),this.hasFSA="showOpenFilePicker"in window}clear(){this.sk2gpx=null}prepData(i){let t={routes:[],waypoints:[],tracks:[]},e=1;return t.routes=i.routes.map(a=>{let n=a[1];return n.feature.id=a[0],n}),e=1,t.waypoints=i.waypoints.map(a=>{let n=a[1];return n.feature.id=a[0],n.name=n.name??`Wpt: ${e}`,e++,n}),t.tracks=i.tracks,t}saveToFile(i,t){this.sk2gpx=new P;let e={},a={},n={};for(let o=0;o<t.rte.selected.length;o++)t.rte.selected[o]&&(e[i.routes[o].feature.id]=i.routes[o]);this.sk2gpx.setRoutes(e);for(let o=0;o<t.wpt.selected.length;o++)t.wpt.selected[o]&&(a[i.waypoints[o].feature.id]=i.waypoints[o]);this.sk2gpx.setWaypoints(a);for(let o=0;o<t.trk.selected.length;o++)if(t.trk.selected[o]){let u=this.signalk.uuid;n[u]=new ce,n[u].feature.id=u,n[u].feature.properties.name=`Vessel trail: ${Date().toString()}`,n[u].feature.geometry.coordinates.push(i.tracks[o])}this.sk2gpx.setTracks(n),this.hasFSA?this.fsaSaveFile():this.legacySaveToFile()}legacySaveToFile(){let i=new Blob([this.sk2gpx.toXML()],{type:"text/xml"}),t=document.createElement("a");t.href=URL.createObjectURL(i),t.download="fb_export.gpx",t.click(),URL.revokeObjectURL(t.href),t.remove(),this.resultSource.next(-1)}fsaSaveFile(){window.showSaveFilePicker({types:[{description:"GPX file",accept:{"text/xml":[".gpx"]}}]}).then(i=>{i.createWritable().then(t=>{let e=new Blob([this.sk2gpx.toXML()]);t.write(e).then(()=>{t.close(),this.resultSource.next(0)})}).catch(t=>{console.warn(t),this.resultSource.next(1)})}).catch(()=>{this.resultSource.next(-1)})}static \u0275fac=function(t){return new(t||l)};static \u0275prov=R({token:l,factory:l.\u0275fac,providedIn:"root"})};function _e(l,i){if(l&1){let t=x();s(0,"div",18)(1,"div",19),c(2),r(),s(3,"div",20)(4,"mat-checkbox",21,0),g("change",function(){let a=m(t).$index,n=T(5),o=d(2);return h(o.checkWpt(n.checked,a))}),r()()()}if(l&2){let t=i.$implicit,e=i.$index,a=d(2);p(2),W(t.name),p(2),f("checked",a.selWaypoints[e])}}function ke(l,i){if(l&1){let t=x();s(0,"div",11)(1,"mat-expansion-panel",12),g("opened",function(){m(t);let a=d();return h(a.display.expand.waypoints=!0)})("closed",function(){m(t);let a=d();return h(a.display.expand.waypoints=!1)}),s(2,"mat-expansion-panel-header",13)(3,"mat-panel-title")(4,"mat-icon",14),c(5,"place"),r(),c(6," \xA0"),s(7,"b"),c(8,"Waypoints:"),r()(),s(9,"mat-panel-description")(10,"div",15)(11,"mat-checkbox",16),g("change",function(a){m(t);let n=d();return h(n.checkWpt(a.checked,-1))})("click",function(a){return a.cancelBubble=!0}),r()()()(),s(12,"div",17),b(13,_e,6,2,"div",18,v),r()()()}if(l&2){let t=d();p(),f("expanded",t.display.expand.waypoints),p(10),f("indeterminate",t.display.someWptChecked)("checked",t.display.allWaypointsChecked)("disabled",t.resData.waypoints.length===0),p(2),C(t.resData.waypoints)}}function ve(l,i){if(l&1){let t=x();s(0,"div",18)(1,"div",19)(2,"mat-icon",22),c(3,"directions"),r(),c(4),r(),s(5,"div",20)(6,"mat-checkbox",24,1),g("change",function(){let a=m(t).$index,n=T(7),o=d(2);return h(o.checkRte(n.checked,a))}),r()()()}if(l&2){let t=i.$implicit,e=i.$index,a=d(2);p(4),G(" ",t.name," "),p(2),f("checked",a.selRoutes[e])}}function be(l,i){if(l&1){let t=x();s(0,"div",11)(1,"mat-expansion-panel",12),g("opened",function(){m(t);let a=d();return h(a.display.expand.routes=!0)})("closed",function(){m(t);let a=d();return h(a.display.expand.routes=!1)}),s(2,"mat-expansion-panel-header",13)(3,"mat-panel-title")(4,"mat-icon",22),c(5,"directions"),r(),c(6," \xA0"),s(7,"b"),c(8,"Routes:"),r()(),s(9,"mat-panel-description")(10,"div",15)(11,"mat-checkbox",23),g("change",function(a){m(t);let n=d();return h(n.checkRte(a.checked,-1))})("click",function(a){return a.cancelBubble=!0}),r()()()(),s(12,"div",17),b(13,ve,8,2,"div",18,v),r()()()}if(l&2){let t=d();p(),f("expanded",t.display.expand.routes),p(10),f("indeterminate",t.display.someRteChecked)("checked",t.display.allRoutesChecked)("disabled",t.resData.routes.length==0),p(2),C(t.resData.routes)}}function Ce(l,i){if(l&1){let t=x();s(0,"div",18)(1,"div",19)(2,"mat-icon",26),c(3,"directions_boat"),r(),c(4," Vessel Trail "),r(),s(5,"div",20)(6,"mat-checkbox",28,2),g("change",function(){let a=m(t).$index,n=T(7),o=d(2);return h(o.checkTrk(n.checked,a))}),r()()()}if(l&2){let t=i.$index,e=d(2);p(6),f("checked",e.selTracks[t])}}function Te(l,i){if(l&1){let t=x();s(0,"div",11)(1,"mat-expansion-panel",25)(2,"mat-expansion-panel-header",13)(3,"mat-panel-title")(4,"mat-icon",26),c(5,"show_chart"),r(),c(6," \xA0"),s(7,"b"),c(8,"Tracks:"),r()(),s(9,"mat-panel-description")(10,"div",15)(11,"mat-checkbox",27),g("change",function(a){m(t);let n=d();return h(n.checkTrk(a.checked,-1))})("click",function(a){return a.cancelBubble=!0}),r()()()(),s(12,"div",17),b(13,Ce,8,1,"div",18,v),r()()()}if(l&2){let t=d();p(),f("expanded",!1),p(10),f("indeterminate",!1)("checked",t.display.allTracksChecked)("disabled",t.resData.tracks.length==0),p(2),C(t.resData.tracks)}}var ge=class l{constructor(i,t,e,a,n){this.app=i;this.skres=t;this.facade=e;this.dialogRef=a;this.data=n}resData={routes:[],waypoints:[],tracks:[]};selRoutes=[];selectedRoute=null;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(){this.loadResources(),this.unsubscribe.push(this.facade.result$.subscribe(i=>{this.dialogRef.close(i)}))}ngOnDestroy(){this.unsubscribe.forEach(i=>i.unsubscribe()),this.facade.clear()}loadResources(){return M(this,null,function*(){this.data.routes.sort((i,t)=>i[1].name.localeCompare(t[1].name));try{this.app.sIsFetching.set(!0);let i=yield this.skres.listFromServer("waypoints");i.sort((t,e)=>t[1].name.localeCompare(e[1].name)),this.data.waypoints=i,this.app.sIsFetching.set(!1)}catch(i){this.app.sIsFetching.set(!1),this.resData.waypoints=[]}this.parseResourceData()})}save(){this.facade.saveToFile(this.resData,{rte:{selected:this.selRoutes},wpt:{selected:this.selWaypoints},trk:{selected:this.selTracks}})}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.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.selTracks.push(!1)}checkRte(i,t=-1){let e=0;if(t!==-1){this.selRoutes[t]=i,this.display.saveRoutesOK=i;for(let a of this.selRoutes)a&&e++;this.display.saveRoutesOK=e!==0,this.display.selCount.routes=e,this.display.allRoutesChecked=e===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||e===0)}checkWpt(i,t=-1){let e=0;if(t!==-1){this.selWaypoints[t]=i,this.display.saveWaypointsOK=i;for(let a of this.selWaypoints)a&&e++;this.display.saveWaypointsOK=e!==0,this.display.selCount.waypoints=e,this.display.allWaypointsChecked=e===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||e===0)}checkTrk(i,t=-1){let e=0;if(t!==-1){this.selTracks[t]=i,this.display.saveTracksOK=i;for(let a of this.selTracks)a&&e++;this.display.saveTracksOK=e!==0,this.display.selCount.tracks=e,this.display.allTracksChecked=e===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||e===0)}static \u0275fac=function(t){return new(t||l)(y(pe),y(de),y(S),y(X),y(F))};static \u0275cmp=O({type:l,selectors:[["gpxsave-dialog"]],decls:18,vars:4,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"],["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"],[3,"expanded"],[1,"icon-track"],["matTooltip","Vessel Trail to Track","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],["matTooltip","Select this Track","matTooltipPosition","below",3,"change","checked"]],template:function(t,e){t&1&&(s(0,"div",3)(1,"mat-toolbar",4)(2,"div",5)(3,"div")(4,"button",6),g("click",function(){return e.save()}),s(5,"mat-icon"),c(6,"save"),r(),c(7,"\xA0Save\xA0 "),r()(),s(8,"div",7),c(9,"Export to GPX"),r(),s(10,"div",8)(11,"button",9),g("click",function(){return e.dialogRef.close(-1)}),s(12,"mat-icon"),c(13,"close"),r()()()()(),s(14,"div",10),_(15,ke,15,4,"div",11),_(16,be,15,4,"div",11),_(17,Te,15,4,"div",11),r()()),t&2&&(p(4),f("disabled",!e.display.saveRoutesOK&&!e.display.saveWaypointsOK&&!e.display.saveTracksOK),p(11),k(e.resData.waypoints.length!==0?15:-1),p(),k(e.resData.routes.length!==0?16:-1),p(),k(!e.app.data.serverTrail&&e.resData.tracks.length!==0?17:-1))},dependencies:[oe,se,z,I,V,j,A,$,B,K,q,Y,Z,H,ne,ee,te,ae,ie,Q,J,N,U,L],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}@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{ge as GPXExportDialog};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ra,c as za,d as Wa}from"./chunk-
|
|
1
|
+
import{a as Ra,c as za,d as Wa}from"./chunk-QYCAVSMC.js";import{c as ja,e as Ka,f as Ga,g as Tt,h as st,i as qa,j as lt,k as Qa,l as Ua,m as Xa,n as $a,o as Za}from"./chunk-PEC6ZGZT.js";import{$ as ea,$a as N,$c as ke,$d as Na,Ac as et,Bd as Aa,Ca as M,Cc as le,Cd as Sa,Da as B,Dc as Ye,Dd as xa,Ea as H,Ed as Ea,F as ue,G as ut,Ga as Ne,Gb as ra,H as R,Ha as J,Ia as ee,Ic as Ct,J as _t,Ja as u,Jc as da,Jd as Ia,K as De,Ka as d,Kb as Ze,Kc as O,L as _e,La as c,Lc as ca,Ld as nt,M as S,Ma as k,Mc as Me,Md as St,N as Jt,Na as F,Nc as pa,Nd as Ta,O as s,Oa as L,Od as Be,P as b,Pa as ia,Pc as tt,Q as y,Qc as ha,R as ge,Rc as ma,Rd as rt,S as gt,Sc as ua,T as X,Ta as te,Tc as at,Td as Va,U as Ge,Ua as ae,Ub as V,Uc as wt,Ud as Oa,Va as g,Vc as Mt,Vd as Fa,W as h,Wa as Qe,Wb as A,Wc as it,Wd as Pa,X as Pe,Xa as m,Xb as yt,Xd as La,Y as f,Ya as ye,Yd as ot,Za as ie,Zc as _a,_ as $,_a as Ue,_c as ga,_d as xt,a as K,ab as v,ad as fa,ae as Et,ba as P,bb as D,c as C,ce as Ya,fb as Xe,fe as It,gb as $e,gd as ba,h as je,hb as x,hd as ya,ia as l,id as va,ie as Ba,ja as Ce,jb as oe,jc as Je,k as mt,kb as p,ke as Ha,lb as E,lc as vt,ma as fe,mb as se,mc as oa,md as kt,n as Zt,nb as bt,nc as ve,nd as Da,oa as ta,ob as G,pa as qe,pb as q,pc as Dt,qa as w,qb as Q,qd as de,r as re,ra as be,rc as ne,rd as Ca,s as Fe,sa as Z,tc as we,ua as ft,va as Le,vb as U,vc as sa,vd as wa,wb as na,wd as At,xa as aa,xc as la,xd as Ma,y as Ke,yd as ka}from"./chunk-XKSYGWTR.js";import{a as me,b as $t}from"./chunk-EQVTEUXC.js";var ki=["text"],Ai=[[["mat-icon"]],"*"],Si=["mat-icon","*"];function xi(n,o){if(n&1&&k(0,"mat-pseudo-checkbox",1),n&2){let e=m();u("disabled",e.disabled)("state",e.selected?"checked":"unchecked")}}function Ei(n,o){if(n&1&&k(0,"mat-pseudo-checkbox",3),n&2){let e=m();u("disabled",e.disabled)}}function Ii(n,o){if(n&1&&(d(0,"span",4),p(1),c()),n&2){let e=m();l(),se("(",e.group.label,")")}}var Ot=new S("MAT_OPTION_PARENT_COMPONENT"),Rt=new S("MatOptgroup");var Vt=class{source;isUserInput;constructor(o,e=!1){this.source=o,this.isUserInput=e}},Se=(()=>{class n{_element=s(P);_changeDetectorRef=s(V);_parent=s(Ot,{optional:!0});group=s(Rt,{optional:!0});_signalDisableRipple=!1;_selected=!1;_active=!1;_mostRecentViewValue="";get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}value;id=s(le).getId("mat-option-");get disabled(){return this.group&&this.group.disabled||this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=f(!1);get disableRipple(){return this._signalDisableRipple?this._parent.disableRipple():!!this._parent?.disableRipple}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}onSelectionChange=new h;_text;_stateChanges=new C;constructor(){let e=s(ve);e.load(nt),e.load(ke),this._signalDisableRipple=!!this._parent&&aa(this._parent.disableRipple)}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(e=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}deselect(e=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}focus(e,t){let a=this._getHostElement();typeof a.focus=="function"&&a.focus(t)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!O(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=this.multiple?!this._selected:!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=e)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new Vt(this,e))}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=w({type:n,selectors:[["mat-option"]],viewQuery:function(t,a){if(t&1&&N(ki,7),t&2){let i;v(i=D())&&(a._text=i.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(t,a){t&1&&g("click",function(){return a._selectViaInteraction()})("keydown",function(r){return a._handleKeydown(r)}),t&2&&(ae("id",a.id),M("aria-selected",a.selected)("aria-disabled",a.disabled.toString()),x("mdc-list-item--selected",a.selected)("mat-mdc-option-multiple",a.multiple)("mat-mdc-option-active",a.active)("mdc-list-item--disabled",a.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",A]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],ngContentSelectors:Si,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,a){t&1&&(ye(Ai),B(0,xi,1,2,"mat-pseudo-checkbox",1),ie(1),d(2,"span",2,0),ie(4,1),c(),B(5,Ei,1,1,"mat-pseudo-checkbox",3),B(6,Ii,2,1,"span",4),k(7,"div",5)),t&2&&(H(a.multiple?0:-1),l(5),H(!a.multiple&&a.selected&&!a.hideSingleSelectionIndicator?5:-1),l(),H(a.group&&a.group._inert?6:-1),l(),u("matRippleTrigger",a._getHostElement())("matRippleDisabled",a.disabled||a.disableRipple))},dependencies:[za,Ia],styles:[`.mat-mdc-option {
|
|
2
2
|
-webkit-user-select: none;
|
|
3
3
|
user-select: none;
|
|
4
4
|
-moz-osx-font-smoothing: grayscale;
|