@mxtommy/kip 3.2.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.
Files changed (40) hide show
  1. package/package.json +1 -1
  2. package/public/3rdpartylicenses.txt +26 -26
  3. package/public/assets/help-docs/zones.md +59 -9
  4. package/public/chunk-2HWSXOJH.js +7 -0
  5. package/public/chunk-4SES32DD.js +1 -0
  6. package/public/{chunk-R3627Y4G.js → chunk-6UG4Q6L3.js} +1 -1
  7. package/public/{chunk-JZUG3W7P.js → chunk-74Q7ESW3.js} +1 -1
  8. package/public/{chunk-C3SKHG6H.js → chunk-7JU2L4ZQ.js} +1 -1
  9. package/public/{chunk-UARC5JSL.js → chunk-BOSMFL6Q.js} +1 -1
  10. package/public/chunk-BX746I2R.js +2 -0
  11. package/public/{chunk-MR7RUNKP.js → chunk-DHPOFP3B.js} +1 -1
  12. package/public/{chunk-WVCNHJ5A.js → chunk-EALAVNM5.js} +1 -1
  13. package/public/{chunk-7TWI6ZJI.js → chunk-FT5BOMBZ.js} +1 -1
  14. package/public/{chunk-WE4P4WBD.js → chunk-GJTSOHIS.js} +1 -1
  15. package/public/{chunk-SHKAX4XV.js → chunk-GSG3ZXVY.js} +1 -1
  16. package/public/chunk-HG6A25MG.js +6 -0
  17. package/public/{chunk-CD375FDG.js → chunk-I6I4BVGS.js} +1 -1
  18. package/public/{chunk-Y7X77HSW.js → chunk-JZ455OYD.js} +14 -14
  19. package/public/{chunk-I4I2PP4V.js → chunk-L52GBBZB.js} +1 -1
  20. package/public/chunk-MDIAFVAX.js +8 -0
  21. package/public/chunk-OHBCNLIU.js +1 -0
  22. package/public/{chunk-OTD7HT32.js → chunk-PZFXKRRN.js} +1 -1
  23. package/public/chunk-R4UCKYVW.js +2 -0
  24. package/public/{chunk-2QUOTZ6A.js → chunk-RRAVS5O5.js} +1 -1
  25. package/public/{chunk-QMIJ5LO6.js → chunk-SD22YSTB.js} +1 -1
  26. package/public/{chunk-MNZECCLZ.js → chunk-U7Y5P5XP.js} +6 -6
  27. package/public/{chunk-JSBINEAH.js → chunk-UNIQOPO4.js} +1 -1
  28. package/public/chunk-UXHQY4AJ.js +3 -0
  29. package/public/{chunk-36TH3DJS.js → chunk-ZA2YAX23.js} +1 -1
  30. package/public/index.html +1 -1
  31. package/public/main-5V5K76CH.js +234 -0
  32. package/public/chunk-6QHCHGTT.js +0 -3
  33. package/public/chunk-AB7BX4CL.js +0 -2
  34. package/public/chunk-ACMPUT6Z.js +0 -6
  35. package/public/chunk-AYIHSTCC.js +0 -8
  36. package/public/chunk-EAJKXTFC.js +0 -1
  37. package/public/chunk-EQ5CPWIU.js +0 -7
  38. package/public/chunk-EQAHQINY.js +0 -1
  39. package/public/chunk-IHDZ7I6J.js +0 -2
  40. package/public/main-QTKHCBQH.js +0 -234
@@ -0,0 +1,8 @@
1
+ import{a as Co,b as Mo,c as yo}from"./chunk-GSG3ZXVY.js";import{a as tt,b as se}from"./chunk-BX746I2R.js";import{a as et,b as To,c as So,d as xo}from"./chunk-GJTSOHIS.js";import{a as we,b as Lt}from"./chunk-ZA2YAX23.js";import{b as fo,c as go,d as Pt,e as ho,f as U,g as bo,h as _o,i as pt,j as ne,k as Ot}from"./chunk-SD22YSTB.js";import{g as Da,i as Ia,n as Oa,o as V,p as ae,q as uo,u as vo}from"./chunk-UXHQY4AJ.js";import{a as Ja,b as eo,c as to,d as ve,e as Ce,g as ao,h as Me,i as ye,j as Te,k as $e,l as Se}from"./chunk-I6I4BVGS.js";import{a as je}from"./chunk-OHBCNLIU.js";import{a as po}from"./chunk-FT5BOMBZ.js";import{C as R,D as Ft,a as De,d as Ga,e as Ea,f as ka,g as St,h as $t,i as xt,k as Fa,q as Pa,s as O,t as It,u as Qe,w as mo,y as L,z as Je}from"./chunk-2HWSXOJH.js";import{$a as Be,$b as Q,$c as D,$e as E,Aa as la,Ae as oe,Bb as ua,Cc as te,Ce as Ha,Da as Ne,Dc as r,E as oa,Ea as C,Ec as w,Fa as M,Fc as J,Gc as Mt,Ge as Ka,H as Ht,Hb as v,He as $a,Ib as ge,Ic as Ma,J as Oe,Jb as lt,Jc as ya,K as pe,Kb as fa,Kc as Ta,La as sa,Lb as ga,N as ia,Nb as _,Nd as La,O as bt,Oa as Z,Oc as dt,Od as Va,Oe as Ya,Pa as ca,Pc as yt,Pe as Za,Q as Le,Qd as Na,Ra as fe,Rc as We,Re as Xa,Sa as f,Sc as qe,T as na,Ta as rt,Ue as Ke,Va as X,Vd as Ba,Xc as ze,Xd as Ra,Xe as Qa,Yb as le,Ye as Et,Zb as d,Ze as N,_b as Ct,_d as wt,a as me,ac as Kt,b as Fe,bc as ha,cf as I,dc as y,dd as Sa,df as j,eb as da,ec as G,ef as oo,f as gt,fa as Ve,fc as ba,fe as mt,ff as io,g as ht,ga as _t,gc as T,ge as He,gf as no,hc as S,he as Ua,hf as ro,ia as ra,ic as n,if as H,j as zt,jc as i,je as Yt,jf as lo,kc as g,ke as At,kf as kt,lc as _a,lf as xe,m as it,mc as va,me as Gt,mf as ie,na as vt,nc as Ca,ne as q,nf as K,o as nt,oa as ee,oc as x,of as so,pa as ue,pf as co,qc as b,qf as Ye,ra as Y,rc as u,rd as xa,rf as Dt,sc as Re,sd as wa,sf as Ze,t as jt,tc as Ue,td as Aa,te as Wa,tf as F,ua as p,ub as s,uc as ke,ue as qa,vc as st,vd as Tt,ve as z,vf as Xe,wb as ma,wc as ct,we as za,wf as B,xc as he,xe as _e,xf as P,yb as pa,yc as be,z as Pe,ze as ja}from"./chunk-JZ455OYD.js";var yr=(()=>{class o{_settings=p(St);_router=p(Ia);dashboards=X([],{equal:$t});activeDashboard=X(0);_widgetAction=new nt(null);widgetAction$=this._widgetAction.asObservable();_isDashboardStatic=new nt(!0);isDashboardStatic$=this._isDashboardStatic.asObservable();isDashboardStatic=Fa(this.isDashboardStatic$);blankDashboard=[{id:null,name:"Dashboard 1",configuration:[{w:12,h:12,id:"d1d58e6f-f8b4-4a72-9597-7f92aa6776fc",selector:"widget-tutorial",input:{widgetProperties:{type:"widget-tutorial",uuid:"d1d58e6f-f8b4-4a72-9597-7f92aa6776fc"}},x:0,y:0}]}];constructor(){let e=this._settings.getDashboardConfig();if(!e||e.length===0){console.warn("[Dashboard Service] No dashboards found in settings, creating blank dashboard");let t=this.blankDashboard.map(a=>Fe(me({},a),{id:De.create()}));this.dashboards.set([...t])}else this.dashboards.set(this._settings.getDashboardConfig());Sa(()=>{this._settings.saveDashboards(this.dashboards())})}toggleStaticDashboard(){this._isDashboardStatic.next(!this._isDashboardStatic.value)}add(e,t){this.dashboards.update(a=>[...a,{id:De.create(),name:e,configuration:t}])}update(e,t){this.dashboards.update(a=>a.map((l,m)=>m===e?Fe(me({},l),{name:t}):l))}delete(e){this.dashboards.update(t=>t.filter((a,l)=>l!==e)),this.dashboards().length===0?(this.add("Dashboard "+(this.dashboards().length+1),[]),this.activeDashboard.set(0)):this.activeDashboard()>this.dashboards().length-1&&this.activeDashboard.set(this.dashboards().length-1)}duplicate(e,t){if(e<0||e>=this.dashboards().length){console.error(`[Dashboard Service] Invalid itemIndex: ${e}`);return}let a=this.dashboards()[e],l=xt(a);l.id=De.create(),l.name=t,Array.isArray(l.configuration)?l.configuration.forEach(m=>{m&&m.input?.widgetProperties?(m.id=De.create(),m.input.widgetProperties.uuid=m.id):console.error("Dashboard Service] Widget configuration is missing required properties:",m)}):(console.error("Dashboard Service] Dashboard configuration is not an array:",l.configuration),l.configuration=[]),this.dashboards.update(m=>[...m,l])}updateConfiguration(e,t){this.dashboards.update(a=>a.map((l,m)=>m===e?$t(l.configuration,t)?l:Fe(me({},l),{configuration:t}):l))}previousDashboard(){this.activeDashboard()+1>this.dashboards().length-1?this.activeDashboard.set(0):this.activeDashboard.set(this.activeDashboard()+1)}nextDashboard(){this.activeDashboard()-1<0?this.activeDashboard.set(this.dashboards().length-1):this.activeDashboard.set(this.activeDashboard()-1)}navigateToActive(){this._router.navigate(["/dashboard",this.activeDashboard()])}navigateTo(e){e<0||e>this.dashboards().length-1||this._router.navigate(["/dashboard",e])}deleteWidget(e){this._widgetAction.next({id:e,operation:"delete"})}duplicateWidget(e){this._widgetAction.next({id:e,operation:"duplicate"})}setStaticDashboard(e){this._isDashboardStatic.next(e)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function ri(o,c){o&1&&Ca(0)}var Ao=(()=>{class o{data=p(Ce);static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["dialog-frame"]],decls:8,vars:3,consts:[[1,"dialogue-header"],["mat-dialog-title",""],["mat-icon-button","",1,"dialog-close-icon",3,"mat-dialog-close"],[1,"dialog-content-padding"],[4,"ngComponentOutlet"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"h6",1),r(2),i(),n(3,"button",2)(4,"mat-icon"),r(5,"close"),i()()(),n(6,"mat-dialog-content",3),_(7,ri,1,0,"ng-container",4),i()),t&2&&(s(2),w(a.data.title),s(),d("mat-dialog-close",!1),s(4),d("ngComponentOutlet",a.data.componentType))},dependencies:[V,Se,Me,ye,Te,oe,z,xa],styles:[".dialogue-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}.dialog-content-padding[_ngcontent-%COMP%]{--mat-dialog-content-padding: 0px 24px 20px 24px}"]})}return o})();function li(o,c){if(o&1&&(n(0,"button",4),r(1),i()),o&2){let e=u();d("mat-dialog-close",!0),s(),w(e.data.confirmBtnText)}}var Go=(()=>{class o{data=p(Ce);static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["dialog-confirmation"]],decls:12,vars:6,consts:[[1,"dialogue-header"],["mat-dialog-title",""],["mat-icon-button","",1,"dialog-close-icon",3,"mat-dialog-close"],["align","end"],["mat-flat-button","",3,"mat-dialog-close"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"h5",1),r(2),i(),n(3,"button",2)(4,"mat-icon"),r(5,"close"),i()()(),n(6,"mat-dialog-content"),r(7),i(),n(8,"mat-dialog-actions",3)(9,"button",4),r(10),i(),_(11,li,2,2,"button",4),i()),t&2&&(s(2),w(a.data.title),s(),d("mat-dialog-close",!1),s(4),J(" ",a.data.message,`
2
+ `),s(2),d("mat-dialog-close",!1),s(),w(a.data.cancelBtnText),s(),y(a.data.confirmBtnText?11:-1))},dependencies:[V,Se,Me,ye,$e,Te,oe,_e,z],styles:[".dialogue-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}"]})}return o})();function ci(o,c){if(o&1&&(n(0,"button",9),r(1),i()),o&2){let e=u(),t=te(1);d("disabled",!t.valid),s(),w(e.data.confirmBtnText)}}var ko=(()=>{class o{dialogRef=p(ve);data=p(Ce);saveName(){this.dialogRef.close(this.data)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["dialog-name"]],decls:19,vars:6,consts:[["name","ngForm"],["name","name",3,"ngSubmit"],[1,"dialogue-header"],["mat-dialog-title",""],["mat-icon-button","",1,"dialog-close-icon",3,"mat-dialog-close"],[1,"field-margin"],["matInput","","type","text","id","name","placeholder","Name","name","name","required","","cdkFocusInitial","",3,"ngModelChange","ngModel"],["align","end"],["mat-flat-button","",3,"mat-dialog-close"],["mat-flat-button","","type","submit",3,"disabled"]],template:function(t,a){if(t&1){let l=x();n(0,"form",1,0),b("ngSubmit",function(){return C(l),M(a.saveName())}),n(2,"div",2)(3,"h5",3),r(4),i(),n(5,"button",4)(6,"mat-icon"),r(7,"close"),i()()(),n(8,"mat-dialog-content")(9,"mat-form-field",5)(10,"mat-label"),r(11,"Name"),i(),n(12,"input",6),Ta("ngModelChange",function(h){return C(l),ya(a.data.name,h)||(a.data.name=h),M(h)}),i(),n(13,"mat-error"),r(14," A name is required "),i()()(),n(15,"mat-dialog-actions",7)(16,"button",8),r(17),i(),_(18,ci,2,2,"button",9),i()()}t&2&&(s(4),w(a.data.title),s(),d("mat-dialog-close",!1),s(7),Ma("ngModel",a.data.name),s(4),d("mat-dialog-close",!1),s(),w(a.data.cancelBtnText),s(),y(a.data.confirmBtnText?18:-1))},dependencies:[Se,Me,ye,$e,Te,ae,V,Je,L,O,It,Ft,R,oe,_e,z,B,kt,N,I,j,F,lo,no],styles:[".dialogue-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}.field-margin[_ngcontent-%COMP%]{margin-left:15px;margin-bottom:15px}"]})}return o})();function mi(o,c){if(o&1&&(n(0,"mat-option",12),r(1),i()),o&2){let e=c.$implicit;ke("value",e.value),s(),w(e.label)}}function pi(o,c){if(o&1){let e=x();n(0,"button",21),b("click",function(){C(e);let a=u();return M(a.moveCtrlUp())}),n(1,"mat-icon"),r(2,"arrow_drop_up"),i()()}}function ui(o,c){if(o&1){let e=x();n(0,"button",22),b("click",function(){C(e);let a=u();return M(a.moveCtrlDown())}),n(1,"mat-icon"),r(2,"arrow_drop_down"),i()()}}var Do=(()=>{class o{app=p(je);ctrlFormGroup=f.required();controlIndex=f(void 0);arrayLength=f(void 0);deleteCtrl=fe();moveUp=fe();moveDown=fe();colors=[];ngOnInit(){this.colors=this.app.configurableThemeColors}deleteControl(){let e={ctrlIndex:this.controlIndex(),pathID:this.ctrlFormGroup().get("pathID").value};this.deleteCtrl.emit(e)}moveCtrlUp(){this.moveUp.emit(this.controlIndex())}moveCtrlDown(){this.moveDown.emit(this.controlIndex())}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["boolean-control-config"]],inputs:{ctrlFormGroup:[1,"ctrlFormGroup"],controlIndex:[1,"controlIndex"],arrayLength:[1,"arrayLength"]},outputs:{deleteCtrl:"deleteCtrl",moveUp:"moveUp",moveDown:"moveDown"},decls:36,vars:3,consts:[[1,"ctrl-grid","rounded-card","rounded-card-color",3,"formGroup"],[1,"controls","flex-container"],[1,"flex-label"],[1,"full-width"],["matInput","","type","string","placeholder","Enter a display label...","formControlName","ctrlLabel"],[1,"flex-settings"],[1,"settings"],["placeholder","Select Type...","formControlName","type","name","type","required",""],["value","1"],["value","2"],["value","3"],["placeholder","Select Color...","formControlName","color","name","color","required",""],[3,"value"],[1,"flex-full-width"],["formControlName","isNumeric"],[1,"actions"],[1,"flex-actions"],[1,"btn-grid"],["mat-icon-button","","type","button","aria-label","Move control up in the list",1,"up"],["mat-icon-button","","type","button","aria-label","Move control down in the list",1,"down"],["mat-icon-button","","type","button","aria-label","Delete control",1,"delete",3,"click"],["mat-icon-button","","type","button","aria-label","Move control up in the list",1,"up",3,"click"],["mat-icon-button","","type","button","aria-label","Move control down in the list",1,"down",3,"click"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-form-field",3)(4,"mat-label"),r(5,"Label"),i(),g(6,"input",4),i()(),n(7,"div",5)(8,"mat-form-field",6)(9,"mat-label"),r(10,"Type"),i(),n(11,"mat-select",7)(12,"mat-option",8),r(13,"Toggle"),i(),n(14,"mat-option",9),r(15,"Push"),i(),n(16,"mat-option",10),r(17,"Indicator"),i()()()(),n(18,"div",5)(19,"mat-form-field",6)(20,"mat-label"),r(21,"Color"),i(),n(22,"mat-select",11),T(23,mi,2,2,"mat-option",12,G),i()()(),n(25,"div",13)(26,"mat-checkbox",14),r(27," Use numeric path "),i()()(),n(28,"div",15)(29,"div",16)(30,"div",17),_(31,pi,3,0,"button",18)(32,ui,3,0,"button",19),n(33,"button",20),b("click",function(){return a.deleteControl()}),n(34,"mat-icon"),r(35,"delete"),i()()()()()()),t&2&&(d("formGroup",a.ctrlFormGroup()),s(23),S(a.colors),s(8),y(a.controlIndex()!==0?31:-1),s(),y(a.controlIndex()!==a.arrayLength()-1?32:-1))},dependencies:[B,N,I,j,F,P,K,Ye,L,O,R,ne,U,z,Lt,we,ae,V],styles:['.ctrl-grid[_ngcontent-%COMP%]{display:grid;width:auto;height:auto;margin:0 0 10px;grid-template-columns:[col-start] calc(100% - 90px) [col1-end] 80px [col2-end];grid-template-areas:"controls actions";row-gap:0px;column-gap:10px;justify-items:center;align-items:center;justify-content:center;align-content:center;padding-top:20px}.controls[_ngcontent-%COMP%]{grid-area:controls;width:100%}.actions[_ngcontent-%COMP%]{grid-area:actions}.btn-grid[_ngcontent-%COMP%]{display:grid;width:80px;height:80px;margin:0;grid-template-columns:[col-start] 50% [col1-end] 50% [col2-end];grid-template-rows:[row-start] 50% [row1-end] 50% [row2-end];grid-template-areas:"up delete" "down delete";row-gap:0px;column-gap:0px;justify-items:center;align-items:center;justify-content:center;align-content:center}.up[_ngcontent-%COMP%]{grid-area:up}.down[_ngcontent-%COMP%]{grid-area:down}.delete[_ngcontent-%COMP%]{grid-area:delete}.flex-label[_ngcontent-%COMP%]{flex-grow:2;flex-shrink:2}.flex-settings[_ngcontent-%COMP%]{flex-grow:1;flex-shrink:1}.settings[_ngcontent-%COMP%]{min-width:100px}.flex-actions[_ngcontent-%COMP%]{flex-grow:0;flex-shrink:0}.flex-full-width[_ngcontent-%COMP%]{width:100%}']})}return o})();function fi(o,c){if(o&1){let e=x();n(0,"boolean-control-config",4),b("moveUp",function(a){C(e);let l=u();return M(l.moveUp(a))})("moveDown",function(a){C(e);let l=u();return M(l.moveDown(a))})("deleteCtrl",function(a){C(e);let l=u();return M(l.deletePath(a))}),i()}if(o&2){let e=c.$implicit,t=c.$index,a=u();d("ctrlFormGroup",a.getFormGroup(e))("controlIndex",t)("arrayLength",a.arrayLength)}}var Io=(()=>{class o{fb=p(Xe);multiCtrlArray=f.required();addPath=fe();updatePath=fe();delPath=fe();multiFormGroup=null;arrayLength=0;multiCtrlArraySubscription=null;ngOnInit(){this.arrayLength=this.multiCtrlArray().length,this.multiFormGroup=new oo({multiCtrlArray:this.multiCtrlArray()}),this.multiCtrlArraySubscription=this.multiCtrlArray().valueChanges.pipe(bt(350)).subscribe(e=>{this.updatePath.emit(e)})}addCtrlGroup(){let e=De.create();this.multiCtrlArray().push(this.fb.group({ctrlLabel:[null,E.required],type:["1",E.required],pathID:[e],color:["contrast"],isNumeric:[!1],value:[null]})),this.arrayLength=this.multiCtrlArray().length;let t={path:{description:null,path:null,pathID:e,source:"default",pathType:"boolean",supportsPut:!0,isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:null,convertUnitTo:null,sampleTime:500},ctrlType:1};this.addPath.emit(t)}moveUp(e){let t=this.multiCtrlArray().at(e);this.multiCtrlArray().removeAt(e,{emitEvent:!1}),this.multiCtrlArray().insert(e-1,t,{emitEvent:!1})}moveDown(e){let t=this.multiCtrlArray().at(e);this.multiCtrlArray().removeAt(e,{emitEvent:!1}),this.multiCtrlArray().insert(e+1,t,{emitEvent:!1})}deletePath(e){this.delPath.emit(e),this.arrayLength=this.multiCtrlArray().length}getFormGroup(e){return e}ngOnDestroy(){this.multiCtrlArraySubscription?.unsubscribe()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["boolean-multicontrol-options"]],inputs:{multiCtrlArray:[1,"multiCtrlArray"]},outputs:{addPath:"addPath",updatePath:"updatePath",delPath:"delPath"},decls:7,vars:1,consts:[[3,"formGroup"],["formArrayName","multiCtrlArray"],[1,"full-width",3,"ctrlFormGroup","controlIndex","arrayLength"],["type","button","mat-mini-fab","","color","primary","aria-label","Add control down in the list",1,"add-btn",3,"click"],[1,"full-width",3,"moveUp","moveDown","deleteCtrl","ctrlFormGroup","controlIndex","arrayLength"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"div",1),T(2,fi,1,3,"boolean-control-config",2,ba),n(4,"button",3),b("click",function(){return a.addCtrlGroup()}),n(5,"mat-icon"),r(6,"add"),i()()()()),t&2&&(d("formGroup",a.multiFormGroup),s(2),S(a.multiCtrlArray().controls))},dependencies:[B,j,P,K,co,Do,oe,ja,ae,V],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;padding-top:15px;padding-bottom:15px}.add-btn[_ngcontent-%COMP%]{margin-left:calc(50% - 20px)}"]})}return o})();var gi=["*"];var hi=new Y("MAT_CARD_CONFIG"),yl=(()=>{class o{appearance;constructor(){let e=p(hi,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(t,a){t&2&&Q("mat-mdc-card-outlined",a.appearance==="outlined")("mdc-card--outlined",a.appearance==="outlined")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:gi,decls:1,vars:0,template:function(t,a){t&1&&(Re(),Ue(0))},styles:[`.mat-mdc-card{display:flex;flex-direction:column;box-sizing:border-box;position:relative;border-style:solid;border-width:0;background-color:var(--mdc-elevated-card-container-color, var(--mat-sys-surface-container-low));border-color:var(--mdc-elevated-card-container-color, var(--mat-sys-surface-container-low));border-radius:var(--mdc-elevated-card-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mdc-elevated-card-container-elevation, var(--mat-sys-level1))}.mat-mdc-card::after{position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px rgba(0,0,0,0);content:"";display:block;pointer-events:none;box-sizing:border-box;border-radius:var(--mdc-elevated-card-container-shape, var(--mat-sys-corner-medium))}.mat-mdc-card-outlined{background-color:var(--mdc-outlined-card-container-color, var(--mat-sys-surface));border-radius:var(--mdc-outlined-card-container-shape, var(--mat-sys-corner-medium));border-width:var(--mdc-outlined-card-outline-width, 1px);border-color:var(--mdc-outlined-card-outline-color, var(--mat-sys-outline-variant));box-shadow:var(--mdc-outlined-card-container-elevation, var(--mat-sys-level0))}.mat-mdc-card-outlined::after{border:none}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mat-mdc-card-actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font, var(--mat-sys-title-large-font));line-height:var(--mat-card-title-text-line-height, var(--mat-sys-title-large-line-height));font-size:var(--mat-card-title-text-size, var(--mat-sys-title-large-size));letter-spacing:var(--mat-card-title-text-tracking, var(--mat-sys-title-large-tracking));font-weight:var(--mat-card-title-text-weight, var(--mat-sys-title-large-weight))}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color, var(--mat-sys-on-surface));font-family:var(--mat-card-subtitle-text-font, var(--mat-sys-title-medium-font));line-height:var(--mat-card-subtitle-text-line-height, var(--mat-sys-title-medium-line-height));font-size:var(--mat-card-subtitle-text-size, var(--mat-sys-title-medium-size));letter-spacing:var(--mat-card-subtitle-text-tracking, var(--mat-sys-title-medium-tracking));font-weight:var(--mat-card-subtitle-text-weight, var(--mat-sys-title-medium-weight))}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}
3
+ `],encapsulation:2,changeDetection:0})}return o})();var Fo=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=ge({type:o});static \u0275inj=ue({imports:[q,q]})}return o})();function bi(o,c){if(o&1&&(n(0,"mat-option",8),r(1),i()),o&2){let e=c.$implicit;ke("value",e.value),s(),w(e.label)}}var Oo=(()=>{class o{dsService=p(et);app=p(je);displayName=f.required();showLabel=f.required();convertUnitTo=f.required();datasetUUID=f.required();datasetAverageArray=f.required();showAverageData=f.required();trackAgainstAverage=f.required();showDatasetMinimumValueLine=f.required();showDatasetMaximumValueLine=f.required();showDatasetAverageValueLine=f.required();showDatasetAngleAverageValueLine=f.required();verticalGraph=f.required();showTimeScale=f.required();showYScale=f.required();startScaleAtZero=f.required();yScaleSuggestedMin=f.required();yScaleSuggestedMax=f.required();enableMinMaxScaleLimit=f.required();yScaleMin=f.required();yScaleMax=f.required();numDecimal=f.required();color=f.required();colors=[];ngOnInit(){this.colors=this.app.configurableThemeColors,this.showAverageData().value||this.trackAgainstAverage().disable(),this.setValueScaleOptionsControls(this.enableMinMaxScaleLimit().value)}setValueScaleOptionsControls(e){e?(this.yScaleMin()?.enable(),this.yScaleMax()?.enable(),this.yScaleSuggestedMin()?.disable(),this.yScaleSuggestedMax()?.disable()):(this.yScaleMin()?.disable(),this.yScaleMax()?.disable(),this.yScaleSuggestedMin()?.enable(),this.yScaleSuggestedMax()?.enable())}setScaleControls(e){this.setValueScaleOptionsControls(e.value)}enableTrackAgainstMovingAverage(e){e.checked?this.trackAgainstAverage().enable():(this.trackAgainstAverage().setValue(e.checked),this.trackAgainstAverage().disable())}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["config-display-chart-options"]],inputs:{displayName:[1,"displayName"],showLabel:[1,"showLabel"],convertUnitTo:[1,"convertUnitTo"],datasetUUID:[1,"datasetUUID"],datasetAverageArray:[1,"datasetAverageArray"],showAverageData:[1,"showAverageData"],trackAgainstAverage:[1,"trackAgainstAverage"],showDatasetMinimumValueLine:[1,"showDatasetMinimumValueLine"],showDatasetMaximumValueLine:[1,"showDatasetMaximumValueLine"],showDatasetAverageValueLine:[1,"showDatasetAverageValueLine"],showDatasetAngleAverageValueLine:[1,"showDatasetAngleAverageValueLine"],verticalGraph:[1,"verticalGraph"],showTimeScale:[1,"showTimeScale"],showYScale:[1,"showYScale"],startScaleAtZero:[1,"startScaleAtZero"],yScaleSuggestedMin:[1,"yScaleSuggestedMin"],yScaleSuggestedMax:[1,"yScaleSuggestedMax"],enableMinMaxScaleLimit:[1,"enableMinMaxScaleLimit"],yScaleMin:[1,"yScaleMin"],yScaleMax:[1,"yScaleMax"],numDecimal:[1,"numDecimal"],color:[1,"color"]},decls:80,vars:18,consts:[["minLine",""],[1,"tab-content"],[1,"chart-flex-container"],[1,"chart-panel-group"],[1,"full-width"],["matInput","","placeholder","Enter a label to display","name","displayName",3,"formControl"],["name","showLabel",1,"full-width",3,"formControl"],["placeholder","Select Color...","name","color","required","",3,"formControl"],[3,"value"],[1,"flex-item-rounded-card","rounded-card-color"],[2,"margin-left","10px"],["matInput","","type","number","min","0","max","5","placeholder","Enter or select number...","name","numDecimal","required","",3,"formControl"],["name","showAverageData",1,"full-width",2,"margin-top","10px",3,"change","formControl"],["name","trackAgainstAverage",1,"full-width",2,"margin-left","25px",3,"formControl"],[1,"no-margin"],[1,"mat-caption"],["aria-label","Select an option","name","enableMinMaxScaleLimit",1,"chart-option-radio-group",3,"formControl"],[1,"chart-option-radio-button",3,"change","value"],[1,"chart-option-radio-button-config"],[1,"chart-option-radio-button-config-form-field"],["matInput","","type","number","name","yScaleSuggestedMin",3,"formControl"],["matInput","","type","number","name","yScaleSuggestedMax",3,"formControl"],[1,"chart-option-radio-button-config-item"],["matInput","","type","number","name","yScaleMin","required","",3,"formControl"],["matInput","","type","number","name","yScaleMax","required","",3,"formControl"],["name","showYScale",1,"full-width",3,"formControl"],["name","showTimeScale",1,"full-width",3,"formControl"],["name","showDatasetMaximumValueLine",1,"full-width",3,"formControl"],["name","showDatasetAverageValueLine",1,"full-width",3,"formControl"],["name","showDatasetMinimumValueLine",1,"full-width",3,"formControl"]],template:function(t,a){if(t&1){let l=x();n(0,"div",1)(1,"div",2)(2,"div",3)(3,"mat-form-field",4)(4,"mat-label"),r(5,"Widget Label"),i(),g(6,"input",5),i()(),n(7,"div",3)(8,"mat-checkbox",6),r(9," Show Label "),i()()(),n(10,"div",2)(11,"mat-form-field",4)(12,"mat-label"),r(13,"Color"),i(),n(14,"mat-select",7),T(15,bi,2,2,"mat-option",8,G),i()()(),n(17,"div",2)(18,"div",9)(19,"div")(20,"p"),r(21,"Series"),i(),n(22,"mat-form-field",10)(23,"mat-label"),r(24,"Value Decimal Places"),i(),g(25,"input",11),i(),n(26,"mat-checkbox",12),b("change",function(h){return C(l),M(a.enableTrackAgainstMovingAverage(h))}),r(27," Display Moving Average "),i(),n(28,"mat-checkbox",13),r(29," Track Against Moving Average "),i()()(),n(30,"div",9)(31,"div")(32,"p",14),r(33,"Data Scale"),i(),n(34,"span",15),r(35,"(Default node is automatic scale)"),i(),n(36,"mat-radio-group",16)(37,"mat-radio-button",17),b("change",function(h){return C(l),M(a.setScaleControls(h))}),r(38,"Auto Scale"),i(),n(39,"div",18)(40,"mat-form-field",19)(41,"mat-label"),r(42,"Suggested Min"),i(),g(43,"input",20),i(),n(44,"mat-form-field",19)(45,"mat-label"),r(46,"Suggested Max"),i(),g(47,"input",21),i()(),n(48,"mat-radio-button",17),b("change",function(h){return C(l),M(a.setScaleControls(h))}),r(49,"Fixed Scale"),i(),n(50,"div",18)(51,"div",22)(52,"mat-form-field",19)(53,"mat-label"),r(54,"Min"),i(),g(55,"input",23),i()(),n(56,"div",22)(57,"mat-form-field",19)(58,"mat-label"),r(59,"Max"),i(),g(60,"input",24),i()()()(),n(61,"mat-checkbox",25),r(62," Show Scale Ticks "),i()()(),n(63,"div",9)(64,"div")(65,"p",14),r(66,"Time Scale"),i(),n(67,"mat-checkbox",26),r(68," Show Scale Ticks "),i()()(),n(69,"div",9)(70,"div")(71,"p",14),r(72,"Dataset"),i(),n(73,"mat-checkbox",27),r(74," Show Maximum Line "),i(),n(75,"mat-checkbox",28),r(76," Show Average Line "),i(),n(77,"mat-checkbox",29,0),r(79," Show Minimum Line "),i()()()()()}t&2&&(s(6),d("formControl",a.displayName()),s(2),d("formControl",a.showLabel()),s(6),d("formControl",a.color()),s(),S(a.colors),s(10),d("formControl",a.numDecimal()),s(),d("formControl",a.showAverageData()),s(2),d("formControl",a.trackAgainstAverage()),s(8),d("formControl",a.enableMinMaxScaleLimit()),s(),d("value",!1),s(6),d("formControl",a.yScaleSuggestedMin()),s(4),d("formControl",a.yScaleSuggestedMax()),s(),d("value",!0),s(7),d("formControl",a.yScaleMin()),s(5),d("formControl",a.yScaleMax()),s(),d("formControl",a.showYScale()),s(6),d("formControl",a.showTimeScale()),s(6),d("formControl",a.showDatasetMaximumValueLine()),s(2),d("formControl",a.showDatasetAverageValueLine()),s(2),d("formControl",a.showDatasetMinimumValueLine()))},dependencies:[Fo,Je,L,O,Lt,we,Ot,ne,U,pt,Ft,R,xo,To,So,P,N,xe,I,F,Ze,Dt,ie],styles:[".chart-flex-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;margin:15px 0;gap:15px;align-items:stretch}.chart-panel-group[_ngcontent-%COMP%]{min-width:250px;flex-grow:1}.no-margin[_ngcontent-%COMP%]{margin:0}.chart-option-radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:0;align-items:flex-start}.chart-option-radio-button[_ngcontent-%COMP%]{margin:0}.chart-option-radio-button-config[_ngcontent-%COMP%]{margin-left:35px;display:flex;flex-direction:row;flex-wrap:wrap;gap:10px;align-items:flex-start}.chart-option-radio-button-config-item[_ngcontent-%COMP%]{flex-grow:0;flex-shrink:1;min-width:50px}.chart-option-radio-button-config-form-field[_ngcontent-%COMP%]{display:block;max-width:118px}"]})}return o})();var _i=(o,c)=>c.uuid;function vi(o,c){if(o&1&&(n(0,"mat-option",4),r(1),i()),o&2){let e=c.$implicit;d("value",e.uuid),s(),J(" ",e.label," ")}}function Ci(o,c){if(o&1&&(n(0,"mat-option",4),r(1),i()),o&2){let e=c.$implicit;d("value",e.measure),s(),J(" ",e.description," ")}}function Mi(o,c){if(o&1&&(n(0,"mat-optgroup",6),T(1,Ci,2,2,"mat-option",4,G),i()),o&2){let e=c.$implicit;d("label",e.group),s(),S(e.units)}}var Lo=(()=>{class o{datasetService=p(et);units=p(tt);datasetUUID=f.required();convertUnitTo=f.required();availableDataSets=[];unitList={};ngOnInit(){this.availableDataSets=this.datasetService.list().sort();let e=this.datasetUUID();e.value&&this.setPathUnits(e.value)}setPathUnits(e){let t=this.datasetService.getDatasetConfig(e);return e&&t?(this.unitList=this.units.getConversionsForPath(t.path),this.convertUnitTo()?.enable(),!0):(this.unitList=this.units.getConversionsForPath(""),this.convertUnitTo()?.disable(),!1)}datasetChanged(e){this.setPathUnits(e.value)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["config-dataset-chart-options"]],inputs:{datasetUUID:[1,"datasetUUID"],convertUnitTo:[1,"convertUnitTo"]},decls:14,vars:2,consts:[[1,"display-content","tab-content"],[1,"widget-options-grid"],[1,"options-grid-span2"],["placeholder","Select dataset...","name","datasetUUID","required","",3,"selectionChange","formControl"],[3,"value"],["placeholder","Select unit...","name","convertUnitTo","required","",3,"formControl"],[3,"label"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),r(4,"Dataset"),i(),n(5,"mat-select",3),b("selectionChange",function(m){return a.datasetChanged(m)}),T(6,vi,2,2,"mat-option",4,_i),i()(),n(8,"mat-form-field",2)(9,"mat-label"),r(10,"Display Format"),i(),n(11,"mat-select",5),T(12,Mi,3,1,"mat-optgroup",6,G),i()()()()),t&2&&(s(5),d("formControl",a.datasetUUID()),s(),S(a.availableDataSets),s(5),d("formControl",a.convertUnitTo()),s(),S(a.unitList.conversions))},dependencies:[Je,L,O,Ot,ne,U,Pt,P,I,F,ie],styles:[".display-content[_ngcontent-%COMP%]{display:block;height:100%;width:100%;padding-top:15px;padding-bottom:10px}"]})}return o})();var Vo=(()=>{class o{transform(e,t){return Object.keys(e)}static \u0275fac=function(t){return new(t||o)};static \u0275pipe=fa({name:"objectKeys",type:o,pure:!0})}return o})();var Ti=["panel"],Si=["*"];function xi(o,c){if(o&1&&(n(0,"div",1,0),Ue(2),i()),o&2){let e=c.id,t=u();ha(t._classList),Q("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-autocomplete-panel-animations-enabled",!t._animationsDisabled)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),d("id",t.id),le("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(e))}}var Xt=class{source;option;constructor(c,e){this.source=c,this.option=e}},Ro=new Y("mat-autocomplete-default-options",{providedIn:"root",factory:wi});function wi(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1,hasBackdrop:!1}}var Rt=(()=>{class o{_changeDetectorRef=p(ze);_elementRef=p(rt);_defaults=p(Ro);_animationsDisabled=p(Be,{optional:!0})==="NoopAnimations";_activeOptionChanges=ht.EMPTY;_keyManager;showPanel=!1;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=!1;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck()}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple;optionSelected=new Z;opened=new Z;closed=new Z;optionActivated=new Z;set classList(e){this._classList=e,this._elementRef.nativeElement.className=""}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}id=p(mt).getId("mat-autocomplete-");inertGroups;constructor(){let e=p(Na);this.inertGroups=e?.SAFARI||!1,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new Ua(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){let t=new Xt(this,e);this.optionSelected.emit(t)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_skipPredicate(){return!1}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["mat-autocomplete"]],contentQueries:function(t,a,l){if(t&1&&(st(l,U,5),st(l,go,5)),t&2){let m;he(m=be())&&(a.options=m),he(m=be())&&(a.optionGroups=m)}},viewQuery:function(t,a){if(t&1&&(ct(ma,7),ct(Ti,5)),t&2){let l;he(l=be())&&(a.template=l.first),he(l=be())&&(a.panel=l.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",D],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",D],requireSelection:[2,"requireSelection","requireSelection",D],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",D],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",D]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[dt([{provide:fo,useExisting:o}])],ngContentSelectors:Si,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(t,a){t&1&&(Re(),_(0,xi,3,17,"ng-template"))},styles:[`div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-autocomplete-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}@keyframes _mat-autocomplete-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}.mat-autocomplete-panel-animations-enabled{animation:_mat-autocomplete-enter 120ms cubic-bezier(0, 0, 0.2, 1)}mat-autocomplete{display:none}
4
+ `],encapsulation:2,changeDetection:0})}return o})();var Ai={provide:Et,useExisting:vt(()=>ut),multi:!0};var Uo=new Y("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let o=p(Ke);return()=>o.scrollStrategies.reposition()}});function Gi(o){return()=>o.scrollStrategies.reposition()}var Ei={provide:Uo,deps:[Ke],useFactory:Gi},ut=(()=>{class o{_environmentInjector=p(la);_element=p(rt);_overlay=p(Ke);_viewContainerRef=p(ua);_zone=p(ca);_changeDetectorRef=p(ze);_dir=p(Gt,{optional:!0});_formField=p(mo,{optional:!0,host:!0});_viewportRuler=p(Ya);_scrollStrategy=p(Uo);_renderer=p(pa);_defaults=p(Ro,{optional:!0});_overlayRef;_portal;_componentDestroyed=!1;_initialized=new it;_keydownSubscription;_outsideClickSubscription;_cleanupWindowBlur;_previousValue;_valueOnAttach;_valueOnLastKeydown;_positionStrategy;_manuallyFloatingLabel=!1;_closingActionsSubscription;_viewportSubscription=ht.EMPTY;_breakpointObserver=p(wt);_handsetLandscapeSubscription=ht.EMPTY;_canOpenOnNextFocus=!0;_valueBeforeAutoSelection;_pendingAutoselectedOption;_closeKeyEventStream=new it;_windowBlurHandler=()=>{this._canOpenOnNextFocus=this.panelOpen||!this._hasFocus()};_onChange=()=>{};_onTouched=()=>{};autocomplete;position="auto";connectedTo;autocompleteAttribute="off";autocompleteDisabled;constructor(){}_aboveClass="mat-mdc-autocomplete-panel-above";ngAfterViewInit(){this._initialized.next(),this._initialized.complete(),this._cleanupWindowBlur=this._renderer.listen("window","blur",this._windowBlurHandler)}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){this._cleanupWindowBlur?.(),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}_overlayAttached=!1;openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&At(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Oe(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(pe(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(pe(()=>this._overlayAttached)):jt()).pipe(Pe(e=>e instanceof ho?e:null))}optionSelections=oa(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(Ve(e),_t(()=>Oe(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe(_t(()=>this.optionSelections))});get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return new zt(e=>{let t=l=>{let m=Va(l),h=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,k=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;this._overlayAttached&&m!==this._element.nativeElement&&!this._hasFocus()&&(!h||!h.contains(m))&&(!k||!k.contains(m))&&this._overlayRef&&!this._overlayRef.overlayElement.contains(m)&&e.next(l)},a=[this._renderer.listen("document","click",t),this._renderer.listen("document","auxclick",t),this._renderer.listen("document","touchend",t)];return()=>{a.forEach(l=>l())}})}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){let t=e.keyCode,a=He(e);if(t===27&&!a&&e.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&t===13&&this.panelOpen&&!a)this.activeOption._selectViaInteraction(),this._resetActiveItem(),e.preventDefault();else if(this.autocomplete){let l=this.autocomplete._keyManager.activeItem,m=t===38||t===40;t===9||m&&!a&&this.panelOpen?this.autocomplete._keyManager.onKeydown(e):m&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(m||this.autocomplete._keyManager.activeItem!==l)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let t=e.target,a=t.value;if(t.type==="number"&&(a=a==""?null:parseFloat(a)),this._previousValue!==a){if(this._previousValue=a,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(a),!a)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let l=this.autocomplete.options?.find(m=>m.selected);if(l){let m=this._getDisplayValue(l.value);a!==m&&l.deselect(!1)}}if(this._canOpen()&&this._hasFocus()){let l=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(l)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_hasFocus(){return La()===this._element.nativeElement}_floatLabel(e=!1){this._formField&&this._formField.floatLabel==="auto"&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let e=new zt(a=>{da(()=>{a.next()},{injector:this._environmentInjector})}),t=this.autocomplete.options?.changes.pipe(ra(()=>this._positionStrategy.reapplyLastPosition()),na(0))??jt();return Oe(e,t).pipe(_t(()=>this._zone.run(()=>{let a=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),a!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),Le(1)).subscribe(a=>this._setValueAndClose(a))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let t=this.autocomplete;return t&&t.displayWith?t.displayWith(e):e}_assignOptionValue(e){let t=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(t??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let t=this.autocomplete,a=e?e.source:this._pendingAutoselectedOption;a?(this._clearPreviousSelectedOption(a),this._assignOptionValue(a.value),this._onChange(a.value),t._emitSelectEvent(a),this._element.nativeElement.focus()):t.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,t){this.autocomplete?.options?.forEach(a=>{a!==e&&a.selected&&a.deselect(t)})}_openPanelInternal(e=this._element.nativeElement.value){if(this._attachOverlay(e),this._floatLabel(),this._trackedModal){let t=this.autocomplete.id;Yt(this._trackedModal,"aria-owns",t)}}_attachOverlay(e){this.autocomplete;let t=this._overlayRef;t?(this._positionStrategy.setOrigin(this._getConnectedElement()),t.updateSize({width:this._getPanelWidth()})):(this._portal=new Ha(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),t=this._overlay.create(this._getOverlayConfig()),this._overlayRef=t,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&t&&t.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(se.HandsetLandscape).subscribe(l=>{l.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),t&&!t.hasAttached()&&(t.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let a=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&a!==this.panelOpen&&this._emitOpened()}_handlePanelKeydown=e=>{(e.keyCode===27&&!He(e)||e.keyCode===38&&He(e,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),e.stopPropagation(),e.preventDefault())};_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let e=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=e.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=e.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new Xa({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,hasBackdrop:this._defaults?.hasBackdrop,backdropClass:this._defaults?.backdropClass,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){let e=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let t=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],a=this._aboveClass,l=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:a},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:a}],m;this.position==="above"?m=l:this.position==="below"?m=t:m=[...t,...l],e.withPositions(m)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let e=this.autocomplete;if(e.autoActiveFirstOption){let t=-1;for(let a=0;a<e.options.length;a++)if(!e.options.get(a).disabled){t=a;break}e._keyManager.setActiveItem(t)}else e._keyManager.setActiveItem(-1)}_canOpen(){let e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this.autocompleteDisabled}_scrollToOption(e){let t=this.autocomplete,a=bo(e,t.options,t.optionGroups);if(e===0&&a===1)t._setScrollTop(0);else if(t.panel){let l=t.options.toArray()[e];if(l){let m=l._getHostElement(),h=_o(m.offsetTop,m.offsetHeight,t._getScrollTop(),t.panel.nativeElement.offsetHeight);t._setScrollTop(h)}}}_trackedModal=null;_applyModalPanelOwnership(){let e=this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let t=this.autocomplete.id;this._trackedModal&&At(this._trackedModal,"aria-owns",t),Yt(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(this._trackedModal){let e=this.autocomplete.id;At(this._trackedModal,"aria-owns",e),this._trackedModal=null}}static \u0275fac=function(t){return new(t||o)};static \u0275dir=lt({type:o,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(t,a){t&1&&b("focusin",function(){return a._handleFocus()})("blur",function(){return a._onTouched()})("input",function(m){return a._handleInput(m)})("keydown",function(m){return a._handleKeydown(m)})("click",function(){return a._handleClick()}),t&2&&le("autocomplete",a.autocompleteAttribute)("role",a.autocompleteDisabled?null:"combobox")("aria-autocomplete",a.autocompleteDisabled?null:"list")("aria-activedescendant",a.panelOpen&&a.activeOption?a.activeOption.id:null)("aria-expanded",a.autocompleteDisabled?null:a.panelOpen.toString())("aria-controls",a.autocompleteDisabled||!a.panelOpen||a.autocomplete==null?null:a.autocomplete.id)("aria-haspopup",a.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",D]},exportAs:["matAutocompleteTrigger"],features:[dt([Ai]),Ne]})}return o})(),Wo=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=ge({type:o});static \u0275inj=ue({providers:[Ei],imports:[Qa,pt,q,Za,pt,q]})}return o})();var Di=(o,c)=>c.path;function Ii(o,c){o&1&&g(0,"i",21)}function Fi(o,c){o&1&&g(0,"i",22)}function Pi(o,c){if(o&1&&(n(0,"mat-option",15),r(1),i()),o&2){let e=c.$implicit;d("value",e),s(),Mt("",e.properties.quantity,": ",e.properties.display,"")}}function Oi(o,c){if(o&1){let e=x();n(0,"div",5)(1,"mat-form-field",20)(2,"mat-label"),_(3,Ii,1,0,"i",21)(4,Fi,1,0,"i",22),r(5," Filter"),i(),n(6,"mat-select",23,2),b("selectionChange",function(){C(e),u();let a=te(10),l=u();return M(l.pathFormGroup.controls.path.setValue(a.value))}),n(8,"mat-option"),r(9,"All"),i(),T(10,Pi,2,3,"mat-option",15,G),i()()()}if(o&2){let e=te(7),t=u(2);s(3),y(e.value?4:3),s(3),d("formControl",t.pathSkUnitsFilterControl),s(4),S(t.pathSkUnitsFiltersList)}}function Li(o,c){if(o&1){let e=x();n(0,"button",24),b("click",function(){C(e);let a=u(2);return M(a.pathFormGroup.controls.path.setValue(""))}),n(1,"mat-icon"),r(2,"close"),i()()}}function Vi(o,c){o&1&&(n(0,"mat-error"),r(1," Path is required. Please enter a valid Signal K path. "),i())}function Ni(o,c){o&1&&(n(0,"mat-error"),r(1," Path not recognized. Please enter a path from the server's published list. "),i())}function Bi(o,c){if(o&1&&(n(0,"span"),r(1),i(),g(2,"br"),n(3,"small",25),r(4),i()),o&2){let e=u().$implicit;s(),w(e.path),s(3),w(e.meta.description)}}function Ri(o,c){if(o&1&&r(0),o&2){let e=u().$implicit;J(" ",e.path," ")}}function Ui(o,c){if(o&1&&(n(0,"mat-option",10),_(1,Bi,5,2)(2,Ri,1,1),i()),o&2){let e=c.$implicit;d("value",e.path),s(),y(e.meta!=null?1:2)}}function Wi(o,c){if(o&1&&(n(0,"mat-option",15),r(1),i()),o&2){let e=c.$implicit;d("value",e),s(),J(" ",e," ")}}function qi(o,c){if(o&1&&(n(0,"mat-option",15),r(1),i()),o&2){let e=c.$implicit;d("value",e.measure),s(),J(" ",e.description," ")}}function zi(o,c){if(o&1&&(n(0,"mat-optgroup",27),T(1,qi,2,2,"mat-option",15,G),i()),o&2){let e=c.$implicit;d("label",e.group),s(),S(e.units)}}function ji(o,c){if(o&1&&(n(0,"mat-form-field",19)(1,"mat-label"),r(2,"Display Format"),i(),n(3,"mat-select",26),T(4,zi,3,1,"mat-optgroup",27,G),i()()),o&2){let e=u(2);s(4),S(e.unitList.conversions)}}function Hi(o,c){if(o&1&&(n(0,"div",3)(1,"div",4)(2,"span"),r(3),i()(),_(4,Oi,12,2,"div",5),n(5,"div",6)(6,"mat-form-field",7)(7,"mat-label"),r(8,"Signal K Path"),i(),g(9,"input",8,0),_(11,Li,3,0,"button",9)(12,Vi,2,0,"mat-error")(13,Ni,2,0,"mat-error"),n(14,"mat-autocomplete",null,1),T(16,Ui,3,2,"mat-option",10,Di),We(18,"async"),i()()(),n(19,"div",11)(20,"div",12)(21,"mat-form-field",13)(22,"mat-label"),r(23,"Data Source"),i(),n(24,"mat-select",14),T(25,Wi,2,2,"mat-option",15,G),i()()(),n(27,"div",16)(28,"mat-form-field",13)(29,"mat-label"),r(30,"Sample Time"),i(),g(31,"input",17),i()(),n(32,"div",18),_(33,ji,6,0,"mat-form-field",19),i()()()),o&2){let e=te(15),t=u();d("formGroup",t.pathFormGroup),s(2),Ct("color",t.pathFormGroup.enabled?"":"rgba(255,255,255,0.5)"),s(),w(t.pathFormGroup.value.description),s(),y(t.pathFormGroup.value.pathType=="number"&&t.showPathSkUnitsFilter?4:-1),s(5),d("matAutocomplete",e),s(2),y(t.pathFormGroup.value.path?11:-1),s(),y(t.pathFormGroup.controls.path.errors!=null&&t.pathFormGroup.controls.path.errors.required?12:t.pathFormGroup.controls.path.errors!=null&&t.pathFormGroup.controls.path.errors.requireMatch?13:-1),s(4),S(qe(18,9,t.filteredPaths)),s(9),S(t.availableSources),s(8),y(t.pathFormGroup.value.pathType=="number"&&t.pathFormGroup.value.isConvertUnitToConfigurable===void 0||t.pathFormGroup.value.pathType=="number"&&t.pathFormGroup.value.isConvertUnitToConfigurable===!0?33:-1)}}function Ki(o){return c=>o().some(a=>a.path===c.value)?null:{requireMatch:!0}}var qo=(()=>{class o{_data=p(Pa);_units=p(tt);_connection=p(Ga);pathFormGroup;multiCTRLArray=f.required();filterSelfPaths=f.required();availablePaths;filteredPaths=new nt(null);_pathValueChange$=null;_pathFormGroup$=null;availableSources;unitList={base:"",conversions:[]};showPathSkUnitsFilter=!1;pathSkUnitsFilterControl=new ro(null);pathSkUnitsFiltersList;unitlessUnit={unit:"unitless",properties:{display:"(null)",quantity:"Unitless",quantityDisplay:"(null)",description:""}};ngOnInit(){this.pathSkUnitsFiltersList=this._units.skBaseUnits.sort((e,t)=>e.properties.quantity>t.properties.quantity?1:-1),this.pathSkUnitsFiltersList.unshift(this.unitlessUnit),this.pathFormGroup.value.pathSkUnitsFilter&&this.pathSkUnitsFilterControl.setValue(this.pathSkUnitsFiltersList.find(e=>e.unit===this.pathFormGroup.value.pathSkUnitsFilter),{onlySelf:!0}),this.pathFormGroup.value.showPathSkUnitsFilter&&(this.showPathSkUnitsFilter=this.pathFormGroup.value.showPathSkUnitsFilter),this.pathFormGroup.controls.path.setValidators([E.required,Ki(()=>this.getPaths())]),this.pathFormGroup.controls.path.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this.pathFormGroup.controls.path.valid?this.enableFormFields(!1):this.disablePathFields(),this.pathFormGroup.controls.sampleTime||(this.pathFormGroup.addControl("sampleTime",new H("500",E.required)),this.pathFormGroup.controls.sampleTime.updateValueAndValidity({onlySelf:!0,emitEvent:!1})),this._pathValueChange$=this.pathFormGroup.controls.path.valueChanges.pipe(ia(e=>e===""?Ht(0):Ht(350)),Ve(""),Pe(e=>this.filterPaths(e||""))).subscribe(e=>{this.pathFormGroup.controls.path.pristine||(this.pathFormGroup.controls.path.valid?(this.enableFormFields(!0),this.updatePathMetaBoundDisplayName(this.pathFormGroup.controls.path.value),this.updatePathMetaBoundDisplayScale(this.pathFormGroup.controls.path.value)):this.disablePathFields())}),this._pathFormGroup$=this.pathFormGroup.controls.pathType.valueChanges.subscribe(e=>{this.pathFormGroup.value.showPathSkUnitsFilter?this.pathSkUnitsFilterControl.setValue(this.unitlessUnit):this.pathSkUnitsFilterControl.setValue(null),this.pathFormGroup.controls.path.updateValueAndValidity()})}ngOnChanges(e){e.filterSelfPaths&&!e.filterSelfPaths.firstChange&&this.pathFormGroup.controls.path.updateValueAndValidity()}getPaths(){let e=this.pathFormGroup.controls.pathType.value,t=this.filterSelfPaths(),a=!1;if(this.pathFormGroup.value.supportsPut){let l=!1;this.multiCTRLArray().length>0&&(l=this.multiCTRLArray().some(m=>m.pathID===this.pathFormGroup.value.pathID&&m.type==="3")),l?a=!1:a=Ea(this._connection.skServerVersion,"2.12.0",">=")?this.pathFormGroup.value.supportsPut:!1}return this._data.getPathsAndMetaByType(e,a,t).sort()}filterPaths(e){let t=e.toLowerCase(),a=this.getPaths();if(this.pathSkUnitsFilterControl.value){let l=this.pathSkUnitsFilterControl.value.unit;a=a.filter(m=>{let h=!!m.meta&&!!m.meta.units,k=l==="unitless";return h&&m.meta.units===l||!h&&k})}a=a.filter(l=>l.path.toLowerCase().includes(t)),this.filteredPaths.next(a)}enableFormFields(e){let t=this._data.getPathObject(this.pathFormGroup.controls.path.value);t!=null?(this.pathFormGroup.controls.sampleTime.enable({onlySelf:!1}),this.pathFormGroup.controls.pathType.value=="number"&&(this.unitList=this._units.getConversionsForPath(this.pathFormGroup.controls.path.value),e&&this.pathFormGroup.controls.convertUnitTo.setValue(this.unitList.base,{onlySelf:!0}),this.pathFormGroup.controls.convertUnitTo.enable({onlySelf:!1})),Object.keys(t.sources).length==1?(this.availableSources=["default"],e?this.pathFormGroup.controls.source.value!="default"&&this.pathFormGroup.controls.source.setValue("default",{onlySelf:!0}):this.pathFormGroup.controls.source.value!="default"&&this.pathFormGroup.controls.source.setValue("",{onlySelf:!0})):Object.keys(t.sources).length>1&&(this.availableSources=Object.keys(t.sources),this.pathFormGroup.controls.source.value=="default"&&this.pathFormGroup.controls.source.reset()),this.pathFormGroup.controls.source.enable({onlySelf:!1})):this.disablePathFields()}disablePathFields(){this.pathFormGroup.controls.source.reset("",{onlySelf:!0}),this.pathFormGroup.controls.source.disable({onlySelf:!1}),this.pathFormGroup.controls.sampleTime.disable({onlySelf:!1}),this.pathFormGroup.controls.pathType.value=="number"&&(this.pathFormGroup.controls.convertUnitTo.reset("",{onlySelf:!0}),this.pathFormGroup.controls.convertUnitTo.disable({onlySelf:!1}))}updatePathMetaBoundDisplayName(e){if(!this.pathFormGroup.parent.parent.value.hasOwnProperty("displayName"))return;let t=this._data.getPathMeta(e);t?.displayName&&this.pathFormGroup.parent.parent.controls.displayName.setValue(t.displayName)}updatePathMetaBoundDisplayScale(e){if(!this.pathFormGroup.parent.parent.value.hasOwnProperty("displayScale"))return;let t=this._data.getPathMeta(e);if(t?.displayScale){let a=this.pathFormGroup.parent.parent.get("displayScale"),l=this.pathFormGroup.controls.convertUnitTo.value;t.displayScale.lower!==null&&t.displayScale.lower!==void 0&&a.controls.lower.setValue(this._units.convertToUnit(l,t.displayScale.lower)),t.displayScale.upper!==null&&t.displayScale.upper!==void 0&&a.controls.upper.setValue(this._units.convertToUnit(l,t.displayScale.upper)),t.displayScale.type!==null&&t.displayScale.type!==void 0&&a.controls.type.setValue(t.displayScale.type),t.displayScale.power!==null&&t.displayScale.power!==void 0&&a.controls.power.setValue(t.displayScale.power)}}ngOnDestroy(){this._pathValueChange$?.unsubscribe(),this._pathFormGroup$?.unsubscribe()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["path-control-config"]],inputs:{pathFormGroup:"pathFormGroup",multiCTRLArray:[1,"multiCTRLArray"],filterSelfPaths:[1,"filterSelfPaths"]},features:[Ne],decls:1,vars:1,consts:[["pathInput",""],["pathAutoComplete","matAutocomplete"],["pathUnitsFilter",""],[1,"flex-container","rounded-card","rounded-card-color",3,"formGroup"],[1,"flex-field-100"],[1,"flex-field-fixed"],[1,"flex-field-to-100"],["floatLabel","auto","appearance","fill",1,"pathField"],["type","text","matInput","","placeholder","Type to use autocomplete or select from list","formControlName","path","required","",3,"matAutocomplete"],["mat-icon-button","","matIconSuffix","","aria-label","Clear"],[2,"min-height","48px","line-height","1.15","height","auto","padding","8px 16px","white-space","normal",3,"value"],[1,"pathProperties"],[1,"sourceField"],["appearance","outline","floatLabel","always",1,"fields"],["placeholder","Select source","formControlName","source","required",""],[3,"value"],[1,"sampleTimeField"],["matInput","","type","number","placeholder","Sample time in milliseconds","formControlName","sampleTime","required",""],[1,"unitField"],[1,"fields"],["floatLabel","auto","appearance","fill",1,"filter-path"],[1,"fa-solid","fa-filter"],[1,"fa-solid","fa-filter-circle-xmark"],["panelWidth","",3,"selectionChange","formControl"],["mat-icon-button","","matIconSuffix","","aria-label","Clear",3,"click"],[1,"pathMetaDescription"],["placeholder","Select unit","formControlName","convertUnitTo","required",""],[3,"label"]],template:function(t,a){t&1&&_(0,Hi,34,11,"div",3),t&2&&y(a.pathFormGroup.value.isPathConfigurable?0:-1)},dependencies:[B,N,xe,I,j,F,P,ie,K,Ye,L,O,R,Wo,Rt,U,Pt,ut,z,Qe,It,ne,Tt,ae,V],styles:[".pathGroup[_ngcontent-%COMP%]{width:100%}.pathGroupFields[_ngcontent-%COMP%]{display:block;width:calc(100% - 5px)}.pathField[_ngcontent-%COMP%]{width:100%}.pathProperties[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:center;align-content:flex-start;gap:10px}.fields[_ngcontent-%COMP%]{width:100%}.sourceField[_ngcontent-%COMP%]{flex:3 1}.sampleTimeField[_ngcontent-%COMP%]{flex:1 3}.unitField[_ngcontent-%COMP%]{flex:3 1}"]})}return o})();function $i(o,c){if(o&1&&g(0,"path-control-config",6),o&2){let e=c.$implicit,t=u(2);d("pathFormGroup",e)("filterSelfPaths",t.filterSelfPaths().value)("multiCTRLArray",t.multiCTRLArray)}}function Yi(o,c){if(o&1&&T(0,$i,1,3,"path-control-config",6,G),o&2){let e=u();S(e.pathsFormGroup.controls)}}function Zi(o,c){if(o&1&&g(0,"path-control-config",6),o&2){let e=c.$implicit,t=u(2);d("pathFormGroup",t.pathsFormGroup.get(e))("filterSelfPaths",t.filterSelfPaths().value)("multiCTRLArray",t.multiCTRLArray)}}function Xi(o,c){if(o&1&&(T(0,Zi,1,3,"path-control-config",6,G),We(2,"objectKeys")),o&2){let e=u();S(qe(2,0,e.pathsFormGroup.controls))}}var zo=(()=>{class o{rootFormGroup=p(K);fb=p(Xe);formGroupName=f.required();isArray=f.required();enableTimeout=f.required();dataTimeout=f.required();filterSelfPaths=f.required();addPathEvent=f(void 0);delPathEvent=f(void 0);updatePathEvent=f(void 0);pathsFormGroup;multiCTRLArray=[];ngOnInit(){this.isArray()?(this.pathsFormGroup=this.rootFormGroup.control.get(this.formGroupName()),this.multiCTRLArray=this.rootFormGroup.control.get("multiChildCtrls").value):this.pathsFormGroup=this.rootFormGroup.control.get(this.formGroupName())}addPath(e){this.pathsFormGroup.push(this.fb.group({description:[e.path.description],path:[e.path.path,E.required],pathID:[e.path.pathID],source:[e.path.source,E.required],pathType:[e.path.pathType],isPathConfigurable:[e.path.isPathConfigurable],showPathSkUnitsFilter:[e.path.showPathSkUnitsFilter],pathSkUnitsFilter:[e.path.pathSkUnitsFilter],convertUnitTo:[e.path.convertUnitTo],sampleTime:[e.path.sampleTime],supportsPut:[e.path.supportsPut]})),this.pathsFormGroup.updateValueAndValidity(),this.multiCTRLArray=this.rootFormGroup.control.get("multiChildCtrls").value}delPath(){this.multiCTRLArray=this.rootFormGroup.control.get("multiChildCtrls").value}updatePath(e){this.multiCTRLArray=e}ngOnChanges(e){e.addPathEvent&&!e.addPathEvent.firstChange&&this.addPath(e.addPathEvent.currentValue),e.delPathEvent&&!e.delPathEvent.firstChange&&this.delPath(),e.updatePathEvent&&!e.updatePathEvent.firstChange&&this.updatePath(e.updatePathEvent.currentValue)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["paths-options"]],inputs:{formGroupName:[1,"formGroupName"],isArray:[1,"isArray"],enableTimeout:[1,"enableTimeout"],dataTimeout:[1,"dataTimeout"],filterSelfPaths:[1,"filterSelfPaths"],addPathEvent:[1,"addPathEvent"],delPathEvent:[1,"delPathEvent"],updatePathEvent:[1,"updatePathEvent"]},features:[Ne],decls:14,vars:5,consts:[[1,"widget-options-grid"],["name","enableTimeout",3,"formControl"],["type","number","matNativeControl","","placeholder","Time in seconds...","name","dataTimeout","min","2","required","",3,"formControl"],["matTextSuffix",""],[3,"formGroup"],["name","filterSelfPaths",3,"formControl"],[2,"display","block",3,"pathFormGroup","filterSelfPaths","multiCTRLArray"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"mat-checkbox",1),r(2," Enable Widget Data TTL "),i(),n(3,"mat-form-field")(4,"mat-label"),r(5,"TTL Timeout For Paths"),i(),g(6,"input",2),n(7,"span",3),r(8,"Seconds"),i()()(),_a(9,4),_(10,Yi,2,0)(11,Xi,3,2),va(),n(12,"mat-checkbox",5),r(13,` Restrict to own vessel
5
+ `),i()),t&2&&(s(),d("formControl",a.enableTimeout()),s(5),d("formControl",a.dataTimeout()),s(3),d("formGroup",a.pathsFormGroup),s(),y(a.isArray()?10:11),s(2),d("formControl",a.filterSelfPaths()))},dependencies:[we,B,N,xe,I,j,F,Ze,P,ie,K,L,O,R,Qe,qo,Vo],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%;padding-top:15px;padding-bottom:5px}"]})}return o})();function Qi(o,c){if(o&1){let e=x();n(0,"button",7),b("click",function(){C(e);let a=u();return M(a.dateTimezone.setValue(""))}),g(1,"span",8),i()}}function Ji(o,c){if(o&1&&(n(0,"mat-option",9),r(1),i()),o&2){let e=c.$implicit;d("value",e.label),s(),Mt(" ",e.offset," - ",e.label," ")}}function en(o){return c=>o.some(t=>t.label===c.value)?null:{requireMatch:!0}}var tn=()=>{let o=Intl.supportedValuesOf("timeZone"),c=new Date;return o.map(e=>({offset:new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"shortOffset"}).formatToParts(c).find(m=>m.type==="timeZoneName")?.value||"",label:e}))},jo=(()=>{class o{dateFormat=f(void 0);dateTimezone;tz=[];filteredTZ;filteredTZSubscription=null;constructor(){}ngOnInit(){typeof Intl.supportedValuesOf<"u"?this.tz=tn().sort((e,t)=>this.compareOffsets(e.offset,t.offset)):(console.log("[Widget Options] Feature not supported. Using static Time Zone list"),this.tz=[{offset:"GMT",label:"Africa/Abidjan"},{offset:"GMT",label:"Africa/Accra"},{offset:"GMT+3",label:"Africa/Addis_Ababa"},{offset:"GMT+1",label:"Africa/Algiers"},{offset:"GMT+3",label:"Africa/Asmera"},{offset:"GMT",label:"Africa/Bamako"},{offset:"GMT+1",label:"Africa/Bangui"},{offset:"GMT",label:"Africa/Banjul"},{offset:"GMT",label:"Africa/Bissau"},{offset:"GMT+2",label:"Africa/Blantyre"},{offset:"GMT+1",label:"Africa/Brazzaville"},{offset:"GMT+2",label:"Africa/Bujumbura"},{offset:"GMT+2",label:"Africa/Cairo"},{offset:"GMT",label:"Africa/Casablanca"},{offset:"GMT+2",label:"Africa/Ceuta"},{offset:"GMT",label:"Africa/Conakry"},{offset:"GMT",label:"Africa/Dakar"},{offset:"GMT+3",label:"Africa/Dar_es_Salaam"},{offset:"GMT+3",label:"Africa/Djibouti"},{offset:"GMT+1",label:"Africa/Douala"},{offset:"GMT",label:"Africa/El_Aaiun"},{offset:"GMT",label:"Africa/Freetown"},{offset:"GMT+2",label:"Africa/Gaborone"},{offset:"GMT+2",label:"Africa/Harare"},{offset:"GMT+2",label:"Africa/Johannesburg"},{offset:"GMT+2",label:"Africa/Juba"},{offset:"GMT+3",label:"Africa/Kampala"},{offset:"GMT+2",label:"Africa/Khartoum"},{offset:"GMT+2",label:"Africa/Kigali"},{offset:"GMT+1",label:"Africa/Kinshasa"},{offset:"GMT+1",label:"Africa/Lagos"},{offset:"GMT+1",label:"Africa/Libreville"},{offset:"GMT",label:"Africa/Lome"},{offset:"GMT+1",label:"Africa/Luanda"},{offset:"GMT+2",label:"Africa/Lubumbashi"},{offset:"GMT+2",label:"Africa/Lusaka"},{offset:"GMT+1",label:"Africa/Malabo"},{offset:"GMT+2",label:"Africa/Maputo"},{offset:"GMT+2",label:"Africa/Maseru"},{offset:"GMT+2",label:"Africa/Mbabane"},{offset:"GMT+3",label:"Africa/Mogadishu"},{offset:"GMT",label:"Africa/Monrovia"},{offset:"GMT+3",label:"Africa/Nairobi"},{offset:"GMT+1",label:"Africa/Ndjamena"},{offset:"GMT+1",label:"Africa/Niamey"},{offset:"GMT",label:"Africa/Nouakchott"},{offset:"GMT",label:"Africa/Ouagadougou"},{offset:"GMT+1",label:"Africa/Porto-Novo"},{offset:"GMT",label:"Africa/Sao_Tome"},{offset:"GMT+2",label:"Africa/Tripoli"},{offset:"GMT+1",label:"Africa/Tunis"},{offset:"GMT+2",label:"Africa/Windhoek"},{offset:"GMT-9",label:"America/Adak"},{offset:"GMT-8",label:"America/Anchorage"},{offset:"GMT-4",label:"America/Anguilla"},{offset:"GMT-4",label:"America/Antigua"},{offset:"GMT-3",label:"America/Araguaina"},{offset:"GMT-3",label:"America/Argentina/La_Rioja"},{offset:"GMT-3",label:"America/Argentina/Rio_Gallegos"},{offset:"GMT-3",label:"America/Argentina/Salta"},{offset:"GMT-3",label:"America/Argentina/San_Juan"},{offset:"GMT-3",label:"America/Argentina/San_Luis"},{offset:"GMT-3",label:"America/Argentina/Tucuman"},{offset:"GMT-3",label:"America/Argentina/Ushuaia"},{offset:"GMT-4",label:"America/Aruba"},{offset:"GMT-3",label:"America/Asuncion"},{offset:"GMT-3",label:"America/Bahia"},{offset:"GMT-6",label:"America/Bahia_Banderas"},{offset:"GMT-4",label:"America/Barbados"},{offset:"GMT-3",label:"America/Belem"},{offset:"GMT-6",label:"America/Belize"},{offset:"GMT-4",label:"America/Blanc-Sablon"},{offset:"GMT-4",label:"America/Boa_Vista"},{offset:"GMT-5",label:"America/Bogota"},{offset:"GMT-6",label:"America/Boise"},{offset:"GMT-3",label:"America/Buenos_Aires"},{offset:"GMT-6",label:"America/Cambridge_Bay"},{offset:"GMT-4",label:"America/Campo_Grande"},{offset:"GMT-5",label:"America/Cancun"},{offset:"GMT-4",label:"America/Caracas"},{offset:"GMT-3",label:"America/Catamarca"},{offset:"GMT-3",label:"America/Cayenne"},{offset:"GMT-5",label:"America/Cayman"},{offset:"GMT-5",label:"America/Chicago"},{offset:"GMT-6",label:"America/Chihuahua"},{offset:"GMT-6",label:"America/Ciudad_Juarez"},{offset:"GMT-5",label:"America/Coral_Harbour"},{offset:"GMT-3",label:"America/Cordoba"},{offset:"GMT-6",label:"America/Costa_Rica"},{offset:"GMT-7",label:"America/Creston"},{offset:"GMT-4",label:"America/Cuiaba"},{offset:"GMT-4",label:"America/Curacao"},{offset:"GMT",label:"America/Danmarkshavn"},{offset:"GMT-7",label:"America/Dawson"},{offset:"GMT-7",label:"America/Dawson_Creek"},{offset:"GMT-6",label:"America/Denver"},{offset:"GMT-4",label:"America/Detroit"},{offset:"GMT-4",label:"America/Dominica"},{offset:"GMT-6",label:"America/Edmonton"},{offset:"GMT-5",label:"America/Eirunepe"},{offset:"GMT-6",label:"America/El_Salvador"},{offset:"GMT-7",label:"America/Fort_Nelson"},{offset:"GMT-3",label:"America/Fortaleza"},{offset:"GMT-3",label:"America/Glace_Bay"},{offset:"GMT-1",label:"America/Godthab"},{offset:"GMT-3",label:"America/Goose_Bay"},{offset:"GMT-4",label:"America/Grand_Turk"},{offset:"GMT-4",label:"America/Grenada"},{offset:"GMT-4",label:"America/Guadeloupe"},{offset:"GMT-6",label:"America/Guatemala"},{offset:"GMT-5",label:"America/Guayaquil"},{offset:"GMT-4",label:"America/Guyana"},{offset:"GMT-3",label:"America/Halifax"},{offset:"GMT-4",label:"America/Havana"},{offset:"GMT-7",label:"America/Hermosillo"},{offset:"GMT-5",label:"America/Indiana/Knox"},{offset:"GMT-4",label:"America/Indiana/Marengo"},{offset:"GMT-4",label:"America/Indiana/Petersburg"},{offset:"GMT-5",label:"America/Indiana/Tell_City"},{offset:"GMT-4",label:"America/Indiana/Vevay"},{offset:"GMT-4",label:"America/Indiana/Vincennes"},{offset:"GMT-4",label:"America/Indiana/Winamac"},{offset:"GMT-4",label:"America/Indianapolis"},{offset:"GMT-6",label:"America/Inuvik"},{offset:"GMT-4",label:"America/Iqaluit"},{offset:"GMT-5",label:"America/Jamaica"},{offset:"GMT-3",label:"America/Jujuy"},{offset:"GMT-8",label:"America/Juneau"},{offset:"GMT-4",label:"America/Kentucky/Monticello"},{offset:"GMT-4",label:"America/Kralendijk"},{offset:"GMT-4",label:"America/La_Paz"},{offset:"GMT-5",label:"America/Lima"},{offset:"GMT-7",label:"America/Los_Angeles"},{offset:"GMT-4",label:"America/Louisville"},{offset:"GMT-4",label:"America/Lower_Princes"},{offset:"GMT-3",label:"America/Maceio"},{offset:"GMT-6",label:"America/Managua"},{offset:"GMT-4",label:"America/Manaus"},{offset:"GMT-4",label:"America/Marigot"},{offset:"GMT-4",label:"America/Martinique"},{offset:"GMT-5",label:"America/Matamoros"},{offset:"GMT-7",label:"America/Mazatlan"},{offset:"GMT-3",label:"America/Mendoza"},{offset:"GMT-5",label:"America/Menominee"},{offset:"GMT-6",label:"America/Merida"},{offset:"GMT-8",label:"America/Metlakatla"},{offset:"GMT-6",label:"America/Mexico_City"},{offset:"GMT-2",label:"America/Miquelon"},{offset:"GMT-3",label:"America/Moncton"},{offset:"GMT-6",label:"America/Monterrey"},{offset:"GMT-3",label:"America/Montevideo"},{offset:"GMT-4",label:"America/Montserrat"},{offset:"GMT-4",label:"America/Nassau"},{offset:"GMT-4",label:"America/New_York"},{offset:"GMT-8",label:"America/Nome"},{offset:"GMT-2",label:"America/Noronha"},{offset:"GMT-5",label:"America/North_Dakota/Beulah"},{offset:"GMT-5",label:"America/North_Dakota/Center"},{offset:"GMT-5",label:"America/North_Dakota/New_Salem"},{offset:"GMT-5",label:"America/Ojinaga"},{offset:"GMT-5",label:"America/Panama"},{offset:"GMT-3",label:"America/Paramaribo"},{offset:"GMT-7",label:"America/Phoenix"},{offset:"GMT-4",label:"America/Port-au-Prince"},{offset:"GMT-4",label:"America/Port_of_Spain"},{offset:"GMT-4",label:"America/Porto_Velho"},{offset:"GMT-4",label:"America/Puerto_Rico"},{offset:"GMT-3",label:"America/Punta_Arenas"},{offset:"GMT-5",label:"America/Rankin_Inlet"},{offset:"GMT-3",label:"America/Recife"},{offset:"GMT-6",label:"America/Regina"},{offset:"GMT-5",label:"America/Resolute"},{offset:"GMT-5",label:"America/Rio_Branco"},{offset:"GMT-3",label:"America/Santarem"},{offset:"GMT-3",label:"America/Santiago"},{offset:"GMT-4",label:"America/Santo_Domingo"},{offset:"GMT-3",label:"America/Sao_Paulo"},{offset:"GMT-1",label:"America/Scoresbysund"},{offset:"GMT-8",label:"America/Sitka"},{offset:"GMT-4",label:"America/St_Barthelemy"},{offset:"GMT-2:30",label:"America/St_Johns"},{offset:"GMT-4",label:"America/St_Kitts"},{offset:"GMT-4",label:"America/St_Lucia"},{offset:"GMT-4",label:"America/St_Thomas"},{offset:"GMT-4",label:"America/St_Vincent"},{offset:"GMT-6",label:"America/Swift_Current"},{offset:"GMT-6",label:"America/Tegucigalpa"},{offset:"GMT-3",label:"America/Thule"},{offset:"GMT-7",label:"America/Tijuana"},{offset:"GMT-4",label:"America/Toronto"},{offset:"GMT-4",label:"America/Tortola"},{offset:"GMT-7",label:"America/Vancouver"},{offset:"GMT-7",label:"America/Whitehorse"},{offset:"GMT-5",label:"America/Winnipeg"},{offset:"GMT-8",label:"America/Yakutat"},{offset:"GMT+8",label:"Antarctica/Casey"},{offset:"GMT+7",label:"Antarctica/Davis"},{offset:"GMT+10",label:"Antarctica/DumontDUrville"},{offset:"GMT+11",label:"Antarctica/Macquarie"},{offset:"GMT+5",label:"Antarctica/Mawson"},{offset:"GMT+13",label:"Antarctica/McMurdo"},{offset:"GMT-3",label:"Antarctica/Palmer"},{offset:"GMT-3",label:"Antarctica/Rothera"},{offset:"GMT+3",label:"Antarctica/Syowa"},{offset:"GMT+2",label:"Antarctica/Troll"},{offset:"GMT+5",label:"Antarctica/Vostok"},{offset:"GMT+2",label:"Arctic/Longyearbyen"},{offset:"GMT+3",label:"Asia/Aden"},{offset:"GMT+5",label:"Asia/Almaty"},{offset:"GMT+3",label:"Asia/Amman"},{offset:"GMT+12",label:"Asia/Anadyr"},{offset:"GMT+5",label:"Asia/Aqtau"},{offset:"GMT+5",label:"Asia/Aqtobe"},{offset:"GMT+5",label:"Asia/Ashgabat"},{offset:"GMT+5",label:"Asia/Atyrau"},{offset:"GMT+3",label:"Asia/Baghdad"},{offset:"GMT+3",label:"Asia/Bahrain"},{offset:"GMT+4",label:"Asia/Baku"},{offset:"GMT+7",label:"Asia/Bangkok"},{offset:"GMT+7",label:"Asia/Barnaul"},{offset:"GMT+3",label:"Asia/Beirut"},{offset:"GMT+6",label:"Asia/Bishkek"},{offset:"GMT+8",label:"Asia/Brunei"},{offset:"GMT+5:30",label:"Asia/Calcutta"},{offset:"GMT+9",label:"Asia/Chita"},{offset:"GMT+5:30",label:"Asia/Colombo"},{offset:"GMT+3",label:"Asia/Damascus"},{offset:"GMT+6",label:"Asia/Dhaka"},{offset:"GMT+9",label:"Asia/Dili"},{offset:"GMT+4",label:"Asia/Dubai"},{offset:"GMT+5",label:"Asia/Dushanbe"},{offset:"GMT+3",label:"Asia/Famagusta"},{offset:"GMT+2",label:"Asia/Gaza"},{offset:"GMT+2",label:"Asia/Hebron"},{offset:"GMT+8",label:"Asia/Hong_Kong"},{offset:"GMT+7",label:"Asia/Hovd"},{offset:"GMT+8",label:"Asia/Irkutsk"},{offset:"GMT+7",label:"Asia/Jakarta"},{offset:"GMT+9",label:"Asia/Jayapura"},{offset:"GMT+3",label:"Asia/Jerusalem"},{offset:"GMT+4:30",label:"Asia/Kabul"},{offset:"GMT+12",label:"Asia/Kamchatka"},{offset:"GMT+5",label:"Asia/Karachi"},{offset:"GMT+5:45",label:"Asia/Katmandu"},{offset:"GMT+9",label:"Asia/Khandyga"},{offset:"GMT+7",label:"Asia/Krasnoyarsk"},{offset:"GMT+8",label:"Asia/Kuala_Lumpur"},{offset:"GMT+8",label:"Asia/Kuching"},{offset:"GMT+3",label:"Asia/Kuwait"},{offset:"GMT+8",label:"Asia/Macau"},{offset:"GMT+11",label:"Asia/Magadan"},{offset:"GMT+8",label:"Asia/Makassar"},{offset:"GMT+8",label:"Asia/Manila"},{offset:"GMT+4",label:"Asia/Muscat"},{offset:"GMT+3",label:"Asia/Nicosia"},{offset:"GMT+7",label:"Asia/Novokuznetsk"},{offset:"GMT+7",label:"Asia/Novosibirsk"},{offset:"GMT+6",label:"Asia/Omsk"},{offset:"GMT+5",label:"Asia/Oral"},{offset:"GMT+7",label:"Asia/Phnom_Penh"},{offset:"GMT+7",label:"Asia/Pontianak"},{offset:"GMT+9",label:"Asia/Pyongyang"},{offset:"GMT+3",label:"Asia/Qatar"},{offset:"GMT+5",label:"Asia/Qostanay"},{offset:"GMT+5",label:"Asia/Qyzylorda"},{offset:"GMT+6:30",label:"Asia/Rangoon"},{offset:"GMT+3",label:"Asia/Riyadh"},{offset:"GMT+7",label:"Asia/Saigon"},{offset:"GMT+11",label:"Asia/Sakhalin"},{offset:"GMT+5",label:"Asia/Samarkand"},{offset:"GMT+9",label:"Asia/Seoul"},{offset:"GMT+8",label:"Asia/Shanghai"},{offset:"GMT+8",label:"Asia/Singapore"},{offset:"GMT+11",label:"Asia/Srednekolymsk"},{offset:"GMT+8",label:"Asia/Taipei"},{offset:"GMT+5",label:"Asia/Tashkent"},{offset:"GMT+4",label:"Asia/Tbilisi"},{offset:"GMT+3:30",label:"Asia/Tehran"},{offset:"GMT+6",label:"Asia/Thimphu"},{offset:"GMT+9",label:"Asia/Tokyo"},{offset:"GMT+7",label:"Asia/Tomsk"},{offset:"GMT+8",label:"Asia/Ulaanbaatar"},{offset:"GMT+6",label:"Asia/Urumqi"},{offset:"GMT+10",label:"Asia/Ust-Nera"},{offset:"GMT+7",label:"Asia/Vientiane"},{offset:"GMT+10",label:"Asia/Vladivostok"},{offset:"GMT+9",label:"Asia/Yakutsk"},{offset:"GMT+5",label:"Asia/Yekaterinburg"},{offset:"GMT+4",label:"Asia/Yerevan"},{offset:"GMT",label:"Atlantic/Azores"},{offset:"GMT-3",label:"Atlantic/Bermuda"},{offset:"GMT+1",label:"Atlantic/Canary"},{offset:"GMT-1",label:"Atlantic/Cape_Verde"},{offset:"GMT+1",label:"Atlantic/Faeroe"},{offset:"GMT+1",label:"Atlantic/Madeira"},{offset:"GMT",label:"Atlantic/Reykjavik"},{offset:"GMT-2",label:"Atlantic/South_Georgia"},{offset:"GMT",label:"Atlantic/St_Helena"},{offset:"GMT-3",label:"Atlantic/Stanley"},{offset:"GMT+10:30",label:"Australia/Adelaide"},{offset:"GMT+10",label:"Australia/Brisbane"},{offset:"GMT+10:30",label:"Australia/Broken_Hill"},{offset:"GMT+9:30",label:"Australia/Darwin"},{offset:"GMT+8:45",label:"Australia/Eucla"},{offset:"GMT+11",label:"Australia/Hobart"},{offset:"GMT+10",label:"Australia/Lindeman"},{offset:"GMT+11",label:"Australia/Lord_Howe"},{offset:"GMT+11",label:"Australia/Melbourne"},{offset:"GMT+8",label:"Australia/Perth"},{offset:"GMT+11",label:"Australia/Sydney"},{offset:"GMT+2",label:"Europe/Amsterdam"},{offset:"GMT+2",label:"Europe/Andorra"},{offset:"GMT+4",label:"Europe/Astrakhan"},{offset:"GMT+3",label:"Europe/Athens"},{offset:"GMT+2",label:"Europe/Belgrade"},{offset:"GMT+2",label:"Europe/Berlin"},{offset:"GMT+2",label:"Europe/Bratislava"},{offset:"GMT+2",label:"Europe/Brussels"},{offset:"GMT+3",label:"Europe/Bucharest"},{offset:"GMT+2",label:"Europe/Budapest"},{offset:"GMT+2",label:"Europe/Busingen"},{offset:"GMT+3",label:"Europe/Chisinau"},{offset:"GMT+2",label:"Europe/Copenhagen"},{offset:"GMT+1",label:"Europe/Dublin"},{offset:"GMT+2",label:"Europe/Gibraltar"},{offset:"GMT+1",label:"Europe/Guernsey"},{offset:"GMT+3",label:"Europe/Helsinki"},{offset:"GMT+1",label:"Europe/Isle_of_Man"},{offset:"GMT+3",label:"Europe/Istanbul"},{offset:"GMT+1",label:"Europe/Jersey"},{offset:"GMT+2",label:"Europe/Kaliningrad"},{offset:"GMT+3",label:"Europe/Kiev"},{offset:"GMT+3",label:"Europe/Kirov"},{offset:"GMT+1",label:"Europe/Lisbon"},{offset:"GMT+2",label:"Europe/Ljubljana"},{offset:"GMT+1",label:"Europe/London"},{offset:"GMT+2",label:"Europe/Luxembourg"},{offset:"GMT+2",label:"Europe/Madrid"},{offset:"GMT+2",label:"Europe/Malta"},{offset:"GMT+3",label:"Europe/Mariehamn"},{offset:"GMT+3",label:"Europe/Minsk"},{offset:"GMT+2",label:"Europe/Monaco"},{offset:"GMT+3",label:"Europe/Moscow"},{offset:"GMT+2",label:"Europe/Oslo"},{offset:"GMT+2",label:"Europe/Paris"},{offset:"GMT+2",label:"Europe/Podgorica"},{offset:"GMT+2",label:"Europe/Prague"},{offset:"GMT+3",label:"Europe/Riga"},{offset:"GMT+2",label:"Europe/Rome"},{offset:"GMT+4",label:"Europe/Samara"},{offset:"GMT+2",label:"Europe/San_Marino"},{offset:"GMT+2",label:"Europe/Sarajevo"},{offset:"GMT+4",label:"Europe/Saratov"},{offset:"GMT+3",label:"Europe/Simferopol"},{offset:"GMT+2",label:"Europe/Skopje"},{offset:"GMT+3",label:"Europe/Sofia"},{offset:"GMT+2",label:"Europe/Stockholm"},{offset:"GMT+3",label:"Europe/Tallinn"},{offset:"GMT+2",label:"Europe/Tirane"},{offset:"GMT+4",label:"Europe/Ulyanovsk"},{offset:"GMT+2",label:"Europe/Vaduz"},{offset:"GMT+2",label:"Europe/Vatican"},{offset:"GMT+2",label:"Europe/Vienna"},{offset:"GMT+3",label:"Europe/Vilnius"},{offset:"GMT+3",label:"Europe/Volgograd"},{offset:"GMT+2",label:"Europe/Warsaw"},{offset:"GMT+2",label:"Europe/Zagreb"},{offset:"GMT+2",label:"Europe/Zurich"},{offset:"GMT+3",label:"Indian/Antananarivo"},{offset:"GMT+6",label:"Indian/Chagos"},{offset:"GMT+7",label:"Indian/Christmas"},{offset:"GMT+6:30",label:"Indian/Cocos"},{offset:"GMT+3",label:"Indian/Comoro"},{offset:"GMT+5",label:"Indian/Kerguelen"},{offset:"GMT+4",label:"Indian/Mahe"},{offset:"GMT+5",label:"Indian/Maldives"},{offset:"GMT+4",label:"Indian/Mauritius"},{offset:"GMT+3",label:"Indian/Mayotte"},{offset:"GMT+4",label:"Indian/Reunion"},{offset:"GMT+13",label:"Pacific/Apia"},{offset:"GMT+13",label:"Pacific/Auckland"},{offset:"GMT+11",label:"Pacific/Bougainville"},{offset:"GMT+13:45",label:"Pacific/Chatham"},{offset:"GMT-5",label:"Pacific/Easter"},{offset:"GMT+11",label:"Pacific/Efate"},{offset:"GMT+13",label:"Pacific/Enderbury"},{offset:"GMT+13",label:"Pacific/Fakaofo"},{offset:"GMT+12",label:"Pacific/Fiji"},{offset:"GMT+12",label:"Pacific/Funafuti"},{offset:"GMT-6",label:"Pacific/Galapagos"},{offset:"GMT-9",label:"Pacific/Gambier"},{offset:"GMT+11",label:"Pacific/Guadalcanal"},{offset:"GMT+10",label:"Pacific/Guam"},{offset:"GMT-10",label:"Pacific/Honolulu"},{offset:"GMT+14",label:"Pacific/Kiritimati"},{offset:"GMT+11",label:"Pacific/Kosrae"},{offset:"GMT+12",label:"Pacific/Kwajalein"},{offset:"GMT+12",label:"Pacific/Majuro"},{offset:"GMT-9:30",label:"Pacific/Marquesas"},{offset:"GMT-11",label:"Pacific/Midway"},{offset:"GMT+12",label:"Pacific/Nauru"},{offset:"GMT-11",label:"Pacific/Niue"},{offset:"GMT+12",label:"Pacific/Norfolk"},{offset:"GMT+11",label:"Pacific/Noumea"},{offset:"GMT-11",label:"Pacific/Pago_Pago"},{offset:"GMT+9",label:"Pacific/Palau"},{offset:"GMT-8",label:"Pacific/Pitcairn"},{offset:"GMT+11",label:"Pacific/Ponape"},{offset:"GMT+10",label:"Pacific/Port_Moresby"},{offset:"GMT-10",label:"Pacific/Rarotonga"},{offset:"GMT+10",label:"Pacific/Saipan"},{offset:"GMT-10",label:"Pacific/Tahiti"},{offset:"GMT+12",label:"Pacific/Tarawa"},{offset:"GMT+13",label:"Pacific/Tongatapu"},{offset:"GMT+10",label:"Pacific/Truk"},{offset:"GMT+12",label:"Pacific/Wake"},{offset:"GMT+12",label:"Pacific/Wallis"}].sort((e,t)=>this.compareOffsets(e.offset,t.offset))),this.tz.unshift({offset:"",label:"System Timezone -"}),this.dateTimezone.setValidators([E.required,en(this.tz)]),this.filteredTZ=this.dateTimezone.valueChanges.pipe(bt(500),Ve(""),Pe(e=>this.filterTZ(e||""))),this.filteredTZSubscription=this.filteredTZ.subscribe()}filterTZ(e){let t=e.toLowerCase();return this.tz.filter(a=>a.label.toLowerCase().includes(t))}compareOffsets(e,t){let a=l=>{let m=l.match(/([+-]?)(\d+)(?::(\d+))?/);if(!m)return 0;let h=m[1]==="-"?-1:1,k=parseInt(m[2],10),$=m[3]?parseInt(m[3],10):0;return h*(k*60+$)};return a(e)-a(t)}ngOnDestroy(){this.filteredTZSubscription?.unsubscribe()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["display-datetime-options"]],inputs:{dateFormat:[1,"dateFormat"],dateTimezone:"dateTimezone"},decls:14,vars:7,consts:[["timeZoneAutoComplete","matAutocomplete"],[1,"widget-options-grid"],[1,"options-grid-span2"],["matInput","","placeholder","dd/MM/yyyy HH:mm:ss","name","dateFormat","required","",3,"formControl"],["type","text","matInput","","placeholder","Type to use autocomplete","name","dateTimezone","required","",3,"formControl","matAutocomplete"],["mat-icon-button","","matSuffix","","aria-label","Clear"],[3,"value",4,"ngFor","ngForOf"],["mat-icon-button","","matSuffix","","aria-label","Clear",3,"click"],[1,"fa-solid","fa-close"],[3,"value"]],template:function(t,a){if(t&1&&(n(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),r(3,"Date & Time Format"),i(),g(4,"input",3),i(),n(5,"mat-form-field",2)(6,"mat-label"),r(7,"Adjust Value to Time Zone"),i(),g(8,"input",4),_(9,Qi,2,0,"button",5),n(10,"mat-autocomplete",null,0),_(12,Ji,2,3,"mat-option",6),We(13,"async"),i()()()),t&2){let l=te(11);s(4),d("formControl",a.dateFormat()),s(4),d("formControl",a.dateTimezone)("matAutocomplete",l),s(),y(a.dateTimezone.value?9:-1),s(3),d("ngForOf",qe(13,5,a.filteredTZ))}},dependencies:[L,O,R,B,N,I,F,P,ie,ut,z,Qe,Rt,wa,U,Tt],encapsulation:2})}return o})();var Ho=()=>["measuring","capacity"],an=()=>["marineCompass","baseplateCompass"];function on(o,c){if(o&1&&g(0,"config-display-chart-options",14),o&2){let e=u();d("displayName",e.displayNameToControl)("datasetUUID",e.datasetUUIDToControl)("convertUnitTo",e.convertUnitToControl)("showAverageData",e.showAverageDataToControl)("trackAgainstAverage",e.trackAgainstAverageToControl)("datasetAverageArray",e.datasetAverageArrayToControl)("showDatasetMinimumValueLine",e.showDatasetMinimumValueLineToControl)("showDatasetMaximumValueLine",e.showDatasetMaximumValueLineToControl)("showDatasetAverageValueLine",e.showDatasetAverageValueLineToControl)("showDatasetAngleAverageValueLine",e.showDatasetAngleAverageValueLineToControl)("startScaleAtZero",e.startScaleAtZeroToControl)("showLabel",e.showLabelToControl)("showTimeScale",e.showTimeScaleToControl)("showYScale",e.showYScaleToControl)("yScaleSuggestedMin",e.yScaleSuggestedMinToControl)("yScaleSuggestedMax",e.yScaleSuggestedMaxToControl)("enableMinMaxScaleLimit",e.enableMinMaxScaleLimitToControl)("yScaleMin",e.yScaleMinToControl)("yScaleMax",e.yScaleMaxToControl)("numDecimal",e.numDecimalToControl)("verticalGraph",e.verticalGraphToControl)("color",e.colorToControl)}}function nn(o,c){o&1&&(n(0,"mat-form-field",37)(1,"mat-label"),r(2,"URL"),i(),g(3,"input",38),i())}function rn(o,c){o&1&&(n(0,"mat-checkbox",39),r(1," Allow pointer events on embedded content. WARNING: this may prevent swipe gestures over the Embed widget or keyboard events, while the focus is in the embed, from triggering normal KIP interactions. "),i())}function ln(o,c){o&1&&(n(0,"mat-form-field",37)(1,"mat-label"),r(2,"Widget Label"),i(),g(3,"input",40),i())}function sn(o,c){o&1&&(n(0,"mat-form-field",41)(1,"mat-label"),r(2,"Scale Start"),i(),g(3,"input",42),i(),n(4,"mat-form-field",41)(5,"mat-label"),r(6,"Scale End"),i(),g(7,"input",43),i())}function cn(o,c){o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Integer Places"),i(),g(3,"input",44),i())}function dn(o,c){if(o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Decimal Places"),i(),g(3,"input",45),i()),o&2){let e=u(2);Q("options-grid-span2",!e.widgetConfig.numInt)}}function mn(o,c){o&1&&(n(0,"mat-checkbox",46),r(1," Show Min recorded value "),i())}function pn(o,c){o&1&&(n(0,"mat-checkbox",47),r(1," Show Max recorded value "),i())}function un(o,c){if(o&1&&g(0,"display-datetime-options",48),o&2){let e=u(2);d("dateFormat",e.dateFormatToControl)("dateTimezone",e.dateTimezoneToControl)}}function fn(o,c){o&1&&(n(0,"mat-checkbox",49),r(1," Display True Heading "),i())}function gn(o,c){o&1&&(n(0,"mat-checkbox",50),r(1," Invert Rudder Angle "),i())}function hn(o,c){o&1&&(n(0,"mat-checkbox",51),r(1," Show Close-hauled Lines "),i())}function bn(o,c){o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Vessel Close-hauled Angle"),i(),g(3,"input",52),i())}function _n(o,c){o&1&&(n(0,"mat-checkbox",53),r(1," Show Wind Sectors "),i())}function vn(o,c){o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Wind Sector Duration"),i(),g(3,"input",54),i())}function Cn(o,c){if(o&1){let e=x();n(0,"mat-checkbox",55),b("change",function(){C(e);let a=u(2);return M(a.setPaths())}),r(1," Show Apparent Wind Speed Value "),i()}}function Mn(o,c){if(o&1){let e=x();n(0,"mat-checkbox",56),b("change",function(){C(e);let a=u(2);return M(a.setPaths())}),r(1," Show True Wind Speed Value "),i()}}function yn(o,c){if(o&1){let e=x();n(0,"mat-checkbox",57),b("change",function(){C(e);let a=u(2);return M(a.setPaths())}),r(1," Show Course Over Ground "),i()}}function Tn(o,c){if(o&1){let e=x();n(0,"mat-checkbox",58),b("change",function(){C(e);let a=u(2);return M(a.setPaths())}),r(1," Show Next Waypoint "),i()}}function Sn(o,c){if(o&1){let e=x();n(0,"mat-checkbox",59),b("change",function(){C(e);let a=u(2);return M(a.setPaths())}),r(1," Show Drift "),i()}}function xn(o,c){o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Minimum Value"),i(),g(3,"input",60),i())}function wn(o,c){o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Maximum Value"),i(),g(3,"input",61),i())}function An(o,c){o&1&&(n(0,"mat-checkbox",62),r(1," Ignore Zones configuration "),i())}function Gn(o,c){o&1&&(n(0,"mat-form-field",34)(1,"mat-label"),r(2,"Highlights Width"),i(),g(3,"input",63),i())}function En(o,c){o&1&&(n(0,"mat-form-field",35)(1,"mat-label"),r(2,"Rotation Element"),i(),n(3,"mat-select",64)(4,"mat-option",65),r(5,"Dial (Marine Compass)"),i(),n(6,"mat-option",66),r(7,"Needle (Base plate compass)"),i()()(),n(8,"div",34)(9,"mat-checkbox",67),r(10," Show value box "),i()(),n(11,"div",34)(12,"mat-checkbox",68),r(13," Show cardinal degrees "),i()())}function kn(o,c){o&1&&(n(0,"mat-form-field",34)(1,"mat-label"),r(2,"Gauge Type"),i(),n(3,"mat-select",64)(4,"mat-option",69),r(5,"Measuring"),i(),n(6,"mat-option",70),r(7,"Capacity"),i()()())}function Dn(o,c){if(o&1&&_(0,En,14,0)(1,kn,8,0,"mat-form-field",34),o&2){let e=u(2);y(yt(1,an).indexOf(e.formMaster.value.gauge.subType)>-1?0:yt(2,Ho).indexOf(e.formMaster.value.gauge.subType)>-1?1:-1)}}function In(o,c){o&1&&(n(0,"div",34)(1,"mat-checkbox",71),r(2," Use needle indicator "),i()(),n(3,"div",34)(4,"mat-checkbox",72),r(5," Enable Ticks "),i()(),n(6,"mat-form-field",35)(7,"mat-label"),r(8,"Orientation"),i(),n(9,"mat-select",73)(10,"mat-option",74),r(11,"Vertical"),i(),n(12,"mat-option",75),r(13,"Horizontal"),i()()())}function Fn(o,c){o&1&&(n(0,"mat-form-field",35)(1,"mat-label"),r(2,"Unit Label"),i(),n(3,"mat-select",76)(4,"mat-option",77),r(5,"Full Label"),i(),n(6,"mat-option",78),r(7,"First Letter Only"),i()()())}function Pn(o,c){if(o&1&&(n(0,"mat-option",80),r(1),i()),o&2){let e=c.$implicit;ke("value",e.value),s(),w(e.label)}}function On(o,c){if(o&1&&(n(0,"mat-form-field",37)(1,"mat-label"),r(2,"Color"),i(),n(3,"mat-select",79),T(4,Pn,2,2,"mat-option",80,G),i()()),o&2){let e=u(2);s(4),S(e.colors)}}function Ln(o,c){o&1&&(n(0,"mat-checkbox",81),r(1," Disable background color "),i())}function Vn(o,c){if(o&1&&(n(0,"mat-option",80),r(1),i()),o&2){let e=c.$implicit;ke("value",e.value),s(),w(e.label)}}function Nn(o,c){if(o&1&&(n(0,"mat-form-field")(1,"mat-label"),r(2,"Background Color"),i(),n(3,"mat-select",82),T(4,Vn,2,2,"mat-option",80,G),i()()),o&2){let e=u(2);s(4),S(e.colors)}}function Bn(o,c){o&1&&(n(0,"mat-form-field",34)(1,"mat-label"),r(2,"Background Style"),i(),n(3,"mat-select",83)(4,"mat-option",84),r(5,"Dark Gray"),i(),n(6,"mat-option",85),r(7,"Satin Gray"),i(),n(8,"mat-option",86),r(9,"Light Gray"),i(),n(10,"mat-option",87),r(11,"White"),i(),n(12,"mat-option",88),r(13,"Black"),i(),n(14,"mat-option",89),r(15,"Beige"),i(),n(16,"mat-option",90),r(17,"Brown"),i(),n(18,"mat-option",91),r(19,"Red"),i(),n(20,"mat-option",92),r(21,"Green"),i(),n(22,"mat-option",93),r(23,"Blue"),i(),n(24,"mat-option",94),r(25,"Anthracite"),i(),n(26,"mat-option",95),r(27,"Mud"),i(),n(28,"mat-option",96),r(29,"Punched Sheet"),i(),n(30,"mat-option",97),r(31,"Carbon"),i(),n(32,"mat-option",98),r(33,"Stainless"),i(),n(34,"mat-option",99),r(35,"Brushed Metal"),i(),n(36,"mat-option",100),r(37,"Brushed Stainless"),i(),n(38,"mat-option",101),r(39,"Turned"),i()()(),n(40,"mat-form-field",34)(41,"mat-label"),r(42,"Frame Style"),i(),n(43,"mat-select",102)(44,"mat-option",103),r(45,"Black Metal"),i(),n(46,"mat-option",104),r(47,"Metal"),i(),n(48,"mat-option",105),r(49,"Shiny Metal"),i(),n(50,"mat-option",106),r(51,"Brass"),i(),n(52,"mat-option",107),r(53,"Steel"),i(),n(54,"mat-option",108),r(55,"Chrome"),i(),n(56,"mat-option",109),r(57,"Gold"),i(),n(58,"mat-option",94),r(59,"Anthracite"),i(),n(60,"mat-option",110),r(61,"Tilted Gray"),i(),n(62,"mat-option",111),r(63,"Tilted Black"),i(),n(64,"mat-option",112),r(65,"Glossy Metal"),i()()())}function Rn(o,c){if(o&1&&(n(0,"div",15)(1,"div",16),_(2,nn,4,0,"mat-form-field",17)(3,rn,2,0,"mat-checkbox",18)(4,ln,4,0,"mat-form-field",17)(5,sn,8,0)(6,cn,4,0,"mat-form-field",19)(7,dn,4,2,"mat-form-field",20)(8,mn,2,0,"mat-checkbox",21)(9,pn,2,0,"mat-checkbox",22)(10,un,1,2,"display-datetime-options",23)(11,fn,2,0,"mat-checkbox",24)(12,gn,2,0,"mat-checkbox",25)(13,hn,2,0,"mat-checkbox",26)(14,bn,4,0,"mat-form-field",19)(15,_n,2,0,"mat-checkbox",27)(16,vn,4,0,"mat-form-field",19)(17,Cn,2,0,"mat-checkbox",28)(18,Mn,2,0,"mat-checkbox",29)(19,yn,2,0,"mat-checkbox",30)(20,Tn,2,0,"mat-checkbox",31)(21,Sn,2,0,"mat-checkbox",32)(22,xn,4,0,"mat-form-field",19)(23,wn,4,0,"mat-form-field",19)(24,An,2,0,"mat-checkbox",33)(25,Gn,4,0,"mat-form-field",34)(26,Dn,2,3)(27,In,14,0)(28,Fn,8,0,"mat-form-field",35)(29,On,6,0,"mat-form-field",17)(30,Ln,2,0,"mat-checkbox",36)(31,Nn,6,0,"mat-form-field",19)(32,Bn,66,0),i()()),o&2){let e=u();s(2),d("ngIf",e.widgetConfig.widgetUrl!==void 0),s(),d("ngIf",e.widgetConfig.allowInput!==void 0),s(),d("ngIf",e.widgetConfig.displayName!==void 0),s(),y(e.formMaster.get("displayScale")?5:-1),s(),d("ngIf",e.widgetConfig.numInt!==void 0),s(),d("ngIf",e.widgetConfig.numDecimal!==void 0),s(),d("ngIf",e.widgetConfig.showMin!==void 0),s(),d("ngIf",e.widgetConfig.showMax!==void 0),s(),d("ngIf",e.widgetConfig.dateFormat!==void 0),s(),d("ngIf",e.widgetConfig.headingDirectionTrue!==void 0),s(),d("ngIf",e.widgetConfig.invertRudder!==void 0),s(),d("ngIf",e.widgetConfig.laylineEnable!==void 0),s(),d("ngIf",e.widgetConfig.laylineEnable!==void 0),s(),d("ngIf",e.widgetConfig.windSectorEnable!==void 0),s(),d("ngIf",e.widgetConfig.windSectorEnable!==void 0),s(),d("ngIf",e.widgetConfig.awsEnable!==void 0),s(),d("ngIf",e.widgetConfig.twsEnable!==void 0),s(),d("ngIf",e.widgetConfig.courseOverGroundEnable!==void 0),s(),d("ngIf",e.widgetConfig.waypointEnable!==void 0),s(),d("ngIf",e.widgetConfig.driftEnable!==void 0),s(),d("ngIf",e.widgetConfig.minValue!==void 0&&!e.formMaster.get("displayScale")),s(),d("ngIf",e.widgetConfig.maxValue!==void 0&&!e.formMaster.get("displayScale")),s(),d("ngIf",e.widgetConfig.ignoreZones!==void 0),s(),y((e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="ngRadial"&&yt(31,Ho).includes(e.formMaster.value.gauge.subType)||(e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="ngLinear"?25:-1),s(),y((e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="ngRadial"?26:-1),s(),y((e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="ngLinear"?27:-1),s(),y((e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="simpleLinear"?28:-1),s(),d("ngIf",e.widgetConfig.color!==void 0),s(),d("ngIf",e.widgetConfig.noBgColor!==void 0),s(),d("ngIf",e.widgetConfig.bgColor!==void 0),s(),y((e.widgetConfig.gauge==null?null:e.widgetConfig.gauge.type)=="steel"?32:-1)}}function Un(o,c){if(o&1&&(g(0,"span",117),r(1,"\xA0Controls ")),o&2){let e=u(2);Kt(e.formMaster.controls.multiChildCtrls.valid?"display: none":"display: block")}}function Wn(o,c){if(o&1){let e=x();n(0,"mat-tab",113)(1,"div",114)(2,"div"),_(3,Un,2,2,"ng-template",115),i(),n(4,"boolean-multicontrol-options",116),b("addPath",function(a){C(e);let l=u();return M(l.addPathGroup(a))})("updatePath",function(a){C(e);let l=u();return M(l.updatePath(a))})("delPath",function(a){C(e);let l=u();return M(l.deletePath(a))}),i()()()}if(o&2){let e=u();s(4),d("multiCtrlArray",e.multiChildCtrlsToControl)}}function qn(o,c){if(o&1&&(n(0,"span",120),r(1," error "),i(),r(2," \xA0Paths ")),o&2){let e=u(2);Kt(e.formMaster.controls.paths.valid?"display: none":"display: block")}}function zn(o,c){if(o&1&&(n(0,"mat-tab",118)(1,"div",114)(2,"div"),_(3,qn,3,2,"ng-template",115),i(),g(4,"paths-options",119),i()()),o&2){let e=u();s(4),d("isArray",e.isPathArray)("enableTimeout",e.enableTimeoutToControl)("dataTimeout",e.dataTimeoutToControl)("filterSelfPaths",e.filterSelfPathsToControl)("addPathEvent",e.addPathEvent)("delPathEvent",e.delPathEvent)("updatePathEvent",e.updatePathEvent)}}function jn(o,c){o&1&&(n(0,"p")(1,"mat-checkbox",123),r(2," Digital display "),i()())}function Hn(o,c){o&1&&(n(0,"mat-form-field",37)(1,"mat-label"),r(2,"Dial Size"),i(),n(3,"mat-select",124)(4,"mat-option",125),r(5,"1/4"),i(),n(6,"mat-option",126),r(7,"1/2"),i(),n(8,"mat-option",127),r(9,"3/4"),i(),n(10,"mat-option",77),r(11,"Full"),i()()())}function Kn(o,c){if(o&1&&(n(0,"mat-tab",9)(1,"div",15)(2,"mat-form-field",37)(3,"mat-label"),r(4,"Gauge Type"),i(),n(5,"mat-select",73)(6,"mat-option",121),r(7,"Linear"),i(),n(8,"mat-option",122),r(9,"Radial"),i()()(),_(10,jn,3,0,"p")(11,Hn,12,0,"mat-form-field",37),i()()),o&2){let e=u();s(10),y(e.formMaster.value.gauge.subType=="linear"?10:-1),s(),y(e.formMaster.value.gauge.subType=="radial"?11:-1)}}function $n(o,c){o&1&&(n(0,"p")(1,"mat-checkbox",131),r(2," Value to send on button push (checked = on, unchecked = off) "),i()())}function Yn(o,c){if(o&1&&(n(0,"mat-tab",128)(1,"div",114)(2,"p")(3,"mat-checkbox",129),r(4," Enable Put Requests "),i()(),n(5,"p")(6,"mat-checkbox",130),r(7," Momentary mode (instead of switching between on/off) "),i()(),_(8,$n,3,0,"p",19),i()()),o&2){let e=u();s(8),d("ngIf",e.formMaster.controls.putMomentary.value)}}function Zn(o,c){o&1&&g(0,"span",117)}function Xn(o,c){if(o&1&&(_(0,Zn,1,0,"span",134),r(1," Dataset ")),o&2){let e=u(2);d("ngIf",!e.formMaster.controls.datasetUUID.valid)}}function Qn(o,c){if(o&1&&(n(0,"mat-tab",132),_(1,Xn,2,1,"ng-template",115),g(2,"config-dataset-chart-options",133),i()),o&2){let e=u();s(2),d("datasetUUID",e.datasetUUIDToControl)("convertUnitTo",e.convertUnitToControl)}}var Ko=(()=>{class o{dialogRef=p(ve);fb=p(Xe);DatasetService=p(et);units=p(tt);app=p(je);widgetConfig=p(Ce);titleDialog="Widget Options";formMaster;availableDataSets;unitList={};isPathArray=!1;addPathEvent;delPathEvent;updatePathEvent;colors=[];ngOnInit(){this.availableDataSets=this.DatasetService.list().sort(),this.unitList=this.units.getConversionsForPath(""),this.formMaster=this.generateFormGroups(this.widgetConfig),this.setFormOptions(),this.colors=this.app.configurableThemeColors}generateFormGroups(e,t){let a=this.fb.group({});return Object.keys(e).forEach(l=>{if(typeof e[l]=="object"&&e[l]!==null){if(l=="multiChildCtrls"){a.addControl(l,this.fb.array([]));let m=a.get(l);e[l].forEach(h=>{m.push(this.generateCtrlArray(h))})}else if(l=="displayScale")a.addControl(l,this.generateFormGroups(e[l],l));else if(l=="gauge")a.addControl(l,this.generateFormGroups(e[l],l));else if(l=="paths")if(this.widgetConfig.multiChildCtrls!==void 0){this.isPathArray=!0,a.addControl(l,this.fb.array([]));let m=a.get(l);Object.keys(e[l]).forEach(h=>{m.push(this.generatePathArray(h,this.widgetConfig.paths[h]))})}else a.addControl(l,this.generateFormGroups(e[l],l));t=="paths"&&a.addControl(l,this.generateFormGroups(e[l],l))}else if(t=="convertUnitTo")(this.widgetConfig.paths[l].pathType=="number"||"datasetUUID"in this.widgetConfig)&&a.addControl(l,new H(e[l]));else switch(l){case"path":a.addControl(l,new H(e[l],E.required));break;case"datasetUUID":a.addControl(l,new H(e[l],E.required));break;case"dataTimeout":a.addControl(l,new H(e[l],E.required));break;default:a.addControl(l,new H(e[l]));break}}),a}generatePathArray(e,t){let a=new io({});return Object.keys(t).forEach(l=>{a.addControl(l,this.generatePathFields(l,t[l]))}),a}generatePathFields(e,t){let a=null;switch(e){case"path":a=new H(t,E.required);break;case"source":a=new H(t,E.required);break;case"sampleTime":a=new H(t,E.required);break;default:a=new H(t);break}return a}generateCtrlArray(e){let t=this.fb.group(e);return t.get("ctrlLabel").addValidators(E.required),t}addPathGroup(e){this.addPathEvent=e}updatePath(e){e.forEach(t=>{this.formMaster.get("paths").controls.forEach(l=>{l.get("pathID").value==t.pathID&&(l.controls.description.setValue(t.ctrlLabel),l.controls.pathType.setValue(t.isNumeric?"number":"boolean"),this.updatePathEvent=e)})})}deletePath(e){let t=this.formMaster.get("paths"),a=0;t.controls.forEach(m=>{if(m.get("pathID").value==e.pathID){let k=t.controls[""];t.removeAt(a)}else a++}),this.formMaster.get("multiChildCtrls").removeAt(e.ctrlIndex),this.delPathEvent=e.pathID,this.formMaster.updateValueAndValidity()}setPaths(){this.setFormOptions()}setFormOptions(){if(this.formMaster.contains("courseOverGroundEnable")){let e=this.formMaster.get("paths.courseOverGround");this.formMaster.controls.courseOverGroundEnable.value?e.enable():e.disable()}if(this.formMaster.contains("driftEnable")){let e=this.formMaster.get("paths.set"),t=this.formMaster.get("paths.drift");this.formMaster.controls.driftEnable.value?e.enable():e.disable(),this.formMaster.controls.driftEnable.value?t.enable():t.disable()}if(this.formMaster.contains("waypointEnable")){let e=this.formMaster.get("paths.nextWaypointBearing");this.formMaster.controls.waypointEnable.value?e.enable():e.disable()}}get convertUnitToControl(){return this.formMaster.get("convertUnitTo")}get datasetUUIDToControl(){return this.formMaster.get("datasetUUID")}get filterSelfPathsToControl(){return this.formMaster.get("filterSelfPaths")}get dataTimeoutToControl(){return this.formMaster.get("dataTimeout")}get enableTimeoutToControl(){return this.formMaster.get("enableTimeout")}get dateTimezoneToControl(){return this.formMaster.get("dateTimezone")}get yScaleSuggestedMaxToControl(){return this.formMaster.get("yScaleSuggestedMax")}get enableMinMaxScaleLimitToControl(){return this.formMaster.get("enableMinMaxScaleLimit")}get showDatasetMinimumValueLineToControl(){return this.formMaster.get("showDatasetMinimumValueLine")}get showDatasetMaximumValueLineToControl(){return this.formMaster.get("showDatasetMaximumValueLine")}get showDatasetAverageValueLineToControl(){return this.formMaster.get("showDatasetAverageValueLine")}get showDatasetAngleAverageValueLineToControl(){return this.formMaster.get("showDatasetAngleAverageValueLine")}get startScaleAtZeroToControl(){return this.formMaster.get("startScaleAtZero")}get showLabelToControl(){return this.formMaster.get("showLabel")}get showTimeScaleToControl(){return this.formMaster.get("showTimeScale")}get showYScaleToControl(){return this.formMaster.get("showYScale")}get yScaleSuggestedMinToControl(){return this.formMaster.get("yScaleSuggestedMin")}get yScaleMinToControl(){return this.formMaster.get("yScaleMin")}get yScaleMaxToControl(){return this.formMaster.get("yScaleMax")}get datasetAverageArrayToControl(){return this.formMaster.get("datasetAverageArray")}get trackAgainstAverageToControl(){return this.formMaster.get("trackAgainstAverage")}get showAverageDataToControl(){return this.formMaster.get("showAverageData")}get convertUnitToToControl(){return this.formMaster.get("convertUnitTo")}get datasetUUIDControl(){return this.formMaster.get("datasetUUID")}get displayNameToControl(){return this.formMaster.get("displayName")}get numDecimalToControl(){return this.formMaster.get("numDecimal")}get verticalGraphToControl(){return this.formMaster.get("verticalGraph")}get colorToControl(){return this.formMaster.get("color")}get dateFormatToControl(){return this.formMaster.get("dateFormat")}get multiChildCtrlsToControl(){return this.formMaster.get("multiChildCtrls")}submitConfig(){this.dialogRef.close(this.formMaster.getRawValue())}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["modal-widget-config"]],decls:19,vars:10,consts:[[3,"ngSubmit","formGroup"],["mat-dialog-title",""],[1,"widget-config-dialog-content"],[1,"tab-group-content"],["label","Display"],["class","tab-content",3,"displayName","datasetUUID","convertUnitTo","showAverageData","trackAgainstAverage","datasetAverageArray","showDatasetMinimumValueLine","showDatasetMaximumValueLine","showDatasetAverageValueLine","showDatasetAngleAverageValueLine","startScaleAtZero","showLabel","showTimeScale","showYScale","yScaleSuggestedMin","yScaleSuggestedMax","enableMinMaxScaleLimit","yScaleMin","yScaleMax","numDecimal","verticalGraph","color",4,"ngIf"],["class","display-content tab-content",4,"ngIf"],["label","Controls",4,"ngIf"],["label","Paths",4,"ngIf"],["label","Settings","formGroupName","gauge"],["label","Put Request",4,"ngIf"],["label","Dataset",4,"ngIf"],["type","button","mat-dialog-close","","mat-flat-button",""],["mat-flat-button","","type","submit",3,"disabled"],[1,"tab-content",3,"displayName","datasetUUID","convertUnitTo","showAverageData","trackAgainstAverage","datasetAverageArray","showDatasetMinimumValueLine","showDatasetMaximumValueLine","showDatasetAverageValueLine","showDatasetAngleAverageValueLine","startScaleAtZero","showLabel","showTimeScale","showYScale","yScaleSuggestedMin","yScaleSuggestedMax","enableMinMaxScaleLimit","yScaleMin","yScaleMax","numDecimal","verticalGraph","color"],[1,"display-content","tab-content"],[1,"widget-options-grid"],["class","options-grid-span2",4,"ngIf"],["class","options-grid-span2","name","allowInput","formControlName","allowInput",4,"ngIf"],[4,"ngIf"],[3,"options-grid-span2",4,"ngIf"],["name","showMin","formControlName","showMin",4,"ngIf"],["name","showMax","formControlName","showMax",4,"ngIf"],["class","options-grid-span2",3,"dateFormat","dateTimezone",4,"ngIf"],["name","headingDirectionTrue","formControlName","headingDirectionTrue",4,"ngIf"],["class","options-grid-span2","name","invertRudder","formControlName","invertRudder",4,"ngIf"],["class","fields","name","laylineEnable","formControlName","laylineEnable",4,"ngIf"],["name","windSectorEnable","formControlName","windSectorEnable",4,"ngIf"],["class","options-grid-span2","name","awsEnable","formControlName","awsEnable",3,"change",4,"ngIf"],["class","options-grid-span2","name","twsEnable","formControlName","twsEnable",3,"change",4,"ngIf"],["class","options-grid-span2","name","courseOverGroundEnable","formControlName","courseOverGroundEnable",3,"change",4,"ngIf"],["class","options-grid-span2","name","waypointEnable","formControlName","waypointEnable",3,"change",4,"ngIf"],["class","options-grid-span2","name","driftEnable","formControlName","driftEnable",3,"change",4,"ngIf"],["name","ignoreZones","formControlName","ignoreZones",4,"ngIf"],["formGroupName","gauge"],["formGroupName","gauge",1,"options-grid-span2"],["name","noBgColor","formControlName","noBgColor",4,"ngIf"],[1,"options-grid-span2"],["type","url","matInput","","placeholder","Enter URL to page/resource","name","widgetUrl","formControlName","widgetUrl"],["name","allowInput","formControlName","allowInput",1,"options-grid-span2"],["matInput","","placeholder","Enter a label to display","name","displayName","formControlName","displayName"],["formGroupName","displayScale","appearance","outline"],["matNativeControl","","type","number","name","lower","formControlName","lower","placeholder","Enter number..."],["matInput","","type","number","name","upper","formControlName","upper","placeholder","Enter number..."],["type","number","min","1","max","5","matInput","","placeholder","Enter or select number...","name","numInt","formControlName","numInt","required",""],["type","number","min","0","max","5","matInput","","placeholder","Enter or select number...","name","numDecimal","formControlName","numDecimal","required",""],["name","showMin","formControlName","showMin"],["name","showMax","formControlName","showMax"],[1,"options-grid-span2",3,"dateFormat","dateTimezone"],["name","headingDirectionTrue","formControlName","headingDirectionTrue"],["name","invertRudder","formControlName","invertRudder",1,"options-grid-span2"],["name","laylineEnable","formControlName","laylineEnable",1,"fields"],["type","number","min","10","max","90","matInput","","placeholder","Select angle...","name","laylineAngle","formControlName","laylineAngle"],["name","windSectorEnable","formControlName","windSectorEnable"],["type","number","min","1","max","90","matInput","","placeholder","Select or enter duration...","name","windSectorWindowSeconds","formControlName","windSectorWindowSeconds"],["name","awsEnable","formControlName","awsEnable",1,"options-grid-span2",3,"change"],["name","twsEnable","formControlName","twsEnable",1,"options-grid-span2",3,"change"],["name","courseOverGroundEnable","formControlName","courseOverGroundEnable",1,"options-grid-span2",3,"change"],["name","waypointEnable","formControlName","waypointEnable",1,"options-grid-span2",3,"change"],["name","driftEnable","formControlName","driftEnable",1,"options-grid-span2",3,"change"],["matInput","","type","number","name","minValue","formControlName","minValue","placeholder","Enter or select number..."],["matInput","","type","number","name","maxValue","formControlName","maxValue","placeholder","Enter or select number..."],["name","ignoreZones","formControlName","ignoreZones"],["type","number","min","0","max","25","matInput","","placeholder","Enter or select number...","name","highlightsWidth","formControlName","highlightsWidth","required",""],["placeholder","Select Gauge Type...","formControlName","subType","name","subType"],["value","marineCompass"],["value","baseplateCompass"],["name","showValueBox","formControlName","showValueBox"],["name","compassUseNumbers","formControlName","compassUseNumbers"],["value","measuring"],["value","capacity"],["name","useNeedle","formControlName","useNeedle"],["name","enableTicks","formControlName","enableTicks"],["placeholder","Select type...","formControlName","subType","name","subType"],["value","vertical"],["value","horizontal"],["placeholder","Select label format","formControlName","unitLabelFormat","name","unitLabelFormat"],["value","full"],["value","abr"],["placeholder","Select Color...","formControlName","color","name","color","required",""],[3,"value"],["name","noBgColor","formControlName","noBgColor"],["placeholder","Select Color...","formControlName","bgColor","name","bgColor","required",""],["placeholder","Select style...","formControlName","backgroundColor","name","backgroundColor"],["value","darkGray"],["value","satinGray"],["value","lightGray"],["value","white"],["value","black"],["value","beige"],["value","brown"],["value","red"],["value","green"],["value","blue"],["value","anthracite"],["value","mud"],["value","punchedSheet"],["value","carbon"],["value","stainless"],["value","brushedMetal"],["value","brushedStainless"],["value","turned"],["placeholder","Select style...","formControlName","faceColor","name","faceColor"],["value","blackMetal"],["value","metal"],["value","shinyMetal"],["value","brass"],["value","steel"],["value","chrome"],["value","gold"],["value","tiltedGray"],["value","tiltedBlack"],["value","glossyMetal"],["label","Controls"],[1,"tab-content"],["mat-tab-label",""],[3,"addPath","updatePath","delPath","multiCtrlArray"],[1,"warning","fa","fa-exclamation-circle"],["label","Paths"],["formGroupName","paths",3,"isArray","enableTimeout","dataTimeout","filterSelfPaths","addPathEvent","delPathEvent","updatePathEvent"],[1,"warning","material-icons"],["value","linear"],["value","radial"],["formControlName","digitalMeter","name","digitalMeter"],["placeholder","Select size...","formControlName","radialSize","name","radialSize"],["value","quarter"],["value","half"],["value","three-quarter"],["label","Put Request"],["formControlName","putEnable","name","putEnable"],["formControlName","putMomentary","name","putMomentary"],["formControlName","putMomentaryValue","name","putMomentaryValue"],["label","Dataset"],[3,"datasetUUID","convertUnitTo"],["class","warning fa fa-exclamation-circle",4,"ngIf"]],template:function(t,a){t&1&&(n(0,"form",0),b("ngSubmit",function(){return a.submitConfig()}),n(1,"h6",1),r(2),i(),n(3,"mat-dialog-content",2)(4,"mat-tab-group",3)(5,"mat-tab",4),_(6,on,1,22,"config-display-chart-options",5)(7,Rn,33,32,"div",6),i(),_(8,Wn,5,1,"mat-tab",7)(9,zn,5,7,"mat-tab",8)(10,Kn,12,2,"mat-tab",9)(11,Yn,9,1,"mat-tab",10)(12,Qn,3,2,"mat-tab",11),i()(),g(13,"mat-divider"),n(14,"mat-dialog-actions")(15,"button",12),r(16,"Cancel"),i(),n(17,"button",13),r(18,"Save"),i()()()),t&2&&(d("formGroup",a.formMaster),s(2),w(a.titleDialog),s(4),d("ngIf",a.widgetConfig.datasetUUID!==void 0),s(),d("ngIf",a.widgetConfig.datasetUUID===void 0),s(),d("ngIf",a.widgetConfig.multiChildCtrls!==void 0),s(),d("ngIf",a.widgetConfig.paths!==void 0),s(),y((a.widgetConfig.gauge==null?null:a.widgetConfig.gauge.type)=="steel"?10:-1),s(),d("ngIf",a.widgetConfig.putEnable!==void 0&&a.widgetConfig.multiChildCtrls===void 0),s(),d("ngIf",a.widgetConfig.datasetUUID!==void 0),s(5),d("disabled",!a.formMaster.valid))},dependencies:[B,kt,N,xe,I,j,F,Ze,Dt,P,K,Ye,so,ye,Te,yo,Mo,Aa,L,O,R,we,ne,U,Co,po,$e,_e,Me,jo,Oo,Lo,Io,zo],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%}.widget-config-dialog-content[_ngcontent-%COMP%]{height:100%}.display-content[_ngcontent-%COMP%]{display:block;height:100%;width:100%;padding-top:15px;padding-bottom:10px}.warning[_ngcontent-%COMP%]{color:var(--mat-sys-error-container)}.tab-group-content[_ngcontent-%COMP%]{overflow:hidden;width:100%}"]})}return o})();var Jn=["button"],er=["*"];function tr(o,c){if(o&1&&(n(0,"div",2),g(1,"mat-pseudo-checkbox",6),i()),o&2){let e=u();s(),d("disabled",e.disabled)}}var $o=new Y("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:ar});function ar(){return{hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1}}var Yo=new Y("MatButtonToggleGroup"),or={provide:Et,useExisting:vt(()=>Qt),multi:!0},Ut=class{source;value;constructor(c,e){this.source=c,this.value=e}},Qt=(()=>{class o{_changeDetector=p(ze);_dir=p(Gt,{optional:!0});_multiple=!1;_disabled=!1;_disabledInteractive=!1;_selectionModel;_rawValue;_controlValueAccessorChangeFn=()=>{};_onTouched=()=>{};_buttonToggles;appearance;get name(){return this._name}set name(e){this._name=e,this._markButtonsForCheck()}_name=p(mt).getId("mat-button-toggle-group-");vertical;get value(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e.map(t=>t.value):e[0]?e[0].value:void 0}set value(e){this._setSelectionByValue(e),this.valueChange.emit(this.value)}valueChange=new Z;get selected(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e:e[0]||null}get multiple(){return this._multiple}set multiple(e){this._multiple=e,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}change=new Z;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._markButtonsForCheck()}_hideSingleSelectionIndicator;get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(e){this._hideMultipleSelectionIndicator=e,this._markButtonsForCheck()}_hideMultipleSelectionIndicator;constructor(){let e=p($o,{optional:!0});this.appearance=e&&e.appearance?e.appearance:"standard",this.hideSingleSelectionIndicator=e?.hideSingleSelectionIndicator??!1,this.hideMultipleSelectionIndicator=e?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new vo(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(e=>e.checked)),this.multiple||this._initializeTabIndex()}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_keydown(e){if(this.multiple||this.disabled)return;let a=e.target.id,l=this._buttonToggles.toArray().findIndex(h=>h.buttonId===a),m=null;switch(e.keyCode){case 32:case 13:m=this._buttonToggles.get(l)||null;break;case 38:m=this._getNextButton(l,-1);break;case 37:m=this._getNextButton(l,this.dir==="ltr"?-1:1);break;case 40:m=this._getNextButton(l,1);break;case 39:m=this._getNextButton(l,this.dir==="ltr"?1:-1);break;default:return}m&&(e.preventDefault(),m._onButtonClick(),m.focus())}_emitChangeEvent(e){let t=new Ut(e,this.value);this._rawValue=t.value,this._controlValueAccessorChangeFn(t.value),this.change.emit(t)}_syncButtonToggle(e,t,a=!1,l=!1){!this.multiple&&this.selected&&!e.checked&&(this.selected.checked=!1),this._selectionModel?t?this._selectionModel.select(e):this._selectionModel.deselect(e):l=!0,l?Promise.resolve().then(()=>this._updateModelValue(e,a)):this._updateModelValue(e,a)}_isSelected(e){return this._selectionModel&&this._selectionModel.isSelected(e)}_isPrechecked(e){return typeof this._rawValue>"u"?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(t=>e.value!=null&&t===e.value):e.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(e=>{e.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let e=0;e<this._buttonToggles.length;e++){let t=this._buttonToggles.get(e);if(!t.disabled){t.tabIndex=0;break}}this._markButtonsForCheck()}_getNextButton(e,t){let a=this._buttonToggles;for(let l=1;l<=a.length;l++){let m=(e+t*l+a.length)%a.length,h=a.get(m);if(h&&!h.disabled)return h}return null}_setSelectionByValue(e){if(this._rawValue=e,!this._buttonToggles)return;let t=this._buttonToggles.toArray();if(this.multiple&&e?(Array.isArray(e),this._clearSelection(),e.forEach(a=>this._selectValue(a,t))):(this._clearSelection(),this._selectValue(e,t)),!this.multiple&&t.every(a=>a.tabIndex===-1)){for(let a of t)if(!a.disabled){a.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(e=>{e.checked=!1,this.multiple||(e.tabIndex=-1)})}_selectValue(e,t){for(let a of t)if(a.value===e){a.checked=!0,this._selectionModel.select(a),this.multiple||(a.tabIndex=0);break}}_updateModelValue(e,t){t&&this._emitChangeEvent(e),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(e=>e._markForCheck())}static \u0275fac=function(t){return new(t||o)};static \u0275dir=lt({type:o,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,a,l){if(t&1&&st(l,Wt,5),t&2){let m;he(m=be())&&(a._buttonToggles=m)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(t,a){t&1&&b("keydown",function(m){return a._keydown(m)}),t&2&&(le("role",a.multiple?"group":"radiogroup")("aria-disabled",a.disabled),Q("mat-button-toggle-vertical",a.vertical)("mat-button-toggle-group-appearance-standard",a.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",D],value:"value",multiple:[2,"multiple","multiple",D],disabled:[2,"disabled","disabled",D],disabledInteractive:[2,"disabledInteractive","disabledInteractive",D],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",D],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",D]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[dt([or,{provide:Yo,useExisting:o}])]})}return o})(),Wt=(()=>{class o{_changeDetectorRef=p(ze);_elementRef=p(rt);_focusMonitor=p(Ba);_idGenerator=p(mt);_animationMode=p(Be,{optional:!0});_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex}set tabIndex(e){e!==this._tabIndex&&(this._tabIndex=e,this._markForCheck())}_tabIndex;disableRipple;get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(e){this._appearance=e}_appearance;get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(e){e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(e){this._disabled=e}_disabled=!1;get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e}_disabledInteractive;change=new Z;constructor(){p(Ra).load(qa);let e=p(Yo,{optional:!0}),t=p(new sa("tabindex"),{optional:!0})||"",a=p($o,{optional:!0});this._tabIndex=parseInt(t)||0,this.buttonToggleGroup=e,this.appearance=a&&a.appearance?a.appearance:"standard",this.disabledInteractive=a?.disabledInteractive??!1}ngOnInit(){let e=this.buttonToggleGroup;this.id=this.id||this._idGenerator.getId("mat-button-toggle-"),e&&(e._isPrechecked(this)?this.checked=!0:e._isSelected(this)!==this._checked&&e._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._animationMode!=="NoopAnimations"&&this._elementRef.nativeElement.classList.add("mat-button-toggle-animations-enabled"),this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let e=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),e&&e._isSelected(this)&&e._syncButtonToggle(this,!1,!1,!0)}focus(e){this._buttonElement.nativeElement.focus(e)}_onButtonClick(){if(this.disabled)return;let e=this.isSingleSelector()?!0:!this._checked;if(e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let t=this.buttonToggleGroup._buttonToggles.find(a=>a.tabIndex===0);t&&(t.tabIndex=-1),this.tabIndex=0}this.change.emit(new Ut(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["mat-button-toggle"]],viewQuery:function(t,a){if(t&1&&ct(Jn,5),t&2){let l;he(l=be())&&(a._buttonElement=l.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(t,a){t&1&&b("focus",function(){return a.focus()}),t&2&&(le("aria-label",null)("aria-labelledby",null)("id",a.id)("name",null),Q("mat-button-toggle-standalone",!a.buttonToggleGroup)("mat-button-toggle-checked",a.checked)("mat-button-toggle-disabled",a.disabled)("mat-button-toggle-disabled-interactive",a.disabledInteractive)("mat-button-toggle-appearance-standard",a.appearance==="standard"))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[2,"disableRipple","disableRipple",D],appearance:"appearance",checked:[2,"checked","checked",D],disabled:[2,"disabled","disabled",D],disabledInteractive:[2,"disabledInteractive","disabledInteractive",D]},outputs:{change:"change"},exportAs:["matButtonToggle"],ngContentSelectors:er,decls:7,vars:13,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-checkbox-wrapper"],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"],["state","checked","aria-hidden","true","appearance","minimal",3,"disabled"]],template:function(t,a){if(t&1){let l=x();Re(),n(0,"button",1,0),b("click",function(){return C(l),M(a._onButtonClick())}),_(2,tr,2,1,"div",2),n(3,"span",3),Ue(4),i()(),g(5,"span",4)(6,"span",5)}if(t&2){let l=te(1);d("id",a.buttonId)("disabled",a.disabled&&!a.disabledInteractive||null),le("role",a.isSingleSelector()?"radio":"button")("tabindex",a.disabled&&!a.disabledInteractive?-1:a.tabIndex)("aria-pressed",a.isSingleSelector()?null:a.checked)("aria-checked",a.isSingleSelector()?a.checked:null)("name",a._getButtonName())("aria-label",a.ariaLabel)("aria-labelledby",a.ariaLabelledby)("aria-disabled",a.disabled&&a.disabledInteractive?"true":null),s(2),y(a.buttonToggleGroup&&(!a.buttonToggleGroup.multiple&&!a.buttonToggleGroup.hideSingleSelectionIndicator||a.buttonToggleGroup.multiple&&!a.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),s(4),d("matRippleTrigger",l)("matRippleDisabled",a.disableRipple||a.disabled)}},dependencies:[Wa,uo],styles:[`.mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0);border-radius:var(--mat-legacy-button-toggle-shape)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full));border:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-standard-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-legacy-button-toggle-text-color);font-family:var(--mat-legacy-button-toggle-label-text-font);font-size:var(--mat-legacy-button-toggle-label-text-size);line-height:var(--mat-legacy-button-toggle-label-text-line-height);font-weight:var(--mat-legacy-button-toggle-label-text-weight);letter-spacing:var(--mat-legacy-button-toggle-label-text-tracking);--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-legacy-button-toggle-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-legacy-button-toggle-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-legacy-button-toggle-selected-state-text-color);background-color:var(--mat-legacy-button-toggle-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-legacy-button-toggle-disabled-state-text-color);background-color:var(--mat-legacy-button-toggle-disabled-state-background-color);--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-legacy-button-toggle-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-legacy-button-toggle-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-standard-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-standard-button-toggle-background-color, transparent);font-family:var(--mat-standard-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-standard-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-standard-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-standard-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-standard-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-standard-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-standard-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-standard-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-standard-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-standard-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-standard-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-legacy-button-toggle-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-standard-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-legacy-button-toggle-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full));border-bottom-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full));border-bottom-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full));border-bottom-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full));border-top-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-full))}
6
+ `],encapsulation:2,changeDetection:0})}return o})(),Zo=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=ge({type:o});static \u0275inj=ue({imports:[q,za,Wt,q]})}return o})();var Xo=(()=>{class o{_widgetCategories=["Basic","Gauges","Components"];_widgetDefinition=[{name:"Numeric",description:"Displays numeric data in a clear and concise format with option to display minimum and maximum recorded values.",icon:"numericWidget",category:"Basic",selector:"widget-numeric",componentClassName:"WidgetNumericComponent"},{name:"Text",description:"Displays text data with customizable color formatting option.",icon:"textWidget",category:"Basic",selector:"widget-text",componentClassName:"WidgetTextComponent"},{name:"Date & Time",description:"Displays date and time data with fully custom formatting options and timezone correction.",icon:"datetimeWidget",category:"Basic",selector:"widget-datetime",componentClassName:"WidgetDatetimeComponent"},{name:"Position",description:"Displays latitude and longitude for location tracking and navigation.",icon:"positionWidget",category:"Basic",selector:"widget-position",componentClassName:"WidgetPositionComponent"},{name:"Switch Panel",description:"A switch panel group with multiple controls including toggle switches, indicator lights, and press buttons for digital switching ond other operations.",icon:"switchpanelWidget",category:"Basic",selector:"widget-boolean-switch",componentClassName:"WidgetBooleanSwitchComponent"},{name:"Slider",description:"A range slider that allows users to adjust values, such as controlling lighting intensity from 0% to 100%.",icon:"sliderWidget",category:"Basic",selector:"widget-slider",componentClassName:"WidgetSliderComponent"},{name:"Static Label",description:"A static text widget that allows you to add customizable labels to your dashboard, helping to organize and clarify your layout effectively.",icon:"labelWidget",category:"Basic",selector:"widget-label",componentClassName:"WidgetLabelComponent"},{name:"Simple Linear",description:"A simple horizontal linear gauge with a large value label offering a clean, compact modern look.",icon:"simpleLinearGauge",category:"Gauges",selector:"widget-simple-linear",componentClassName:"WidgetSimpleLinearComponent"},{name:"Linear",description:"A horizontal or vertical linear gauge that supports zones highlights. ",icon:"linearGauge",category:"Gauges",selector:"widget-gauge-ng-linear",componentClassName:"WidgetGaugeNgLinearComponent"},{name:"Radial",description:"A radial gauge that supports various configurations, including capacity and measurement dials and zones highlight.",icon:"radialGauge",category:"Gauges",selector:"widget-gauge-ng-radial",componentClassName:"WidgetGaugeNgRadialComponent"},{name:"Compass",description:"A faceplate or card rotating compass gauge with various cardinal point indicator options.",icon:"compassGauge",category:"Gauges",selector:"widget-gauge-ng-compass",componentClassName:"WidgetGaugeNgCompassComponent"},{name:"Steel Style",description:"A traditional steel looking linear & radial gauges replica that supports range sizes and zones highlights.",icon:"steelGauge",category:"Gauges",selector:"widget-gauge-steel",componentClassName:"WidgetSteelGaugeComponent"},{name:"Wind Steering",description:"A wind steering display that combines wind, wind sectors, heading, course over ground and next waypoint information",icon:"windsteeringWidget",category:"Components",selector:"widget-wind-steer",componentClassName:"WidgetWindComponent"},{name:"Freeboard-SK",description:"Add Freeboard-SK Chart Plotter as a widget with auto sign-in to your dashboard.",icon:"freeboardWidget",category:"Components",selector:"widget-freeboardsk",componentClassName:"WidgetFreeboardskComponent"},{name:"Data Chart",description:"Visualize data on a realtime chart with multiple series pre configured such as averages, SMA, EMA and DEMA. The use the Data Chart widget KIP Dataset must be configured.",icon:"datachartWidget",category:"Components",selector:"widget-data-chart",componentClassName:"WidgetDataChartComponent"},{name:"Autopilot Head",description:"A basic Autopilot Head for supported Signal K v1 API autopilot devices.",icon:"autopilotWidget",category:"Components",selector:"widget-autopilot",componentClassName:"WidgetAutopilotComponent"},{name:"Race Timer",description:"A simple race start countdown timer. The timer can be started, paused, reset and the countdown duration specified.",icon:"racetimerWidget",category:"Components",selector:"widget-racetimer",componentClassName:"WidgetRaceTimerComponent"},{name:"Embed Webpage Viewer",description:"Use this widget to embed a view of an external web based applications, such as Grafana graphs, other Signal K Apps and related tools, in your dashboard for a seamless integration. Interactions with the embedded page are not supported.",icon:"embedWidget",category:"Components",selector:"widget-iframe",componentClassName:"WidgetIframeComponent"},{name:"Tutorial",description:"KIP's getting started tutorial widget.",icon:"tutorialWidget",category:"Components",selector:"widget-tutorial",componentClassName:"WidgetTutorialComponent"}];get kipWidgets(){return this._widgetDefinition}get categories(){return this._widgetCategories}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var Qo=(()=>{class o{svgIcon=f.required();iconSize=f.required();name=f.required();description=f.required();constructor(){let e=p(Oa),t=p(Da);e.addSvgIconSet(t.bypassSecurityTrustResourceUrl("assets/svg/icons.svg"))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["widget-list-card"]],inputs:{svgIcon:[1,"svgIcon"],iconSize:[1,"iconSize"],name:[1,"name"],description:[1,"description"]},decls:8,vars:7,consts:[[1,"item-container"],[1,"item-icon"],["aria-hidden","false",3,"svgIcon"],[1,"item-label"],[1,"title","no-text-select"],[1,"description","no-text-select"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"div",1),g(2,"mat-icon",2),i(),n(3,"div",3)(4,"p",4),r(5),i(),n(6,"span",5),r(7),i()()()),t&2&&(s(2),Ct("width",a.iconSize(),"px")("height",a.iconSize(),"px"),d("svgIcon",a.svgIcon()),s(3),w(a.name()),s(2),w(a.description()))},dependencies:[ae,V],styles:["[_nghost-%COMP%]{display:block;text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;padding:0}.item-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch;width:100%;height:100%;margin:0;padding:15px;border:solid 1px var(--mat-sys-outline)}.item-container[_ngcontent-%COMP%]:hover{background-color:var(--mat-sys-inverse-on-surface)}.item-container[_ngcontent-%COMP%]:focus-visible{background-color:var(--mat-sys-surface-bright);outline:-webkit-focus-ring-color auto 0px}.item-icon[_ngcontent-%COMP%]{width:48px}.item-label[_ngcontent-%COMP%]{width:calc(100% - 48px);text-align:left;padding-left:15px}.title[_ngcontent-%COMP%]{cursor:pointer;font-size:var(--mat-sys-label-medium-line-height)}.description[_ngcontent-%COMP%]{cursor:pointer;color:var(--mat-sys-outline)}.no-text-select[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}"]})}return o})();var nr=(o,c)=>c.selector;function rr(o,c){if(o&1&&(n(0,"mat-button-toggle",1),r(1),i()),o&2){let e=c.$implicit;d("value",e),s(),J(" ",e," ")}}function lr(o,c){if(o&1){let e=x();n(0,"widget-list-card",3),b("click",function(){let a=C(e).$implicit,l=u();return M(l.onSelectWidget(a.selector))}),i()}if(o&2){let e=c.$implicit;d("svgIcon",e.icon)("iconSize",48)("name",e.name)("description",e.description)}}var Jo=(()=>{class o{dialogRef=p(ve);_widgets=p(Xo);widgetsList=[];_widgetCategory=X("Basic");constructor(){this.widgetsList=this._widgets.kipWidgets.filter(e=>e.category===this._widgetCategory())}onCategoryChange(e){this.widgetsList=this._widgets.kipWidgets.filter(t=>t.category===e.value),this._widgetCategory.set(e.value)}onSelectWidget(e){this.dialogRef.close(e)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["widgets-list"]],decls:7,vars:1,consts:[["name","widgetCategories","aria-label","Widget categories",1,"list-filter",3,"change","value"],[3,"value"],[3,"svgIcon","iconSize","name","description"],[3,"click","svgIcon","iconSize","name","description"]],template:function(t,a){t&1&&(n(0,"div")(1,"mat-button-toggle-group",0),b("change",function(m){return a.onCategoryChange(m)}),T(2,rr,2,2,"mat-button-toggle",1,G),i(),n(4,"div"),T(5,lr,1,4,"widget-list-card",2,nr),i()()),t&2&&(s(),d("value",a._widgetCategory()),s(),S(a._widgets.categories),s(3),S(a.widgetsList))},dependencies:[Zo,Qt,Wt,Qo],styles:[".list-filter[_ngcontent-%COMP%]{margin-bottom:20px}"]})}return o})();var ei=(()=>{class o{dialogRef=p(ve);fileVersionToUpgrade=9;configVersionToUpgrade=10;currentConfigVersion=11;_storage=p(ka);_settings=p(St);static widgetTypeToSelectorMap={WidgetNumeric:"widget-numeric",WidgetTextGeneric:"widget-text",WidgetDateGeneric:"widget-datetime",WidgetBooleanSwitch:"widget-boolean-switch",WidgetBlank:"widget-blank",WidgetStateComponent:"widget-button",WidgetSimpleLinearComponent:"widget-simple-linear",WidgetGaugeNgLinearComponent:"widget-gauge-ng-linear",WidgetGaugeNgRadialComponent:"widget-gauge-ng-radial",WidgetGaugeNgCompassComponent:"widget-gauge-ng-compass",WidgetGaugeComponent:"widget-gauge-steel",WidgetWindComponent:"widget-wind-steer",WidgetFreeboardskComponent:"widget-freeboardsk",WidgetAutopilotComponent:"widget-autopilot",WidgetDataChart:"widget-data-chart",WidgetRaceTimerComponent:"widget-racetimer",WidgetIframeComponent:"widget-iframe",WidgetTutorial:"widget-tutorial"};upgrade(){if(this._storage.initConfig)this._storage.listConfigs(this.fileVersionToUpgrade).then(e=>gt(this,null,function*(){for(let t of e){let a=yield this.transformConfig(t);if(a)if(a.scope==="global")try{this._storage.patchGlobal(a.name,a.scope,a.newConfiguration,"add"),this._storage.patchGlobal(a.name,a.scope,a.oldConfiguration,"replace",9),console.log(`[Upgrade] Configuration ${a.scope}/${a.name} has been upgraded to version ${this.currentConfigVersion} and saved. Old configuration has been patched to version 0.`)}catch{console.error(`[Upgrade] Error saving configuration for ${t.name}`)}else this._storage.setConfig(a.scope,a.name,a.newConfiguration).then(()=>{this._storage.setConfig(a.scope,a.name,a.oldConfiguration,9),console.log(`[Upgrade] Configuration ${a.scope}/${a.name} has been upgraded to version ${this.currentConfigVersion} and saved. Old configuration has been patched to version 0.`)}).catch(l=>{console.error(`[Upgrade] Error saving configuration for ${t.name}:`,l)})}})).catch(e=>{console.error("Error fetching configuration data:",e)});else{let e={app:null,widget:null,layout:null,theme:null};e.app=this._settings.loadConfigFromLocalStorage("appConfig"),e.widget=this._settings.loadConfigFromLocalStorage("widgetConfig"),e.layout=this._settings.loadConfigFromLocalStorage("layoutConfig"),e.theme=this._settings.loadConfigFromLocalStorage("themeConfig");let t=this.transformApp(e.app),a=this.transformTheme(e.theme),l=e.layout?.rootSplits||[],m=e.layout?.splitSets||[],h=e.widget?.widgets||[],k=l.map(($,Ge)=>{let Ie=this.extractWidgetsFromSplitSets(m,h,$);return{id:$,name:`Dashboard ${Ge+1}`,configuration:Ie}});localStorage.setItem("appConfig",JSON.stringify(t)),localStorage.setItem("dashboardsConfig",JSON.stringify(k)),localStorage.setItem("themeConfig",JSON.stringify(a))}setTimeout(()=>{this._settings.reloadApp()},1500)}transformConfig(e){return gt(this,null,function*(){let t=yield this._storage.getConfig(e.scope,e.name,this.fileVersionToUpgrade);if(t.app.configVersion!==this.configVersionToUpgrade)return console.error(`[Upgrade Component] Configuration ${e.scope}/${e.name} is not an upgradable version ${this.configVersionToUpgrade} config. Skipping upgrade. Please delete old configuration files.`),null;let a=this.transformApp(t.app),l=this.transformTheme(t.theme),m=t.layout?.rootSplits||[],h=t.layout?.splitSets||[],k=t.widget?.widgets||[],$=m.map((Ie,ft)=>{let at=this.extractWidgetsFromSplitSets(h,k,Ie);return{id:Ie,name:`Dashboard ${ft+1}`,configuration:at}}),Ge=xt(t);return Ge.app.configVersion=0,{scope:e.scope,name:e.name,newConfiguration:{app:a,theme:l,dashboards:$},oldConfiguration:Ge}})}transformWidget(e,t){if(e.color==="white"&&(e.color="contrast"),e.textColor){switch(e.textColor){case"text":e.color="contrast";break;case"primary":e.color="blue";break;case"accent":e.color="yellow";break;case"warn":e.color="purple";break;case"nobar":t==="WidgetGaugeNgLinearComponent"&&(e.color="blue",e.gauge=e.gauge||{},e.gauge.useNeedle=!1);break;default:e.color=e.textColor}delete e.textColor}return e}transformApp(e){return e?(e.configVersion=11,e.nightModeBrightness=.27,e):null}transformTheme(e){return e?{themeName:""}:null}extractWidgetsFromSplitSets(e,t,a){let l=new Map(t.map(ot=>[ot.uuid,ot])),m=[],h=[],k=0,$=0,Ge=12,Ie=12,ft=2,at=2,ea=ot=>{let ta=e.find(Ee=>Ee.uuid===ot);if(!ta){h.push(`Missing splitSet with UUID: ${ot}`);return}ta.splitAreas.forEach(Ee=>{if(Ee.type==="widget"){let re=l.get(Ee.uuid);if(re){if(re.type==="WidgetBlank"){console.warn(`Skipping widget of type WidgetBlank with UUID: ${re.uuid}`);return}if($+at>Ie){h.push(`No space left in the grid for widget with UUID: ${re.uuid}`);return}let aa=o.widgetTypeToSelectorMap[re.type]||"widget-unknown",ni=this.transformWidget(re.config,re.type);m.push({id:re.uuid,selector:aa,input:{widgetProperties:{type:aa,uuid:re.uuid,config:ni}},x:k,y:$,w:ft,h:at}),k+=ft,k>=Ge&&(k=0,$+=at)}else h.push(`Missing widget with UUID: ${Ee.uuid}`)}else Ee.type==="splitSet"&&ea(Ee.uuid)})};return ea(a),h.length>0&&console.warn("Transformation Issues:",h),m}startFresh(){if(this._storage.initConfig)this._storage.listConfigs(this.fileVersionToUpgrade).then(e=>gt(this,null,function*(){for(let t of e){let a=yield this._storage.getConfig(t.scope,t.name,this.fileVersionToUpgrade);if(a.app.configVersion=0,t.scope==="global")try{setTimeout(()=>{this._storage.patchGlobal(t.name,t.scope,a,"replace",9),console.log(`[Retired] Configuration ${t.scope}/${t.name} has been patched to version 0.`)},750)}catch{console.error(`[Upgrade] Error saving configuration for ${t.name}:`)}else try{yield this._storage.setConfig(t.scope,t.name,a,9),console.log(`[Retired] Configuration ${t.scope}/${t.name} has been patched to version 0.`)}catch{console.error(`[Upgrade] Error saving configuration for ${t.name}.`)}}})).catch(e=>{console.error("Error fetching configuration data:",e)});else{let e={app:null,dashboards:null,theme:null};e.app=this._settings.loadConfigFromLocalStorage("appConfig"),e.theme=this._settings.loadConfigFromLocalStorage("themeConfig"),e.app.configVersion=11,e.app.nightModeBrightness=.27,e.theme.themeName="",localStorage.setItem("appConfig",JSON.stringify(e.app)),localStorage.setItem("themeConfig",JSON.stringify(e.theme)),localStorage.removeItem("widgetConfig"),localStorage.removeItem("layoutConfig")}this.dialogRef.close()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["upgrade-config"]],decls:75,vars:0,consts:[["href","https://discord.gg/AMDYT2DQga","target","_blank"],[1,"button-group"],["mat-flat-button","",3,"click"],["mat-flat-button","",2,"margin-left","20px",3,"click"]],template:function(t,a){t&1&&(n(0,"h2"),r(1,"Instructions and Upgrade Limitations"),i(),n(2,"p"),r(3,"The new and old widget layout engines are fundamentally different. As a result, migrating the configuration will produce the following:"),i(),n(4,"ul")(5,"li"),r(6,"All KIP configuration settings will be migrated."),i(),n(7,"li"),r(8,"Each v2 Page layout will be migrated to a v3 Dashboard."),i(),n(9,"li"),r(10,"All widgets and their configurations will be migrated and visible in their corresponding v3 Dashboard."),i(),n(11,"li")(12,"strong"),r(13,"Note:"),i(),r(14," Widget positions, order, and sizes "),n(15,"strong"),r(16,"WILL BE LOST"),i(),r(17,". Dashboards will contain small widgets that can be repositioned and resized manually. "),i()(),n(18,"p"),r(19,"To upgrade your configuration, please follow these steps:"),i(),n(20,"ol")(21,"li"),r(22," As a safety measure, if you are using Signal K authentication, manually back up your configuration. Make a copy of the "),n(23,"code"),r(24,"9.0.0.json"),i(),r(25," files found on the Signal K server in the following folders: "),n(26,"ul")(27,"li")(28,"code"),r(29,"~/.signalk/applicationData/users/(username)/kip/"),i()(),n(30,"li")(31,"code"),r(32,"~/.signalk/applicationData/global/kip/"),i()()()(),n(33,"li"),r(34,"Click the "),n(35,"strong"),r(36,"Upgrade"),i(),r(37," button below."),i(),n(38,"li"),r(39,"Once the upgrade is complete, KIP will restart and display the migrated dashboards."),i(),n(40,"li"),r(41," Swipe left, or press "),n(42,"code"),r(43,"Shift + Ctrl + Left Arrow"),i(),r(44," to open the Actions menu. Tap/Click on "),n(45,"strong"),r(46,"Help"),i(),r(47,` and read "The Basics" and "Dashboards and Layout." We promise, it's a quick read. `),i(),n(48,"li"),r(49,"Reposition and resize your widgets as needed."),i(),n(50,"li"),r(51,"Once satisfied, proceed to deleting the "),n(52,"code"),r(53,"9.0.0.json"),i(),r(54," configuration files located in the previously mentioned folders. They are not needed any more."),i(),n(55,"li"),r(56," If you need support, join the "),n(57,"a",0),r(58,"Signal K #kip Discord channel"),i(),r(59,". "),i(),n(60,"li"),r(61,"Enjoy the new features and improvements!"),i()(),n(62,"p"),r(63," If you prefer not to upgrade your configuration, you "),n(64,"strong"),r(65,"MUST MANUALLY DELETE"),i(),r(66," the "),n(67,"code"),r(68,"9.0.0.json"),i(),r(69,` files from the previously mentioned server folders.
7
+ `),i(),n(70,"div",1)(71,"button",2),b("click",function(){return a.upgrade()}),r(72,"Upgrade"),i(),n(73,"button",3),b("click",function(){return a.startFresh()}),r(74,"Start Fresh"),i()())},dependencies:[Se,oe,_e],styles:[".button-group[_ngcontent-%COMP%]{display:flex;justify-content:center}"]})}return o})();var Gd=(()=>{class o{dialog=p(ao);openFrameDialog(e,t){switch(e.component){case"select-widget":e.componentType=Jo;break;case"upgrade-config":e.componentType=ei;break}return this.dialog.open(Ao,{data:e,height:t?"calc(100% - 30px)":"",width:t?"calc(100% - 30px)":"",maxWidth:t?"100%":"",maxHeight:t?"100%":""}).afterClosed()}openConfirmationDialog(e){return this.dialog.open(Go,{data:e,minWidth:"35vw",minHeight:"25vh"}).afterClosed()}openNameDialog(e){return this.dialog.open(ko,{data:e,minWidth:"20vw",minHeight:"20vh",disableClose:!0})}openWidgetOptions(e){return this.dialog.open(Ko,{data:e.config,minWidth:"50vw",maxWidth:"90vw"})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var ti=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],ce=(()=>{if(typeof document>"u")return!1;let o=ti[0],c={};for(let e of ti)if(e?.[1]in document){for(let[a,l]of e.entries())c[o[a]]=l;return c}return!1})(),ai={change:ce.fullscreenchange,error:ce.fullscreenerror},W={request(o=document.documentElement,c){return new Promise((e,t)=>{let a=()=>{W.off("change",a),e()};W.on("change",a);let l=o[ce.requestFullscreen](c);l instanceof Promise&&l.then(a).catch(t)})},exit(){return new Promise((o,c)=>{if(!W.isFullscreen){o();return}let e=()=>{W.off("change",e),o()};W.on("change",e);let t=document[ce.exitFullscreen]();t instanceof Promise&&t.then(e).catch(c)})},toggle(o,c){return W.isFullscreen?W.exit():W.request(o,c)},onchange(o){W.on("change",o)},onerror(o){W.on("error",o)},on(o,c){let e=ai[o];e&&document.addEventListener(e,c,!1)},off(o,c){let e=ai[o];e&&document.removeEventListener(e,c,!1)},raw:ce};Object.defineProperties(W,{isFullscreen:{get:()=>!!document[ce.fullscreenElement]},element:{enumerable:!0,get:()=>document[ce.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>!!document[ce.fullscreenEnabled]}});ce||(W={isEnabled:!1});var de=W;var Pd=(()=>{class o{isDragging=X(!1);fullscreenStatus=X(!1);fullscreenSupported=X(!0);noSleepStatus=X(!1);noSleepSupported=X(!0);noSleep=new NoSleep;initialTouchX=null;initialTouchY=null;hotkeyListeners=new Map;constructor(){de.isEnabled?de.on("change",()=>{this.fullscreenStatus.set(de.isFullscreen),de.isFullscreen||this.noSleep.disable()}):(this.fullscreenSupported.set(!1),console.log("[Actions Menu] Fullscreen mode is not supported by device/browser.")),this.checkNoSleepSupport(),this.checkPwaMode()&&this.noSleepSupported()&&!this.noSleepStatus()&&this.toggleNoSleep()}checkNoSleepSupport(){try{if(this.noSleep=new NoSleep,typeof this.noSleep.enable!="function"||typeof this.noSleep.disable!="function")throw new Error("[Actions Menu] NoSleep methods not available")}catch{this.noSleepSupported.set(!1),console.warn("[Actions Menu] NoSleep is not supported by this device/browser.")}}checkPwaMode(){let e=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone!==void 0;return console.log("[Actions Menu] PWA mode:",e),e}toggleNoSleep(){this.noSleepSupported()&&(this.noSleepStatus()?this.noSleep.disable():this.noSleep.enable(),this.noSleepStatus.set(!this.noSleepStatus()),console.log("[Actions Menu] NoSleep active:",this.noSleepStatus()))}toggleFullScreen(){de.isEnabled?(this.fullscreenStatus()?(de.isFullscreen&&de.exit(),this.noSleep.disable()):(de.request(),this.noSleep.enable()),this.fullscreenStatus.set(!this.fullscreenStatus())):(this.fullscreenSupported.set(!1),console.log("[Actions Menu] Fullscreen mode is not supported by this browser."))}addGestureListeners(e,t){let a=this.preventBrowserHistorySwipeGestures.bind(this);document.addEventListener("openLeftSidenav",e),document.addEventListener("openRightSidenav",t),document.addEventListener("touchstart",a,{passive:!1}),document.addEventListener("touchmove",a,{passive:!1}),document.addEventListener("touchend",a),document.addEventListener("touchcancel",a)}removeGestureListeners(e,t){let a=this.preventBrowserHistorySwipeGestures.bind(this);document.removeEventListener("openLeftSidenav",e),document.removeEventListener("openRightSidenav",t),document.removeEventListener("touchstart",a),document.removeEventListener("touchmove",a),document.removeEventListener("touchend",a),document.removeEventListener("touchcancel",a)}preventBrowserHistorySwipeGestures(e){if(e.touches.length===1){let t=e.touches[0],a=30;if(e.type==="touchstart")this.initialTouchX=t.clientX,this.initialTouchY=t.clientY;else if(e.type==="touchmove"&&this.initialTouchX!==null&&this.initialTouchY!==null){let l=Math.abs(t.clientX-this.initialTouchX),m=Math.abs(t.clientY-this.initialTouchY);l>10&&l>m&&(this.initialTouchX<a||this.initialTouchX>window.innerWidth-a)&&e.preventDefault(),m>10&&this.initialTouchY<50&&e.preventDefault()}else(e.type==="touchend"||e.type==="touchcancel")&&(this.initialTouchX=null,this.initialTouchY=null)}}addHotkeyListener(e,t){let a=l=>{if(l instanceof KeyboardEvent){let m=l.key.toLowerCase();if(t&&(t.keys&&!t.keys.includes(m)||t.ctrlKey!==void 0&&l.ctrlKey!==t.ctrlKey||t.shiftKey!==void 0&&l.shiftKey!==t.shiftKey))return;e(m,l)}else console.warn("[uiEvent Service] Non-keyboard event detected in addHotkeyListener:",l)};this.hotkeyListeners.set(e,a),document.addEventListener("keydown",a)}removeHotkeyListener(e){let t=this.hotkeyListeners.get(e);t&&(document.removeEventListener("keydown",t),this.hotkeyListeners.delete(e))}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function sr(o,c){}var oi="_mat-bottom-sheet-enter",ii="_mat-bottom-sheet-exit",cr=(()=>{class o extends Ja{_breakpointSubscription;_animationsDisabled=p(Be,{optional:!0})==="NoopAnimations";_animationState="void";_animationStateChanged=new Z;_destroyed;constructor(){super();let e=p(wt);this._breakpointSubscription=e.observe([se.Medium,se.Large,se.XLarge]).subscribe(()=>{let t=this._elementRef.nativeElement.classList;t.toggle("mat-bottom-sheet-container-medium",e.isMatched(se.Medium)),t.toggle("mat-bottom-sheet-container-large",e.isMatched(se.Large)),t.toggle("mat-bottom-sheet-container-xlarge",e.isMatched(se.XLarge))})}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._animationsDisabled&&this._simulateAnimation(oi))}exit(){this._destroyed||(this._elementRef.nativeElement.setAttribute("mat-exit",""),this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._animationsDisabled&&this._simulateAnimation(ii))}ngOnDestroy(){super.ngOnDestroy(),this._breakpointSubscription.unsubscribe(),this._destroyed=!0}_simulateAnimation(e){this._ngZone.run(()=>{this._handleAnimationEvent(!0,e),setTimeout(()=>this._handleAnimationEvent(!1,e))})}_trapFocus(){super._trapFocus({preventScroll:!0})}_handleAnimationEvent(e,t){let a=t===oi;(a||t===ii)&&this._animationStateChanged.emit({toState:a?"visible":"hidden",phase:e?"start":"done"})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["mat-bottom-sheet-container"]],hostAttrs:["tabindex","-1",1,"mat-bottom-sheet-container"],hostVars:9,hostBindings:function(t,a){t&1&&b("animationstart",function(m){return a._handleAnimationEvent(!0,m.animationName)})("animationend",function(m){return a._handleAnimationEvent(!1,m.animationName)})("animationcancel",function(m){return a._handleAnimationEvent(!1,m.animationName)}),t&2&&(le("role",a._config.role)("aria-modal",a._config.ariaModal)("aria-label",a._config.ariaLabel),Q("mat-bottom-sheet-container-animations-enabled",!a._animationsDisabled)("mat-bottom-sheet-container-enter",a._animationState==="visible")("mat-bottom-sheet-container-exit",a._animationState==="hidden"))},features:[ga],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,a){t&1&&_(0,sr,0,0,"ng-template",0)},dependencies:[Ka],styles:[`@keyframes _mat-bottom-sheet-enter{from{transform:translateY(100%)}to{transform:none}}@keyframes _mat-bottom-sheet-exit{from{transform:none}to{transform:translateY(100%)}}.mat-bottom-sheet-container{box-shadow:0px 8px 10px -5px rgba(0, 0, 0, 0.2), 0px 16px 24px 2px rgba(0, 0, 0, 0.14), 0px 6px 30px 5px rgba(0, 0, 0, 0.12);padding:8px 16px;min-width:100vw;box-sizing:border-box;display:block;outline:0;max-height:80vh;overflow:auto;position:relative;background:var(--mat-bottom-sheet-container-background-color, var(--mat-sys-surface-container-low));color:var(--mat-bottom-sheet-container-text-color, var(--mat-sys-on-surface));font-family:var(--mat-bottom-sheet-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-bottom-sheet-container-text-size, var(--mat-sys-body-large-size));line-height:var(--mat-bottom-sheet-container-text-line-height, var(--mat-sys-body-large-line-height));font-weight:var(--mat-bottom-sheet-container-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-bottom-sheet-container-text-tracking, var(--mat-sys-body-large-tracking))}@media(forced-colors: active){.mat-bottom-sheet-container{outline:1px solid}}.mat-bottom-sheet-container-animations-enabled{transform:translateY(100%)}.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-enter{animation:_mat-bottom-sheet-enter 195ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-exit{animation:_mat-bottom-sheet-exit 375ms cubic-bezier(0.4, 0, 1, 1) backwards}.mat-bottom-sheet-container-xlarge,.mat-bottom-sheet-container-large,.mat-bottom-sheet-container-medium{border-top-left-radius:var(--mat-bottom-sheet-container-shape, 28px);border-top-right-radius:var(--mat-bottom-sheet-container-shape, 28px)}.mat-bottom-sheet-container-medium{min-width:384px;max-width:calc(100vw - 128px)}.mat-bottom-sheet-container-large{min-width:512px;max-width:calc(100vw - 256px)}.mat-bottom-sheet-container-xlarge{min-width:576px;max-width:calc(100vw - 384px)}
8
+ `],encapsulation:2})}return o})(),dr=new Y("MatBottomSheetData"),Jt=class{viewContainerRef;panelClass;direction;data=null;hasBackdrop=!0;backdropClass;disableClose=!1;ariaLabel=null;ariaModal=!1;closeOnNavigation=!0;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;height="";minHeight;maxHeight},qt=class{_ref;get instance(){return this._ref.componentInstance}get componentRef(){return this._ref.componentRef}containerInstance;disableClose;_afterOpened=new it;_result;_closeFallbackTimeout;constructor(c,e,t){this._ref=c,this.containerInstance=t,this.disableClose=e.disableClose,t._animationStateChanged.pipe(pe(a=>a.phase==="done"&&a.toState==="visible"),Le(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),t._animationStateChanged.pipe(pe(a=>a.phase==="done"&&a.toState==="hidden"),Le(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._ref.close(this._result)}),c.overlayRef.detachments().subscribe(()=>{this._ref.close(this._result)}),Oe(this.backdropClick(),this.keydownEvents().pipe(pe(a=>a.keyCode===27))).subscribe(a=>{!this.disableClose&&(a.type!=="keydown"||!He(a))&&(a.preventDefault(),this.dismiss())})}dismiss(c){this.containerInstance&&(this.containerInstance._animationStateChanged.pipe(pe(e=>e.phase==="start"),Le(1)).subscribe(()=>{this._closeFallbackTimeout=setTimeout(()=>this._ref.close(this._result),500),this._ref.overlayRef.detachBackdrop()}),this._result=c,this.containerInstance.exit(),this.containerInstance=null)}afterDismissed(){return this._ref.closed}afterOpened(){return this._afterOpened}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}},mr=new Y("mat-bottom-sheet-default-options"),pr=(()=>{class o{_overlay=p(Ke);_parentBottomSheet=p(o,{optional:!0,skipSelf:!0});_defaultOptions=p(mr,{optional:!0});_bottomSheetRefAtThisLevel=null;_dialog=p(eo);get _openedBottomSheetRef(){let e=this._parentBottomSheet;return e?e._openedBottomSheetRef:this._bottomSheetRefAtThisLevel}set _openedBottomSheetRef(e){this._parentBottomSheet?this._parentBottomSheet._openedBottomSheetRef=e:this._bottomSheetRefAtThisLevel=e}constructor(){}open(e,t){let a=me(me({},this._defaultOptions||new Jt),t),l;return this._dialog.open(e,Fe(me({},a),{disableClose:!0,closeOnOverlayDetachments:!1,maxWidth:"100%",container:cr,scrollStrategy:a.scrollStrategy||this._overlay.scrollStrategies.block(),positionStrategy:this._overlay.position().global().centerHorizontally().bottom("0"),templateContext:()=>({bottomSheetRef:l}),providers:(m,h,k)=>(l=new qt(m,a,k),[{provide:qt,useValue:l},{provide:dr,useValue:a.data}])})),l.afterDismissed().subscribe(()=>{this._openedBottomSheetRef===l&&(this._openedBottomSheetRef=null)}),this._openedBottomSheetRef?(this._openedBottomSheetRef.afterDismissed().subscribe(()=>l.containerInstance?.enter()),this._openedBottomSheetRef.dismiss()):l.containerInstance.enter(),this._openedBottomSheetRef=l,l}dismiss(e){this._openedBottomSheetRef&&this._openedBottomSheetRef.dismiss(e)}ngOnDestroy(){this._bottomSheetRefAtThisLevel&&this._bottomSheetRefAtThisLevel.dismiss()}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),Zd=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=ge({type:o});static \u0275inj=ue({providers:[pr],imports:[to,q,$a,q]})}return o})();export{yr as a,yl as b,Fo as c,Gd as d,Pd as e,qt as f,pr as g,Zd as h};
@@ -0,0 +1 @@
1
+ import{g as c,k as s,q as p}from"./chunk-2HWSXOJH.js";import{Va as i,dd as a,m as n,o as m,oa as g,ua as l}from"./chunk-JZ455OYD.js";var u="3.3.0-beta.2";var D=(()=>{class o{MODE_PATH="self.environment.mode";configurableThemeColors=[{label:"Contrast",value:"contrast"},{label:"Blue",value:"blue"},{label:"Green",value:"green"},{label:"Orange",value:"orange"},{label:"Yellow",value:"yellow"},{label:"Pink",value:"pink"},{label:"Purple",value:"purple"},{label:"Grey",value:"grey"}];snackbarAppNotifications=new n;cssThemeColorRoles$=new m(null);_cssThemeColorRoles=null;_settings=l(c);_data=l(p);isNightMode=i(!1);_useAutoNightMode=s(this._settings.getAutoNightModeAsO(),{requireSync:!0});_theme=s(this._settings.getThemeNameAsO(),{requireSync:!0});_redNightMode=s(this._settings.getRedNightModeAsO(),{requireSync:!0});_environmentMode=s(this._data.subscribePath(this.MODE_PATH,"default"));appVersion=i(u);browserVersion=i("Unknown");osVersion=i("Unknown");constructor(){a(()=>{this._theme()==="light-theme"?document.body.classList.toggle("light-theme",this._theme()==="light-theme"):document.body.classList.remove("light-theme")}),a(()=>{let t=this._environmentMode().data.value;this._useAutoNightMode()&&(this.isNightMode.set(t==="night"),this.toggleDayNightMode())}),a(()=>{this._redNightMode()?this.toggleDayNightMode():this.toggleDayNightMode()}),this.readThemeCssRoleVariables(),this._cssThemeColorRoles=this.cssThemeColorRoles$.getValue(),this.browserVersion.set(this.getBrowserVersion()),this.osVersion.set(this.getOSVersion()),console.log("*********** KIP Version Information ***********"),console.log(`** App Version: ${this.appVersion()}`),console.log(`** Browser Version: ${this.browserVersion()}`),console.log(`** OS Version: ${this.osVersion()}`),console.log("***********************************************")}sendSnackbarNotification(t,e=1e4,r=!1){this.snackbarAppNotifications.next({message:t,duration:e,silent:r})}getSnackbarAppNotifications(){return this.snackbarAppNotifications.asObservable()}readThemeCssRoleVariables(){let t=document.body,e=getComputedStyle(t),r={background:e.getPropertyValue("--mat-sys-background").trim(),cardColor:e.getPropertyValue("--kip-widget-card-background-color").trim(),blue:e.getPropertyValue("--kip-blue-color").trim(),blueDim:e.getPropertyValue("--kip-blue-dim-color").trim(),blueDimmer:e.getPropertyValue("--kip-blue-dimmer-color").trim(),green:e.getPropertyValue("--kip-green-color").trim(),greenDim:e.getPropertyValue("--kip-green-dim-color").trim(),greenDimmer:e.getPropertyValue("--kip-green-dimmer-color").trim(),grey:e.getPropertyValue("--kip-grey-color").trim(),greyDim:e.getPropertyValue("--kip-grey-dim-color").trim(),greyDimmer:e.getPropertyValue("--kip-grey-dimmer-color").trim(),orange:e.getPropertyValue("--kip-orange-color").trim(),orangeDim:e.getPropertyValue("--kip-orange-dim-color").trim(),orangeDimmer:e.getPropertyValue("--kip-orange-dimmer-color").trim(),pink:e.getPropertyValue("--kip-pink-color").trim(),pinkDim:e.getPropertyValue("--kip-pink-dim-color").trim(),pinkDimmer:e.getPropertyValue("--kip-pink-dimmer-color").trim(),purple:e.getPropertyValue("--kip-purple-color").trim(),purpleDim:e.getPropertyValue("--kip-purple-dim-color").trim(),purpleDimmer:e.getPropertyValue("--kip-purple-dimmer-color").trim(),contrast:e.getPropertyValue("--kip-contrast-color").trim(),contrastDim:e.getPropertyValue("--kip-contrast-dim-color").trim(),contrastDimmer:e.getPropertyValue("--kip-contrast-dimmer-color").trim(),yellow:e.getPropertyValue("--kip-yellow-color").trim(),yellowDim:e.getPropertyValue("--kip-yellow-dim-color").trim(),yellowDimmer:e.getPropertyValue("--kip-yellow-dimmer-color").trim(),port:e.getPropertyValue("--kip-port-color").trim(),starboard:e.getPropertyValue("--kip-starboard-color").trim(),zoneNominal:e.getPropertyValue("--kip-zone-nominal-color").trim(),zoneAlert:e.getPropertyValue("--kip-zone-alert-color").trim(),zoneWarn:e.getPropertyValue("--kip-zone-warn-color").trim(),zoneAlarm:e.getPropertyValue("--kip-zone-alarm-color").trim(),zoneEmergency:e.getPropertyValue("--kip-zone-emergency-color").trim()};this.cssThemeColorRoles$.next(r)}get cssThemeColors(){return this._cssThemeColorRoles}setBrightness(t,e=!1){let r=document.body;r.style.setProperty("--kip-nightModeBrightness",`${t}`);let h=e?" sepia(0.5) hue-rotate(-30deg)":"";r.style.setProperty("--kip-nightModeFilters",h)}toggleDayNightMode(){this.isNightMode()?this._redNightMode()?(document.body.classList.toggle("night-theme",!0),this.setBrightness(1,!1)):(this.setBrightness(this._settings.getNightModeBrightness(),!0),document.body.classList.remove("night-theme"),this._theme()==="light-theme"?document.body.classList.toggle("light-theme",this._theme()==="light-theme"):document.body.classList.remove("light-theme")):(document.body.classList.remove("night-theme"),this._theme()==="light-theme"&&document.body.classList.toggle("light-theme",this._theme()==="light-theme"),this.setBrightness(1,!1)),this.readThemeCssRoleVariables(),this._cssThemeColorRoles=this.cssThemeColorRoles$.getValue()}getBrowserVersion(){let t=navigator.userAgent,e="Unknown";return t.includes("Edg")?e=`Edge ${t.match(/Edg\/(\d+)/)?.[1]}`:t.includes("Chrome")&&!t.includes("Edg")&&!t.includes("Chromium")?e=`Chrome ${t.match(/Chrome\/(\d+)/)?.[1]}`:t.includes("Chromium")?e=`Chromium ${t.match(/Chromium\/(\d+)/)?.[1]}`:t.includes("Firefox")?e=`Firefox ${t.match(/Firefox\/(\d+)/)?.[1]}`:t.includes("Safari")&&!t.includes("Chrome")&&!t.includes("Chromium")?e=`Safari ${t.match(/Version\/(\d+)/)?.[1]}`:(t.includes("Opera")||t.includes("OPR"))&&(e=`Opera ${t.match(/(Opera|OPR)\/(\d+)/)?.[2]}`),e}getOSVersion(){let t=navigator.platform,e=navigator.userAgent;return t.startsWith("Mac")?"macOS":t.startsWith("Win")?"Windows":/Linux/.test(t)?e.includes("ARM")||e.includes("aarch64")||e.includes("Raspberry")||t.includes("armv7l")||t.includes("armv8l")?"Raspberry Pi":"Linux":"Unknown OS"}static \u0275fac=function(e){return new(e||o)};static \u0275prov=g({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{D as a};
@@ -1,4 +1,4 @@
1
- import{g as Et}from"./chunk-6QHCHGTT.js";import{$a as bt,$b as J,$c as se,Ad as A,Ae as Fe,Bb as W,Ce as Ht,Da as dt,Dc as Rt,Ea as Y,Ec as St,Ed as It,Fa as X,Ga as mt,H as ot,Hb as N,Ib as Ie,Id as Pt,J as L,Jb as Ee,Jd as At,K as at,Ka as Re,Nb as Pe,Nd as Ot,Ne as qt,Oa as E,Oc as De,Pa as Se,Pe as Ut,Q as lt,R as ct,Rc as Le,Sc as $e,Se as fe,Ta as z,Td as Ne,U as ut,Vd as Dt,Ve as Vt,Wa as ft,Xb as yt,Xc as ie,Yb as K,Zb as Ae,_a as gt,a as f,b as T,bc as wt,da as ht,dc as vt,de as Lt,eb as kt,ee as $t,f as rt,fa as $,fd as ze,g as he,ga as G,ge as zt,ha as pe,ic as P,jc as B,kc as Oe,ke as Nt,le as Be,m as C,oa as pt,oc as Mt,pa as Te,pb as _t,qc as F,ra as w,rc as j,re as Bt,sc as ee,se as Ft,t as Z,ta as I,tc as H,ua as g,ub as Q,ud as Ct,ue as jt,vc as me,wb as Ce,wc as Tt,xc as te,yb as xt,yc as ne,z as Me,zb as de}from"./chunk-Y7X77HSW.js";function qe(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var D=qe();function Wt(a){D=a}var ae={exec:()=>null};function b(a,i=""){let e=typeof a=="string"?a:a.source,t={replace:(n,s)=>{let r=typeof s=="string"?s:s.source;return r=r.replace(x.caret,"$1"),e=e.replace(n,r),t},getRegex:()=>new RegExp(e,i)};return t}var x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:a=>new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}#`),htmlBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}<(?:[a-z].*>|!--)`,"i")},kn=/^(?:[ \t]*(?:\n|$))+/,_n=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ce=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,yn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ue=/(?:[*+-]|\d{1,9}[.)])/,Kt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Jt=b(Kt).replace(/bull/g,Ue).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),wn=b(Kt).replace(/bull/g,Ue).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ve=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,vn=/^[^\n]+/,Ze=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Mn=b(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ze).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Tn=b(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ue).getRegex(),ke="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ge=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Rn=b("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ge).replace("tag",ke).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),en=b(Ve).replace("hr",ce).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ke).getRegex(),Sn=b(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",en).getRegex(),Ye={blockquote:Sn,code:_n,def:Mn,fences:xn,heading:yn,hr:ce,html:Rn,lheading:Jt,list:Tn,newline:kn,paragraph:en,table:ae,text:vn},Zt=b("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ce).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ke).getRegex(),Cn=T(f({},Ye),{lheading:wn,table:Zt,paragraph:b(Ve).replace("hr",ce).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Zt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ke).getRegex()}),In=T(f({},Ye),{html:b(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ge).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ae,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:b(Ve).replace("hr",ce).replace("heading",` *#{1,6} *[^
1
+ import{g as Et}from"./chunk-UXHQY4AJ.js";import{$a as bt,$b as J,$c as se,Bb as W,Cd as A,Ce as Fe,Da as dt,Dc as Rt,Ea as Y,Ec as St,Ee as Ht,Fa as X,Ga as mt,Gd as It,H as ot,Hb as N,Ib as Ie,J as L,Jb as Ee,K as at,Ka as Re,Kd as Pt,Ld as At,Nb as Pe,Oa as E,Oc as De,Pa as Se,Pd as Ot,Pe as qt,Q as lt,R as ct,Rc as Le,Re as Ut,Sc as $e,Ta as z,U as ut,Ue as fe,Vd as Ne,Wa as ft,Xb as yt,Xc as ie,Xd as Dt,Xe as Vt,Yb as K,Zb as Ae,_a as gt,a as f,b as T,bc as wt,da as ht,dc as vt,eb as kt,f as rt,fa as $,fe as Lt,g as he,ga as G,gd as ze,ge as $t,ha as pe,ic as P,ie as zt,jc as B,kc as Oe,m as C,me as Nt,ne as Be,oa as pt,oc as Mt,pa as Te,pb as _t,qc as F,ra as w,rc as j,sc as ee,t as Z,ta as I,tc as H,te as Bt,ua as g,ub as Q,ue as Ft,vc as me,vd as Ct,wb as Ce,wc as Tt,we as jt,xc as te,yb as xt,yc as ne,z as Me,zb as de}from"./chunk-JZ455OYD.js";function qe(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var D=qe();function Wt(a){D=a}var ae={exec:()=>null};function b(a,i=""){let e=typeof a=="string"?a:a.source,t={replace:(n,s)=>{let r=typeof s=="string"?s:s.source;return r=r.replace(x.caret,"$1"),e=e.replace(n,r),t},getRegex:()=>new RegExp(e,i)};return t}var x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:a=>new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}#`),htmlBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}<(?:[a-z].*>|!--)`,"i")},kn=/^(?:[ \t]*(?:\n|$))+/,_n=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ce=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,yn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ue=/(?:[*+-]|\d{1,9}[.)])/,Kt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Jt=b(Kt).replace(/bull/g,Ue).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),wn=b(Kt).replace(/bull/g,Ue).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ve=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,vn=/^[^\n]+/,Ze=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Mn=b(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ze).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Tn=b(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ue).getRegex(),ke="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ge=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Rn=b("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ge).replace("tag",ke).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),en=b(Ve).replace("hr",ce).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ke).getRegex(),Sn=b(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",en).getRegex(),Ye={blockquote:Sn,code:_n,def:Mn,fences:xn,heading:yn,hr:ce,html:Rn,lheading:Jt,list:Tn,newline:kn,paragraph:en,table:ae,text:vn},Zt=b("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ce).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ke).getRegex(),Cn=T(f({},Ye),{lheading:wn,table:Zt,paragraph:b(Ve).replace("hr",ce).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Zt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ke).getRegex()}),In=T(f({},Ye),{html:b(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ge).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ae,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:b(Ve).replace("hr",ce).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",Jt).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),En=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Pn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,tn=/^( {2,}|\\)\n(?!\s*$)/,An=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,_e=/[\p{P}\p{S}]/u,Xe=/[\s\p{P}\p{S}]/u,nn=/[^\s\p{P}\p{S}]/u,On=b(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Xe).getRegex(),sn=/(?!~)[\p{P}\p{S}]/u,Dn=/(?!~)[\s\p{P}\p{S}]/u,Ln=/(?:[^\s\p{P}\p{S}]|~)/u,$n=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,rn=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,zn=b(rn,"u").replace(/punct/g,_e).getRegex(),Nn=b(rn,"u").replace(/punct/g,sn).getRegex(),on="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Bn=b(on,"gu").replace(/notPunctSpace/g,nn).replace(/punctSpace/g,Xe).replace(/punct/g,_e).getRegex(),Fn=b(on,"gu").replace(/notPunctSpace/g,Ln).replace(/punctSpace/g,Dn).replace(/punct/g,sn).getRegex(),jn=b("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,nn).replace(/punctSpace/g,Xe).replace(/punct/g,_e).getRegex(),Hn=b(/\\(punct)/,"gu").replace(/punct/g,_e).getRegex(),qn=b(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Un=b(Ge).replace("(?:-->|$)","-->").getRegex(),Vn=b("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Un).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),be=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Zn=b(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",be).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),an=b(/^!?\[(label)\]\[(ref)\]/).replace("label",be).replace("ref",Ze).getRegex(),ln=b(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ze).getRegex(),Gn=b("reflink|nolink(?!\\()","g").replace("reflink",an).replace("nolink",ln).getRegex(),Qe={_backpedal:ae,anyPunctuation:Hn,autolink:qn,blockSkip:$n,br:tn,code:Pn,del:ae,emStrongLDelim:zn,emStrongRDelimAst:Bn,emStrongRDelimUnd:jn,escape:En,link:Zn,nolink:ln,punctuation:On,reflink:an,reflinkSearch:Gn,tag:Vn,text:An,url:ae},Yn=T(f({},Qe),{link:b(/^!?\[(label)\]\((.*?)\)/).replace("label",be).getRegex(),reflink:b(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",be).getRegex()}),je=T(f({},Qe),{emStrongRDelimAst:Fn,emStrongLDelim:Nn,url:b(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Xn=T(f({},je),{br:b(tn).replace("{2,}","*").getRegex(),text:b(je.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),ge={normal:Ye,gfm:Cn,pedantic:In},re={normal:Qe,gfm:je,breaks:Xn,pedantic:Yn},Qn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Gt=a=>Qn[a];function R(a,i){if(i){if(x.escapeTest.test(a))return a.replace(x.escapeReplace,Gt)}else if(x.escapeTestNoEncode.test(a))return a.replace(x.escapeReplaceNoEncode,Gt);return a}function Yt(a){try{a=encodeURI(a).replace(x.percentDecode,"%")}catch{return null}return a}function Xt(a,i){let e=a.replace(x.findPipe,(s,r,o)=>{let l=!1,c=r;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),t=e.split(x.splitPipe),n=0;if(t[0].trim()||t.shift(),t.length>0&&!t.at(-1)?.trim()&&t.pop(),i)if(t.length>i)t.splice(i);else for(;t.length<i;)t.push("");for(;n<t.length;n++)t[n]=t[n].trim().replace(x.slashPipe,"|");return t}function oe(a,i,e){let t=a.length;if(t===0)return"";let n=0;for(;n<t&&a.charAt(t-n-1)===i;)n++;return a.slice(0,t-n)}function Wn(a,i){if(a.indexOf(i[1])===-1)return-1;let e=0;for(let t=0;t<a.length;t++)if(a[t]==="\\")t++;else if(a[t]===i[0])e++;else if(a[t]===i[1]&&(e--,e<0))return t;return-1}function Qt(a,i,e,t,n){let s=i.href,r=i.title||null,o=a[1].replace(n.other.outputLinkReplace,"$1");if(a[0].charAt(0)!=="!"){t.state.inLink=!0;let l={type:"link",raw:e,href:s,title:r,text:o,tokens:t.inlineTokens(o)};return t.state.inLink=!1,l}return{type:"image",raw:e,href:s,title:r,text:o}}function Kn(a,i,e){let t=a.match(e.other.indentCodeCompensation);if(t===null)return i;let n=t[1];return i.split(`
3
3
  `).map(s=>{let r=s.match(e.other.beginningSpace);if(r===null)return s;let[o]=r;return o.length>=n.length?s.slice(n.length):s}).join(`
4
4
  `)}var U=class{options;rules;lexer;constructor(i){this.options=i||D}space(i){let e=this.rules.block.newline.exec(i);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(i){let e=this.rules.block.code.exec(i);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:oe(t,`