@signalk/freeboard-sk 3.1.0 → 3.2.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plugin/alarms/alarms.js +9 -5
- package/plugin/lib/fetch.js +1 -1
- package/public/assets/features-corpus.json +1 -1
- package/public/assets/help/index.html +27 -4
- package/public/{chunk-4WQJ5OCH.js → chunk-2RJKLB5L.js} +62 -62
- package/public/chunk-B5SN3ZBN.js +80 -0
- package/public/{chunk-JWF7HEH3.js → chunk-DDECKPFC.js} +1 -1
- package/public/{chunk-DXGM3UI4.js → chunk-HB342AB6.js} +1 -1
- package/public/{chunk-R2B7EL5S.js → chunk-JOTL4UUV.js} +1 -1
- package/public/{chunk-2BZ663DE.js → chunk-L3MJOGJ2.js} +1 -1
- package/public/{chunk-KOKEUVWV.js → chunk-OU4PGUT3.js} +1 -1
- package/public/chunk-TEKC7VXV.js +1 -0
- package/public/{chunk-DN47TOA6.js → chunk-TVMAD5AZ.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-L4CGDOIX.js → main-WYFYYBYG.js} +8 -8
- package/public/{worker-L3MMILBY.js → worker-2AV5I4KP.js} +1 -1
- package/public/{worker-DXJYWOSS.js → worker-WYGJSPFM.js} +3 -3
- package/public/worker-XSMNG74L.js +3 -0
- package/public/chunk-5FQJDXLT.js +0 -1
- package/public/chunk-GECNK37G.js +0 -80
- package/public/worker-RQRJAJAB.js +0 -3
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import{f as y}from"./chunk-6H3I7D5M.js";var b=a=>typeof Worker>"u"?Promise.reject(new Error("Error starting Worker!")):new Promise((t,e)=>{let n=new Worker(new URL("worker-5LIQ6F6U.js",import.meta.url),{type:"module"}),i=s=>{n.terminate(),s?t(s):e(new Error("Error processing content!"))};n.onmessage=s=>i(s.data),n.onerror=()=>i(null),n.postMessage({sourceType:"xml",value:a})});function o(a,t){if(typeof a!="string"||a.trim()==="")return t;let e=Number(a);return Number.isFinite(e)?e:t}var g=class{version;creator;wpt;rte;trk;extensions;metadata;constructor(){this.init()}init(){this.version="1.1",this.creator="@panaaj",this.wpt=[],this.rte=[],this.trk=[],this.extensions={},this.metadata=new m}stringify(){return this.toXML()}toXML(){let t=`<?xml version="1.0" encoding="UTF-8"?>\r
|
|
2
|
+
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="${this.version}" xmlns="http://www.topografix.com/GPX/1/1" creator="${this.creator}" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.topografix.com/GPX/Private/TopoGrafix/0/1 http://www.topografix.com/GPX/Private/TopoGrafix/0/1/topografix.xsd" xmlns:topografix="http://www.topografix.com/GPX/Private/TopoGrafix/0/1">\r
|
|
3
|
+
`+this.metadataToXML()+this.waypointsToXML()+this.routesToXML()+this.tracksToXML();return t+=this.extensionsToXML(this.extensions),t+=`</gpx>\r
|
|
4
|
+
`,t}metadataToXML(){let t=` <metadata>\r
|
|
5
|
+
<name>${this.metadata.name||""}</name>\r
|
|
6
|
+
<desc>${this.metadata.desc||""}</desc>\r
|
|
7
|
+
<time>${this.metadata.time||""}</time>\r
|
|
8
|
+
`;return t+=this.metadata.keywords?` <keywords>${this.metadata.keywords||""}</keywords>\r
|
|
9
|
+
`:"",this.metadata.author&&(t+=` <author>\r
|
|
10
|
+
<name>${this.metadata.author.name||""}</name>\r
|
|
11
|
+
<email>\r
|
|
12
|
+
<id>${this.metadata.author.email.id||""}</id>\r
|
|
13
|
+
<domain>${this.metadata.author.email.domain||""}</domain>\r
|
|
14
|
+
</email>\r
|
|
15
|
+
<link href="${this.metadata.author.link.href||""}">\r
|
|
16
|
+
<text>${this.metadata.author.link.text||""}</text>\r
|
|
17
|
+
<type>${this.metadata.author.link.type||""}</type>\r
|
|
18
|
+
</link>\r
|
|
19
|
+
</author>\r
|
|
20
|
+
`),this.metadata.copyright&&(t+=` <copyright author="${this.metadata.copyright||""}">\r
|
|
21
|
+
<year>${this.metadata.copyright.year||""}</year>\r
|
|
22
|
+
<license>${this.metadata.copyright.license||""}</license>\r
|
|
23
|
+
</copyright>\r
|
|
24
|
+
`),this.metadata.link.forEach(e=>{t+=` <link href="${e.href||""}">\r
|
|
25
|
+
<text>${e.text||""}</text>\r
|
|
26
|
+
<type>${e.type||""}</type>\r
|
|
27
|
+
</link>\r
|
|
28
|
+
`}),t+=` <bounds minlat="${this.metadata.bounds.minLat}" minlon="${this.metadata.bounds.minLon}" maxlat="${this.metadata.bounds.maxLat}" maxlon="${this.metadata.bounds.maxLon}"></bounds>\r
|
|
29
|
+
`,t+=this.extensionsToXML(this.metadata.extensions,2),t+=` </metadata>\r
|
|
30
|
+
`,t}waypointsToXML(){let t="";for(let e of this.wpt)t+=this.ptToXML(e,"wpt");return t}routesToXML(){let t="";return this.rte.forEach(e=>{t+=` <rte>\r
|
|
31
|
+
`,t+=e.name?` <name>${e.name||""}</name>\r
|
|
32
|
+
`:"",t+=e.cmt?` <cmt>${e.cmt||""}</cmt>\r
|
|
33
|
+
`:"",t+=e.desc?` <desc>${e.desc||""}</desc>\r
|
|
34
|
+
`:"",t+=e.src?` <src>${e.src||""}</src>\r
|
|
35
|
+
`:"",t+=e.number?` <number>${e.number||""}</number>\r
|
|
36
|
+
`:"",t+=e.type?` <type>${e.type||""}</type>\r
|
|
37
|
+
`:"",e.link.forEach(n=>{t+=` <link href="${n.href||""}">\r
|
|
38
|
+
<text>${n.text||""}</text>\r
|
|
39
|
+
<type>${n.type||""}</type>\r
|
|
40
|
+
</link>\r
|
|
41
|
+
`}),t+=this.extensionsToXML(e.extensions,2);for(let n of e.rtept)t+=this.ptToXML(n,"rtept");t+=` </rte>\r
|
|
42
|
+
`}),t}tracksToXML(){let t="";return this.trk.forEach(e=>{t+=` <trk>\r
|
|
43
|
+
`,t+=e.name?` <name>${e.name||""}</name>\r
|
|
44
|
+
`:"",t+=e.cmt?` <cmt>${e.cmt||""}</cmt>\r
|
|
45
|
+
`:"",t+=e.desc?` <desc>${e.desc||""}</desc>\r
|
|
46
|
+
`:"",t+=e.src?` <src>${e.src||""}</src>\r
|
|
47
|
+
`:"",t+=e.number?` <number>${e.number||""}</number>\r
|
|
48
|
+
`:"",t+=e.type?` <type>${e.type||""}</type>\r
|
|
49
|
+
`:"",t+=this.extensionsToXML(e.extensions,2),e.trkseg.forEach(n=>{t+=` <trkseg>\r
|
|
50
|
+
`;for(let i of n.trkpt)t+=this.ptToXML(i,"trkpt");t+=` </trkseg>\r
|
|
51
|
+
`}),t+=` </trk>\r
|
|
52
|
+
`}),t}ptToXML(t,e){let n="",i=2;switch(e){case"trkpt":n=" ",i=4;break;case"rtept":n=" ",i=3;break}let s="";return s+=`${n} <${e} lat="${t.lat.toFixed(6)}" lon="${t.lon.toFixed(6)}">\r
|
|
53
|
+
`,s+=t.sym?`${n} <sym>${t.sym||""}</sym>\r
|
|
54
|
+
`:"",s+=t.name?`${n} <name>${t.name||""}</name>\r
|
|
55
|
+
`:"",s+=t.cmt?`${n} <cmt>${t.cmt||""}</cmt>\r
|
|
56
|
+
`:"",s+=t.desc?`${n} <desc>${t.desc||""}</desc>\r
|
|
57
|
+
`:"",s+=t.src?`${n} <src>${t.src||""}</src>\r
|
|
58
|
+
`:"",s+=t.type?`${n} <type>${t.type||""}</type>\r
|
|
59
|
+
`:"",s+=t.time?`${n} <time>${t.datetime||""}</time>\r
|
|
60
|
+
`:"",s+=t.fix?`${n} <fix>${t.fix||""}</fix>\r
|
|
61
|
+
`:"",s+=t.ele?`${n} <ele>${t.ele||""}</ele>\r
|
|
62
|
+
`:"",s+=t.magvar?`${n} <magvar>${t.magvar||""}</magvar>\r
|
|
63
|
+
`:"",s+=t.geoidHeight?`${n} <geoidheight>${t.geoidHeight||""}</geoidheight>\r
|
|
64
|
+
`:"",s+=t.sat?`${n} <sat>${t.sat||""}</sat>\r
|
|
65
|
+
`:"",s+=t.vdop?`${n} <vdop>${t.vdop||""}</vdop>\r
|
|
66
|
+
`:"",s+=t.hdop?`${n} <hdop>${t.hdop||""}</hdop>\r
|
|
67
|
+
`:"",s+=t.pdop?`${n} <pdop>${t.pdop||""}</pdop>\r
|
|
68
|
+
`:"",s+=t.ageOfGpsData?`${n} <ageofdgpsdata>${t.ageOfGpsData||""}</ageofdgpsdata>\r
|
|
69
|
+
`:"",s+=t.dgpsid?`${n} <dgpsid>${t.dgpsid||""}</dgpsid>\r
|
|
70
|
+
`:"",t.link.forEach(r=>{s+=`${n} <link href="${r.href||""}">\r
|
|
71
|
+
${n} <text>${r.text||""}</text>\r
|
|
72
|
+
${n} <type>${r.type||""}</type>\r
|
|
73
|
+
${n} </link>\r
|
|
74
|
+
`}),s+=this.extensionsToXML(t.extensions,i),s+=`${n} </${e}>\r
|
|
75
|
+
`,s}extensionsToXML(t,e=1){let n="";if(t&&Object.keys(t).length!==0){let i=" ".slice(0-e),s="";t.signalk&&Object.keys(t.signalk).forEach(r=>{s+=`${i} <${r}>${t.signalk[r]}</${r}>\r
|
|
76
|
+
`}),n+=`${i}<extensions>\r
|
|
77
|
+
${i} <signalk>\r
|
|
78
|
+
`+s+`${i} </signalk>\r
|
|
79
|
+
${i}</extensions>\r
|
|
80
|
+
`}return n}xValue(t){if(t&&Array.isArray(t))return t.length!==0?t[0]:null}applyBounds(t){let e=t?.$??{},n=this.metadata.bounds;n.minLat=o(e.minlat,n.minLat),n.minLon=o(e.minlon,n.minLon),n.maxLat=o(e.maxlat,n.maxLat),n.maxLon=o(e.maxlon,n.maxLon)}parse(t){return y(this,null,function*(){if(!t||t.indexOf("<gpx")===-1)return!1;this.init();try{let e=yield b(t);if(e.gpx.metadata){let n=this.xValue(e.gpx.metadata);this.metadata.name=n.name?this.xValue(n.name):null,this.metadata.desc=n.desc?this.xValue(n.desc):null,this.metadata.keywords=n.keywords?n.keywords:null,n.bounds&&this.applyBounds(this.xValue(n.bounds)),this.metadata.extensions=n.extensions?this.parseExtensions(n.extensions):{}}return e.gpx.wpt&&this.parseWaypoints(e.gpx.wpt),e.gpx.rte&&this.parseRoutes(e.gpx.rte),e.gpx.trk&&this.parseTracks(e.gpx.trk),this.extensions=e.gpx.extensions?this.parseExtensions(e.gpx.extensions):{},!0}catch(e){return!1}})}parseWaypoints(t){if(Array.isArray(t))t.forEach(e=>{let n=this.toWpt(e);this.updateBounds(n),this.wpt.push(n)});else{let e=this.toWpt(t);this.updateBounds(e),this.wpt.push(e)}}parseRoutes(t){if(Array.isArray(t))t.forEach(e=>{let n=this.toRte(e);this.updateBounds(n),this.rte.push(n)});else{let e=this.toRte(t);this.updateBounds(e),this.rte.push(e)}}parseTracks(t){if(Array.isArray(t))t.forEach(e=>{let n=this.toTrk(e);this.updateBounds(n),this.trk.push(n)});else{let e=this.toTrk(t);this.updateBounds(e),this.trk.push(e)}}parseExtensions(t){if(!t)return{};if(!Array.isArray(t))return{};let e={};return t.forEach(n=>{if(n.signalk){let i={},s=this.xValue(n.signalk);Object.keys(s).forEach(r=>{i[r]=this.xValue(s[r])}),e.signalk=i}}),e}parseLinks(t){let e=[];if(!t)return e;if(Array.isArray(t))t.forEach(n=>{let i=new u;i.href=n._href,i.text=n.text,i.type=n.type,e.push(i)});else{let n=new u;n.href=t._href,n.text=t.text,n.type=t.type,e.push(n)}return e}toRte(t){let e=new h;return e.name=t.name?this.xValue(t.name):null,e.cmt=t.cmt?this.xValue(t.cmt):null,e.desc=t.desc?this.xValue(t.desc):null,e.src=t.src?this.xValue(t.src):null,e.extensions=t.extensions?this.parseExtensions(t.extensions):{},t.rtept&&(e.rtept=this.toPtArray(t.rtept)),e}toWpt(t){let e=new p;return e.lat=Number(t.$.lat)||0,e.lon=Number(t.$.lon)||0,e.ele=t.ele?Number(this.xValue(t.ele)):null,e.sym=t.sym?this.xValue(t.sym):null,e.name=t.name?this.xValue(t.name):null,e.cmt=t.cmt?this.xValue(t.cmt):null,e.desc=t.desc?this.xValue(t.desc):null,e.src=t.src?this.xValue(t.src):null,e.type=t.type?this.xValue(t.type):null,e.extensions=t.extensions?this.parseExtensions(t.extensions):{},e}toTrk(t){let e=new l;if(e.name=t.name?this.xValue(t.name):null,e.cmt=t.cmt?this.xValue(t.cmt):null,e.desc=t.desc?this.xValue(t.desc):null,e.src=t.src?this.xValue(t.src):null,e.number=t.number?Number(this.xValue(t.number)):null,e.type=t.type?this.xValue(t.type):null,e.extensions=t.extensions?this.parseExtensions(t.extensions):{},t.trkseg)if(Array.isArray(t.trkseg))t.trkseg.forEach(n=>{let i=new c;i.extensions=n.extensions?this.parseExtensions(n.extensions):{},n.trkpt&&(i.trkpt=this.toPtArray(n.trkpt)),e.trkseg.push(i)});else{let n=new c;n.extensions=t.trkseg.extensions?this.parseExtensions(t.trkseg.extensions):{},t.trkseg.trkpt&&(n.trkpt=this.toPtArray(t.trkseg.trkpt)),e.trkseg.push(n)}return e}toPtArray(t){let e=[];if(Array.isArray(t))t.forEach(n=>{let i=this.toWpt(n);this.updateBounds(i),e.push(i)});else{let n=this.toWpt(t);this.updateBounds(n),e.push(n)}return e}setExtension(t,e,n){t.extensions||(t.extensions={});let i=e.split("."),s=t.extensions;i.forEach(r=>{s[r]||(s[r]={}),s=s[r]}),t.extensions.signalk.uuid=n}updateBounds(t){this.metadata.bounds.minLat=t.lat<this.metadata.bounds.minLat?t.lat:this.metadata.bounds.minLat,this.metadata.bounds.minLon=t.lon<this.metadata.bounds.minLon?t.lon:this.metadata.bounds.minLon,this.metadata.bounds.maxLat=t.lat>this.metadata.bounds.maxLat?t.lat:this.metadata.bounds.maxLat,this.metadata.bounds.maxLon=t.lon>this.metadata.bounds.maxLon?t.lon:this.metadata.bounds.maxLon}},p=class{lat;lon;ele;datetime;magvar;geoidHeight;name;cmt;desc;src;link=[];sym;type;fix;sat;hdop;vdop;pdop;ageOfGpsData;dgpsid;extensions={};constructor(t,e){this.lat=t||0,this.lon=e||0}},h=class{name;cmt;desc;src;link=[];number;type;extensions={};rtept=[];constructor(t){this.name=t||""}},l=class{name;cmt;desc;src;link=[];number;type;extensions={};trkseg=[];constructor(t){this.name=t||""}},c=class{trkpt=[];extensions={}};var m=class{name="";desc="";author;copyright;link=[];time=new Date().toISOString();keywords="";bounds=new d;extensions={}},u=class{href="";text="";type=""};var d=class{minLat=90;minLon=180;maxLat=-90;maxLon=-180};export{g as a,p as b,h as c,l as d,c as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Da as a}from"./chunk-
|
|
1
|
+
import{Da as a}from"./chunk-2RJKLB5L.js";import"./chunk-NDDO5DKA.js";import"./chunk-PSRS6NXJ.js";import"./chunk-WXOWBQXR.js";import"./chunk-SOVFTS2B.js";import"./chunk-VSWAOYSI.js";import"./chunk-PGHE7FOF.js";import"./chunk-7UXFP343.js";import"./chunk-TGPAYIRR.js";import"./chunk-7Z4ZZM32.js";import"./chunk-JH5KSRZ6.js";import"./chunk-6H3I7D5M.js";export{a as Trail2RouteDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ca as a}from"./chunk-
|
|
1
|
+
import{Ca as a}from"./chunk-2RJKLB5L.js";import"./chunk-NDDO5DKA.js";import"./chunk-PSRS6NXJ.js";import"./chunk-WXOWBQXR.js";import"./chunk-SOVFTS2B.js";import"./chunk-VSWAOYSI.js";import"./chunk-PGHE7FOF.js";import"./chunk-7UXFP343.js";import"./chunk-TGPAYIRR.js";import"./chunk-7Z4ZZM32.js";import"./chunk-JH5KSRZ6.js";import"./chunk-6H3I7D5M.js";export{a as GeoJSONImportDialog};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as pe}from"./chunk-
|
|
1
|
+
import{a as pe}from"./chunk-B5SN3ZBN.js";import{D as re,f as j,g as N,h as Y,i as Z,j as ee,k as te,l as ie,r as oe,w as se,z as le}from"./chunk-2RJKLB5L.js";import{a as H,b as ne,c as ae}from"./chunk-NDDO5DKA.js";import{a as A,b as L}from"./chunk-PSRS6NXJ.js";import{i as U,j as z,k as q}from"./chunk-WXOWBQXR.js";import"./chunk-SOVFTS2B.js";import{a as B}from"./chunk-VSWAOYSI.js";import"./chunk-PGHE7FOF.js";import"./chunk-7UXFP343.js";import"./chunk-TGPAYIRR.js";import{j as J,o as Q}from"./chunk-7Z4ZZM32.js";import{Dd as E,Ea as f,Ed as G,Fa as x,Ha as b,Hd as R,Ia as v,Ja as T,Jd as X,Ka as u,La as a,Ma as o,Na as C,P as y,Q as d,R as m,Rd as O,Td as W,Ua as _,Wa as h,Wd as V,Ya as p,Yd as F,Zd as K,gb as w,ja as l,lb as r,mb as P,nb as M,oa as D,ob as S,pe as $,ra as I}from"./chunk-JH5KSRZ6.js";import{f as k}from"./chunk-6H3I7D5M.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}data;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-GECNK37G.js";import{C as ce,D as de,g as z,h as ee,i as te,j as ie,k as ae,l as ne,r as re,v as le,z as pe}from"./chunk-4WQJ5OCH.js";import{a as N,b as se,c as oe}from"./chunk-NDDO5DKA.js";import{b as H}from"./chunk-PSRS6NXJ.js";import{i as q,j as J,k as Q}from"./chunk-WXOWBQXR.js";import"./chunk-SOVFTS2B.js";import{a as U}from"./chunk-VSWAOYSI.js";import"./chunk-PGHE7FOF.js";import"./chunk-7UXFP343.js";import"./chunk-TGPAYIRR.js";import{j as Y,o as Z}from"./chunk-7Z4ZZM32.js";import{Dd as X,Ea as _,Ed as F,Fa as k,Ha as v,Hd as V,Ia as b,Ja as C,Jd as I,Ka as f,L as R,La as s,Ma as r,P as D,Q as m,R as h,Rd as K,Td as B,Ua as x,Wa as g,Wd as $,Ya as d,Yd as A,Zd as j,c as E,gb as T,ja as p,lb as c,mb as W,nb as G,oa as y,pe as L,ra as O}from"./chunk-JH5KSRZ6.js";import{f as M}from"./chunk-6H3I7D5M.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}app;skres;facade;dialogRef;data;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-B5SN3ZBN.js";import{C as ce,D as de,g as z,h as ee,i as te,j as ie,k as ae,l as ne,r as re,v as le,z as pe}from"./chunk-2RJKLB5L.js";import{a as N,b as se,c as oe}from"./chunk-NDDO5DKA.js";import{b as H}from"./chunk-PSRS6NXJ.js";import{i as q,j as J,k as Q}from"./chunk-WXOWBQXR.js";import"./chunk-SOVFTS2B.js";import{a as U}from"./chunk-VSWAOYSI.js";import"./chunk-PGHE7FOF.js";import"./chunk-7UXFP343.js";import"./chunk-TGPAYIRR.js";import{j as Y,o as Z}from"./chunk-7Z4ZZM32.js";import{Dd as X,Ea as _,Ed as F,Fa as k,Ha as v,Hd as V,Ia as b,Ja as C,Jd as I,Ka as f,L as R,La as s,Ma as r,P as D,Q as m,R as h,Rd as K,Td as B,Ua as x,Wa as g,Wd as $,Ya as d,Yd as A,Zd as j,c as E,gb as T,ja as p,lb as c,mb as W,nb as G,oa as y,pe as L,ra as O}from"./chunk-JH5KSRZ6.js";import{f as M}from"./chunk-6H3I7D5M.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}app;skres;facade;dialogRef;data;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 +1 @@
|
|
|
1
|
-
import{va as z}from"./chunk-
|
|
1
|
+
import{va as z}from"./chunk-2RJKLB5L.js";import"./chunk-NDDO5DKA.js";import"./chunk-PSRS6NXJ.js";import"./chunk-WXOWBQXR.js";import"./chunk-SOVFTS2B.js";import"./chunk-VSWAOYSI.js";import"./chunk-PGHE7FOF.js";import"./chunk-7UXFP343.js";import"./chunk-TGPAYIRR.js";import"./chunk-7Z4ZZM32.js";import{Dd as C,Ea as m,Ed as w,Fa as d,Gd as S,Hd as R,Id as E,Jd as O,Ka as _,La as a,Ma as o,Na as v,Q as f,R as u,Rd as T,Td as A,Ua as D,Wa as p,Wd as k,Ya as g,Yd as j,Zd as V,ab as b,bb as x,cb as y,ha as h,ja as s,kc as I,lb as r,mb as M,oa as c,ra as P}from"./chunk-JH5KSRZ6.js";import"./chunk-6H3I7D5M.js";var U=["frame"];function Q(n,e){if(n&1&&(a(0,"mat-dialog-content",3),v(1,"iframe",6,0),o()),n&2){let t=g();s(),_("src",t.url,h)("title",t.data.panel.title)}}function B(n,e){n&1&&(a(0,"mat-dialog-content",4),r(1," This widget has no settings. "),o())}function F(n,e){if(n&1){let t=D();a(0,"mat-dialog-actions",5)(1,"button",7),p("click",function(){f(t);let l=g();return u(l.removeWidget())}),a(2,"mat-icon"),r(3,"delete"),o(),r(4," Remove widget "),o()()}}var W=class n{constructor(e,t,i,l){this.dialogRef=e;this.data=t;this.service=i;this.sanitizer=l}dialogRef;data;service;sanitizer;frame;url;detach=null;ngOnInit(){let e=this.data.panel;e&&(this.url=this.sanitizer.bypassSecurityTrustResourceUrl(e.url?this.service.resolveAssetUrl(e.url):"about:blank"))}ngAfterViewInit(){let e=this.data.panel;!e||!this.frame||(this.detach=this.service.attachPanel(this.frame.nativeElement,{extension:this.data.extension,panel:e,targetInstance:this.data.targetInstance,targetWidget:this.data.targetWidget,close:()=>this.dialogRef.close()}))}removeWidget(){this.data.targetInstance&&this.service.removeWidget(this.data.targetInstance),this.dialogRef.close()}ngOnDestroy(){this.detach?.(),this.detach=null}static \u0275fac=function(t){return new(t||n)(c(C),c(w),c(z),c(I))};static \u0275cmp=P({type:n,selectors:[["fb-plotterext-panel-dialog"]],viewQuery:function(t,i){if(t&1&&b(U,5),t&2){let l;x(l=y())&&(i.frame=l.first)}},decls:9,vars:3,consts:[["frame",""],["mat-dialog-title","",1,"pe-panel-header"],["mat-icon-button","","aria-label","Close",3,"click"],[1,"pe-panel-content"],[1,"pe-panel-noconfig"],[1,"pe-panel-actions"],["sandbox","allow-scripts allow-same-origin allow-forms",3,"src","title"],["mat-button","",1,"pe-remove",3,"click"]],template:function(t,i){t&1&&(a(0,"div",1)(1,"span"),r(2),o(),a(3,"button",2),p("click",function(){return i.dialogRef.close()}),a(4,"mat-icon"),r(5,"close"),o()()(),m(6,Q,3,2,"mat-dialog-content",3)(7,B,2,0,"mat-dialog-content",4),m(8,F,5,0,"mat-dialog-actions",5)),t&2&&(s(2),M(i.data.panel?i.data.panel.title:i.data.title),s(4),d(i.data.panel?6:7),s(2),d(i.data.targetInstance?8:-1))},dependencies:[O,S,E,R,k,A,T,V,j],styles:[".pe-panel-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding-right:8px}.pe-panel-content[_ngcontent-%COMP%]{padding:0;height:60vh}.pe-panel-noconfig[_ngcontent-%COMP%]{padding:16px 24px}iframe[_ngcontent-%COMP%]{display:block;width:100%;height:100%;border:none}.pe-panel-actions[_ngcontent-%COMP%]{justify-content:flex-start}.pe-remove[_ngcontent-%COMP%]{color:#d32f2f}"]})};export{W as PlotterPanelDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{F as $e,M as et,N as tt,O as it,ca as nt,da as $,e as Oe,ea as ee,ia as at,ja as ot,ka as rt,m as qe,n as B,p as je,q as Xe,s as Ye,t as Je,y as Qe,ya as st,z as L,za as lt}from"./chunk-2RJKLB5L.js";import{a as K,b as Ke,c as ze}from"./chunk-NDDO5DKA.js";import{a as ke,h as Pe,j as Le,k as xe}from"./chunk-PSRS6NXJ.js";import{a as Ie,d as Fe,i as Ae,j as Ne,k as Re}from"./chunk-WXOWBQXR.js";import{a as Y,b as J,c as Ze,d as Q}from"./chunk-SOVFTS2B.js";import{a as Be}from"./chunk-VSWAOYSI.js";import"./chunk-PGHE7FOF.js";import"./chunk-7UXFP343.js";import"./chunk-TGPAYIRR.js";import{b as z,c as Ue,f as Ge,i as q,j as He,n as j,o as X}from"./chunk-7Z4ZZM32.js";import{$d as U,Da as O,Dd as Se,Ea as b,Fa as T,Ha as D,Hd as Ce,Ia as y,Ja as S,Jd as Me,Ka as h,Kb as F,La as i,Ma as n,Na as E,Ob as ye,P as W,Pb as A,Q as m,R as c,Rd as we,S as x,T as pe,Td as ve,Ua as V,Wa as p,Wd as N,X as _e,Ya as M,Yd as be,Z as I,Zd as R,_ as fe,ca as ue,ee as G,gb as w,he as H,ie as Te,ja as o,jb as he,lb as s,le as De,mb as C,me as Ee,nb as k,ne as We,oe as Ve,pb as _,pe as Z,qb as f,ra as P,rb as u}from"./chunk-JH5KSRZ6.js";import"./chunk-6H3I7D5M.js";var yt=(l,d)=>d[0];function St(l,d){if(l&1&&(i(0,"mat-option",8),x(),i(1,"svg",6),E(2,"line",7),n()()),l&2){let a=d.$implicit;h("value",a),o(2),O("stroke-width",a)}}function Ct(l,d){if(l&1&&(i(0,"mat-option",8),x(),i(1,"svg",6),E(2,"line",9),n()()),l&2){let a=d.$implicit;h("value",a[0]),o(2),O("stroke-dasharray",a[1])}}var te=class l{color=A("#ff0000");dash=A("none");weight=A(1);_color=F(()=>this.color());_dash=F(()=>this.dash());_weight=F(()=>this.weight());selectionChange=ye();app=W(L);line={dashArrays:this.app.lineDashMap,weights:[1,2,3,4,5]};constructor(){}ngOnInit(){}onSelectChange(){let d=this.app.formatLineDashArray(this._dash());this.selectionChange.emit({lineStyle:{fill:{color:this._color()},stroke:{color:this._color(),width:this._weight(),lineDash:d}},config:{color:this._color(),weight:this._weight(),dash:this._dash()}})}static \u0275fac=function(a){return new(a||l)};static \u0275cmp=P({type:l,selectors:[["linestyle-select"]],inputs:{color:[1,"color"],dash:[1,"dash"],weight:[1,"weight"]},outputs:{selectionChange:"selectionChange"},decls:25,vars:5,consts:[[2,"display","flex"],[2,"width","100px"],["mat-input","","matNativeControl","","type","color",3,"ngModelChange","change","ngModel"],[2,"width","110px"],[3,"ngModelChange","selectionChange","ngModel"],[2,"display","flex","align-items","center","gap","8px"],["width","48","height","10",2,"vertical-align","middle","margin-right","6px"],["x1","0","y1","5","x2","48","y2","5","stroke","currentColor","stroke-array","none"],[3,"value"],["x1","0","y1","5","x2","48","y2","5","stroke","currentColor","stroke-width","2"]],template:function(a,e){a&1&&(i(0,"div",0)(1,"mat-form-field",1)(2,"mat-label"),s(3,"Color"),n(),i(4,"input",2),u("ngModelChange",function(r){return f(e._color,r)||(e._color=r),r}),p("change",function(){return e.onSelectChange()}),n()(),i(5,"mat-form-field",3)(6,"mat-label"),s(7,"Weight"),n(),i(8,"mat-select",4),u("ngModelChange",function(r){return f(e._weight,r)||(e._weight=r),r}),p("selectionChange",function(){return e.onSelectChange()}),i(9,"mat-select-trigger")(10,"div",5),x(),i(11,"svg",6),E(12,"line",7),n()()(),y(13,St,3,2,"mat-option",8,D),n()(),pe(),i(15,"mat-form-field",3)(16,"mat-label"),s(17,"Style"),n(),i(18,"mat-select",4),u("ngModelChange",function(r){return f(e._dash,r)||(e._dash=r),r}),p("selectionChange",function(){return e.onSelectChange()}),i(19,"mat-select-trigger")(20,"div",5),x(),i(21,"svg",6),E(22,"line",9),n()()(),y(23,Ct,3,2,"mat-option",8,yt),n()()()),a&2&&(o(4),_("ngModel",e._color),o(4),_("ngModel",e._weight),o(4),O("stroke-width",e._weight()),o(),S(e.line.weights),o(5),_("ngModel",e._dash),o(4),O("stroke-dasharray",e.line.dashArrays.get(e._dash())),o(),S(e.line.dashArrays))},dependencies:[Z,U,G,H,R,N,K,X,j,q,z,Q,J,Ze,Y],encapsulation:2})};var ie="auto";var wt=(l,d)=>d[0];function vt(l,d){if(l&1){let a=V();i(0,"div",4)(1,"mat-radio-button",5,0),p("change",function(){m(a);let g=w(2),r=M().$implicit,t=M();return r[1].current=g.value,c(t.save(!0))}),s(3),n()()}if(l&2){let a=d.$implicit,e=M().$implicit,g=M();o(),h("name",e[0])("value",a)("checked",a===e[1].current),o(2),k(" ",g.pathLabel(a)," ")}}function bt(l,d){if(l&1&&(i(0,"div",2)(1,"div",3)(2,"div"),s(3),n()(),i(4,"div"),y(5,vt,4,4,"div",4,D),n()()),l&2){let a=d.$implicit;o(3),C(a[1].name),o(2),S(a[1].available)}}var ne=class l{title="";chosen=new _e;pathChoices={tws:{name:"True Wind Speed",choices:["environment.wind.speedTrue","environment.wind.speedOverGround"],available:[],current:""},twd:{name:"True Wind Direction",choices:["environment.wind.directionTrue","environment.wind.directionMagnetic","environment.wind.angleTrueGround","environment.wind.angleTrueWater"],available:[],current:""},heading:{name:"Heading / COG",choices:[ie,"navigation.courseOverGroundTrue","navigation.courseOverGroundMagnetic","navigation.headingTrue","navigation.headingMagnetic"],available:[],current:""}};pathChoicesArray=Object.entries(this.pathChoices);availPaths;app=W(L);constructor(){}pathLabel(d){return d===ie?"Automatic":d.split(".").slice(-1)[0]}ngOnInit(){this.initEntries()}initEntries(){this.availPaths=new Map(Object.entries(this.app.data.vessels.prefAvailablePaths)),this.pathChoices.tws.current=this.app.config.units.preferredPaths.tws,this.pathChoices.twd.current=this.app.config.units.preferredPaths.twd,this.pathChoices.heading.current=this.app.config.units.preferredPaths.heading,Object.entries(this.pathChoices).forEach(a=>{let e=a[1];e.choices.forEach(g=>{(g===ie||this.availPaths.has(g))&&e.available.push(g)}),e.available.length===0&&e.available.push(e.choices[0])})}save(d){let a={};Object.entries(this.pathChoices).forEach(e=>{a[e[0]]=e[1].current}),this.chosen.emit({save:d,value:a})}static \u0275fac=function(a){return new(a||l)};static \u0275cmp=P({type:l,selectors:[["signalk-preferred-paths"]],inputs:{title:"title"},outputs:{chosen:"chosen"},decls:6,vars:1,consts:[["pathopt",""],[2,"font-size","10pt"],[1,"sk-details"],[1,"title"],[2,"margin","5px 0 5px 0"],[3,"change","name","value","checked"]],template:function(a,e){a&1&&(i(0,"fieldset")(1,"legend",1),s(2),n(),i(3,"div"),y(4,bt,7,1,"div",2,wt),n()()),a&2&&(o(2),C(e.title),o(2),S(e.pathChoicesArray))},dependencies:[ee,$],styles:[".sk-details[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;font-family:Roboto,Arial,Helvetica,sans-serif;font-size:10pt;max-height:100%;width:60vw;max-width:300px}.sk-details[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{background:left 1px -webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.18)),color-stop(.65,transparent)) #b2bbc2e3;padding:3px 5px 0;margin-top:3px;font-weight:500;line-height:23px;color:#000}.sk-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:0;line-height:23px;margin:0;flex:1 1 auto;overflow:auto}.sk-details[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{display:flex;flex-direction:row;line-height:26px;border-width:0 0 0 0;border-style:solid;border-color:gray;padding-left:5px}.sk-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{border-width:0 0 1px 0}.sk-details[_ngcontent-%COMP%] .sectionname[_ngcontent-%COMP%]{text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;font-weight:500}.sk-details[_ngcontent-%COMP%] .pathvalue[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;width:100%;background-color:#fff}.sk-details[_ngcontent-%COMP%] .pathvalue[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-style:italic}.sk-details[_ngcontent-%COMP%] .pathvalue[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"],changeDetection:0})};var v=(l,d)=>d[0],Tt=(l,d)=>d.id;function Dt(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function Et(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function Wt(l,d){if(l&1&&(i(0,"mat-option",128),s(1),n()),l&2){let a=d.$implicit;h("value",a.url)("matTooltip",a.description),o(),k(" ",a.name," ")}}function Vt(l,d){if(l&1){let a=V();i(0,"div",46)(1,"div",38)(2,"mat-form-field",39)(3,"mat-label"),s(4,"Select Instruments App"),n(),i(5,"mat-select",64),u("ngModelChange",function(g){m(a);let r=M();return f(r.facade.settings.display.plugins.instruments,g)||(r.facade.settings.display.plugins.instruments=g),c(g)}),p("selectionChange",function(){m(a);let g=M();return c(g.onInstrumentApp())}),y(6,Wt,2,3,"mat-option",128,D),n()()(),i(8,"div",38)(9,"mat-form-field",52)(10,"mat-label"),s(11,"Parameters"),n(),i(12,"input",129,21),u("ngModelChange",function(g){m(a);let r=M();return f(r.facade.settings.display.plugins.parameters,g)||(r.facade.settings.display.plugins.parameters=g),c(g)}),p("change",function(){m(a);let g=M();return c(g.persistModel("pluginParameters"))}),n()()(),i(14,"div",38)(15,"mat-checkbox",130),u("ngModelChange",function(g){m(a);let r=M();return f(r.facade.settings.display.plugins.startOnOpen,g)||(r.facade.settings.display.plugins.startOnOpen=g),c(g)}),p("change",function(){m(a);let g=M();return c(g.persistModel("pluginStartOnOpen"))}),s(16," Halt App on hide "),n()(),i(17,"div",38)(18,"button",131),p("click",function(){m(a);let g=M();return c(g.toggleFavourites())}),i(19,"mat-icon"),s(20,"star"),n(),s(21," FAVOURITES "),n()()()}if(l&2){let a=M();o(5),_("ngModel",a.facade.settings.display.plugins.instruments),o(),S(a.facade.applicationList),o(6),h("disabled",a.facade.settings.display.plugins.instruments===null),_("ngModel",a.facade.settings.display.plugins.parameters),o(3),_("ngModel",a.facade.settings.display.plugins.startOnOpen)}}function kt(l,d){if(l&1&&(i(0,"mat-list-option",133),s(1),n()),l&2){let a=d.$implicit,e=M(2);h("disabled",a.url==e.facade.settings.display.plugins.instruments)("selected",e.facade.settings.display.plugins.favourites.includes(a.url))("value",a.url),o(),k(" ",a.name," ")}}function Pt(l,d){if(l&1){let a=V();i(0,"div",37)(1,"div",38)(2,"div",110),E(3,"br"),s(4,"Select Favourite Apps: "),n(),E(5,"mat-divider"),i(6,"mat-selection-list",132,22),p("selectionChange",function(g){m(a);let r=w(7),t=M();return c(t.onFavSelected(g,r))}),y(8,kt,2,4,"mat-list-option",133,D),n()()()}if(l&2){let a=M();o(8),S(a.facade.favouritesList)}}function Lt(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function xt(l,d){l&1&&(i(0,"mat-error"),s(1,"Please enter a number >= 0"),n())}function Ot(l,d){l&1&&(i(0,"mat-error"),s(1,"Please enter a number >= 1"),n())}function Bt(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function It(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function Ft(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function At(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function Nt(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function Rt(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function Ut(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function Gt(l,d){if(l&1){let a=V();i(0,"div",38)(1,"mat-form-field",39)(2,"mat-label"),s(3,"Position display format"),n(),i(4,"mat-select",134),u("ngModelChange",function(g){m(a);let r=M();return f(r.facade.settings.units.positionFormat,g)||(r.facade.settings.units.positionFormat=g),c(g)}),p("selectionChange",function(){m(a);let g=M();return c(g.persistModel())}),y(5,Ut,2,2,"mat-option",41,D),n()()()}if(l&2){let a=M();o(4),_("ngModel",a.facade.settings.units.positionFormat),o(),S(a.options.preferredValues.coords)}}function Ht(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function Zt(l,d){if(l&1){let a=V();i(0,"div",38)(1,"mat-form-field",39)(2,"mat-label"),s(3,"Prefer True / Magnetic values"),n(),i(4,"mat-select",135),u("ngModelChange",function(g){m(a);let r=M();return f(r.facade.settings.units.headingAttribute,g)||(r.facade.settings.units.headingAttribute=g),c(g)}),p("selectionChange",function(){m(a);let g=M();return c(g.persistModel("headingAttribute"))}),y(5,Ht,2,2,"mat-option",41,D),n()()()}if(l&2){let a=M();o(4),_("ngModel",a.facade.settings.units.headingAttribute),o(),S(a.options.preferredValues.heading)}}function Kt(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a),o(),C(a)}}function zt(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function qt(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function jt(l,d){if(l&1){let a=V();i(0,"mat-form-field",39)(1,"mat-label"),s(2,"Resume Following After"),n(),i(3,"mat-select",136),u("ngModelChange",function(g){m(a);let r=M();return f(r.facade.settings.map.refollowDelay,g)||(r.facade.settings.map.refollowDelay=g),c(g)}),p("selectionChange",function(){m(a);let g=M();return c(g.persistModel())}),y(4,qt,2,2,"mat-option",41,v),n()()}if(l&2){let a=M();o(3),_("ngModel",a.facade.settings.map.refollowDelay),o(),S(a.options.map.refollowDelay)}}function Xt(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function Yt(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function Jt(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function Qt(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a),o(),C(a)}}function $t(l,d){l&1&&(i(0,"mat-error"),s(1," Please enter a positive number "),n())}function ei(l,d){l&1&&(i(0,"mat-error"),s(1," Please enter a positive number "),n())}function ti(l,d){l&1&&(i(0,"mat-error"),s(1," Please enter a positive number "),n())}function ii(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function ni(l,d){l&1&&(i(0,"mat-error"),s(1," Please enter a number > 0 "),n())}function ai(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a),o(),C(a)}}function oi(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function ri(l,d){if(l&1&&(i(0,"mat-radio-button",41),E(1,"img",137),s(2),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),he(`transform: scale(${a[0]})`),o(),k(" (",a[1],") ")}}function si(l,d){l&1&&(i(0,"mat-error"),s(1," Please enter a value between -90 and 90 (max 9 decimals) "),n())}function li(l,d){l&1&&(i(0,"mat-error"),s(1," Please enter a value between -180 and 180 (max 9 decimals) "),n())}function di(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function gi(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function mi(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a),o(),C(a)}}function ci(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a),o(),C(a)}}function pi(l,d){l&1&&(i(0,"mat-error"),s(1," Please enter a number >= 1. "),n())}function _i(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function fi(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function ui(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function hi(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function yi(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function Si(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function Ci(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a),o(),C(a)}}function Mi(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function wi(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a),o(),C(a)}}function vi(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a),o(),C(a)}}function bi(l,d){if(l&1){let a=V();i(0,"button",138),p("click",function(){m(a),M();let g=w(550);return c(g.value="")}),i(1,"mat-icon"),s(2,"close"),n()()}}function Ti(l,d){if(l&1&&(i(0,"mat-list-option",112),s(1),n()),l&2){let a=d.$implicit,e=M();h("selected",e.facade.settings.resources.paths.includes(a))("value",a),o(),k(" ",a," ")}}function Di(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a.id),o(),C(a.name)}}function Ei(l,d){if(l&1){let a=V();i(0,"mat-tab",113)(1,"div",32)(2,"div",33)(3,"div",125)(4,"div",35),s(5,"RADAR SETTINGS"),n(),i(6,"mat-card",36)(7,"div",46)(8,"div",38)(9,"mat-form-field",139)(10,"mat-label"),s(11,"Radar Devices"),n(),i(12,"mat-select",140,23),u("ngModelChange",function(g){m(a);let r=M();return f(r.facade.settings.radars.deviceId,g)||(r.facade.settings.radars.deviceId=g),c(g)}),p("selectionChange",function(){m(a);let g=M();return c(g.doRadar())}),y(14,Di,2,2,"mat-option",41,Tt),n()()(),i(16,"div",38)(17,"button",141),p("click",function(){m(a);let g=M();return c(g.refreshRadars())}),i(18,"mat-icon"),s(19," refresh"),n(),s(20," REFRESH "),n()()()()()()()()}if(l&2){let a=M();o(12),h("disabled",!a.radarList().length||a.app.uiCtrl().radarLayer),_("ngModel",a.facade.settings.radars.deviceId),o(2),S(a.radarList())}}function Wi(l,d){if(l&1&&(i(0,"mat-option",41),s(1),n()),l&2){let a=d.$implicit;h("value",a[0]),o(),C(a[1])}}function Vi(l,d){l&1&&(i(0,"mat-error"),s(1," Value required. "),n())}var mt=class l{show={favourites:I(!1)};options;centerOffsetLimit=je;aisStateFilter={moored:!1,anchored:!1};formattedNumberModel={rangeCirclesDistance:1e3};unitsChangedSignal=I(0);radarList=I([]);saveOnClose=!1;facade=W(lt);myElement=W(ue);dialogRef=W(Se);wakeLock=W(qe);s57=W(Ye);app=W(L);radarApi=W(Qe);constructor(){this.options=new st,fe(()=>{this.unitsChangedSignal(),this.formatNumberModel()})}ngOnInit(){this.facade.refresh(),this.facade.settings.selections.aisState.forEach(d=>{d in this.aisStateFilter&&(this.aisStateFilter[d]=!0)}),this.refreshRadars()}refreshRadars(){this.radarApi.listRadars().then(d=>{this.radarList.set(d)}).catch(()=>{this.radarList.set([])})}formatNumberModel(){this.formattedNumberModel={rangeCirclesDistance:this.facade.settings.units.distance==="kilometer"?Math.floor(this.facade.settings.vessels.rangeCirclesDistance/1e3):Math.floor(B.transform(this.facade.settings.vessels.rangeCirclesDistance,"m","naut-mile"))}}raiseChange(){this.app.alignUnitPrefs(this.app.serverConfig.unitPreferences()),this.unitsChangedSignal.update(d=>d+1)}handleClose(){this.saveOnClose&&this.persistModel(),this.dialogRef.close()}doWakelock(d){this.persistModel(),d?this.wakeLock.disable():this.wakeLock.enable()}doS57(d){this.facade.settings.map.s57Options.depthUnit=this.facade.settings.units.depth,d?this.parseNumber(d):this.persistModel(),this.s57.setOptions(this.facade.settings.map.s57Options)}doRadar(){this.radarApi.init(this.facade.settings.radars.deviceId).then(d=>{d&&this.persistModel()})}onLineStyle(d,a){let e=this.facade.settings.vessels.selfLines[d];e&&(e.color=a.config.color,e.dash=a.config.dash,e.weight=a.config.weight,this.app.selfLines.update(g=>{let r=Object.assign({},g);return r[d]=a.lineStyle,r}),this.persistModel())}toggleFavourites(){this.show.favourites.update(d=>!d)}parseCenterOffset(d){d.reset(typeof d.model=="number"?Xe(d.model):0),this.persistModel()}parseNumber(d,a){if(typeof d.model!="number"){d.reset(this.fallbackToDefault());return}!a&&d.model<0&&d.reset(Math.abs(d.model)),this.persistModel()}parseFormattedNumber(d,a){typeof d.model=="number"&&(!a&&d.model<0&&d.reset(Math.abs(d.model)),this.facade.settings.vessels.rangeCirclesDistance=this.facade.settings.units.distance==="kilometer"?Math.floor(this.formattedNumberModel.rangeCirclesDistance*1e3):Math.floor(B.nauticalMilesToKm(this.formattedNumberModel.rangeCirclesDistance)*1e3),this.persistModel())}fallbackToDefault(){let d=Je();if(typeof this.facade.settings.display.statusBar.referenceSpeed!="number")return d.display.statusBar.referenceSpeed;if(typeof this.facade.settings.display.statusBar.tapFadeSpeed!="number")return d.display.statusBar.tapFadeSpeed;if(typeof this.facade.settings.map.s57Options.shallowDepth!="number")return d.map.s57Options.shallowDepth;if(typeof this.facade.settings.map.s57Options.safetyDepth!="number")return d.map.s57Options.safetyDepth;if(typeof this.facade.settings.map.s57Options.deepDepth!="number")return d.map.s57Options.deepDepth;if(typeof this.facade.fixedPosition[0]!="number"||typeof this.facade.fixedPosition[1]!="number")return 0;if(typeof this.facade.settings.course.arrivalCircle!="number")return d.course.arrivalCircle}persistModel(d){this.facade.applySettings(),this.facade.emitChangeEvent(d)}get speedUnitSymbol(){return B.getSymbol(this.facade.settings.units.speed)}deferPersist(d){this.saveOnClose=!0,this.facade.emitChangeEvent(d)}onInstrumentApp(){this.persistModel("pluginInstruments"),this.facade.buildFavouritesList()}onPreferredPaths(d){d.save&&(this.facade.settings.units.preferredPaths=d.value,this.persistModel())}onFavSelected(d,a){this.facade.settings.display.plugins.favourites=a.selectedOptions.selected.map(e=>e.value),this.persistModel()}onAisStateFilter(){let d=[];for(let a in this.aisStateFilter)this.aisStateFilter[a]&&d.push(a);this.facade.settings.selections.aisState=[].concat(d),this.persistModel()}onResPathSelected(d){this.facade.settings.resources.paths=d.selectedOptions.selected.map(a=>a.value),this.facade.settings.resources.paths.forEach(a=>{a in this.facade.settings.selections.resourceSets||(this.facade.settings.selections.resourceSets[a]=[])}),this.persistModel()}clearAuthToken(){this.facade.clearToken()}renderSymbol(d){return B.getSymbol(d)}static \u0275fac=function(a){return new(a||l)};static \u0275cmp=P({type:l,selectors:[["settings-dialog"]],decls:649,vars:137,consts:[["refspeed","ngModel"],["tapfade","ngModel"],["serverprefs",""],["distunits",""],["centerOffsetY","ngModel"],["centerOffsetX","ngModel"],["s57shallowDepth","ngModel"],["s57safetyDepth","ngModel"],["s57deepDepth","ngModel"],["coursearrivalcircle","ngModel"],["courseautoadvance",""],["courseautoadvanceon",""],["vesselfixedlocationmode",""],["fixedlat","ngModel"],["fixedlon","ngModel"],["rangeCirclesDistance","ngModel"],["notesrootfilter",""],["respath",""],["skmaxradius",""],["videourl","ngModel"],["experiments",""],["instparams","ngModel"],["favs",""],["radarlist",""],[2,"background-color","transparent"],[1,"dialog-icon"],[2,"flex","1 1 auto","text-align","center"],[2,"text-align","right"],["mat-icon-button","",3,"click"],["mat-dialog-content",""],["dynamicHeight","false","mat-stretch-tabs","false","mat-align-tabs","start"],["label","Display"],[1,"theme-page","settings"],[1,"theme-panel"],["id","sectDisplay",1,"setting-group"],[1,"setting-group-title"],[1,"setting-card"],[1,"setting-card-row",2,"padding-bottom","10px"],[1,"setting-card-row-item"],[2,"width","100%"],["matTooltip","Dark Mode setting.",3,"ngModelChange","selectionChange","ngModel"],[3,"value"],["label","after","matTooltip","Auto-set using environment.mode value.",3,"ngModelChange","change","ngModel"],["matTooltip","Action button selection.",3,"ngModelChange","selectionChange","ngModel"],["label","after","matTooltip","Disable wake lock.",3,"ngModelChange","change","disabled","ngModel"],["label","after","matTooltip","Un-check to prefer dialogs over the information panel",3,"ngModelChange","change","ngModel"],[1,"setting-card-row"],["matTooltip","Do not play sounds","label","after",3,"ngModelChange","change","ngModel"],["label","after",3,"ngModelChange","change","ngModel"],["matTooltip","Period of time out of alarm state before re-triggering.",3,"ngModelChange","selectionChange","ngModel","disabled"],[1,"setting-group"],["label","after","matTooltip","Show the bearing, distance and ETA from the vessel to the cursor in the status bar. Click or tap the chart to hold the readout on that point.",3,"ngModelChange","change","ngModel"],["floatLabel","always",2,"width","100%"],["matInput","","type","number","min","0","matTooltip","Boat speed used to estimate ETA when SOG is unavailable (e.g. at anchor or hove to).",3,"ngModelChange","change","disabled","ngModel"],["matInput","","type","number","min","1","step","0.5","matTooltip","How long the marker left by a click or tap takes to fade. The readout stays held on that point until it does.",3,"ngModelChange","change","disabled","ngModel"],["matTooltip","Glyph used to display wind direction and speed.",3,"ngModelChange","selectionChange","ngModel"],["label","Units"],["id","sectUnits",1,"setting-group"],["label","after","matTooltip","Use the unit preferences configured on the server.",3,"ngModelChange","change","disabled","ngModel"],[3,"ngModelChange","selectionChange","disabled","ngModel"],["title","Preferred Paths",3,"chosen"],["label","Map"],["id","sectMap",1,"setting-group"],["aria-hidden","true",1,"setting-field-group-title"],[3,"ngModelChange","selectionChange","ngModel"],[1,"setting-field-group-title"],[1,"setting-field-group"],["floatLabel","always"],["matInput","","type","number","matTooltip","Where the vessel sits up or down the screen, as a percentage of the distance to the edge. Positive looks ahead (vessel lower); negative looks behind.",3,"ngModelChange","change","min","max","ngModel"],["matInput","","type","number","matTooltip","Where the vessel sits left or right of centre, as a percentage of the distance to the edge. Positive shifts the map right (vessel left).",3,"ngModelChange","change","min","max","ngModel"],["matTooltip","Add close button to popovers","label","after",3,"ngModelChange","change","ngModel"],["matTooltip","Double Click map to zoom","label","after",3,"ngModelChange","change","ngModel"],["matTooltip","Keep tiles visible when zooming past chart maxZoom","label","after",3,"ngModelChange","change","ngModel"],[1,"setting-card-row-item","setting-card-row-stack"],["matTooltip","What panning the chart does while following the vessel.",3,"ngModelChange","selectionChange","ngModel"],["placeholder","Graphicsstyle",3,"ngModelChange","selectionChange","ngModel"],["placeholder","Boundaries",3,"ngModelChange","selectionChange","ngModel"],["placeholder","Color Table",3,"ngModelChange","selectionChange","ngModel"],["placeholder","Colors",3,"ngModelChange","selectionChange","ngModel"],["matInput","","type","number","required","","min","0",3,"ngModelChange","change","ngModel"],["matSuffix",""],["multiple","","placeholder","Layers",3,"ngModelChange","selectionChange","ngModel"],["label","Course"],["id","sectCourse",1,"setting-group"],["matTooltip","Select the trigger for advancing to next point.",3,"ngModelChange","selectionChange","disabled","ngModel"],["matTooltip","Period of time before destination is advanced to next waypoint.",3,"ngModelChange","selectionChange","disabled","ngModel"],["label","Vessels"],["id","sectVessels",1,"setting-group"],[3,"ngModelChange","change","ngModel"],["label","after","matTooltip","e.g. Building, Camp, etc.",3,"ngModelChange","change","ngModel"],["matInput","","type","number","required","","pattern","^-?([1-8]?[0-9])(\\.\\d{1,9})?$","min","-90","max","90",3,"ngModelChange","change","ngModel","disabled"],["matInput","","type","number","required","","pattern","^-?(1[0-7]?[0-9]|[1-9]?[0-9])(\\.\\d{1,9})?$","min","-180","max","180",3,"ngModelChange","change","ngModel","disabled"],["matTooltip","Length of heading line.",3,"ngModelChange","selectionChange","ngModel"],[3,"selectionChange","color","dash","weight"],["matTooltip","Length of COG line.",3,"ngModelChange","selectionChange","ngModel"],[3,"ngModelChange","selectionChange","ngModel","disabled"],["label","after",3,"ngModelChange","change","ngModel","disabled"],["matInput","","type","number","required","","min","1",3,"ngModelChange","change","ngModel","disabled"],["matTooltip","Select to source trail data from the server","label","after",3,"ngModelChange","change","disabled","ngModel"],["discrete","","tickInterval","1","min","1","max","96",3,"disabled"],["matSliderThumb","",3,"ngModelChange","valueChange","ngModel"],["label","Resources"],["id","sectNotes",1,"setting-group"],[3,"valueChange","selectionChange","disabled","value"],["matInput","","type","text","placeholder","?radius=%note:radius%","matTooltip","Filter to apply when retrieving notes",3,"ngModelChange","change","ngModel"],["matSuffix","","mat-icon-button",""],["matTooltip","Allow group name editing.","label","after",3,"ngModelChange","change","ngModel"],["matTooltip","Require position information when adding notes to a group.","label","after",3,"ngModelChange","change","ngModel"],["label","after","matTooltip","Open Note details with a single click instead of showing the pop-up options",3,"ngModelChange","change","ngModel"],["id","sectResLayers",1,"setting-group"],[2,"font-style","italic"],["matTooltip","Select resource layers to show.",3,"selectionChange"],[3,"selected","value"],["label","Radar"],["label","Signal K"],["id","sectSKConnection",1,"setting-group"],[2,"font-size","smaller"],["matToolTip","Check to receive other vessel data","label","after",3,"ngModelChange","change","ngModel"],["matToolTip","Check to receive AtoN data","matTooltipPosition","below","label","after",3,"ngModelChange","change","ngModel"],["matTooltip","Check to receive aircraft data","matTooltipPosition","below","label","after",3,"ngModelChange","change","ngModel"],["matToolTip","Check to receive SaR data","matTooltipPosition","below","label","after",3,"ngModelChange","change","ngModel"],["matToolTip","Check to receive Weather / Meteo data","matTooltipPosition","below","label","after",3,"ngModelChange","change","ngModel"],["matToolTip","Only include AIS targets within this distance","matTooltipPosition","below",3,"ngModelChange","selectionChange","ngModel"],["mat-icon-button","","matTooltip","Clear Auth Token",3,"click"],["label","Experiments"],["id","sectExperiments",1,"setting-group"],["matInput","","type","text","required","","placeholder","Video stream URL","matTooltip","Enter URL of video stream",3,"ngModelChange","change","disabled","ngModel"],["matTooltip","Enable ALL experimental Features","label","after",3,"ngModelChange","change","ngModel"],["matTooltipPosition","right",3,"value","matTooltip"],["matInput","","type","text","placeholder","e.g. ?layout=mylayout","matTooltip","Enter parameters to pass to Instrument App",3,"ngModelChange","change","disabled","ngModel"],["matTooltip","Stop instrument app when hidden","label","after",3,"ngModelChange","change","ngModel"],["mat-raised-button","","matTooltip","Favourite Apps","label","after",3,"click"],[3,"selectionChange"],[3,"disabled","selected","value"],["matTooltip","Display position in this format",3,"ngModelChange","selectionChange","ngModel"],["matTooltip","Preferred value type for paths not in Preferred Paths above",3,"ngModelChange","selectionChange","ngModel"],["matTooltip","Resume following the vessel once the chart has been left idle for this long.",3,"ngModelChange","selectionChange","ngModel"],["src","./assets/img/vessels/self.png"],["matSuffix","","mat-icon-button","",3,"click"],[2,"width","stretch"],["matToolTip","Select radar device","matTooltipPosition","below",3,"ngModelChange","selectionChange","disabled","ngModel"],["mat-raised-button","",3,"click"]],template:function(a,e){if(a&1){let g=V();i(0,"mat-toolbar",24)(1,"span",25)(2,"mat-icon"),s(3,"settings"),n()(),i(4,"span",26),s(5,"Settings"),n(),i(6,"span",27)(7,"button",28),p("click",function(){return e.handleClose()}),i(8,"mat-icon"),s(9,"close"),n()()()(),i(10,"div",29)(11,"mat-tab-group",30)(12,"mat-tab",31)(13,"div",32)(14,"div",33)(15,"div",34)(16,"div",35),s(17,"DISPLAY"),n(),i(18,"mat-card",36)(19,"mat-card-content")(20,"div",37)(21,"div",38)(22,"mat-form-field",39)(23,"mat-label"),s(24,"Dark Mode setting"),n(),i(25,"mat-select",40),u("ngModelChange",function(t){return m(g),f(e.facade.settings.display.darkMode.source,t)||(e.facade.settings.display.darkMode.source=t),c(t)}),p("selectionChange",function(){return e.persistModel("darkTheme")}),y(26,Dt,2,2,"mat-option",41,v),n()()(),i(28,"div",38)(29,"mat-checkbox",42),u("ngModelChange",function(t){return m(g),f(e.facade.settings.display.nightMode,t)||(e.facade.settings.display.nightMode=t),c(t)}),p("change",function(){return e.persistModel()}),s(30," Auto-set Night Mode "),n()(),i(31,"div",38)(32,"mat-form-field",39)(33,"mat-label"),s(34,"Action Button"),n(),i(35,"mat-select",43),u("ngModelChange",function(t){return m(g),f(e.facade.settings.display.fab,t)||(e.facade.settings.display.fab=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(36,Et,2,2,"mat-option",41,v),n()()(),i(38,"div",38)(39,"mat-checkbox",44),u("ngModelChange",function(t){return m(g),f(e.facade.settings.display.disableWakelock,t)||(e.facade.settings.display.disableWakelock=t),c(t)}),p("change",function(t){return e.doWakelock(t.checked)}),s(40," Allow Device to Sleep "),n()(),i(41,"div",38)(42,"mat-checkbox",45),u("ngModelChange",function(t){return m(g),f(e.facade.settings.display.preferInfoPanel,t)||(e.facade.settings.display.preferInfoPanel=t),c(t)}),p("change",function(){return e.persistModel()}),s(43," Prefer Info-Panel "),n()()()()(),E(44,"br"),i(45,"mat-card",36)(46,"mat-card-content"),b(47,Vt,22,4,"div",46),b(48,Pt,10,0,"div",37),n()(),E(49,"br"),n(),i(50,"div",34)(51,"div",35),s(52,"SOUND"),n(),i(53,"mat-card",36)(54,"mat-card-content")(55,"div",37)(56,"div",38)(57,"mat-checkbox",47),u("ngModelChange",function(t){return m(g),f(e.facade.settings.display.muteSound,t)||(e.facade.settings.display.muteSound=t),c(t)}),p("change",function(){return e.persistModel()}),s(58," Do not Play Sounds "),n()(),i(59,"div",38)(60,"mat-checkbox",48),u("ngModelChange",function(t){return m(g),f(e.facade.settings.display.depthAlarm.enabled,t)||(e.facade.settings.display.depthAlarm.enabled=t),c(t)}),p("change",function(){return e.persistModel()}),s(61," Show DEPTH Alarms "),n()(),i(62,"div",38)(63,"mat-form-field",39)(64,"mat-label"),s(65,"Alarm Smoothing Time"),n(),i(66,"mat-select",49),u("ngModelChange",function(t){return m(g),f(e.facade.settings.display.depthAlarm.smoothing,t)||(e.facade.settings.display.depthAlarm.smoothing=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(67,Lt,2,2,"mat-option",41,v),n()()()()()()(),i(69,"div",50)(70,"div",35),s(71,"STATUS BAR OPTIONS"),n(),i(72,"mat-card",36)(73,"mat-card-content")(74,"div",37)(75,"div",38)(76,"mat-checkbox",51),u("ngModelChange",function(t){return m(g),f(e.facade.settings.display.statusBar.liveEta,t)||(e.facade.settings.display.statusBar.liveEta=t),c(t)}),p("change",function(){return e.persistModel()}),s(77," Live ETA at cursor "),n()(),i(78,"div",38)(79,"mat-form-field",52)(80,"mat-label"),s(81),n(),i(82,"input",53,0),u("ngModelChange",function(t){return m(g),f(e.facade.settings.display.statusBar.referenceSpeed,t)||(e.facade.settings.display.statusBar.referenceSpeed=t),c(t)}),p("change",function(){m(g);let t=w(83);return c(e.parseNumber(t))}),n(),b(84,xt,2,0,"mat-error"),n()(),i(85,"div",38)(86,"mat-form-field",52)(87,"mat-label"),s(88,"Tap Fade Speed (s)"),n(),i(89,"input",54,1),u("ngModelChange",function(t){return m(g),f(e.facade.settings.display.statusBar.tapFadeSpeed,t)||(e.facade.settings.display.statusBar.tapFadeSpeed=t),c(t)}),p("change",function(){m(g);let t=w(90);return c(e.parseNumber(t))}),n(),b(91,Ot,2,0,"mat-error"),n()()()()()(),i(92,"div",50)(93,"div",35),s(94,"WEATHER"),n(),i(95,"mat-card",36)(96,"mat-card-content")(97,"div",37)(98,"div",38)(99,"mat-form-field",39)(100,"mat-label"),s(101,"Wind indicator"),n(),i(102,"mat-select",55),u("ngModelChange",function(t){return m(g),f(e.facade.settings.display.windIndicator,t)||(e.facade.settings.display.windIndicator=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(103,Bt,2,2,"mat-option",41,v),n()()()()()()()()()(),i(105,"mat-tab",56)(106,"div",32)(107,"div",33)(108,"div",57)(109,"div",35),s(110,"UNITS & VALUES"),n(),i(111,"mat-card",36)(112,"mat-card-content")(113,"div",37)(114,"div",38)(115,"fieldset")(116,"legend")(117,"mat-checkbox",58,2),u("ngModelChange",function(t){return m(g),f(e.facade.settings.units.useServerPrefs,t)||(e.facade.settings.units.useServerPrefs=t),c(t)}),p("change",function(){return m(g),e.raiseChange(),c(e.persistModel())}),s(119," Use Server Unit Preferences "),n()(),i(120,"div",37)(121,"div",38)(122,"mat-form-field",39)(123,"mat-label"),s(124,"Distance units"),n(),i(125,"mat-select",59,3),u("ngModelChange",function(t){return m(g),f(e.facade.settings.units.distance,t)||(e.facade.settings.units.distance=t),c(t)}),p("selectionChange",function(){return m(g),e.raiseChange(),c(e.persistModel())}),y(127,It,2,2,"mat-option",41,v),n()()(),i(129,"div",38)(130,"mat-form-field",39)(131,"mat-label"),s(132,"Depth units"),n(),i(133,"mat-select",59),u("ngModelChange",function(t){return m(g),f(e.facade.settings.units.depth,t)||(e.facade.settings.units.depth=t),c(t)}),p("selectionChange",function(){return m(g),e.raiseChange(),c(e.doS57())}),y(134,Ft,2,2,"mat-option",41,v),n()()(),i(136,"div",38)(137,"mat-form-field",39)(138,"mat-label"),s(139,"Length units"),n(),i(140,"mat-select",59),u("ngModelChange",function(t){return m(g),f(e.facade.settings.units.length,t)||(e.facade.settings.units.length=t),c(t)}),p("selectionChange",function(){return m(g),e.raiseChange(),c(e.persistModel())}),y(141,At,2,2,"mat-option",41,v),n()()(),i(143,"div",38)(144,"mat-form-field",39)(145,"mat-label"),s(146,"Temperature units"),n(),i(147,"mat-select",59),u("ngModelChange",function(t){return m(g),f(e.facade.settings.units.temperature,t)||(e.facade.settings.units.temperature=t),c(t)}),p("selectionChange",function(){return m(g),e.raiseChange(),c(e.persistModel())}),y(148,Nt,2,2,"mat-option",41,v),n()()(),i(150,"div",38)(151,"mat-form-field",39)(152,"mat-label"),s(153,"Speed units"),n(),i(154,"mat-select",59),u("ngModelChange",function(t){return m(g),f(e.facade.settings.units.speed,t)||(e.facade.settings.units.speed=t),c(t)}),p("selectionChange",function(){return m(g),e.raiseChange(),c(e.persistModel())}),y(155,Rt,2,2,"mat-option",41,v),n()()()()()()(),i(157,"div",37),b(158,Gt,7,1,"div",38),b(159,Zt,7,1,"div",38),i(160,"div",38)(161,"signalk-preferred-paths",60),p("chosen",function(t){return e.onPreferredPaths(t)}),n()()()()()()()()(),i(162,"mat-tab",61)(163,"div",32)(164,"div",33)(165,"div",62)(166,"div",35),s(167,"MAP"),n(),i(168,"mat-card")(169,"mat-card-content")(170,"div",37)(171,"div",38)(172,"div",63),s(173," \xA0 "),n(),i(174,"mat-form-field",39)(175,"mat-label"),s(176,"Feature label zoom level"),n(),i(177,"mat-select",64),u("ngModelChange",function(t){return m(g),f(e.facade.settings.map.labelsMinZoom,t)||(e.facade.settings.map.labelsMinZoom=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(178,Kt,2,2,"mat-option",41,D),n()()(),i(180,"div",38)(181,"div",65),s(182," Offset Vessel Center (%) "),n(),i(183,"div",66)(184,"mat-form-field",67)(185,"mat-label"),s(186,"Vertical"),n(),i(187,"input",68,4),u("ngModelChange",function(t){return m(g),f(e.facade.settings.map.centerOffset.y,t)||(e.facade.settings.map.centerOffset.y=t),c(t)}),p("change",function(){m(g);let t=w(188);return c(e.parseCenterOffset(t))}),n()(),i(189,"mat-form-field",67)(190,"mat-label"),s(191,"Horizontal"),n(),i(192,"input",69,5),u("ngModelChange",function(t){return m(g),f(e.facade.settings.map.centerOffset.x,t)||(e.facade.settings.map.centerOffset.x=t),c(t)}),p("change",function(){m(g);let t=w(193);return c(e.parseCenterOffset(t))}),n()()()(),i(194,"div",38)(195,"mat-checkbox",70),u("ngModelChange",function(t){return m(g),f(e.facade.settings.map.popoverMulti,t)||(e.facade.settings.map.popoverMulti=t),c(t)}),p("change",function(){return e.persistModel()}),s(196," Popovers close with button "),n()(),i(197,"div",38)(198,"mat-checkbox",71),u("ngModelChange",function(t){return m(g),f(e.facade.settings.map.doubleClickZoom,t)||(e.facade.settings.map.doubleClickZoom=t),c(t)}),p("change",function(){return e.persistModel()}),s(199," Double click to Zoom "),n()(),i(200,"div",38)(201,"mat-checkbox",72),u("ngModelChange",function(t){return m(g),f(e.facade.settings.map.overZoomTiles,t)||(e.facade.settings.map.overZoomTiles=t),c(t)}),p("change",function(){return e.persistModel()}),s(202," Keep tiles visible on max zoom "),n()(),i(203,"div",73)(204,"mat-form-field",39)(205,"mat-label"),s(206,"Map Pan When Following"),n(),i(207,"mat-select",74),u("ngModelChange",function(t){return m(g),f(e.facade.settings.map.panBehavior,t)||(e.facade.settings.map.panBehavior=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(208,zt,2,2,"mat-option",41,v),n()(),b(210,jt,6,1,"mat-form-field",39),n()()()(),i(211,"div",35),s(212,"VECTOR CHARTS"),n(),i(213,"mat-card")(214,"mat-card-content")(215,"div",37)(216,"div",38)(217,"mat-form-field",39)(218,"mat-label"),s(219,"Graphics Style"),n(),i(220,"mat-select",75),u("ngModelChange",function(t){return m(g),f(e.facade.settings.map.s57Options.graphicsStyle,t)||(e.facade.settings.map.s57Options.graphicsStyle=t),c(t)}),p("selectionChange",function(){return e.doS57()}),y(221,Xt,2,2,"mat-option",41,v),n()()(),i(223,"div",38)(224,"mat-form-field",39)(225,"mat-label"),s(226,"Boundaries"),n(),i(227,"mat-select",76),u("ngModelChange",function(t){return m(g),f(e.facade.settings.map.s57Options.boundaries,t)||(e.facade.settings.map.s57Options.boundaries=t),c(t)}),p("selectionChange",function(){return e.doS57()}),y(228,Yt,2,2,"mat-option",41,v),n()()(),i(230,"div",38)(231,"mat-form-field",39)(232,"mat-label"),s(233,"Color Table (Requires refresh)"),n(),i(234,"mat-select",77),u("ngModelChange",function(t){return m(g),f(e.facade.settings.map.s57Options.colorTable,t)||(e.facade.settings.map.s57Options.colorTable=t),c(t)}),p("selectionChange",function(){return e.doS57()}),y(235,Jt,2,2,"mat-option",41,v),n()()(),i(237,"div",38)(238,"mat-form-field",39)(239,"mat-label"),s(240,"Colors"),n(),i(241,"mat-select",78),u("ngModelChange",function(t){return m(g),f(e.facade.settings.map.s57Options.colors,t)||(e.facade.settings.map.s57Options.colors=t),c(t)}),p("selectionChange",function(){return e.doS57()}),y(242,Qt,2,2,"mat-option",41,D),n()()()(),i(244,"div",37)(245,"div",38)(246,"mat-form-field",39)(247,"mat-label"),s(248,"Shallow depth"),n(),i(249,"input",79,6),u("ngModelChange",function(t){return m(g),f(e.facade.settings.map.s57Options.shallowDepth,t)||(e.facade.settings.map.s57Options.shallowDepth=t),c(t)}),p("change",function(){m(g);let t=w(250);return c(e.doS57(t))}),n(),b(251,$t,2,0,"mat-error"),i(252,"span",80),s(253,"m"),n()()(),i(254,"div",38)(255,"mat-form-field",39)(256,"mat-label"),s(257,"Safety depth"),n(),i(258,"input",79,7),u("ngModelChange",function(t){return m(g),f(e.facade.settings.map.s57Options.safetyDepth,t)||(e.facade.settings.map.s57Options.safetyDepth=t),c(t)}),p("change",function(){m(g);let t=w(259);return c(e.doS57(t))}),n(),b(260,ei,2,0,"mat-error"),i(261,"span",80),s(262,"m"),n()()(),i(263,"div",38)(264,"mat-form-field",39)(265,"mat-label"),s(266,"Deep depth"),n(),i(267,"input",79,8),u("ngModelChange",function(t){return m(g),f(e.facade.settings.map.s57Options.deepDepth,t)||(e.facade.settings.map.s57Options.deepDepth=t),c(t)}),p("change",function(){m(g);let t=w(268);return c(e.doS57(t))}),n(),b(269,ti,2,0,"mat-error"),i(270,"span",80),s(271,"m"),n()()(),i(272,"div",38)(273,"mat-form-field",39)(274,"mat-label"),s(275,"Layers"),n(),i(276,"mat-select",81),u("ngModelChange",function(t){return m(g),f(e.facade.settings.map.s57Options.otherLayers,t)||(e.facade.settings.map.s57Options.otherLayers=t),c(t)}),p("selectionChange",function(){return e.doS57()}),y(277,ii,2,2,"mat-option",41,v),n()()()()()()()()()(),i(279,"mat-tab",82)(280,"div",32)(281,"div",33)(282,"div",83)(283,"div",35),s(284,"COURSE"),n(),i(285,"mat-card",36)(286,"mat-card-content")(287,"div",37)(288,"div",38)(289,"mat-form-field",39)(290,"mat-label"),s(291,"Arrival Circle"),n(),i(292,"input",79,9),u("ngModelChange",function(t){return m(g),f(e.facade.settings.course.arrivalCircle,t)||(e.facade.settings.course.arrivalCircle=t),c(t)}),p("change",function(){m(g);let t=w(293);return c(e.parseNumber(t))}),n(),b(294,ni,2,0,"mat-error"),i(295,"span",80),s(296,"m"),n()()()(),i(297,"div",37)(298,"div",38)(299,"mat-checkbox",48,10),u("ngModelChange",function(t){return m(g),f(e.facade.settings.course.autoNextPointOnArrival,t)||(e.facade.settings.course.autoNextPointOnArrival=t),c(t)}),p("change",function(){return e.persistModel()}),s(301," Auto-advance to next point on arrival "),n()()(),i(302,"div",37)(303,"div",38)(304,"mat-form-field",39)(305,"mat-label"),s(306,"Notification type to use"),n(),i(307,"mat-select",84,11),u("ngModelChange",function(t){return m(g),f(e.facade.settings.course.autoNextPointTrigger,t)||(e.facade.settings.course.autoNextPointTrigger=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(309,ai,2,2,"mat-option",41,D),n()()(),i(311,"div",38)(312,"mat-form-field",39)(313,"mat-label"),s(314,"Time to wait before advancing"),n(),i(315,"mat-select",85),u("ngModelChange",function(t){return m(g),f(e.facade.settings.course.autoNextPointDelay,t)||(e.facade.settings.course.autoNextPointDelay=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(316,oi,2,2,"mat-option",41,v),n()()()()()()()()()(),i(318,"mat-tab",86)(319,"div",32)(320,"div",33)(321,"div",87)(322,"div",35),s(323,"VESSEL"),n(),i(324,"mat-card",36)(325,"mat-card-content")(326,"div",37)(327,"div",38)(328,"fieldset")(329,"legend"),s(330,"Vessel Icon Size"),n(),i(331,"div",37)(332,"div",38)(333,"mat-radio-group",88),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.iconScale,t)||(e.facade.settings.vessels.iconScale=t),c(t)}),p("change",function(){return e.persistModel()}),y(334,ri,3,4,"mat-radio-button",41,v),n()()()()()(),i(336,"div",38)(337,"fieldset")(338,"legend")(339,"mat-checkbox",89,12),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.fixedLocationMode,t)||(e.facade.settings.vessels.fixedLocationMode=t),c(t)}),p("change",function(){return e.persistModel()}),s(341," Fixed Location Mode "),n()(),i(342,"div",37)(343,"div",38)(344,"mat-form-field",67)(345,"mat-label"),s(346,"Latitude"),n(),i(347,"input",90,13),u("ngModelChange",function(t){return m(g),f(e.facade.fixedPosition[1],t)||(e.facade.fixedPosition[1]=t),c(t)}),p("change",function(){m(g);let t=w(348);return c(e.parseNumber(t,!0))}),n(),b(349,si,2,0,"mat-error"),n(),i(350,"mat-form-field",67)(351,"mat-label"),s(352,"Longitude"),n(),i(353,"input",91,14),u("ngModelChange",function(t){return m(g),f(e.facade.fixedPosition[0],t)||(e.facade.fixedPosition[0]=t),c(t)}),p("change",function(){m(g);let t=w(354);return c(e.parseNumber(t,!0))}),n(),b(355,li,2,0,"mat-error"),n()()()()()()(),E(356,"br"),i(357,"mat-card",36)(358,"mat-card-content")(359,"div",38)(360,"fieldset")(361,"legend"),s(362,"Vessel Lines:"),n(),i(363,"div",37)(364,"mat-checkbox",48),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.windVectors,t)||(e.facade.settings.vessels.windVectors=t),c(t)}),p("change",function(){return e.persistModel()}),s(365," Display Wind Vectors "),n(),i(366,"mat-checkbox",48),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.laylines,t)||(e.facade.settings.vessels.laylines=t),c(t)}),p("change",function(){return e.persistModel()}),s(367," Display Laylines "),n()(),i(368,"div",37)(369,"div",38)(370,"fieldset")(371,"legend"),s(372,"Heading Line"),n(),i(373,"div",37)(374,"div",38)(375,"mat-form-field")(376,"mat-label"),s(377,"Heading Line Length"),n(),i(378,"mat-select",92),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.selfLines.heading.length,t)||(e.facade.settings.vessels.selfLines.heading.length=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(379,di,2,2,"mat-option",41,v),n()()(),i(381,"div",38)(382,"linestyle-select",93),p("selectionChange",function(t){return e.onLineStyle("heading",t)}),n()()()()()(),i(383,"div",37)(384,"div",38)(385,"fieldset")(386,"legend"),s(387,"COG Line"),n(),i(388,"div",37)(389,"div",38)(390,"mat-form-field")(391,"mat-label"),s(392,"COG Line Length"),n(),i(393,"mat-select",94),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.selfLines.cog.length,t)||(e.facade.settings.vessels.selfLines.cog.length=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(394,gi,2,2,"mat-option",41,v),n()()(),i(396,"div",38)(397,"linestyle-select",93),p("selectionChange",function(t){return e.onLineStyle("cog",t)}),n()()()()()()()(),i(398,"div",38)(399,"fieldset")(400,"legend")(401,"mat-checkbox",48),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.rangeCircles,t)||(e.facade.settings.vessels.rangeCircles=t),c(t)}),p("change",function(){return e.persistModel()}),s(402," Display Range Circles "),n()(),i(403,"div",37)(404,"div",38)(405,"mat-form-field",39)(406,"mat-label"),s(407,"Number of Range Circles"),n(),i(408,"mat-select",95),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.rangeCircleCount,t)||(e.facade.settings.vessels.rangeCircleCount=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(409,mi,2,2,"mat-option",41,D),n()()(),i(411,"div",38)(412,"mat-form-field",39)(413,"mat-label"),s(414,"Minimum Zoom Level"),n(),i(415,"mat-select",95),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.rangeCircleMinZoom,t)||(e.facade.settings.vessels.rangeCircleMinZoom=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(416,ci,2,2,"mat-option",41,D),n()()()(),i(418,"div",37)(419,"div",38)(420,"mat-checkbox",96),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.rangeCirclesFixed,t)||(e.facade.settings.vessels.rangeCirclesFixed=t),c(t)}),p("change",function(){return e.persistModel()}),s(421," Use Fixed Distance "),n()(),i(422,"div",38)(423,"mat-form-field",67)(424,"mat-label"),s(425),n(),i(426,"input",97,15),u("ngModelChange",function(t){return m(g),f(e.formattedNumberModel.rangeCirclesDistance,t)||(e.formattedNumberModel.rangeCirclesDistance=t),c(t)}),p("change",function(){m(g);let t=w(427);return c(e.parseFormattedNumber(t))}),n(),b(428,pi,2,0,"mat-error"),n()()()()()()(),E(429,"br"),i(430,"mat-card",36)(431,"mat-card-content")(432,"div",37)(433,"fieldset")(434,"legend")(435,"mat-checkbox",48),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.trail,t)||(e.facade.settings.vessels.trail=t),c(t)}),p("change",function(){return e.persistModel("vesselTrail")}),s(436," Display Vessel Track "),n()(),i(437,"div",37)(438,"div",38)(439,"mat-checkbox",98),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.trailFromServer,t)||(e.facade.settings.vessels.trailFromServer=t),c(t)}),p("change",function(){return e.persistModel("trailFromServer")}),s(440," Get Track from server "),n(),s(441," \xA0\xA0 "),i(442,"mat-slider",99)(443,"input",100),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.trailDuration,t)||(e.facade.settings.vessels.trailDuration=t),c(t)}),p("valueChange",function(){return e.deferPersist()}),n()(),s(444),n()(),i(445,"div",37)(446,"div",38)(447,"mat-form-field",39)(448,"mat-label"),s(449,"Resolution: Last hour"),n(),i(450,"mat-select",95),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.trailResolution.lastHour,t)||(e.facade.settings.vessels.trailResolution.lastHour=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(451,_i,2,2,"mat-option",41,v),n()()(),i(453,"div",38)(454,"mat-form-field",39)(455,"mat-label"),s(456,"Resolution: 1 hr -> 24 hrs"),n(),i(457,"mat-select",95),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.trailResolution.next23,t)||(e.facade.settings.vessels.trailResolution.next23=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(458,fi,2,2,"mat-option",41,v),n()()(),i(460,"div",38)(461,"mat-form-field",39)(462,"mat-label"),s(463,"Resolution: > 24 hrs"),n(),i(464,"mat-select",95),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.trailResolution.beyond24,t)||(e.facade.settings.vessels.trailResolution.beyond24=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(465,ui,2,2,"mat-option",41,v),n()()()()()()()(),i(467,"div",35),s(468,"OTHER VESSELS"),n(),i(469,"mat-card",36)(470,"mat-card-content")(471,"div",37)(472,"div",38)(473,"mat-checkbox",48),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.aisShowTrack,t)||(e.facade.settings.vessels.aisShowTrack=t),c(t)}),p("change",function(){return e.persistModel()}),s(474," Show Track "),n(),s(475," \xA0 "),i(476,"mat-checkbox",48),u("ngModelChange",function(t){return m(g),f(e.aisStateFilter.moored,t)||(e.aisStateFilter.moored=t),c(t)}),p("change",function(){return e.onAisStateFilter()}),s(477," Hide Moored "),n(),s(478," \xA0 "),i(479,"mat-checkbox",48),u("ngModelChange",function(t){return m(g),f(e.aisStateFilter.anchored,t)||(e.aisStateFilter.anchored=t),c(t)}),p("change",function(){return e.onAisStateFilter()}),s(480," Hide Anchored "),n()()(),i(481,"div",37)(482,"div",38)(483,"mat-form-field",39)(484,"mat-label"),s(485,"Mark AIS target inactive after"),n(),i(486,"mat-select",64),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.aisStaleAge,t)||(e.facade.settings.vessels.aisStaleAge=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(487,hi,2,2,"mat-option",41,v),n()()(),i(489,"div",38)(490,"mat-form-field",39)(491,"mat-label"),s(492,"Remove AIS target after"),n(),i(493,"mat-select",64),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.aisMaxAge,t)||(e.facade.settings.vessels.aisMaxAge=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(494,yi,2,2,"mat-option",41,v),n()()(),i(496,"div",38)(497,"mat-form-field",39)(498,"mat-label"),s(499,"Wind Vector Value"),n(),i(500,"mat-select",64),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.aisWindApparent,t)||(e.facade.settings.vessels.aisWindApparent=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(501,Si,2,2,"mat-option",41,v),n()()(),i(503,"div",38)(504,"mat-form-field",39)(505,"mat-label"),s(506,"Wind / Track Zoom Level"),n(),i(507,"mat-select",64),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.aisWindMinZoom,t)||(e.facade.settings.vessels.aisWindMinZoom=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(508,Ci,2,2,"mat-option",41,D),n()()(),i(510,"div",38)(511,"mat-form-field",39)(512,"mat-label"),s(513,"COG Line"),n(),i(514,"mat-select",64),u("ngModelChange",function(t){return m(g),f(e.facade.settings.vessels.aisCogLine,t)||(e.facade.settings.vessels.aisCogLine=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(515,Mi,2,2,"mat-option",41,v),n()()()()()()()()()(),i(517,"mat-tab",101)(518,"div",32)(519,"div",33)(520,"div",102)(521,"div",35),s(522,"NOTES"),n(),i(523,"mat-card",36)(524,"mat-card-content")(525,"div",46)(526,"div",38)(527,"mat-checkbox",48),u("ngModelChange",function(t){return m(g),f(e.facade.settings.ui.showNotes,t)||(e.facade.settings.ui.showNotes=t),c(t)}),p("change",function(){return e.persistModel()}),s(528," Display Notes on Map "),n()(),i(529,"div",38)(530,"mat-form-field",39)(531,"mat-label"),s(532,"Notes Zoom Level"),n(),i(533,"mat-select",103),u("valueChange",function(t){return m(g),f(e.facade.settings.resources.notes.minZoom,t)||(e.facade.settings.resources.notes.minZoom=t),c(t)}),p("selectionChange",function(){return e.persistModel("fetchNotes")}),y(534,wi,2,2,"mat-option",41,D),n()()()(),i(536,"div",46)(537,"div",38)(538,"mat-form-field",39)(539,"mat-label"),s(540),n(),i(541,"mat-select",59),u("ngModelChange",function(t){return m(g),f(e.facade.settings.resources.notes.getRadius,t)||(e.facade.settings.resources.notes.getRadius=t),c(t)}),p("selectionChange",function(){return e.persistModel("fetchNotes")}),y(542,vi,2,2,"mat-option",41,D),n()()()(),i(544,"div",46)(545,"div",38)(546,"mat-form-field",52)(547,"mat-label"),s(548,"Notes fetch filter:"),n(),i(549,"input",104,16),u("ngModelChange",function(t){return m(g),f(e.facade.settings.resources.notes.rootFilter,t)||(e.facade.settings.resources.notes.rootFilter=t),c(t)}),p("change",function(){return e.persistModel("fetchNotes")}),n(),b(551,bi,3,0,"button",105),n()()(),i(552,"div",46)(553,"div",38)(554,"mat-checkbox",106),u("ngModelChange",function(t){return m(g),f(e.facade.settings.resources.notes.groupNameEdit,t)||(e.facade.settings.resources.notes.groupNameEdit=t),c(t)}),p("change",function(){return e.persistModel()}),s(555," Edit Group Names "),n()(),i(556,"div",38)(557,"mat-checkbox",107),u("ngModelChange",function(t){return m(g),f(e.facade.settings.resources.notes.groupRequiresPosition,t)||(e.facade.settings.resources.notes.groupRequiresPosition=t),c(t)}),p("change",function(){return e.persistModel()}),s(558," Position Group Note "),n()()(),i(559,"div",46)(560,"div",38)(561,"mat-checkbox",108),u("ngModelChange",function(t){return m(g),f(e.facade.settings.display.singleClickNoteDetails,t)||(e.facade.settings.display.singleClickNoteDetails=t),c(t)}),p("change",function(){return e.persistModel()}),s(562," Single Click for Note Details "),n()()()()()(),i(563,"div",109)(564,"div",35),s(565,"CUSTOM RESOURCES"),n(),i(566,"mat-card",36)(567,"mat-card-content")(568,"div",46)(569,"div",38)(570,"div",110),s(571," Select custom resource types (./resources/<name>) "),n(),i(572,"mat-selection-list",111,17),p("selectionChange",function(){m(g);let t=w(573);return c(e.onResPathSelected(t))}),y(574,Ti,2,3,"mat-list-option",112,D),n()()()()()()()()(),b(576,Ei,21,2,"mat-tab",113),i(577,"mat-tab",114)(578,"div",32)(579,"div",33)(580,"div",115)(581,"div",35),s(582,"SIGNAL K: CONNECTION"),n(),i(583,"mat-card",36)(584,"mat-card-content")(585,"div",46)(586,"fieldset")(587,"legend"),s(588,"Filter Stream data:"),n(),i(589,"span",116),s(590," Check to include Signal K schema groups on display."),E(591,"br"),i(592,"i"),s(593,"Use to manage display performance."),n()(),i(594,"div",38)(595,"mat-checkbox",117),u("ngModelChange",function(t){return m(g),f(e.facade.settings.signalk.vessels,t)||(e.facade.settings.signalk.vessels=t),c(t)}),p("change",function(){return e.persistModel()}),s(596," Vessels (other than Self) "),n()(),i(597,"div",38)(598,"mat-checkbox",118),u("ngModelChange",function(t){return m(g),f(e.facade.settings.signalk.atons,t)||(e.facade.settings.signalk.atons=t),c(t)}),p("change",function(){return e.persistModel()}),s(599," Aids to Navigation (AtoN) "),n()(),i(600,"div",38)(601,"mat-checkbox",119),u("ngModelChange",function(t){return m(g),f(e.facade.settings.signalk.aircraft,t)||(e.facade.settings.signalk.aircraft=t),c(t)}),p("change",function(){return e.persistModel()}),s(602," Aircraft "),n()(),i(603,"div",38)(604,"mat-checkbox",120),u("ngModelChange",function(t){return m(g),f(e.facade.settings.signalk.sar,t)||(e.facade.settings.signalk.sar=t),c(t)}),p("change",function(){return e.persistModel()}),s(605," Search and Rescue (SaR) "),n()(),i(606,"div",38)(607,"mat-checkbox",121),u("ngModelChange",function(t){return m(g),f(e.facade.settings.signalk.meteo,t)||(e.facade.settings.signalk.meteo=t),c(t)}),p("change",function(){return e.persistModel()}),s(608," Weather (Meteo) "),n()(),i(609,"div",38),E(610,"br"),i(611,"mat-form-field",39)(612,"mat-label"),s(613,"Max. distance from vessel"),n(),i(614,"mat-select",122,18),u("ngModelChange",function(t){return m(g),f(e.facade.settings.signalk.maxRadius,t)||(e.facade.settings.signalk.maxRadius=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(616,Wi,2,2,"mat-option",41,v),n()()()()(),i(618,"div",46)(619,"div",38)(620,"button",123),p("click",function(){return e.clearAuthToken()}),i(621,"mat-icon"),s(622,"key_off"),n()()()()()()()()()(),i(623,"mat-tab",124)(624,"div",32)(625,"div",33)(626,"div",125)(627,"div",35),s(628,"EXPERIMENTS"),n(),i(629,"mat-card",36)(630,"mat-card-content")(631,"div",46)(632,"div",38)(633,"mat-checkbox",48),u("ngModelChange",function(t){return m(g),f(e.facade.settings.resources.video.enable,t)||(e.facade.settings.resources.video.enable=t),c(t)}),p("change",function(){return e.persistModel()}),s(634," Enable Video "),n()(),i(635,"div",38)(636,"mat-form-field",52)(637,"mat-label"),s(638,"url:"),n(),i(639,"input",126,19),u("ngModelChange",function(t){return m(g),f(e.facade.settings.resources.video.url,t)||(e.facade.settings.resources.video.url=t),c(t)}),p("change",function(){return e.persistModel("videoUrl")}),n(),b(641,Vi,2,0,"mat-error"),n()()(),i(642,"div",46)(643,"div",38)(644,"mat-checkbox",127,20),u("ngModelChange",function(t){return m(g),f(e.facade.settings.experiments,t)||(e.facade.settings.experiments=t),c(t)}),p("change",function(){return e.persistModel()}),i(646,"mat-icon"),s(647,"science"),n(),s(648," Experimental Features "),n()()()()()()()()()()()}if(a&2){let g=w(83),r=w(90),t=w(126),ae=w(250),oe=w(259),re=w(268),se=w(293),me=w(300),ce=w(340),le=w(348),de=w(354),ge=w(427),ct=w(550),pt=w(640);o(25),_("ngModel",e.facade.settings.display.darkMode.source),o(),S(e.options.darkMode),o(3),_("ngModel",e.facade.settings.display.nightMode),o(6),_("ngModel",e.facade.settings.display.fab),o(),S(e.options.buttons.fab),o(3),h("disabled",!e.wakeLock.isAvailable),_("ngModel",e.facade.settings.display.disableWakelock),o(3),_("ngModel",e.facade.settings.display.preferInfoPanel),o(5),T(e.facade.applicationList.length>1?47:-1),o(),T(e.show.favourites()?48:-1),o(9),_("ngModel",e.facade.settings.display.muteSound),o(3),_("ngModel",e.facade.settings.display.depthAlarm.enabled),o(6),_("ngModel",e.facade.settings.display.depthAlarm.smoothing),h("disabled",!e.facade.settings.display.depthAlarm.enabled),o(),S(e.options.alarm.smoothing),o(9),_("ngModel",e.facade.settings.display.statusBar.liveEta),o(5),k("Reference Boat Speed (",e.speedUnitSymbol,")"),o(),h("disabled",!e.facade.settings.display.statusBar.liveEta),_("ngModel",e.facade.settings.display.statusBar.referenceSpeed),o(2),T(g.invalid&&(g.dirty||g.touched)?84:-1),o(5),h("disabled",!e.facade.settings.display.statusBar.liveEta),_("ngModel",e.facade.settings.display.statusBar.tapFadeSpeed),o(2),T(r.invalid&&(r.dirty||r.touched)?91:-1),o(11),_("ngModel",e.facade.settings.display.windIndicator),o(),S(e.options.windIndicator),o(14),h("disabled",!e.app.serverConfig.unitPreferences()),_("ngModel",e.facade.settings.units.useServerPrefs),o(8),h("disabled",e.facade.settings.units.useServerPrefs),_("ngModel",e.facade.settings.units.distance),o(2),S(e.options.availableUnits.distance),o(6),h("disabled",e.facade.settings.units.useServerPrefs),_("ngModel",e.facade.settings.units.depth),o(),S(e.options.availableUnits.depth),o(6),h("disabled",e.facade.settings.units.useServerPrefs),_("ngModel",e.facade.settings.units.length),o(),S(e.options.availableUnits.length),o(6),h("disabled",e.facade.settings.units.useServerPrefs),_("ngModel",e.facade.settings.units.temperature),o(),S(e.options.availableUnits.temperature),o(6),h("disabled",e.facade.settings.units.useServerPrefs),_("ngModel",e.facade.settings.units.speed),o(),S(e.options.availableUnits.speed),o(3),T(e.options.preferredValues.coords.length!==0?158:-1),o(),T(e.options.preferredValues.heading.length!==0?159:-1),o(18),_("ngModel",e.facade.settings.map.labelsMinZoom),o(),S(e.options.zoomLevels),o(9),h("min",-e.centerOffsetLimit)("max",e.centerOffsetLimit),_("ngModel",e.facade.settings.map.centerOffset.y),o(5),h("min",-e.centerOffsetLimit)("max",e.centerOffsetLimit),_("ngModel",e.facade.settings.map.centerOffset.x),o(3),_("ngModel",e.facade.settings.map.popoverMulti),o(3),_("ngModel",e.facade.settings.map.doubleClickZoom),o(3),_("ngModel",e.facade.settings.map.overZoomTiles),o(6),_("ngModel",e.facade.settings.map.panBehavior),o(),S(e.options.map.panBehavior),o(2),T(e.facade.settings.map.panBehavior==="exit"?210:-1),o(10),_("ngModel",e.facade.settings.map.s57Options.graphicsStyle),o(),S(e.options.map.s57.graphicsStyle),o(6),_("ngModel",e.facade.settings.map.s57Options.boundaries),o(),S(e.options.map.s57.boundaries),o(6),_("ngModel",e.facade.settings.map.s57Options.colorTable),o(),S(e.options.map.s57.colorTables),o(6),_("ngModel",e.facade.settings.map.s57Options.colors),o(),S(e.options.map.s57.colors),o(7),_("ngModel",e.facade.settings.map.s57Options.shallowDepth),o(2),T(ae.invalid&&(ae.dirty||ae.touched)?251:-1),o(7),_("ngModel",e.facade.settings.map.s57Options.safetyDepth),o(2),T(oe.invalid&&(oe.dirty||oe.touched)?260:-1),o(7),_("ngModel",e.facade.settings.map.s57Options.deepDepth),o(2),T(re.invalid&&(re.dirty||re.touched)?269:-1),o(7),_("ngModel",e.facade.settings.map.s57Options.otherLayers),o(),S(e.options.map.s57.otherLayers),o(15),_("ngModel",e.facade.settings.course.arrivalCircle),o(2),T(se.invalid&&(se.dirty||se.touched)?294:-1),o(5),_("ngModel",e.facade.settings.course.autoNextPointOnArrival),o(8),h("disabled",me.checked===!1),_("ngModel",e.facade.settings.course.autoNextPointTrigger),o(2),S(e.options.course.nextPointTrigger),o(6),h("disabled",me.checked===!1),_("ngModel",e.facade.settings.course.autoNextPointDelay),o(),S(e.options.course.nextPointDelay),o(17),_("ngModel",e.facade.settings.vessels.iconScale),o(),S(e.options.vessel.selfIconScale),o(5),_("ngModel",e.facade.settings.vessels.fixedLocationMode),o(8),_("ngModel",e.facade.fixedPosition[1]),h("disabled",!ce.checked),o(2),T(le.invalid&&(le.dirty||le.touched)?349:-1),o(4),_("ngModel",e.facade.fixedPosition[0]),h("disabled",!ce.checked),o(2),T(de.invalid&&(de.dirty||de.touched)?355:-1),o(9),_("ngModel",e.facade.settings.vessels.windVectors),o(2),_("ngModel",e.facade.settings.vessels.laylines),o(12),_("ngModel",e.facade.settings.vessels.selfLines.heading.length),o(),S(e.options.vessel.headingLine),o(3),h("color",e.facade.settings.vessels.selfLines.heading.color)("dash",e.facade.settings.vessels.selfLines.heading.dash)("weight",e.facade.settings.vessels.selfLines.heading.weight),o(11),_("ngModel",e.facade.settings.vessels.selfLines.cog.length),o(),S(e.options.vessel.cogLine),o(3),h("color",e.facade.settings.vessels.selfLines.cog.color)("dash",e.facade.settings.vessels.selfLines.cog.dash)("weight",e.facade.settings.vessels.selfLines.cog.weight),o(4),_("ngModel",e.facade.settings.vessels.rangeCircles),o(7),_("ngModel",e.facade.settings.vessels.rangeCircleCount),h("disabled",!e.facade.settings.vessels.rangeCircles),o(),S(e.options.rangeCircles.count),o(6),_("ngModel",e.facade.settings.vessels.rangeCircleMinZoom),h("disabled",!e.facade.settings.vessels.rangeCircles),o(),S(e.options.rangeCircles.zoomLevels),o(4),_("ngModel",e.facade.settings.vessels.rangeCirclesFixed),h("disabled",!e.facade.settings.vessels.rangeCircles),o(5),k(" Distance between circles (",e.renderSymbol(e.facade.settings.units.distance),") "),o(),_("ngModel",e.formattedNumberModel.rangeCirclesDistance),h("disabled",!e.facade.settings.vessels.rangeCircles||!e.facade.settings.vessels.rangeCirclesFixed),o(2),T(ge.invalid&&(ge.dirty||ge.touched)?428:-1),o(7),_("ngModel",e.facade.settings.vessels.trail),o(4),h("disabled",!e.facade.settings.vessels.trail),_("ngModel",e.facade.settings.vessels.trailFromServer),o(3),h("disabled",!e.facade.settings.vessels.trailFromServer||!e.facade.settings.vessels.trail),o(),_("ngModel",e.facade.settings.vessels.trailDuration),o(),k(" Length (",e.facade.settings.vessels.trailDuration," hrs) "),o(6),_("ngModel",e.facade.settings.vessels.trailResolution.lastHour),h("disabled",!e.facade.settings.vessels.trailFromServer||!e.facade.settings.vessels.trail),o(),S(e.options.trailIntervals.highResolution),o(6),_("ngModel",e.facade.settings.vessels.trailResolution.next23),h("disabled",!e.facade.settings.vessels.trailFromServer||!e.facade.settings.vessels.trail),o(),S(e.options.trailIntervals.highResolution),o(6),_("ngModel",e.facade.settings.vessels.trailResolution.beyond24),h("disabled",!e.facade.settings.vessels.trailFromServer||!e.facade.settings.vessels.trail),o(),S(e.options.trailIntervals.mediumResolution),o(8),_("ngModel",e.facade.settings.vessels.aisShowTrack),o(3),_("ngModel",e.aisStateFilter.moored),o(3),_("ngModel",e.aisStateFilter.anchored),o(7),_("ngModel",e.facade.settings.vessels.aisStaleAge),o(),S(e.options.vessel.aisTimeouts),o(6),_("ngModel",e.facade.settings.vessels.aisMaxAge),o(),S(e.options.vessel.aisTimeouts),o(6),_("ngModel",e.facade.settings.vessels.aisWindApparent),o(),S(e.options.preferredValues.wind),o(6),_("ngModel",e.facade.settings.vessels.aisWindMinZoom),o(),S(e.options.zoomLevels),o(6),_("ngModel",e.facade.settings.vessels.aisCogLine),o(),S(e.options.vessel.aisCogLine),o(12),_("ngModel",e.facade.settings.ui.showNotes),o(6),h("disabled",!e.facade.settings.ui.showNotes),_("value",e.facade.settings.resources.notes.minZoom),o(),S(e.options.zoomLevels),o(6),C("Fetch Notes radius: ("+e.options.availableUnits.distance.get(t.value)+")"),o(),h("disabled",!e.facade.settings.ui.showNotes),_("ngModel",e.facade.settings.resources.notes.getRadius),o(),S(e.options.resources.noteRadius),o(7),_("ngModel",e.facade.settings.resources.notes.rootFilter),o(2),T(ct.value?551:-1),o(3),_("ngModel",e.facade.settings.resources.notes.groupNameEdit),o(3),_("ngModel",e.facade.settings.resources.notes.groupRequiresPosition),o(4),_("ngModel",e.facade.settings.display.singleClickNoteDetails),o(13),S(e.facade.resourcePathList),o(2),T(e.app.featureFlags().radarApi?576:-1),o(19),_("ngModel",e.facade.settings.signalk.vessels),o(3),_("ngModel",e.facade.settings.signalk.atons),o(3),_("ngModel",e.facade.settings.signalk.aircraft),o(3),_("ngModel",e.facade.settings.signalk.sar),o(3),_("ngModel",e.facade.settings.signalk.meteo),o(7),_("ngModel",e.facade.settings.signalk.maxRadius),o(2),S(e.options.vessel.aisMaxRadius),o(17),_("ngModel",e.facade.settings.resources.video.enable),o(6),h("disabled",!e.facade.settings.resources.video.enable),_("ngModel",e.facade.settings.resources.video.url),o(2),T(pt.invalid?641:-1),o(3),_("ngModel",e.facade.settings.experiments)}},dependencies:[Z,U,Te,G,We,Ve,Ee,De,H,Me,Ce,Re,Ne,ee,nt,$,Ae,Ie,Fe,xe,Le,Pe,ke,N,ve,we,R,be,K,Be,rt,at,ot,$e,Q,q,z,Ue,Ge,J,Y,He,X,j,Oe,ze,Ke,it,et,tt,ne,te],styles:["[_nghost-%COMP%] .mat-dialog-content{padding:0 4px}[_nghost-%COMP%] .mat-mdc-dialog-content{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;max-height:none;overflow:hidden}[_nghost-%COMP%] .mat-mdc-dialog-content .mat-mdc-tab-group, [_nghost-%COMP%] .mat-mdc-dialog-content .mat-mdc-tab-body-wrapper{flex:1 1 auto;min-height:0}.settings[_ngcontent-%COMP%] .setting-group-title[_ngcontent-%COMP%]{font-weight:700;font-size:10pt;font-family:Arial,Helvetica,sans-serif;padding:10px 0}.setting-card-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.settings[_ngcontent-%COMP%] .setting-card-row-item[_ngcontent-%COMP%]{padding-right:15px;flex:1 1 auto}.settings[_ngcontent-%COMP%] .setting-card-row-item.setting-card-row-stack[_ngcontent-%COMP%]{flex-basis:220px}.settings[_ngcontent-%COMP%] .setting-field-group-title[_ngcontent-%COMP%]{font-size:10pt;font-family:Arial,Helvetica,sans-serif;opacity:.7;line-height:1.4;min-height:1.4em;padding-bottom:2px}.settings[_ngcontent-%COMP%] .setting-field-group[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:10px}.settings[_ngcontent-%COMP%] .setting-field-group[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex:0 1 150px;min-width:80px}@media only screen and (max-width:599px){.settings[_ngcontent-%COMP%] .setting-group[_ngcontent-%COMP%]{padding:5px 5%}}@media only screen and (min-width:600px)and (max-width:959px),screen and (min-width:960px)and (max-width:1279px),screen and (min-width:1280px)and (max-width:1919px),screen and (min-width:1920px)and (max-width:5000px){.settings[_ngcontent-%COMP%] .setting-group[_ngcontent-%COMP%]{padding:5px 5%}}"]})};export{mt as SettingsDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ha as $,r as Y,z as Z}from"./chunk-
|
|
1
|
+
import{Ha as $,r as Y,z as Z}from"./chunk-2RJKLB5L.js";import{a as N,b as Q,c as X}from"./chunk-NDDO5DKA.js";import"./chunk-PSRS6NXJ.js";import{i as K,k as W}from"./chunk-WXOWBQXR.js";import{a as J,b as U,d as q}from"./chunk-SOVFTS2B.js";import{a as B}from"./chunk-VSWAOYSI.js";import"./chunk-PGHE7FOF.js";import"./chunk-7UXFP343.js";import"./chunk-TGPAYIRR.js";import{b as H,i as z,o as G}from"./chunk-7Z4ZZM32.js";import{Dd as P,Ea as u,Ed as R,Fa as g,Ha as C,Hd as k,Ia as M,Ja as I,Jd as T,Ka as _,La as i,Ma as t,Na as b,Q as d,R as p,Rd as V,Td as A,Ua as h,Wa as f,Wd as F,Ya as c,Yd as O,Zd as j,ja as r,lb as n,mb as w,nb as v,oa as m,pb as D,pe as L,qb as S,ra as y,rb as E}from"./chunk-JH5KSRZ6.js";import"./chunk-6H3I7D5M.js";function te(o,a){if(o&1&&(i(0,"mat-option",10),n(1),t()),o&2){let e=a.$implicit;_("value",e),r(),w(e)}}function ie(o,a){if(o&1){let e=h();i(0,"div")(1,"ap-file-input",17),f("chosen",function(l){d(e);let x=c(2);return p(x.parseFile(l))}),i(2,"div",18)(3,"div",19),n(4," Click or Drop file "),t()()()()}o&2&&(r(),_("astext",!0))}function ne(o,a){if(o&1){let e=h();i(0,"div")(1,"div")(2,"b"),n(3,"Invalid Resource Data:"),t(),b(4,"br")(5,"br"),i(6,"i"),n(7,"Selected file does not contain valid data. "),t(),b(8,"br"),t(),i(9,"div",20)(10,"button",21),f("click",function(){d(e);let l=c(2);return p(l.app.showHelp("resource"))}),i(11,"mat-icon"),n(12,"help"),t(),n(13," Help "),t()()()}}function oe(o,a){o&1&&(i(0,"div",16),n(1," Note: Data will not be validated when uploaded to server! "),t())}function ae(o,a){if(o&1){let e=h();i(0,"div",7)(1,"div")(2,"mat-form-field",8)(3,"mat-label"),n(4,"Select Destination Path"),t(),i(5,"mat-select",9,0),E("valueChange",function(l){d(e);let x=c();return S(x.targetPath,l)||(x.targetPath=l),p(l)}),M(7,te,2,2,"mat-option",10,C),t()()(),u(9,ie,5,1,"div"),u(10,ne,14,0,"div"),i(11,"div")(12,"div",11)(13,"div",12)(14,"div")(15,"span",13),n(16,"Name:"),t(),n(17),t(),i(18,"div")(19,"span",13),n(20,"Type:"),t(),n(21),t()()(),i(22,"div",14)(23,"button",15),f("click",function(){d(e);let l=c();return p(l.load())}),i(24,"mat-icon"),n(25,"file_upload"),t(),n(26," \xA0Load\xA0 "),t(),b(27,"br"),n(28,"\xA0 "),u(29,oe,2,0,"div",16),t()()()}if(o&2){let e=c();r(5),_("disabled",!e.resPaths),D("value",e.targetPath),r(2),I(e.resPaths),r(2),g(e.source.name?-1:9),r(),g(e.display.notValid?10:-1),r(7),v(" ",e.source.name," "),r(4),v(" ",e.source.type," "),r(2),_("disabled",!e.targetPath||!e.source.name),r(6),g(e.targetPath&&e.source.name?29:-1)}}var ee=class o{constructor(a,e,s,l){this.app=a;this.skclient=e;this.dialogRef=s;this.data=l}app;skclient;dialogRef;data;resPaths=[];targetPath=null;source={type:null,name:null,data:null};display={notValid:!1};unsubscribe=[];ngOnInit(){this.skclient.api.get(this.app.skApiVersion,"/resources").subscribe(a=>{this.resPaths=[],this.targetPath=null,this.resPaths=Object.keys(a).filter(e=>!["routes","waypoints","notes","regions","charts","tracks"].includes(e))},()=>{this.resPaths=[],this.targetPath=null})}ngOnDestroy(){this.unsubscribe.forEach(a=>a.unsubscribe())}load(){this.dialogRef.close({path:this.targetPath,data:this.source.data})}parseFile(a){this.source=a,this.source.type="Unknown";try{let e=JSON.parse(a.data);this.source.type=e.type?e.type:this.source.type}catch(e){console.log("Error parsing resource file!")}}static \u0275fac=function(e){return new(e||o)(m(Z),m(Y),m(P),m(R))};static \u0275cmp=y({type:o,selectors:[["resource-upload-dialog"]],decls:13,vars:1,consts:[["respaths",""],[1,"resourceload-dialog"],[2,"background-color","transparent"],[2,"flex","1 1 auto","text-align","center"],[2,"text-align","right"],["mat-icon-button","",3,"click"],["mat-dialog-content",""],[1,"card-group"],["floatLabel","always",2,"width","100%"],["id","respaths",3,"valueChange","disabled","value"],[3,"value"],[2,"display","flex","flex-wrap","wrap"],[2,"flex","1 1 auto","padding","5px","font-size","smaller"],[2,"font-weight","bold"],[2,"text-align","center","padding-top","15px"],["mat-raised-button","","matTooltip","Load features","matTooltipPosition","below",3,"click","disabled"],[2,"padding","10px","border","gray 1px dashed","font-style","italic"],[3,"chosen","astext"],[2,"width","200px"],[2,"padding","25%","border","gray 1px dashed"],[2,"width","100%","text-align","center"],["mat-raised-button","",3,"click"]],template:function(e,s){e&1&&(i(0,"div",1)(1,"mat-toolbar",2)(2,"span")(3,"mat-icon"),n(4,"category"),t()(),i(5,"span",3),n(6,"Load Resource"),t(),i(7,"span",4)(8,"button",5),f("click",function(){return s.dialogRef.close()}),i(9,"mat-icon"),n(10,"close"),t()()()(),i(11,"div",6),u(12,ae,30,8,"div",7),t()()),e&2&&(r(12),g(s.display.notValid?-1:12))},dependencies:[L,G,z,H,q,U,J,N,B,j,O,K,F,A,V,X,Q,W,T,k,$],styles:[".resourceload-dialog[_ngcontent-%COMP%]{font-family:roboto;position:relative;width:100%}.card-group[_ngcontent-%COMP%]{padding:5px 5%}@media only screen and (min-width:800px){.card-group[_ngcontent-%COMP%]{padding:5px 5%}}"]})};export{ee as ResourceImportDialog};
|
package/public/index.html
CHANGED
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
</div>
|
|
55
55
|
</div>
|
|
56
56
|
</app-root>
|
|
57
|
-
<link rel="modulepreload" href="chunk-Y5XX3LUA.js"><link rel="modulepreload" href="chunk-
|
|
57
|
+
<link rel="modulepreload" href="chunk-Y5XX3LUA.js"><link rel="modulepreload" href="chunk-2RJKLB5L.js"><link rel="modulepreload" href="chunk-NDDO5DKA.js"><link rel="modulepreload" href="chunk-PSRS6NXJ.js"><link rel="modulepreload" href="chunk-WXOWBQXR.js"><link rel="modulepreload" href="chunk-SOVFTS2B.js"><link rel="modulepreload" href="chunk-VSWAOYSI.js"><link rel="modulepreload" href="chunk-PGHE7FOF.js"><link rel="modulepreload" href="chunk-7UXFP343.js"><link rel="modulepreload" href="chunk-TGPAYIRR.js"><script src="polyfills-RV3JTMEC.js" type="module"></script><script src="main-WYFYYBYG.js" type="module"></script></body>
|
|
58
58
|
</html>
|