@signalk/freeboard-sk 3.3.0-beta.0 → 3.3.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1585,8 +1585,9 @@
1585
1585
  map.
1586
1586
  </li>
1587
1587
  <li>
1588
- <b>Measure Radius</b>: Measure radius of a circle centered at
1589
- the selected location on the map.
1588
+ <b>Bearing &amp; Distance</b>: Measure the bearing and
1589
+ distance between two points on the map. See the Feature
1590
+ Browser &rarr; Bearing &amp; Distance.
1590
1591
  </li>
1591
1592
  <li>
1592
1593
  <b>Draw Route</b>: Create a route by clicking locations on the
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
2
+ <circle cx="12" cy="12" r="9" stroke-dasharray="3.1 2.55"/>
3
+ <path d="M12 12 19.4 7.7"/>
4
+ <circle cx="12" cy="12" r="1.6" fill="currentColor" stroke="none"/>
5
+ </svg>
@@ -1 +1 @@
1
- import{Da as dt,E as tt,Ea as gt,Fa as mt,K as it,L as nt,M as at,S as ot,Ta as ct,U as rt,Ua as pt,Za as L,a as De,b as Ee,d as U,e as We,g as I,i as Ve,ia as st,j as ke,ta as lt,ua as ee,v as $e,va as te,w as et}from"./chunk-F4EUFUYM.js";import{a as Je,b as Qe,c as $}from"./chunk-ISXARX6U.js";import{b as Ae,e as Be,j as Fe,k as Ne,l as Re}from"./chunk-62WHV6CJ.js";import{a as Y,b as J,c as Xe,d as Q}from"./chunk-MYBGWSLC.js";import{a as Ye}from"./chunk-6E2BDKCH.js";import"./chunk-45ZTFAA5.js";import{b as z,c as Ue,d as Ge,f as He,i as q,j as Ze,n as j,o as X}from"./chunk-X6D4D6EN.js";import{a as Ke,h as ze,j as qe,k as je}from"./chunk-PD55PKQG.js";import"./chunk-YZN4NRWW.js";import"./chunk-YSHHABBQ.js";import{$a as w,$d as Te,Ga as O,Ha as b,Ia as T,Id as Ce,Ka as D,La as y,Ma as S,Md as we,Na as h,Oa as n,Ob as B,Od as Me,Pa as i,Qa as E,Qd as ve,R as W,Rd as N,Sb as Se,T as m,Tb as F,U as c,V as x,W as _e,Xa as V,Za as p,Zd as be,_ as ue,aa as A,ba as fe,ce as R,ee as G,fa as he,jb as M,je as H,ma as o,mb as ye,me as Z,ne as Pe,ob as l,pb as C,qb as k,qe as Le,re as xe,sb as _,se as Oe,tb as u,te as Ie,ua as P,ub as f,ue as K}from"./chunk-RG7WQ7O2.js";import"./chunk-NCEQPEJE.js";var vt=(d,s)=>s[0];function bt(d,s){if(d&1&&(n(0,"mat-option",8),x(),n(1,"svg",6),E(2,"line",7),i()()),d&2){let a=s.$implicit;h("value",a),o(2),O("stroke-width",a)}}function Tt(d,s){if(d&1&&(n(0,"mat-option",8),x(),n(1,"svg",6),E(2,"line",9),i()()),d&2){let a=s.$implicit;h("value",a[0]),o(2),O("stroke-dasharray",a[1])}}var ie=class d{color=F("#ff0000");dash=F("none");weight=F(1);_color=B(()=>this.color());_dash=B(()=>this.dash());_weight=B(()=>this.weight());selectionChange=Se();app=W(L);line={dashArrays:this.app.lineDashMap,weights:[1,2,3,4,5]};constructor(){}ngOnInit(){}onSelectChange(){let s=this.app.formatLineDashArray(this._dash());this.selectionChange.emit({lineStyle:{fill:{color:this._color()},stroke:{color:this._color(),width:this._weight(),lineDash:s}},config:{color:this._color(),weight:this._weight(),dash:this._dash()}})}static \u0275fac=function(a){return new(a||d)};static \u0275cmp=P({type:d,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&&(n(0,"div",0)(1,"mat-form-field",1)(2,"mat-label"),l(3,"Color"),i(),n(4,"input",2),f("ngModelChange",function(r){return u(e._color,r)||(e._color=r),r}),p("change",function(){return e.onSelectChange()}),i()(),n(5,"mat-form-field",3)(6,"mat-label"),l(7,"Weight"),i(),n(8,"mat-select",4),f("ngModelChange",function(r){return u(e._weight,r)||(e._weight=r),r}),p("selectionChange",function(){return e.onSelectChange()}),n(9,"mat-select-trigger")(10,"div",5),x(),n(11,"svg",6),E(12,"line",7),i()()(),y(13,bt,3,2,"mat-option",8,D),i()(),_e(),n(15,"mat-form-field",3)(16,"mat-label"),l(17,"Style"),i(),n(18,"mat-select",4),f("ngModelChange",function(r){return u(e._dash,r)||(e._dash=r),r}),p("selectionChange",function(){return e.onSelectChange()}),n(19,"mat-select-trigger")(20,"div",5),x(),n(21,"svg",6),E(22,"line",9),i()()(),y(23,Tt,3,2,"mat-option",8,vt),i()()()),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:[K,G,H,Z,N,R,$,X,j,q,z,Q,J,Xe,Y],encapsulation:2})};var ne="auto";var Et=(d,s)=>s[0];function Wt(d,s){if(d&1){let a=V();n(0,"div",4)(1,"mat-radio-button",5,0),p("change",function(){m(a);let g=M(2),r=w().$implicit,t=w();return r[1].current=g.value,c(t.save(!0))}),l(3),i()()}if(d&2){let a=s.$implicit,e=w().$implicit,g=w();o(),h("name",e[0])("value",a)("checked",a===e[1].current),o(2),k(" ",g.pathLabel(a)," ")}}function Vt(d,s){if(d&1&&(n(0,"div",2)(1,"div",3)(2,"div"),l(3),i()(),n(4,"div"),y(5,Wt,4,4,"div",4,D),i()()),d&2){let a=s.$implicit;o(3),C(a[1].name),o(2),S(a[1].available)}}var ae=class d{title="";chosen=new ue;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:[ne,"navigation.courseOverGroundTrue","navigation.courseOverGroundMagnetic","navigation.headingTrue","navigation.headingMagnetic"],available:[],current:""}};pathChoicesArray=Object.entries(this.pathChoices);availPaths;app=W(L);constructor(){}pathLabel(s){return s===ne?"Automatic":s.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===ne||this.availPaths.has(g))&&e.available.push(g)}),e.available.length===0&&e.available.push(e.choices[0])})}save(s){let a={};Object.entries(this.pathChoices).forEach(e=>{a[e[0]]=e[1].current}),this.chosen.emit({save:s,value:a})}static \u0275fac=function(a){return new(a||d)};static \u0275cmp=P({type:d,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&&(n(0,"fieldset")(1,"legend",1),l(2),i(),n(3,"div"),y(4,Vt,7,1,"div",2,Et),i()()),a&2&&(o(2),C(e.title),o(2),S(e.pathChoicesArray))},dependencies:[te,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=(d,s)=>s[0],kt=(d,s)=>s.id;function Pt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Lt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function xt(d,s){if(d&1&&(n(0,"mat-option",132),l(1),i()),d&2){let a=s.$implicit;h("value",a.url)("matTooltip",a.description),o(),k(" ",a.name," ")}}function Ot(d,s){if(d&1){let a=V();n(0,"div",46)(1,"div",38)(2,"mat-form-field",39)(3,"mat-label"),l(4,"Select Instruments App"),i(),n(5,"mat-select",64),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.display.plugins.instruments,g)||(r.facade.settings.display.plugins.instruments=g),c(g)}),p("selectionChange",function(){m(a);let g=w();return c(g.onInstrumentApp())}),y(6,xt,2,3,"mat-option",132,D),i()()(),n(8,"div",38)(9,"mat-form-field",52)(10,"mat-label"),l(11,"Parameters"),i(),n(12,"input",133,21),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.display.plugins.parameters,g)||(r.facade.settings.display.plugins.parameters=g),c(g)}),p("change",function(){m(a);let g=w();return c(g.persistModel("pluginParameters"))}),i()()(),n(14,"div",38)(15,"mat-checkbox",134),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.display.plugins.startOnOpen,g)||(r.facade.settings.display.plugins.startOnOpen=g),c(g)}),p("change",function(){m(a);let g=w();return c(g.persistModel("pluginStartOnOpen"))}),l(16," Halt App on hide "),i()(),n(17,"div",38)(18,"button",135),p("click",function(){m(a);let g=w();return c(g.toggleFavourites())}),n(19,"mat-icon"),l(20,"star"),i(),l(21," FAVOURITES "),i()()()}if(d&2){let a=w();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 It(d,s){if(d&1&&(n(0,"mat-list-option",137),l(1),i()),d&2){let a=s.$implicit,e=w(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 At(d,s){if(d&1){let a=V();n(0,"div",37)(1,"div",38)(2,"div",114),E(3,"br"),l(4,"Select Favourite Apps: "),i(),E(5,"mat-divider"),n(6,"mat-selection-list",136,22),p("selectionChange",function(g){m(a);let r=M(7),t=w();return c(t.onFavSelected(g,r))}),y(8,It,2,4,"mat-list-option",137,D),i()()()}if(d&2){let a=w();o(8),S(a.facade.favouritesList)}}function Bt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Ft(d,s){d&1&&(n(0,"mat-error"),l(1,"Please enter a number >= 0"),i())}function Nt(d,s){d&1&&(n(0,"mat-error"),l(1,"Please enter a number >= 1"),i())}function Rt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Ut(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Gt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Ht(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Zt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Kt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function zt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function qt(d,s){if(d&1){let a=V();n(0,"div",38)(1,"mat-form-field",39)(2,"mat-label"),l(3,"Position display format"),i(),n(4,"mat-select",138),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.units.positionFormat,g)||(r.facade.settings.units.positionFormat=g),c(g)}),p("selectionChange",function(){m(a);let g=w();return c(g.persistModel())}),y(5,zt,2,2,"mat-option",41,D),i()()()}if(d&2){let a=w();o(4),_("ngModel",a.facade.settings.units.positionFormat),o(),S(a.options.preferredValues.coords)}}function jt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Xt(d,s){if(d&1){let a=V();n(0,"div",38)(1,"mat-form-field",39)(2,"mat-label"),l(3,"Prefer True / Magnetic values"),i(),n(4,"mat-select",139),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.units.headingAttribute,g)||(r.facade.settings.units.headingAttribute=g),c(g)}),p("selectionChange",function(){m(a);let g=w();return c(g.persistModel("headingAttribute"))}),y(5,jt,2,2,"mat-option",41,D),i()()()}if(d&2){let a=w();o(4),_("ngModel",a.facade.settings.units.headingAttribute),o(),S(a.options.preferredValues.heading)}}function Yt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a),o(),C(a)}}function Jt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Qt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function $t(d,s){if(d&1){let a=V();n(0,"mat-form-field",39)(1,"mat-label"),l(2,"Resume Following After"),i(),n(3,"mat-select",140),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.map.refollowDelay,g)||(r.facade.settings.map.refollowDelay=g),c(g)}),p("selectionChange",function(){m(a);let g=w();return c(g.persistModel())}),y(4,Qt,2,2,"mat-option",41,v),i()()}if(d&2){let a=w();o(3),_("ngModel",a.facade.settings.map.refollowDelay),o(),S(a.options.map.refollowDelay)}}function ei(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function ti(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function ii(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function ni(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a),o(),C(a)}}function ai(d,s){d&1&&(n(0,"mat-error"),l(1," Please enter a positive number "),i())}function oi(d,s){d&1&&(n(0,"mat-error"),l(1," Please enter a positive number "),i())}function ri(d,s){d&1&&(n(0,"mat-error"),l(1," Please enter a positive number "),i())}function si(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function li(d,s){d&1&&(n(0,"mat-error"),l(1," Please enter a number > 0 "),i())}function di(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a),o(),C(a)}}function gi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function mi(d,s){if(d&1&&(n(0,"mat-radio-button",41),E(1,"img",141),l(2),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),ye(`transform: scale(${a[0]})`),o(),k(" (",a[1],") ")}}function ci(d,s){d&1&&(n(0,"mat-error"),l(1," Please enter a value between -90 and 90 (max 9 decimals) "),i())}function pi(d,s){d&1&&(n(0,"mat-error"),l(1," Please enter a value between -180 and 180 (max 9 decimals) "),i())}function _i(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function ui(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function fi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a),o(),C(a)}}function hi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a),o(),C(a)}}function yi(d,s){d&1&&(n(0,"mat-error"),l(1," Please enter a number >= 1. "),i())}function Si(d,s){d&1&&(n(0,"mat-hint"),l(1,"Server requires a Track API (v2) provider"),i())}function Ci(d,s){if(d&1&&(n(0,"mat-hint"),l(1),i()),d&2){let a=w();o(),k("Using: ",a.app.serverTrailWanted()?"Server":"This device")}}function wi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Mi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function vi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function bi(d,s){if(d&1){let a=V();n(0,"div",37)(1,"div",142)(2,"mat-slider",143)(3,"input",104),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.vessels.aisTrackLength,g)||(r.facade.settings.vessels.aisTrackLength=g),c(g)}),p("valueChange",function(){m(a);let g=w();return c(g.deferPersist())}),i()(),l(4),i()()}if(d&2){let a=w();o(2),h("disabled",!a.app.featureFlags().tracksApi),o(),_("ngModel",a.facade.settings.vessels.aisTrackLength),o(),k(" Picked vessel track length (",a.facade.settings.vessels.aisTrackLength," hrs) ")}}function Ti(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Di(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Ei(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Wi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a),o(),C(a)}}function Vi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function ki(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a),o(),C(a)}}function Pi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a),o(),C(a)}}function Li(d,s){if(d&1){let a=V();n(0,"button",144),p("click",function(){m(a),w();let g=M(561);return c(g.value="")}),n(1,"mat-icon"),l(2,"close"),i()()}}function xi(d,s){if(d&1&&(n(0,"mat-list-option",116),l(1),i()),d&2){let a=s.$implicit,e=w();h("selected",e.facade.settings.resources.paths.includes(a))("value",a),o(),k(" ",a," ")}}function Oi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a.id),o(),C(a.name)}}function Ii(d,s){if(d&1){let a=V();n(0,"mat-tab",117)(1,"div",32)(2,"div",33)(3,"div",129)(4,"div",35),l(5,"RADAR SETTINGS"),i(),n(6,"mat-card",36)(7,"div",46)(8,"div",38)(9,"mat-form-field",145)(10,"mat-label"),l(11,"Radar Devices"),i(),n(12,"mat-select",146,23),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.radars.deviceId,g)||(r.facade.settings.radars.deviceId=g),c(g)}),p("selectionChange",function(){m(a);let g=w();return c(g.doRadar())}),y(14,Oi,2,2,"mat-option",41,kt),i()()(),n(16,"div",38)(17,"button",147),p("click",function(){m(a);let g=w();return c(g.refreshRadars())}),n(18,"mat-icon"),l(19," refresh"),i(),l(20," REFRESH "),i()()(),n(21,"div",46)(22,"div",38)(23,"mat-checkbox",48),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.radars.rings,g)||(r.facade.settings.radars.rings=g),c(g)}),p("change",function(){m(a);let g=w();return c(g.persistModel())}),l(24," Draw range circles at the radar range while it transmits "),i()()()()()()()()}if(d&2){let a=w();o(12),h("disabled",!a.radarList().length||a.app.uiCtrl().radarLayer),_("ngModel",a.facade.settings.radars.deviceId),o(2),S(a.radarList()),o(9),_("ngModel",a.facade.settings.radars.rings)}}function Ai(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Bi(d,s){d&1&&(n(0,"mat-error"),l(1," Value required. "),i())}var ft=class d{show={favourites:A(!1)};options;centerOffsetLimit=Ve;aisStateFilter={moored:!1,anchored:!1};formattedNumberModel={rangeCirclesDistance:1e3};unitsChangedSignal=A(0);radarList=A([]);saveOnClose=!1;arrivalCircleChanged=!1;facade=W(pt);myElement=W(he);dialogRef=W(Ce);wakeLock=W(De);s57=W($e);app=W(L);radarApi=W(tt);course=W(rt);constructor(){this.options=new ct,fe(()=>{this.unitsChangedSignal(),this.formatNumberModel()})}ngOnInit(){this.facade.refresh(),this.facade.settings.selections.aisState.forEach(s=>{s in this.aisStateFilter&&(this.aisStateFilter[s]=!0)}),this.refreshRadars()}refreshRadars(){this.radarApi.listRadars().then(s=>{this.radarList.set(s)}).catch(()=>{this.radarList.set([])})}formatNumberModel(){this.formattedNumberModel={rangeCirclesDistance:this.facade.settings.units.distance==="kilometer"?Math.floor(this.facade.settings.vessels.rangeCirclesDistance/1e3):Math.floor(I.transform(this.facade.settings.vessels.rangeCirclesDistance,"m","naut-mile"))}}raiseChange(){this.app.alignUnitPrefs(this.app.serverConfig.unitPreferences()),this.unitsChangedSignal.update(s=>s+1)}handleClose(){this.saveOnClose&&this.persistModel(),this.arrivalCircleChanged&&this.applyArrivalCircle(),this.dialogRef.close()}doWakelock(s){this.persistModel(),s?this.wakeLock.disable():this.wakeLock.enable()}doS57(s){this.facade.settings.map.s57Options.depthUnit=this.facade.settings.units.depth,s?this.parseNumber(s):this.persistModel(),this.s57.setOptions(this.facade.settings.map.s57Options)}doRadar(){this.radarApi.init(this.facade.settings.radars.deviceId).then(s=>{s&&this.persistModel()})}onLineStyle(s,a){let e=this.facade.settings.vessels.selfLines[s];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[s]=a.lineStyle,r}),this.persistModel())}toggleFavourites(){this.show.favourites.update(s=>!s)}parseCenterOffset(s){s.reset(typeof s.model=="number"?ke(s.model):0),this.persistModel()}onArrivalCircleChange(s){this.parseNumber(s),this.arrivalCircleChanged=!0}applyArrivalCircle(){let s=this.facade.settings.course.arrivalCircle,a=this.course.courseData();a.position&&s>0&&s!==a.arrivalCircle&&this.course.setArrivalCircle(s)}parseNumber(s,a){if(typeof s.model!="number"){s.reset(this.fallbackToDefault());return}!a&&s.model<0&&s.reset(Math.abs(s.model)),this.persistModel()}parseFormattedNumber(s,a){typeof s.model=="number"&&(!a&&s.model<0&&s.reset(Math.abs(s.model)),this.facade.settings.vessels.rangeCirclesDistance=this.facade.settings.units.distance==="kilometer"?Math.floor(this.formattedNumberModel.rangeCirclesDistance*1e3):Math.floor(I.nauticalMilesToKm(this.formattedNumberModel.rangeCirclesDistance)*1e3),this.persistModel())}fallbackToDefault(){let s=et();if(typeof this.facade.settings.display.statusBar.referenceSpeed!="number")return s.display.statusBar.referenceSpeed;if(typeof this.facade.settings.display.statusBar.tapFadeSpeed!="number")return s.display.statusBar.tapFadeSpeed;if(typeof this.facade.settings.map.s57Options.shallowDepth!="number")return s.map.s57Options.shallowDepth;if(typeof this.facade.settings.map.s57Options.safetyDepth!="number")return s.map.s57Options.safetyDepth;if(typeof this.facade.settings.map.s57Options.deepDepth!="number")return s.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 s.course.arrivalCircle}get serverTrailAvailable(){return Ee(this.app.trackSource())}trailLengthAllStop=We+1;get trailLengthStop(){let s=this.facade.settings.vessels.trailDuration;return s===U?this.trailLengthAllStop:s}set trailLengthStop(s){this.facade.settings.vessels.trailDuration=s===this.trailLengthAllStop?U:s}trailLengthStopLabel=s=>s===this.trailLengthAllStop?"All":`${s}`;get trailLengthText(){let s=this.facade.settings.vessels.trailDuration;return s===U?"All":`${s} hrs`}persistModel(s){this.facade.applySettings(),this.facade.emitChangeEvent(s)}get speedUnitSymbol(){return I.getSymbol(this.facade.settings.units.speed)}deferPersist(s){this.saveOnClose=!0,this.facade.emitChangeEvent(s)}onInstrumentApp(){this.persistModel("pluginInstruments"),this.facade.buildFavouritesList()}onPreferredPaths(s){s.save&&(this.facade.settings.units.preferredPaths=s.value,this.persistModel())}onFavSelected(s,a){this.facade.settings.display.plugins.favourites=a.selectedOptions.selected.map(e=>e.value),this.persistModel()}onAisStateFilter(){let s=[];for(let a in this.aisStateFilter)this.aisStateFilter[a]&&s.push(a);this.facade.settings.selections.aisState=[].concat(s),this.persistModel()}onResPathSelected(s){this.facade.settings.resources.paths=s.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(s){return I.getSymbol(s)}static \u0275fac=function(a){return new(a||d)};static \u0275cmp=P({type:d,selectors:[["settings-dialog"]],decls:660,vars:142,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"],[2,"width","200px"],["matTooltip","Where the vessel track comes from. Auto uses the server when it can supply one.",3,"ngModelChange","selectionChange","disabled","ngModel"],["value","auto"],["value","server",3,"disabled"],["value","local"],["discrete","","tickInterval","1","min","1",3,"max","displayWith","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"],["matTooltip","How far back the track of a vessel picked with its TRACK button reaches. Needs a Track API (v2) provider.",1,"setting-card-row-item"],["discrete","","tickInterval","1","min","1","max","96",3,"disabled"],["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();n(0,"mat-toolbar",24)(1,"span",25)(2,"mat-icon"),l(3,"settings"),i()(),n(4,"span",26),l(5,"Settings"),i(),n(6,"span",27)(7,"button",28),p("click",function(){return e.handleClose()}),n(8,"mat-icon"),l(9,"close"),i()()()(),n(10,"div",29)(11,"mat-tab-group",30)(12,"mat-tab",31)(13,"div",32)(14,"div",33)(15,"div",34)(16,"div",35),l(17,"DISPLAY"),i(),n(18,"mat-card",36)(19,"mat-card-content")(20,"div",37)(21,"div",38)(22,"mat-form-field",39)(23,"mat-label"),l(24,"Dark Mode setting"),i(),n(25,"mat-select",40),f("ngModelChange",function(t){return m(g),u(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,Pt,2,2,"mat-option",41,v),i()()(),n(28,"div",38)(29,"mat-checkbox",42),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.nightMode,t)||(e.facade.settings.display.nightMode=t),c(t)}),p("change",function(){return e.persistModel()}),l(30," Auto-set Night Mode "),i()(),n(31,"div",38)(32,"mat-form-field",39)(33,"mat-label"),l(34,"Action Button"),i(),n(35,"mat-select",43),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.fab,t)||(e.facade.settings.display.fab=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(36,Lt,2,2,"mat-option",41,v),i()()(),n(38,"div",38)(39,"mat-checkbox",44),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.disableWakelock,t)||(e.facade.settings.display.disableWakelock=t),c(t)}),p("change",function(t){return e.doWakelock(t.checked)}),l(40," Allow Device to Sleep "),i()(),n(41,"div",38)(42,"mat-checkbox",45),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.preferInfoPanel,t)||(e.facade.settings.display.preferInfoPanel=t),c(t)}),p("change",function(){return e.persistModel()}),l(43," Prefer Info-Panel "),i()()()()(),E(44,"br"),n(45,"mat-card",36)(46,"mat-card-content"),b(47,Ot,22,4,"div",46),b(48,At,10,0,"div",37),i()(),E(49,"br"),i(),n(50,"div",34)(51,"div",35),l(52,"SOUND"),i(),n(53,"mat-card",36)(54,"mat-card-content")(55,"div",37)(56,"div",38)(57,"mat-checkbox",47),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.muteSound,t)||(e.facade.settings.display.muteSound=t),c(t)}),p("change",function(){return e.persistModel()}),l(58," Do not Play Sounds "),i()(),n(59,"div",38)(60,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.depthAlarm.enabled,t)||(e.facade.settings.display.depthAlarm.enabled=t),c(t)}),p("change",function(){return e.persistModel()}),l(61," Show DEPTH Alarms "),i()(),n(62,"div",38)(63,"mat-form-field",39)(64,"mat-label"),l(65,"Alarm Smoothing Time"),i(),n(66,"mat-select",49),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.depthAlarm.smoothing,t)||(e.facade.settings.display.depthAlarm.smoothing=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(67,Bt,2,2,"mat-option",41,v),i()()()()()()(),n(69,"div",50)(70,"div",35),l(71,"STATUS BAR OPTIONS"),i(),n(72,"mat-card",36)(73,"mat-card-content")(74,"div",37)(75,"div",38)(76,"mat-checkbox",51),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.statusBar.liveEta,t)||(e.facade.settings.display.statusBar.liveEta=t),c(t)}),p("change",function(){return e.persistModel()}),l(77," Live ETA at cursor "),i()(),n(78,"div",38)(79,"mat-form-field",52)(80,"mat-label"),l(81),i(),n(82,"input",53,0),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.statusBar.referenceSpeed,t)||(e.facade.settings.display.statusBar.referenceSpeed=t),c(t)}),p("change",function(){m(g);let t=M(83);return c(e.parseNumber(t))}),i(),b(84,Ft,2,0,"mat-error"),i()(),n(85,"div",38)(86,"mat-form-field",52)(87,"mat-label"),l(88,"Tap Fade Speed (s)"),i(),n(89,"input",54,1),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.statusBar.tapFadeSpeed,t)||(e.facade.settings.display.statusBar.tapFadeSpeed=t),c(t)}),p("change",function(){m(g);let t=M(90);return c(e.parseNumber(t))}),i(),b(91,Nt,2,0,"mat-error"),i()()()()()(),n(92,"div",50)(93,"div",35),l(94,"WEATHER"),i(),n(95,"mat-card",36)(96,"mat-card-content")(97,"div",37)(98,"div",38)(99,"mat-form-field",39)(100,"mat-label"),l(101,"Wind indicator"),i(),n(102,"mat-select",55),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.windIndicator,t)||(e.facade.settings.display.windIndicator=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(103,Rt,2,2,"mat-option",41,v),i()()()()()()()()()(),n(105,"mat-tab",56)(106,"div",32)(107,"div",33)(108,"div",57)(109,"div",35),l(110,"UNITS & VALUES"),i(),n(111,"mat-card",36)(112,"mat-card-content")(113,"div",37)(114,"div",38)(115,"fieldset")(116,"legend")(117,"mat-checkbox",58,2),f("ngModelChange",function(t){return m(g),u(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())}),l(119," Use Server Unit Preferences "),i()(),n(120,"div",37)(121,"div",38)(122,"mat-form-field",39)(123,"mat-label"),l(124,"Distance units"),i(),n(125,"mat-select",59,3),f("ngModelChange",function(t){return m(g),u(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,Ut,2,2,"mat-option",41,v),i()()(),n(129,"div",38)(130,"mat-form-field",39)(131,"mat-label"),l(132,"Depth units"),i(),n(133,"mat-select",59),f("ngModelChange",function(t){return m(g),u(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,Gt,2,2,"mat-option",41,v),i()()(),n(136,"div",38)(137,"mat-form-field",39)(138,"mat-label"),l(139,"Length units"),i(),n(140,"mat-select",59),f("ngModelChange",function(t){return m(g),u(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,Ht,2,2,"mat-option",41,v),i()()(),n(143,"div",38)(144,"mat-form-field",39)(145,"mat-label"),l(146,"Temperature units"),i(),n(147,"mat-select",59),f("ngModelChange",function(t){return m(g),u(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,Zt,2,2,"mat-option",41,v),i()()(),n(150,"div",38)(151,"mat-form-field",39)(152,"mat-label"),l(153,"Speed units"),i(),n(154,"mat-select",59),f("ngModelChange",function(t){return m(g),u(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,Kt,2,2,"mat-option",41,v),i()()()()()()(),n(157,"div",37),b(158,qt,7,1,"div",38),b(159,Xt,7,1,"div",38),n(160,"div",38)(161,"signalk-preferred-paths",60),p("chosen",function(t){return e.onPreferredPaths(t)}),i()()()()()()()()(),n(162,"mat-tab",61)(163,"div",32)(164,"div",33)(165,"div",62)(166,"div",35),l(167,"MAP"),i(),n(168,"mat-card")(169,"mat-card-content")(170,"div",37)(171,"div",38)(172,"div",63),l(173," \xA0 "),i(),n(174,"mat-form-field",39)(175,"mat-label"),l(176,"Feature label zoom level"),i(),n(177,"mat-select",64),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.labelsMinZoom,t)||(e.facade.settings.map.labelsMinZoom=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(178,Yt,2,2,"mat-option",41,D),i()()(),n(180,"div",38)(181,"div",65),l(182," Offset Vessel Center (%) "),i(),n(183,"div",66)(184,"mat-form-field",67)(185,"mat-label"),l(186,"Vertical"),i(),n(187,"input",68,4),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.centerOffset.y,t)||(e.facade.settings.map.centerOffset.y=t),c(t)}),p("change",function(){m(g);let t=M(188);return c(e.parseCenterOffset(t))}),i()(),n(189,"mat-form-field",67)(190,"mat-label"),l(191,"Horizontal"),i(),n(192,"input",69,5),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.centerOffset.x,t)||(e.facade.settings.map.centerOffset.x=t),c(t)}),p("change",function(){m(g);let t=M(193);return c(e.parseCenterOffset(t))}),i()()()(),n(194,"div",38)(195,"mat-checkbox",70),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.popoverMulti,t)||(e.facade.settings.map.popoverMulti=t),c(t)}),p("change",function(){return e.persistModel()}),l(196," Popovers close with button "),i()(),n(197,"div",38)(198,"mat-checkbox",71),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.doubleClickZoom,t)||(e.facade.settings.map.doubleClickZoom=t),c(t)}),p("change",function(){return e.persistModel()}),l(199," Double click to Zoom "),i()(),n(200,"div",38)(201,"mat-checkbox",72),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.overZoomTiles,t)||(e.facade.settings.map.overZoomTiles=t),c(t)}),p("change",function(){return e.persistModel()}),l(202," Keep tiles visible on max zoom "),i()(),n(203,"div",73)(204,"mat-form-field",39)(205,"mat-label"),l(206,"Map Pan When Following"),i(),n(207,"mat-select",74),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.panBehavior,t)||(e.facade.settings.map.panBehavior=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(208,Jt,2,2,"mat-option",41,v),i()(),b(210,$t,6,1,"mat-form-field",39),i()()()(),n(211,"div",35),l(212,"VECTOR CHARTS"),i(),n(213,"mat-card")(214,"mat-card-content")(215,"div",37)(216,"div",38)(217,"mat-form-field",39)(218,"mat-label"),l(219,"Graphics Style"),i(),n(220,"mat-select",75),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.s57Options.graphicsStyle,t)||(e.facade.settings.map.s57Options.graphicsStyle=t),c(t)}),p("selectionChange",function(){return e.doS57()}),y(221,ei,2,2,"mat-option",41,v),i()()(),n(223,"div",38)(224,"mat-form-field",39)(225,"mat-label"),l(226,"Boundaries"),i(),n(227,"mat-select",76),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.s57Options.boundaries,t)||(e.facade.settings.map.s57Options.boundaries=t),c(t)}),p("selectionChange",function(){return e.doS57()}),y(228,ti,2,2,"mat-option",41,v),i()()(),n(230,"div",38)(231,"mat-form-field",39)(232,"mat-label"),l(233,"Color Table (Requires refresh)"),i(),n(234,"mat-select",77),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.s57Options.colorTable,t)||(e.facade.settings.map.s57Options.colorTable=t),c(t)}),p("selectionChange",function(){return e.doS57()}),y(235,ii,2,2,"mat-option",41,v),i()()(),n(237,"div",38)(238,"mat-form-field",39)(239,"mat-label"),l(240,"Colors"),i(),n(241,"mat-select",78),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.s57Options.colors,t)||(e.facade.settings.map.s57Options.colors=t),c(t)}),p("selectionChange",function(){return e.doS57()}),y(242,ni,2,2,"mat-option",41,D),i()()()(),n(244,"div",37)(245,"div",38)(246,"mat-form-field",39)(247,"mat-label"),l(248,"Shallow depth"),i(),n(249,"input",79,6),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.s57Options.shallowDepth,t)||(e.facade.settings.map.s57Options.shallowDepth=t),c(t)}),p("change",function(){m(g);let t=M(250);return c(e.doS57(t))}),i(),b(251,ai,2,0,"mat-error"),n(252,"span",80),l(253,"m"),i()()(),n(254,"div",38)(255,"mat-form-field",39)(256,"mat-label"),l(257,"Safety depth"),i(),n(258,"input",79,7),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.s57Options.safetyDepth,t)||(e.facade.settings.map.s57Options.safetyDepth=t),c(t)}),p("change",function(){m(g);let t=M(259);return c(e.doS57(t))}),i(),b(260,oi,2,0,"mat-error"),n(261,"span",80),l(262,"m"),i()()(),n(263,"div",38)(264,"mat-form-field",39)(265,"mat-label"),l(266,"Deep depth"),i(),n(267,"input",79,8),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.s57Options.deepDepth,t)||(e.facade.settings.map.s57Options.deepDepth=t),c(t)}),p("change",function(){m(g);let t=M(268);return c(e.doS57(t))}),i(),b(269,ri,2,0,"mat-error"),n(270,"span",80),l(271,"m"),i()()(),n(272,"div",38)(273,"mat-form-field",39)(274,"mat-label"),l(275,"Layers"),i(),n(276,"mat-select",81),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.s57Options.otherLayers,t)||(e.facade.settings.map.s57Options.otherLayers=t),c(t)}),p("selectionChange",function(){return e.doS57()}),y(277,si,2,2,"mat-option",41,v),i()()()()()()()()()(),n(279,"mat-tab",82)(280,"div",32)(281,"div",33)(282,"div",83)(283,"div",35),l(284,"COURSE"),i(),n(285,"mat-card",36)(286,"mat-card-content")(287,"div",37)(288,"div",38)(289,"mat-form-field",39)(290,"mat-label"),l(291,"Arrival Circle"),i(),n(292,"input",79,9),f("ngModelChange",function(t){return m(g),u(e.facade.settings.course.arrivalCircle,t)||(e.facade.settings.course.arrivalCircle=t),c(t)}),p("change",function(){m(g);let t=M(293);return c(e.onArrivalCircleChange(t))}),i(),b(294,li,2,0,"mat-error"),n(295,"span",80),l(296,"m"),i()()()(),n(297,"div",37)(298,"div",38)(299,"mat-checkbox",48,10),f("ngModelChange",function(t){return m(g),u(e.facade.settings.course.autoNextPointOnArrival,t)||(e.facade.settings.course.autoNextPointOnArrival=t),c(t)}),p("change",function(){return e.persistModel()}),l(301," Auto-advance to next point on arrival "),i()()(),n(302,"div",37)(303,"div",38)(304,"mat-form-field",39)(305,"mat-label"),l(306,"Notification type to use"),i(),n(307,"mat-select",84,11),f("ngModelChange",function(t){return m(g),u(e.facade.settings.course.autoNextPointTrigger,t)||(e.facade.settings.course.autoNextPointTrigger=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(309,di,2,2,"mat-option",41,D),i()()(),n(311,"div",38)(312,"mat-form-field",39)(313,"mat-label"),l(314,"Time to wait before advancing"),i(),n(315,"mat-select",85),f("ngModelChange",function(t){return m(g),u(e.facade.settings.course.autoNextPointDelay,t)||(e.facade.settings.course.autoNextPointDelay=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(316,gi,2,2,"mat-option",41,v),i()()()()()()()()()(),n(318,"mat-tab",86)(319,"div",32)(320,"div",33)(321,"div",87)(322,"div",35),l(323,"VESSEL"),i(),n(324,"mat-card",36)(325,"mat-card-content")(326,"div",37)(327,"div",38)(328,"fieldset")(329,"legend"),l(330,"Vessel Icon Size"),i(),n(331,"div",37)(332,"div",38)(333,"mat-radio-group",88),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.iconScale,t)||(e.facade.settings.vessels.iconScale=t),c(t)}),p("change",function(){return e.persistModel()}),y(334,mi,3,4,"mat-radio-button",41,v),i()()()()()(),n(336,"div",38)(337,"fieldset")(338,"legend")(339,"mat-checkbox",89,12),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.fixedLocationMode,t)||(e.facade.settings.vessels.fixedLocationMode=t),c(t)}),p("change",function(){return e.persistModel()}),l(341," Fixed Location Mode "),i()(),n(342,"div",37)(343,"div",38)(344,"mat-form-field",67)(345,"mat-label"),l(346,"Latitude"),i(),n(347,"input",90,13),f("ngModelChange",function(t){return m(g),u(e.facade.fixedPosition[1],t)||(e.facade.fixedPosition[1]=t),c(t)}),p("change",function(){m(g);let t=M(348);return c(e.parseNumber(t,!0))}),i(),b(349,ci,2,0,"mat-error"),i(),n(350,"mat-form-field",67)(351,"mat-label"),l(352,"Longitude"),i(),n(353,"input",91,14),f("ngModelChange",function(t){return m(g),u(e.facade.fixedPosition[0],t)||(e.facade.fixedPosition[0]=t),c(t)}),p("change",function(){m(g);let t=M(354);return c(e.parseNumber(t,!0))}),i(),b(355,pi,2,0,"mat-error"),i()()()()()()(),E(356,"br"),n(357,"mat-card",36)(358,"mat-card-content")(359,"div",38)(360,"fieldset")(361,"legend"),l(362,"Vessel Lines:"),i(),n(363,"div",37)(364,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.windVectors,t)||(e.facade.settings.vessels.windVectors=t),c(t)}),p("change",function(){return e.persistModel()}),l(365," Display Wind Vectors "),i(),n(366,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.laylines,t)||(e.facade.settings.vessels.laylines=t),c(t)}),p("change",function(){return e.persistModel()}),l(367," Display Laylines "),i()(),n(368,"div",37)(369,"div",38)(370,"fieldset")(371,"legend"),l(372,"Heading Line"),i(),n(373,"div",37)(374,"div",38)(375,"mat-form-field")(376,"mat-label"),l(377,"Heading Line Length"),i(),n(378,"mat-select",92),f("ngModelChange",function(t){return m(g),u(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,_i,2,2,"mat-option",41,v),i()()(),n(381,"div",38)(382,"linestyle-select",93),p("selectionChange",function(t){return e.onLineStyle("heading",t)}),i()()()()()(),n(383,"div",37)(384,"div",38)(385,"fieldset")(386,"legend"),l(387,"COG Line"),i(),n(388,"div",37)(389,"div",38)(390,"mat-form-field")(391,"mat-label"),l(392,"COG Line Length"),i(),n(393,"mat-select",94),f("ngModelChange",function(t){return m(g),u(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,ui,2,2,"mat-option",41,v),i()()(),n(396,"div",38)(397,"linestyle-select",93),p("selectionChange",function(t){return e.onLineStyle("cog",t)}),i()()()()()()()(),n(398,"div",38)(399,"fieldset")(400,"legend")(401,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.rangeCircles,t)||(e.facade.settings.vessels.rangeCircles=t),c(t)}),p("change",function(){return e.persistModel()}),l(402," Display Range Circles "),i()(),n(403,"div",37)(404,"div",38)(405,"mat-form-field",39)(406,"mat-label"),l(407,"Number of Range Circles"),i(),n(408,"mat-select",95),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.rangeCircleCount,t)||(e.facade.settings.vessels.rangeCircleCount=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(409,fi,2,2,"mat-option",41,D),i()()(),n(411,"div",38)(412,"mat-form-field",39)(413,"mat-label"),l(414,"Minimum Zoom Level"),i(),n(415,"mat-select",95),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.rangeCircleMinZoom,t)||(e.facade.settings.vessels.rangeCircleMinZoom=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(416,hi,2,2,"mat-option",41,D),i()()()(),n(418,"div",37)(419,"div",38)(420,"mat-checkbox",96),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.rangeCirclesFixed,t)||(e.facade.settings.vessels.rangeCirclesFixed=t),c(t)}),p("change",function(){return e.persistModel()}),l(421," Use Fixed Distance "),i()(),n(422,"div",38)(423,"mat-form-field",67)(424,"mat-label"),l(425),i(),n(426,"input",97,15),f("ngModelChange",function(t){return m(g),u(e.formattedNumberModel.rangeCirclesDistance,t)||(e.formattedNumberModel.rangeCirclesDistance=t),c(t)}),p("change",function(){m(g);let t=M(427);return c(e.parseFormattedNumber(t))}),i(),b(428,yi,2,0,"mat-error"),i()()()()()()(),E(429,"br"),n(430,"mat-card",36)(431,"mat-card-content")(432,"div",37)(433,"fieldset")(434,"legend")(435,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.trail,t)||(e.facade.settings.vessels.trail=t),c(t)}),p("change",function(){return e.persistModel("vesselTrail")}),l(436," Display Vessel Track "),i()(),n(437,"div",37)(438,"div",38)(439,"mat-form-field",98)(440,"mat-label"),l(441,"Track source"),i(),n(442,"mat-select",99),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.trailSource,t)||(e.facade.settings.vessels.trailSource=t),c(t)}),p("selectionChange",function(){return e.persistModel("trailSource")}),n(443,"mat-option",100),l(444,"Auto"),i(),n(445,"mat-option",101),l(446,"Server"),i(),n(447,"mat-option",102),l(448,"This device"),i()(),b(449,Si,2,0,"mat-hint")(450,Ci,2,1,"mat-hint"),i(),l(451," \xA0\xA0 "),n(452,"mat-slider",103)(453,"input",104),f("ngModelChange",function(t){return m(g),u(e.trailLengthStop,t)||(e.trailLengthStop=t),c(t)}),p("valueChange",function(){return e.deferPersist()}),i()(),l(454),i()(),n(455,"div",37)(456,"div",38)(457,"mat-form-field",39)(458,"mat-label"),l(459,"Resolution: Last hour"),i(),n(460,"mat-select",95),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.trailResolution.lastHour,t)||(e.facade.settings.vessels.trailResolution.lastHour=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(461,wi,2,2,"mat-option",41,v),i()()(),n(463,"div",38)(464,"mat-form-field",39)(465,"mat-label"),l(466,"Resolution: 1 hr -> 24 hrs"),i(),n(467,"mat-select",95),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.trailResolution.next23,t)||(e.facade.settings.vessels.trailResolution.next23=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(468,Mi,2,2,"mat-option",41,v),i()()(),n(470,"div",38)(471,"mat-form-field",39)(472,"mat-label"),l(473,"Resolution: > 24 hrs"),i(),n(474,"mat-select",95),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.trailResolution.beyond24,t)||(e.facade.settings.vessels.trailResolution.beyond24=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(475,vi,2,2,"mat-option",41,v),i()()()()()()()(),n(477,"div",35),l(478,"OTHER VESSELS"),i(),n(479,"mat-card",36)(480,"mat-card-content")(481,"div",37)(482,"div",38)(483,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.aisShowTrack,t)||(e.facade.settings.vessels.aisShowTrack=t),c(t)}),p("change",function(){return e.persistModel()}),l(484," Show all tracks "),i(),l(485," \xA0 "),n(486,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.aisStateFilter.moored,t)||(e.aisStateFilter.moored=t),c(t)}),p("change",function(){return e.onAisStateFilter()}),l(487," Hide Moored "),i(),l(488," \xA0 "),n(489,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.aisStateFilter.anchored,t)||(e.aisStateFilter.anchored=t),c(t)}),p("change",function(){return e.onAisStateFilter()}),l(490," Hide Anchored "),i()()(),b(491,bi,5,3,"div",37),n(492,"div",37)(493,"div",38)(494,"mat-form-field",39)(495,"mat-label"),l(496,"Mark AIS target inactive after"),i(),n(497,"mat-select",64),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.aisStaleAge,t)||(e.facade.settings.vessels.aisStaleAge=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(498,Ti,2,2,"mat-option",41,v),i()()(),n(500,"div",38)(501,"mat-form-field",39)(502,"mat-label"),l(503,"Remove AIS target after"),i(),n(504,"mat-select",64),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.aisMaxAge,t)||(e.facade.settings.vessels.aisMaxAge=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(505,Di,2,2,"mat-option",41,v),i()()(),n(507,"div",38)(508,"mat-form-field",39)(509,"mat-label"),l(510,"Wind Vector Value"),i(),n(511,"mat-select",64),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.aisWindApparent,t)||(e.facade.settings.vessels.aisWindApparent=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(512,Ei,2,2,"mat-option",41,v),i()()(),n(514,"div",38)(515,"mat-form-field",39)(516,"mat-label"),l(517,"Wind / Track Zoom Level"),i(),n(518,"mat-select",64),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.aisWindMinZoom,t)||(e.facade.settings.vessels.aisWindMinZoom=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(519,Wi,2,2,"mat-option",41,D),i()()(),n(521,"div",38)(522,"mat-form-field",39)(523,"mat-label"),l(524,"COG Line"),i(),n(525,"mat-select",64),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.aisCogLine,t)||(e.facade.settings.vessels.aisCogLine=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(526,Vi,2,2,"mat-option",41,v),i()()()()()()()()()(),n(528,"mat-tab",105)(529,"div",32)(530,"div",33)(531,"div",106)(532,"div",35),l(533,"NOTES"),i(),n(534,"mat-card",36)(535,"mat-card-content")(536,"div",46)(537,"div",38)(538,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.facade.settings.ui.showNotes,t)||(e.facade.settings.ui.showNotes=t),c(t)}),p("change",function(){return e.persistModel()}),l(539," Display Notes on Map "),i()(),n(540,"div",38)(541,"mat-form-field",39)(542,"mat-label"),l(543,"Notes Zoom Level"),i(),n(544,"mat-select",107),f("valueChange",function(t){return m(g),u(e.facade.settings.resources.notes.minZoom,t)||(e.facade.settings.resources.notes.minZoom=t),c(t)}),p("selectionChange",function(){return e.persistModel("fetchNotes")}),y(545,ki,2,2,"mat-option",41,D),i()()()(),n(547,"div",46)(548,"div",38)(549,"mat-form-field",39)(550,"mat-label"),l(551),i(),n(552,"mat-select",59),f("ngModelChange",function(t){return m(g),u(e.facade.settings.resources.notes.getRadius,t)||(e.facade.settings.resources.notes.getRadius=t),c(t)}),p("selectionChange",function(){return e.persistModel("fetchNotes")}),y(553,Pi,2,2,"mat-option",41,D),i()()()(),n(555,"div",46)(556,"div",38)(557,"mat-form-field",52)(558,"mat-label"),l(559,"Notes fetch filter:"),i(),n(560,"input",108,16),f("ngModelChange",function(t){return m(g),u(e.facade.settings.resources.notes.rootFilter,t)||(e.facade.settings.resources.notes.rootFilter=t),c(t)}),p("change",function(){return e.persistModel("fetchNotes")}),i(),b(562,Li,3,0,"button",109),i()()(),n(563,"div",46)(564,"div",38)(565,"mat-checkbox",110),f("ngModelChange",function(t){return m(g),u(e.facade.settings.resources.notes.groupNameEdit,t)||(e.facade.settings.resources.notes.groupNameEdit=t),c(t)}),p("change",function(){return e.persistModel()}),l(566," Edit Group Names "),i()(),n(567,"div",38)(568,"mat-checkbox",111),f("ngModelChange",function(t){return m(g),u(e.facade.settings.resources.notes.groupRequiresPosition,t)||(e.facade.settings.resources.notes.groupRequiresPosition=t),c(t)}),p("change",function(){return e.persistModel()}),l(569," Position Group Note "),i()()(),n(570,"div",46)(571,"div",38)(572,"mat-checkbox",112),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.singleClickNoteDetails,t)||(e.facade.settings.display.singleClickNoteDetails=t),c(t)}),p("change",function(){return e.persistModel()}),l(573," Single Click for Note Details "),i()()()()()(),n(574,"div",113)(575,"div",35),l(576,"CUSTOM RESOURCES"),i(),n(577,"mat-card",36)(578,"mat-card-content")(579,"div",46)(580,"div",38)(581,"div",114),l(582," Select custom resource types (./resources/<name>) "),i(),n(583,"mat-selection-list",115,17),p("selectionChange",function(){m(g);let t=M(584);return c(e.onResPathSelected(t))}),y(585,xi,2,3,"mat-list-option",116,D),i()()()()()()()()(),b(587,Ii,25,3,"mat-tab",117),n(588,"mat-tab",118)(589,"div",32)(590,"div",33)(591,"div",119)(592,"div",35),l(593,"SIGNAL K: CONNECTION"),i(),n(594,"mat-card",36)(595,"mat-card-content")(596,"div",46)(597,"fieldset")(598,"legend"),l(599,"Filter Stream data:"),i(),n(600,"span",120),l(601," Check to include Signal K schema groups on display."),E(602,"br"),n(603,"i"),l(604,"Use to manage display performance."),i()(),n(605,"div",38)(606,"mat-checkbox",121),f("ngModelChange",function(t){return m(g),u(e.facade.settings.signalk.vessels,t)||(e.facade.settings.signalk.vessels=t),c(t)}),p("change",function(){return e.persistModel()}),l(607," Vessels (other than Self) "),i()(),n(608,"div",38)(609,"mat-checkbox",122),f("ngModelChange",function(t){return m(g),u(e.facade.settings.signalk.atons,t)||(e.facade.settings.signalk.atons=t),c(t)}),p("change",function(){return e.persistModel()}),l(610," Aids to Navigation (AtoN) "),i()(),n(611,"div",38)(612,"mat-checkbox",123),f("ngModelChange",function(t){return m(g),u(e.facade.settings.signalk.aircraft,t)||(e.facade.settings.signalk.aircraft=t),c(t)}),p("change",function(){return e.persistModel()}),l(613," Aircraft "),i()(),n(614,"div",38)(615,"mat-checkbox",124),f("ngModelChange",function(t){return m(g),u(e.facade.settings.signalk.sar,t)||(e.facade.settings.signalk.sar=t),c(t)}),p("change",function(){return e.persistModel()}),l(616," Search and Rescue (SaR) "),i()(),n(617,"div",38)(618,"mat-checkbox",125),f("ngModelChange",function(t){return m(g),u(e.facade.settings.signalk.meteo,t)||(e.facade.settings.signalk.meteo=t),c(t)}),p("change",function(){return e.persistModel()}),l(619," Weather (Meteo) "),i()(),n(620,"div",38),E(621,"br"),n(622,"mat-form-field",39)(623,"mat-label"),l(624,"Max. distance from vessel"),i(),n(625,"mat-select",126,18),f("ngModelChange",function(t){return m(g),u(e.facade.settings.signalk.maxRadius,t)||(e.facade.settings.signalk.maxRadius=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(627,Ai,2,2,"mat-option",41,v),i()()()()(),n(629,"div",46)(630,"div",38)(631,"button",127),p("click",function(){return e.clearAuthToken()}),n(632,"mat-icon"),l(633,"key_off"),i()()()()()()()()()(),n(634,"mat-tab",128)(635,"div",32)(636,"div",33)(637,"div",129)(638,"div",35),l(639,"EXPERIMENTS"),i(),n(640,"mat-card",36)(641,"mat-card-content")(642,"div",46)(643,"div",38)(644,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.facade.settings.resources.video.enable,t)||(e.facade.settings.resources.video.enable=t),c(t)}),p("change",function(){return e.persistModel()}),l(645," Enable Video "),i()(),n(646,"div",38)(647,"mat-form-field",52)(648,"mat-label"),l(649,"url:"),i(),n(650,"input",130,19),f("ngModelChange",function(t){return m(g),u(e.facade.settings.resources.video.url,t)||(e.facade.settings.resources.video.url=t),c(t)}),p("change",function(){return e.persistModel("videoUrl")}),i(),b(652,Bi,2,0,"mat-error"),i()()(),n(653,"div",46)(654,"div",38)(655,"mat-checkbox",131,20),f("ngModelChange",function(t){return m(g),u(e.facade.settings.experiments,t)||(e.facade.settings.experiments=t),c(t)}),p("change",function(){return e.persistModel()}),n(657,"mat-icon"),l(658,"science"),i(),l(659," Experimental Features "),i()()()()()()()()()()()}if(a&2){let g=M(83),r=M(90),t=M(126),oe=M(250),re=M(259),se=M(268),le=M(293),ce=M(300),pe=M(340),de=M(348),ge=M(354),me=M(427),ht=M(561),yt=M(651);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(oe.invalid&&(oe.dirty||oe.touched)?251:-1),o(7),_("ngModel",e.facade.settings.map.s57Options.safetyDepth),o(2),T(re.invalid&&(re.dirty||re.touched)?260:-1),o(7),_("ngModel",e.facade.settings.map.s57Options.deepDepth),o(2),T(se.invalid&&(se.dirty||se.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(le.invalid&&(le.dirty||le.touched)?294:-1),o(5),_("ngModel",e.facade.settings.course.autoNextPointOnArrival),o(8),h("disabled",ce.checked===!1),_("ngModel",e.facade.settings.course.autoNextPointTrigger),o(2),S(e.options.course.nextPointTrigger),o(6),h("disabled",ce.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",!pe.checked),o(2),T(de.invalid&&(de.dirty||de.touched)?349:-1),o(4),_("ngModel",e.facade.fixedPosition[0]),h("disabled",!pe.checked),o(2),T(ge.invalid&&(ge.dirty||ge.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(me.invalid&&(me.dirty||me.touched)?428:-1),o(7),_("ngModel",e.facade.settings.vessels.trail),o(7),h("disabled",!e.facade.settings.vessels.trail),_("ngModel",e.facade.settings.vessels.trailSource),o(3),h("disabled",!e.serverTrailAvailable),o(4),T(e.serverTrailAvailable?e.facade.settings.vessels.trailSource==="auto"?450:-1:449),o(3),h("max",e.trailLengthAllStop)("displayWith",e.trailLengthStopLabel)("disabled",!e.app.serverTrailWanted()||!e.facade.settings.vessels.trail),o(),_("ngModel",e.trailLengthStop),o(),k(" Length (",e.trailLengthText,") "),o(6),_("ngModel",e.facade.settings.vessels.trailResolution.lastHour),h("disabled",!e.app.serverTrailWanted()||!e.facade.settings.vessels.trail),o(),S(e.options.trailIntervals.highResolution),o(6),_("ngModel",e.facade.settings.vessels.trailResolution.next23),h("disabled",!e.app.serverTrailWanted()||!e.facade.settings.vessels.trail),o(),S(e.options.trailIntervals.highResolution),o(6),_("ngModel",e.facade.settings.vessels.trailResolution.beyond24),h("disabled",!e.app.serverTrailWanted()||!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(2),T(e.facade.settings.vessels.aisShowTrack?-1:491),o(6),_("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(ht.value?562:-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?587:-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(yt.invalid?652:-1),o(3),_("ngModel",e.facade.settings.experiments)}},dependencies:[K,G,Pe,H,Oe,Ie,xe,Le,Z,Me,we,Re,Ne,te,lt,ee,Fe,Ae,Be,je,qe,ze,Ke,R,Te,be,N,ve,$,Ye,mt,dt,gt,ot,Q,q,z,Ge,Ue,He,J,Y,Ze,X,j,st,Qe,Je,at,it,nt,ae,ie],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{ft as SettingsDialog};
1
+ import{Da as dt,E as tt,Ea as gt,Fa as mt,K as it,L as nt,M as at,S as ot,Ta as ct,U as rt,Ua as pt,Za as L,a as De,b as Ee,d as U,e as We,g as I,i as Ve,ia as st,j as ke,ta as lt,ua as ee,v as $e,va as te,w as et}from"./chunk-QZNRNBJP.js";import{a as Je,b as Qe,c as $}from"./chunk-ISXARX6U.js";import{b as Ae,e as Be,j as Fe,k as Ne,l as Re}from"./chunk-62WHV6CJ.js";import{a as Y,b as J,c as Xe,d as Q}from"./chunk-MYBGWSLC.js";import{a as Ye}from"./chunk-6E2BDKCH.js";import"./chunk-45ZTFAA5.js";import{b as z,c as Ue,d as Ge,f as He,i as q,j as Ze,n as j,o as X}from"./chunk-X6D4D6EN.js";import{a as Ke,h as ze,j as qe,k as je}from"./chunk-PD55PKQG.js";import"./chunk-YZN4NRWW.js";import"./chunk-YSHHABBQ.js";import{$a as w,$d as Te,Ga as O,Ha as b,Ia as T,Id as Ce,Ka as D,La as y,Ma as S,Md as we,Na as h,Oa as n,Ob as B,Od as Me,Pa as i,Qa as E,Qd as ve,R as W,Rd as N,Sb as Se,T as m,Tb as F,U as c,V as x,W as _e,Xa as V,Za as p,Zd as be,_ as ue,aa as A,ba as fe,ce as R,ee as G,fa as he,jb as M,je as H,ma as o,mb as ye,me as Z,ne as Pe,ob as l,pb as C,qb as k,qe as Le,re as xe,sb as _,se as Oe,tb as u,te as Ie,ua as P,ub as f,ue as K}from"./chunk-RG7WQ7O2.js";import"./chunk-NCEQPEJE.js";var vt=(d,s)=>s[0];function bt(d,s){if(d&1&&(n(0,"mat-option",8),x(),n(1,"svg",6),E(2,"line",7),i()()),d&2){let a=s.$implicit;h("value",a),o(2),O("stroke-width",a)}}function Tt(d,s){if(d&1&&(n(0,"mat-option",8),x(),n(1,"svg",6),E(2,"line",9),i()()),d&2){let a=s.$implicit;h("value",a[0]),o(2),O("stroke-dasharray",a[1])}}var ie=class d{color=F("#ff0000");dash=F("none");weight=F(1);_color=B(()=>this.color());_dash=B(()=>this.dash());_weight=B(()=>this.weight());selectionChange=Se();app=W(L);line={dashArrays:this.app.lineDashMap,weights:[1,2,3,4,5]};constructor(){}ngOnInit(){}onSelectChange(){let s=this.app.formatLineDashArray(this._dash());this.selectionChange.emit({lineStyle:{fill:{color:this._color()},stroke:{color:this._color(),width:this._weight(),lineDash:s}},config:{color:this._color(),weight:this._weight(),dash:this._dash()}})}static \u0275fac=function(a){return new(a||d)};static \u0275cmp=P({type:d,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&&(n(0,"div",0)(1,"mat-form-field",1)(2,"mat-label"),l(3,"Color"),i(),n(4,"input",2),f("ngModelChange",function(r){return u(e._color,r)||(e._color=r),r}),p("change",function(){return e.onSelectChange()}),i()(),n(5,"mat-form-field",3)(6,"mat-label"),l(7,"Weight"),i(),n(8,"mat-select",4),f("ngModelChange",function(r){return u(e._weight,r)||(e._weight=r),r}),p("selectionChange",function(){return e.onSelectChange()}),n(9,"mat-select-trigger")(10,"div",5),x(),n(11,"svg",6),E(12,"line",7),i()()(),y(13,bt,3,2,"mat-option",8,D),i()(),_e(),n(15,"mat-form-field",3)(16,"mat-label"),l(17,"Style"),i(),n(18,"mat-select",4),f("ngModelChange",function(r){return u(e._dash,r)||(e._dash=r),r}),p("selectionChange",function(){return e.onSelectChange()}),n(19,"mat-select-trigger")(20,"div",5),x(),n(21,"svg",6),E(22,"line",9),i()()(),y(23,Tt,3,2,"mat-option",8,vt),i()()()),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:[K,G,H,Z,N,R,$,X,j,q,z,Q,J,Xe,Y],encapsulation:2})};var ne="auto";var Et=(d,s)=>s[0];function Wt(d,s){if(d&1){let a=V();n(0,"div",4)(1,"mat-radio-button",5,0),p("change",function(){m(a);let g=M(2),r=w().$implicit,t=w();return r[1].current=g.value,c(t.save(!0))}),l(3),i()()}if(d&2){let a=s.$implicit,e=w().$implicit,g=w();o(),h("name",e[0])("value",a)("checked",a===e[1].current),o(2),k(" ",g.pathLabel(a)," ")}}function Vt(d,s){if(d&1&&(n(0,"div",2)(1,"div",3)(2,"div"),l(3),i()(),n(4,"div"),y(5,Wt,4,4,"div",4,D),i()()),d&2){let a=s.$implicit;o(3),C(a[1].name),o(2),S(a[1].available)}}var ae=class d{title="";chosen=new ue;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:[ne,"navigation.courseOverGroundTrue","navigation.courseOverGroundMagnetic","navigation.headingTrue","navigation.headingMagnetic"],available:[],current:""}};pathChoicesArray=Object.entries(this.pathChoices);availPaths;app=W(L);constructor(){}pathLabel(s){return s===ne?"Automatic":s.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===ne||this.availPaths.has(g))&&e.available.push(g)}),e.available.length===0&&e.available.push(e.choices[0])})}save(s){let a={};Object.entries(this.pathChoices).forEach(e=>{a[e[0]]=e[1].current}),this.chosen.emit({save:s,value:a})}static \u0275fac=function(a){return new(a||d)};static \u0275cmp=P({type:d,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&&(n(0,"fieldset")(1,"legend",1),l(2),i(),n(3,"div"),y(4,Vt,7,1,"div",2,Et),i()()),a&2&&(o(2),C(e.title),o(2),S(e.pathChoicesArray))},dependencies:[te,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=(d,s)=>s[0],kt=(d,s)=>s.id;function Pt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Lt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function xt(d,s){if(d&1&&(n(0,"mat-option",132),l(1),i()),d&2){let a=s.$implicit;h("value",a.url)("matTooltip",a.description),o(),k(" ",a.name," ")}}function Ot(d,s){if(d&1){let a=V();n(0,"div",46)(1,"div",38)(2,"mat-form-field",39)(3,"mat-label"),l(4,"Select Instruments App"),i(),n(5,"mat-select",64),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.display.plugins.instruments,g)||(r.facade.settings.display.plugins.instruments=g),c(g)}),p("selectionChange",function(){m(a);let g=w();return c(g.onInstrumentApp())}),y(6,xt,2,3,"mat-option",132,D),i()()(),n(8,"div",38)(9,"mat-form-field",52)(10,"mat-label"),l(11,"Parameters"),i(),n(12,"input",133,21),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.display.plugins.parameters,g)||(r.facade.settings.display.plugins.parameters=g),c(g)}),p("change",function(){m(a);let g=w();return c(g.persistModel("pluginParameters"))}),i()()(),n(14,"div",38)(15,"mat-checkbox",134),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.display.plugins.startOnOpen,g)||(r.facade.settings.display.plugins.startOnOpen=g),c(g)}),p("change",function(){m(a);let g=w();return c(g.persistModel("pluginStartOnOpen"))}),l(16," Halt App on hide "),i()(),n(17,"div",38)(18,"button",135),p("click",function(){m(a);let g=w();return c(g.toggleFavourites())}),n(19,"mat-icon"),l(20,"star"),i(),l(21," FAVOURITES "),i()()()}if(d&2){let a=w();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 It(d,s){if(d&1&&(n(0,"mat-list-option",137),l(1),i()),d&2){let a=s.$implicit,e=w(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 At(d,s){if(d&1){let a=V();n(0,"div",37)(1,"div",38)(2,"div",114),E(3,"br"),l(4,"Select Favourite Apps: "),i(),E(5,"mat-divider"),n(6,"mat-selection-list",136,22),p("selectionChange",function(g){m(a);let r=M(7),t=w();return c(t.onFavSelected(g,r))}),y(8,It,2,4,"mat-list-option",137,D),i()()()}if(d&2){let a=w();o(8),S(a.facade.favouritesList)}}function Bt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Ft(d,s){d&1&&(n(0,"mat-error"),l(1,"Please enter a number >= 0"),i())}function Nt(d,s){d&1&&(n(0,"mat-error"),l(1,"Please enter a number >= 1"),i())}function Rt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Ut(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Gt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Ht(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Zt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Kt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function zt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function qt(d,s){if(d&1){let a=V();n(0,"div",38)(1,"mat-form-field",39)(2,"mat-label"),l(3,"Position display format"),i(),n(4,"mat-select",138),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.units.positionFormat,g)||(r.facade.settings.units.positionFormat=g),c(g)}),p("selectionChange",function(){m(a);let g=w();return c(g.persistModel())}),y(5,zt,2,2,"mat-option",41,D),i()()()}if(d&2){let a=w();o(4),_("ngModel",a.facade.settings.units.positionFormat),o(),S(a.options.preferredValues.coords)}}function jt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Xt(d,s){if(d&1){let a=V();n(0,"div",38)(1,"mat-form-field",39)(2,"mat-label"),l(3,"Prefer True / Magnetic values"),i(),n(4,"mat-select",139),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.units.headingAttribute,g)||(r.facade.settings.units.headingAttribute=g),c(g)}),p("selectionChange",function(){m(a);let g=w();return c(g.persistModel("headingAttribute"))}),y(5,jt,2,2,"mat-option",41,D),i()()()}if(d&2){let a=w();o(4),_("ngModel",a.facade.settings.units.headingAttribute),o(),S(a.options.preferredValues.heading)}}function Yt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a),o(),C(a)}}function Jt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Qt(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function $t(d,s){if(d&1){let a=V();n(0,"mat-form-field",39)(1,"mat-label"),l(2,"Resume Following After"),i(),n(3,"mat-select",140),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.map.refollowDelay,g)||(r.facade.settings.map.refollowDelay=g),c(g)}),p("selectionChange",function(){m(a);let g=w();return c(g.persistModel())}),y(4,Qt,2,2,"mat-option",41,v),i()()}if(d&2){let a=w();o(3),_("ngModel",a.facade.settings.map.refollowDelay),o(),S(a.options.map.refollowDelay)}}function ei(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function ti(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function ii(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function ni(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a),o(),C(a)}}function ai(d,s){d&1&&(n(0,"mat-error"),l(1," Please enter a positive number "),i())}function oi(d,s){d&1&&(n(0,"mat-error"),l(1," Please enter a positive number "),i())}function ri(d,s){d&1&&(n(0,"mat-error"),l(1," Please enter a positive number "),i())}function si(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function li(d,s){d&1&&(n(0,"mat-error"),l(1," Please enter a number > 0 "),i())}function di(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a),o(),C(a)}}function gi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function mi(d,s){if(d&1&&(n(0,"mat-radio-button",41),E(1,"img",141),l(2),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),ye(`transform: scale(${a[0]})`),o(),k(" (",a[1],") ")}}function ci(d,s){d&1&&(n(0,"mat-error"),l(1," Please enter a value between -90 and 90 (max 9 decimals) "),i())}function pi(d,s){d&1&&(n(0,"mat-error"),l(1," Please enter a value between -180 and 180 (max 9 decimals) "),i())}function _i(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function ui(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function fi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a),o(),C(a)}}function hi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a),o(),C(a)}}function yi(d,s){d&1&&(n(0,"mat-error"),l(1," Please enter a number >= 1. "),i())}function Si(d,s){d&1&&(n(0,"mat-hint"),l(1,"Server requires a Track API (v2) provider"),i())}function Ci(d,s){if(d&1&&(n(0,"mat-hint"),l(1),i()),d&2){let a=w();o(),k("Using: ",a.app.serverTrailWanted()?"Server":"This device")}}function wi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Mi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function vi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function bi(d,s){if(d&1){let a=V();n(0,"div",37)(1,"div",142)(2,"mat-slider",143)(3,"input",104),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.vessels.aisTrackLength,g)||(r.facade.settings.vessels.aisTrackLength=g),c(g)}),p("valueChange",function(){m(a);let g=w();return c(g.deferPersist())}),i()(),l(4),i()()}if(d&2){let a=w();o(2),h("disabled",!a.app.featureFlags().tracksApi),o(),_("ngModel",a.facade.settings.vessels.aisTrackLength),o(),k(" Picked vessel track length (",a.facade.settings.vessels.aisTrackLength," hrs) ")}}function Ti(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Di(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Ei(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Wi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a),o(),C(a)}}function Vi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function ki(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a),o(),C(a)}}function Pi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a),o(),C(a)}}function Li(d,s){if(d&1){let a=V();n(0,"button",144),p("click",function(){m(a),w();let g=M(561);return c(g.value="")}),n(1,"mat-icon"),l(2,"close"),i()()}}function xi(d,s){if(d&1&&(n(0,"mat-list-option",116),l(1),i()),d&2){let a=s.$implicit,e=w();h("selected",e.facade.settings.resources.paths.includes(a))("value",a),o(),k(" ",a," ")}}function Oi(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a.id),o(),C(a.name)}}function Ii(d,s){if(d&1){let a=V();n(0,"mat-tab",117)(1,"div",32)(2,"div",33)(3,"div",129)(4,"div",35),l(5,"RADAR SETTINGS"),i(),n(6,"mat-card",36)(7,"div",46)(8,"div",38)(9,"mat-form-field",145)(10,"mat-label"),l(11,"Radar Devices"),i(),n(12,"mat-select",146,23),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.radars.deviceId,g)||(r.facade.settings.radars.deviceId=g),c(g)}),p("selectionChange",function(){m(a);let g=w();return c(g.doRadar())}),y(14,Oi,2,2,"mat-option",41,kt),i()()(),n(16,"div",38)(17,"button",147),p("click",function(){m(a);let g=w();return c(g.refreshRadars())}),n(18,"mat-icon"),l(19," refresh"),i(),l(20," REFRESH "),i()()(),n(21,"div",46)(22,"div",38)(23,"mat-checkbox",48),f("ngModelChange",function(g){m(a);let r=w();return u(r.facade.settings.radars.rings,g)||(r.facade.settings.radars.rings=g),c(g)}),p("change",function(){m(a);let g=w();return c(g.persistModel())}),l(24," Draw range circles at the radar range while it transmits "),i()()()()()()()()}if(d&2){let a=w();o(12),h("disabled",!a.radarList().length||a.app.uiCtrl().radarLayer),_("ngModel",a.facade.settings.radars.deviceId),o(2),S(a.radarList()),o(9),_("ngModel",a.facade.settings.radars.rings)}}function Ai(d,s){if(d&1&&(n(0,"mat-option",41),l(1),i()),d&2){let a=s.$implicit;h("value",a[0]),o(),C(a[1])}}function Bi(d,s){d&1&&(n(0,"mat-error"),l(1," Value required. "),i())}var ft=class d{show={favourites:A(!1)};options;centerOffsetLimit=Ve;aisStateFilter={moored:!1,anchored:!1};formattedNumberModel={rangeCirclesDistance:1e3};unitsChangedSignal=A(0);radarList=A([]);saveOnClose=!1;arrivalCircleChanged=!1;facade=W(pt);myElement=W(he);dialogRef=W(Ce);wakeLock=W(De);s57=W($e);app=W(L);radarApi=W(tt);course=W(rt);constructor(){this.options=new ct,fe(()=>{this.unitsChangedSignal(),this.formatNumberModel()})}ngOnInit(){this.facade.refresh(),this.facade.settings.selections.aisState.forEach(s=>{s in this.aisStateFilter&&(this.aisStateFilter[s]=!0)}),this.refreshRadars()}refreshRadars(){this.radarApi.listRadars().then(s=>{this.radarList.set(s)}).catch(()=>{this.radarList.set([])})}formatNumberModel(){this.formattedNumberModel={rangeCirclesDistance:this.facade.settings.units.distance==="kilometer"?Math.floor(this.facade.settings.vessels.rangeCirclesDistance/1e3):Math.floor(I.transform(this.facade.settings.vessels.rangeCirclesDistance,"m","naut-mile"))}}raiseChange(){this.app.alignUnitPrefs(this.app.serverConfig.unitPreferences()),this.unitsChangedSignal.update(s=>s+1)}handleClose(){this.saveOnClose&&this.persistModel(),this.arrivalCircleChanged&&this.applyArrivalCircle(),this.dialogRef.close()}doWakelock(s){this.persistModel(),s?this.wakeLock.disable():this.wakeLock.enable()}doS57(s){this.facade.settings.map.s57Options.depthUnit=this.facade.settings.units.depth,s?this.parseNumber(s):this.persistModel(),this.s57.setOptions(this.facade.settings.map.s57Options)}doRadar(){this.radarApi.init(this.facade.settings.radars.deviceId).then(s=>{s&&this.persistModel()})}onLineStyle(s,a){let e=this.facade.settings.vessels.selfLines[s];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[s]=a.lineStyle,r}),this.persistModel())}toggleFavourites(){this.show.favourites.update(s=>!s)}parseCenterOffset(s){s.reset(typeof s.model=="number"?ke(s.model):0),this.persistModel()}onArrivalCircleChange(s){this.parseNumber(s),this.arrivalCircleChanged=!0}applyArrivalCircle(){let s=this.facade.settings.course.arrivalCircle,a=this.course.courseData();a.position&&s>0&&s!==a.arrivalCircle&&this.course.setArrivalCircle(s)}parseNumber(s,a){if(typeof s.model!="number"){s.reset(this.fallbackToDefault());return}!a&&s.model<0&&s.reset(Math.abs(s.model)),this.persistModel()}parseFormattedNumber(s,a){typeof s.model=="number"&&(!a&&s.model<0&&s.reset(Math.abs(s.model)),this.facade.settings.vessels.rangeCirclesDistance=this.facade.settings.units.distance==="kilometer"?Math.floor(this.formattedNumberModel.rangeCirclesDistance*1e3):Math.floor(I.nauticalMilesToKm(this.formattedNumberModel.rangeCirclesDistance)*1e3),this.persistModel())}fallbackToDefault(){let s=et();if(typeof this.facade.settings.display.statusBar.referenceSpeed!="number")return s.display.statusBar.referenceSpeed;if(typeof this.facade.settings.display.statusBar.tapFadeSpeed!="number")return s.display.statusBar.tapFadeSpeed;if(typeof this.facade.settings.map.s57Options.shallowDepth!="number")return s.map.s57Options.shallowDepth;if(typeof this.facade.settings.map.s57Options.safetyDepth!="number")return s.map.s57Options.safetyDepth;if(typeof this.facade.settings.map.s57Options.deepDepth!="number")return s.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 s.course.arrivalCircle}get serverTrailAvailable(){return Ee(this.app.trackSource())}trailLengthAllStop=We+1;get trailLengthStop(){let s=this.facade.settings.vessels.trailDuration;return s===U?this.trailLengthAllStop:s}set trailLengthStop(s){this.facade.settings.vessels.trailDuration=s===this.trailLengthAllStop?U:s}trailLengthStopLabel=s=>s===this.trailLengthAllStop?"All":`${s}`;get trailLengthText(){let s=this.facade.settings.vessels.trailDuration;return s===U?"All":`${s} hrs`}persistModel(s){this.facade.applySettings(),this.facade.emitChangeEvent(s)}get speedUnitSymbol(){return I.getSymbol(this.facade.settings.units.speed)}deferPersist(s){this.saveOnClose=!0,this.facade.emitChangeEvent(s)}onInstrumentApp(){this.persistModel("pluginInstruments"),this.facade.buildFavouritesList()}onPreferredPaths(s){s.save&&(this.facade.settings.units.preferredPaths=s.value,this.persistModel())}onFavSelected(s,a){this.facade.settings.display.plugins.favourites=a.selectedOptions.selected.map(e=>e.value),this.persistModel()}onAisStateFilter(){let s=[];for(let a in this.aisStateFilter)this.aisStateFilter[a]&&s.push(a);this.facade.settings.selections.aisState=[].concat(s),this.persistModel()}onResPathSelected(s){this.facade.settings.resources.paths=s.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(s){return I.getSymbol(s)}static \u0275fac=function(a){return new(a||d)};static \u0275cmp=P({type:d,selectors:[["settings-dialog"]],decls:660,vars:142,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"],[2,"width","200px"],["matTooltip","Where the vessel track comes from. Auto uses the server when it can supply one.",3,"ngModelChange","selectionChange","disabled","ngModel"],["value","auto"],["value","server",3,"disabled"],["value","local"],["discrete","","tickInterval","1","min","1",3,"max","displayWith","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"],["matTooltip","How far back the track of a vessel picked with its TRACK button reaches. Needs a Track API (v2) provider.",1,"setting-card-row-item"],["discrete","","tickInterval","1","min","1","max","96",3,"disabled"],["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();n(0,"mat-toolbar",24)(1,"span",25)(2,"mat-icon"),l(3,"settings"),i()(),n(4,"span",26),l(5,"Settings"),i(),n(6,"span",27)(7,"button",28),p("click",function(){return e.handleClose()}),n(8,"mat-icon"),l(9,"close"),i()()()(),n(10,"div",29)(11,"mat-tab-group",30)(12,"mat-tab",31)(13,"div",32)(14,"div",33)(15,"div",34)(16,"div",35),l(17,"DISPLAY"),i(),n(18,"mat-card",36)(19,"mat-card-content")(20,"div",37)(21,"div",38)(22,"mat-form-field",39)(23,"mat-label"),l(24,"Dark Mode setting"),i(),n(25,"mat-select",40),f("ngModelChange",function(t){return m(g),u(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,Pt,2,2,"mat-option",41,v),i()()(),n(28,"div",38)(29,"mat-checkbox",42),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.nightMode,t)||(e.facade.settings.display.nightMode=t),c(t)}),p("change",function(){return e.persistModel()}),l(30," Auto-set Night Mode "),i()(),n(31,"div",38)(32,"mat-form-field",39)(33,"mat-label"),l(34,"Action Button"),i(),n(35,"mat-select",43),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.fab,t)||(e.facade.settings.display.fab=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(36,Lt,2,2,"mat-option",41,v),i()()(),n(38,"div",38)(39,"mat-checkbox",44),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.disableWakelock,t)||(e.facade.settings.display.disableWakelock=t),c(t)}),p("change",function(t){return e.doWakelock(t.checked)}),l(40," Allow Device to Sleep "),i()(),n(41,"div",38)(42,"mat-checkbox",45),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.preferInfoPanel,t)||(e.facade.settings.display.preferInfoPanel=t),c(t)}),p("change",function(){return e.persistModel()}),l(43," Prefer Info-Panel "),i()()()()(),E(44,"br"),n(45,"mat-card",36)(46,"mat-card-content"),b(47,Ot,22,4,"div",46),b(48,At,10,0,"div",37),i()(),E(49,"br"),i(),n(50,"div",34)(51,"div",35),l(52,"SOUND"),i(),n(53,"mat-card",36)(54,"mat-card-content")(55,"div",37)(56,"div",38)(57,"mat-checkbox",47),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.muteSound,t)||(e.facade.settings.display.muteSound=t),c(t)}),p("change",function(){return e.persistModel()}),l(58," Do not Play Sounds "),i()(),n(59,"div",38)(60,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.depthAlarm.enabled,t)||(e.facade.settings.display.depthAlarm.enabled=t),c(t)}),p("change",function(){return e.persistModel()}),l(61," Show DEPTH Alarms "),i()(),n(62,"div",38)(63,"mat-form-field",39)(64,"mat-label"),l(65,"Alarm Smoothing Time"),i(),n(66,"mat-select",49),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.depthAlarm.smoothing,t)||(e.facade.settings.display.depthAlarm.smoothing=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(67,Bt,2,2,"mat-option",41,v),i()()()()()()(),n(69,"div",50)(70,"div",35),l(71,"STATUS BAR OPTIONS"),i(),n(72,"mat-card",36)(73,"mat-card-content")(74,"div",37)(75,"div",38)(76,"mat-checkbox",51),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.statusBar.liveEta,t)||(e.facade.settings.display.statusBar.liveEta=t),c(t)}),p("change",function(){return e.persistModel()}),l(77," Live ETA at cursor "),i()(),n(78,"div",38)(79,"mat-form-field",52)(80,"mat-label"),l(81),i(),n(82,"input",53,0),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.statusBar.referenceSpeed,t)||(e.facade.settings.display.statusBar.referenceSpeed=t),c(t)}),p("change",function(){m(g);let t=M(83);return c(e.parseNumber(t))}),i(),b(84,Ft,2,0,"mat-error"),i()(),n(85,"div",38)(86,"mat-form-field",52)(87,"mat-label"),l(88,"Tap Fade Speed (s)"),i(),n(89,"input",54,1),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.statusBar.tapFadeSpeed,t)||(e.facade.settings.display.statusBar.tapFadeSpeed=t),c(t)}),p("change",function(){m(g);let t=M(90);return c(e.parseNumber(t))}),i(),b(91,Nt,2,0,"mat-error"),i()()()()()(),n(92,"div",50)(93,"div",35),l(94,"WEATHER"),i(),n(95,"mat-card",36)(96,"mat-card-content")(97,"div",37)(98,"div",38)(99,"mat-form-field",39)(100,"mat-label"),l(101,"Wind indicator"),i(),n(102,"mat-select",55),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.windIndicator,t)||(e.facade.settings.display.windIndicator=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(103,Rt,2,2,"mat-option",41,v),i()()()()()()()()()(),n(105,"mat-tab",56)(106,"div",32)(107,"div",33)(108,"div",57)(109,"div",35),l(110,"UNITS & VALUES"),i(),n(111,"mat-card",36)(112,"mat-card-content")(113,"div",37)(114,"div",38)(115,"fieldset")(116,"legend")(117,"mat-checkbox",58,2),f("ngModelChange",function(t){return m(g),u(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())}),l(119," Use Server Unit Preferences "),i()(),n(120,"div",37)(121,"div",38)(122,"mat-form-field",39)(123,"mat-label"),l(124,"Distance units"),i(),n(125,"mat-select",59,3),f("ngModelChange",function(t){return m(g),u(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,Ut,2,2,"mat-option",41,v),i()()(),n(129,"div",38)(130,"mat-form-field",39)(131,"mat-label"),l(132,"Depth units"),i(),n(133,"mat-select",59),f("ngModelChange",function(t){return m(g),u(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,Gt,2,2,"mat-option",41,v),i()()(),n(136,"div",38)(137,"mat-form-field",39)(138,"mat-label"),l(139,"Length units"),i(),n(140,"mat-select",59),f("ngModelChange",function(t){return m(g),u(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,Ht,2,2,"mat-option",41,v),i()()(),n(143,"div",38)(144,"mat-form-field",39)(145,"mat-label"),l(146,"Temperature units"),i(),n(147,"mat-select",59),f("ngModelChange",function(t){return m(g),u(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,Zt,2,2,"mat-option",41,v),i()()(),n(150,"div",38)(151,"mat-form-field",39)(152,"mat-label"),l(153,"Speed units"),i(),n(154,"mat-select",59),f("ngModelChange",function(t){return m(g),u(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,Kt,2,2,"mat-option",41,v),i()()()()()()(),n(157,"div",37),b(158,qt,7,1,"div",38),b(159,Xt,7,1,"div",38),n(160,"div",38)(161,"signalk-preferred-paths",60),p("chosen",function(t){return e.onPreferredPaths(t)}),i()()()()()()()()(),n(162,"mat-tab",61)(163,"div",32)(164,"div",33)(165,"div",62)(166,"div",35),l(167,"MAP"),i(),n(168,"mat-card")(169,"mat-card-content")(170,"div",37)(171,"div",38)(172,"div",63),l(173," \xA0 "),i(),n(174,"mat-form-field",39)(175,"mat-label"),l(176,"Feature label zoom level"),i(),n(177,"mat-select",64),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.labelsMinZoom,t)||(e.facade.settings.map.labelsMinZoom=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(178,Yt,2,2,"mat-option",41,D),i()()(),n(180,"div",38)(181,"div",65),l(182," Offset Vessel Center (%) "),i(),n(183,"div",66)(184,"mat-form-field",67)(185,"mat-label"),l(186,"Vertical"),i(),n(187,"input",68,4),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.centerOffset.y,t)||(e.facade.settings.map.centerOffset.y=t),c(t)}),p("change",function(){m(g);let t=M(188);return c(e.parseCenterOffset(t))}),i()(),n(189,"mat-form-field",67)(190,"mat-label"),l(191,"Horizontal"),i(),n(192,"input",69,5),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.centerOffset.x,t)||(e.facade.settings.map.centerOffset.x=t),c(t)}),p("change",function(){m(g);let t=M(193);return c(e.parseCenterOffset(t))}),i()()()(),n(194,"div",38)(195,"mat-checkbox",70),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.popoverMulti,t)||(e.facade.settings.map.popoverMulti=t),c(t)}),p("change",function(){return e.persistModel()}),l(196," Popovers close with button "),i()(),n(197,"div",38)(198,"mat-checkbox",71),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.doubleClickZoom,t)||(e.facade.settings.map.doubleClickZoom=t),c(t)}),p("change",function(){return e.persistModel()}),l(199," Double click to Zoom "),i()(),n(200,"div",38)(201,"mat-checkbox",72),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.overZoomTiles,t)||(e.facade.settings.map.overZoomTiles=t),c(t)}),p("change",function(){return e.persistModel()}),l(202," Keep tiles visible on max zoom "),i()(),n(203,"div",73)(204,"mat-form-field",39)(205,"mat-label"),l(206,"Map Pan When Following"),i(),n(207,"mat-select",74),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.panBehavior,t)||(e.facade.settings.map.panBehavior=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(208,Jt,2,2,"mat-option",41,v),i()(),b(210,$t,6,1,"mat-form-field",39),i()()()(),n(211,"div",35),l(212,"VECTOR CHARTS"),i(),n(213,"mat-card")(214,"mat-card-content")(215,"div",37)(216,"div",38)(217,"mat-form-field",39)(218,"mat-label"),l(219,"Graphics Style"),i(),n(220,"mat-select",75),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.s57Options.graphicsStyle,t)||(e.facade.settings.map.s57Options.graphicsStyle=t),c(t)}),p("selectionChange",function(){return e.doS57()}),y(221,ei,2,2,"mat-option",41,v),i()()(),n(223,"div",38)(224,"mat-form-field",39)(225,"mat-label"),l(226,"Boundaries"),i(),n(227,"mat-select",76),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.s57Options.boundaries,t)||(e.facade.settings.map.s57Options.boundaries=t),c(t)}),p("selectionChange",function(){return e.doS57()}),y(228,ti,2,2,"mat-option",41,v),i()()(),n(230,"div",38)(231,"mat-form-field",39)(232,"mat-label"),l(233,"Color Table (Requires refresh)"),i(),n(234,"mat-select",77),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.s57Options.colorTable,t)||(e.facade.settings.map.s57Options.colorTable=t),c(t)}),p("selectionChange",function(){return e.doS57()}),y(235,ii,2,2,"mat-option",41,v),i()()(),n(237,"div",38)(238,"mat-form-field",39)(239,"mat-label"),l(240,"Colors"),i(),n(241,"mat-select",78),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.s57Options.colors,t)||(e.facade.settings.map.s57Options.colors=t),c(t)}),p("selectionChange",function(){return e.doS57()}),y(242,ni,2,2,"mat-option",41,D),i()()()(),n(244,"div",37)(245,"div",38)(246,"mat-form-field",39)(247,"mat-label"),l(248,"Shallow depth"),i(),n(249,"input",79,6),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.s57Options.shallowDepth,t)||(e.facade.settings.map.s57Options.shallowDepth=t),c(t)}),p("change",function(){m(g);let t=M(250);return c(e.doS57(t))}),i(),b(251,ai,2,0,"mat-error"),n(252,"span",80),l(253,"m"),i()()(),n(254,"div",38)(255,"mat-form-field",39)(256,"mat-label"),l(257,"Safety depth"),i(),n(258,"input",79,7),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.s57Options.safetyDepth,t)||(e.facade.settings.map.s57Options.safetyDepth=t),c(t)}),p("change",function(){m(g);let t=M(259);return c(e.doS57(t))}),i(),b(260,oi,2,0,"mat-error"),n(261,"span",80),l(262,"m"),i()()(),n(263,"div",38)(264,"mat-form-field",39)(265,"mat-label"),l(266,"Deep depth"),i(),n(267,"input",79,8),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.s57Options.deepDepth,t)||(e.facade.settings.map.s57Options.deepDepth=t),c(t)}),p("change",function(){m(g);let t=M(268);return c(e.doS57(t))}),i(),b(269,ri,2,0,"mat-error"),n(270,"span",80),l(271,"m"),i()()(),n(272,"div",38)(273,"mat-form-field",39)(274,"mat-label"),l(275,"Layers"),i(),n(276,"mat-select",81),f("ngModelChange",function(t){return m(g),u(e.facade.settings.map.s57Options.otherLayers,t)||(e.facade.settings.map.s57Options.otherLayers=t),c(t)}),p("selectionChange",function(){return e.doS57()}),y(277,si,2,2,"mat-option",41,v),i()()()()()()()()()(),n(279,"mat-tab",82)(280,"div",32)(281,"div",33)(282,"div",83)(283,"div",35),l(284,"COURSE"),i(),n(285,"mat-card",36)(286,"mat-card-content")(287,"div",37)(288,"div",38)(289,"mat-form-field",39)(290,"mat-label"),l(291,"Arrival Circle"),i(),n(292,"input",79,9),f("ngModelChange",function(t){return m(g),u(e.facade.settings.course.arrivalCircle,t)||(e.facade.settings.course.arrivalCircle=t),c(t)}),p("change",function(){m(g);let t=M(293);return c(e.onArrivalCircleChange(t))}),i(),b(294,li,2,0,"mat-error"),n(295,"span",80),l(296,"m"),i()()()(),n(297,"div",37)(298,"div",38)(299,"mat-checkbox",48,10),f("ngModelChange",function(t){return m(g),u(e.facade.settings.course.autoNextPointOnArrival,t)||(e.facade.settings.course.autoNextPointOnArrival=t),c(t)}),p("change",function(){return e.persistModel()}),l(301," Auto-advance to next point on arrival "),i()()(),n(302,"div",37)(303,"div",38)(304,"mat-form-field",39)(305,"mat-label"),l(306,"Notification type to use"),i(),n(307,"mat-select",84,11),f("ngModelChange",function(t){return m(g),u(e.facade.settings.course.autoNextPointTrigger,t)||(e.facade.settings.course.autoNextPointTrigger=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(309,di,2,2,"mat-option",41,D),i()()(),n(311,"div",38)(312,"mat-form-field",39)(313,"mat-label"),l(314,"Time to wait before advancing"),i(),n(315,"mat-select",85),f("ngModelChange",function(t){return m(g),u(e.facade.settings.course.autoNextPointDelay,t)||(e.facade.settings.course.autoNextPointDelay=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(316,gi,2,2,"mat-option",41,v),i()()()()()()()()()(),n(318,"mat-tab",86)(319,"div",32)(320,"div",33)(321,"div",87)(322,"div",35),l(323,"VESSEL"),i(),n(324,"mat-card",36)(325,"mat-card-content")(326,"div",37)(327,"div",38)(328,"fieldset")(329,"legend"),l(330,"Vessel Icon Size"),i(),n(331,"div",37)(332,"div",38)(333,"mat-radio-group",88),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.iconScale,t)||(e.facade.settings.vessels.iconScale=t),c(t)}),p("change",function(){return e.persistModel()}),y(334,mi,3,4,"mat-radio-button",41,v),i()()()()()(),n(336,"div",38)(337,"fieldset")(338,"legend")(339,"mat-checkbox",89,12),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.fixedLocationMode,t)||(e.facade.settings.vessels.fixedLocationMode=t),c(t)}),p("change",function(){return e.persistModel()}),l(341," Fixed Location Mode "),i()(),n(342,"div",37)(343,"div",38)(344,"mat-form-field",67)(345,"mat-label"),l(346,"Latitude"),i(),n(347,"input",90,13),f("ngModelChange",function(t){return m(g),u(e.facade.fixedPosition[1],t)||(e.facade.fixedPosition[1]=t),c(t)}),p("change",function(){m(g);let t=M(348);return c(e.parseNumber(t,!0))}),i(),b(349,ci,2,0,"mat-error"),i(),n(350,"mat-form-field",67)(351,"mat-label"),l(352,"Longitude"),i(),n(353,"input",91,14),f("ngModelChange",function(t){return m(g),u(e.facade.fixedPosition[0],t)||(e.facade.fixedPosition[0]=t),c(t)}),p("change",function(){m(g);let t=M(354);return c(e.parseNumber(t,!0))}),i(),b(355,pi,2,0,"mat-error"),i()()()()()()(),E(356,"br"),n(357,"mat-card",36)(358,"mat-card-content")(359,"div",38)(360,"fieldset")(361,"legend"),l(362,"Vessel Lines:"),i(),n(363,"div",37)(364,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.windVectors,t)||(e.facade.settings.vessels.windVectors=t),c(t)}),p("change",function(){return e.persistModel()}),l(365," Display Wind Vectors "),i(),n(366,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.laylines,t)||(e.facade.settings.vessels.laylines=t),c(t)}),p("change",function(){return e.persistModel()}),l(367," Display Laylines "),i()(),n(368,"div",37)(369,"div",38)(370,"fieldset")(371,"legend"),l(372,"Heading Line"),i(),n(373,"div",37)(374,"div",38)(375,"mat-form-field")(376,"mat-label"),l(377,"Heading Line Length"),i(),n(378,"mat-select",92),f("ngModelChange",function(t){return m(g),u(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,_i,2,2,"mat-option",41,v),i()()(),n(381,"div",38)(382,"linestyle-select",93),p("selectionChange",function(t){return e.onLineStyle("heading",t)}),i()()()()()(),n(383,"div",37)(384,"div",38)(385,"fieldset")(386,"legend"),l(387,"COG Line"),i(),n(388,"div",37)(389,"div",38)(390,"mat-form-field")(391,"mat-label"),l(392,"COG Line Length"),i(),n(393,"mat-select",94),f("ngModelChange",function(t){return m(g),u(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,ui,2,2,"mat-option",41,v),i()()(),n(396,"div",38)(397,"linestyle-select",93),p("selectionChange",function(t){return e.onLineStyle("cog",t)}),i()()()()()()()(),n(398,"div",38)(399,"fieldset")(400,"legend")(401,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.rangeCircles,t)||(e.facade.settings.vessels.rangeCircles=t),c(t)}),p("change",function(){return e.persistModel()}),l(402," Display Range Circles "),i()(),n(403,"div",37)(404,"div",38)(405,"mat-form-field",39)(406,"mat-label"),l(407,"Number of Range Circles"),i(),n(408,"mat-select",95),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.rangeCircleCount,t)||(e.facade.settings.vessels.rangeCircleCount=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(409,fi,2,2,"mat-option",41,D),i()()(),n(411,"div",38)(412,"mat-form-field",39)(413,"mat-label"),l(414,"Minimum Zoom Level"),i(),n(415,"mat-select",95),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.rangeCircleMinZoom,t)||(e.facade.settings.vessels.rangeCircleMinZoom=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(416,hi,2,2,"mat-option",41,D),i()()()(),n(418,"div",37)(419,"div",38)(420,"mat-checkbox",96),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.rangeCirclesFixed,t)||(e.facade.settings.vessels.rangeCirclesFixed=t),c(t)}),p("change",function(){return e.persistModel()}),l(421," Use Fixed Distance "),i()(),n(422,"div",38)(423,"mat-form-field",67)(424,"mat-label"),l(425),i(),n(426,"input",97,15),f("ngModelChange",function(t){return m(g),u(e.formattedNumberModel.rangeCirclesDistance,t)||(e.formattedNumberModel.rangeCirclesDistance=t),c(t)}),p("change",function(){m(g);let t=M(427);return c(e.parseFormattedNumber(t))}),i(),b(428,yi,2,0,"mat-error"),i()()()()()()(),E(429,"br"),n(430,"mat-card",36)(431,"mat-card-content")(432,"div",37)(433,"fieldset")(434,"legend")(435,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.trail,t)||(e.facade.settings.vessels.trail=t),c(t)}),p("change",function(){return e.persistModel("vesselTrail")}),l(436," Display Vessel Track "),i()(),n(437,"div",37)(438,"div",38)(439,"mat-form-field",98)(440,"mat-label"),l(441,"Track source"),i(),n(442,"mat-select",99),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.trailSource,t)||(e.facade.settings.vessels.trailSource=t),c(t)}),p("selectionChange",function(){return e.persistModel("trailSource")}),n(443,"mat-option",100),l(444,"Auto"),i(),n(445,"mat-option",101),l(446,"Server"),i(),n(447,"mat-option",102),l(448,"This device"),i()(),b(449,Si,2,0,"mat-hint")(450,Ci,2,1,"mat-hint"),i(),l(451," \xA0\xA0 "),n(452,"mat-slider",103)(453,"input",104),f("ngModelChange",function(t){return m(g),u(e.trailLengthStop,t)||(e.trailLengthStop=t),c(t)}),p("valueChange",function(){return e.deferPersist()}),i()(),l(454),i()(),n(455,"div",37)(456,"div",38)(457,"mat-form-field",39)(458,"mat-label"),l(459,"Resolution: Last hour"),i(),n(460,"mat-select",95),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.trailResolution.lastHour,t)||(e.facade.settings.vessels.trailResolution.lastHour=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(461,wi,2,2,"mat-option",41,v),i()()(),n(463,"div",38)(464,"mat-form-field",39)(465,"mat-label"),l(466,"Resolution: 1 hr -> 24 hrs"),i(),n(467,"mat-select",95),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.trailResolution.next23,t)||(e.facade.settings.vessels.trailResolution.next23=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(468,Mi,2,2,"mat-option",41,v),i()()(),n(470,"div",38)(471,"mat-form-field",39)(472,"mat-label"),l(473,"Resolution: > 24 hrs"),i(),n(474,"mat-select",95),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.trailResolution.beyond24,t)||(e.facade.settings.vessels.trailResolution.beyond24=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(475,vi,2,2,"mat-option",41,v),i()()()()()()()(),n(477,"div",35),l(478,"OTHER VESSELS"),i(),n(479,"mat-card",36)(480,"mat-card-content")(481,"div",37)(482,"div",38)(483,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.aisShowTrack,t)||(e.facade.settings.vessels.aisShowTrack=t),c(t)}),p("change",function(){return e.persistModel()}),l(484," Show all tracks "),i(),l(485," \xA0 "),n(486,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.aisStateFilter.moored,t)||(e.aisStateFilter.moored=t),c(t)}),p("change",function(){return e.onAisStateFilter()}),l(487," Hide Moored "),i(),l(488," \xA0 "),n(489,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.aisStateFilter.anchored,t)||(e.aisStateFilter.anchored=t),c(t)}),p("change",function(){return e.onAisStateFilter()}),l(490," Hide Anchored "),i()()(),b(491,bi,5,3,"div",37),n(492,"div",37)(493,"div",38)(494,"mat-form-field",39)(495,"mat-label"),l(496,"Mark AIS target inactive after"),i(),n(497,"mat-select",64),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.aisStaleAge,t)||(e.facade.settings.vessels.aisStaleAge=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(498,Ti,2,2,"mat-option",41,v),i()()(),n(500,"div",38)(501,"mat-form-field",39)(502,"mat-label"),l(503,"Remove AIS target after"),i(),n(504,"mat-select",64),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.aisMaxAge,t)||(e.facade.settings.vessels.aisMaxAge=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(505,Di,2,2,"mat-option",41,v),i()()(),n(507,"div",38)(508,"mat-form-field",39)(509,"mat-label"),l(510,"Wind Vector Value"),i(),n(511,"mat-select",64),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.aisWindApparent,t)||(e.facade.settings.vessels.aisWindApparent=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(512,Ei,2,2,"mat-option",41,v),i()()(),n(514,"div",38)(515,"mat-form-field",39)(516,"mat-label"),l(517,"Wind / Track Zoom Level"),i(),n(518,"mat-select",64),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.aisWindMinZoom,t)||(e.facade.settings.vessels.aisWindMinZoom=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(519,Wi,2,2,"mat-option",41,D),i()()(),n(521,"div",38)(522,"mat-form-field",39)(523,"mat-label"),l(524,"COG Line"),i(),n(525,"mat-select",64),f("ngModelChange",function(t){return m(g),u(e.facade.settings.vessels.aisCogLine,t)||(e.facade.settings.vessels.aisCogLine=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(526,Vi,2,2,"mat-option",41,v),i()()()()()()()()()(),n(528,"mat-tab",105)(529,"div",32)(530,"div",33)(531,"div",106)(532,"div",35),l(533,"NOTES"),i(),n(534,"mat-card",36)(535,"mat-card-content")(536,"div",46)(537,"div",38)(538,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.facade.settings.ui.showNotes,t)||(e.facade.settings.ui.showNotes=t),c(t)}),p("change",function(){return e.persistModel()}),l(539," Display Notes on Map "),i()(),n(540,"div",38)(541,"mat-form-field",39)(542,"mat-label"),l(543,"Notes Zoom Level"),i(),n(544,"mat-select",107),f("valueChange",function(t){return m(g),u(e.facade.settings.resources.notes.minZoom,t)||(e.facade.settings.resources.notes.minZoom=t),c(t)}),p("selectionChange",function(){return e.persistModel("fetchNotes")}),y(545,ki,2,2,"mat-option",41,D),i()()()(),n(547,"div",46)(548,"div",38)(549,"mat-form-field",39)(550,"mat-label"),l(551),i(),n(552,"mat-select",59),f("ngModelChange",function(t){return m(g),u(e.facade.settings.resources.notes.getRadius,t)||(e.facade.settings.resources.notes.getRadius=t),c(t)}),p("selectionChange",function(){return e.persistModel("fetchNotes")}),y(553,Pi,2,2,"mat-option",41,D),i()()()(),n(555,"div",46)(556,"div",38)(557,"mat-form-field",52)(558,"mat-label"),l(559,"Notes fetch filter:"),i(),n(560,"input",108,16),f("ngModelChange",function(t){return m(g),u(e.facade.settings.resources.notes.rootFilter,t)||(e.facade.settings.resources.notes.rootFilter=t),c(t)}),p("change",function(){return e.persistModel("fetchNotes")}),i(),b(562,Li,3,0,"button",109),i()()(),n(563,"div",46)(564,"div",38)(565,"mat-checkbox",110),f("ngModelChange",function(t){return m(g),u(e.facade.settings.resources.notes.groupNameEdit,t)||(e.facade.settings.resources.notes.groupNameEdit=t),c(t)}),p("change",function(){return e.persistModel()}),l(566," Edit Group Names "),i()(),n(567,"div",38)(568,"mat-checkbox",111),f("ngModelChange",function(t){return m(g),u(e.facade.settings.resources.notes.groupRequiresPosition,t)||(e.facade.settings.resources.notes.groupRequiresPosition=t),c(t)}),p("change",function(){return e.persistModel()}),l(569," Position Group Note "),i()()(),n(570,"div",46)(571,"div",38)(572,"mat-checkbox",112),f("ngModelChange",function(t){return m(g),u(e.facade.settings.display.singleClickNoteDetails,t)||(e.facade.settings.display.singleClickNoteDetails=t),c(t)}),p("change",function(){return e.persistModel()}),l(573," Single Click for Note Details "),i()()()()()(),n(574,"div",113)(575,"div",35),l(576,"CUSTOM RESOURCES"),i(),n(577,"mat-card",36)(578,"mat-card-content")(579,"div",46)(580,"div",38)(581,"div",114),l(582," Select custom resource types (./resources/<name>) "),i(),n(583,"mat-selection-list",115,17),p("selectionChange",function(){m(g);let t=M(584);return c(e.onResPathSelected(t))}),y(585,xi,2,3,"mat-list-option",116,D),i()()()()()()()()(),b(587,Ii,25,3,"mat-tab",117),n(588,"mat-tab",118)(589,"div",32)(590,"div",33)(591,"div",119)(592,"div",35),l(593,"SIGNAL K: CONNECTION"),i(),n(594,"mat-card",36)(595,"mat-card-content")(596,"div",46)(597,"fieldset")(598,"legend"),l(599,"Filter Stream data:"),i(),n(600,"span",120),l(601," Check to include Signal K schema groups on display."),E(602,"br"),n(603,"i"),l(604,"Use to manage display performance."),i()(),n(605,"div",38)(606,"mat-checkbox",121),f("ngModelChange",function(t){return m(g),u(e.facade.settings.signalk.vessels,t)||(e.facade.settings.signalk.vessels=t),c(t)}),p("change",function(){return e.persistModel()}),l(607," Vessels (other than Self) "),i()(),n(608,"div",38)(609,"mat-checkbox",122),f("ngModelChange",function(t){return m(g),u(e.facade.settings.signalk.atons,t)||(e.facade.settings.signalk.atons=t),c(t)}),p("change",function(){return e.persistModel()}),l(610," Aids to Navigation (AtoN) "),i()(),n(611,"div",38)(612,"mat-checkbox",123),f("ngModelChange",function(t){return m(g),u(e.facade.settings.signalk.aircraft,t)||(e.facade.settings.signalk.aircraft=t),c(t)}),p("change",function(){return e.persistModel()}),l(613," Aircraft "),i()(),n(614,"div",38)(615,"mat-checkbox",124),f("ngModelChange",function(t){return m(g),u(e.facade.settings.signalk.sar,t)||(e.facade.settings.signalk.sar=t),c(t)}),p("change",function(){return e.persistModel()}),l(616," Search and Rescue (SaR) "),i()(),n(617,"div",38)(618,"mat-checkbox",125),f("ngModelChange",function(t){return m(g),u(e.facade.settings.signalk.meteo,t)||(e.facade.settings.signalk.meteo=t),c(t)}),p("change",function(){return e.persistModel()}),l(619," Weather (Meteo) "),i()(),n(620,"div",38),E(621,"br"),n(622,"mat-form-field",39)(623,"mat-label"),l(624,"Max. distance from vessel"),i(),n(625,"mat-select",126,18),f("ngModelChange",function(t){return m(g),u(e.facade.settings.signalk.maxRadius,t)||(e.facade.settings.signalk.maxRadius=t),c(t)}),p("selectionChange",function(){return e.persistModel()}),y(627,Ai,2,2,"mat-option",41,v),i()()()()(),n(629,"div",46)(630,"div",38)(631,"button",127),p("click",function(){return e.clearAuthToken()}),n(632,"mat-icon"),l(633,"key_off"),i()()()()()()()()()(),n(634,"mat-tab",128)(635,"div",32)(636,"div",33)(637,"div",129)(638,"div",35),l(639,"EXPERIMENTS"),i(),n(640,"mat-card",36)(641,"mat-card-content")(642,"div",46)(643,"div",38)(644,"mat-checkbox",48),f("ngModelChange",function(t){return m(g),u(e.facade.settings.resources.video.enable,t)||(e.facade.settings.resources.video.enable=t),c(t)}),p("change",function(){return e.persistModel()}),l(645," Enable Video "),i()(),n(646,"div",38)(647,"mat-form-field",52)(648,"mat-label"),l(649,"url:"),i(),n(650,"input",130,19),f("ngModelChange",function(t){return m(g),u(e.facade.settings.resources.video.url,t)||(e.facade.settings.resources.video.url=t),c(t)}),p("change",function(){return e.persistModel("videoUrl")}),i(),b(652,Bi,2,0,"mat-error"),i()()(),n(653,"div",46)(654,"div",38)(655,"mat-checkbox",131,20),f("ngModelChange",function(t){return m(g),u(e.facade.settings.experiments,t)||(e.facade.settings.experiments=t),c(t)}),p("change",function(){return e.persistModel()}),n(657,"mat-icon"),l(658,"science"),i(),l(659," Experimental Features "),i()()()()()()()()()()()}if(a&2){let g=M(83),r=M(90),t=M(126),oe=M(250),re=M(259),se=M(268),le=M(293),ce=M(300),pe=M(340),de=M(348),ge=M(354),me=M(427),ht=M(561),yt=M(651);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(oe.invalid&&(oe.dirty||oe.touched)?251:-1),o(7),_("ngModel",e.facade.settings.map.s57Options.safetyDepth),o(2),T(re.invalid&&(re.dirty||re.touched)?260:-1),o(7),_("ngModel",e.facade.settings.map.s57Options.deepDepth),o(2),T(se.invalid&&(se.dirty||se.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(le.invalid&&(le.dirty||le.touched)?294:-1),o(5),_("ngModel",e.facade.settings.course.autoNextPointOnArrival),o(8),h("disabled",ce.checked===!1),_("ngModel",e.facade.settings.course.autoNextPointTrigger),o(2),S(e.options.course.nextPointTrigger),o(6),h("disabled",ce.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",!pe.checked),o(2),T(de.invalid&&(de.dirty||de.touched)?349:-1),o(4),_("ngModel",e.facade.fixedPosition[0]),h("disabled",!pe.checked),o(2),T(ge.invalid&&(ge.dirty||ge.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(me.invalid&&(me.dirty||me.touched)?428:-1),o(7),_("ngModel",e.facade.settings.vessels.trail),o(7),h("disabled",!e.facade.settings.vessels.trail),_("ngModel",e.facade.settings.vessels.trailSource),o(3),h("disabled",!e.serverTrailAvailable),o(4),T(e.serverTrailAvailable?e.facade.settings.vessels.trailSource==="auto"?450:-1:449),o(3),h("max",e.trailLengthAllStop)("displayWith",e.trailLengthStopLabel)("disabled",!e.app.serverTrailWanted()||!e.facade.settings.vessels.trail),o(),_("ngModel",e.trailLengthStop),o(),k(" Length (",e.trailLengthText,") "),o(6),_("ngModel",e.facade.settings.vessels.trailResolution.lastHour),h("disabled",!e.app.serverTrailWanted()||!e.facade.settings.vessels.trail),o(),S(e.options.trailIntervals.highResolution),o(6),_("ngModel",e.facade.settings.vessels.trailResolution.next23),h("disabled",!e.app.serverTrailWanted()||!e.facade.settings.vessels.trail),o(),S(e.options.trailIntervals.highResolution),o(6),_("ngModel",e.facade.settings.vessels.trailResolution.beyond24),h("disabled",!e.app.serverTrailWanted()||!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(2),T(e.facade.settings.vessels.aisShowTrack?-1:491),o(6),_("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(ht.value?562:-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?587:-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(yt.invalid?652:-1),o(3),_("ngModel",e.facade.settings.experiments)}},dependencies:[K,G,Pe,H,Oe,Ie,xe,Le,Z,Me,we,Re,Ne,te,lt,ee,Fe,Ae,Be,je,qe,ze,Ke,R,Te,be,N,ve,$,Ye,mt,dt,gt,ot,Q,q,z,Ge,Ue,He,J,Y,Ze,X,j,st,Qe,Je,at,it,nt,ae,ie],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{ft as SettingsDialog};
@@ -1 +1 @@
1
- import{Ya as a}from"./chunk-F4EUFUYM.js";import"./chunk-ISXARX6U.js";import"./chunk-62WHV6CJ.js";import"./chunk-MYBGWSLC.js";import"./chunk-6E2BDKCH.js";import"./chunk-45ZTFAA5.js";import"./chunk-X6D4D6EN.js";import"./chunk-PD55PKQG.js";import"./chunk-YZN4NRWW.js";import"./chunk-YSHHABBQ.js";import"./chunk-RG7WQ7O2.js";import"./chunk-NCEQPEJE.js";export{a as Trail2RouteDialog};
1
+ import{Ya as a}from"./chunk-QZNRNBJP.js";import"./chunk-ISXARX6U.js";import"./chunk-62WHV6CJ.js";import"./chunk-MYBGWSLC.js";import"./chunk-6E2BDKCH.js";import"./chunk-45ZTFAA5.js";import"./chunk-X6D4D6EN.js";import"./chunk-PD55PKQG.js";import"./chunk-YZN4NRWW.js";import"./chunk-YSHHABBQ.js";import"./chunk-RG7WQ7O2.js";import"./chunk-NCEQPEJE.js";export{a as Trail2RouteDialog};
@@ -1 +1 @@
1
- import{a as Ie,b as O,c as Ae,d as Ke,e as Be}from"./chunk-AQKT2J2C.js";import{$ as Me,La as Re,Ma as Oe,Na as Ge,Oa as Fe,Pa as Xe,Q as Se,Qa as We,Za as Ve,_ as Pe,aa as De,f as ee,k as _e,l as ye,m as ke,n as Ce,o as ve,r as Ee,s as R}from"./chunk-F4EUFUYM.js";import{a as be,b as Te,c as we}from"./chunk-ISXARX6U.js";import{j as oe,k as re,l as se}from"./chunk-62WHV6CJ.js";import{a as he,b as ge,d as xe}from"./chunk-MYBGWSLC.js";import{a as fe}from"./chunk-6E2BDKCH.js";import"./chunk-45ZTFAA5.js";import{b as le,i as ce,j as pe,n as de,o as me}from"./chunk-X6D4D6EN.js";import{b as ue}from"./chunk-PD55PKQG.js";import"./chunk-YZN4NRWW.js";import"./chunk-YSHHABBQ.js";import{$a as d,$d as J,Ha as f,Ia as _,Id as j,Jd as N,Ka as V,La as T,Ma as w,Md as U,N as B,Na as g,Oa as r,Od as z,Pa as s,Qa as L,Qd as q,R as b,Rd as Q,T as m,U as u,Xa as y,Za as h,Zd as Y,c as A,ce as Z,ee as te,jb as E,je as ie,l as K,ma as c,me as ae,ob as l,pb as H,qb as S,ra as C,sb as P,tb as M,ua as $,ub as D,ue as ne}from"./chunk-RG7WQ7O2.js";import{g as v}from"./chunk-NCEQPEJE.js";var G=class{gpx;constructor(){this.init()}init(){this.gpx=new Ie,this.gpx.metadata.name="Signal K Resource Export",this.gpx.metadata.desc="Freeboard export of Signal K resources"}toXML(){return this.gpx.toXML()}setRoutes(i,e){if(e)e.forEach(t=>{i[t]&&this.gpx.rte.push(this.packageRoute(t,i[t]))});else for(let t in i)this.gpx.rte.push(this.packageRoute(t,i[t]))}packageRoute(i,e){let t=new Ae;t.extensions=t.extensions??{},t.extensions.signalk={},t.extensions.signalk.uuid=i,e.distance&&(t.extensions.signalk.distance=e.distance),t.name=e.name||null,t.desc=e.description||null,t.cmt=e.feature.properties.cmt||null,t.src=e.feature.properties.src||null,t.number=e.feature.properties.number||null,t.type=e.feature.properties.type||null;for(let a of e.feature.geometry.coordinates){let n=new O;n.lon=a[0],n.lat=a[1],n.ele=a[2]||null,t.rtept.push(n),this.gpx.updateBounds(n)}return t}setWaypoints(i,e){if(e)e.forEach(t=>{i[t]&&this.gpx.wpt.push(this.packageWaypoint(t,i[t]))});else for(let t in i)this.gpx.wpt.push(this.packageWaypoint(t,i[t]))}packageWaypoint(i,e){let t=new O;if(t.extensions=t.extensions||{},t.extensions.signalk={},t.extensions.signalk.uuid=i,t.name=e.name||"",t.desc=e.description||"",t.cmt=e.feature.properties.cmt||null,t.geoidHeight=e.feature.properties.geoidHeight||null,t.src=e.feature.properties.src||null,t.sym=e.feature.properties.sym||null,t.type=e.feature.properties.type||null,e.type==="waypoint"){let a=Ee(e.feature.properties.skIcon);a?.gpxType&&(t.type=a.gpxType),a?.gpxSym&&(t.sym=a.gpxSym)}return t.fix=e.feature.properties.fix||null,t.sat=e.feature.properties.sat||null,t.hdop=e.feature.properties.hdop||null,t.vdop=e.feature.properties.vdop||null,t.pdop=e.feature.properties.pdop||null,t.ageOfGpsData=e.feature.properties.ageOfGpsData||null,t.dgpsid=e.feature.properties.dgpsid||null,t.lat=e.feature.geometry.coordinates[1],t.lon=e.feature.geometry.coordinates[0],t.ele=e.feature.geometry.coordinates[2]||null,this.gpx.updateBounds(t),t}setTracks(i,e){if(e)e.forEach(t=>{i[t]&&this.gpx.trk.push(this.packageTrack(t,i[t]))});else for(let t in i)this.gpx.trk.push(this.packageTrack(t,i[t]))}packageTrack(i,e){let t=new Ke;t.extensions=t.extensions||{},t.extensions.signalk={},t.extensions.signalk.uuid=i,t.name=e.feature.properties.name||null,t.desc=e.feature.properties.description||null,t.cmt=e.feature.properties.cmt||null,t.src=e.feature.properties.src||null,t.number=e.feature.properties.number||null,t.type=e.feature.properties.type||null;let a=e.feature.properties.coordTimes;return e.feature.geometry.coordinates.forEach((n,p)=>{let x=new Be;n.forEach((W,He)=>{let k=new O;k.lon=W[0],k.lat=W[1],k.ele=W[2]||null;let I=a?.[p]?.[He];I&&(k.datetime=new Date(I)),x.trkpt.push(k),this.gpx.updateBounds(k)}),t.trkseg.push(x)}),t}};var F=class o{resultSource;result$;sk2gpx;hasFSA;signalk=b(R);constructor(){this.resultSource=new A,this.result$=this.resultSource.asObservable(),this.hasFSA="showOpenFilePicker"in window}clear(){this.sk2gpx=null}prepData(i){let e={routes:[],waypoints:[],tracks:[]},t=1;return e.routes=i.routes.map(a=>{let n=a[1];return n.feature.id=a[0],n}),t=1,e.waypoints=i.waypoints.map(a=>{let n=a[1];return n.feature.id=a[0],n.name=n.name??`Wpt: ${t}`,t++,n}),e.tracks=i.tracks,e}saveToFile(i,e){this.sk2gpx=new G;let t={},a={},n={};for(let p=0;p<e.rte.selected.length;p++)e.rte.selected[p]&&(t[i.routes[p].feature.id]=i.routes[p]);this.sk2gpx.setRoutes(t);for(let p=0;p<e.wpt.selected.length;p++)e.wpt.selected[p]&&(a[i.waypoints[p].feature.id]=i.waypoints[p]);this.sk2gpx.setWaypoints(a),(e.trk.tracks??[]).forEach(p=>{let x=this.signalk.uuid;n[x]=We(x,p)}),this.sk2gpx.setTracks(n),this.hasFSA?this.fsaSaveFile():this.legacySaveToFile()}legacySaveToFile(){let i=new Blob([this.sk2gpx.toXML()],{type:"text/xml"}),e=document.createElement("a");e.href=URL.createObjectURL(i),e.download="fb_export.gpx",e.click(),URL.revokeObjectURL(e.href),e.remove(),this.resultSource.next(-1)}fsaSaveFile(){window.showSaveFilePicker({types:[{description:"GPX file",accept:{"text/xml":[".gpx"]}}]}).then(i=>{i.createWritable().then(e=>{let t=new Blob([this.sk2gpx.toXML()]);e.write(t).then(()=>{e.close(),this.resultSource.next(0)})}).catch(e=>{console.warn(e),this.resultSource.next(1)})}).catch(i=>{i?.name==="SecurityError"?this.legacySaveToFile():this.resultSource.next(-1)})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=B({token:o,factory:o.\u0275fac,providedIn:"root"})};var Ue=(o,i)=>i.context;function ze(o,i){o&1&&L(0,"mat-progress-bar",10)}function qe(o,i){if(o&1){let e=y();r(0,"div",19)(1,"div",20),l(2),s(),r(3,"div",21)(4,"mat-checkbox",22,0),h("change",function(){let a=m(e).$index,n=E(5),p=d(2);return u(p.checkWpt(n.checked,a))}),s()()()}if(o&2){let e=i.$implicit,t=i.$index,a=d(2);c(2),H(e.name),c(2),g("checked",a.selWaypoints[t])}}function Qe(o,i){if(o&1){let e=y();r(0,"div",12)(1,"mat-expansion-panel",13),h("opened",function(){m(e);let a=d();return u(a.display.expand.waypoints=!0)})("closed",function(){m(e);let a=d();return u(a.display.expand.waypoints=!1)}),r(2,"mat-expansion-panel-header",14)(3,"mat-panel-title")(4,"mat-icon",15),l(5,"place"),s(),l(6," \xA0"),r(7,"b"),l(8,"Waypoints:"),s()(),r(9,"mat-panel-description")(10,"div",16)(11,"mat-checkbox",17),h("change",function(a){m(e);let n=d();return u(n.checkWpt(a.checked,-1))})("click",function(a){return a.cancelBubble=!0}),s()()()(),r(12,"div",18),T(13,qe,6,2,"div",19,V),s()()()}if(o&2){let e=d();c(),g("expanded",e.display.expand.waypoints),c(10),g("indeterminate",e.display.someWptChecked)("checked",e.display.allWaypointsChecked)("disabled",e.resData.waypoints.length===0),c(2),w(e.resData.waypoints)}}function Ye(o,i){if(o&1){let e=y();r(0,"div",19)(1,"div",20)(2,"mat-icon",23),l(3,"directions"),s(),l(4),s(),r(5,"div",21)(6,"mat-checkbox",25,1),h("change",function(){let a=m(e).$index,n=E(7),p=d(2);return u(p.checkRte(n.checked,a))}),s()()()}if(o&2){let e=i.$implicit,t=i.$index,a=d(2);c(4),S(" ",e.name," "),c(2),g("checked",a.selRoutes[t])}}function Je(o,i){if(o&1){let e=y();r(0,"div",12)(1,"mat-expansion-panel",13),h("opened",function(){m(e);let a=d();return u(a.display.expand.routes=!0)})("closed",function(){m(e);let a=d();return u(a.display.expand.routes=!1)}),r(2,"mat-expansion-panel-header",14)(3,"mat-panel-title")(4,"mat-icon",23),l(5,"directions"),s(),l(6," \xA0"),r(7,"b"),l(8,"Routes:"),s()(),r(9,"mat-panel-description")(10,"div",16)(11,"mat-checkbox",24),h("change",function(a){m(e);let n=d();return u(n.checkRte(a.checked,-1))})("click",function(a){return a.cancelBubble=!0}),s()()()(),r(12,"div",18),T(13,Ye,8,2,"div",19,V),s()()()}if(o&2){let e=d();c(),g("expanded",e.display.expand.routes),c(10),g("indeterminate",e.display.someRteChecked)("checked",e.display.allRoutesChecked)("disabled",e.resData.routes.length==0),c(2),w(e.resData.routes)}}function Ze(o,i){o&1&&(r(0,"div",30),l(1," Only the positions gathered while Freeboard was open: the server has no recorded track for this vessel. "),s())}function et(o,i){if(o&1){let e=y();r(0,"div",19)(1,"div",20)(2,"mat-icon",26),l(3,"directions_boat"),s(),l(4),s(),r(5,"div",21)(6,"mat-checkbox",29,2),h("change",function(){let a=m(e).$index,n=E(7),p=d(2);return u(p.checkTrk(n.checked,a))}),s()()(),f(8,Ze,2,0,"div",30)}if(o&2){let e=i.$implicit,t=i.$index,a=d(2);c(4),S(" ",e.label," "),c(2),g("checked",a.selTracks[t]),c(2),_(e.tailOnly&&a.trackChoice==="displayed"?8:-1)}}function tt(o,i){o&1&&(r(0,"mat-option",37),l(1,"Track history range"),s())}function it(o,i){o&1&&(r(0,"div",30),l(1,"Choose a From time before the To time."),s())}function at(o,i){if(o&1){let e=y();r(0,"div",39)(1,"mat-form-field")(2,"mat-label"),l(3,"From"),s(),r(4,"input",40),D("ngModelChange",function(a){m(e);let n=d(3);return M(n.customFrom,a)||(n.customFrom=a),u(a)}),s()(),r(5,"mat-form-field")(6,"mat-label"),l(7,"To"),s(),r(8,"input",40),D("ngModelChange",function(a){m(e);let n=d(3);return M(n.customTo,a)||(n.customTo=a),u(a)}),s()()(),f(9,it,2,0,"div",30)}if(o&2){let e=d(3);c(4),P("ngModel",e.customFrom),c(4),P("ngModel",e.customTo),c(),_(e.customInvalid?9:-1)}}function nt(o,i){o&1&&(r(0,"div",30),l(1," Fetched from the server when you save, in the most detail it provides. "),s())}function ot(o,i){if(o&1){let e=y();r(0,"div",28)(1,"mat-form-field",31)(2,"mat-label"),l(3,"Track to export"),s(),r(4,"mat-select",32),D("ngModelChange",function(a){m(e);let n=d(2);return M(n.trackChoice,a)||(n.trackChoice=a),u(a)}),r(5,"mat-option",33),l(6,"As displayed"),s(),r(7,"mat-option",34),l(8,"Last 7 days"),s(),r(9,"mat-option",35),l(10,"Last 30 days"),s(),r(11,"mat-option",36),l(12,"All recorded"),s(),f(13,tt,2,0,"mat-option",37),r(14,"mat-option",38),l(15,"Custom range"),s()()(),f(16,at,10,3)(17,nt,2,0,"div",30),s()}if(o&2){let e=d(2);c(4),P("ngModel",e.trackChoice),c(9),_(e.historyRange?13:-1),c(3),_(e.trackChoice==="custom"?16:e.trackChoice!=="displayed"?17:-1)}}function rt(o,i){if(o&1){let e=y();r(0,"div",12)(1,"mat-expansion-panel",13),h("opened",function(){m(e);let a=d();return u(a.display.expand.tracks=!0)})("closed",function(){m(e);let a=d();return u(a.display.expand.tracks=!1)}),r(2,"mat-expansion-panel-header",14)(3,"mat-panel-title")(4,"mat-icon",26),l(5,"show_chart"),s(),l(6," \xA0"),r(7,"b"),l(8,"Tracks:"),s()(),r(9,"mat-panel-description")(10,"div",16)(11,"mat-checkbox",27),h("change",function(a){m(e);let n=d();return u(n.checkTrk(a.checked,-1))})("click",function(a){return a.cancelBubble=!0}),s()()()(),r(12,"div",18),T(13,et,9,3,null,null,Ue),s(),f(15,ot,18,3,"div",28),s()()}if(o&2){let e=d();c(),g("expanded",e.display.expand.tracks),c(10),g("indeterminate",e.display.someTrkChecked)("checked",e.display.allTracksChecked)("disabled",e.resData.tracks.length==0),c(2),w(e.resData.tracks),c(2),_(e.rangeAvailable?15:-1)}}var st=36e5;function $e(o){let i=new Date(o),e=t=>String(t).padStart(2,"0");return`${i.getFullYear()}-${e(i.getMonth()+1)}-${e(i.getDate())}T${e(i.getHours())}:${e(i.getMinutes())}`}function X(o){let i=o?new Date(o).getTime():NaN;return Number.isFinite(i)?i:null}var Le=class o{constructor(i,e,t,a,n){this.app=i;this.skres=e;this.facade=t;this.dialogRef=a;this.data=n}app;skres;facade;dialogRef;data;resData={routes:[],waypoints:[],tracks:[]};trackChoice="displayed";customFrom="";customTo="";fetching=!1;closed=!1;signalk=b(R);trackHistory=b(De);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(){let i=Date.now();this.customFrom=$e(i-24*st),this.customTo=$e(i),this.loadResources(),this.data.initialChoice&&this.rangeAvailable&&(this.data.initialChoice!=="history"||this.historyRange)&&(this.trackChoice=this.data.initialChoice),this.unsubscribe.push(this.facade.result$.subscribe(e=>{this.dialogRef.close(e)}))}ngOnDestroy(){this.closed=!0,this.unsubscribe.forEach(i=>i.unsubscribe()),this.facade.clear()}loadResources(){return v(this,null,function*(){if(this.data.tracksOnly){this.data.waypoints=[],this.parseResourceData();return}this.data.routes.sort((i,e)=>i[1].name.localeCompare(e[1].name));try{this.app.sIsFetching.set(!0);let i=yield this.skres.listFromServer("waypoints");i.sort((e,t)=>e[1].name.localeCompare(t[1].name)),this.data.waypoints=i,this.app.sIsFetching.set(!1)}catch(i){this.app.sIsFetching.set(!1),this.resData.waypoints=[]}this.parseResourceData()})}get rangeAvailable(){return!!this.app.featureFlags().tracksApi}get historyRange(){return this.resData.tracks.some(i=>this.trackHistory.isShown(i.context))?this.trackHistory.range():void 0}chosenRange(){return Re(this.trackChoice,Date.now(),{history:this.historyRange,custom:{from:X(this.customFrom),to:X(this.customTo)}})}get customInvalid(){return this.trackChoice==="custom"&&!Oe({from:X(this.customFrom),to:X(this.customTo)})}get rangeUnusable(){return this.rangeAvailable&&this.trackChoice!=="displayed"&&this.chosenRange()===null}get canSave(){return!this.fetching&&!(this.display.saveTracksOK&&this.rangeUnusable)&&(this.display.saveRoutesOK||this.display.saveWaypointsOK||this.display.saveTracksOK)}save(){return v(this,null,function*(){let i;try{i=yield this.selectedTracks()}catch(e){if(this.closed)return;this.app.showAlert("GPX Save","Unable to fetch the recorded track from the server.");return}i===null||this.closed||this.facade.saveToFile(this.resData,{rte:{selected:this.selRoutes},wpt:{selected:this.selWaypoints},trk:{tracks:i}})})}selectedTracks(){return v(this,null,function*(){let i=this.resData.tracks.filter((n,p)=>this.selTracks[p]);if(i.length===0)return[];let e=this.rangeAvailable?this.chosenRange():null,t=Date.now(),a=[];this.fetching=!0;try{for(let n of i){let p=e===null?n.displayed:yield this.fetchTrack(n.context,e),x=Xe(n.label,p,t);if(!x)return this.app.showAlert("GPX Save",e===null?`There is no track to save for ${n.label}.`:`No track is recorded for ${n.label} in the selected range.`),null;a.push(x)}}finally{this.fetching=!1}return a})}fetchTrack(i,e){return v(this,null,function*(){let t=this.app.trackSource()?.provider,a=this.signalk.api.get(2,`/tracks?${Ge(i,e,t)}`);if(!a)throw new Error("Not connected");let n=yield K(a),p=ee(i,n,t);return{lines:p?.lines??[],times:p?.times??(p?.lines??[]).map(x=>x.map(()=>{}))}})}parseResourceData(){this.display.allRoutesChecked=!1,this.display.saveRoutesOK=!1,this.selRoutes=[],this.display.allWaypointsChecked=!1,this.display.saveWaypointsOK=!1,this.selWaypoints=[],this.display.allTracksChecked=!1,this.display.saveTracksOK=!1,this.selTracks=[],this.display.selCount={routes:0,waypoints:0,tracks:0},this.display.expand={routes:!1,waypoints:!1,tracks:!1},this.display.notValid=!1,this.resData=this.facade.prepData(this.data),this.resData.tracks=this.resData.tracks.filter(i=>this.rangeAvailable||Fe(i.displayed?.lines)),this.resData.routes.forEach(()=>{this.selRoutes.push(!1)}),this.selRoutes.length===1&&(this.selRoutes[0]=!0,this.display.allRoutesChecked=!0,this.display.expand.routes=!0,this.display.saveRoutesOK=!0),this.resData.waypoints.forEach(()=>{this.selWaypoints.push(!1)}),this.resData.tracks.forEach(()=>{this.selTracks.push(!1)}),this.data.tracksOnly&&this.selTracks.length!==0&&(this.checkTrk(!0,-1),this.display.expand.tracks=!0)}checkRte(i,e=-1){let t=0;if(e!==-1){this.selRoutes[e]=i,this.display.saveRoutesOK=i;for(let a of this.selRoutes)a&&t++;this.display.saveRoutesOK=t!==0,this.display.selCount.routes=t,this.display.allRoutesChecked=t===this.selRoutes.length}else{for(let a=0;a<this.selRoutes.length;a++)this.selRoutes[a]=i,this.display.saveRoutesOK=i,this.display.allRoutesChecked=i;this.display.selCount.routes=i?this.selRoutes.length:0}this.display.someRteChecked=!(this.display.allRoutesChecked||t===0)}checkWpt(i,e=-1){let t=0;if(e!==-1){this.selWaypoints[e]=i,this.display.saveWaypointsOK=i;for(let a of this.selWaypoints)a&&t++;this.display.saveWaypointsOK=t!==0,this.display.selCount.waypoints=t,this.display.allWaypointsChecked=t===this.selWaypoints.length}else{for(let a=0;a<this.selWaypoints.length;a++)this.selWaypoints[a]=i,this.display.saveWaypointsOK=i,this.display.allWaypointsChecked=i;this.display.selCount.waypoints=i?this.selWaypoints.length:0}this.display.someWptChecked=!(this.display.allWaypointsChecked||t===0)}checkTrk(i,e=-1){let t=0;if(e!==-1){this.selTracks[e]=i,this.display.saveTracksOK=i;for(let a of this.selTracks)a&&t++;this.display.saveTracksOK=t!==0,this.display.selCount.tracks=t,this.display.allTracksChecked=t===this.selTracks.length}else{for(let a=0;a<this.selTracks.length;a++)this.selTracks[a]=i,this.display.saveTracksOK=i,this.display.allTracksChecked=i;this.display.selCount.tracks=i?this.selTracks.length:0}this.display.someTrkChecked=!(this.display.allTracksChecked||t===0)}static \u0275fac=function(e){return new(e||o)(C(Ve),C(Se),C(F),C(j),C(N))};static \u0275cmp=$({type:o,selectors:[["gpxsave-dialog"]],decls:19,vars:6,consts:[["wval",""],["rval",""],["tval",""],[1,"gpxsave-dialog"],[2,"background-color","transparent"],[2,"display","flex","width","100%"],["mat-raised-button","","matTooltip","Save selected resources","matTooltipPosition","right",2,"width","85px",3,"click","disabled"],[2,"flex","1 1 auto","text-align","center"],[2,"text-align","right"],["mat-icon-button","",3,"click"],["mode","indeterminate"],["mat-dialog-content","",2,"padding","2px"],[1,"card-group"],[3,"opened","closed","expanded"],[1,"panel-header"],[1,"icon-waypoint"],[1,"panel-description"],["matTooltip","Select all Waypoints","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],[1,"list-container-scrollable"],[1,"item-row"],[1,"name"],[1,"check"],["matTooltip","Select Waypoint","matTooltipPosition","below",3,"change","checked"],[1,"icon-route"],["matTooltip","Select all Routes","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],["matTooltip","Select this Route","matTooltipPosition","below",3,"change","checked"],[1,"icon-track"],["matTooltip","Select all Tracks","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],[1,"track-range"],["matTooltip","Select this Track","matTooltipPosition","below",3,"change","checked"],[1,"track-note"],[1,"track-range-select"],[3,"ngModelChange","ngModel"],["value","displayed"],["value","7d"],["value","30d"],["value","all"],["value","history"],["value","custom"],[1,"track-range-custom"],["matInput","","type","datetime-local",3,"ngModelChange","ngModel"]],template:function(e,t){e&1&&(r(0,"div",3)(1,"mat-toolbar",4)(2,"div",5)(3,"div")(4,"button",6),h("click",function(){return t.save()}),r(5,"mat-icon"),l(6,"save"),s(),l(7,"\xA0Save\xA0 "),s()(),r(8,"div",7),l(9),s(),r(10,"div",8)(11,"button",9),h("click",function(){return t.dialogRef.close(-1)}),r(12,"mat-icon"),l(13,"close"),s()()()()(),f(14,ze,1,0,"mat-progress-bar",10),r(15,"div",11),f(16,Qe,15,4,"div",12),f(17,Je,15,4,"div",12),f(18,rt,16,5,"div",12),s()()),e&2&&(c(4),g("disabled",!t.canSave),c(5),S(" ",t.data.tracksOnly?"Export track to GPX":"Export to GPX"," "),c(5),_(t.fetching?14:-1),c(2),_(t.resData.waypoints.length!==0?16:-1),c(),_(t.resData.routes.length!==0?17:-1),c(),_(t.resData.tracks.length!==0?18:-1))},dependencies:[Te,be,Me,Pe,z,U,Q,q,Z,J,Y,oe,pe,ce,le,me,de,ue,ve,_e,ye,Ce,ke,se,re,we,fe,xe,ge,he,ne,te,ie,ae],styles:[".gpxsave-dialog[_ngcontent-%COMP%]{font-family:roboto;position:relative}.dialog-content[_ngcontent-%COMP%]{position:relative;min-height:300px;max-height:400px;width:100%;min-width:240px;overflow-y:auto}.dialog-icon[_ngcontent-%COMP%]{display:none}.card-group[_ngcontent-%COMP%]{padding:5px 5%}.card-group[_ngcontent-%COMP%] .panel-header[_ngcontent-%COMP%]{padding:0 5px}.card-group[_ngcontent-%COMP%] .panel-description[_ngcontent-%COMP%]{text-align:right;width:100%;padding-right:10px}.card-group-title[_ngcontent-%COMP%]{font-weight:700;font-size:10pt;font-family:Arial,Helvetica,sans-serif;padding:10px 0}button[_ngcontent-%COMP%]{min-width:unset;padding:unset}.item-row[_ngcontent-%COMP%]{display:flex;width:100%;padding:2px 0}.item-row[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{flex:1 1 auto;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;text-overflow:ellipsis;line-height:2.5em}.item-row[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{text-align:right;padding-right:15px}.track-note[_ngcontent-%COMP%]{font-size:.85em;opacity:.8;padding:0 15px 4px 30px}.track-range[_ngcontent-%COMP%]{padding:8px 5px 0}.track-range-select[_ngcontent-%COMP%]{width:100%}.track-range-custom[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:0 8px}.track-range-custom[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex:1 1 220px}@media only screen and (min-width:475px){button[_ngcontent-%COMP%]{min-width:inherit;padding:inherit}.dialog-content[_ngcontent-%COMP%]{min-width:400px}.dialog-icon[_ngcontent-%COMP%]{display:inline}}@media only screen and (min-width:800px){.card-group[_ngcontent-%COMP%]{padding:5px 5%}}"]})};export{Le as GPXExportDialog,X as fromLocalInput,$e as toLocalInput};
1
+ import{a as Ie,b as O,c as Ae,d as Ke,e as Be}from"./chunk-AQKT2J2C.js";import{$ as Me,La as Re,Ma as Oe,Na as Ge,Oa as Fe,Pa as Xe,Q as Se,Qa as We,Za as Ve,_ as Pe,aa as De,f as ee,k as _e,l as ye,m as ke,n as Ce,o as ve,r as Ee,s as R}from"./chunk-QZNRNBJP.js";import{a as be,b as Te,c as we}from"./chunk-ISXARX6U.js";import{j as oe,k as re,l as se}from"./chunk-62WHV6CJ.js";import{a as he,b as ge,d as xe}from"./chunk-MYBGWSLC.js";import{a as fe}from"./chunk-6E2BDKCH.js";import"./chunk-45ZTFAA5.js";import{b as le,i as ce,j as pe,n as de,o as me}from"./chunk-X6D4D6EN.js";import{b as ue}from"./chunk-PD55PKQG.js";import"./chunk-YZN4NRWW.js";import"./chunk-YSHHABBQ.js";import{$a as d,$d as J,Ha as f,Ia as _,Id as j,Jd as N,Ka as V,La as T,Ma as w,Md as U,N as B,Na as g,Oa as r,Od as z,Pa as s,Qa as L,Qd as q,R as b,Rd as Q,T as m,U as u,Xa as y,Za as h,Zd as Y,c as A,ce as Z,ee as te,jb as E,je as ie,l as K,ma as c,me as ae,ob as l,pb as H,qb as S,ra as C,sb as P,tb as M,ua as $,ub as D,ue as ne}from"./chunk-RG7WQ7O2.js";import{g as v}from"./chunk-NCEQPEJE.js";var G=class{gpx;constructor(){this.init()}init(){this.gpx=new Ie,this.gpx.metadata.name="Signal K Resource Export",this.gpx.metadata.desc="Freeboard export of Signal K resources"}toXML(){return this.gpx.toXML()}setRoutes(i,e){if(e)e.forEach(t=>{i[t]&&this.gpx.rte.push(this.packageRoute(t,i[t]))});else for(let t in i)this.gpx.rte.push(this.packageRoute(t,i[t]))}packageRoute(i,e){let t=new Ae;t.extensions=t.extensions??{},t.extensions.signalk={},t.extensions.signalk.uuid=i,e.distance&&(t.extensions.signalk.distance=e.distance),t.name=e.name||null,t.desc=e.description||null,t.cmt=e.feature.properties.cmt||null,t.src=e.feature.properties.src||null,t.number=e.feature.properties.number||null,t.type=e.feature.properties.type||null;for(let a of e.feature.geometry.coordinates){let n=new O;n.lon=a[0],n.lat=a[1],n.ele=a[2]||null,t.rtept.push(n),this.gpx.updateBounds(n)}return t}setWaypoints(i,e){if(e)e.forEach(t=>{i[t]&&this.gpx.wpt.push(this.packageWaypoint(t,i[t]))});else for(let t in i)this.gpx.wpt.push(this.packageWaypoint(t,i[t]))}packageWaypoint(i,e){let t=new O;if(t.extensions=t.extensions||{},t.extensions.signalk={},t.extensions.signalk.uuid=i,t.name=e.name||"",t.desc=e.description||"",t.cmt=e.feature.properties.cmt||null,t.geoidHeight=e.feature.properties.geoidHeight||null,t.src=e.feature.properties.src||null,t.sym=e.feature.properties.sym||null,t.type=e.feature.properties.type||null,e.type==="waypoint"){let a=Ee(e.feature.properties.skIcon);a?.gpxType&&(t.type=a.gpxType),a?.gpxSym&&(t.sym=a.gpxSym)}return t.fix=e.feature.properties.fix||null,t.sat=e.feature.properties.sat||null,t.hdop=e.feature.properties.hdop||null,t.vdop=e.feature.properties.vdop||null,t.pdop=e.feature.properties.pdop||null,t.ageOfGpsData=e.feature.properties.ageOfGpsData||null,t.dgpsid=e.feature.properties.dgpsid||null,t.lat=e.feature.geometry.coordinates[1],t.lon=e.feature.geometry.coordinates[0],t.ele=e.feature.geometry.coordinates[2]||null,this.gpx.updateBounds(t),t}setTracks(i,e){if(e)e.forEach(t=>{i[t]&&this.gpx.trk.push(this.packageTrack(t,i[t]))});else for(let t in i)this.gpx.trk.push(this.packageTrack(t,i[t]))}packageTrack(i,e){let t=new Ke;t.extensions=t.extensions||{},t.extensions.signalk={},t.extensions.signalk.uuid=i,t.name=e.feature.properties.name||null,t.desc=e.feature.properties.description||null,t.cmt=e.feature.properties.cmt||null,t.src=e.feature.properties.src||null,t.number=e.feature.properties.number||null,t.type=e.feature.properties.type||null;let a=e.feature.properties.coordTimes;return e.feature.geometry.coordinates.forEach((n,p)=>{let x=new Be;n.forEach((W,He)=>{let k=new O;k.lon=W[0],k.lat=W[1],k.ele=W[2]||null;let I=a?.[p]?.[He];I&&(k.datetime=new Date(I)),x.trkpt.push(k),this.gpx.updateBounds(k)}),t.trkseg.push(x)}),t}};var F=class o{resultSource;result$;sk2gpx;hasFSA;signalk=b(R);constructor(){this.resultSource=new A,this.result$=this.resultSource.asObservable(),this.hasFSA="showOpenFilePicker"in window}clear(){this.sk2gpx=null}prepData(i){let e={routes:[],waypoints:[],tracks:[]},t=1;return e.routes=i.routes.map(a=>{let n=a[1];return n.feature.id=a[0],n}),t=1,e.waypoints=i.waypoints.map(a=>{let n=a[1];return n.feature.id=a[0],n.name=n.name??`Wpt: ${t}`,t++,n}),e.tracks=i.tracks,e}saveToFile(i,e){this.sk2gpx=new G;let t={},a={},n={};for(let p=0;p<e.rte.selected.length;p++)e.rte.selected[p]&&(t[i.routes[p].feature.id]=i.routes[p]);this.sk2gpx.setRoutes(t);for(let p=0;p<e.wpt.selected.length;p++)e.wpt.selected[p]&&(a[i.waypoints[p].feature.id]=i.waypoints[p]);this.sk2gpx.setWaypoints(a),(e.trk.tracks??[]).forEach(p=>{let x=this.signalk.uuid;n[x]=We(x,p)}),this.sk2gpx.setTracks(n),this.hasFSA?this.fsaSaveFile():this.legacySaveToFile()}legacySaveToFile(){let i=new Blob([this.sk2gpx.toXML()],{type:"text/xml"}),e=document.createElement("a");e.href=URL.createObjectURL(i),e.download="fb_export.gpx",e.click(),URL.revokeObjectURL(e.href),e.remove(),this.resultSource.next(-1)}fsaSaveFile(){window.showSaveFilePicker({types:[{description:"GPX file",accept:{"text/xml":[".gpx"]}}]}).then(i=>{i.createWritable().then(e=>{let t=new Blob([this.sk2gpx.toXML()]);e.write(t).then(()=>{e.close(),this.resultSource.next(0)})}).catch(e=>{console.warn(e),this.resultSource.next(1)})}).catch(i=>{i?.name==="SecurityError"?this.legacySaveToFile():this.resultSource.next(-1)})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=B({token:o,factory:o.\u0275fac,providedIn:"root"})};var Ue=(o,i)=>i.context;function ze(o,i){o&1&&L(0,"mat-progress-bar",10)}function qe(o,i){if(o&1){let e=y();r(0,"div",19)(1,"div",20),l(2),s(),r(3,"div",21)(4,"mat-checkbox",22,0),h("change",function(){let a=m(e).$index,n=E(5),p=d(2);return u(p.checkWpt(n.checked,a))}),s()()()}if(o&2){let e=i.$implicit,t=i.$index,a=d(2);c(2),H(e.name),c(2),g("checked",a.selWaypoints[t])}}function Qe(o,i){if(o&1){let e=y();r(0,"div",12)(1,"mat-expansion-panel",13),h("opened",function(){m(e);let a=d();return u(a.display.expand.waypoints=!0)})("closed",function(){m(e);let a=d();return u(a.display.expand.waypoints=!1)}),r(2,"mat-expansion-panel-header",14)(3,"mat-panel-title")(4,"mat-icon",15),l(5,"place"),s(),l(6," \xA0"),r(7,"b"),l(8,"Waypoints:"),s()(),r(9,"mat-panel-description")(10,"div",16)(11,"mat-checkbox",17),h("change",function(a){m(e);let n=d();return u(n.checkWpt(a.checked,-1))})("click",function(a){return a.cancelBubble=!0}),s()()()(),r(12,"div",18),T(13,qe,6,2,"div",19,V),s()()()}if(o&2){let e=d();c(),g("expanded",e.display.expand.waypoints),c(10),g("indeterminate",e.display.someWptChecked)("checked",e.display.allWaypointsChecked)("disabled",e.resData.waypoints.length===0),c(2),w(e.resData.waypoints)}}function Ye(o,i){if(o&1){let e=y();r(0,"div",19)(1,"div",20)(2,"mat-icon",23),l(3,"directions"),s(),l(4),s(),r(5,"div",21)(6,"mat-checkbox",25,1),h("change",function(){let a=m(e).$index,n=E(7),p=d(2);return u(p.checkRte(n.checked,a))}),s()()()}if(o&2){let e=i.$implicit,t=i.$index,a=d(2);c(4),S(" ",e.name," "),c(2),g("checked",a.selRoutes[t])}}function Je(o,i){if(o&1){let e=y();r(0,"div",12)(1,"mat-expansion-panel",13),h("opened",function(){m(e);let a=d();return u(a.display.expand.routes=!0)})("closed",function(){m(e);let a=d();return u(a.display.expand.routes=!1)}),r(2,"mat-expansion-panel-header",14)(3,"mat-panel-title")(4,"mat-icon",23),l(5,"directions"),s(),l(6," \xA0"),r(7,"b"),l(8,"Routes:"),s()(),r(9,"mat-panel-description")(10,"div",16)(11,"mat-checkbox",24),h("change",function(a){m(e);let n=d();return u(n.checkRte(a.checked,-1))})("click",function(a){return a.cancelBubble=!0}),s()()()(),r(12,"div",18),T(13,Ye,8,2,"div",19,V),s()()()}if(o&2){let e=d();c(),g("expanded",e.display.expand.routes),c(10),g("indeterminate",e.display.someRteChecked)("checked",e.display.allRoutesChecked)("disabled",e.resData.routes.length==0),c(2),w(e.resData.routes)}}function Ze(o,i){o&1&&(r(0,"div",30),l(1," Only the positions gathered while Freeboard was open: the server has no recorded track for this vessel. "),s())}function et(o,i){if(o&1){let e=y();r(0,"div",19)(1,"div",20)(2,"mat-icon",26),l(3,"directions_boat"),s(),l(4),s(),r(5,"div",21)(6,"mat-checkbox",29,2),h("change",function(){let a=m(e).$index,n=E(7),p=d(2);return u(p.checkTrk(n.checked,a))}),s()()(),f(8,Ze,2,0,"div",30)}if(o&2){let e=i.$implicit,t=i.$index,a=d(2);c(4),S(" ",e.label," "),c(2),g("checked",a.selTracks[t]),c(2),_(e.tailOnly&&a.trackChoice==="displayed"?8:-1)}}function tt(o,i){o&1&&(r(0,"mat-option",37),l(1,"Track history range"),s())}function it(o,i){o&1&&(r(0,"div",30),l(1,"Choose a From time before the To time."),s())}function at(o,i){if(o&1){let e=y();r(0,"div",39)(1,"mat-form-field")(2,"mat-label"),l(3,"From"),s(),r(4,"input",40),D("ngModelChange",function(a){m(e);let n=d(3);return M(n.customFrom,a)||(n.customFrom=a),u(a)}),s()(),r(5,"mat-form-field")(6,"mat-label"),l(7,"To"),s(),r(8,"input",40),D("ngModelChange",function(a){m(e);let n=d(3);return M(n.customTo,a)||(n.customTo=a),u(a)}),s()()(),f(9,it,2,0,"div",30)}if(o&2){let e=d(3);c(4),P("ngModel",e.customFrom),c(4),P("ngModel",e.customTo),c(),_(e.customInvalid?9:-1)}}function nt(o,i){o&1&&(r(0,"div",30),l(1," Fetched from the server when you save, in the most detail it provides. "),s())}function ot(o,i){if(o&1){let e=y();r(0,"div",28)(1,"mat-form-field",31)(2,"mat-label"),l(3,"Track to export"),s(),r(4,"mat-select",32),D("ngModelChange",function(a){m(e);let n=d(2);return M(n.trackChoice,a)||(n.trackChoice=a),u(a)}),r(5,"mat-option",33),l(6,"As displayed"),s(),r(7,"mat-option",34),l(8,"Last 7 days"),s(),r(9,"mat-option",35),l(10,"Last 30 days"),s(),r(11,"mat-option",36),l(12,"All recorded"),s(),f(13,tt,2,0,"mat-option",37),r(14,"mat-option",38),l(15,"Custom range"),s()()(),f(16,at,10,3)(17,nt,2,0,"div",30),s()}if(o&2){let e=d(2);c(4),P("ngModel",e.trackChoice),c(9),_(e.historyRange?13:-1),c(3),_(e.trackChoice==="custom"?16:e.trackChoice!=="displayed"?17:-1)}}function rt(o,i){if(o&1){let e=y();r(0,"div",12)(1,"mat-expansion-panel",13),h("opened",function(){m(e);let a=d();return u(a.display.expand.tracks=!0)})("closed",function(){m(e);let a=d();return u(a.display.expand.tracks=!1)}),r(2,"mat-expansion-panel-header",14)(3,"mat-panel-title")(4,"mat-icon",26),l(5,"show_chart"),s(),l(6," \xA0"),r(7,"b"),l(8,"Tracks:"),s()(),r(9,"mat-panel-description")(10,"div",16)(11,"mat-checkbox",27),h("change",function(a){m(e);let n=d();return u(n.checkTrk(a.checked,-1))})("click",function(a){return a.cancelBubble=!0}),s()()()(),r(12,"div",18),T(13,et,9,3,null,null,Ue),s(),f(15,ot,18,3,"div",28),s()()}if(o&2){let e=d();c(),g("expanded",e.display.expand.tracks),c(10),g("indeterminate",e.display.someTrkChecked)("checked",e.display.allTracksChecked)("disabled",e.resData.tracks.length==0),c(2),w(e.resData.tracks),c(2),_(e.rangeAvailable?15:-1)}}var st=36e5;function $e(o){let i=new Date(o),e=t=>String(t).padStart(2,"0");return`${i.getFullYear()}-${e(i.getMonth()+1)}-${e(i.getDate())}T${e(i.getHours())}:${e(i.getMinutes())}`}function X(o){let i=o?new Date(o).getTime():NaN;return Number.isFinite(i)?i:null}var Le=class o{constructor(i,e,t,a,n){this.app=i;this.skres=e;this.facade=t;this.dialogRef=a;this.data=n}app;skres;facade;dialogRef;data;resData={routes:[],waypoints:[],tracks:[]};trackChoice="displayed";customFrom="";customTo="";fetching=!1;closed=!1;signalk=b(R);trackHistory=b(De);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(){let i=Date.now();this.customFrom=$e(i-24*st),this.customTo=$e(i),this.loadResources(),this.data.initialChoice&&this.rangeAvailable&&(this.data.initialChoice!=="history"||this.historyRange)&&(this.trackChoice=this.data.initialChoice),this.unsubscribe.push(this.facade.result$.subscribe(e=>{this.dialogRef.close(e)}))}ngOnDestroy(){this.closed=!0,this.unsubscribe.forEach(i=>i.unsubscribe()),this.facade.clear()}loadResources(){return v(this,null,function*(){if(this.data.tracksOnly){this.data.waypoints=[],this.parseResourceData();return}this.data.routes.sort((i,e)=>i[1].name.localeCompare(e[1].name));try{this.app.sIsFetching.set(!0);let i=yield this.skres.listFromServer("waypoints");i.sort((e,t)=>e[1].name.localeCompare(t[1].name)),this.data.waypoints=i,this.app.sIsFetching.set(!1)}catch(i){this.app.sIsFetching.set(!1),this.resData.waypoints=[]}this.parseResourceData()})}get rangeAvailable(){return!!this.app.featureFlags().tracksApi}get historyRange(){return this.resData.tracks.some(i=>this.trackHistory.isShown(i.context))?this.trackHistory.range():void 0}chosenRange(){return Re(this.trackChoice,Date.now(),{history:this.historyRange,custom:{from:X(this.customFrom),to:X(this.customTo)}})}get customInvalid(){return this.trackChoice==="custom"&&!Oe({from:X(this.customFrom),to:X(this.customTo)})}get rangeUnusable(){return this.rangeAvailable&&this.trackChoice!=="displayed"&&this.chosenRange()===null}get canSave(){return!this.fetching&&!(this.display.saveTracksOK&&this.rangeUnusable)&&(this.display.saveRoutesOK||this.display.saveWaypointsOK||this.display.saveTracksOK)}save(){return v(this,null,function*(){let i;try{i=yield this.selectedTracks()}catch(e){if(this.closed)return;this.app.showAlert("GPX Save","Unable to fetch the recorded track from the server.");return}i===null||this.closed||this.facade.saveToFile(this.resData,{rte:{selected:this.selRoutes},wpt:{selected:this.selWaypoints},trk:{tracks:i}})})}selectedTracks(){return v(this,null,function*(){let i=this.resData.tracks.filter((n,p)=>this.selTracks[p]);if(i.length===0)return[];let e=this.rangeAvailable?this.chosenRange():null,t=Date.now(),a=[];this.fetching=!0;try{for(let n of i){let p=e===null?n.displayed:yield this.fetchTrack(n.context,e),x=Xe(n.label,p,t);if(!x)return this.app.showAlert("GPX Save",e===null?`There is no track to save for ${n.label}.`:`No track is recorded for ${n.label} in the selected range.`),null;a.push(x)}}finally{this.fetching=!1}return a})}fetchTrack(i,e){return v(this,null,function*(){let t=this.app.trackSource()?.provider,a=this.signalk.api.get(2,`/tracks?${Ge(i,e,t)}`);if(!a)throw new Error("Not connected");let n=yield K(a),p=ee(i,n,t);return{lines:p?.lines??[],times:p?.times??(p?.lines??[]).map(x=>x.map(()=>{}))}})}parseResourceData(){this.display.allRoutesChecked=!1,this.display.saveRoutesOK=!1,this.selRoutes=[],this.display.allWaypointsChecked=!1,this.display.saveWaypointsOK=!1,this.selWaypoints=[],this.display.allTracksChecked=!1,this.display.saveTracksOK=!1,this.selTracks=[],this.display.selCount={routes:0,waypoints:0,tracks:0},this.display.expand={routes:!1,waypoints:!1,tracks:!1},this.display.notValid=!1,this.resData=this.facade.prepData(this.data),this.resData.tracks=this.resData.tracks.filter(i=>this.rangeAvailable||Fe(i.displayed?.lines)),this.resData.routes.forEach(()=>{this.selRoutes.push(!1)}),this.selRoutes.length===1&&(this.selRoutes[0]=!0,this.display.allRoutesChecked=!0,this.display.expand.routes=!0,this.display.saveRoutesOK=!0),this.resData.waypoints.forEach(()=>{this.selWaypoints.push(!1)}),this.resData.tracks.forEach(()=>{this.selTracks.push(!1)}),this.data.tracksOnly&&this.selTracks.length!==0&&(this.checkTrk(!0,-1),this.display.expand.tracks=!0)}checkRte(i,e=-1){let t=0;if(e!==-1){this.selRoutes[e]=i,this.display.saveRoutesOK=i;for(let a of this.selRoutes)a&&t++;this.display.saveRoutesOK=t!==0,this.display.selCount.routes=t,this.display.allRoutesChecked=t===this.selRoutes.length}else{for(let a=0;a<this.selRoutes.length;a++)this.selRoutes[a]=i,this.display.saveRoutesOK=i,this.display.allRoutesChecked=i;this.display.selCount.routes=i?this.selRoutes.length:0}this.display.someRteChecked=!(this.display.allRoutesChecked||t===0)}checkWpt(i,e=-1){let t=0;if(e!==-1){this.selWaypoints[e]=i,this.display.saveWaypointsOK=i;for(let a of this.selWaypoints)a&&t++;this.display.saveWaypointsOK=t!==0,this.display.selCount.waypoints=t,this.display.allWaypointsChecked=t===this.selWaypoints.length}else{for(let a=0;a<this.selWaypoints.length;a++)this.selWaypoints[a]=i,this.display.saveWaypointsOK=i,this.display.allWaypointsChecked=i;this.display.selCount.waypoints=i?this.selWaypoints.length:0}this.display.someWptChecked=!(this.display.allWaypointsChecked||t===0)}checkTrk(i,e=-1){let t=0;if(e!==-1){this.selTracks[e]=i,this.display.saveTracksOK=i;for(let a of this.selTracks)a&&t++;this.display.saveTracksOK=t!==0,this.display.selCount.tracks=t,this.display.allTracksChecked=t===this.selTracks.length}else{for(let a=0;a<this.selTracks.length;a++)this.selTracks[a]=i,this.display.saveTracksOK=i,this.display.allTracksChecked=i;this.display.selCount.tracks=i?this.selTracks.length:0}this.display.someTrkChecked=!(this.display.allTracksChecked||t===0)}static \u0275fac=function(e){return new(e||o)(C(Ve),C(Se),C(F),C(j),C(N))};static \u0275cmp=$({type:o,selectors:[["gpxsave-dialog"]],decls:19,vars:6,consts:[["wval",""],["rval",""],["tval",""],[1,"gpxsave-dialog"],[2,"background-color","transparent"],[2,"display","flex","width","100%"],["mat-raised-button","","matTooltip","Save selected resources","matTooltipPosition","right",2,"width","85px",3,"click","disabled"],[2,"flex","1 1 auto","text-align","center"],[2,"text-align","right"],["mat-icon-button","",3,"click"],["mode","indeterminate"],["mat-dialog-content","",2,"padding","2px"],[1,"card-group"],[3,"opened","closed","expanded"],[1,"panel-header"],[1,"icon-waypoint"],[1,"panel-description"],["matTooltip","Select all Waypoints","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],[1,"list-container-scrollable"],[1,"item-row"],[1,"name"],[1,"check"],["matTooltip","Select Waypoint","matTooltipPosition","below",3,"change","checked"],[1,"icon-route"],["matTooltip","Select all Routes","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],["matTooltip","Select this Route","matTooltipPosition","below",3,"change","checked"],[1,"icon-track"],["matTooltip","Select all Tracks","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],[1,"track-range"],["matTooltip","Select this Track","matTooltipPosition","below",3,"change","checked"],[1,"track-note"],[1,"track-range-select"],[3,"ngModelChange","ngModel"],["value","displayed"],["value","7d"],["value","30d"],["value","all"],["value","history"],["value","custom"],[1,"track-range-custom"],["matInput","","type","datetime-local",3,"ngModelChange","ngModel"]],template:function(e,t){e&1&&(r(0,"div",3)(1,"mat-toolbar",4)(2,"div",5)(3,"div")(4,"button",6),h("click",function(){return t.save()}),r(5,"mat-icon"),l(6,"save"),s(),l(7,"\xA0Save\xA0 "),s()(),r(8,"div",7),l(9),s(),r(10,"div",8)(11,"button",9),h("click",function(){return t.dialogRef.close(-1)}),r(12,"mat-icon"),l(13,"close"),s()()()()(),f(14,ze,1,0,"mat-progress-bar",10),r(15,"div",11),f(16,Qe,15,4,"div",12),f(17,Je,15,4,"div",12),f(18,rt,16,5,"div",12),s()()),e&2&&(c(4),g("disabled",!t.canSave),c(5),S(" ",t.data.tracksOnly?"Export track to GPX":"Export to GPX"," "),c(5),_(t.fetching?14:-1),c(2),_(t.resData.waypoints.length!==0?16:-1),c(),_(t.resData.routes.length!==0?17:-1),c(),_(t.resData.tracks.length!==0?18:-1))},dependencies:[Te,be,Me,Pe,z,U,Q,q,Z,J,Y,oe,pe,ce,le,me,de,ue,ve,_e,ye,Ce,ke,se,re,we,fe,xe,ge,he,ne,te,ie,ae],styles:[".gpxsave-dialog[_ngcontent-%COMP%]{font-family:roboto;position:relative}.dialog-content[_ngcontent-%COMP%]{position:relative;min-height:300px;max-height:400px;width:100%;min-width:240px;overflow-y:auto}.dialog-icon[_ngcontent-%COMP%]{display:none}.card-group[_ngcontent-%COMP%]{padding:5px 5%}.card-group[_ngcontent-%COMP%] .panel-header[_ngcontent-%COMP%]{padding:0 5px}.card-group[_ngcontent-%COMP%] .panel-description[_ngcontent-%COMP%]{text-align:right;width:100%;padding-right:10px}.card-group-title[_ngcontent-%COMP%]{font-weight:700;font-size:10pt;font-family:Arial,Helvetica,sans-serif;padding:10px 0}button[_ngcontent-%COMP%]{min-width:unset;padding:unset}.item-row[_ngcontent-%COMP%]{display:flex;width:100%;padding:2px 0}.item-row[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{flex:1 1 auto;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;text-overflow:ellipsis;line-height:2.5em}.item-row[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{text-align:right;padding-right:15px}.track-note[_ngcontent-%COMP%]{font-size:.85em;opacity:.8;padding:0 15px 4px 30px}.track-range[_ngcontent-%COMP%]{padding:8px 5px 0}.track-range-select[_ngcontent-%COMP%]{width:100%}.track-range-custom[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:0 8px}.track-range-custom[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex:1 1 220px}@media only screen and (min-width:475px){button[_ngcontent-%COMP%]{min-width:inherit;padding:inherit}.dialog-content[_ngcontent-%COMP%]{min-width:400px}.dialog-icon[_ngcontent-%COMP%]{display:inline}}@media only screen and (min-width:800px){.card-group[_ngcontent-%COMP%]{padding:5px 5%}}"]})};export{Le as GPXExportDialog,X as fromLocalInput,$e as toLocalInput};
@@ -1 +1 @@
1
- import{Xa as a}from"./chunk-F4EUFUYM.js";import"./chunk-ISXARX6U.js";import"./chunk-62WHV6CJ.js";import"./chunk-MYBGWSLC.js";import"./chunk-6E2BDKCH.js";import"./chunk-45ZTFAA5.js";import"./chunk-X6D4D6EN.js";import"./chunk-PD55PKQG.js";import"./chunk-YZN4NRWW.js";import"./chunk-YSHHABBQ.js";import"./chunk-RG7WQ7O2.js";import"./chunk-NCEQPEJE.js";export{a as GeoJSONImportDialog};
1
+ import{Xa as a}from"./chunk-QZNRNBJP.js";import"./chunk-ISXARX6U.js";import"./chunk-62WHV6CJ.js";import"./chunk-MYBGWSLC.js";import"./chunk-6E2BDKCH.js";import"./chunk-45ZTFAA5.js";import"./chunk-X6D4D6EN.js";import"./chunk-PD55PKQG.js";import"./chunk-YZN4NRWW.js";import"./chunk-YSHHABBQ.js";import"./chunk-RG7WQ7O2.js";import"./chunk-NCEQPEJE.js";export{a as GeoJSONImportDialog};