@mxtommy/kip 3.6.0 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/copilot-instructions.md +80 -0
- package/CHANGELOG.md +21 -0
- package/package.json +1 -1
- package/public/assets/help-docs/datainspector.md +4 -3
- package/public/assets/help-docs/embedwidget.md +5 -5
- package/public/assets/help-docs/putcontrols.md +5 -5
- package/public/assets/help-docs/welcome.md +18 -18
- package/public/assets/help-docs/zones.md +4 -2
- package/public/assets/svg/icons.svg +31 -0
- package/public/{chunk-JZEMHV7X.js → chunk-26NZEHY5.js} +1 -1
- package/public/chunk-2BAYNCPQ.js +2 -0
- package/public/chunk-3DQV466V.js +11 -0
- package/public/chunk-5LQ6SLDH.js +1 -0
- package/public/{chunk-DDLXDXAN.js → chunk-74XVS6H6.js} +3 -3
- package/public/{chunk-LQXT5QU5.js → chunk-AH7D3GG5.js} +1 -1
- package/public/{chunk-APR77K7T.js → chunk-BGFEFM5V.js} +1 -1
- package/public/{chunk-QUKRYVOD.js → chunk-BOUFMQO7.js} +4 -4
- package/public/{chunk-VFN5BCAV.js → chunk-G55JMUID.js} +1 -1
- package/public/{chunk-EWQMXDVS.js → chunk-JO2PGH4G.js} +1 -1
- package/public/{chunk-SH2SNQAZ.js → chunk-NZ5HE75L.js} +2 -2
- package/public/{chunk-6GBGV2WH.js → chunk-SQZ5Y2UZ.js} +1 -1
- package/public/{chunk-6LMDGW4F.js → chunk-T5MW4GJK.js} +1 -1
- package/public/chunk-W2ETB57D.js +1 -0
- package/public/{chunk-7QVU5UVU.js → chunk-WYMWTXIV.js} +1 -1
- package/public/{chunk-5DPJ24CX.js → chunk-YZBZ2AEV.js} +1 -1
- package/public/index.html +1 -1
- package/public/main-MXFIK2ND.js +237 -0
- package/public/chunk-7X5WCXML.js +0 -1
- package/public/chunk-CIFNDNHY.js +0 -1
- package/public/chunk-EVB7P3BA.js +0 -2
- package/public/chunk-OINWO55B.js +0 -10
- package/public/main-H5C4CMYU.js +0 -237
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$b as yt,$d as uo,A as Se,Aa as Jr,Ab as E,Ac as no,B as Pr,Cb as zt,Fa as _t,Fb as he,G as Ur,Gb as H,H as Lr,I as jr,Ia as Zr,Ja as ne,Jd as Be,K as $r,L as Le,M as je,Mc as w,N as Wr,Na as Ce,Nb as Xr,Nd as z,Oa as pe,Qa as X,Rb as se,Sb as U,Tb as L,Uc as ao,Ud as ze,V as Hr,Wc as ge,Xc as ce,Yb as $e,Yc as so,Yd as Ji,Zb as K,_ as Br,_b as Q,a as $,ac as eo,b as Y,bc as to,bd as Ct,cc as zi,cd as lo,da as zr,ed as Gt,ee as mo,f as W,fa as Gr,g as $t,ga as qr,gc as io,h as Or,ha as Ht,hc as xt,ia as Kr,ic as le,id as He,j as vt,je as Ge,kc as Te,kd as co,la as Bt,lb as F,lc as Gi,m as _,mc as ee,md as Qi,n as Ir,na as P,nc as We,o as b,oa as C,ob as Yr,oc as de,p as Ue,pa as oe,pb as we,pc as R,qb as h,qc as V,qe as po,r as Rr,ra as M,rc as ro,re as qe,s as Vr,sc as St,se as Zi,t as Nr,ta as d,tc as qi,u as Bi,uc as Ki,ue as ho,ve as Ke,wb as bt,wc as B,x as q,xb as ae,yb as g,yd as fo,z as Wt,za as Qr,zc as oo}from"./chunk-W2S6R4AZ.js";var f=function(t){return t.Disconnected="Disconnected",t.HTTPDiscovering="HTTPDiscovering",t.HTTPConnected="HTTPConnected",t.HTTPError="HTTPError",t.HTTPRetrying="HTTPRetrying",t.WebSocketConnecting="WebSocketConnecting",t.Connected="Connected",t.WebSocketError="WebSocketError",t.WebSocketRetrying="WebSocketRetrying",t.PermanentFailure="PermanentFailure",t}(f||{}),qt=(()=>{class t{config={httpRetryCount:3,webSocketRetryCount:5,retryIntervals:[2e3,3e3,5e3],notificationDebounceMs:0};_currentState$=new b(f.Disconnected);_status$=new b(this.createStatus(f.Disconnected,"Not connected"));_httpRetryCount=0;_webSocketRetryCount=0;_retryTimeout=null;_notificationTimeout=null;_httpRetryCallback=null;_webSocketRetryCallback=null;_isInitializationMode=!0;constructor(){console.log("[ConnectionStateMachine] Service initialized")}get state$(){return this._currentState$.asObservable()}get status$(){return this._status$.asObservable()}get currentState(){return this._currentState$.getValue()}enableWebSocketMode(){this._isInitializationMode=!1,console.log("[ConnectionStateMachine] WebSocket mode enabled");let e=this._status$.getValue();console.log(`[ConnectionStateMachine] Current status when enabling WebSocket mode: ${e.state} - ${e.message}`),this._status$.next(e)}setHTTPRetryCallback(e){this._httpRetryCallback=e}setWebSocketRetryCallback(e){this._webSocketRetryCallback=e}startHTTPDiscovery(e="Connection request"){console.log(`[ConnectionStateMachine] Starting HTTP discovery: ${e}`),this._httpRetryCount=0,this.setState(f.HTTPDiscovering,"Discovering Signal K server...")}onHTTPDiscoverySuccess(){console.log("[ConnectionStateMachine] HTTP discovery successful"),this._httpRetryCount=0,this.setState(f.HTTPConnected,"Signal K server discovered"),this._isInitializationMode||this.startWebSocketConnection()}onHTTPDiscoveryError(e){console.log(`[ConnectionStateMachine] HTTP discovery failed: ${e}`),this._httpRetryCount<this.config.httpRetryCount?(this._httpRetryCount++,this.setState(f.HTTPRetrying,`HTTP connection failed. Retrying (${this._httpRetryCount}/${this.config.httpRetryCount})...`,this._httpRetryCount,this.config.httpRetryCount),this.scheduleHTTPRetry()):this.setState(f.PermanentFailure,`HTTP connection failed after ${this.config.httpRetryCount} attempts. Check server URL.`,this.config.httpRetryCount,this.config.httpRetryCount)}startWebSocketConnection(){if(!(this.currentState===f.HTTPConnected||this.currentState===f.WebSocketRetrying||this.currentState===f.WebSocketConnecting||this.currentState===f.Connected))return this.currentState===f.HTTPDiscovering,void 0;console.log("[ConnectionStateMachine] Starting WebSocket connection"),this._webSocketRetryCount=0,this.setState(f.WebSocketConnecting,"Connecting to Signal K Websocket...")}onWebSocketConnected(){console.log("[ConnectionStateMachine] WebSocket connected"),this._webSocketRetryCount=0,this.setState(f.Connected,"Connected to Signal K server")}onWebSocketError(e){if(console.log(`[ConnectionStateMachine] WebSocket error: ${e}`),this.currentState!==f.HTTPConnected&&this.currentState!==f.WebSocketConnecting&&this.currentState!==f.Connected&&this.currentState!==f.WebSocketRetrying){console.log("[ConnectionStateMachine] HTTP connection lost, restarting HTTP discovery"),this.startHTTPDiscovery("HTTP connection lost during WebSocket operation");return}this._webSocketRetryCount++,this.setState(f.WebSocketRetrying,`WebSocket connection failed. Retry attempt ${this._webSocketRetryCount}...`,this._webSocketRetryCount,this.config.webSocketRetryCount),this.scheduleWebSocketRetry()}shutdown(e="App shutdown"){console.log(`[ConnectionStateMachine] Shutting down all connections: ${e}`),this.clearRetryTimer(),this.clearNotificationTimeout(),this._httpRetryCount=0,this._webSocketRetryCount=0,this.setState(f.Disconnected,"Application restarting...")}isHTTPConnected(){return this.currentState===f.HTTPConnected||this.currentState===f.WebSocketConnecting||this.currentState===f.Connected||this.currentState===f.WebSocketRetrying}isFullyConnected(){return this.currentState===f.Connected}setState(e,r,o,n){this._currentState$.next(e);let a=this.createStatus(e,r,o,n);e===f.HTTPDiscovering||e===f.WebSocketConnecting?this._status$.next(a):e===f.Connected?(this.clearNotificationTimeout(),this._notificationTimeout=setTimeout(()=>{this._status$.next(a)},this.config.notificationDebounceMs)):(this.clearNotificationTimeout(),this._status$.next(a))}createStatus(e,r,o,n){return{state:e,operation:this.stateToOperationCode(e),message:r,retryCount:o||0,maxRetries:n||0,timestamp:new Date}}stateToOperationCode(e){switch(e){case f.Disconnected:return 0;case f.HTTPDiscovering:case f.WebSocketConnecting:return 1;case f.Connected:return 2;case f.HTTPError:case f.WebSocketError:case f.HTTPRetrying:case f.WebSocketRetrying:return 3;case f.HTTPConnected:return 2;case f.PermanentFailure:return 5;default:return 0}}scheduleHTTPRetry(){this.clearRetryTimer();let e=Math.min(this._httpRetryCount-1,this.config.retryIntervals.length-1),r=this.config.retryIntervals[e];console.log(`[ConnectionStateMachine] Scheduling HTTP retry in ${r}ms`),this._retryTimeout=setTimeout(()=>{this._httpRetryCallback?(console.log(`[ConnectionStateMachine] Executing HTTP retry ${this._httpRetryCount}/${this.config.httpRetryCount}`),this._httpRetryCallback()):(console.error("[ConnectionStateMachine] No HTTP retry callback set!"),this.setState(f.Disconnected,"HTTP retry callback not configured"))},r)}scheduleWebSocketRetry(){this.clearRetryTimer(),console.log(`[ConnectionStateMachine] Scheduling WebSocket retry in ${this.config.retryIntervals[1]}ms`),this._retryTimeout=setTimeout(()=>{this._webSocketRetryCallback?(console.log(`[ConnectionStateMachine] Executing WebSocket retry ${this._webSocketRetryCount}/${this.config.webSocketRetryCount}`),this._webSocketRetryCallback()):(console.log("[ConnectionStateMachine] No WebSocket retry callback - using state change method"),this.setState(f.WebSocketConnecting,`Retrying WebSocket connection (${this._webSocketRetryCount}/${this.config.webSocketRetryCount})...`,this._webSocketRetryCount,this.config.webSocketRetryCount))},this.config.retryIntervals[1])}clearRetryTimer(){this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=null)}clearNotificationTimeout(){this._notificationTimeout&&(clearTimeout(this._notificationTimeout),this._notificationTimeout=null)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Qe=(()=>{class t{TIMEOUT_DURATION=1e4;connectionStateMachine=d(qt);constructor(){this.connectionStateMachine.setHTTPRetryCallback(()=>{console.log("[SignalKConnectionService] Executing HTTP retry via callback"),this.retryCurrentConnection()})}serverServiceEndpoint$=new b({operation:0,message:"Not connected",serverDescription:null,httpServiceUrl:null,WsServiceUrl:null});signalKURL;serverName;serverVersion$=new b(null);serverRoles=[];http=d(Be);currentProxyEnabled;currentSubscribeAll;validateSignalKUrl(e){return W(this,null,function*(){if(!e)throw new Error("Please enter a server URL");try{let o=new URL(e);if(!["http:","https:"].includes(o.protocol))throw new Error("URL must start with http:// or https://")}catch{throw new Error("Invalid URL format - please check for typos and ensure it starts with http:// or https://")}let r=e;r.endsWith("signalk/")||(r+="/signalk/"),console.log(`[Connection Service] Validating Signal K server at: ${e}`);try{if(!(yield q(this.http.get(r,{observe:"response"}).pipe(Wt(5e3),je(n=>{throw console.error("[Connection Service] HTTP Error details:",n),n.name==="TimeoutError"?(console.error("[Connection Service] Validation timed out after 5000ms"),new Error("Server is not responding - check if the URL is correct and the server is running")):n.status===0||n.status===void 0?new Error("Cannot connect to server - check the URL format and ensure the server is accessible"):n.status===404?new Error("Server found but no Signal K service detected - verify this is a Signal K server"):n.status===403?new Error("Server refused connection - check if the server allows connections from this browser"):n.status>=500?new Error(`Server error (${n.status}) - the Signal K server may be having issues`):new Error(`Connection failed (${n.status}) - ${n.statusText||"please check the server URL"}`)})))).body?.endpoints?.v1)throw new Error("Server responded but doesn't appear to be a Signal K server - missing required endpoints");console.log(`[Connection Service] Validation successful for: ${e}`)}catch(o){throw console.error(`[Connection Service] Validation failed for ${e}:`,o.message),o}})}initializeConnection(e,r,o){return W(this,null,function*(){if(!e.url){console.log("[Connection Service] Connection initialization called with null or empty URL value");return}this.currentProxyEnabled=r,this.currentSubscribeAll=o;let n={operation:1,message:"Connecting...",serverDescription:null,httpServiceUrl:null,WsServiceUrl:null};this.signalKURL=e,this.serverServiceEndpoint$.next(n),this.connectionStateMachine.startHTTPDiscovery(`Connecting to ${e.url}`);let a=this.signalKURL.url;a.endsWith("signalk/")||(a+="/signalk/");try{console.log("[Connection Service] Connecting to: "+this.signalKURL.url);let s=yield q(this.http.get(a,{observe:"response"}).pipe(Wt(this.TIMEOUT_DURATION),je(p=>(p.name==="TimeoutError"&&console.error("[Connection Service] Connection request timed out after "+this.TIMEOUT_DURATION+"ms"),Bi(p)))));console.debug("[Connection Service] Signal K HTTP Endpoints retrieved"),this.serverVersion$.next(s.body.server.version);let l=s.body.endpoints.v1["signalk-http"],c=s.body.endpoints.v1["signalk-ws"];r?(console.debug("[Connection Service] Proxy Mode Enabled"),n.httpServiceUrl=window.location.origin+new URL(l).pathname,n.WsServiceUrl=(window.location.protocol=="https:"?"wss://":"ws://")+window.location.host+new URL(c).pathname):(n.httpServiceUrl=l,n.WsServiceUrl=c),console.debug("[Connection Service] HTTP URI: "+n.httpServiceUrl),console.debug("[Connection Service] WebSocket URI: "+n.WsServiceUrl),n.operation=2,n.message=s.status.toString(),n.serverDescription=`${s.body.server.id} ${s.body.server.version}`,this.connectionStateMachine.onHTTPDiscoverySuccess()}catch(s){n.operation=3,n.message=s.message,this.connectionStateMachine.onHTTPDiscoveryError(s.message),this.handleError(s)}finally{n.subscribeAll=!!o,this.serverServiceEndpoint$.next(n)}})}retryCurrentConnection(){if(!this.signalKURL?.url){console.error("[SignalKConnectionService] Cannot retry - no current URL stored");return}console.log(`[SignalKConnectionService] Retrying connection to ${this.signalKURL.url}`),this.performHTTPDiscovery()}performHTTPDiscovery(){return W(this,null,function*(){if(!this.signalKURL?.url){console.error("[SignalKConnectionService] No URL available for HTTP discovery");return}let e=this.signalKURL.url;e.endsWith("signalk/")||(e+="/signalk/");try{console.log("[Connection Service] Connecting to: "+this.signalKURL.url);let r=yield q(this.http.get(e,{observe:"response"}).pipe(Wt(this.TIMEOUT_DURATION),je(s=>(s.name==="TimeoutError"&&console.error("[Connection Service] Connection request timed out after "+this.TIMEOUT_DURATION+"ms"),Bi(s)))));console.debug("[Connection Service] Signal K HTTP Endpoints retrieved"),this.serverVersion$.next(r.body.server.version);let o=r.body.endpoints.v1["signalk-http"],n=r.body.endpoints.v1["signalk-ws"],a={operation:2,message:"Connected",serverDescription:r.body.server.id,httpServiceUrl:null,WsServiceUrl:null};this.currentProxyEnabled?(console.debug("[Connection Service] Proxy Mode Enabled"),a.httpServiceUrl=window.location.origin+new URL(o).pathname,a.WsServiceUrl=(window.location.protocol=="https:"?"wss://":"ws://")+window.location.host+new URL(n).pathname):(a.httpServiceUrl=o,a.WsServiceUrl=n),this.connectionStateMachine.onHTTPDiscoverySuccess(),a.subscribeAll=!!this.currentSubscribeAll,this.serverServiceEndpoint$.next(a)}catch(r){let o={operation:3,message:r.message,serverDescription:null,httpServiceUrl:null,WsServiceUrl:null};this.connectionStateMachine.onHTTPDiscoveryError(r.message),this.serverServiceEndpoint$.next(o),this.handleError(r)}})}handleError(e){let r=e.status===0?`[Connection Service] ${e.name}: ${e.message}`:`[Connection Service] Backend returned code ${e.status}, body was: ${e.error}`;throw console.error(r),e}getServiceEndpointStatusAsO(){return this.serverServiceEndpoint$.asObservable()}setServerInfo(e,r,o){this.serverName=e,this.serverRoles=o,console.log(`[Connection Service] Server Name: ${e}, Version: ${r}, Roles: ${JSON.stringify(o)}`)}get skServerName(){return this.serverName}get skServerVersion(){return this.serverVersion$.getValue()}get skServerRoles(){return this.serverRoles}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Os="/signalk/v1/",go="auth/login",Is="auth/logout",Rs="auth/validate",Vs=60,Kt=(()=>{class t{http=d(Be);conn=d(Qe);_IsLoggedIn$=new b(!1);isLoggedIn$=this._IsLoggedIn$.asObservable();_authToken$=new b(null);authToken$=this._authToken$.asObservable();connectionEndpointSubscription=null;authTokenSubscription=null;isRenewingToken=!1;loginUrl=null;logoutUrl=null;validateTokenUrl=null;constructor(){let e=JSON.parse(localStorage.getItem("authorization_token"));e&&(e.isDeviceAccessToken?e.expiry===null?(console.log("[Authentication Service] Device Access Token found with expiry: NEVER"),this._authToken$.next(e)):this.isTokenExpired(e.expiry)?(console.log("[Authentication Service] Device Access Token expired. Deleting token"),localStorage.removeItem("authorization_token")):(console.log("[Authentication Service] Device Access Token found in Local Storage"),this._authToken$.next(e)):(console.log("[Authentication Service] User session token found in Local Storage"),console.log("[Authentication Service] Deleting user session token"),localStorage.removeItem("authorization_token"))),this.authTokenSubscription=this._authToken$.pipe(Le(r=>!!r&&r.expiry!==null),Hr((r,o)=>r.expiry===o.expiry),Se(r=>{let o=this.getTokenExpirationDate(r.expiry,Vs),n=o.getTime()-Date.now();return console.log(`[Authentication Service] Token refresh timer set for ${n} ms (Token Expiry: ${o.toISOString()})`),Math.max(n,0)}),qr(r=>jr(r))).subscribe(()=>{this.handleTokenRenewal()}),this.connectionEndpointSubscription=this.conn.serverServiceEndpoint$.subscribe(r=>{if(r.operation===2){let o=r.httpServiceUrl.substring(0,r.httpServiceUrl.length-4);this.loginUrl=o+go,this.logoutUrl=o+Is,this.validateTokenUrl=o+Rs}})}handleTokenRenewal(){if(this.isRenewingToken){console.warn("[Authentication Service] Token renewal already in progress.");return}this.isRenewingToken=!0;let e=JSON.parse(localStorage.getItem("authorization_token"));if(!e){console.warn("[Authentication Service] No token found in local storage. Cannot renew."),this.isRenewingToken=!1;return}if(e.isDeviceAccessToken)console.warn("[Authentication Service] Device Access Token expired. Manual renewal required."),this.isRenewingToken=!1;else if(this.isTokenExpired(e.expiry))console.log("[Authentication Service] User session Token expired. Cannot renew."),this.isRenewingToken=!1;else{console.log("[Authentication Service] User session Token expires soon. Renewing token...");let r=JSON.parse(localStorage.getItem("connectionConfig"));this.login({usr:r.loginName,pwd:r.loginPassword}).then(()=>{console.log("[Authentication Service] Token successfully renewed.")}).catch(o=>{console.error("[Authentication Service] Token renewal failed. Server returned:",o.error)}).finally(()=>{this.isRenewingToken=!1})}}login(n){return W(this,arguments,function*({usr:e,pwd:r,newUrl:o}){let a;if(o?a=o.replace(/\/+$/,"")+Os+go:a=this.loginUrl,this._IsLoggedIn$.getValue()&&(yield this.logout(!0)),!a)throw console.error("[Authentication Service] Login URL is not set. Cannot perform login."),this.deleteToken(),new Error("Login URL is not set.");yield q(this.http.post(a,{username:e,password:r},{observe:"response"})).then(s=>{console.log("[Authentication Service] User "+e+" login successful"),this.setSession(s.body.token)}).catch(s=>{this.deleteToken(),this.handleError(s)})})}handleError(e){throw e.status===0&&this.deleteToken(),e}setSession(e){if(e){let r=JSON.parse(atob(e.split(".")[1])).exp,o={token:null,expiry:null,isDeviceAccessToken:!1};r===void 0?(o.token=e,console.log("[Authentication Service] User Session Token received. Token Expiration: NEVER"),this._IsLoggedIn$.next(!0),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o))):this.isTokenExpired(r)?console.log("[Authentication Service] Received expired Session Token from server"):(o.token=e,o.expiry=r,console.log("[Authentication Service] Session Authorization Token received. Token Expiration: "+this.getTokenExpirationDate(o.expiry)),this._IsLoggedIn$.next(!0),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o)))}}isTokenExpired(e){return Math.floor(new Date().getTime()/1e3)>=e}getTokenExpirationDate(e,r){let o=new Date(0);if(r){let n=new Date(0);n.setUTCSeconds(e-r),o=n}else o.setUTCSeconds(e);return o}renewToken(){return this.http.post(this.validateTokenUrl,null,{observe:"response"})}logout(e){return W(this,null,function*(){localStorage.removeItem("authorization_token"),yield q(this.http.put(this.logoutUrl,null)).then(()=>{this._IsLoggedIn$.next(!1),e||this._authToken$.next(null),console.log("[Authentication Service] User logged out")}).catch(r=>{console.error(r)})})}deleteToken(){this._authToken$&&(console.log("[Authentication Service] Deleting Authorization token"),localStorage.removeItem("authorization_token"),this._IsLoggedIn$.next(!1),this._authToken$.next(null))}setDeviceAccessToken(e){if(e){let r=JSON.parse(atob(e.split(".")[1])).exp,o={token:null,expiry:null,isDeviceAccessToken:!0};r===void 0?(o.token=e,console.log("[Authentication Service] Device Access Token received. Token Expiration: NEVER"),this._IsLoggedIn$.next(!1),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o))):this.isTokenExpired(r)?console.log("[Authentication Service] Received expired Device Access Token from server"):(o.token=e,o.expiry=r,console.log("[Authentication Service] Device Access Token received. Token Expiration: "+this.getTokenExpirationDate(o.expiry)),this._IsLoggedIn$.next(!1),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o)))}}ngOnDestroy(){this.connectionEndpointSubscription?.unsubscribe(),this.authTokenSubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ns=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Yi=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");let i=t.match(Ns);if(!i)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return i.shift(),i},vo=t=>t==="*"||t==="x"||t==="X",_o=t=>{let i=parseInt(t,10);return isNaN(i)?t:i},Ps=(t,i)=>typeof t!=typeof i?[String(t),String(i)]:[t,i],Us=(t,i)=>{if(vo(t)||vo(i))return 0;let[e,r]=Ps(_o(t),_o(i));return e>r?1:e<r?-1:0},Xi=(t,i)=>{for(let e=0;e<Math.max(t.length,i.length);e++){let r=Us(t[e]||"0",i[e]||"0");if(r!==0)return r}return 0};var bo=(t,i)=>{let e=Yi(t),r=Yi(i),o=e.pop(),n=r.pop(),a=Xi(e,r);return a!==0?a:o&&n?Xi(o.split("."),n.split(".")):o||n?o?-1:1:0};var er=(t,i,e)=>{Ls(e);let r=bo(t,i);return xo[e].includes(r)},xo={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},yo=Object.keys(xo),Ls=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(yo.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${yo.join("|")}`)};var So=(()=>{class t{server=d(Qe);http=d(Be);_auth=d(Kt);serverEndpoint=null;isAppDataSupported=!1;configFileVersion=null;sharedConfigName;InitConfig=null;storageServiceReady$=new b(!1);_isLoggedIn=!1;_networkStatus=void 0;patchQueue$=new _;patch=function(e){return this.http.post(e.url,e.document).pipe(Kr(()=>console.log("[Storage Service] Remote config patch request completed successfully")),je(r=>this.handleError(r)))};constructor(){let e=this.server;this._auth.isLoggedIn$.subscribe(r=>{this._isLoggedIn=r,this.isStorageServiceReady()}),e.serverServiceEndpoint$.subscribe(r=>{this._networkStatus=r,this.isStorageServiceReady()}),e.serverVersion$.subscribe(r=>{r&&(this.isAppDataSupported=er(r,"1.27.0",">="))}),this.patchQueue$.pipe(Wr(r=>this.patch(r))).subscribe(()=>{})}isStorageServiceReady(){this._networkStatus?.httpServiceUrl&&(this.serverEndpoint=this._networkStatus.httpServiceUrl.substring(0,this._networkStatus.httpServiceUrl.length-4)+"applicationData/",console.log("[Storage Service] Service startup. AppData API set to: "+this.serverEndpoint)),this._networkStatus?.operation===2&&this._isLoggedIn&&this.serverEndpoint?this.storageServiceReady$.next(!0):this.storageServiceReady$.next(!1)}ensureReady(){if(!this.storageServiceReady$.getValue())throw new Error("[StorageService] Not ready: storageServiceReady is false")}listConfigs(e){return W(this,null,function*(){this.ensureReady();let r=[];if(!this.serverEndpoint)return console.warn("[Storage Service] No server endpoint set. Cannot retrieve config list"),null;let o=this.serverEndpoint,n=o+"global/kip/"+this.configFileVersion+"/?keys=true",a=o+"user/kip/"+this.configFileVersion+"/?keys=true";return e&&(n=o+"global/kip/"+e+"/?keys=true",a=o+"user/kip/"+e+"/?keys=true"),yield q(this.http.get(n)).then(s=>{for(let l of s)r.push({scope:"global",name:l});console.log("[Storage Service] Retrieved Global config list")}).catch(s=>{this.handleError(s)}),yield q(this.http.get(a)).then(s=>{for(let l of s)r.push({scope:"user",name:l});console.log("[Storage Service] Retrieved User config list")}).catch(s=>{this.handleError(s)}),r})}getConfig(e,r,o,n){return W(this,null,function*(){this.ensureReady();let a=null,s=this.serverEndpoint+e+"/kip/"+this.configFileVersion+"/"+r;return o&&(s=this.serverEndpoint+e+"/kip/"+o+"/"+r),yield q(this.http.get(s)).then(l=>{a=l,console.log(`[Storage Service] Retrieved config [${r}] from [${e}] scope`),n&&(this.InitConfig=l)}).catch(l=>{this.handleError(l)}),a})}setConfig(e,r,o,n){return W(this,null,function*(){this.ensureReady();let a=this.serverEndpoint+e+"/kip/"+this.configFileVersion+"/"+r,s=null;return n&&(a=this.serverEndpoint+e+"/kip/"+n+"/"+r),yield q(this.http.post(a,o)).then(l=>{console.log(`[Storage Service] Saved config [${r}] to [${e}] scope`),s=l}).catch(l=>{this.handleError(l)}),s})}patchConfig(e,r,o){this.ensureReady();let n=this.serverEndpoint+"user/kip/"+this.configFileVersion,a;switch(o&&(n=this.serverEndpoint+"user/kip/"+o),e){case"IAppConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/app`,value:r}];break;case"IThemeConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/theme/themeName`,value:r.themeName}];break;case"IWidgetConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/widget`,value:r}];break;case"ILayoutConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/layout`,value:r}];break;case"Dashboards":a=[{op:"replace",path:`/${this.sharedConfigName}/dashboards`,value:r}];break;case"Array<IUnitDefaults>":a=[{op:"replace",path:`/${this.sharedConfigName}/app/unitDefaults`,value:r}];break;case"Array<IDatasetDef>":a=[{op:"replace",path:`/${this.sharedConfigName}/app/dataSets`,value:r}];break;case"INotificationConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/app/notificationConfig`,value:r}];break;default:console.warn("[Storage Service] JSON Patch request type unknown");break}let s={url:n,document:a};this.patchQueue$.next(s)}patchGlobal(e,r,o,n,a){this.ensureReady();let s=this.serverEndpoint+r+"/kip/"+this.configFileVersion;a&&(s=this.serverEndpoint+r+"/kip/"+a);let l;switch(n){case"add":l=[{op:"add",path:`/${e}`,value:o}];break;case"replace":l=[{op:"replace",path:`/${e}`,value:o}];break;case"remove":l=[{op:"remove",path:`/${e}`,value:o}];break;default:console.warn("[Storage Service] JSON Patch operation request type unknown");break}let c={url:s,document:l};this.patchQueue$.next(c)}removeItem(e,r,o){this.ensureReady();let n=this.serverEndpoint+e+"/kip/"+this.configFileVersion;o&&(n=this.serverEndpoint+e+"/kip/"+o);let a=[{op:"remove",path:`/${r}`}],s={url:n,document:a};this.patchQueue$.next(s)}clear(){this.ensureReady()}set activeConfigFileVersion(e){this.configFileVersion=e}handleError(e){throw e.status===0?console.error("[Storage Service] An error occurred:",e.error):console.error("[Storage Service] Backend returned error: ",e.message),e}get initConfig(){return this.InitConfig}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var De=class{static create(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){let e=Math.random()*16|0;return(i=="x"?e:e&3|8).toString(16)})}};var wt={disableNotifications:!1,menuGrouping:!0,security:{disableSecurity:!0},devices:{disableDevices:!1,showNormalState:!1,showNominalState:!1},sound:{disableSound:!1,muteNormal:!0,muteNominal:!0,muteWarn:!0,muteAlert:!1,muteAlarm:!1,muteEmergency:!1}};var Qt={Unitless:"unitless",Speed:"knots",Flow:"l/h",Temperature:"celsius",Length:"m",Volume:"liter",Current:"A",Potential:"V",Charge:"C",Power:"W",Energy:"J",Pressure:"mmHg","Fuel Distance":"nm/l","Energy Distance":"nm/kWh",Density:"kg/m3",Time:"Hours","Angular Velocity":"deg/min",Angle:"deg",Frequency:"Hz",Ratio:"ratio",Resistance:"ohm"};var Co={configVersion:11,autoNightMode:!0,redNightMode:!1,nightModeBrightness:.27,dataSets:[],unitDefaults:Qt,notificationConfig:wt},wo={themeName:""};var To={configVersion:11,kipUUID:De.create(),signalKUrl:null,proxyEnabled:!1,signalKSubscribeAll:!1,useDeviceToken:!1,loginName:null,loginPassword:null,useSharedConfig:!1,sharedConfigName:"default"};var tr={configVersion:11,autoNightMode:!1,redNightMode:!1,nightModeBrightness:.27,dataSets:[{uuid:"afbe4e41-26f5-404f-a55d-9f7b9b76fbd1",path:"self.environment.wind.speedApparent",pathSource:"default",period:1,baseUnit:"m/s",label:"self.environment.wind.speedApparent, Source: default, Scale: minute, Period: 1",timeScaleFormat:"minute"}],unitDefaults:{Unitless:"unitless",Speed:"knots",Flow:"l/h",Temperature:"celsius",Length:"m",Volume:"liter",Current:"A",Potential:"V",Charge:"C",Power:"W",Energy:"J",Pressure:"mmHg","Fuel Distance":"nm/l","Energy Distance":"nm/kWh",Density:"kg/m3",Time:"Hours","Angular Velocity":"deg/min",Angle:"deg",Frequency:"Hz",Ratio:"ratio",Resistance:"ohm"},notificationConfig:{disableNotifications:!1,menuGrouping:!0,security:{disableSecurity:!0},devices:{disableDevices:!1,showNormalState:!1,showNominalState:!1},sound:{disableSound:!1,muteNormal:!0,muteNominal:!0,muteWarn:!0,muteAlert:!1,muteAlarm:!1,muteEmergency:!1}}},ir=[{id:"3e0825ee-95fd-4ad4-8802-e0507845b668",name:"Sailing",configuration:[{w:3,h:4,id:"339698a7-2cff-4ab9-9b50-d8056f971471",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"339698a7-2cff-4ab9-9b50-d8056f971471",config:{displayName:"Depth",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.environment.depth.belowTransducer",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"m",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!1,showMin:!1,numDecimal:1,numInt:1,color:"yellow",enableTimeout:!1,dataTimeout:5}}},x:0,y:0},{w:5,h:10,id:"a44028e0-dfee-4492-895b-2b03a60f3a69",selector:"widget-wind-steer",input:{widgetProperties:{type:"widget-wind-steer",uuid:"a44028e0-dfee-4492-895b-2b03a60f3a69",config:{filterSelfPaths:!0,paths:{headingPath:{description:"Heading",path:"self.navigation.headingTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500},courseOverGround:{description:"Course Over Ground",path:"self.navigation.courseOverGroundTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500},trueWindAngle:{description:"True Wind Angle",path:"self.environment.wind.angleTrueWater",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500},trueWindSpeed:{description:"True Wind Speed",path:"self.environment.wind.speedTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"m/s",convertUnitTo:"knots",sampleTime:500},appWindAngle:{description:"Apparent Wind Angle",path:"self.environment.wind.angleApparent",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500},appWindSpeed:{description:"Apparent Wind Speed",path:"self.environment.wind.speedApparent",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"m/s",convertUnitTo:"knots",sampleTime:500},nextWaypointBearing:{description:"Next Waypoint Bearing",path:"self.navigation.courseGreatCircle.nextPoint.bearingTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500}},windSectorEnable:!0,windSectorWindowSeconds:5,laylineEnable:!0,laylineAngle:40,waypointEnable:!0,courseOverGroundEnable:!0,sailSetupEnable:!1,enableTimeout:!1,dataTimeout:5}}},x:3,y:0},{w:4,h:6,id:"24406c15-7738-4dc1-a206-7a4862c2931d",selector:"widget-gauge-ng-radial",input:{widgetProperties:{type:"widget-gauge-ng-radial",uuid:"24406c15-7738-4dc1-a206-7a4862c2931d",config:{displayName:"SOG",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.navigation.speedOverGround",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,convertUnitTo:"knots",sampleTime:500}},displayScale:{lower:0,upper:10,type:"linear"},gauge:{type:"ngRadial",subType:"measuring",enableTicks:!0,compassUseNumbers:!1},numInt:1,numDecimal:1,enableTimeout:!1,color:"yellow",dataTimeout:5}}},x:8,y:0},{w:3,h:4,id:"c6bcaa53-afa1-42c7-ad92-d5f7dba14734",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"c6bcaa53-afa1-42c7-ad92-d5f7dba14734",config:{displayName:"STW",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.navigation.speedThroughWater",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"knots",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!0,showMin:!0,numDecimal:1,numInt:1,color:"contrast",enableTimeout:!1,dataTimeout:5}}},x:0,y:4},{w:4,h:6,id:"973c8804-be09-4923-bb5d-48c13b65db69",selector:"widget-data-chart",input:{widgetProperties:{type:"widget-data-chart",uuid:"973c8804-be09-4923-bb5d-48c13b65db69",config:{displayName:"Chart Label",filterSelfPaths:!0,convertUnitTo:"knots",datasetUUID:"afbe4e41-26f5-404f-a55d-9f7b9b76fbd1",invertData:!1,datasetAverageArray:"sma",showAverageData:!0,trackAgainstAverage:!1,showDatasetMinimumValueLine:!1,showDatasetMaximumValueLine:!1,showDatasetAverageValueLine:!0,showDatasetAngleAverageValueLine:!1,showLabel:!1,showTimeScale:!0,startScaleAtZero:!1,verticalGraph:!1,showYScale:!0,yScaleSuggestedMin:null,yScaleSuggestedMax:null,enableMinMaxScaleLimit:!1,yScaleMin:null,yScaleMax:null,numDecimal:1,color:"green"}}},x:8,y:6},{w:3,h:4,id:"05414722-733a-4483-89b0-07f3945ffd97",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"05414722-733a-4483-89b0-07f3945ffd97",config:{displayName:"Engine Room",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.environment.inside.engineRoom.temperature",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"celsius",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!1,showMin:!1,numDecimal:1,numInt:1,color:"blue",enableTimeout:!1,dataTimeout:5}}},x:0,y:8},{w:5,h:2,id:"1a7a3f79-2eb4-4092-a0c3-9a61db8a8586",selector:"widget-simple-linear",input:{widgetProperties:{type:"widget-simple-linear",uuid:"1a7a3f79-2eb4-4092-a0c3-9a61db8a8586",config:{displayName:"House Bank",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.electrical.batteries.0.voltage",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!0,pathSkUnitsFilter:"V",convertUnitTo:"V",sampleTime:500}},displayScale:{lower:0,upper:15,type:"linear"},gauge:{type:"simpleLinear",unitLabelFormat:"full"},numInt:1,numDecimal:2,color:"green",enableTimeout:!1,dataTimeout:5}}},x:3,y:10}]},{id:"7c67c8c5-dc55-4e1d-9fc5-3dd95fd41bea",name:"Charting",configuration:[{x:0,y:0,w:8,h:12,id:"488d620a-37d4-4b98-849d-304cd18003e9",selector:"widget-freeboardsk",input:{widgetProperties:{type:"widget-freeboardsk",uuid:"488d620a-37d4-4b98-849d-304cd18003e9"}}},{x:8,y:0,w:2,h:3,id:"26a2a150-5af8-4f1d-aaab-0cb2a406fc17",selector:"widget-gauge-ng-compass",input:{widgetProperties:{type:"widget-gauge-ng-compass",uuid:"26a2a150-5af8-4f1d-aaab-0cb2a406fc17",config:{displayName:"COG (T)",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.navigation.courseOverGroundTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,convertUnitTo:"deg",sampleTime:500}},gauge:{type:"ngRadial",subType:"marineCompass",enableTicks:!0,compassUseNumbers:!0,showValueBox:!1},enableTimeout:!1,color:"purple",dataTimeout:5}}}},{x:10,y:0,w:2,h:3,id:"caf9ca47-fcf6-4736-a314-2b5210edaf03",selector:"widget-datetime",input:{widgetProperties:{type:"widget-datetime",uuid:"caf9ca47-fcf6-4736-a314-2b5210edaf03",config:{displayName:"Next WP Arrival",filterSelfPaths:!0,paths:{gaugePath:{description:"String Data",path:"self.navigation.datetime",source:"default",pathType:"Date",isPathConfigurable:!0,sampleTime:500}},dateFormat:"dd/MM HH:mm",dateTimezone:"America/Toronto",color:"contrast",enableTimeout:!1,dataTimeout:5}}}},{x:8,y:3,w:4,h:9,id:"daa21350-009e-4d99-8209-364f9b99caee",selector:"widget-autopilot",input:{widgetProperties:{type:"widget-autopilot",uuid:"daa21350-009e-4d99-8209-364f9b99caee",config:{filterSelfPaths:!0,paths:{autopilotState:{description:"Autopilot State",path:"self.steering.autopilot.state",source:"default",pathType:"string",isPathConfigurable:!1,showPathSkUnitsFilter:!1,convertUnitTo:"",sampleTime:500},autopilotTargetHeading:{description:"Autopilot Target Magnetic Heading",path:"self.steering.autopilot.target.headingMagnetic",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},autopilotTargetWindHeading:{description:"Autopilot Target Apparent Wind Angle",path:"self.steering.autopilot.target.windAngleApparent",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},rudderAngle:{description:"Rudder Angle",path:"self.steering.rudderAngle",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},courseXte:{description:"Cross Track Error",path:"self.navigation.course.calcValues.crossTrackError",source:"default",pathType:"number",isPathConfigurable:!1,convertUnitTo:"m",showPathSkUnitsFilter:!0,pathRequired:!1,pathSkUnitsFilter:"m",sampleTime:500},headingMag:{description:"Magnetic Heading",path:"self.navigation.headingMagnetic",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,sampleTime:500},headingTrue:{description:"True Heading",path:"self.navigation.headingTrue",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,sampleTime:500},windAngleApparent:{description:"Apparent Wind Angle",path:"self.environment.wind.angleApparent",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,sampleTime:500},windAngleTrueWater:{description:"Wind Angle True Water",path:"self.environment.wind.angleTrueWater",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,sampleTime:500}},invertRudder:!0,headingDirectionTrue:!1,courseDirectionTrue:!1,enableTimeout:!1,dataTimeout:5,autopilotInstance:"_default"}}}}]}],rr={themeName:""};var Dh={configVersion:11,kipUUID:De.create(),signalKUrl:"https://demo.signalk.org",proxyEnabled:!1,signalKSubscribeAll:!1,useDeviceToken:!1,loginName:null,loginPassword:null,useSharedConfig:!1,sharedConfigName:"default"};var js="",$s=11,Tt=11,Ph=(()=>{class t{storage=d(So);unitDefaults=new b({});themeName=new b(js);kipKNotificationConfig=new b(wt);autoNightMode=new b(!1);redNightMode=new b(!1);nightModeBrightness=new b(1);proxyEnabled=!1;signalKSubscribeAll=!1;useDeviceToken=!1;loginName;loginPassword;useSharedConfig;sharedConfigName;activeConfig={app:null,theme:null,dashboards:null};kipUUID;signalkUrl;widgets;_dashboards=[];dataSets=[];configUpgrade=ne(!1);constructor(){if(console.log("[AppSettings Service] Service startup..."),this.storage.activeConfigFileVersion=$s,!window.localStorage)console.error(`[AppSettings Service] LocalStorage NOT SUPPORTED by browser
|
|
2
|
-
This is a requirement to run Kip. See browser documentation to enable this feature.`);else{this.loadConnectionConfig();let e;if(this.storage.initConfig===null&&this.useSharedConfig&&this.loginName!==null&&this.loginPassword!==null&&this.signalkUrl.url!==null?this.resetSettings():e=this.storage.initConfig,e)console.log("[AppSettings Service] Remote configuration storage enabled"),this.checkConfigUpgradeRequired(!1),this.activeConfig=e,this.pushSettings();else{console.log("[AppSettings Service] LocalStorage enabled");let r={app:null,theme:null,dashboards:null};r.app=this.loadConfigFromLocalStorage("appConfig"),r.app.configVersion!==Tt&&this.checkConfigUpgradeRequired(!0),r.dashboards=this.loadConfigFromLocalStorage("dashboardsConfig"),r.theme=this.loadConfigFromLocalStorage("themeConfig"),this.activeConfig=r,this.pushSettings()}}}loadConnectionConfig(){let e=this.loadConfigFromLocalStorage("connectionConfig");switch(e.configVersion){case 11:break;default:console.error(`[AppSettings Service] Invalid connectionConfig version ${e.configVersion}. Resetting and loading connection configuration default`),this.resetConnection();break}this.signalkUrl={url:e.signalKUrl,new:!1},this.proxyEnabled=e.proxyEnabled,this.signalKSubscribeAll=e.signalKSubscribeAll,this.useDeviceToken=e.useDeviceToken,this.loginName=e.loginName,this.loginPassword=e.loginPassword,this.useSharedConfig=e.useSharedConfig,this.sharedConfigName=e.sharedConfigName,this.kipUUID=e.kipUUID}resetConnection(){localStorage.setItem("connectionConfig",JSON.stringify(this.getDefaultConnectionConfig())),this.reloadApp()}checkConfigUpgradeRequired(e){e?this.configUpgrade.set(!0):this.storage.listConfigs(9).then(r=>W(this,null,function*(){for(let o of r)try{if((yield this.storage.getConfig(o.scope,o.name,9)).app?.configVersion===10){this.configUpgrade.set(!0),console.log("[AppSettings Service] Configuration upgrade required for version 10.");break}}catch(n){console.error(`[AppSettings Service] Error fetching configuration for ${o.name}:`,n)}})).catch(r=>{console.error("[AppSettings Service] Error fetching configuration data:",r)})}loadConfigFromLocalStorage(e){let r=JSON.parse(localStorage.getItem(e));if(r===null)switch(console.log(`[AppSettings Service] Error loading ${e} config. Force loading ${e} defaults`),e){case"appConfig":r=this.getDefaultAppConfig();break;case"connectionConfig":r=this.getDefaultConnectionConfig();break;case"dashboardsConfig":r=this.getDefaultDashboardsConfig();break;case"themeConfig":r=this.getDefaultThemeConfig();break;default:console.error(`[AppSettings Service] Invalid ${e} default config requested`);break}if(e==="connectionConfig"&&r.configVersion!==Tt)switch(console.log(`[AppSettings Service] Invalid ${e} version. Force loading defaults`),e){case"connectionConfig":r=this.getDefaultConnectionConfig();break}return r}pushSettings(){this.themeName.next(this.activeConfig.theme.themeName),this.dataSets=this.activeConfig.app.dataSets,this.unitDefaults.next(this.activeConfig.app.unitDefaults),this.kipKNotificationConfig.next(this.activeConfig.app.notificationConfig),this.activeConfig.app.autoNightMode===void 0?this.setAutoNightMode(!1):this.autoNightMode.next(this.activeConfig.app.autoNightMode),this.activeConfig.app.redNightMode===void 0?this.setRedNightMode(!1):this.redNightMode.next(this.activeConfig.app.redNightMode),this.activeConfig.app.nightModeBrightness===void 0?this.setNightModeBrightness(.2):this.nightModeBrightness.next(this.activeConfig.app.nightModeBrightness),this.activeConfig.dashboards===void 0?this._dashboards=[]:this._dashboards=this.activeConfig.dashboards}getDefaultUnitsAsO(){return this.unitDefaults.asObservable()}getDefaultUnits(){return this.unitDefaults.getValue()}setDefaultUnits(e){this.unitDefaults.next(e),this.useSharedConfig?this.storage.patchConfig("Array<IUnitDefaults>",e):this.saveAppConfigToLocalStorage()}getAppConfig(){return this.buildAppStorageObject()}getConnectionConfig(){return this.buildConnectionStorageObject()}setConnectionConfig(e){this.loginName=e.loginName,this.loginPassword=e.loginPassword,this.useSharedConfig=e.useSharedConfig,this.proxyEnabled=e.proxyEnabled,this.signalKSubscribeAll=e.signalKSubscribeAll,this.signalkUrl.url=e.signalKUrl,e.useSharedConfig?this.useDeviceToken=!1:this.useDeviceToken=!0,this.saveConnectionConfigToLocalStorage()}setUseDeviceToken(e){this.useDeviceToken=e,this.saveConnectionConfigToLocalStorage()}getDashboardConfig(){return this.buildDashboardStorageObject()}getThemeConfig(){return this.buildThemeStorageObject()}get KipUUID(){return this.kipUUID}getThemeNameAsO(){return this.themeName.asObservable()}setThemeName(e){if(this.themeName.next(e),this.useSharedConfig){let r={themeName:e};this.storage.patchConfig("IThemeConfig",r)}else this.saveThemeConfigToLocalStorage()}getThemeName(){return this.themeName.getValue()}getAutoNightModeAsO(){return this.autoNightMode.asObservable()}setAutoNightMode(e){this.autoNightMode.next(e);let r=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",r):this.saveAppConfigToLocalStorage()}getAutoNightMode(){return this.autoNightMode.getValue()}getRedNightModeAsO(){return this.redNightMode.asObservable()}getRedNightMode(){return this.redNightMode.getValue()}setRedNightMode(e){this.redNightMode.next(e);let r=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",r):this.saveAppConfigToLocalStorage()}getNightModeBrightness(){return this.nightModeBrightness.getValue()}setNightModeBrightness(e){this.nightModeBrightness.next(e);let r=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",r):this.saveAppConfigToLocalStorage()}getWidgets(){return this.widgets}saveDashboards(e){this.useSharedConfig?this.storage.storageServiceReady$.getValue()&&this.storage.patchConfig("Dashboards",e):this.saveLDashboardsConfigToLocalStorage(e),this._dashboards=e}saveDataSets(e){this.dataSets=e,this.useSharedConfig?this.storage.patchConfig("Array<IDatasetDef>",e):this.saveAppConfigToLocalStorage()}getDataSets(){return this.dataSets}getNotificationServiceConfigAsO(){return this.kipKNotificationConfig.asObservable()}getNotificationConfig(){return this.kipKNotificationConfig.getValue()}setNotificationConfig(e){this.kipKNotificationConfig.next(e),this.useSharedConfig?this.storage.patchConfig("INotificationConfig",e):this.saveAppConfigToLocalStorage()}resetSettings(){let e={app:null,theme:null,dashboards:null};e.app=this.getDefaultAppConfig(),e.theme=this.getDefaultThemeConfig(),e.dashboards=this.getDefaultDashboardsConfig(),this.useSharedConfig?this.storage.storageServiceReady$.getValue()&&this.storage.setConfig("user",this.sharedConfigName,e).then(()=>{console.log("[AppSettings Service] Replaced server config name: "+this.sharedConfigName+", with default configuration values"),this.reloadApp()}).catch(r=>{console.error("[AppSettings Service] Error replacing server config name: "+this.sharedConfigName+", with default configuration values",r)}):this.reloadApp()}replaceConfig(e,r,o){let n=JSON.stringify(r);localStorage.setItem(e,n),o&&this.reloadApp()}loadDemoConfig(){if(this.useSharedConfig){let e={app:tr,dashboards:ir,theme:rr};console.log("[AppSettings Service] Loading Demo configuration settings as remote config: "+this.useSharedConfig+" and reloading app."),this.storage.setConfig("user",this.sharedConfigName,e),this.reloadApp()}else console.log("[AppSettings Service] Loading Demo configuration settings to LocalStorage"),this.replaceConfig("appConfig",tr),this.replaceConfig("dashboardsConfig",ir),this.replaceConfig("themeConfig",rr,!0)}reloadApp(){console.log("[AppSettings Service] Reload app"),location.replace("./")}buildAppStorageObject(){return{configVersion:Tt,autoNightMode:this.autoNightMode.getValue(),redNightMode:this.redNightMode.getValue(),nightModeBrightness:this.nightModeBrightness.getValue(),dataSets:this.dataSets,unitDefaults:this.unitDefaults.getValue(),notificationConfig:this.kipKNotificationConfig.getValue()}}buildConnectionStorageObject(){return{configVersion:Tt,kipUUID:this.kipUUID,signalKUrl:this.signalkUrl.url,proxyEnabled:this.proxyEnabled,signalKSubscribeAll:this.signalKSubscribeAll,useDeviceToken:this.useDeviceToken,loginName:this.loginName,loginPassword:this.loginPassword,useSharedConfig:this.useSharedConfig,sharedConfigName:this.sharedConfigName}}buildDashboardStorageObject(){return this._dashboards}buildThemeStorageObject(){return{themeName:this.themeName.getValue()}}saveAppConfigToLocalStorage(){console.log("[AppSettings Service] Saving Application config to LocalStorage"),localStorage.setItem("appConfig",JSON.stringify(this.buildAppStorageObject()))}saveConnectionConfigToLocalStorage(){console.log("[AppSettings Service] Saving Connection config to LocalStorage"),localStorage.setItem("connectionConfig",JSON.stringify(this.buildConnectionStorageObject()))}saveLDashboardsConfigToLocalStorage(e){console.log("[AppSettings Service] Saving Dashboard config to LocalStorage"),localStorage.setItem("dashboardsConfig",JSON.stringify(e))}saveThemeConfigToLocalStorage(){console.log("[AppSettings Service] Saving Theme config to LocalStorage"),localStorage.setItem("themeConfig",JSON.stringify(this.buildThemeStorageObject()))}getDefaultAppConfig(){let e=Co;return e.notificationConfig=wt,e.unitDefaults=Qt,e.configVersion=Tt,localStorage.setItem("appConfig",JSON.stringify(e)),e}getDefaultConnectionConfig(){let e=To;return e.kipUUID=De.create(),e.signalKUrl=window.location.origin,localStorage.setItem("connectionConfig",JSON.stringify(e)),e}getDefaultDashboardsConfig(){let e=[];return localStorage.setItem("dashboardsConfig",JSON.stringify(e)),e}getDefaultThemeConfig(){let e=wo;return localStorage.setItem("themeConfig",JSON.stringify(e)),e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ws(){this.__data__=[],this.size=0}var Do=Ws;function Hs(t,i){return t===i||t!==t&&i!==i}var fe=Hs;function Bs(t,i){for(var e=t.length;e--;)if(fe(t[e][0],i))return e;return-1}var Ae=Bs;var zs=Array.prototype,Gs=zs.splice;function qs(t){var i=this.__data__,e=Ae(i,t);if(e<0)return!1;var r=i.length-1;return e==r?i.pop():Gs.call(i,e,1),--this.size,!0}var Ao=qs;function Ks(t){var i=this.__data__,e=Ae(i,t);return e<0?void 0:i[e][1]}var Mo=Ks;function Qs(t){return Ae(this.__data__,t)>-1}var Eo=Qs;function Js(t,i){var e=this.__data__,r=Ae(e,t);return r<0?(++this.size,e.push([t,i])):e[r][1]=i,this}var ko=Js;function Je(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var r=t[i];this.set(r[0],r[1])}}Je.prototype.clear=Do;Je.prototype.delete=Ao;Je.prototype.get=Mo;Je.prototype.has=Eo;Je.prototype.set=ko;var Me=Je;function Zs(){this.__data__=new Me,this.size=0}var Fo=Zs;function Ys(t){var i=this.__data__,e=i.delete(t);return this.size=i.size,e}var Oo=Ys;function Xs(t){return this.__data__.get(t)}var Io=Xs;function el(t){return this.__data__.has(t)}var Ro=el;var tl=typeof global=="object"&&global&&global.Object===Object&&global,Jt=tl;var il=typeof self=="object"&&self&&self.Object===Object&&self,rl=Jt||il||Function("return this")(),T=rl;var ol=T.Symbol,J=ol;var Vo=Object.prototype,nl=Vo.hasOwnProperty,al=Vo.toString,Dt=J?J.toStringTag:void 0;function sl(t){var i=nl.call(t,Dt),e=t[Dt];try{t[Dt]=void 0;var r=!0}catch{}var o=al.call(t);return r&&(i?t[Dt]=e:delete t[Dt]),o}var No=sl;var ll=Object.prototype,dl=ll.toString;function cl(t){return dl.call(t)}var Po=cl;var fl="[object Null]",ul="[object Undefined]",Uo=J?J.toStringTag:void 0;function ml(t){return t==null?t===void 0?ul:fl:Uo&&Uo in Object(t)?No(t):Po(t)}var te=ml;function pl(t){var i=typeof t;return t!=null&&(i=="object"||i=="function")}var O=pl;var hl="[object AsyncFunction]",gl="[object Function]",vl="[object GeneratorFunction]",_l="[object Proxy]";function bl(t){if(!O(t))return!1;var i=te(t);return i==gl||i==vl||i==hl||i==_l}var Ze=bl;var yl=T["__core-js_shared__"],Zt=yl;var Lo=function(){var t=/[^.]+$/.exec(Zt&&Zt.keys&&Zt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function xl(t){return!!Lo&&Lo in t}var jo=xl;var Sl=Function.prototype,Cl=Sl.toString;function wl(t){if(t!=null){try{return Cl.call(t)}catch{}try{return t+""}catch{}}return""}var ve=wl;var Tl=/[\\^$.*+?()[\]{}|]/g,Dl=/^\[object .+?Constructor\]$/,Al=Function.prototype,Ml=Object.prototype,El=Al.toString,kl=Ml.hasOwnProperty,Fl=RegExp("^"+El.call(kl).replace(Tl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ol(t){if(!O(t)||jo(t))return!1;var i=Ze(t)?Fl:Dl;return i.test(ve(t))}var $o=Ol;function Il(t,i){return t?.[i]}var Wo=Il;function Rl(t,i){var e=Wo(t,i);return $o(e)?e:void 0}var j=Rl;var Vl=j(T,"Map"),Ee=Vl;var Nl=j(Object,"create"),_e=Nl;function Pl(){this.__data__=_e?_e(null):{},this.size=0}var Ho=Pl;function Ul(t){var i=this.has(t)&&delete this.__data__[t];return this.size-=i?1:0,i}var Bo=Ul;var Ll="__lodash_hash_undefined__",jl=Object.prototype,$l=jl.hasOwnProperty;function Wl(t){var i=this.__data__;if(_e){var e=i[t];return e===Ll?void 0:e}return $l.call(i,t)?i[t]:void 0}var zo=Wl;var Hl=Object.prototype,Bl=Hl.hasOwnProperty;function zl(t){var i=this.__data__;return _e?i[t]!==void 0:Bl.call(i,t)}var Go=zl;var Gl="__lodash_hash_undefined__";function ql(t,i){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=_e&&i===void 0?Gl:i,this}var qo=ql;function Ye(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var r=t[i];this.set(r[0],r[1])}}Ye.prototype.clear=Ho;Ye.prototype.delete=Bo;Ye.prototype.get=zo;Ye.prototype.has=Go;Ye.prototype.set=qo;var or=Ye;function Kl(){this.size=0,this.__data__={hash:new or,map:new(Ee||Me),string:new or}}var Ko=Kl;function Ql(t){var i=typeof t;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?t!=="__proto__":t===null}var Qo=Ql;function Jl(t,i){var e=t.__data__;return Qo(i)?e[typeof i=="string"?"string":"hash"]:e.map}var ke=Jl;function Zl(t){var i=ke(this,t).delete(t);return this.size-=i?1:0,i}var Jo=Zl;function Yl(t){return ke(this,t).get(t)}var Zo=Yl;function Xl(t){return ke(this,t).has(t)}var Yo=Xl;function ed(t,i){var e=ke(this,t),r=e.size;return e.set(t,i),this.size+=e.size==r?0:1,this}var Xo=ed;function Xe(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var r=t[i];this.set(r[0],r[1])}}Xe.prototype.clear=Ko;Xe.prototype.delete=Jo;Xe.prototype.get=Zo;Xe.prototype.has=Yo;Xe.prototype.set=Xo;var Yt=Xe;var td=200;function id(t,i){var e=this.__data__;if(e instanceof Me){var r=e.__data__;if(!Ee||r.length<td-1)return r.push([t,i]),this.size=++e.size,this;e=this.__data__=new Yt(r)}return e.set(t,i),this.size=e.size,this}var en=id;function et(t){var i=this.__data__=new Me(t);this.size=i.size}et.prototype.clear=Fo;et.prototype.delete=Oo;et.prototype.get=Io;et.prototype.has=Ro;et.prototype.set=en;var Fe=et;function rd(t,i){for(var e=-1,r=t==null?0:t.length;++e<r&&i(t[e],e,t)!==!1;);return t}var tn=rd;var od=function(){try{var t=j(Object,"defineProperty");return t({},"",{}),t}catch{}}(),tt=od;function nd(t,i,e){i=="__proto__"&&tt?tt(t,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[i]=e}var it=nd;var ad=Object.prototype,sd=ad.hasOwnProperty;function ld(t,i,e){var r=t[i];(!(sd.call(t,i)&&fe(r,e))||e===void 0&&!(i in t))&&it(t,i,e)}var Xt=ld;function dd(t,i,e,r){var o=!e;e||(e={});for(var n=-1,a=i.length;++n<a;){var s=i[n],l=r?r(e[s],t[s],s,e,t):void 0;l===void 0&&(l=t[s]),o?it(e,s,l):Xt(e,s,l)}return e}var ue=dd;function cd(t,i){for(var e=-1,r=Array(t);++e<t;)r[e]=i(e);return r}var rn=cd;function fd(t){return t!=null&&typeof t=="object"}var k=fd;var ud="[object Arguments]";function md(t){return k(t)&&te(t)==ud}var nr=md;var on=Object.prototype,pd=on.hasOwnProperty,hd=on.propertyIsEnumerable,gd=nr(function(){return arguments}())?nr:function(t){return k(t)&&pd.call(t,"callee")&&!hd.call(t,"callee")},At=gd;var vd=Array.isArray,Z=vd;function _d(){return!1}var nn=_d;var ln=typeof exports=="object"&&exports&&!exports.nodeType&&exports,an=ln&&typeof module=="object"&&module&&!module.nodeType&&module,bd=an&&an.exports===ln,sn=bd?T.Buffer:void 0,yd=sn?sn.isBuffer:void 0,xd=yd||nn,be=xd;var Sd=9007199254740991,Cd=/^(?:0|[1-9]\d*)$/;function wd(t,i){var e=typeof t;return i=i??Sd,!!i&&(e=="number"||e!="symbol"&&Cd.test(t))&&t>-1&&t%1==0&&t<i}var ei=wd;var Td=9007199254740991;function Dd(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Td}var ti=Dd;var Ad="[object Arguments]",Md="[object Array]",Ed="[object Boolean]",kd="[object Date]",Fd="[object Error]",Od="[object Function]",Id="[object Map]",Rd="[object Number]",Vd="[object Object]",Nd="[object RegExp]",Pd="[object Set]",Ud="[object String]",Ld="[object WeakMap]",jd="[object ArrayBuffer]",$d="[object DataView]",Wd="[object Float32Array]",Hd="[object Float64Array]",Bd="[object Int8Array]",zd="[object Int16Array]",Gd="[object Int32Array]",qd="[object Uint8Array]",Kd="[object Uint8ClampedArray]",Qd="[object Uint16Array]",Jd="[object Uint32Array]",S={};S[Wd]=S[Hd]=S[Bd]=S[zd]=S[Gd]=S[qd]=S[Kd]=S[Qd]=S[Jd]=!0;S[Ad]=S[Md]=S[jd]=S[Ed]=S[$d]=S[kd]=S[Fd]=S[Od]=S[Id]=S[Rd]=S[Vd]=S[Nd]=S[Pd]=S[Ud]=S[Ld]=!1;function Zd(t){return k(t)&&ti(t.length)&&!!S[te(t)]}var dn=Zd;function Yd(t){return function(i){return t(i)}}var rt=Yd;var cn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Mt=cn&&typeof module=="object"&&module&&!module.nodeType&&module,Xd=Mt&&Mt.exports===cn,ar=Xd&&Jt.process,ec=function(){try{var t=Mt&&Mt.require&&Mt.require("util").types;return t||ar&&ar.binding&&ar.binding("util")}catch{}}(),ye=ec;var fn=ye&&ye.isTypedArray,tc=fn?rt(fn):dn,ot=tc;var ic=Object.prototype,rc=ic.hasOwnProperty;function oc(t,i){var e=Z(t),r=!e&&At(t),o=!e&&!r&&be(t),n=!e&&!r&&!o&&ot(t),a=e||r||o||n,s=a?rn(t.length,String):[],l=s.length;for(var c in t)(i||rc.call(t,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||n&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ei(c,l)))&&s.push(c);return s}var ii=oc;var nc=Object.prototype;function ac(t){var i=t&&t.constructor,e=typeof i=="function"&&i.prototype||nc;return t===e}var nt=ac;function sc(t,i){return function(e){return t(i(e))}}var ri=sc;var lc=ri(Object.keys,Object),un=lc;var dc=Object.prototype,cc=dc.hasOwnProperty;function fc(t){if(!nt(t))return un(t);var i=[];for(var e in Object(t))cc.call(t,e)&&e!="constructor"&&i.push(e);return i}var mn=fc;function uc(t){return t!=null&&ti(t.length)&&!Ze(t)}var Oe=uc;function mc(t){return Oe(t)?ii(t):mn(t)}var at=mc;function pc(t,i){return t&&ue(i,at(i),t)}var pn=pc;function hc(t){var i=[];if(t!=null)for(var e in Object(t))i.push(e);return i}var hn=hc;var gc=Object.prototype,vc=gc.hasOwnProperty;function _c(t){if(!O(t))return hn(t);var i=nt(t),e=[];for(var r in t)r=="constructor"&&(i||!vc.call(t,r))||e.push(r);return e}var gn=_c;function bc(t){return Oe(t)?ii(t,!0):gn(t)}var me=bc;function yc(t,i){return t&&ue(i,me(i),t)}var vn=yc;var xn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_n=xn&&typeof module=="object"&&module&&!module.nodeType&&module,xc=_n&&_n.exports===xn,bn=xc?T.Buffer:void 0,yn=bn?bn.allocUnsafe:void 0;function Sc(t,i){if(i)return t.slice();var e=t.length,r=yn?yn(e):new t.constructor(e);return t.copy(r),r}var oi=Sc;function Cc(t,i){var e=-1,r=t.length;for(i||(i=Array(r));++e<r;)i[e]=t[e];return i}var ni=Cc;function wc(t,i){for(var e=-1,r=t==null?0:t.length,o=0,n=[];++e<r;){var a=t[e];i(a,e,t)&&(n[o++]=a)}return n}var Sn=wc;function Tc(){return[]}var ai=Tc;var Dc=Object.prototype,Ac=Dc.propertyIsEnumerable,Cn=Object.getOwnPropertySymbols,Mc=Cn?function(t){return t==null?[]:(t=Object(t),Sn(Cn(t),function(i){return Ac.call(t,i)}))}:ai,st=Mc;function Ec(t,i){return ue(t,st(t),i)}var wn=Ec;function kc(t,i){for(var e=-1,r=i.length,o=t.length;++e<r;)t[o+e]=i[e];return t}var si=kc;var Fc=ri(Object.getPrototypeOf,Object),lt=Fc;var Oc=Object.getOwnPropertySymbols,Ic=Oc?function(t){for(var i=[];t;)si(i,st(t)),t=lt(t);return i}:ai,li=Ic;function Rc(t,i){return ue(t,li(t),i)}var Tn=Rc;function Vc(t,i,e){var r=i(t);return Z(t)?r:si(r,e(t))}var di=Vc;function Nc(t){return di(t,at,st)}var Et=Nc;function Pc(t){return di(t,me,li)}var Dn=Pc;var Uc=j(T,"DataView"),ci=Uc;var Lc=j(T,"Promise"),fi=Lc;var jc=j(T,"Set"),ui=jc;var $c=j(T,"WeakMap"),mi=$c;var An="[object Map]",Wc="[object Object]",Mn="[object Promise]",En="[object Set]",kn="[object WeakMap]",Fn="[object DataView]",Hc=ve(ci),Bc=ve(Ee),zc=ve(fi),Gc=ve(ui),qc=ve(mi),Ve=te;(ci&&Ve(new ci(new ArrayBuffer(1)))!=Fn||Ee&&Ve(new Ee)!=An||fi&&Ve(fi.resolve())!=Mn||ui&&Ve(new ui)!=En||mi&&Ve(new mi)!=kn)&&(Ve=function(t){var i=te(t),e=i==Wc?t.constructor:void 0,r=e?ve(e):"";if(r)switch(r){case Hc:return Fn;case Bc:return An;case zc:return Mn;case Gc:return En;case qc:return kn}return i});var xe=Ve;var Kc=Object.prototype,Qc=Kc.hasOwnProperty;function Jc(t){var i=t.length,e=new t.constructor(i);return i&&typeof t[0]=="string"&&Qc.call(t,"index")&&(e.index=t.index,e.input=t.input),e}var On=Jc;var Zc=T.Uint8Array,dt=Zc;function Yc(t){var i=new t.constructor(t.byteLength);return new dt(i).set(new dt(t)),i}var ct=Yc;function Xc(t,i){var e=i?ct(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}var In=Xc;var ef=/\w*$/;function tf(t){var i=new t.constructor(t.source,ef.exec(t));return i.lastIndex=t.lastIndex,i}var Rn=tf;var Vn=J?J.prototype:void 0,Nn=Vn?Vn.valueOf:void 0;function rf(t){return Nn?Object(Nn.call(t)):{}}var Pn=rf;function of(t,i){var e=i?ct(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}var pi=of;var nf="[object Boolean]",af="[object Date]",sf="[object Map]",lf="[object Number]",df="[object RegExp]",cf="[object Set]",ff="[object String]",uf="[object Symbol]",mf="[object ArrayBuffer]",pf="[object DataView]",hf="[object Float32Array]",gf="[object Float64Array]",vf="[object Int8Array]",_f="[object Int16Array]",bf="[object Int32Array]",yf="[object Uint8Array]",xf="[object Uint8ClampedArray]",Sf="[object Uint16Array]",Cf="[object Uint32Array]";function wf(t,i,e){var r=t.constructor;switch(i){case mf:return ct(t);case nf:case af:return new r(+t);case pf:return In(t,e);case hf:case gf:case vf:case _f:case bf:case yf:case xf:case Sf:case Cf:return pi(t,e);case sf:return new r;case lf:case ff:return new r(t);case df:return Rn(t);case cf:return new r;case uf:return Pn(t)}}var Un=wf;var Ln=Object.create,Tf=function(){function t(){}return function(i){if(!O(i))return{};if(Ln)return Ln(i);t.prototype=i;var e=new t;return t.prototype=void 0,e}}(),jn=Tf;function Df(t){return typeof t.constructor=="function"&&!nt(t)?jn(lt(t)):{}}var hi=Df;var Af="[object Map]";function Mf(t){return k(t)&&xe(t)==Af}var $n=Mf;var Wn=ye&&ye.isMap,Ef=Wn?rt(Wn):$n,Hn=Ef;var kf="[object Set]";function Ff(t){return k(t)&&xe(t)==kf}var Bn=Ff;var zn=ye&&ye.isSet,Of=zn?rt(zn):Bn,Gn=Of;var If=1,Rf=2,Vf=4,qn="[object Arguments]",Nf="[object Array]",Pf="[object Boolean]",Uf="[object Date]",Lf="[object Error]",Kn="[object Function]",jf="[object GeneratorFunction]",$f="[object Map]",Wf="[object Number]",Qn="[object Object]",Hf="[object RegExp]",Bf="[object Set]",zf="[object String]",Gf="[object Symbol]",qf="[object WeakMap]",Kf="[object ArrayBuffer]",Qf="[object DataView]",Jf="[object Float32Array]",Zf="[object Float64Array]",Yf="[object Int8Array]",Xf="[object Int16Array]",eu="[object Int32Array]",tu="[object Uint8Array]",iu="[object Uint8ClampedArray]",ru="[object Uint16Array]",ou="[object Uint32Array]",y={};y[qn]=y[Nf]=y[Kf]=y[Qf]=y[Pf]=y[Uf]=y[Jf]=y[Zf]=y[Yf]=y[Xf]=y[eu]=y[$f]=y[Wf]=y[Qn]=y[Hf]=y[Bf]=y[zf]=y[Gf]=y[tu]=y[iu]=y[ru]=y[ou]=!0;y[Lf]=y[Kn]=y[qf]=!1;function gi(t,i,e,r,o,n){var a,s=i&If,l=i&Rf,c=i&Vf;if(e&&(a=o?e(t,r,o,n):e(t)),a!==void 0)return a;if(!O(t))return t;var p=Z(t);if(p){if(a=On(t),!s)return ni(t,a)}else{var m=xe(t),u=m==Kn||m==jf;if(be(t))return oi(t,s);if(m==Qn||m==qn||u&&!o){if(a=l||u?{}:hi(t),!s)return l?Tn(t,vn(a,t)):wn(t,pn(a,t))}else{if(!y[m])return o?t:{};a=Un(t,m,s)}}n||(n=new Fe);var x=n.get(t);if(x)return x;n.set(t,a),Gn(t)?t.forEach(function(D){a.add(gi(D,i,e,D,t,n))}):Hn(t)&&t.forEach(function(D,I){a.set(I,gi(D,i,e,I,t,n))});var v=c?l?Dn:Et:l?me:at,A=p?void 0:v(t);return tn(A||t,function(D,I){A&&(I=D,D=t[I]),Xt(a,I,gi(D,i,e,I,t,n))}),a}var Jn=gi;var nu=1,au=4;function su(t){return Jn(t,nu|au)}var sr=su;var lu={url:"",deserializer:t=>JSON.parse(t.data),serializer:t=>JSON.stringify(t)},du="WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }",vi=class t extends Ir{constructor(i,e){if(super(),this._socket=null,i instanceof vt)this.destination=e,this.source=i;else{let r=this._config=Object.assign({},lu);if(this._output=new _,typeof i=="string")r.url=i;else for(let o in i)i.hasOwnProperty(o)&&(r[o]=i[o]);if(!r.WebSocketCtor&&WebSocket)r.WebSocketCtor=WebSocket;else if(!r.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new Ue}}lift(i){let e=new t(this._config,this.destination);return e.operator=i,e.source=this,e}_resetState(){this._socket=null,this.source||(this.destination=new Ue),this._output=new _}multiplex(i,e,r){let o=this;return new vt(n=>{try{o.next(i())}catch(s){n.error(s)}let a=o.subscribe({next:s=>{try{r(s)&&n.next(s)}catch(l){n.error(l)}},error:s=>n.error(s),complete:()=>n.complete()});return()=>{try{o.next(e())}catch(s){n.error(s)}a.unsubscribe()}})}_connectSocket(){let{WebSocketCtor:i,protocol:e,url:r,binaryType:o}=this._config,n=this._output,a=null;try{a=e?new i(r,e):new i(r),this._socket=a,o&&(this._socket.binaryType=o)}catch(l){n.error(l);return}let s=new $t(()=>{this._socket=null,a&&a.readyState===1&&a.close()});a.onopen=l=>{let{_socket:c}=this;if(!c){a.close(),this._resetState();return}let{openObserver:p}=this._config;p&&p.next(l);let m=this.destination;this.destination=Or.create(u=>{if(a.readyState===1)try{let{serializer:x}=this._config;a.send(x(u))}catch(x){this.destination.error(x)}},u=>{let{closingObserver:x}=this._config;x&&x.next(void 0),u&&u.code?a.close(u.code,u.reason):n.error(new TypeError(du)),this._resetState()},()=>{let{closingObserver:u}=this._config;u&&u.next(void 0),a.close(),this._resetState()}),m&&m instanceof Ue&&s.add(m.subscribe(this.destination))},a.onerror=l=>{this._resetState(),n.error(l)},a.onclose=l=>{a===this._socket&&this._resetState();let{closeObserver:c}=this._config;c&&c.next(l),l.wasClean?n.complete():n.error(l)},a.onmessage=l=>{try{let{deserializer:c}=this._config;n.next(c(l))}catch(c){n.error(c)}}}_subscribe(i){let{source:e}=this;return e?e.subscribe(i):(this._socket||this._connectSocket(),this._output.subscribe(i),i.add(()=>{let{_socket:r}=this;this._output.observers.length===0&&(r&&(r.readyState===1||r.readyState===0)&&r.close(),this._resetState())}),i)}unsubscribe(){let{_socket:i}=this;i&&(i.readyState===1||i.readyState===0)&&i.close(),this._resetState(),super.unsubscribe()}};function lr(t){return new vi(t)}var Zn=(()=>{class t{_destroyRef=d(_t);_skRequests$=new _;_skNotificationsMsg$=new _;_skValue$=new _;_skMetadata$=new _;_vesselSelfUrn$=new _;_selfUrn=void 0;streamEndpoint={operation:0,message:"Not connected",hasToken:!1};streamEndpoint$=new b(this.streamEndpoint);endpointWS=null;SubscriptionType="self";WS_CONNECTION_SUBSCRIBE="?subscribe=";WS_CONNECTION_META="&sendMeta=all";socketWS$;socketWSCloseEvent$=new _;socketWSOpenEvent$=new _;authToken=null;server=d(Qe);auth=d(Kt);connectionStateMachine=d(qt);zones=d(H);FLATTEN_CONFIG={maxDepth:3,maxObjectSize:20,enableFlattening:!0};constructor(){this.connectionStateMachine.setWebSocketRetryCallback(()=>{console.log("[Delta Service] Executing WebSocket retry via callback"),this.retryWebSocketConnection()}),this.server.serverServiceEndpoint$.pipe(z(this._destroyRef)).subscribe(e=>{e.operation===2&&(this.endpointWS=e.WsServiceUrl,e.subscribeAll?this.SubscriptionType="all":this.SubscriptionType="self")}),this.connectionStateMachine.state$.pipe(z(this._destroyRef)).subscribe(e=>{switch(e){case f.WebSocketConnecting:this.handleWebSocketConnecting();break;case f.Connected:break;case f.Disconnected:case f.WebSocketError:case f.PermanentFailure:this.handleDisconnection();break}}),this.auth.authToken$.pipe(z(this._destroyRef)).subscribe(e=>{this.authToken!=e&&(this.authToken=e,this.socketWS$&&this.connectionStateMachine.isFullyConnected()&&(this.closeWS("Token changed"),this.connectionStateMachine.startWebSocketConnection()))}),this.socketWSOpenEvent$.pipe(z(this._destroyRef)).subscribe(()=>{this.streamEndpoint.message="Connected",this.streamEndpoint.operation=2,this.authToken?console.log("[Delta Service] WebSocket connected with Authorization Token"):console.log("[Delta Service] WebSocket connected without Authorization Token"),this.streamEndpoint$.next(this.streamEndpoint),this.connectionStateMachine.onWebSocketConnected()}),this.socketWSCloseEvent$.pipe(z(this._destroyRef)).subscribe(e=>{e.wasClean?(console.log("[Delta Service] WebSocket closed cleanly"),this.streamEndpoint.message="WebSocket closed",this.streamEndpoint.operation=0):(console.log("[Delta Service] WebSocket terminated due to socket error"),this.streamEndpoint.message="WebSocket error",this.streamEndpoint.operation=3,this.connectionStateMachine.onWebSocketError("WebSocket connection lost")),this.streamEndpoint$.next(this.streamEndpoint)}),Lr(document,"visibilitychange").pipe(z(this._destroyRef)).subscribe(()=>{document.visibilityState==="visible"?(console.log("[Delta Service] App resumed, checking WebSocket connection..."),this.checkAndReconnect("App resumed")):document.visibilityState==="hidden"&&console.log("[Delta Service] App suspended")})}connectWS(e){this.streamEndpoint.message="Connecting",this.streamEndpoint.operation=1,console.log(`[Delta Service] ${e}: WebSocket opening...`),this.streamEndpoint$.next(this.streamEndpoint),this.socketWS$=this.getNewWebSocket(),this.zones.runOutsideAngular(()=>{this.socketWS$.pipe(z(this._destroyRef)).subscribe({next:r=>this.processWebsocketMessage(r),error:r=>{console.error("[Delta Service] WebSocket error:",r)}})})}retryWebSocketConnection(){if(console.log("[Delta Service] Retrying WebSocket connection"),!this.endpointWS){console.warn("[Delta Service] No WebSocket endpoint available for retry"),this.connectionStateMachine.onWebSocketError("No WebSocket endpoint available");return}this.socketWS$&&this.closeWS("Retrying connection"),this.connectWS("WebSocket retry attempt")}handleWebSocketConnecting(){if(!this.endpointWS){console.warn("[Delta Service] No WebSocket endpoint available"),this.connectionStateMachine.onWebSocketError("No WebSocket endpoint available");return}this.socketWS$&&this.closeWS("Starting new connection"),this.connectWS("ConnectionStateMachine request")}handleDisconnection(){this.socketWS$&&this.closeWS("ConnectionStateMachine disconnection"),this.streamEndpoint.message="Not connected",this.streamEndpoint.operation=0,this.streamEndpoint$.next(this.streamEndpoint)}getNewWebSocket(){let e=this.WS_CONNECTION_SUBSCRIBE+this.SubscriptionType+this.WS_CONNECTION_META;return this.authToken!=null?(e+="&token="+this.authToken.token,this.streamEndpoint.hasToken=!0):this.streamEndpoint.hasToken=!1,lr({url:this.endpointWS+e,closeObserver:this.socketWSCloseEvent$,openObserver:this.socketWSOpenEvent$})}closeWS(e){this.socketWS$&&(this.streamEndpoint.operation=4,console.log("[Delta Service] "+e+": WebSocket closing..."),this.socketWS$.complete())}publishDelta(e){this.socketWS$?(console.log("[Delta Service] WebSocket sending message"),this.socketWS$.next(e)):console.log("[Delta Service] No WebSocket present to send message - dropping message")}processWebsocketMessage(e){if(e.updates){this.parseUpdates(e.updates,e.context);return}if(e.requestId){this._skRequests$.next(e);return}if(e.errorMessage){console.warn("[Delta Service] Service received stream error message: "+e.errorMessage);return}if(e.self){this._selfUrn=e.self,this._vesselSelfUrn$.next(e.self),this.server.setServerInfo(e.name,e.version,e.roles);return}console.warn("[Delta Service] Unknown message type. Message content:"+e)}parseUpdates(e,r){e.forEach(o=>{o.meta!==void 0&&o.meta.forEach(n=>this.parseSkMeta(n,r)),o.values!==void 0&&o.values.forEach(n=>{if(n.path.startsWith("notifications."))this._skNotificationsMsg$.next(n);else if(typeof n.value=="object"&&n.value!==null)this.FLATTEN_CONFIG.enableFlattening&&this.canFlattenCompletely(n.value,this.FLATTEN_CONFIG.maxDepth,this.FLATTEN_CONFIG.maxObjectSize)?this.flattenObjectValue(n.value,n.path).forEach(s=>{let l={context:r,path:s.path,source:o.$source,timestamp:o.timestamp,value:s.value};this._skValue$.next(l)}):Object.keys(n.value).forEach(a=>{let s={context:r,path:`${n.path}.${a}`,source:o.$source,timestamp:o.timestamp,value:n.value[a]};this._skValue$.next(s)});else{let a={context:r,path:n.path,source:o.$source,timestamp:o.timestamp,value:n.value};this._skValue$.next(a)}})})}canFlattenCompletely(e,r,o,n=0){if(n>=r)return!1;if(typeof e!="object"||e===null)return!0;let a=Object.keys(e);if(a.length>o)return!1;for(let s of a)if(!this.canFlattenCompletely(e[s],r,o,n+1))return!1;return!0}flattenObjectValue(e,r,o=0){let n=[];if(typeof e!="object"||e===null||o>=this.FLATTEN_CONFIG.maxDepth)return[{path:r,value:e}];let a=Object.keys(e);for(let s of a){let l=r?`${r}.${s}`:s,c=this.flattenObjectValue(e[s],l,o+1);n.push(...c)}return n}parseSkMeta(e,r){e.value.properties!==void 0?Object.keys(e.value.properties).forEach(o=>{this._skMetadata$.next({context:r,path:`${e.path}.${o}`,meta:e.value.properties[o]})}):this._skMetadata$.next({context:r,path:e.path,meta:e.value})}getDataStreamStatusAsO(){return this.streamEndpoint$.asObservable()}subscribeRequestUpdates(){return this._skRequests$.asObservable()}subscribeNotificationsUpdates(){return this._skNotificationsMsg$.asObservable()}subscribeDataPathsUpdates(){return this._skValue$.asObservable()}subscribeMetadataUpdates(){return this._skMetadata$.asObservable()}subscribeSelfUpdates(){return this._vesselSelfUrn$.asObservable()}checkAndReconnect(e){this.connectionStateMachine.isFullyConnected()?console.log(`[Delta Service] ${e}: Already fully connected.`):(console.log(`[Delta Service] ${e}: Not fully connected, requesting reconnection...`),this.connectionStateMachine.isHTTPConnected()?this.connectionStateMachine.startWebSocketConnection():console.log(`[Delta Service] ${e}: HTTP not connected, cannot start WebSocket`))}ngOnDestroy(){this.closeWS("App terminated"),this._skRequests$.complete(),this._skNotificationsMsg$.complete(),this._skValue$.complete(),this._skMetadata$.complete(),this._vesselSelfUrn$.complete(),this.streamEndpoint$.complete(),this.socketWSOpenEvent$.complete(),this.socketWSCloseEvent$.complete(),this.socketWS$?.complete()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function cu(t){return t}var _i=cu;function fu(t,i,e){switch(e.length){case 0:return t.call(i);case 1:return t.call(i,e[0]);case 2:return t.call(i,e[0],e[1]);case 3:return t.call(i,e[0],e[1],e[2])}return t.apply(i,e)}var Yn=fu;var uu=800,mu=16,pu=Date.now;function hu(t){var i=0,e=0;return function(){var r=pu(),o=mu-(r-e);if(e=r,o>0){if(++i>=uu)return arguments[0]}else i=0;return t.apply(void 0,arguments)}}var Xn=hu;function gu(t){return function(){return t}}var ea=gu;var vu=tt?function(t,i){return tt(t,"toString",{configurable:!0,enumerable:!1,value:ea(i),writable:!0})}:_i,ta=vu;var _u=Xn(ta),ia=_u;var ra=Math.max;function bu(t,i,e){return i=ra(i===void 0?t.length-1:i,0),function(){for(var r=arguments,o=-1,n=ra(r.length-i,0),a=Array(n);++o<n;)a[o]=r[i+o];o=-1;for(var s=Array(i+1);++o<i;)s[o]=r[o];return s[i]=e(a),Yn(t,this,s)}}var oa=bu;function yu(t,i){return ia(oa(t,i,_i),t+"")}var na=yu;function xu(t,i,e){if(!O(e))return!1;var r=typeof i;return(r=="number"?Oe(e)&&ei(i,e.length):r=="string"&&i in e)?fe(e[i],t):!1}var aa=xu;function Su(t){return na(function(i,e){var r=-1,o=e.length,n=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(n=t.length>3&&typeof n=="function"?(o--,n):void 0,a&&aa(e[0],e[1],a)&&(n=o<3?void 0:n,o=1),i=Object(i);++r<o;){var s=e[r];s&&t(i,s,r,n)}return i})}var sa=Su;var Cu="[object Object]",wu=Function.prototype,Tu=Object.prototype,la=wu.toString,Du=Tu.hasOwnProperty,Au=la.call(Object);function Mu(t){if(!k(t)||te(t)!=Cu)return!1;var i=lt(t);if(i===null)return!0;var e=Du.call(i,"constructor")&&i.constructor;return typeof e=="function"&&e instanceof e&&la.call(e)==Au}var da=Mu;var Eu="__lodash_hash_undefined__";function ku(t){return this.__data__.set(t,Eu),this}var ca=ku;function Fu(t){return this.__data__.has(t)}var fa=Fu;function bi(t){var i=-1,e=t==null?0:t.length;for(this.__data__=new Yt;++i<e;)this.add(t[i])}bi.prototype.add=bi.prototype.push=ca;bi.prototype.has=fa;var ua=bi;function Ou(t,i){for(var e=-1,r=t==null?0:t.length;++e<r;)if(i(t[e],e,t))return!0;return!1}var ma=Ou;function Iu(t,i){return t.has(i)}var pa=Iu;var Ru=1,Vu=2;function Nu(t,i,e,r,o,n){var a=e&Ru,s=t.length,l=i.length;if(s!=l&&!(a&&l>s))return!1;var c=n.get(t),p=n.get(i);if(c&&p)return c==i&&p==t;var m=-1,u=!0,x=e&Vu?new ua:void 0;for(n.set(t,i),n.set(i,t);++m<s;){var v=t[m],A=i[m];if(r)var D=a?r(A,v,m,i,t,n):r(v,A,m,t,i,n);if(D!==void 0){if(D)continue;u=!1;break}if(x){if(!ma(i,function(I,Re){if(!pa(x,Re)&&(v===I||o(v,I,e,r,n)))return x.push(Re)})){u=!1;break}}else if(!(v===A||o(v,A,e,r,n))){u=!1;break}}return n.delete(t),n.delete(i),u}var yi=Nu;function Pu(t){var i=-1,e=Array(t.size);return t.forEach(function(r,o){e[++i]=[o,r]}),e}var ha=Pu;function Uu(t){var i=-1,e=Array(t.size);return t.forEach(function(r){e[++i]=r}),e}var ga=Uu;var Lu=1,ju=2,$u="[object Boolean]",Wu="[object Date]",Hu="[object Error]",Bu="[object Map]",zu="[object Number]",Gu="[object RegExp]",qu="[object Set]",Ku="[object String]",Qu="[object Symbol]",Ju="[object ArrayBuffer]",Zu="[object DataView]",va=J?J.prototype:void 0,dr=va?va.valueOf:void 0;function Yu(t,i,e,r,o,n,a){switch(e){case Zu:if(t.byteLength!=i.byteLength||t.byteOffset!=i.byteOffset)return!1;t=t.buffer,i=i.buffer;case Ju:return!(t.byteLength!=i.byteLength||!n(new dt(t),new dt(i)));case $u:case Wu:case zu:return fe(+t,+i);case Hu:return t.name==i.name&&t.message==i.message;case Gu:case Ku:return t==i+"";case Bu:var s=ha;case qu:var l=r&Lu;if(s||(s=ga),t.size!=i.size&&!l)return!1;var c=a.get(t);if(c)return c==i;r|=ju,a.set(t,i);var p=yi(s(t),s(i),r,o,n,a);return a.delete(t),p;case Qu:if(dr)return dr.call(t)==dr.call(i)}return!1}var _a=Yu;var Xu=1,em=Object.prototype,tm=em.hasOwnProperty;function im(t,i,e,r,o,n){var a=e&Xu,s=Et(t),l=s.length,c=Et(i),p=c.length;if(l!=p&&!a)return!1;for(var m=l;m--;){var u=s[m];if(!(a?u in i:tm.call(i,u)))return!1}var x=n.get(t),v=n.get(i);if(x&&v)return x==i&&v==t;var A=!0;n.set(t,i),n.set(i,t);for(var D=a;++m<l;){u=s[m];var I=t[u],Re=i[u];if(r)var Fr=a?r(Re,I,u,i,t,n):r(I,Re,u,t,i,n);if(!(Fr===void 0?I===Re||o(I,Re,e,r,n):Fr)){A=!1;break}D||(D=u=="constructor")}if(A&&!D){var Lt=t.constructor,jt=i.constructor;Lt!=jt&&"constructor"in t&&"constructor"in i&&!(typeof Lt=="function"&&Lt instanceof Lt&&typeof jt=="function"&&jt instanceof jt)&&(A=!1)}return n.delete(t),n.delete(i),A}var ba=im;var rm=1,ya="[object Arguments]",xa="[object Array]",xi="[object Object]",om=Object.prototype,Sa=om.hasOwnProperty;function nm(t,i,e,r,o,n){var a=Z(t),s=Z(i),l=a?xa:xe(t),c=s?xa:xe(i);l=l==ya?xi:l,c=c==ya?xi:c;var p=l==xi,m=c==xi,u=l==c;if(u&&be(t)){if(!be(i))return!1;a=!0,p=!1}if(u&&!p)return n||(n=new Fe),a||ot(t)?yi(t,i,e,r,o,n):_a(t,i,l,e,r,o,n);if(!(e&rm)){var x=p&&Sa.call(t,"__wrapped__"),v=m&&Sa.call(i,"__wrapped__");if(x||v){var A=x?t.value():t,D=v?i.value():i;return n||(n=new Fe),o(A,D,e,r,n)}}return u?(n||(n=new Fe),ba(t,i,e,r,o,n)):!1}var Ca=nm;function wa(t,i,e,r,o){return t===i?!0:t==null||i==null||!k(t)&&!k(i)?t!==t&&i!==i:Ca(t,i,e,r,wa,o)}var Ta=wa;function am(t){return function(i,e,r){for(var o=-1,n=Object(i),a=r(i),s=a.length;s--;){var l=a[t?s:++o];if(e(n[l],l,n)===!1)break}return i}}var Da=am;var sm=Da(),Aa=sm;function lm(t,i,e){(e!==void 0&&!fe(t[i],e)||e===void 0&&!(i in t))&&it(t,i,e)}var kt=lm;function dm(t){return k(t)&&Oe(t)}var Ma=dm;function cm(t,i){if(!(i==="constructor"&&typeof t[i]=="function")&&i!="__proto__")return t[i]}var Ft=cm;function fm(t){return ue(t,me(t))}var Ea=fm;function um(t,i,e,r,o,n,a){var s=Ft(t,e),l=Ft(i,e),c=a.get(l);if(c){kt(t,e,c);return}var p=n?n(s,l,e+"",t,i,a):void 0,m=p===void 0;if(m){var u=Z(l),x=!u&&be(l),v=!u&&!x&&ot(l);p=l,u||x||v?Z(s)?p=s:Ma(s)?p=ni(s):x?(m=!1,p=oi(l,!0)):v?(m=!1,p=pi(l,!0)):p=[]:da(l)||At(l)?(p=s,At(s)?p=Ea(s):(!O(s)||Ze(s))&&(p=hi(l))):m=!1}m&&(a.set(l,p),o(p,l,r,n,a),a.delete(l)),kt(t,e,p)}var ka=um;function Fa(t,i,e,r,o){t!==i&&Aa(i,function(n,a){if(o||(o=new Fe),O(n))ka(t,i,a,e,Fa,r,o);else{var s=r?r(Ft(t,a),n,a+"",t,i,o):void 0;s===void 0&&(s=n),kt(t,a,s)}},me)}var Oa=Fa;function mm(t,i){return Ta(t,i)}var pm=mm;var hm=sa(function(t,i,e){Oa(t,i,e)}),cr=hm;var ft=function(t){return t.Normal="normal",t.Nominal="nominal",t.Alert="alert",t.Warn="warn",t.Alarm="alarm",t.Emergency="emergency",t}(ft||{});var gm=function(t){return t.Visual="visual",t.Sound="sound",t}(gm||{});var vm="self",Ia=t=>isFinite(+(t instanceof Date?t:new Date(t)))?!!new RegExp("^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(.[0-9]+)?(([Zz])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$").test(t):!1,Ra=t=>{if(t)return t==="RFC 3339 (UTC)"?"Date":"number"},LC=(()=>{class t{delta=d(Zn);_destroyRef=d(_t);_deltaUpdatesCounter=null;_deltaUpdatesSubject=new Ue(60);_deltaUpdatesCounterTimer=null;_isSkDataFullTreeActive=!1;_skDataSubject$=new b([]);_dataServiceMeta=[];_isSkMetaFullTreeActive=!1;_dataServiceMetaSubject$=new b([]);_skNotificationMsg$=new _;_skNotificationMeta$=new _;_isReset=new _;_selfUrn="self";_skData=[];_pathRegister=[];constructor(){this._deltaUpdatesCounterTimer=setInterval(()=>{if(this._deltaUpdatesCounter!==null){let e={timestamp:Date.now(),value:this._deltaUpdatesCounter};this._deltaUpdatesSubject.next(e),this._deltaUpdatesCounter=0}},1e3),this.delta.subscribeDataPathsUpdates().pipe(z(this._destroyRef)).subscribe(e=>{this.updatePathData(e)}),this.delta.subscribeMetadataUpdates().pipe(z(this._destroyRef)).subscribe(e=>{this.setMeta(e)}),this.delta.subscribeNotificationsUpdates().pipe(z(this._destroyRef)).subscribe(e=>{let r=e.path.replace("notifications.","self."),o=this._skData.find(n=>n.path==r);if(o&&o.state!==e.value.state){o.state=e.value.state;let n=this._pathRegister.find(a=>a.path==r);n&&n._pathState$.next(o.state)}this._skNotificationMsg$.next(e)}),this.delta.subscribeSelfUpdates().pipe(z(this._destroyRef)).subscribe(e=>{this.setSelfUrn(e)})}getSignalkDeltaUpdateStatistics(){return this._deltaUpdatesSubject.asObservable()}resetSignalKData(){this._skData=[],this._selfUrn="self",this._isReset.next(!0)}unsubscribePath(e){let r=this._pathRegister.findIndex(o=>o.path===e);if(r!==-1){let o=this._pathRegister[r];o._pathData$?.complete(),o._pathState$?.complete(),o.pathDataUpdate$?.complete(),o.pathMeta$?.complete(),this._pathRegister.splice(r,1)}}subscribePath(e,r){let o=this._pathRegister.find(v=>v.path===e&&v.source===r);if(o)return o.pathDataUpdate$;let n=null,a=null,s=null,l=ft.Normal,c={data:{value:null,timestamp:null},state:l},p=null,m=this._skData.find(v=>v.path==e);this._skData.length&&m&&(n=r==="default"?m.pathValue:m.sources?.[r]?.sourceValue??null,a=r==="default"?m.pathTimestamp:m.sources?.[r]?.sourceTimestamp??null,s=a?new Date(a):null,c={data:{value:n,timestamp:s},state:m.state||l},l=m.state||l,p=m.meta||null);let u={path:e,source:r,_pathData$:new b(c.data),_pathState$:new b(c.state),pathDataUpdate$:new b(c),pathMeta$:new b(p)};return Pr([u._pathData$,u._pathState$]).pipe(Se(([v,A])=>({data:v,state:A}))).subscribe(v=>u.pathDataUpdate$.next(v)),this._pathRegister.push(u),u.pathDataUpdate$}updatePathData(e){this._deltaUpdatesCounter++;let r=this.setPathContext(e.context,e.path),o=this._skData.find(a=>a.path==r);if(o)o.defaultSource===void 0&&(o.defaultSource=e.source),o.type===void 0&&e.value!==null&&(o.type=typeof e.value,o.type==="string"&&Ia(e.value)&&(o.type="Date")),o.pathValue=e.value,o.pathTimestamp=e.timestamp,o.sources[e.source]={sourceTimestamp:e.timestamp,sourceValue:e.value};else{let a=typeof e.value;a==="string"&&Ia(e.value)&&(a="Date"),o={path:r,pathValue:e.value,pathTimestamp:e.timestamp,defaultSource:e.source,type:a,state:ft.Normal,sources:{[e.source]:{sourceTimestamp:e.timestamp,sourceValue:e.value}}},this._skData.push(o)}let n=this._pathRegister.filter(a=>a.path===r);if(n.length){let a={value:o.pathValue,timestamp:new Date(o.pathTimestamp)},s=n.find(c=>c.source==="default");s&&s._pathData$.next(a);let l=n.find(c=>c.source===e.source);l&&l._pathData$.next(a)}this._isSkDataFullTreeActive&&this._skDataSubject$.next(this._skData)}setMeta(e){if(e.path.startsWith("notifications."))this._skNotificationMeta$.next(e);else{let r=this.setPathContext(e.context,e.path),o=this._skData.find(a=>a.path===r);o?(o.type==="object"&&e.meta.units&&(o.type=Ra(e.meta.units)),o.meta=cr(o.meta,e.meta)):(o={path:r,pathValue:void 0,pathTimestamp:void 0,type:Ra(e.meta.units),state:ft.Normal,defaultSource:void 0,sources:{},meta:e.meta},this._skData.push(o));let n=this._pathRegister.find(a=>a.path===r);n&&n.pathMeta$.next(o.meta),this._isSkMetaFullTreeActive&&(this._dataServiceMeta.push({path:r,meta:o.meta}),this._dataServiceMetaSubject$.next(this._dataServiceMeta))}}startSkMetaFullTree(){return this._isSkMetaFullTreeActive=!0,this._dataServiceMeta=this._skData.filter(e=>e.meta!==void 0&&e.path.startsWith("self.")).map(e=>({path:e.path,meta:e.meta})),this._dataServiceMetaSubject$.next(this._dataServiceMeta),this._dataServiceMetaSubject$}stopSkMetaFullTree(){this._isSkMetaFullTreeActive=!1,this._dataServiceMetaSubject$.next(null),this._dataServiceMeta=null}startSkDataFullTree(){return this._isSkDataFullTreeActive=!0,this._skDataSubject$.next(this._skData),this._skDataSubject$}stopSkDataFullTree(){this._isSkDataFullTreeActive=!1}setSelfUrn(e){e!==""||e!==null?(console.debug("[Signal K Data Service] Setting self to: "+e),this._selfUrn=e):console.error("[Signal K Data Service] Invalid self URN: "+e)}setPathContext(e,r){return e!==this._selfUrn?`${e}.${r}`:`${vm}.${r}`}getPathsByType(e,r){return this._skData.filter(o=>o.type===e&&(!r||o.path.startsWith("self"))).map(o=>o.path)}getPathsAndMetaByType(e,r,o){return this._skData.filter(n=>{let a=n.type===e,s=!o||n.path.startsWith("self"),l=r===!0?n.meta?.supportsPut===!0:!0;return a&&s&&l}).map(n=>({path:n.path,meta:n.meta}))}getPathObject(e){return sr(this._skData.find(r=>r.path===e))||null}getPathUnitType(e){return this._skData.find(r=>r.path===e)?.meta?.units||null}timeoutPathObservable(e,r){let o=this._pathRegister.find(n=>n.path==e);if(o){let n;["string","Date","number"].includes(r)&&(n={data:{value:null,timestamp:null},state:ft.Normal}),o.pathDataUpdate$.next(n)}}getNotificationMsgObservable(){return this._skNotificationMsg$.asObservable()}getNotificationMetaObservable(){return this._skNotificationMeta$.asObservable()}getPathMetaObservable(e){return this._pathRegister.find(o=>o.path==e)?.pathMeta$.asObservable()||Nr(null)}getPathMeta(e){return this._skData.find(r=>r.path===e)?.meta||null}isResetService(){return this._isReset.asObservable()}ngOnDestroy(){this._deltaUpdatesSubject?.complete(),this._skNotificationMsg$?.complete(),this._skNotificationMeta$?.complete(),this._isReset?.complete(),this._skDataSubject$?.complete(),this._dataServiceMetaSubject$?.complete(),this._deltaUpdatesCounterTimer&&clearInterval(this._deltaUpdatesCounterTimer)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Wa=(()=>{class t{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,r){this._renderer=e,this._elementRef=r}setProperty(e,r){this._renderer.setProperty(this._elementRef.nativeElement,e,r)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(r){return new(r||t)(h(we),h(X))};static \u0275dir=g({type:t})}return t})(),Ha=(()=>{class t extends Wa{static \u0275fac=(()=>{let e;return function(o){return(e||(e=pe(t)))(o||t)}})();static \u0275dir=g({type:t,features:[E]})}return t})(),Ut=new M("");var _m={provide:Ut,useExisting:P(()=>Ba),multi:!0};function bm(){let t=Qi()?Qi().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var ym=new M(""),Ba=(()=>{class t extends Wa{_compositionMode;_composing=!1;constructor(e,r,o){super(e,r),this._compositionMode=o,this._compositionMode==null&&(this._compositionMode=!bm())}writeValue(e){let r=e??"";this.setProperty("value",r)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(r){return new(r||t)(h(we),h(X),h(ym,8))};static \u0275dir=g({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,o){r&1&&le("input",function(a){return o._handleInput(a.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(a){return o._compositionEnd(a.target.value)})},standalone:!1,features:[w([_m]),E]})}return t})();function pr(t){return t==null||hr(t)===0}function hr(t){return t==null?null:Array.isArray(t)||typeof t=="string"?t.length:t instanceof Set?t.size:null}var re=new M(""),Pe=new M(""),xm=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[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])?)*$/,Ci=class{static min(i){return za(i)}static max(i){return Ga(i)}static required(i){return qa(i)}static requiredTrue(i){return Sm(i)}static email(i){return Cm(i)}static minLength(i){return wm(i)}static maxLength(i){return Tm(i)}static pattern(i){return Ka(i)}static nullValidator(i){return wi()}static compose(i){return es(i)}static composeAsync(i){return ts(i)}};function za(t){return i=>{if(i.value==null||t==null)return null;let e=parseFloat(i.value);return!isNaN(e)&&e<t?{min:{min:t,actual:i.value}}:null}}function Ga(t){return i=>{if(i.value==null||t==null)return null;let e=parseFloat(i.value);return!isNaN(e)&&e>t?{max:{max:t,actual:i.value}}:null}}function qa(t){return pr(t.value)?{required:!0}:null}function Sm(t){return t.value===!0?null:{required:!0}}function Cm(t){return pr(t.value)||xm.test(t.value)?null:{email:!0}}function wm(t){return i=>{let e=i.value?.length??hr(i.value);return e===null||e===0?null:e<t?{minlength:{requiredLength:t,actualLength:e}}:null}}function Tm(t){return i=>{let e=i.value?.length??hr(i.value);return e!==null&&e>t?{maxlength:{requiredLength:t,actualLength:e}}:null}}function Ka(t){if(!t)return wi;let i,e;return typeof t=="string"?(e="",t.charAt(0)!=="^"&&(e+="^"),e+=t,t.charAt(t.length-1)!=="$"&&(e+="$"),i=new RegExp(e)):(e=t.toString(),i=t),r=>{if(pr(r.value))return null;let o=r.value;return i.test(o)?null:{pattern:{requiredPattern:e,actualValue:o}}}}function wi(t){return null}function Qa(t){return t!=null}function Ja(t){return Xr(t)?Vr(t):t}function Za(t){let i={};return t.forEach(e=>{i=e!=null?$($({},i),e):i}),Object.keys(i).length===0?null:i}function Ya(t,i){return i.map(e=>e(t))}function Dm(t){return!t.validate}function Xa(t){return t.map(i=>Dm(i)?i:e=>i.validate(e))}function es(t){if(!t)return null;let i=t.filter(Qa);return i.length==0?null:function(e){return Za(Ya(e,i))}}function gr(t){return t!=null?es(Xa(t)):null}function ts(t){if(!t)return null;let i=t.filter(Qa);return i.length==0?null:function(e){let r=Ya(e,i).map(Ja);return Ur(r).pipe(Se(Za))}}function vr(t){return t!=null?ts(Xa(t)):null}function Va(t,i){return t===null?[i]:Array.isArray(t)?[...t,i]:[t,i]}function is(t){return t._rawValidators}function rs(t){return t._rawAsyncValidators}function fr(t){return t?Array.isArray(t)?t:[t]:[]}function Ti(t,i){return Array.isArray(t)?t.includes(i):t===i}function Na(t,i){let e=fr(i);return fr(t).forEach(o=>{Ti(e,o)||e.push(o)}),e}function Pa(t,i){return fr(i).filter(e=>!Ti(t,e))}var Di=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(i){this._rawValidators=i||[],this._composedValidatorFn=gr(this._rawValidators)}_setAsyncValidators(i){this._rawAsyncValidators=i||[],this._composedAsyncValidatorFn=vr(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(i){this._onDestroyCallbacks.push(i)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(i=>i()),this._onDestroyCallbacks=[]}reset(i=void 0){this.control&&this.control.reset(i)}hasError(i,e){return this.control?this.control.hasError(i,e):!1}getError(i,e){return this.control?this.control.getError(i,e):null}},N=class extends Di{name;get formDirective(){return null}get path(){return null}},ie=class extends Di{_parent=null;name=null;valueAccessor=null},Ai=class{_cd;constructor(i){this._cd=i}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Am={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},a0=Y($({},Am),{"[class.ng-submitted]":"isSubmitted"}),s0=(()=>{class t extends Ai{constructor(e){super(e)}static \u0275fac=function(r){return new(r||t)(h(ie,2))};static \u0275dir=g({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,o){r&2&&B("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},standalone:!1,features:[E]})}return t})(),l0=(()=>{class t extends Ai{constructor(e){super(e)}static \u0275fac=function(r){return new(r||t)(h(N,10))};static \u0275dir=g({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,o){r&2&&B("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)("ng-submitted",o.isSubmitted)},standalone:!1,features:[E]})}return t})();var Ot="VALID",Si="INVALID",ut="PENDING",It="DISABLED",Ie=class{},Mi=class extends Ie{value;source;constructor(i,e){super(),this.value=i,this.source=e}},Vt=class extends Ie{pristine;source;constructor(i,e){super(),this.pristine=i,this.source=e}},Nt=class extends Ie{touched;source;constructor(i,e){super(),this.touched=i,this.source=e}},mt=class extends Ie{status;source;constructor(i,e){super(),this.status=i,this.source=e}},Ei=class extends Ie{source;constructor(i){super(),this.source=i}},ki=class extends Ie{source;constructor(i){super(),this.source=i}};function _r(t){return(Ri(t)?t.validators:t)||null}function Mm(t){return Array.isArray(t)?gr(t):t||null}function br(t,i){return(Ri(i)?i.asyncValidators:t)||null}function Em(t){return Array.isArray(t)?vr(t):t||null}function Ri(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function os(t,i,e){let r=t.controls;if(!(i?Object.keys(r):r).length)throw new Bt(1e3,"");if(!r[e])throw new Bt(1001,"")}function ns(t,i,e){t._forEachChild((r,o)=>{if(e[o]===void 0)throw new Bt(1002,"")})}var ht=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(i,e){this._assignValidators(i),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(i){this._rawValidators=this._composedValidatorFn=i}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(i){this._rawAsyncValidators=this._composedAsyncValidatorFn=i}get parent(){return this._parent}get status(){return ge(this.statusReactive)}set status(i){ge(()=>this.statusReactive.set(i))}_status=ce(()=>this.statusReactive());statusReactive=ne(void 0);get valid(){return this.status===Ot}get invalid(){return this.status===Si}get pending(){return this.status==ut}get disabled(){return this.status===It}get enabled(){return this.status!==It}errors;get pristine(){return ge(this.pristineReactive)}set pristine(i){ge(()=>this.pristineReactive.set(i))}_pristine=ce(()=>this.pristineReactive());pristineReactive=ne(!0);get dirty(){return!this.pristine}get touched(){return ge(this.touchedReactive)}set touched(i){ge(()=>this.touchedReactive.set(i))}_touched=ce(()=>this.touchedReactive());touchedReactive=ne(!1);get untouched(){return!this.touched}_events=new _;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(i){this._assignValidators(i)}setAsyncValidators(i){this._assignAsyncValidators(i)}addValidators(i){this.setValidators(Na(i,this._rawValidators))}addAsyncValidators(i){this.setAsyncValidators(Na(i,this._rawAsyncValidators))}removeValidators(i){this.setValidators(Pa(i,this._rawValidators))}removeAsyncValidators(i){this.setAsyncValidators(Pa(i,this._rawAsyncValidators))}hasValidator(i){return Ti(this._rawValidators,i)}hasAsyncValidator(i){return Ti(this._rawAsyncValidators,i)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(i={}){let e=this.touched===!1;this.touched=!0;let r=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsTouched(Y($({},i),{sourceControl:r})),e&&i.emitEvent!==!1&&this._events.next(new Nt(!0,r))}markAllAsDirty(i={}){this.markAsDirty({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(i))}markAllAsTouched(i={}){this.markAsTouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(i))}markAsUntouched(i={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let r=i.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:r})}),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,r),e&&i.emitEvent!==!1&&this._events.next(new Nt(!1,r))}markAsDirty(i={}){let e=this.pristine===!0;this.pristine=!1;let r=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsDirty(Y($({},i),{sourceControl:r})),e&&i.emitEvent!==!1&&this._events.next(new Vt(!1,r))}markAsPristine(i={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let r=i.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:i.emitEvent})}),this._parent&&!i.onlySelf&&this._parent._updatePristine(i,r),e&&i.emitEvent!==!1&&this._events.next(new Vt(!0,r))}markAsPending(i={}){this.status=ut;let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new mt(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.markAsPending(Y($({},i),{sourceControl:e}))}disable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=It,this.errors=null,this._forEachChild(o=>{o.disable(Y($({},i),{onlySelf:!0}))}),this._updateValue();let r=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new Mi(this.value,r)),this._events.next(new mt(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Y($({},i),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=Ot,this._forEachChild(r=>{r.enable(Y($({},i),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent}),this._updateAncestors(Y($({},i),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(i,e){this._parent&&!i.onlySelf&&(this._parent.updateValueAndValidity(i),i.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(i){this._parent=i}getRawValue(){return this.value}updateValueAndValidity(i={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let r=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Ot||this.status===ut)&&this._runAsyncValidator(r,i.emitEvent)}let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new Mi(this.value,e)),this._events.next(new mt(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.updateValueAndValidity(Y($({},i),{sourceControl:e}))}_updateTreeValidity(i={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(i)),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?It:Ot}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(i,e){if(this.asyncValidator){this.status=ut,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:i!==!1};let r=Ja(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:e,shouldHaveEmitted:i})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let i=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,i}return!1}setErrors(i,e={}){this.errors=i,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(i){let e=i;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((r,o)=>r&&r._find(o),this)}getError(i,e){let r=e?this.get(e):this;return r&&r.errors?r.errors[i]:null}hasError(i,e){return!!this.getError(i,e)}get root(){let i=this;for(;i._parent;)i=i._parent;return i}_updateControlsErrors(i,e,r){this.status=this._calculateStatus(),i&&this.statusChanges.emit(this.status),(i||r)&&this._events.next(new mt(this.status,e)),this._parent&&this._parent._updateControlsErrors(i,e,r)}_initObservables(){this.valueChanges=new he,this.statusChanges=new he}_calculateStatus(){return this._allControlsDisabled()?It:this.errors?Si:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(ut)?ut:this._anyControlsHaveStatus(Si)?Si:Ot}_anyControlsHaveStatus(i){return this._anyControls(e=>e.status===i)}_anyControlsDirty(){return this._anyControls(i=>i.dirty)}_anyControlsTouched(){return this._anyControls(i=>i.touched)}_updatePristine(i,e){let r=!this._anyControlsDirty(),o=this.pristine!==r;this.pristine=r,this._parent&&!i.onlySelf&&this._parent._updatePristine(i,e),o&&this._events.next(new Vt(this.pristine,e))}_updateTouched(i={},e){this.touched=this._anyControlsTouched(),this._events.next(new Nt(this.touched,e)),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,e)}_onDisabledChange=[];_registerOnCollectionChange(i){this._onCollectionChange=i}_setUpdateStrategy(i){Ri(i)&&i.updateOn!=null&&(this._updateOn=i.updateOn)}_parentMarkedDirty(i){let e=this._parent&&this._parent.dirty;return!i&&!!e&&!this._parent._anyControlsDirty()}_find(i){return null}_assignValidators(i){this._rawValidators=Array.isArray(i)?i.slice():i,this._composedValidatorFn=Mm(this._rawValidators)}_assignAsyncValidators(i){this._rawAsyncValidators=Array.isArray(i)?i.slice():i,this._composedAsyncValidatorFn=Em(this._rawAsyncValidators)}},Ne=class extends ht{constructor(i,e,r){super(_r(e),br(r,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(i,e){return this.controls[i]?this.controls[i]:(this.controls[i]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(i,e,r={}){this.registerControl(i,e),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(i,e={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(i,e,r={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],e&&this.registerControl(i,e),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(i){return this.controls.hasOwnProperty(i)&&this.controls[i].enabled}setValue(i,e={}){ns(this,!0,i),Object.keys(i).forEach(r=>{os(this,!0,r),this.controls[r].setValue(i[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){i!=null&&(Object.keys(i).forEach(r=>{let o=this.controls[r];o&&o.patchValue(i[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i={},e={}){this._forEachChild((r,o)=>{r.reset(i?i[o]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(i,e,r)=>(i[r]=e.getRawValue(),i))}_syncPendingControls(){let i=this._reduceChildren(!1,(e,r)=>r._syncPendingControls()?!0:e);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){Object.keys(this.controls).forEach(e=>{let r=this.controls[e];r&&i(r,e)})}_setUpControls(){this._forEachChild(i=>{i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(i){for(let[e,r]of Object.entries(this.controls))if(this.contains(e)&&i(r))return!0;return!1}_reduceValue(){let i={};return this._reduceChildren(i,(e,r,o)=>((r.enabled||this.disabled)&&(e[o]=r.value),e))}_reduceChildren(i,e){let r=i;return this._forEachChild((o,n)=>{r=e(r,o,n)}),r}_allControlsDisabled(){for(let i of Object.keys(this.controls))if(this.controls[i].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(i){return this.controls.hasOwnProperty(i)?this.controls[i]:null}};var d0=Ne;var ur=class extends Ne{};var gt=new M("",{providedIn:"root",factory:()=>Vi}),Vi="always";function Ni(t,i){return[...i.path,t]}function Pt(t,i,e=Vi){yr(t,i),i.valueAccessor.writeValue(t.value),(t.disabled||e==="always")&&i.valueAccessor.setDisabledState?.(t.disabled),Fm(t,i),Im(t,i),Om(t,i),km(t,i)}function Fi(t,i,e=!0){let r=()=>{};i.valueAccessor&&(i.valueAccessor.registerOnChange(r),i.valueAccessor.registerOnTouched(r)),Ii(t,i),t&&(i._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function Oi(t,i){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(i)})}function km(t,i){if(i.valueAccessor.setDisabledState){let e=r=>{i.valueAccessor.setDisabledState(r)};t.registerOnDisabledChange(e),i._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}function yr(t,i){let e=is(t);i.validator!==null?t.setValidators(Va(e,i.validator)):typeof e=="function"&&t.setValidators([e]);let r=rs(t);i.asyncValidator!==null?t.setAsyncValidators(Va(r,i.asyncValidator)):typeof r=="function"&&t.setAsyncValidators([r]);let o=()=>t.updateValueAndValidity();Oi(i._rawValidators,o),Oi(i._rawAsyncValidators,o)}function Ii(t,i){let e=!1;if(t!==null){if(i.validator!==null){let o=is(t);if(Array.isArray(o)&&o.length>0){let n=o.filter(a=>a!==i.validator);n.length!==o.length&&(e=!0,t.setValidators(n))}}if(i.asyncValidator!==null){let o=rs(t);if(Array.isArray(o)&&o.length>0){let n=o.filter(a=>a!==i.asyncValidator);n.length!==o.length&&(e=!0,t.setAsyncValidators(n))}}}let r=()=>{};return Oi(i._rawValidators,r),Oi(i._rawAsyncValidators,r),e}function Fm(t,i){i.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&as(t,i)})}function Om(t,i){i.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&as(t,i),t.updateOn!=="submit"&&t.markAsTouched()})}function as(t,i){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),i.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function Im(t,i){let e=(r,o)=>{i.valueAccessor.writeValue(r),o&&i.viewToModelUpdate(r)};t.registerOnChange(e),i._registerOnDestroy(()=>{t._unregisterOnChange(e)})}function ss(t,i){t==null,yr(t,i)}function Rm(t,i){return Ii(t,i)}function xr(t,i){if(!t.hasOwnProperty("model"))return!1;let e=t.model;return e.isFirstChange()?!0:!Object.is(i,e.currentValue)}function Vm(t){return Object.getPrototypeOf(t.constructor)===Ha}function ls(t,i){t._syncPendingControls(),i.forEach(e=>{let r=e.control;r.updateOn==="submit"&&r._pendingChange&&(e.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}function Sr(t,i){if(!i)return null;Array.isArray(i);let e,r,o;return i.forEach(n=>{n.constructor===Ba?e=n:Vm(n)?r=n:o=n}),o||r||e||null}function Nm(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}var Pm={provide:N,useExisting:P(()=>Cr)},Rt=Promise.resolve(),Cr=(()=>{class t extends N{callSetDisabledState;get submitted(){return ge(this.submittedReactive)}_submitted=ce(()=>this.submittedReactive());submittedReactive=ne(!1);_directives=new Set;form;ngSubmit=new he;options;constructor(e,r,o){super(),this.callSetDisabledState=o,this.form=new Ne({},gr(e),vr(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Rt.then(()=>{let r=this._findContainer(e.path);e.control=r.registerControl(e.name,e.control),Pt(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Rt.then(()=>{let r=this._findContainer(e.path);r&&r.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Rt.then(()=>{let r=this._findContainer(e.path),o=new Ne({});ss(o,e),r.registerControl(e.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Rt.then(()=>{let r=this._findContainer(e.path);r&&r.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,r){Rt.then(()=>{this.form.get(e.path).setValue(r)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),ls(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new Ei(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1),this.form._events.next(new ki(this.form))}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(r){return new(r||t)(h(re,10),h(Pe,10),h(gt,8))};static \u0275dir=g({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(r,o){r&1&&le("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[w([Pm]),E]})}return t})();function Ua(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}function La(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var pt=class extends ht{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(i=null,e,r){super(_r(e),br(r,e)),this._applyFormState(i),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Ri(e)&&(e.nonNullable||e.initialValueIsDefault)&&(La(i)?this.defaultValue=i.value:this.defaultValue=i)}setValue(i,e={}){this.value=this._pendingValue=i,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(r=>r(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(i,e={}){this.setValue(i,e)}reset(i=this.defaultValue,e={}){this._applyFormState(i),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(i){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(i){this._onChange.push(i)}_unregisterOnChange(i){Ua(this._onChange,i)}registerOnDisabledChange(i){this._onDisabledChange.push(i)}_unregisterOnDisabledChange(i){Ua(this._onDisabledChange,i)}_forEachChild(i){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(i){La(i)?(this.value=this._pendingValue=i.value,i.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=i}},f0=pt,Um=t=>t instanceof pt,Lm=(()=>{class t extends N{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return Ni(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(o){return(e||(e=pe(t)))(o||t)}})();static \u0275dir=g({type:t,standalone:!1,features:[E]})}return t})();var jm={provide:ie,useExisting:P(()=>$m)},ja=Promise.resolve(),$m=(()=>{class t extends ie{_changeDetectorRef;callSetDisabledState;control=new pt;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new he;constructor(e,r,o,n,a,s){super(),this._changeDetectorRef=a,this.callSetDisabledState=s,this._parent=e,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=Sr(this,n)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let r=e.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),xr(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Pt(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){ja.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let r=e.isDisabled.currentValue,o=r!==0&&He(r);ja.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Ni(e,this._parent):[e]}static \u0275fac=function(r){return new(r||t)(h(N,9),h(re,10),h(Pe,10),h(Ut,10),h(Gt,8),h(gt,8))};static \u0275dir=g({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[w([jm]),E,Ce]})}return t})();var u0=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return t})(),Wm={provide:Ut,useExisting:P(()=>Hm),multi:!0},Hm=(()=>{class t extends Ha{writeValue(e){let r=e??"";this.setProperty("value",r)}registerOnChange(e){this.onChange=r=>{e(r==""?null:parseFloat(r))}}static \u0275fac=(()=>{let e;return function(o){return(e||(e=pe(t)))(o||t)}})();static \u0275dir=g({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(r,o){r&1&&le("input",function(a){return o.onChange(a.target.value)})("blur",function(){return o.onTouched()})},standalone:!1,features:[w([Wm]),E]})}return t})();var wr=new M(""),Bm={provide:ie,useExisting:P(()=>zm)},zm=(()=>{class t extends ie{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new he;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,r,o,n,a){super(),this._ngModelWarningConfig=n,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(r),this.valueAccessor=Sr(this,o)}ngOnChanges(e){if(this._isControlChanged(e)){let r=e.form.previousValue;r&&Fi(r,this,!1),Pt(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}xr(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&Fi(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(r){return new(r||t)(h(re,10),h(Pe,10),h(Ut,10),h(wr,8),h(gt,8))};static \u0275dir=g({type:t,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[w([Bm]),E,Ce]})}return t})(),Gm={provide:N,useExisting:P(()=>Pi)},Pi=(()=>{class t extends N{callSetDisabledState;get submitted(){return ge(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=ce(()=>this._submittedReactive());_submittedReactive=ne(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new he;constructor(e,r,o){super(),this.callSetDisabledState=o,this._setValidators(e),this._setAsyncValidators(r)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Ii(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let r=this.form.get(e.path);return Pt(r,e,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),r}getControl(e){return this.form.get(e.path)}removeControl(e){Fi(e.control||null,e,!1),Nm(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,r){this.form.get(e.path).setValue(r)}onSubmit(e){return this._submittedReactive.set(!0),ls(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new Ei(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,r={}){this.form.reset(e,r),this._submittedReactive.set(!1),r?.emitEvent!==!1&&this.form._events.next(new ki(this.form))}_updateDomValue(){this.directives.forEach(e=>{let r=e.control,o=this.form.get(e.path);r!==o&&(Fi(r||null,e),Um(o)&&(Pt(o,e,this.callSetDisabledState),e.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let r=this.form.get(e.path);ss(r,e),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let r=this.form.get(e.path);r&&Rm(r,e)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){yr(this.form,this),this._oldForm&&Ii(this._oldForm,this)}static \u0275fac=function(r){return new(r||t)(h(re,10),h(Pe,10),h(gt,8))};static \u0275dir=g({type:t,selectors:[["","formGroup",""]],hostBindings:function(r,o){r&1&&le("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[w([Gm]),E,Ce]})}return t})(),qm={provide:N,useExisting:P(()=>ds)},ds=(()=>{class t extends Lm{name=null;constructor(e,r,o){super(),this._parent=e,this._setValidators(r),this._setAsyncValidators(o)}_checkParentType(){fs(this._parent)}static \u0275fac=function(r){return new(r||t)(h(N,13),h(re,10),h(Pe,10))};static \u0275dir=g({type:t,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[w([qm]),E]})}return t})(),Km={provide:N,useExisting:P(()=>cs)},cs=(()=>{class t extends N{_parent;name=null;constructor(e,r,o){super(),this._parent=e,this._setValidators(r),this._setAsyncValidators(o)}ngOnInit(){fs(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return Ni(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(r){return new(r||t)(h(N,13),h(re,10),h(Pe,10))};static \u0275dir=g({type:t,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[w([Km]),E]})}return t})();function fs(t){return!(t instanceof ds)&&!(t instanceof Pi)&&!(t instanceof cs)}var Qm={provide:ie,useExisting:P(()=>Jm)},Jm=(()=>{class t extends ie{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new he;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,r,o,n,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=Sr(this,n)}ngOnChanges(e){this._added||this._setUpControl(),xr(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Ni(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(r){return new(r||t)(h(N,13),h(re,10),h(Pe,10),h(Ut,10),h(wr,8))};static \u0275dir=g({type:t,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[w([Qm]),E,Ce]})}return t})();function us(t){return typeof t=="number"?t:parseFloat(t)}var Ui=(()=>{class t{_validator=wi;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let r=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):wi,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t,features:[Ce]})}return t})(),Zm={provide:re,useExisting:P(()=>Ym),multi:!0},Ym=(()=>{class t extends Ui{max;inputName="max";normalizeInput=e=>us(e);createValidator=e=>Ga(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=pe(t)))(o||t)}})();static \u0275dir=g({type:t,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(r,o){r&2&&se("max",o._enabled?o.max:null)},inputs:{max:"max"},standalone:!1,features:[w([Zm]),E]})}return t})(),Xm={provide:re,useExisting:P(()=>ep),multi:!0},ep=(()=>{class t extends Ui{min;inputName="min";normalizeInput=e=>us(e);createValidator=e=>za(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=pe(t)))(o||t)}})();static \u0275dir=g({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(r,o){r&2&&se("min",o._enabled?o.min:null)},inputs:{min:"min"},standalone:!1,features:[w([Xm]),E]})}return t})(),tp={provide:re,useExisting:P(()=>ip),multi:!0};var ip=(()=>{class t extends Ui{required;inputName="required";normalizeInput=He;createValidator=e=>qa;enabled(e){return e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=pe(t)))(o||t)}})();static \u0275dir=g({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(r,o){r&2&&se("required",o._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[w([tp]),E]})}return t})();var rp={provide:re,useExisting:P(()=>op),multi:!0},op=(()=>{class t extends Ui{pattern;inputName="pattern";normalizeInput=e=>e;createValidator=e=>Ka(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=pe(t)))(o||t)}})();static \u0275dir=g({type:t,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(r,o){r&2&&se("pattern",o._enabled?o.pattern:null)},inputs:{pattern:"pattern"},standalone:!1,features:[w([rp]),E]})}return t})();var ms=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=ae({type:t});static \u0275inj=oe({})}return t})(),mr=class extends ht{constructor(i,e,r){super(_r(e),br(r,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(i){return this.controls[this._adjustIndex(i)]}push(i,e={}){this.controls.push(i),this._registerControl(i),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(i,e,r={}){this.controls.splice(i,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(i,e={}){let r=this._adjustIndex(i);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(i,e,r={}){let o=this._adjustIndex(i);o<0&&(o=0),this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),this.controls.splice(o,1),e&&(this.controls.splice(o,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(i,e={}){ns(this,!1,i),i.forEach((r,o)=>{os(this,!1,o),this.at(o).setValue(r,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){i!=null&&(i.forEach((r,o)=>{this.at(o)&&this.at(o).patchValue(r,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i=[],e={}){this._forEachChild((r,o)=>{r.reset(i[o],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(i=>i.getRawValue())}clear(i={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:i.emitEvent}))}_adjustIndex(i){return i<0?i+this.length:i}_syncPendingControls(){let i=this.controls.reduce((e,r)=>r._syncPendingControls()?!0:e,!1);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){this.controls.forEach((e,r)=>{i(e,r)})}_updateValue(){this.value=this.controls.filter(i=>i.enabled||this.disabled).map(i=>i.value)}_anyControls(i){return this.controls.some(e=>e.enabled&&i(e))}_setUpControls(){this._forEachChild(i=>this._registerControl(i))}_allControlsDisabled(){for(let i of this.controls)if(i.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(i){i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)}_find(i){return this.at(i)??null}};function $a(t){return!!t&&(t.asyncValidators!==void 0||t.validators!==void 0||t.updateOn!==void 0)}var np=(()=>{class t{useNonNullable=!1;get nonNullable(){let e=new t;return e.useNonNullable=!0,e}group(e,r=null){let o=this._reduceControls(e),n={};return $a(r)?n=r:r!==null&&(n.validators=r.validator,n.asyncValidators=r.asyncValidator),new Ne(o,n)}record(e,r=null){let o=this._reduceControls(e);return new ur(o,r)}control(e,r,o){let n={};return this.useNonNullable?($a(r)?n=r:(n.validators=r,n.asyncValidators=o),new pt(e,Y($({},n),{nonNullable:!0}))):new pt(e,r,o)}array(e,r,o){let n=e.map(a=>this._createControl(a));return new mr(n,r,o)}_reduceControls(e){let r={};return Object.keys(e).forEach(o=>{r[o]=this._createControl(e[o])}),r}_createControl(e){if(e instanceof pt)return e;if(e instanceof ht)return e;if(Array.isArray(e)){let r=e[0],o=e.length>1?e[1]:null,n=e.length>2?e[2]:null;return this.control(r,o,n)}else return this.control(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var m0=(()=>{class t extends np{group(e,r=null){return super.group(e,r)}control(e,r,o){return super.control(e,r,o)}array(e,r,o){return super.array(e,r,o)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=pe(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var p0=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:gt,useValue:e.callSetDisabledState??Vi}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=ae({type:t});static \u0275inj=oe({imports:[ms]})}return t})(),h0=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:wr,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:gt,useValue:e.callSetDisabledState??Vi}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=ae({type:t});static \u0275inj=oe({imports:[ms]})}return t})();var Tr=class{_box;_destroyed=new _;_resizeSubject=new _;_resizeObserver;_elementObservables=new Map;constructor(i){this._box=i,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(i){return this._elementObservables.has(i)||this._elementObservables.set(i,new vt(e=>{let r=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(i,{box:this._box}),()=>{this._resizeObserver?.unobserve(i),r.unsubscribe(),this._elementObservables.delete(i)}}).pipe(Le(e=>e.some(r=>r.target===i)),zr({bufferSize:1,refCount:!0}),Ht(this._destroyed))),this._elementObservables.get(i)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},ps=(()=>{class t{_cleanupErrorListener;_observers=new Map;_ngZone=d(H);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(e,r){let o=r?.box||"content-box";return this._observers.has(o)||this._observers.set(o,new Tr(o)),this._observers.get(o).observe(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ap=["notch"],sp=["matFormFieldNotchedOutline",""],lp=["*"],hs=["iconPrefixContainer"],gs=["textPrefixContainer"],vs=["iconSuffixContainer"],_s=["textSuffixContainer"],dp=["textField"],cp=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],fp=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function up(t,i){t&1&&yt(0,"span",20)}function mp(t,i){if(t&1&&(K(0,"label",19),ee(1,1),U(2,up,1,0,"span",20),Q()),t&2){let e=Te(2);$e("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),se("for",e._control.disableAutomaticLabeling?null:e._control.id),F(2),L(!e.hideRequiredMarker&&e._control.required?2:-1)}}function pp(t,i){if(t&1&&U(0,mp,3,5,"label",19),t&2){let e=Te();L(e._hasFloatingLabel()?0:-1)}}function hp(t,i){t&1&&yt(0,"div",7)}function gp(t,i){}function vp(t,i){if(t&1&&zt(0,gp,0,0,"ng-template",13),t&2){Te(2);let e=Ki(1);$e("ngTemplateOutlet",e)}}function _p(t,i){if(t&1&&(K(0,"div",9),U(1,vp,1,1,null,13),Q()),t&2){let e=Te();$e("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),F(),L(e._forceDisplayInfixLabel()?-1:1)}}function bp(t,i){t&1&&(K(0,"div",10,2),ee(2,2),Q())}function yp(t,i){t&1&&(K(0,"div",11,3),ee(2,3),Q())}function xp(t,i){}function Sp(t,i){if(t&1&&zt(0,xp,0,0,"ng-template",13),t&2){Te();let e=Ki(1);$e("ngTemplateOutlet",e)}}function Cp(t,i){t&1&&(K(0,"div",14,4),ee(2,4),Q())}function wp(t,i){t&1&&(K(0,"div",15,5),ee(2,5),Q())}function Tp(t,i){t&1&&yt(0,"div",16)}function Dp(t,i){t&1&&ee(0,6)}function Ap(t,i){if(t&1&&(K(0,"mat-hint",21),oo(1),Q()),t&2){let e=Te(2);$e("id",e._hintLabelId),F(),no(e.hintLabel)}}function Mp(t,i){if(t&1&&(U(0,Ap,2,2,"mat-hint",21),ee(1,7),yt(2,"div",22),ee(3,8)),t&2){let e=Te();L(e.hintLabel?0:-1)}}var Dr=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t,selectors:[["mat-label"]]})}return t})(),Mr=new M("MatError"),Ep=(()=>{class t{id=d(Ge).getId("mat-mdc-error-");constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t,selectors:[["mat-error"],["","matError",""]],hostAttrs:[1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(r,o){r&2&&xt("id",o.id)},inputs:{id:"id"},features:[w([{provide:Mr,useExisting:t}])]})}return t})(),Ar=(()=>{class t{align="start";id=d(Ge).getId("mat-mdc-hint-");static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(r,o){r&2&&(xt("id",o.id),se("align",null),B("mat-mdc-form-field-hint-end",o.align==="end"))},inputs:{align:"align",id:"id"}})}return t})(),Ts=new M("MatPrefix");var Er=new M("MatSuffix"),kp=(()=>{class t{set _isTextSelector(e){this._isText=!0}_isText=!1;static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[w([{provide:Er,useExisting:t}])]})}return t})(),Ds=new M("FloatingLabelParent"),bs=(()=>{class t{_elementRef=d(X);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize()}_floating=!1;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}_monitorResize=!1;_resizeObserver=d(ps);_ngZone=d(H);_parent=d(Ds);_resizeSubscription=new $t;constructor(){}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return Fp(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(r,o){r&2&&B("mdc-floating-label--float-above",o.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return t})();function Fp(t){let i=t;if(i.offsetParent!==null)return i.scrollWidth;let e=i.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let r=e.scrollWidth;return e.remove(),r}var ys="mdc-line-ripple--active",Li="mdc-line-ripple--deactivating",xs=(()=>{class t{_elementRef=d(X);_cleanupTransitionEnd;constructor(){let e=d(H),r=d(we);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=r.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove(Li),e.add(ys)}deactivate(){this._elementRef.nativeElement.classList.add(Li)}_handleTransitionEnd=e=>{let r=this._elementRef.nativeElement.classList,o=r.contains(Li);e.propertyName==="opacity"&&o&&r.remove(ys,Li)};ngOnDestroy(){this._cleanupTransitionEnd()}static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return t})(),Ss=(()=>{class t{_elementRef=d(X);_ngZone=d(H);open=!1;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,r=e.querySelector(".mdc-floating-label");r?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(r.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>r.style.transitionDuration="")}))):e.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(e){let r=this._notch.nativeElement;!this.open||!e?r.style.width="":r.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`)}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=bt({type:t,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(r,o){if(r&1&&de(ap,5),r&2){let n;R(n=V())&&(o._notch=n.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(r,o){r&2&&B("mdc-notched-outline--notched",o.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},attrs:sp,ngContentSelectors:lp,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(r,o){r&1&&(Gi(),zi(0,"div",1),eo(1,"div",2,0),ee(3),to(),zi(4,"div",3))},encapsulation:2,changeDetection:0})}return t})(),ji=(()=>{class t{value;stateChanges;id;placeholder;ngControl;focused;empty;shouldLabelFloat;required;disabled;errorState;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t})}return t})();var $i=new M("MatFormField"),As=new M("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Cs="fill",Op="auto",ws="fixed",Ip="translateY(-50%)",kr=(()=>{class t{_elementRef=d(X);_changeDetectorRef=d(Gt);_dir=d(po);_platform=d(ze);_idGenerator=d(Ge);_ngZone=d(H);_defaults=d(As,{optional:!0});_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=Ct("iconPrefixContainer");_textPrefixContainerSignal=Ct("textPrefixContainer");_iconSuffixContainerSignal=Ct("iconSuffixContainer");_textSuffixContainerSignal=Ct("textSuffixContainer");_prefixSuffixContainers=ce(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=lo(Dr);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=Ke(e)}_hideRequiredMarker=!1;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||Op}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let r=e||this._defaults?.appearance||Cs;this._appearanceSignal.set(r)}_appearanceSignal=ne(Cs);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||ws}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||ws}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}_hintLabel="";_hasIconPrefix=!1;_hasTextPrefix=!1;_hasIconSuffix=!1;_hasTextSuffix=!1;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e}_destroyed=new _;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=ho();constructor(){let e=this._defaults;e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),this._syncOutlineLabelOffset()}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled")},300)}),this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix()}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck()}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete()}getLabelId=ce(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(e){let r=this._control,o="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(o+e.controlType),r.controlType&&this._elementRef.nativeElement.classList.add(o+r.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=r.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck()}),this._describedByChanges?.unsubscribe(),this._describedByChanges=r.stateChanges.pipe(Gr([void 0,void 0]),Se(()=>[r.errorState,r.userAriaDescribedBy]),Br(),Le(([[n,a],[s,l]])=>n!==s||a!==l)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),r.ngControl&&r.ngControl.valueChanges&&(this._valueChanges=r.ngControl.valueChanges.pipe(Ht(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()))}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),$r(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){let e=this._control.focused;e&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!e&&(this._isFocused||this._isFocused===null)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._elementRef.nativeElement.classList.toggle("mat-focused",e),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",e)}_syncOutlineLabelOffset(){co({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset())});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"})}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())})}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=ce(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(e){let r=this._control?this._control.ngControl:null;return r&&r[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let n=this._hintChildren?this._hintChildren.find(s=>s.align==="start"):null,a=this._hintChildren?this._hintChildren.find(s=>s.align==="end"):null;n?e.push(n.id):this._hintLabel&&e.push(this._hintLabelId),a&&e.push(a.id)}else this._errorChildren&&e.push(...this._errorChildren.map(n=>n.id));let r=this._control.describedByIds,o;if(r){let n=this._describedByIds||e;o=e.concat(r.filter(a=>a&&!n.includes(a)))}else o=e;this._control.setDescribedByIds(o),this._describedByIds=e}}_getOutlinedLabelOffset(){let e=this._dir.valueSignal();if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return["",null];if(!this._isAttachedToDom())return null;let r=this._iconPrefixContainer?.nativeElement,o=this._textPrefixContainer?.nativeElement,n=this._iconSuffixContainer?.nativeElement,a=this._textSuffixContainer?.nativeElement,s=r?.getBoundingClientRect().width??0,l=o?.getBoundingClientRect().width??0,c=n?.getBoundingClientRect().width??0,p=a?.getBoundingClientRect().width??0,m=e==="rtl"?"-1":"1",u=`${s+l}px`,v=`calc(${m} * (${u} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,A=`var(--mat-mdc-form-field-label-transform, ${Ip} translateX(${v}))`,D=s+l+c+p;return[A,D]}_writeOutlinedLabelStyles(e){if(e!==null){let[r,o]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=r),o!==null&&this._notchedOutline?._setMaxWidth(o)}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let r=e.getRootNode();return r&&r!==e}return document.documentElement.contains(e)}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=bt({type:t,selectors:[["mat-form-field"]],contentQueries:function(r,o,n){if(r&1&&(ro(n,o._labelChild,Dr,5),We(n,ji,5),We(n,Ts,5),We(n,Er,5),We(n,Mr,5),We(n,Ar,5)),r&2){qi();let a;R(a=V())&&(o._formFieldControl=a.first),R(a=V())&&(o._prefixChildren=a),R(a=V())&&(o._suffixChildren=a),R(a=V())&&(o._errorChildren=a),R(a=V())&&(o._hintChildren=a)}},viewQuery:function(r,o){if(r&1&&(St(o._iconPrefixContainerSignal,hs,5),St(o._textPrefixContainerSignal,gs,5),St(o._iconSuffixContainerSignal,vs,5),St(o._textSuffixContainerSignal,_s,5),de(dp,5),de(hs,5),de(gs,5),de(vs,5),de(_s,5),de(bs,5),de(Ss,5),de(xs,5)),r&2){qi(4);let n;R(n=V())&&(o._textField=n.first),R(n=V())&&(o._iconPrefixContainer=n.first),R(n=V())&&(o._textPrefixContainer=n.first),R(n=V())&&(o._iconSuffixContainer=n.first),R(n=V())&&(o._textSuffixContainer=n.first),R(n=V())&&(o._floatingLabel=n.first),R(n=V())&&(o._notchedOutline=n.first),R(n=V())&&(o._lineRipple=n.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(r,o){r&2&&B("mat-mdc-form-field-label-always-float",o._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",o._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",o._hasIconSuffix)("mat-form-field-invalid",o._control.errorState)("mat-form-field-disabled",o._control.disabled)("mat-form-field-autofilled",o._control.autofilled)("mat-form-field-appearance-fill",o.appearance=="fill")("mat-form-field-appearance-outline",o.appearance=="outline")("mat-form-field-hide-placeholder",o._hasFloatingLabel()&&!o._shouldLabelFloat())("mat-primary",o.color!=="accent"&&o.color!=="warn")("mat-accent",o.color==="accent")("mat-warn",o.color==="warn")("ng-untouched",o._shouldForward("untouched"))("ng-touched",o._shouldForward("touched"))("ng-pristine",o._shouldForward("pristine"))("ng-dirty",o._shouldForward("dirty"))("ng-valid",o._shouldForward("valid"))("ng-invalid",o._shouldForward("invalid"))("ng-pending",o._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[w([{provide:$i,useExisting:t},{provide:Ds,useExisting:t}])],ngContentSelectors:fp,decls:19,vars:25,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],["aria-atomic","true","aria-live","polite"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(r,o){if(r&1){let n=io();Gi(cp),zt(0,pp,1,1,"ng-template",null,0,ao),K(2,"div",6,1),le("click",function(s){return Qr(n),Jr(o._control.onContainerClick(s))}),U(4,hp,1,0,"div",7),K(5,"div",8),U(6,_p,2,2,"div",9),U(7,bp,3,0,"div",10),U(8,yp,3,0,"div",11),K(9,"div",12),U(10,Sp,1,1,null,13),ee(11),Q(),U(12,Cp,3,0,"div",14),U(13,wp,3,0,"div",15),Q(),U(14,Tp,1,0,"div",16),Q(),K(15,"div",17)(16,"div",18),U(17,Dp,1,0)(18,Mp,4,1),Q()()}if(r&2){let n;F(2),B("mdc-text-field--filled",!o._hasOutline())("mdc-text-field--outlined",o._hasOutline())("mdc-text-field--no-label",!o._hasFloatingLabel())("mdc-text-field--disabled",o._control.disabled)("mdc-text-field--invalid",o._control.errorState),F(2),L(!o._hasOutline()&&!o._control.disabled?4:-1),F(2),L(o._hasOutline()?6:-1),F(),L(o._hasIconPrefix?7:-1),F(),L(o._hasTextPrefix?8:-1),F(2),L(!o._hasOutline()||o._forceDisplayInfixLabel()?10:-1),F(2),L(o._hasTextSuffix?12:-1),F(),L(o._hasIconSuffix?13:-1),F(),L(o._hasOutline()?-1:14),F(),B("mat-mdc-form-field-subscript-dynamic-size",o.subscriptSizing==="dynamic");let a=o._getSubscriptMessageType();F(),B("mat-mdc-form-field-error-wrapper",a==="error")("mat-mdc-form-field-hint-wrapper",a==="hint"),F(),L((n=a)==="error"?17:n==="hint"?18:-1)}},dependencies:[bs,Ss,fo,xs,Ar],styles:[`.mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator,.mdc-text-field__input::-webkit-search-cancel-button{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-moz-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-webkit-input-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive:-ms-input-placeholder{opacity:0}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mat-form-field-filled-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mat-form-field-filled-caret-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mat-form-field-outlined-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mat-form-field-outlined-caret-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mat-form-field-filled-error-caret-color, var(--mat-sys-error))}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mat-form-field-outlined-error-caret-color, var(--mat-sys-error))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mat-form-field-filled-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mat-form-field-outlined-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mat-form-field-filled-container-shape, var(--mat-sys-corner-extra-small));border-top-right-radius:var(--mat-form-field-filled-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mat-form-field-filled-container-color, var(--mat-sys-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mat-form-field-filled-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 4%, transparent))}.mdc-text-field--outlined{height:56px;overflow:visible;padding-right:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)));padding-left:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)) + 4px);padding-left:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)))}.mdc-floating-label{position:absolute;left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}@media(forced-colors: active){.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mat-form-field-filled-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-filled-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mat-form-field-filled-hover-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mat-form-field-filled-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mat-form-field-filled-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-filled-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mat-form-field-filled-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mat-form-field-filled-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-form-field-filled-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-form-field-filled-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-form-field-filled-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mat-form-field-outlined-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-outlined-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mat-form-field-outlined-hover-label-text-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mat-form-field-outlined-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mat-form-field-outlined-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-outlined-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mat-form-field-outlined-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mat-form-field-outlined-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-form-field-outlined-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-form-field-outlined-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-form-field-outlined-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-outline-color, var(--mat-sys-outline));border-width:var(--mat-form-field-outlined-outline-width, 1px)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-hover-outline-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-focus-outline-color, var(--mat-sys-primary))}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-hover-outline-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-focus-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mat-form-field-outlined-focus-outline-width, 2px)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)))}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:min(var(--mat-form-field-notch-max-width, 100%),calc(100% - max(12px, var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))) * 2))}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{max-width:min(100%,calc(100% - max(12px, var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))) * 2))}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mat-form-field-filled-active-indicator-height, 1px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-active-indicator-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-hover-active-indicator-color, var(--mat-sys-on-surface))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-disabled-active-indicator-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-error-active-indicator-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-error-hover-active-indicator-color, var(--mat-sys-on-error-container))}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mat-form-field-filled-focus-active-indicator-height, 2px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mat-form-field-filled-focus-active-indicator-color, var(--mat-sys-primary))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mat-form-field-filled-error-focus-active-indicator-color, var(--mat-sys-error))}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height, 56px);padding-top:var(--mat-form-field-filled-with-label-container-padding-top, 24px);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom, 8px)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding, 16px);padding-bottom:var(--mat-form-field-container-vertical-padding, 16px)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height, 56px)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height, 56px) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}@keyframes _mat-form-field-subscript-animation{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px;opacity:1;transform:translateY(0);animation:_mat-form-field-subscript-animation 0ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color, var(--mat-sys-error))}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));letter-spacing:var(--mat-form-field-subscript-text-tracking, var(--mat-sys-body-small-tracking));font-weight:var(--mat-form-field-subscript-text-weight, var(--mat-sys-body-small-weight))}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color, var(--mat-sys-on-surface))}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity, 0)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color, var(--mat-sys-neutral10))}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color, color-mix(in srgb, var(--mat-sys-neutral10) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color, var(--mat-sys-on-surface-variant))}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}@media(forced-colors: active){.mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}}@media(forced-colors: active){.mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-form-field-container-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-form-field-container-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-form-field-container-text-tracking, var(--mat-sys-body-large-tracking));font-weight:var(--mat-form-field-container-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color, var(--mat-sys-error))}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color, var(--mat-sys-on-error-container))}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color, var(--mat-sys-error))}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field-infix:has(textarea[cols]){width:auto}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field.mat-form-field-animations-enabled .mat-mdc-form-field-error-wrapper{animation-duration:300ms}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}
|
|
3
|
-
`],encapsulation:2,changeDetection:0})}return t})();var Wi=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=ae({type:t});static \u0275inj=oe({imports:[qe,mo,kr,qe]})}return t})();var
|
|
4
|
-
`],encapsulation:2,changeDetection:0})}return t})(),
|
|
1
|
+
import{$b as yt,$d as uo,A as Se,Aa as Zr,Ab as E,Ac as no,B as Nr,Cb as zt,Fa as _t,Fb as pe,G as Ur,Gb as H,H as Lr,I as jr,Ia as Jr,Ja as ne,Jd as Be,K as $r,L as Le,M as je,Mc as w,N as Wr,Na as Ce,Nb as Xr,Nd as z,Oa as he,Qa as X,Rb as se,Sb as U,Tb as L,Uc as ao,Ud as ze,V as Hr,Wc as ge,Xc as ce,Yb as $e,Yc as so,Yd as Zi,Zb as K,_ as Br,_b as Q,a as $,ac as eo,b as Y,bc as to,bd as Ct,cc as zi,cd as lo,da as zr,ed as Gt,ee as mo,f as W,fa as Gr,g as $t,ga as qr,gc as io,h as Or,ha as Ht,hc as xt,ia as Kr,ic as le,id as He,j as vt,je as Ge,kc as Te,kd as co,la as Bt,lb as F,lc as Gi,m as _,mc as ee,md as Qi,n as Ir,na as N,nc as We,o as b,oa as C,ob as Yr,oc as de,p as Ue,pa as oe,pb as we,pc as R,qb as h,qc as V,qe as ho,r as Rr,ra as M,rc as ro,re as qe,s as Vr,sc as St,se as Ji,t as Pr,ta as d,tc as qi,u as Bi,uc as Ki,ue as po,ve as Ke,wb as bt,wc as B,x as q,xb as ae,yb as g,yd as fo,z as Wt,za as Qr,zc as oo}from"./chunk-W2S6R4AZ.js";var f=function(t){return t.Disconnected="Disconnected",t.HTTPDiscovering="HTTPDiscovering",t.HTTPConnected="HTTPConnected",t.HTTPError="HTTPError",t.HTTPRetrying="HTTPRetrying",t.WebSocketConnecting="WebSocketConnecting",t.Connected="Connected",t.WebSocketError="WebSocketError",t.WebSocketRetrying="WebSocketRetrying",t.PermanentFailure="PermanentFailure",t}(f||{}),qt=(()=>{class t{config={httpRetryCount:3,webSocketRetryCount:5,retryIntervals:[2e3,3e3,5e3],notificationDebounceMs:0};_currentState$=new b(f.Disconnected);_status$=new b(this.createStatus(f.Disconnected,"Not connected"));_httpRetryCount=0;_webSocketRetryCount=0;_retryTimeout=null;_notificationTimeout=null;_httpRetryCallback=null;_webSocketRetryCallback=null;_isInitializationMode=!0;constructor(){console.log("[ConnectionStateMachine] Service initialized")}get state$(){return this._currentState$.asObservable()}get status$(){return this._status$.asObservable()}get currentState(){return this._currentState$.getValue()}enableWebSocketMode(){this._isInitializationMode=!1,console.log("[ConnectionStateMachine] WebSocket mode enabled");let e=this._status$.getValue();console.log(`[ConnectionStateMachine] Current status when enabling WebSocket mode: ${e.state} - ${e.message}`),this._status$.next(e)}setHTTPRetryCallback(e){this._httpRetryCallback=e}setWebSocketRetryCallback(e){this._webSocketRetryCallback=e}startHTTPDiscovery(e="Connection request"){console.log(`[ConnectionStateMachine] Starting HTTP discovery: ${e}`),this._httpRetryCount=0,this.setState(f.HTTPDiscovering,"Discovering Signal K server...")}onHTTPDiscoverySuccess(){console.log("[ConnectionStateMachine] HTTP discovery successful"),this._httpRetryCount=0,this.setState(f.HTTPConnected,"Signal K server discovered"),this._isInitializationMode||this.startWebSocketConnection()}onHTTPDiscoveryError(e){console.log(`[ConnectionStateMachine] HTTP discovery failed: ${e}`),this._httpRetryCount<this.config.httpRetryCount?(this._httpRetryCount++,this.setState(f.HTTPRetrying,`HTTP connection failed. Retrying (${this._httpRetryCount}/${this.config.httpRetryCount})...`,this._httpRetryCount,this.config.httpRetryCount),this.scheduleHTTPRetry()):this.setState(f.PermanentFailure,`HTTP connection failed after ${this.config.httpRetryCount} attempts. Check server URL.`,this.config.httpRetryCount,this.config.httpRetryCount)}startWebSocketConnection(){if(!(this.currentState===f.HTTPConnected||this.currentState===f.WebSocketRetrying||this.currentState===f.WebSocketConnecting||this.currentState===f.Connected))return this.currentState===f.HTTPDiscovering,void 0;console.log("[ConnectionStateMachine] Starting WebSocket connection"),this._webSocketRetryCount=0,this.setState(f.WebSocketConnecting,"Connecting to Signal K Websocket...")}onWebSocketConnected(){console.log("[ConnectionStateMachine] WebSocket connected"),this._webSocketRetryCount=0,this.setState(f.Connected,"Connected to Signal K server")}onWebSocketError(e){if(console.log(`[ConnectionStateMachine] WebSocket error: ${e}`),this.currentState!==f.HTTPConnected&&this.currentState!==f.WebSocketConnecting&&this.currentState!==f.Connected&&this.currentState!==f.WebSocketRetrying){console.log("[ConnectionStateMachine] HTTP connection lost, restarting HTTP discovery"),this.startHTTPDiscovery("HTTP connection lost during WebSocket operation");return}this._webSocketRetryCount++,this.setState(f.WebSocketRetrying,`WebSocket connection failed. Retry attempt ${this._webSocketRetryCount}...`,this._webSocketRetryCount,this.config.webSocketRetryCount),this.scheduleWebSocketRetry()}shutdown(e="App shutdown"){console.log(`[ConnectionStateMachine] Shutting down all connections: ${e}`),this.clearRetryTimer(),this.clearNotificationTimeout(),this._httpRetryCount=0,this._webSocketRetryCount=0,this.setState(f.Disconnected,"Application restarting...")}isHTTPConnected(){return this.currentState===f.HTTPConnected||this.currentState===f.WebSocketConnecting||this.currentState===f.Connected||this.currentState===f.WebSocketRetrying}isFullyConnected(){return this.currentState===f.Connected}setState(e,r,o,n){this._currentState$.next(e);let a=this.createStatus(e,r,o,n);e===f.HTTPDiscovering||e===f.WebSocketConnecting?this._status$.next(a):e===f.Connected?(this.clearNotificationTimeout(),this._notificationTimeout=setTimeout(()=>{this._status$.next(a)},this.config.notificationDebounceMs)):(this.clearNotificationTimeout(),this._status$.next(a))}createStatus(e,r,o,n){return{state:e,operation:this.stateToOperationCode(e),message:r,retryCount:o||0,maxRetries:n||0,timestamp:new Date}}stateToOperationCode(e){switch(e){case f.Disconnected:return 0;case f.HTTPDiscovering:case f.WebSocketConnecting:return 1;case f.Connected:return 2;case f.HTTPError:case f.WebSocketError:case f.HTTPRetrying:case f.WebSocketRetrying:return 3;case f.HTTPConnected:return 2;case f.PermanentFailure:return 5;default:return 0}}scheduleHTTPRetry(){this.clearRetryTimer();let e=Math.min(this._httpRetryCount-1,this.config.retryIntervals.length-1),r=this.config.retryIntervals[e];console.log(`[ConnectionStateMachine] Scheduling HTTP retry in ${r}ms`),this._retryTimeout=setTimeout(()=>{this._httpRetryCallback?(console.log(`[ConnectionStateMachine] Executing HTTP retry ${this._httpRetryCount}/${this.config.httpRetryCount}`),this._httpRetryCallback()):(console.error("[ConnectionStateMachine] No HTTP retry callback set!"),this.setState(f.Disconnected,"HTTP retry callback not configured"))},r)}scheduleWebSocketRetry(){this.clearRetryTimer(),console.log(`[ConnectionStateMachine] Scheduling WebSocket retry in ${this.config.retryIntervals[1]}ms`),this._retryTimeout=setTimeout(()=>{this._webSocketRetryCallback?(console.log(`[ConnectionStateMachine] Executing WebSocket retry ${this._webSocketRetryCount}/${this.config.webSocketRetryCount}`),this._webSocketRetryCallback()):(console.log("[ConnectionStateMachine] No WebSocket retry callback - using state change method"),this.setState(f.WebSocketConnecting,`Retrying WebSocket connection (${this._webSocketRetryCount}/${this.config.webSocketRetryCount})...`,this._webSocketRetryCount,this.config.webSocketRetryCount))},this.config.retryIntervals[1])}clearRetryTimer(){this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=null)}clearNotificationTimeout(){this._notificationTimeout&&(clearTimeout(this._notificationTimeout),this._notificationTimeout=null)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Qe=(()=>{class t{TIMEOUT_DURATION=1e4;connectionStateMachine=d(qt);constructor(){this.connectionStateMachine.setHTTPRetryCallback(()=>{console.log("[SignalKConnectionService] Executing HTTP retry via callback"),this.retryCurrentConnection()})}serverServiceEndpoint$=new b({operation:0,message:"Not connected",serverDescription:null,httpServiceUrl:null,WsServiceUrl:null});signalKURL;serverName;serverVersion$=new b(null);serverRoles=[];http=d(Be);currentProxyEnabled;currentSubscribeAll;validateSignalKUrl(e){return W(this,null,function*(){if(!e)throw new Error("Please enter a server URL");try{let o=new URL(e);if(!["http:","https:"].includes(o.protocol))throw new Error("URL must start with http:// or https://")}catch{throw new Error("Invalid URL format - please check for typos and ensure it starts with http:// or https://")}let r=e;r.endsWith("signalk/")||(r+="/signalk/"),console.log(`[Connection Service] Validating Signal K server at: ${e}`);try{if(!(yield q(this.http.get(r,{observe:"response"}).pipe(Wt(5e3),je(n=>{throw console.error("[Connection Service] HTTP Error details:",n),n.name==="TimeoutError"?(console.error("[Connection Service] Validation timed out after 5000ms"),new Error("Server is not responding - check if the URL is correct and the server is running")):n.status===0||n.status===void 0?new Error("Cannot connect to server - check the URL format and ensure the server is accessible"):n.status===404?new Error("Server found but no Signal K service detected - verify this is a Signal K server"):n.status===403?new Error("Server refused connection - check if the server allows connections from this browser"):n.status>=500?new Error(`Server error (${n.status}) - the Signal K server may be having issues`):new Error(`Connection failed (${n.status}) - ${n.statusText||"please check the server URL"}`)})))).body?.endpoints?.v1)throw new Error("Server responded but doesn't appear to be a Signal K server - missing required endpoints");console.log(`[Connection Service] Validation successful for: ${e}`)}catch(o){throw console.error(`[Connection Service] Validation failed for ${e}:`,o.message),o}})}initializeConnection(e,r,o){return W(this,null,function*(){if(!e.url){console.log("[Connection Service] Connection initialization called with null or empty URL value");return}this.currentProxyEnabled=r,this.currentSubscribeAll=o;let n={operation:1,message:"Connecting...",serverDescription:null,httpServiceUrl:null,WsServiceUrl:null};this.signalKURL=e,this.serverServiceEndpoint$.next(n),this.connectionStateMachine.startHTTPDiscovery(`Connecting to ${e.url}`);let a=this.signalKURL.url;a.endsWith("signalk/")||(a+="/signalk/");try{console.log("[Connection Service] Connecting to: "+this.signalKURL.url);let s=yield q(this.http.get(a,{observe:"response"}).pipe(Wt(this.TIMEOUT_DURATION),je(l=>(l.name==="TimeoutError"&&console.error("[Connection Service] Connection request timed out after "+this.TIMEOUT_DURATION+"ms"),Bi(l)))));Object.assign(n,this.processEndpointResponse(s,r,o)),this.connectionStateMachine.onHTTPDiscoverySuccess()}catch(s){n.operation=3,n.message=s.message,this.connectionStateMachine.onHTTPDiscoveryError(s.message),this.handleError(s)}finally{n.subscribeAll=!!o,this.serverServiceEndpoint$.next(n)}})}retryCurrentConnection(){if(!this.signalKURL?.url){console.error("[SignalKConnectionService] Cannot retry - no current URL stored");return}console.log(`[SignalKConnectionService] Retrying connection to ${this.signalKURL.url}`),this.performHTTPDiscovery()}performHTTPDiscovery(){return W(this,null,function*(){if(!this.signalKURL?.url){console.error("[SignalKConnectionService] No URL available for HTTP discovery");return}let e=this.signalKURL.url;e.endsWith("signalk/")||(e+="/signalk/");try{console.log("[Connection Service] Connecting to: "+this.signalKURL.url);let r=yield q(this.http.get(e,{observe:"response"}).pipe(Wt(this.TIMEOUT_DURATION),je(n=>(n.name==="TimeoutError"&&console.error("[Connection Service] Connection request timed out after "+this.TIMEOUT_DURATION+"ms"),Bi(n))))),o=this.processEndpointResponse(r,this.currentProxyEnabled,this.currentSubscribeAll);this.connectionStateMachine.onHTTPDiscoverySuccess(),this.serverServiceEndpoint$.next(o)}catch(r){let o={operation:3,message:r.message,serverDescription:null,httpServiceUrl:null,WsServiceUrl:null};this.connectionStateMachine.onHTTPDiscoveryError(r.message),this.serverServiceEndpoint$.next(o),this.handleError(r)}})}processEndpointResponse(e,r,o){console.debug("[Connection Service] Signal K HTTP Endpoints retrieved"),this.serverVersion$.next(e.body.server.version);let n=e.body.endpoints.v1["signalk-http"],a=e.body.endpoints.v1["signalk-ws"],s={operation:2,message:e.status?.toString()||"Connected",serverDescription:`${e.body.server.id} ${e.body.server.version}`,httpServiceUrl:null,WsServiceUrl:null};if(r)console.debug("[Connection Service] Proxy Mode Enabled"),s.httpServiceUrl=window.location.origin+new URL(n).pathname,s.WsServiceUrl=window.location.protocol.replace("http","ws")+"//"+window.location.host+new URL(a).pathname;else{s.httpServiceUrl=n;let l=window.location.protocol==="https:";s.WsServiceUrl=l?a.replace("ws://","wss://"):a}return console.debug("[Connection Service] HTTP URI: "+s.httpServiceUrl),console.debug("[Connection Service] WebSocket URI: "+s.WsServiceUrl),s.subscribeAll=!!o,s}handleError(e){let r=e.status===0?`[Connection Service] ${e.name}: ${e.message}`:`[Connection Service] Backend returned code ${e.status}, body was: ${e.error}`;throw console.error(r),e}getServiceEndpointStatusAsO(){return this.serverServiceEndpoint$.asObservable()}setServerInfo(e,r,o){this.serverName=e,this.serverRoles=o,console.log(`[Connection Service] Server Name: ${e}, Version: ${r}, Roles: ${JSON.stringify(o)}`)}get skServerName(){return this.serverName}get skServerVersion(){return this.serverVersion$.getValue()}get skServerRoles(){return this.serverRoles}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Os="/signalk/v1/",go="auth/login",Is="auth/logout",Rs="auth/validate",Vs=60,Kt=(()=>{class t{http=d(Be);conn=d(Qe);_IsLoggedIn$=new b(!1);isLoggedIn$=this._IsLoggedIn$.asObservable();_authToken$=new b(null);authToken$=this._authToken$.asObservable();connectionEndpointSubscription=null;authTokenSubscription=null;isRenewingToken=!1;loginUrl=null;logoutUrl=null;validateTokenUrl=null;constructor(){let e=JSON.parse(localStorage.getItem("authorization_token"));e&&(e.isDeviceAccessToken?e.expiry===null?(console.log("[Authentication Service] Device Access Token found with expiry: NEVER"),this._authToken$.next(e)):this.isTokenExpired(e.expiry)?(console.log("[Authentication Service] Device Access Token expired. Deleting token"),localStorage.removeItem("authorization_token")):(console.log("[Authentication Service] Device Access Token found in Local Storage"),this._authToken$.next(e)):(console.log("[Authentication Service] User session token found in Local Storage"),console.log("[Authentication Service] Deleting user session token"),localStorage.removeItem("authorization_token"))),this.authTokenSubscription=this._authToken$.pipe(Le(r=>!!r&&r.expiry!==null),Hr((r,o)=>r.expiry===o.expiry),Se(r=>{let o=this.getTokenExpirationDate(r.expiry,Vs),n=o.getTime()-Date.now();return console.log(`[Authentication Service] Token refresh timer set for ${n} ms (Token Expiry: ${o.toISOString()})`),Math.max(n,0)}),qr(r=>jr(r))).subscribe(()=>{this.handleTokenRenewal()}),this.connectionEndpointSubscription=this.conn.serverServiceEndpoint$.subscribe(r=>{if(r.operation===2){let o=r.httpServiceUrl.substring(0,r.httpServiceUrl.length-4);this.loginUrl=o+go,this.logoutUrl=o+Is,this.validateTokenUrl=o+Rs}})}handleTokenRenewal(){if(this.isRenewingToken){console.warn("[Authentication Service] Token renewal already in progress.");return}this.isRenewingToken=!0;let e=JSON.parse(localStorage.getItem("authorization_token"));if(!e){console.warn("[Authentication Service] No token found in local storage. Cannot renew."),this.isRenewingToken=!1;return}if(e.isDeviceAccessToken)console.warn("[Authentication Service] Device Access Token expired. Manual renewal required."),this.isRenewingToken=!1;else if(this.isTokenExpired(e.expiry))console.log("[Authentication Service] User session Token expired. Cannot renew."),this.isRenewingToken=!1;else{console.log("[Authentication Service] User session Token expires soon. Renewing token...");let r=JSON.parse(localStorage.getItem("connectionConfig"));this.login({usr:r.loginName,pwd:r.loginPassword}).then(()=>{console.log("[Authentication Service] Token successfully renewed.")}).catch(o=>{console.error("[Authentication Service] Token renewal failed. Server returned:",o.error)}).finally(()=>{this.isRenewingToken=!1})}}login(n){return W(this,arguments,function*({usr:e,pwd:r,newUrl:o}){let a;if(o?a=o.replace(/\/+$/,"")+Os+go:a=this.loginUrl,this._IsLoggedIn$.getValue()&&(yield this.logout(!0)),!a)throw console.error("[Authentication Service] Login URL is not set. Cannot perform login."),this.deleteToken(),new Error("Login URL is not set.");yield q(this.http.post(a,{username:e,password:r},{observe:"response"})).then(s=>{console.log("[Authentication Service] User "+e+" login successful"),this.setSession(s.body.token)}).catch(s=>{this.deleteToken(),this.handleError(s)})})}handleError(e){throw e.status===0&&this.deleteToken(),e}setSession(e){if(e){let r=JSON.parse(atob(e.split(".")[1])).exp,o={token:null,expiry:null,isDeviceAccessToken:!1};r===void 0?(o.token=e,console.log("[Authentication Service] User Session Token received. Token Expiration: NEVER"),this._IsLoggedIn$.next(!0),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o))):this.isTokenExpired(r)?console.log("[Authentication Service] Received expired Session Token from server"):(o.token=e,o.expiry=r,console.log("[Authentication Service] Session Authorization Token received. Token Expiration: "+this.getTokenExpirationDate(o.expiry)),this._IsLoggedIn$.next(!0),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o)))}}isTokenExpired(e){return Math.floor(new Date().getTime()/1e3)>=e}getTokenExpirationDate(e,r){let o=new Date(0);if(r){let n=new Date(0);n.setUTCSeconds(e-r),o=n}else o.setUTCSeconds(e);return o}renewToken(){return this.http.post(this.validateTokenUrl,null,{observe:"response"})}logout(e){return W(this,null,function*(){localStorage.removeItem("authorization_token"),yield q(this.http.put(this.logoutUrl,null)).then(()=>{this._IsLoggedIn$.next(!1),e||this._authToken$.next(null),console.log("[Authentication Service] User logged out")}).catch(r=>{console.error(r)})})}deleteToken(){this._authToken$&&(console.log("[Authentication Service] Deleting Authorization token"),localStorage.removeItem("authorization_token"),this._IsLoggedIn$.next(!1),this._authToken$.next(null))}setDeviceAccessToken(e){if(e){let r=JSON.parse(atob(e.split(".")[1])).exp,o={token:null,expiry:null,isDeviceAccessToken:!0};r===void 0?(o.token=e,console.log("[Authentication Service] Device Access Token received. Token Expiration: NEVER"),this._IsLoggedIn$.next(!1),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o))):this.isTokenExpired(r)?console.log("[Authentication Service] Received expired Device Access Token from server"):(o.token=e,o.expiry=r,console.log("[Authentication Service] Device Access Token received. Token Expiration: "+this.getTokenExpirationDate(o.expiry)),this._IsLoggedIn$.next(!1),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o)))}}ngOnDestroy(){this.connectionEndpointSubscription?.unsubscribe(),this.authTokenSubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ps=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Yi=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");let i=t.match(Ps);if(!i)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return i.shift(),i},vo=t=>t==="*"||t==="x"||t==="X",_o=t=>{let i=parseInt(t,10);return isNaN(i)?t:i},Ns=(t,i)=>typeof t!=typeof i?[String(t),String(i)]:[t,i],Us=(t,i)=>{if(vo(t)||vo(i))return 0;let[e,r]=Ns(_o(t),_o(i));return e>r?1:e<r?-1:0},Xi=(t,i)=>{for(let e=0;e<Math.max(t.length,i.length);e++){let r=Us(t[e]||"0",i[e]||"0");if(r!==0)return r}return 0};var bo=(t,i)=>{let e=Yi(t),r=Yi(i),o=e.pop(),n=r.pop(),a=Xi(e,r);return a!==0?a:o&&n?Xi(o.split("."),n.split(".")):o||n?o?-1:1:0};var er=(t,i,e)=>{Ls(e);let r=bo(t,i);return xo[e].includes(r)},xo={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},yo=Object.keys(xo),Ls=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(yo.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${yo.join("|")}`)};var So=(()=>{class t{server=d(Qe);http=d(Be);_auth=d(Kt);serverEndpoint=null;isAppDataSupported=!1;configFileVersion=null;sharedConfigName;InitConfig=null;storageServiceReady$=new b(!1);_isLoggedIn=!1;_networkStatus=void 0;patchQueue$=new _;patch=function(e){return this.http.post(e.url,e.document).pipe(Kr(()=>console.log("[Storage Service] Remote config patch request completed successfully")),je(r=>this.handleError(r)))};constructor(){let e=this.server;this._auth.isLoggedIn$.subscribe(r=>{this._isLoggedIn=r,this.isStorageServiceReady()}),e.serverServiceEndpoint$.subscribe(r=>{this._networkStatus=r,this.isStorageServiceReady()}),e.serverVersion$.subscribe(r=>{r&&(this.isAppDataSupported=er(r,"1.27.0",">="))}),this.patchQueue$.pipe(Wr(r=>this.patch(r))).subscribe(()=>{})}isStorageServiceReady(){this._networkStatus?.httpServiceUrl&&(this.serverEndpoint=this._networkStatus.httpServiceUrl.substring(0,this._networkStatus.httpServiceUrl.length-4)+"applicationData/"),this._networkStatus?.operation===2&&this._isLoggedIn&&this.serverEndpoint?(this.storageServiceReady$.next(!0),console.log(`[Remote Storage Service] Authenticated ${this._isLoggedIn} ,AppData API: ${this.serverEndpoint}`)):this.storageServiceReady$.next(!1)}ensureReady(){if(!this.storageServiceReady$.getValue())throw new Error("[StorageService] Not ready: storageServiceReady is false")}listConfigs(e){return W(this,null,function*(){this.ensureReady();let r=[];if(!this.serverEndpoint)return console.warn("[Storage Service] No server endpoint set. Cannot retrieve config list"),null;let o=this.serverEndpoint,n=o+"global/kip/"+this.configFileVersion+"/?keys=true",a=o+"user/kip/"+this.configFileVersion+"/?keys=true";return e&&(n=o+"global/kip/"+e+"/?keys=true",a=o+"user/kip/"+e+"/?keys=true"),yield q(this.http.get(n)).then(s=>{for(let l of s)r.push({scope:"global",name:l});console.log("[Storage Service] Retrieved Global config list")}).catch(s=>{this.handleError(s)}),yield q(this.http.get(a)).then(s=>{for(let l of s)r.push({scope:"user",name:l});console.log("[Storage Service] Retrieved User config list")}).catch(s=>{this.handleError(s)}),r})}getConfig(e,r,o,n){return W(this,null,function*(){this.ensureReady();let a=null,s=this.serverEndpoint+e+"/kip/"+this.configFileVersion+"/"+r;return o&&(s=this.serverEndpoint+e+"/kip/"+o+"/"+r),yield q(this.http.get(s)).then(l=>{a=l,console.log(`[Storage Service] Retrieved config [${r}] from [${e}] scope`),n&&(this.InitConfig=l)}).catch(l=>{this.handleError(l)}),a})}setConfig(e,r,o,n){return W(this,null,function*(){this.ensureReady();let a=this.serverEndpoint+e+"/kip/"+this.configFileVersion+"/"+r,s=null;return n&&(a=this.serverEndpoint+e+"/kip/"+n+"/"+r),yield q(this.http.post(a,o)).then(l=>{console.log(`[Storage Service] Saved config [${r}] to [${e}] scope`),s=l}).catch(l=>{this.handleError(l)}),s})}patchConfig(e,r,o){this.ensureReady();let n=this.serverEndpoint+"user/kip/"+this.configFileVersion,a;switch(o&&(n=this.serverEndpoint+"user/kip/"+o),e){case"IAppConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/app`,value:r}];break;case"IThemeConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/theme/themeName`,value:r.themeName}];break;case"IWidgetConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/widget`,value:r}];break;case"ILayoutConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/layout`,value:r}];break;case"Dashboards":a=[{op:"replace",path:`/${this.sharedConfigName}/dashboards`,value:r}];break;case"Array<IUnitDefaults>":a=[{op:"replace",path:`/${this.sharedConfigName}/app/unitDefaults`,value:r}];break;case"Array<IDatasetDef>":a=[{op:"replace",path:`/${this.sharedConfigName}/app/dataSets`,value:r}];break;case"INotificationConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/app/notificationConfig`,value:r}];break;default:console.warn("[Storage Service] JSON Patch request type unknown");break}let s={url:n,document:a};this.patchQueue$.next(s)}patchGlobal(e,r,o,n,a){this.ensureReady();let s=this.serverEndpoint+r+"/kip/"+this.configFileVersion;a&&(s=this.serverEndpoint+r+"/kip/"+a);let l;switch(n){case"add":l=[{op:"add",path:`/${e}`,value:o}];break;case"replace":l=[{op:"replace",path:`/${e}`,value:o}];break;case"remove":l=[{op:"remove",path:`/${e}`,value:o}];break;default:console.warn("[Storage Service] JSON Patch operation request type unknown");break}let c={url:s,document:l};this.patchQueue$.next(c)}removeItem(e,r,o){this.ensureReady();let n=this.serverEndpoint+e+"/kip/"+this.configFileVersion;o&&(n=this.serverEndpoint+e+"/kip/"+o);let a=[{op:"remove",path:`/${r}`}],s={url:n,document:a};this.patchQueue$.next(s)}clear(){this.ensureReady()}set activeConfigFileVersion(e){this.configFileVersion=e}handleError(e){throw e.status===0?console.error("[Storage Service] An error occurred:",e.error):console.error("[Storage Service] Backend returned error: ",e.message),e}get initConfig(){return this.InitConfig}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var De=class{static create(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){let e=Math.random()*16|0;return(i=="x"?e:e&3|8).toString(16)})}};var wt={disableNotifications:!1,menuGrouping:!0,security:{disableSecurity:!0},devices:{disableDevices:!1,showNormalState:!1,showNominalState:!1},sound:{disableSound:!1,muteNormal:!0,muteNominal:!0,muteWarn:!0,muteAlert:!1,muteAlarm:!1,muteEmergency:!1}};var Qt={Unitless:"unitless",Speed:"knots",Flow:"l/h",Temperature:"celsius",Length:"m",Volume:"liter",Current:"A",Potential:"V",Charge:"C",Power:"W",Energy:"J",Pressure:"mmHg","Fuel Distance":"nm/l","Energy Distance":"nm/kWh",Density:"kg/m3",Time:"Hours","Angular Velocity":"deg/min",Angle:"deg",Frequency:"Hz",Ratio:"ratio",Resistance:"ohm"};var Co={configVersion:11,autoNightMode:!0,redNightMode:!1,nightModeBrightness:.27,dataSets:[],unitDefaults:Qt,notificationConfig:wt},wo={themeName:""};var To={configVersion:11,kipUUID:De.create(),signalKUrl:null,proxyEnabled:!1,signalKSubscribeAll:!1,useDeviceToken:!1,loginName:null,loginPassword:null,useSharedConfig:!1,sharedConfigName:"default"};var tr={configVersion:11,autoNightMode:!1,redNightMode:!1,nightModeBrightness:.27,dataSets:[{uuid:"afbe4e41-26f5-404f-a55d-9f7b9b76fbd1",path:"self.environment.wind.speedApparent",pathSource:"default",period:1,baseUnit:"m/s",label:"self.environment.wind.speedApparent, Source: default, Scale: minute, Period: 1",timeScaleFormat:"minute"}],unitDefaults:{Unitless:"unitless",Speed:"knots",Flow:"l/h",Temperature:"celsius",Length:"m",Volume:"liter",Current:"A",Potential:"V",Charge:"C",Power:"W",Energy:"J",Pressure:"mmHg","Fuel Distance":"nm/l","Energy Distance":"nm/kWh",Density:"kg/m3",Time:"Hours","Angular Velocity":"deg/min",Angle:"deg",Frequency:"Hz",Ratio:"ratio",Resistance:"ohm"},notificationConfig:{disableNotifications:!1,menuGrouping:!0,security:{disableSecurity:!0},devices:{disableDevices:!1,showNormalState:!1,showNominalState:!1},sound:{disableSound:!1,muteNormal:!0,muteNominal:!0,muteWarn:!0,muteAlert:!1,muteAlarm:!1,muteEmergency:!1}}},ir=[{id:"3e0825ee-95fd-4ad4-8802-e0507845b668",name:"Sailing",configuration:[{w:3,h:4,id:"339698a7-2cff-4ab9-9b50-d8056f971471",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"339698a7-2cff-4ab9-9b50-d8056f971471",config:{displayName:"Depth",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.environment.depth.belowTransducer",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"m",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!1,showMin:!1,numDecimal:1,showMiniChart:!0,yScaleMin:0,yScaleMax:100,inverseYAxis:!1,verticalChart:!1,color:"blue",enableTimeout:!1,dataTimeout:5,ignoreZones:!1}}},x:0,y:0},{w:5,h:10,id:"a44028e0-dfee-4492-895b-2b03a60f3a69",selector:"widget-wind-steer",input:{widgetProperties:{type:"widget-wind-steer",uuid:"a44028e0-dfee-4492-895b-2b03a60f3a69",config:{filterSelfPaths:!0,paths:{headingPath:{description:"True Heading",path:"self.navigation.headingTrue",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",showConvertUnitTo:!1,sampleTime:500},appWindAngle:{description:"Apparent Wind Angle",path:"self.environment.wind.angleApparent",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",showConvertUnitTo:!1,sampleTime:500},appWindSpeed:{description:"Apparent Wind Speed",path:"self.environment.wind.speedApparent",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"m/s",convertUnitTo:"knots",sampleTime:500},trueWindAngle:{description:"True Wind Angle",path:"self.environment.wind.angleTrueWater",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",showConvertUnitTo:!1,sampleTime:500},trueWindSpeed:{description:"True Wind Speed",path:"self.environment.wind.speedTrue",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"m/s",convertUnitTo:"knots",sampleTime:500},courseOverGround:{description:"True Course Over Ground",path:"self.navigation.courseOverGroundTrue",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,convertUnitTo:"deg",sampleTime:500},nextWaypointBearing:{description:"Next Waypoint True Bearing",path:"self.navigation.courseGreatCircle.nextPoint.bearingTrue",source:"default",pathType:"number",isPathConfigurable:!1,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",showConvertUnitTo:!1,sampleTime:500},set:{description:"True Drift Set",path:"self.environment.current.setTrue",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",showConvertUnitTo:!1,sampleTime:500},drift:{description:"Drift Speed Impact",path:"self.environment.current.drift",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"m/s",convertUnitTo:"knots",sampleTime:500}},windSectorEnable:!0,windSectorWindowSeconds:5,laylineEnable:!0,laylineAngle:40,waypointEnable:!0,courseOverGroundEnable:!0,driftEnable:!0,awsEnable:!0,twsEnable:!0,sailSetupEnable:!1,enableTimeout:!1,dataTimeout:5}}},x:3,y:0},{w:4,h:6,id:"24406c15-7738-4dc1-a206-7a4862c2931d",selector:"widget-gauge-ng-radial",input:{widgetProperties:{type:"widget-gauge-ng-radial",uuid:"24406c15-7738-4dc1-a206-7a4862c2931d",config:{displayName:"SOG",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.navigation.speedOverGround",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,convertUnitTo:"knots",sampleTime:500}},displayScale:{lower:0,upper:10,type:"linear"},gauge:{type:"ngRadial",subType:"measuring",enableTicks:!0,compassUseNumbers:!1,highlightsWidth:5,scaleStart:180},numInt:1,numDecimal:1,enableTimeout:!1,color:"yellow",dataTimeout:5,ignoreZones:!1}}},x:8,y:0},{w:3,h:4,id:"c6bcaa53-afa1-42c7-ad92-d5f7dba14734",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"c6bcaa53-afa1-42c7-ad92-d5f7dba14734",config:{displayName:"STW",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.navigation.speedThroughWater",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"knots",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!0,showMin:!0,numDecimal:1,showMiniChart:!1,yScaleMin:0,yScaleMax:10,inverseYAxis:!1,verticalChart:!1,color:"contrast",enableTimeout:!1,dataTimeout:5,ignoreZones:!1}}},x:0,y:4},{w:4,h:6,id:"973c8804-be09-4923-bb5d-48c13b65db69",selector:"widget-data-chart",input:{widgetProperties:{type:"widget-data-chart",uuid:"973c8804-be09-4923-bb5d-48c13b65db69",config:{displayName:"Chart Label",filterSelfPaths:!0,convertUnitTo:"knots",datasetUUID:"afbe4e41-26f5-404f-a55d-9f7b9b76fbd1",inverseYAxis:!1,datasetAverageArray:"sma",showAverageData:!0,trackAgainstAverage:!1,showDatasetMinimumValueLine:!1,showDatasetMaximumValueLine:!1,showDatasetAverageValueLine:!0,showDatasetAngleAverageValueLine:!1,showLabel:!1,showTimeScale:!0,startScaleAtZero:!1,verticalChart:!1,showYScale:!0,yScaleSuggestedMin:null,yScaleSuggestedMax:null,enableMinMaxScaleLimit:!1,yScaleMin:null,yScaleMax:null,numDecimal:1,color:"orange",invertData:!1,verticalGraph:!1}}},x:8,y:6},{x:0,y:8,w:3,h:4,minW:1,minH:1,id:"5289a84d-18fd-4ee7-9724-72249af403f2",selector:"widget-position",input:{widgetProperties:{type:"widget-position",uuid:"5289a84d-18fd-4ee7-9724-72249af403f2",config:{displayName:"Position",filterSelfPaths:!0,paths:{longPath:{description:"Longitude",path:"self.navigation.position.longitude",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"longitudeMin",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500},latPath:{description:"Latitude",path:"self.navigation.position.latitude",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"latitudeMin",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},color:"grey",enableTimeout:!1,dataTimeout:5}}}},{w:5,h:2,id:"1a7a3f79-2eb4-4092-a0c3-9a61db8a8586",selector:"widget-simple-linear",input:{widgetProperties:{type:"widget-simple-linear",uuid:"1a7a3f79-2eb4-4092-a0c3-9a61db8a8586",config:{displayName:"House Bank",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.electrical.batteries.1.voltage",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!0,pathSkUnitsFilter:"V",convertUnitTo:"V",sampleTime:500}},displayScale:{lower:0,upper:15,type:"linear"},gauge:{type:"simpleLinear",unitLabelFormat:"full"},numInt:1,numDecimal:2,ignoreZones:!1,color:"green",enableTimeout:!1,dataTimeout:5}}},x:3,y:10}]},{id:"7c67c8c5-dc55-4e1d-9fc5-3dd95fd41bea",name:"Charting",configuration:[{x:0,y:0,w:8,h:12,id:"488d620a-37d4-4b98-849d-304cd18003e9",selector:"widget-freeboardsk",input:{widgetProperties:{type:"widget-freeboardsk",uuid:"488d620a-37d4-4b98-849d-304cd18003e9"}}},{x:8,y:0,w:2,h:3,id:"26a2a150-5af8-4f1d-aaab-0cb2a406fc17",selector:"widget-gauge-ng-compass",input:{widgetProperties:{type:"widget-gauge-ng-compass",uuid:"26a2a150-5af8-4f1d-aaab-0cb2a406fc17",config:{displayName:"COG (T)",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.navigation.courseOverGroundTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,convertUnitTo:"deg",sampleTime:500}},gauge:{type:"ngRadial",subType:"marineCompass",enableTicks:!0,compassUseNumbers:!0,showValueBox:!1},enableTimeout:!1,color:"purple",dataTimeout:5}}}},{x:10,y:0,w:2,h:3,id:"caf9ca47-fcf6-4736-a314-2b5210edaf03",selector:"widget-datetime",input:{widgetProperties:{type:"widget-datetime",uuid:"caf9ca47-fcf6-4736-a314-2b5210edaf03",config:{displayName:"Next WP Arrival",filterSelfPaths:!0,paths:{gaugePath:{description:"String Data",path:"self.navigation.datetime",source:"default",pathType:"Date",isPathConfigurable:!0,sampleTime:500}},dateFormat:"dd/MM HH:mm",dateTimezone:"America/Toronto",color:"contrast",enableTimeout:!1,dataTimeout:5}}}},{x:8,y:3,w:4,h:9,id:"daa21350-009e-4d99-8209-364f9b99caee",selector:"widget-autopilot",input:{widgetProperties:{type:"widget-autopilot",uuid:"daa21350-009e-4d99-8209-364f9b99caee",config:{filterSelfPaths:!0,paths:{autopilotState:{description:"Autopilot State",path:"self.steering.autopilot.state",source:"default",pathType:"string",isPathConfigurable:!1,showPathSkUnitsFilter:!1,convertUnitTo:"",sampleTime:500},autopilotTargetHeading:{description:"Autopilot Target Magnetic Heading",path:"self.steering.autopilot.target.headingMagnetic",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},autopilotTargetWindHeading:{description:"Autopilot Target Apparent Wind Angle",path:"self.steering.autopilot.target.windAngleApparent",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},rudderAngle:{description:"Rudder Angle",path:"self.steering.rudderAngle",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},courseXte:{description:"Cross Track Error",path:"self.navigation.course.calcValues.crossTrackError",source:"default",pathType:"number",isPathConfigurable:!1,convertUnitTo:"m",showPathSkUnitsFilter:!0,pathRequired:!1,pathSkUnitsFilter:"m",sampleTime:500},headingMag:{description:"Magnetic Heading",path:"self.navigation.headingMagnetic",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,sampleTime:500},headingTrue:{description:"True Heading",path:"self.navigation.headingTrue",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,sampleTime:500},windAngleApparent:{description:"Apparent Wind Angle",path:"self.environment.wind.angleApparent",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,sampleTime:500},windAngleTrueWater:{description:"Wind Angle True Water",path:"self.environment.wind.angleTrueWater",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,sampleTime:500}},invertRudder:!0,headingDirectionTrue:!1,courseDirectionTrue:!1,enableTimeout:!1,dataTimeout:5,autopilotInstance:"_default"}}}}]}],rr={themeName:""};var Dp={configVersion:11,kipUUID:De.create(),signalKUrl:"https://demo.signalk.org",proxyEnabled:!1,signalKSubscribeAll:!1,useDeviceToken:!1,loginName:null,loginPassword:null,useSharedConfig:!1,sharedConfigName:"default"};var js="",$s=11,Tt=11,Np=(()=>{class t{storage=d(So);unitDefaults=new b({});themeName=new b(js);kipKNotificationConfig=new b(wt);autoNightMode=new b(!1);redNightMode=new b(!1);nightModeBrightness=new b(1);proxyEnabled=!1;signalKSubscribeAll=!1;useDeviceToken=!1;loginName;loginPassword;useSharedConfig;sharedConfigName;activeConfig={app:null,theme:null,dashboards:null};kipUUID;signalkUrl;widgets;_dashboards=[];dataSets=[];configUpgrade=ne(!1);constructor(){if(console.log("[AppSettings Service] Service startup..."),this.storage.activeConfigFileVersion=$s,!window.localStorage)console.error(`[AppSettings Service] LocalStorage NOT SUPPORTED by browser
|
|
2
|
+
This is a requirement to run Kip. See browser documentation to enable this feature.`);else{this.loadConnectionConfig();let e;if(this.storage.initConfig===null&&this.useSharedConfig&&this.loginName!==null&&this.loginPassword!==null&&this.signalkUrl.url!==null?this.resetSettings():e=this.storage.initConfig,e)console.log("[AppSettings Service] Remote configuration storage enabled"),this.checkConfigUpgradeRequired(!1),this.activeConfig=e,this.pushSettings();else{console.log("[AppSettings Service] LocalStorage enabled");let r={app:null,theme:null,dashboards:null};r.app=this.loadConfigFromLocalStorage("appConfig"),r.app.configVersion!==Tt&&this.checkConfigUpgradeRequired(!0),r.dashboards=this.loadConfigFromLocalStorage("dashboardsConfig"),r.theme=this.loadConfigFromLocalStorage("themeConfig"),this.activeConfig=r,this.pushSettings()}}}loadConnectionConfig(){let e=this.loadConfigFromLocalStorage("connectionConfig");switch(e.configVersion){case 11:break;default:console.error(`[AppSettings Service] Invalid connectionConfig version ${e.configVersion}. Resetting and loading connection configuration default`),this.resetConnection();break}this.signalkUrl={url:e.signalKUrl,new:!1},this.proxyEnabled=e.proxyEnabled,this.signalKSubscribeAll=e.signalKSubscribeAll,this.useDeviceToken=e.useDeviceToken,this.loginName=e.loginName,this.loginPassword=e.loginPassword,this.useSharedConfig=e.useSharedConfig,this.sharedConfigName=e.sharedConfigName,this.kipUUID=e.kipUUID}resetConnection(){localStorage.setItem("connectionConfig",JSON.stringify(this.getDefaultConnectionConfig())),this.reloadApp()}checkConfigUpgradeRequired(e){e?this.configUpgrade.set(!0):this.storage.listConfigs(9).then(r=>W(this,null,function*(){for(let o of r)try{if((yield this.storage.getConfig(o.scope,o.name,9)).app?.configVersion===10){this.configUpgrade.set(!0),console.log("[AppSettings Service] Configuration upgrade required for version 10.");break}}catch(n){console.error(`[AppSettings Service] Error fetching configuration for ${o.name}:`,n)}})).catch(r=>{console.error("[AppSettings Service] Error fetching configuration data:",r)})}loadConfigFromLocalStorage(e){let r=JSON.parse(localStorage.getItem(e));if(r===null)switch(console.log(`[AppSettings Service] Error loading ${e} config. Force loading ${e} defaults`),e){case"appConfig":r=this.getDefaultAppConfig();break;case"connectionConfig":r=this.getDefaultConnectionConfig();break;case"dashboardsConfig":r=this.getDefaultDashboardsConfig();break;case"themeConfig":r=this.getDefaultThemeConfig();break;default:console.error(`[AppSettings Service] Invalid ${e} default config requested`);break}if(e==="connectionConfig"&&r.configVersion!==Tt)switch(console.log(`[AppSettings Service] Invalid ${e} version. Force loading defaults`),e){case"connectionConfig":r=this.getDefaultConnectionConfig();break}return r}pushSettings(){this.themeName.next(this.activeConfig.theme.themeName),this.dataSets=this.activeConfig.app.dataSets,this.unitDefaults.next(this.activeConfig.app.unitDefaults),this.kipKNotificationConfig.next(this.activeConfig.app.notificationConfig),this.activeConfig.app.autoNightMode===void 0?this.setAutoNightMode(!1):this.autoNightMode.next(this.activeConfig.app.autoNightMode),this.activeConfig.app.redNightMode===void 0?this.setRedNightMode(!1):this.redNightMode.next(this.activeConfig.app.redNightMode),this.activeConfig.app.nightModeBrightness===void 0?this.setNightModeBrightness(.2):this.nightModeBrightness.next(this.activeConfig.app.nightModeBrightness),this.activeConfig.dashboards===void 0?this._dashboards=[]:this._dashboards=this.activeConfig.dashboards}getDefaultUnitsAsO(){return this.unitDefaults.asObservable()}getDefaultUnits(){return this.unitDefaults.getValue()}setDefaultUnits(e){this.unitDefaults.next(e),this.useSharedConfig?this.storage.patchConfig("Array<IUnitDefaults>",e):this.saveAppConfigToLocalStorage()}getAppConfig(){return this.buildAppStorageObject()}getConnectionConfig(){return this.buildConnectionStorageObject()}setConnectionConfig(e){this.loginName=e.loginName,this.loginPassword=e.loginPassword,this.useSharedConfig=e.useSharedConfig,this.proxyEnabled=e.proxyEnabled,this.signalKSubscribeAll=e.signalKSubscribeAll,this.signalkUrl.url=e.signalKUrl,e.useSharedConfig?this.useDeviceToken=!1:this.useDeviceToken=!0,this.saveConnectionConfigToLocalStorage()}setUseDeviceToken(e){this.useDeviceToken=e,this.saveConnectionConfigToLocalStorage()}getDashboardConfig(){return this.buildDashboardStorageObject()}getThemeConfig(){return this.buildThemeStorageObject()}get KipUUID(){return this.kipUUID}getThemeNameAsO(){return this.themeName.asObservable()}setThemeName(e){if(this.themeName.next(e),this.useSharedConfig){let r={themeName:e};this.storage.patchConfig("IThemeConfig",r)}else this.saveThemeConfigToLocalStorage()}getThemeName(){return this.themeName.getValue()}getAutoNightModeAsO(){return this.autoNightMode.asObservable()}setAutoNightMode(e){this.autoNightMode.next(e);let r=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",r):this.saveAppConfigToLocalStorage()}getAutoNightMode(){return this.autoNightMode.getValue()}getRedNightModeAsO(){return this.redNightMode.asObservable()}getRedNightMode(){return this.redNightMode.getValue()}setRedNightMode(e){this.redNightMode.next(e);let r=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",r):this.saveAppConfigToLocalStorage()}getNightModeBrightness(){return this.nightModeBrightness.getValue()}setNightModeBrightness(e){this.nightModeBrightness.next(e);let r=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",r):this.saveAppConfigToLocalStorage()}getWidgets(){return this.widgets}saveDashboards(e){this.useSharedConfig?this.storage.storageServiceReady$.getValue()&&this.storage.patchConfig("Dashboards",e):this.saveLDashboardsConfigToLocalStorage(e),this._dashboards=e}saveDataSets(e){this.dataSets=e,this.useSharedConfig?this.storage.patchConfig("Array<IDatasetDef>",e):this.saveAppConfigToLocalStorage()}getDataSets(){return this.dataSets}getNotificationServiceConfigAsO(){return this.kipKNotificationConfig.asObservable()}getNotificationConfig(){return this.kipKNotificationConfig.getValue()}setNotificationConfig(e){this.kipKNotificationConfig.next(e),this.useSharedConfig?this.storage.patchConfig("INotificationConfig",e):this.saveAppConfigToLocalStorage()}resetSettings(){let e={app:null,theme:null,dashboards:null};e.app=this.getDefaultAppConfig(),e.theme=this.getDefaultThemeConfig(),e.dashboards=this.getDefaultDashboardsConfig(),this.useSharedConfig?this.storage.storageServiceReady$.getValue()&&this.storage.setConfig("user",this.sharedConfigName,e).then(()=>{console.log("[AppSettings Service] Replaced server config name: "+this.sharedConfigName+", with default configuration values"),this.reloadApp()}).catch(r=>{console.error("[AppSettings Service] Error replacing server config name: "+this.sharedConfigName+", with default configuration values",r)}):this.reloadApp()}replaceConfig(e,r,o){let n=JSON.stringify(r);localStorage.setItem(e,n),o&&this.reloadApp()}loadDemoConfig(){if(this.useSharedConfig){let e={app:tr,dashboards:ir,theme:rr};console.log("[AppSettings Service] Loading Demo configuration settings as remote config: "+this.useSharedConfig+" and reloading app."),this.storage.setConfig("user",this.sharedConfigName,e),this.reloadApp()}else console.log("[AppSettings Service] Loading Demo configuration settings to LocalStorage"),this.replaceConfig("appConfig",tr),this.replaceConfig("dashboardsConfig",ir),this.replaceConfig("themeConfig",rr,!0)}reloadApp(){console.log("[AppSettings Service] Reload app"),location.replace("./")}buildAppStorageObject(){return{configVersion:Tt,autoNightMode:this.autoNightMode.getValue(),redNightMode:this.redNightMode.getValue(),nightModeBrightness:this.nightModeBrightness.getValue(),dataSets:this.dataSets,unitDefaults:this.unitDefaults.getValue(),notificationConfig:this.kipKNotificationConfig.getValue()}}buildConnectionStorageObject(){return{configVersion:Tt,kipUUID:this.kipUUID,signalKUrl:this.signalkUrl.url,proxyEnabled:this.proxyEnabled,signalKSubscribeAll:this.signalKSubscribeAll,useDeviceToken:this.useDeviceToken,loginName:this.loginName,loginPassword:this.loginPassword,useSharedConfig:this.useSharedConfig,sharedConfigName:this.sharedConfigName}}buildDashboardStorageObject(){return this._dashboards}buildThemeStorageObject(){return{themeName:this.themeName.getValue()}}saveAppConfigToLocalStorage(){console.log("[AppSettings Service] Saving Application config to LocalStorage"),localStorage.setItem("appConfig",JSON.stringify(this.buildAppStorageObject()))}saveConnectionConfigToLocalStorage(){console.log("[AppSettings Service] Saving Connection config to LocalStorage"),localStorage.setItem("connectionConfig",JSON.stringify(this.buildConnectionStorageObject()))}saveLDashboardsConfigToLocalStorage(e){console.log("[AppSettings Service] Saving Dashboard config to LocalStorage"),localStorage.setItem("dashboardsConfig",JSON.stringify(e))}saveThemeConfigToLocalStorage(){console.log("[AppSettings Service] Saving Theme config to LocalStorage"),localStorage.setItem("themeConfig",JSON.stringify(this.buildThemeStorageObject()))}getDefaultAppConfig(){let e=Co;return e.notificationConfig=wt,e.unitDefaults=Qt,e.configVersion=Tt,localStorage.setItem("appConfig",JSON.stringify(e)),e}getDefaultConnectionConfig(){let e=To;return e.kipUUID=De.create(),e.signalKUrl=window.location.origin,localStorage.setItem("connectionConfig",JSON.stringify(e)),e}getDefaultDashboardsConfig(){let e=[];return localStorage.setItem("dashboardsConfig",JSON.stringify(e)),e}getDefaultThemeConfig(){let e=wo;return localStorage.setItem("themeConfig",JSON.stringify(e)),e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ws(){this.__data__=[],this.size=0}var Do=Ws;function Hs(t,i){return t===i||t!==t&&i!==i}var fe=Hs;function Bs(t,i){for(var e=t.length;e--;)if(fe(t[e][0],i))return e;return-1}var Ae=Bs;var zs=Array.prototype,Gs=zs.splice;function qs(t){var i=this.__data__,e=Ae(i,t);if(e<0)return!1;var r=i.length-1;return e==r?i.pop():Gs.call(i,e,1),--this.size,!0}var Ao=qs;function Ks(t){var i=this.__data__,e=Ae(i,t);return e<0?void 0:i[e][1]}var Mo=Ks;function Qs(t){return Ae(this.__data__,t)>-1}var Eo=Qs;function Zs(t,i){var e=this.__data__,r=Ae(e,t);return r<0?(++this.size,e.push([t,i])):e[r][1]=i,this}var ko=Zs;function Ze(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var r=t[i];this.set(r[0],r[1])}}Ze.prototype.clear=Do;Ze.prototype.delete=Ao;Ze.prototype.get=Mo;Ze.prototype.has=Eo;Ze.prototype.set=ko;var Me=Ze;function Js(){this.__data__=new Me,this.size=0}var Fo=Js;function Ys(t){var i=this.__data__,e=i.delete(t);return this.size=i.size,e}var Oo=Ys;function Xs(t){return this.__data__.get(t)}var Io=Xs;function el(t){return this.__data__.has(t)}var Ro=el;var tl=typeof global=="object"&&global&&global.Object===Object&&global,Zt=tl;var il=typeof self=="object"&&self&&self.Object===Object&&self,rl=Zt||il||Function("return this")(),T=rl;var ol=T.Symbol,Z=ol;var Vo=Object.prototype,nl=Vo.hasOwnProperty,al=Vo.toString,Dt=Z?Z.toStringTag:void 0;function sl(t){var i=nl.call(t,Dt),e=t[Dt];try{t[Dt]=void 0;var r=!0}catch{}var o=al.call(t);return r&&(i?t[Dt]=e:delete t[Dt]),o}var Po=sl;var ll=Object.prototype,dl=ll.toString;function cl(t){return dl.call(t)}var No=cl;var fl="[object Null]",ul="[object Undefined]",Uo=Z?Z.toStringTag:void 0;function ml(t){return t==null?t===void 0?ul:fl:Uo&&Uo in Object(t)?Po(t):No(t)}var te=ml;function hl(t){var i=typeof t;return t!=null&&(i=="object"||i=="function")}var O=hl;var pl="[object AsyncFunction]",gl="[object Function]",vl="[object GeneratorFunction]",_l="[object Proxy]";function bl(t){if(!O(t))return!1;var i=te(t);return i==gl||i==vl||i==pl||i==_l}var Je=bl;var yl=T["__core-js_shared__"],Jt=yl;var Lo=function(){var t=/[^.]+$/.exec(Jt&&Jt.keys&&Jt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function xl(t){return!!Lo&&Lo in t}var jo=xl;var Sl=Function.prototype,Cl=Sl.toString;function wl(t){if(t!=null){try{return Cl.call(t)}catch{}try{return t+""}catch{}}return""}var ve=wl;var Tl=/[\\^$.*+?()[\]{}|]/g,Dl=/^\[object .+?Constructor\]$/,Al=Function.prototype,Ml=Object.prototype,El=Al.toString,kl=Ml.hasOwnProperty,Fl=RegExp("^"+El.call(kl).replace(Tl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ol(t){if(!O(t)||jo(t))return!1;var i=Je(t)?Fl:Dl;return i.test(ve(t))}var $o=Ol;function Il(t,i){return t?.[i]}var Wo=Il;function Rl(t,i){var e=Wo(t,i);return $o(e)?e:void 0}var j=Rl;var Vl=j(T,"Map"),Ee=Vl;var Pl=j(Object,"create"),_e=Pl;function Nl(){this.__data__=_e?_e(null):{},this.size=0}var Ho=Nl;function Ul(t){var i=this.has(t)&&delete this.__data__[t];return this.size-=i?1:0,i}var Bo=Ul;var Ll="__lodash_hash_undefined__",jl=Object.prototype,$l=jl.hasOwnProperty;function Wl(t){var i=this.__data__;if(_e){var e=i[t];return e===Ll?void 0:e}return $l.call(i,t)?i[t]:void 0}var zo=Wl;var Hl=Object.prototype,Bl=Hl.hasOwnProperty;function zl(t){var i=this.__data__;return _e?i[t]!==void 0:Bl.call(i,t)}var Go=zl;var Gl="__lodash_hash_undefined__";function ql(t,i){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=_e&&i===void 0?Gl:i,this}var qo=ql;function Ye(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var r=t[i];this.set(r[0],r[1])}}Ye.prototype.clear=Ho;Ye.prototype.delete=Bo;Ye.prototype.get=zo;Ye.prototype.has=Go;Ye.prototype.set=qo;var or=Ye;function Kl(){this.size=0,this.__data__={hash:new or,map:new(Ee||Me),string:new or}}var Ko=Kl;function Ql(t){var i=typeof t;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?t!=="__proto__":t===null}var Qo=Ql;function Zl(t,i){var e=t.__data__;return Qo(i)?e[typeof i=="string"?"string":"hash"]:e.map}var ke=Zl;function Jl(t){var i=ke(this,t).delete(t);return this.size-=i?1:0,i}var Zo=Jl;function Yl(t){return ke(this,t).get(t)}var Jo=Yl;function Xl(t){return ke(this,t).has(t)}var Yo=Xl;function ed(t,i){var e=ke(this,t),r=e.size;return e.set(t,i),this.size+=e.size==r?0:1,this}var Xo=ed;function Xe(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var r=t[i];this.set(r[0],r[1])}}Xe.prototype.clear=Ko;Xe.prototype.delete=Zo;Xe.prototype.get=Jo;Xe.prototype.has=Yo;Xe.prototype.set=Xo;var Yt=Xe;var td=200;function id(t,i){var e=this.__data__;if(e instanceof Me){var r=e.__data__;if(!Ee||r.length<td-1)return r.push([t,i]),this.size=++e.size,this;e=this.__data__=new Yt(r)}return e.set(t,i),this.size=e.size,this}var en=id;function et(t){var i=this.__data__=new Me(t);this.size=i.size}et.prototype.clear=Fo;et.prototype.delete=Oo;et.prototype.get=Io;et.prototype.has=Ro;et.prototype.set=en;var Fe=et;function rd(t,i){for(var e=-1,r=t==null?0:t.length;++e<r&&i(t[e],e,t)!==!1;);return t}var tn=rd;var od=function(){try{var t=j(Object,"defineProperty");return t({},"",{}),t}catch{}}(),tt=od;function nd(t,i,e){i=="__proto__"&&tt?tt(t,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[i]=e}var it=nd;var ad=Object.prototype,sd=ad.hasOwnProperty;function ld(t,i,e){var r=t[i];(!(sd.call(t,i)&&fe(r,e))||e===void 0&&!(i in t))&&it(t,i,e)}var Xt=ld;function dd(t,i,e,r){var o=!e;e||(e={});for(var n=-1,a=i.length;++n<a;){var s=i[n],l=r?r(e[s],t[s],s,e,t):void 0;l===void 0&&(l=t[s]),o?it(e,s,l):Xt(e,s,l)}return e}var ue=dd;function cd(t,i){for(var e=-1,r=Array(t);++e<t;)r[e]=i(e);return r}var rn=cd;function fd(t){return t!=null&&typeof t=="object"}var k=fd;var ud="[object Arguments]";function md(t){return k(t)&&te(t)==ud}var nr=md;var on=Object.prototype,hd=on.hasOwnProperty,pd=on.propertyIsEnumerable,gd=nr(function(){return arguments}())?nr:function(t){return k(t)&&hd.call(t,"callee")&&!pd.call(t,"callee")},At=gd;var vd=Array.isArray,J=vd;function _d(){return!1}var nn=_d;var ln=typeof exports=="object"&&exports&&!exports.nodeType&&exports,an=ln&&typeof module=="object"&&module&&!module.nodeType&&module,bd=an&&an.exports===ln,sn=bd?T.Buffer:void 0,yd=sn?sn.isBuffer:void 0,xd=yd||nn,be=xd;var Sd=9007199254740991,Cd=/^(?:0|[1-9]\d*)$/;function wd(t,i){var e=typeof t;return i=i??Sd,!!i&&(e=="number"||e!="symbol"&&Cd.test(t))&&t>-1&&t%1==0&&t<i}var ei=wd;var Td=9007199254740991;function Dd(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Td}var ti=Dd;var Ad="[object Arguments]",Md="[object Array]",Ed="[object Boolean]",kd="[object Date]",Fd="[object Error]",Od="[object Function]",Id="[object Map]",Rd="[object Number]",Vd="[object Object]",Pd="[object RegExp]",Nd="[object Set]",Ud="[object String]",Ld="[object WeakMap]",jd="[object ArrayBuffer]",$d="[object DataView]",Wd="[object Float32Array]",Hd="[object Float64Array]",Bd="[object Int8Array]",zd="[object Int16Array]",Gd="[object Int32Array]",qd="[object Uint8Array]",Kd="[object Uint8ClampedArray]",Qd="[object Uint16Array]",Zd="[object Uint32Array]",S={};S[Wd]=S[Hd]=S[Bd]=S[zd]=S[Gd]=S[qd]=S[Kd]=S[Qd]=S[Zd]=!0;S[Ad]=S[Md]=S[jd]=S[Ed]=S[$d]=S[kd]=S[Fd]=S[Od]=S[Id]=S[Rd]=S[Vd]=S[Pd]=S[Nd]=S[Ud]=S[Ld]=!1;function Jd(t){return k(t)&&ti(t.length)&&!!S[te(t)]}var dn=Jd;function Yd(t){return function(i){return t(i)}}var rt=Yd;var cn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Mt=cn&&typeof module=="object"&&module&&!module.nodeType&&module,Xd=Mt&&Mt.exports===cn,ar=Xd&&Zt.process,ec=function(){try{var t=Mt&&Mt.require&&Mt.require("util").types;return t||ar&&ar.binding&&ar.binding("util")}catch{}}(),ye=ec;var fn=ye&&ye.isTypedArray,tc=fn?rt(fn):dn,ot=tc;var ic=Object.prototype,rc=ic.hasOwnProperty;function oc(t,i){var e=J(t),r=!e&&At(t),o=!e&&!r&&be(t),n=!e&&!r&&!o&&ot(t),a=e||r||o||n,s=a?rn(t.length,String):[],l=s.length;for(var c in t)(i||rc.call(t,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||n&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ei(c,l)))&&s.push(c);return s}var ii=oc;var nc=Object.prototype;function ac(t){var i=t&&t.constructor,e=typeof i=="function"&&i.prototype||nc;return t===e}var nt=ac;function sc(t,i){return function(e){return t(i(e))}}var ri=sc;var lc=ri(Object.keys,Object),un=lc;var dc=Object.prototype,cc=dc.hasOwnProperty;function fc(t){if(!nt(t))return un(t);var i=[];for(var e in Object(t))cc.call(t,e)&&e!="constructor"&&i.push(e);return i}var mn=fc;function uc(t){return t!=null&&ti(t.length)&&!Je(t)}var Oe=uc;function mc(t){return Oe(t)?ii(t):mn(t)}var at=mc;function hc(t,i){return t&&ue(i,at(i),t)}var hn=hc;function pc(t){var i=[];if(t!=null)for(var e in Object(t))i.push(e);return i}var pn=pc;var gc=Object.prototype,vc=gc.hasOwnProperty;function _c(t){if(!O(t))return pn(t);var i=nt(t),e=[];for(var r in t)r=="constructor"&&(i||!vc.call(t,r))||e.push(r);return e}var gn=_c;function bc(t){return Oe(t)?ii(t,!0):gn(t)}var me=bc;function yc(t,i){return t&&ue(i,me(i),t)}var vn=yc;var xn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_n=xn&&typeof module=="object"&&module&&!module.nodeType&&module,xc=_n&&_n.exports===xn,bn=xc?T.Buffer:void 0,yn=bn?bn.allocUnsafe:void 0;function Sc(t,i){if(i)return t.slice();var e=t.length,r=yn?yn(e):new t.constructor(e);return t.copy(r),r}var oi=Sc;function Cc(t,i){var e=-1,r=t.length;for(i||(i=Array(r));++e<r;)i[e]=t[e];return i}var ni=Cc;function wc(t,i){for(var e=-1,r=t==null?0:t.length,o=0,n=[];++e<r;){var a=t[e];i(a,e,t)&&(n[o++]=a)}return n}var Sn=wc;function Tc(){return[]}var ai=Tc;var Dc=Object.prototype,Ac=Dc.propertyIsEnumerable,Cn=Object.getOwnPropertySymbols,Mc=Cn?function(t){return t==null?[]:(t=Object(t),Sn(Cn(t),function(i){return Ac.call(t,i)}))}:ai,st=Mc;function Ec(t,i){return ue(t,st(t),i)}var wn=Ec;function kc(t,i){for(var e=-1,r=i.length,o=t.length;++e<r;)t[o+e]=i[e];return t}var si=kc;var Fc=ri(Object.getPrototypeOf,Object),lt=Fc;var Oc=Object.getOwnPropertySymbols,Ic=Oc?function(t){for(var i=[];t;)si(i,st(t)),t=lt(t);return i}:ai,li=Ic;function Rc(t,i){return ue(t,li(t),i)}var Tn=Rc;function Vc(t,i,e){var r=i(t);return J(t)?r:si(r,e(t))}var di=Vc;function Pc(t){return di(t,at,st)}var Et=Pc;function Nc(t){return di(t,me,li)}var Dn=Nc;var Uc=j(T,"DataView"),ci=Uc;var Lc=j(T,"Promise"),fi=Lc;var jc=j(T,"Set"),ui=jc;var $c=j(T,"WeakMap"),mi=$c;var An="[object Map]",Wc="[object Object]",Mn="[object Promise]",En="[object Set]",kn="[object WeakMap]",Fn="[object DataView]",Hc=ve(ci),Bc=ve(Ee),zc=ve(fi),Gc=ve(ui),qc=ve(mi),Ve=te;(ci&&Ve(new ci(new ArrayBuffer(1)))!=Fn||Ee&&Ve(new Ee)!=An||fi&&Ve(fi.resolve())!=Mn||ui&&Ve(new ui)!=En||mi&&Ve(new mi)!=kn)&&(Ve=function(t){var i=te(t),e=i==Wc?t.constructor:void 0,r=e?ve(e):"";if(r)switch(r){case Hc:return Fn;case Bc:return An;case zc:return Mn;case Gc:return En;case qc:return kn}return i});var xe=Ve;var Kc=Object.prototype,Qc=Kc.hasOwnProperty;function Zc(t){var i=t.length,e=new t.constructor(i);return i&&typeof t[0]=="string"&&Qc.call(t,"index")&&(e.index=t.index,e.input=t.input),e}var On=Zc;var Jc=T.Uint8Array,dt=Jc;function Yc(t){var i=new t.constructor(t.byteLength);return new dt(i).set(new dt(t)),i}var ct=Yc;function Xc(t,i){var e=i?ct(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}var In=Xc;var ef=/\w*$/;function tf(t){var i=new t.constructor(t.source,ef.exec(t));return i.lastIndex=t.lastIndex,i}var Rn=tf;var Vn=Z?Z.prototype:void 0,Pn=Vn?Vn.valueOf:void 0;function rf(t){return Pn?Object(Pn.call(t)):{}}var Nn=rf;function of(t,i){var e=i?ct(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}var hi=of;var nf="[object Boolean]",af="[object Date]",sf="[object Map]",lf="[object Number]",df="[object RegExp]",cf="[object Set]",ff="[object String]",uf="[object Symbol]",mf="[object ArrayBuffer]",hf="[object DataView]",pf="[object Float32Array]",gf="[object Float64Array]",vf="[object Int8Array]",_f="[object Int16Array]",bf="[object Int32Array]",yf="[object Uint8Array]",xf="[object Uint8ClampedArray]",Sf="[object Uint16Array]",Cf="[object Uint32Array]";function wf(t,i,e){var r=t.constructor;switch(i){case mf:return ct(t);case nf:case af:return new r(+t);case hf:return In(t,e);case pf:case gf:case vf:case _f:case bf:case yf:case xf:case Sf:case Cf:return hi(t,e);case sf:return new r;case lf:case ff:return new r(t);case df:return Rn(t);case cf:return new r;case uf:return Nn(t)}}var Un=wf;var Ln=Object.create,Tf=function(){function t(){}return function(i){if(!O(i))return{};if(Ln)return Ln(i);t.prototype=i;var e=new t;return t.prototype=void 0,e}}(),jn=Tf;function Df(t){return typeof t.constructor=="function"&&!nt(t)?jn(lt(t)):{}}var pi=Df;var Af="[object Map]";function Mf(t){return k(t)&&xe(t)==Af}var $n=Mf;var Wn=ye&&ye.isMap,Ef=Wn?rt(Wn):$n,Hn=Ef;var kf="[object Set]";function Ff(t){return k(t)&&xe(t)==kf}var Bn=Ff;var zn=ye&&ye.isSet,Of=zn?rt(zn):Bn,Gn=Of;var If=1,Rf=2,Vf=4,qn="[object Arguments]",Pf="[object Array]",Nf="[object Boolean]",Uf="[object Date]",Lf="[object Error]",Kn="[object Function]",jf="[object GeneratorFunction]",$f="[object Map]",Wf="[object Number]",Qn="[object Object]",Hf="[object RegExp]",Bf="[object Set]",zf="[object String]",Gf="[object Symbol]",qf="[object WeakMap]",Kf="[object ArrayBuffer]",Qf="[object DataView]",Zf="[object Float32Array]",Jf="[object Float64Array]",Yf="[object Int8Array]",Xf="[object Int16Array]",eu="[object Int32Array]",tu="[object Uint8Array]",iu="[object Uint8ClampedArray]",ru="[object Uint16Array]",ou="[object Uint32Array]",y={};y[qn]=y[Pf]=y[Kf]=y[Qf]=y[Nf]=y[Uf]=y[Zf]=y[Jf]=y[Yf]=y[Xf]=y[eu]=y[$f]=y[Wf]=y[Qn]=y[Hf]=y[Bf]=y[zf]=y[Gf]=y[tu]=y[iu]=y[ru]=y[ou]=!0;y[Lf]=y[Kn]=y[qf]=!1;function gi(t,i,e,r,o,n){var a,s=i&If,l=i&Rf,c=i&Vf;if(e&&(a=o?e(t,r,o,n):e(t)),a!==void 0)return a;if(!O(t))return t;var p=J(t);if(p){if(a=On(t),!s)return ni(t,a)}else{var m=xe(t),u=m==Kn||m==jf;if(be(t))return oi(t,s);if(m==Qn||m==qn||u&&!o){if(a=l||u?{}:pi(t),!s)return l?Tn(t,vn(a,t)):wn(t,hn(a,t))}else{if(!y[m])return o?t:{};a=Un(t,m,s)}}n||(n=new Fe);var x=n.get(t);if(x)return x;n.set(t,a),Gn(t)?t.forEach(function(D){a.add(gi(D,i,e,D,t,n))}):Hn(t)&&t.forEach(function(D,I){a.set(I,gi(D,i,e,I,t,n))});var v=c?l?Dn:Et:l?me:at,A=p?void 0:v(t);return tn(A||t,function(D,I){A&&(I=D,D=t[I]),Xt(a,I,gi(D,i,e,I,t,n))}),a}var Zn=gi;var nu=1,au=4;function su(t){return Zn(t,nu|au)}var sr=su;var lu={url:"",deserializer:t=>JSON.parse(t.data),serializer:t=>JSON.stringify(t)},du="WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }",vi=class t extends Ir{constructor(i,e){if(super(),this._socket=null,i instanceof vt)this.destination=e,this.source=i;else{let r=this._config=Object.assign({},lu);if(this._output=new _,typeof i=="string")r.url=i;else for(let o in i)i.hasOwnProperty(o)&&(r[o]=i[o]);if(!r.WebSocketCtor&&WebSocket)r.WebSocketCtor=WebSocket;else if(!r.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new Ue}}lift(i){let e=new t(this._config,this.destination);return e.operator=i,e.source=this,e}_resetState(){this._socket=null,this.source||(this.destination=new Ue),this._output=new _}multiplex(i,e,r){let o=this;return new vt(n=>{try{o.next(i())}catch(s){n.error(s)}let a=o.subscribe({next:s=>{try{r(s)&&n.next(s)}catch(l){n.error(l)}},error:s=>n.error(s),complete:()=>n.complete()});return()=>{try{o.next(e())}catch(s){n.error(s)}a.unsubscribe()}})}_connectSocket(){let{WebSocketCtor:i,protocol:e,url:r,binaryType:o}=this._config,n=this._output,a=null;try{a=e?new i(r,e):new i(r),this._socket=a,o&&(this._socket.binaryType=o)}catch(l){n.error(l);return}let s=new $t(()=>{this._socket=null,a&&a.readyState===1&&a.close()});a.onopen=l=>{let{_socket:c}=this;if(!c){a.close(),this._resetState();return}let{openObserver:p}=this._config;p&&p.next(l);let m=this.destination;this.destination=Or.create(u=>{if(a.readyState===1)try{let{serializer:x}=this._config;a.send(x(u))}catch(x){this.destination.error(x)}},u=>{let{closingObserver:x}=this._config;x&&x.next(void 0),u&&u.code?a.close(u.code,u.reason):n.error(new TypeError(du)),this._resetState()},()=>{let{closingObserver:u}=this._config;u&&u.next(void 0),a.close(),this._resetState()}),m&&m instanceof Ue&&s.add(m.subscribe(this.destination))},a.onerror=l=>{this._resetState(),n.error(l)},a.onclose=l=>{a===this._socket&&this._resetState();let{closeObserver:c}=this._config;c&&c.next(l),l.wasClean?n.complete():n.error(l)},a.onmessage=l=>{try{let{deserializer:c}=this._config;n.next(c(l))}catch(c){n.error(c)}}}_subscribe(i){let{source:e}=this;return e?e.subscribe(i):(this._socket||this._connectSocket(),this._output.subscribe(i),i.add(()=>{let{_socket:r}=this;this._output.observers.length===0&&(r&&(r.readyState===1||r.readyState===0)&&r.close(),this._resetState())}),i)}unsubscribe(){let{_socket:i}=this;i&&(i.readyState===1||i.readyState===0)&&i.close(),this._resetState(),super.unsubscribe()}};function lr(t){return new vi(t)}var Jn=(()=>{class t{_destroyRef=d(_t);_skRequests$=new _;_skNotificationsMsg$=new _;_skValue$=new _;_skMetadata$=new _;_vesselSelfUrn$=new _;_selfUrn=void 0;streamEndpoint={operation:0,message:"Not connected",hasToken:!1};streamEndpoint$=new b(this.streamEndpoint);endpointWS=null;SubscriptionType="self";WS_CONNECTION_SUBSCRIBE="?subscribe=";WS_CONNECTION_META="&sendMeta=all";socketWS$;socketWSCloseEvent$=new _;socketWSOpenEvent$=new _;authToken=null;server=d(Qe);auth=d(Kt);connectionStateMachine=d(qt);zones=d(H);FLATTEN_CONFIG={maxDepth:3,maxObjectSize:20,enableFlattening:!0};constructor(){this.connectionStateMachine.setWebSocketRetryCallback(()=>{console.log("[Delta Service] Executing WebSocket retry via callback"),this.retryWebSocketConnection()}),this.server.serverServiceEndpoint$.pipe(z(this._destroyRef)).subscribe(e=>{e.operation===2&&(this.endpointWS=e.WsServiceUrl,e.subscribeAll?this.SubscriptionType="all":this.SubscriptionType="self")}),this.connectionStateMachine.state$.pipe(z(this._destroyRef)).subscribe(e=>{switch(e){case f.WebSocketConnecting:this.handleWebSocketConnecting();break;case f.Connected:break;case f.Disconnected:case f.WebSocketError:case f.PermanentFailure:this.handleDisconnection();break}}),this.auth.authToken$.pipe(z(this._destroyRef)).subscribe(e=>{this.authToken!=e&&(this.authToken=e,this.socketWS$&&this.connectionStateMachine.isFullyConnected()&&(this.closeWS("Token changed"),this.connectionStateMachine.startWebSocketConnection()))}),this.socketWSOpenEvent$.pipe(z(this._destroyRef)).subscribe(()=>{this.streamEndpoint.message="Connected",this.streamEndpoint.operation=2,this.authToken?console.log("[Delta Service] WebSocket connected with Authorization Token"):console.log("[Delta Service] WebSocket connected without Authorization Token"),this.streamEndpoint$.next(this.streamEndpoint),this.connectionStateMachine.onWebSocketConnected()}),this.socketWSCloseEvent$.pipe(z(this._destroyRef)).subscribe(e=>{e.wasClean?(console.log("[Delta Service] WebSocket closed cleanly"),this.streamEndpoint.message="WebSocket closed",this.streamEndpoint.operation=0):(console.log("[Delta Service] WebSocket terminated due to socket error"),this.streamEndpoint.message="WebSocket error",this.streamEndpoint.operation=3,this.connectionStateMachine.onWebSocketError("WebSocket connection lost")),this.streamEndpoint$.next(this.streamEndpoint)}),Lr(document,"visibilitychange").pipe(z(this._destroyRef)).subscribe(()=>{document.visibilityState==="visible"?(console.log("[Delta Service] App resumed, checking WebSocket connection..."),this.checkAndReconnect("App resumed")):document.visibilityState==="hidden"&&console.log("[Delta Service] App suspended")})}connectWS(e){this.streamEndpoint.message="Connecting",this.streamEndpoint.operation=1,console.log(`[Delta Service] ${e}: WebSocket opening...`),this.streamEndpoint$.next(this.streamEndpoint),this.socketWS$=this.getNewWebSocket(),this.zones.runOutsideAngular(()=>{this.socketWS$.pipe(z(this._destroyRef)).subscribe({next:r=>this.processWebsocketMessage(r),error:r=>{console.error("[Delta Service] WebSocket error:",r)}})})}retryWebSocketConnection(){if(console.log("[Delta Service] Retrying WebSocket connection"),!this.endpointWS){console.warn("[Delta Service] No WebSocket endpoint available for retry"),this.connectionStateMachine.onWebSocketError("No WebSocket endpoint available");return}this.socketWS$&&this.closeWS("Retrying connection"),this.connectWS("WebSocket retry attempt")}handleWebSocketConnecting(){if(!this.endpointWS){console.warn("[Delta Service] No WebSocket endpoint available"),this.connectionStateMachine.onWebSocketError("No WebSocket endpoint available");return}this.socketWS$&&this.closeWS("Starting new connection"),this.connectWS("ConnectionStateMachine request")}handleDisconnection(){this.socketWS$&&this.closeWS("ConnectionStateMachine disconnection"),this.streamEndpoint.message="Not connected",this.streamEndpoint.operation=0,this.streamEndpoint$.next(this.streamEndpoint)}getNewWebSocket(){let e=this.WS_CONNECTION_SUBSCRIBE+this.SubscriptionType+this.WS_CONNECTION_META;return this.authToken!=null?(e+="&token="+this.authToken.token,this.streamEndpoint.hasToken=!0):this.streamEndpoint.hasToken=!1,lr({url:this.endpointWS+e,closeObserver:this.socketWSCloseEvent$,openObserver:this.socketWSOpenEvent$})}closeWS(e){this.socketWS$&&(this.streamEndpoint.operation=4,console.log("[Delta Service] "+e+": WebSocket closing..."),this.socketWS$.complete())}publishDelta(e){this.socketWS$?(console.log("[Delta Service] WebSocket sending message"),this.socketWS$.next(e)):console.log("[Delta Service] No WebSocket present to send message - dropping message")}processWebsocketMessage(e){if(e.updates){this.parseUpdates(e.updates,e.context);return}if(e.requestId){this._skRequests$.next(e);return}if(e.errorMessage){console.warn("[Delta Service] Service received stream error message: "+e.errorMessage);return}if(e.self){this._selfUrn=e.self,this._vesselSelfUrn$.next(e.self),this.server.setServerInfo(e.name,e.version,e.roles);return}console.warn("[Delta Service] Unknown message type. Message content:"+e)}parseUpdates(e,r){e.forEach(o=>{o.meta!==void 0&&o.meta.forEach(n=>this.parseSkMeta(n,r)),o.values!==void 0&&o.values.forEach(n=>{if(n.path.startsWith("notifications."))this._skNotificationsMsg$.next(n);else if(typeof n.value=="object"&&n.value!==null)this.FLATTEN_CONFIG.enableFlattening&&this.canFlattenCompletely(n.value,this.FLATTEN_CONFIG.maxDepth,this.FLATTEN_CONFIG.maxObjectSize)?this.flattenObjectValue(n.value,n.path).forEach(s=>{let l={context:r,path:s.path,source:o.$source,timestamp:o.timestamp,value:s.value};this._skValue$.next(l)}):Object.keys(n.value).forEach(a=>{let s={context:r,path:`${n.path}.${a}`,source:o.$source,timestamp:o.timestamp,value:n.value[a]};this._skValue$.next(s)});else{let a={context:r,path:n.path,source:o.$source,timestamp:o.timestamp,value:n.value};this._skValue$.next(a)}})})}canFlattenCompletely(e,r,o,n=0){if(n>=r)return!1;if(typeof e!="object"||e===null)return!0;let a=Object.keys(e);if(a.length>o)return!1;for(let s of a)if(!this.canFlattenCompletely(e[s],r,o,n+1))return!1;return!0}flattenObjectValue(e,r,o=0){let n=[];if(typeof e!="object"||e===null||o>=this.FLATTEN_CONFIG.maxDepth)return[{path:r,value:e}];let a=Object.keys(e);for(let s of a){let l=r?`${r}.${s}`:s,c=this.flattenObjectValue(e[s],l,o+1);n.push(...c)}return n}parseSkMeta(e,r){e.value.properties!==void 0?Object.keys(e.value.properties).forEach(o=>{this._skMetadata$.next({context:r,path:`${e.path}.${o}`,meta:e.value.properties[o]})}):this._skMetadata$.next({context:r,path:e.path,meta:e.value})}getDataStreamStatusAsO(){return this.streamEndpoint$.asObservable()}subscribeRequestUpdates(){return this._skRequests$.asObservable()}subscribeNotificationsUpdates(){return this._skNotificationsMsg$.asObservable()}subscribeDataPathsUpdates(){return this._skValue$.asObservable()}subscribeMetadataUpdates(){return this._skMetadata$.asObservable()}subscribeSelfUpdates(){return this._vesselSelfUrn$.asObservable()}checkAndReconnect(e){this.connectionStateMachine.isFullyConnected()?console.log(`[Delta Service] ${e}: Connection is active.`):this.connectionStateMachine.isHTTPConnected()&&this.connectionStateMachine.currentState!==f.WebSocketRetrying?(console.log(`[Delta Service] ${e}: WebSocket disconnected, requesting reconnection...`),this.connectionStateMachine.startWebSocketConnection()):console.log(`[Delta Service] ${e}: HTTP not connected, cannot start WebSocket`)}ngOnDestroy(){this.closeWS("App terminated"),this._skRequests$.complete(),this._skNotificationsMsg$.complete(),this._skValue$.complete(),this._skMetadata$.complete(),this._vesselSelfUrn$.complete(),this.streamEndpoint$.complete(),this.socketWSOpenEvent$.complete(),this.socketWSCloseEvent$.complete(),this.socketWS$?.complete()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function cu(t){return t}var _i=cu;function fu(t,i,e){switch(e.length){case 0:return t.call(i);case 1:return t.call(i,e[0]);case 2:return t.call(i,e[0],e[1]);case 3:return t.call(i,e[0],e[1],e[2])}return t.apply(i,e)}var Yn=fu;var uu=800,mu=16,hu=Date.now;function pu(t){var i=0,e=0;return function(){var r=hu(),o=mu-(r-e);if(e=r,o>0){if(++i>=uu)return arguments[0]}else i=0;return t.apply(void 0,arguments)}}var Xn=pu;function gu(t){return function(){return t}}var ea=gu;var vu=tt?function(t,i){return tt(t,"toString",{configurable:!0,enumerable:!1,value:ea(i),writable:!0})}:_i,ta=vu;var _u=Xn(ta),ia=_u;var ra=Math.max;function bu(t,i,e){return i=ra(i===void 0?t.length-1:i,0),function(){for(var r=arguments,o=-1,n=ra(r.length-i,0),a=Array(n);++o<n;)a[o]=r[i+o];o=-1;for(var s=Array(i+1);++o<i;)s[o]=r[o];return s[i]=e(a),Yn(t,this,s)}}var oa=bu;function yu(t,i){return ia(oa(t,i,_i),t+"")}var na=yu;function xu(t,i,e){if(!O(e))return!1;var r=typeof i;return(r=="number"?Oe(e)&&ei(i,e.length):r=="string"&&i in e)?fe(e[i],t):!1}var aa=xu;function Su(t){return na(function(i,e){var r=-1,o=e.length,n=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(n=t.length>3&&typeof n=="function"?(o--,n):void 0,a&&aa(e[0],e[1],a)&&(n=o<3?void 0:n,o=1),i=Object(i);++r<o;){var s=e[r];s&&t(i,s,r,n)}return i})}var sa=Su;var Cu="[object Object]",wu=Function.prototype,Tu=Object.prototype,la=wu.toString,Du=Tu.hasOwnProperty,Au=la.call(Object);function Mu(t){if(!k(t)||te(t)!=Cu)return!1;var i=lt(t);if(i===null)return!0;var e=Du.call(i,"constructor")&&i.constructor;return typeof e=="function"&&e instanceof e&&la.call(e)==Au}var da=Mu;var Eu="__lodash_hash_undefined__";function ku(t){return this.__data__.set(t,Eu),this}var ca=ku;function Fu(t){return this.__data__.has(t)}var fa=Fu;function bi(t){var i=-1,e=t==null?0:t.length;for(this.__data__=new Yt;++i<e;)this.add(t[i])}bi.prototype.add=bi.prototype.push=ca;bi.prototype.has=fa;var ua=bi;function Ou(t,i){for(var e=-1,r=t==null?0:t.length;++e<r;)if(i(t[e],e,t))return!0;return!1}var ma=Ou;function Iu(t,i){return t.has(i)}var ha=Iu;var Ru=1,Vu=2;function Pu(t,i,e,r,o,n){var a=e&Ru,s=t.length,l=i.length;if(s!=l&&!(a&&l>s))return!1;var c=n.get(t),p=n.get(i);if(c&&p)return c==i&&p==t;var m=-1,u=!0,x=e&Vu?new ua:void 0;for(n.set(t,i),n.set(i,t);++m<s;){var v=t[m],A=i[m];if(r)var D=a?r(A,v,m,i,t,n):r(v,A,m,t,i,n);if(D!==void 0){if(D)continue;u=!1;break}if(x){if(!ma(i,function(I,Re){if(!ha(x,Re)&&(v===I||o(v,I,e,r,n)))return x.push(Re)})){u=!1;break}}else if(!(v===A||o(v,A,e,r,n))){u=!1;break}}return n.delete(t),n.delete(i),u}var yi=Pu;function Nu(t){var i=-1,e=Array(t.size);return t.forEach(function(r,o){e[++i]=[o,r]}),e}var pa=Nu;function Uu(t){var i=-1,e=Array(t.size);return t.forEach(function(r){e[++i]=r}),e}var ga=Uu;var Lu=1,ju=2,$u="[object Boolean]",Wu="[object Date]",Hu="[object Error]",Bu="[object Map]",zu="[object Number]",Gu="[object RegExp]",qu="[object Set]",Ku="[object String]",Qu="[object Symbol]",Zu="[object ArrayBuffer]",Ju="[object DataView]",va=Z?Z.prototype:void 0,dr=va?va.valueOf:void 0;function Yu(t,i,e,r,o,n,a){switch(e){case Ju:if(t.byteLength!=i.byteLength||t.byteOffset!=i.byteOffset)return!1;t=t.buffer,i=i.buffer;case Zu:return!(t.byteLength!=i.byteLength||!n(new dt(t),new dt(i)));case $u:case Wu:case zu:return fe(+t,+i);case Hu:return t.name==i.name&&t.message==i.message;case Gu:case Ku:return t==i+"";case Bu:var s=pa;case qu:var l=r&Lu;if(s||(s=ga),t.size!=i.size&&!l)return!1;var c=a.get(t);if(c)return c==i;r|=ju,a.set(t,i);var p=yi(s(t),s(i),r,o,n,a);return a.delete(t),p;case Qu:if(dr)return dr.call(t)==dr.call(i)}return!1}var _a=Yu;var Xu=1,em=Object.prototype,tm=em.hasOwnProperty;function im(t,i,e,r,o,n){var a=e&Xu,s=Et(t),l=s.length,c=Et(i),p=c.length;if(l!=p&&!a)return!1;for(var m=l;m--;){var u=s[m];if(!(a?u in i:tm.call(i,u)))return!1}var x=n.get(t),v=n.get(i);if(x&&v)return x==i&&v==t;var A=!0;n.set(t,i),n.set(i,t);for(var D=a;++m<l;){u=s[m];var I=t[u],Re=i[u];if(r)var Fr=a?r(Re,I,u,i,t,n):r(I,Re,u,t,i,n);if(!(Fr===void 0?I===Re||o(I,Re,e,r,n):Fr)){A=!1;break}D||(D=u=="constructor")}if(A&&!D){var Lt=t.constructor,jt=i.constructor;Lt!=jt&&"constructor"in t&&"constructor"in i&&!(typeof Lt=="function"&&Lt instanceof Lt&&typeof jt=="function"&&jt instanceof jt)&&(A=!1)}return n.delete(t),n.delete(i),A}var ba=im;var rm=1,ya="[object Arguments]",xa="[object Array]",xi="[object Object]",om=Object.prototype,Sa=om.hasOwnProperty;function nm(t,i,e,r,o,n){var a=J(t),s=J(i),l=a?xa:xe(t),c=s?xa:xe(i);l=l==ya?xi:l,c=c==ya?xi:c;var p=l==xi,m=c==xi,u=l==c;if(u&&be(t)){if(!be(i))return!1;a=!0,p=!1}if(u&&!p)return n||(n=new Fe),a||ot(t)?yi(t,i,e,r,o,n):_a(t,i,l,e,r,o,n);if(!(e&rm)){var x=p&&Sa.call(t,"__wrapped__"),v=m&&Sa.call(i,"__wrapped__");if(x||v){var A=x?t.value():t,D=v?i.value():i;return n||(n=new Fe),o(A,D,e,r,n)}}return u?(n||(n=new Fe),ba(t,i,e,r,o,n)):!1}var Ca=nm;function wa(t,i,e,r,o){return t===i?!0:t==null||i==null||!k(t)&&!k(i)?t!==t&&i!==i:Ca(t,i,e,r,wa,o)}var Ta=wa;function am(t){return function(i,e,r){for(var o=-1,n=Object(i),a=r(i),s=a.length;s--;){var l=a[t?s:++o];if(e(n[l],l,n)===!1)break}return i}}var Da=am;var sm=Da(),Aa=sm;function lm(t,i,e){(e!==void 0&&!fe(t[i],e)||e===void 0&&!(i in t))&&it(t,i,e)}var kt=lm;function dm(t){return k(t)&&Oe(t)}var Ma=dm;function cm(t,i){if(!(i==="constructor"&&typeof t[i]=="function")&&i!="__proto__")return t[i]}var Ft=cm;function fm(t){return ue(t,me(t))}var Ea=fm;function um(t,i,e,r,o,n,a){var s=Ft(t,e),l=Ft(i,e),c=a.get(l);if(c){kt(t,e,c);return}var p=n?n(s,l,e+"",t,i,a):void 0,m=p===void 0;if(m){var u=J(l),x=!u&&be(l),v=!u&&!x&&ot(l);p=l,u||x||v?J(s)?p=s:Ma(s)?p=ni(s):x?(m=!1,p=oi(l,!0)):v?(m=!1,p=hi(l,!0)):p=[]:da(l)||At(l)?(p=s,At(s)?p=Ea(s):(!O(s)||Je(s))&&(p=pi(l))):m=!1}m&&(a.set(l,p),o(p,l,r,n,a),a.delete(l)),kt(t,e,p)}var ka=um;function Fa(t,i,e,r,o){t!==i&&Aa(i,function(n,a){if(o||(o=new Fe),O(n))ka(t,i,a,e,Fa,r,o);else{var s=r?r(Ft(t,a),n,a+"",t,i,o):void 0;s===void 0&&(s=n),kt(t,a,s)}},me)}var Oa=Fa;function mm(t,i){return Ta(t,i)}var hm=mm;var pm=sa(function(t,i,e){Oa(t,i,e)}),cr=pm;var ft=function(t){return t.Normal="normal",t.Nominal="nominal",t.Alert="alert",t.Warn="warn",t.Alarm="alarm",t.Emergency="emergency",t}(ft||{});var gm=function(t){return t.Visual="visual",t.Sound="sound",t}(gm||{});var vm="self",Ia=t=>isFinite(+(t instanceof Date?t:new Date(t)))?!!new RegExp("^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(.[0-9]+)?(([Zz])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$").test(t):!1,Ra=t=>{if(t)return t==="RFC 3339 (UTC)"?"Date":"number"},LC=(()=>{class t{delta=d(Jn);_destroyRef=d(_t);_deltaUpdatesCounter=null;_deltaUpdatesSubject=new Ue(60);_deltaUpdatesCounterTimer=null;_isSkDataFullTreeActive=!1;_skDataSubject$=new b([]);_dataServiceMeta=[];_isSkMetaFullTreeActive=!1;_dataServiceMetaSubject$=new b([]);_skNotificationMsg$=new _;_skNotificationMeta$=new _;_isReset=new _;_selfUrn="self";_skData=[];_pathRegister=[];constructor(){this._deltaUpdatesCounterTimer=setInterval(()=>{if(this._deltaUpdatesCounter!==null){let e={timestamp:Date.now(),value:this._deltaUpdatesCounter};this._deltaUpdatesSubject.next(e),this._deltaUpdatesCounter=0}},1e3),this.delta.subscribeDataPathsUpdates().pipe(z(this._destroyRef)).subscribe(e=>{this.updatePathData(e)}),this.delta.subscribeMetadataUpdates().pipe(z(this._destroyRef)).subscribe(e=>{this.setMeta(e)}),this.delta.subscribeNotificationsUpdates().pipe(z(this._destroyRef)).subscribe(e=>{let r=e.path.replace("notifications.","self."),o=this._skData.find(n=>n.path==r);if(o&&o.state!==e.value.state){o.state=e.value.state;let n=this._pathRegister.find(a=>a.path==r);n&&n._pathState$.next(o.state)}this._skNotificationMsg$.next(e)}),this.delta.subscribeSelfUpdates().pipe(z(this._destroyRef)).subscribe(e=>{this.setSelfUrn(e)})}getSignalkDeltaUpdateStatistics(){return this._deltaUpdatesSubject.asObservable()}resetSignalKData(){this._skData=[],this._selfUrn="self",this._isReset.next(!0)}unsubscribePath(e){let r=this._pathRegister.findIndex(o=>o.path===e);if(r!==-1){let o=this._pathRegister[r];o._pathData$?.complete(),o._pathState$?.complete(),o.pathDataUpdate$?.complete(),o.pathMeta$?.complete(),this._pathRegister.splice(r,1)}}subscribePath(e,r){let o=this._pathRegister.find(v=>v.path===e&&v.source===r);if(o)return o.pathDataUpdate$;let n=null,a=null,s=null,l=ft.Normal,c={data:{value:null,timestamp:null},state:l},p=null,m=this._skData.find(v=>v.path==e);this._skData.length&&m&&(n=r==="default"?m.pathValue:m.sources?.[r]?.sourceValue??null,a=r==="default"?m.pathTimestamp:m.sources?.[r]?.sourceTimestamp??null,s=a?new Date(a):null,c={data:{value:n,timestamp:s},state:m.state||l},l=m.state||l,p=m.meta||null);let u={path:e,source:r,_pathData$:new b(c.data),_pathState$:new b(c.state),pathDataUpdate$:new b(c),pathMeta$:new b(p)};return Nr([u._pathData$,u._pathState$]).pipe(Se(([v,A])=>({data:v,state:A}))).subscribe(v=>u.pathDataUpdate$.next(v)),this._pathRegister.push(u),u.pathDataUpdate$}updatePathData(e){this._deltaUpdatesCounter++;let r=this.setPathContext(e.context,e.path),o=this._skData.find(a=>a.path==r);if(o)o.defaultSource===void 0&&(o.defaultSource=e.source),o.type===void 0&&e.value!==null&&(o.type=typeof e.value,o.type==="string"&&Ia(e.value)&&(o.type="Date")),o.pathValue=e.value,o.pathTimestamp=e.timestamp,o.sources[e.source]={sourceTimestamp:e.timestamp,sourceValue:e.value};else{let a=typeof e.value;a==="string"&&Ia(e.value)&&(a="Date"),o={path:r,pathValue:e.value,pathTimestamp:e.timestamp,defaultSource:e.source,type:a,state:ft.Normal,sources:{[e.source]:{sourceTimestamp:e.timestamp,sourceValue:e.value}}},this._skData.push(o)}let n=this._pathRegister.filter(a=>a.path===r);if(n.length){let a={value:o.pathValue,timestamp:new Date(o.pathTimestamp)},s=n.find(c=>c.source==="default");s&&s._pathData$.next(a);let l=n.find(c=>c.source===e.source);l&&l._pathData$.next(a)}this._isSkDataFullTreeActive&&this._skDataSubject$.next(this._skData)}setMeta(e){if(e.path.startsWith("notifications."))this._skNotificationMeta$.next(e);else{let r=this.setPathContext(e.context,e.path),o=this._skData.find(a=>a.path===r);o?(o.type==="object"&&e.meta.units&&(o.type=Ra(e.meta.units)),o.meta=cr(o.meta,e.meta)):(o={path:r,pathValue:void 0,pathTimestamp:void 0,type:Ra(e.meta.units),state:ft.Normal,defaultSource:void 0,sources:{},meta:e.meta},this._skData.push(o));let n=this._pathRegister.find(a=>a.path===r);n&&n.pathMeta$.next(o.meta),this._isSkMetaFullTreeActive&&(this._dataServiceMeta.push({path:r,meta:o.meta}),this._dataServiceMetaSubject$.next(this._dataServiceMeta))}}startSkMetaFullTree(){return this._isSkMetaFullTreeActive=!0,this._dataServiceMeta=this._skData.filter(e=>e.meta!==void 0&&e.path.startsWith("self.")).map(e=>({path:e.path,meta:e.meta})),this._dataServiceMetaSubject$.next(this._dataServiceMeta),this._dataServiceMetaSubject$}stopSkMetaFullTree(){this._isSkMetaFullTreeActive=!1,this._dataServiceMetaSubject$.next(null),this._dataServiceMeta=null}startSkDataFullTree(){return this._isSkDataFullTreeActive=!0,this._skDataSubject$.next(this._skData),this._skDataSubject$}stopSkDataFullTree(){this._isSkDataFullTreeActive=!1}setSelfUrn(e){e!==""||e!==null?(console.debug("[Signal K Data Service] Setting self to: "+e),this._selfUrn=e):console.error("[Signal K Data Service] Invalid self URN: "+e)}setPathContext(e,r){return e!==this._selfUrn?`${e}.${r}`:`${vm}.${r}`}getPathsByType(e,r){return this._skData.filter(o=>o.type===e&&(!r||o.path.startsWith("self"))).map(o=>o.path)}getPathsAndMetaByType(e,r,o){return this._skData.filter(n=>{let a=n.type===e,s=!o||n.path.startsWith("self"),l=r===!0?n.meta?.supportsPut===!0:!0;return a&&s&&l}).map(n=>({path:n.path,meta:n.meta}))}getPathObject(e){return sr(this._skData.find(r=>r.path===e))||null}getPathUnitType(e){return this._skData.find(r=>r.path===e)?.meta?.units||null}timeoutPathObservable(e,r){let o=this._pathRegister.find(n=>n.path==e);if(o){let n;["string","Date","number"].includes(r)&&(n={data:{value:null,timestamp:null},state:ft.Normal}),o.pathDataUpdate$.next(n)}}getNotificationMsgObservable(){return this._skNotificationMsg$.asObservable()}getNotificationMetaObservable(){return this._skNotificationMeta$.asObservable()}getPathMetaObservable(e){return this._pathRegister.find(o=>o.path==e)?.pathMeta$.asObservable()||Pr(null)}getPathMeta(e){return this._skData.find(r=>r.path===e)?.meta||null}isResetService(){return this._isReset.asObservable()}ngOnDestroy(){this._deltaUpdatesSubject?.complete(),this._skNotificationMsg$?.complete(),this._skNotificationMeta$?.complete(),this._isReset?.complete(),this._skDataSubject$?.complete(),this._dataServiceMetaSubject$?.complete(),this._deltaUpdatesCounterTimer&&clearInterval(this._deltaUpdatesCounterTimer)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Wa=(()=>{class t{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,r){this._renderer=e,this._elementRef=r}setProperty(e,r){this._renderer.setProperty(this._elementRef.nativeElement,e,r)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(r){return new(r||t)(h(we),h(X))};static \u0275dir=g({type:t})}return t})(),Ha=(()=>{class t extends Wa{static \u0275fac=(()=>{let e;return function(o){return(e||(e=he(t)))(o||t)}})();static \u0275dir=g({type:t,features:[E]})}return t})(),Ut=new M("");var _m={provide:Ut,useExisting:N(()=>Ba),multi:!0};function bm(){let t=Qi()?Qi().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var ym=new M(""),Ba=(()=>{class t extends Wa{_compositionMode;_composing=!1;constructor(e,r,o){super(e,r),this._compositionMode=o,this._compositionMode==null&&(this._compositionMode=!bm())}writeValue(e){let r=e??"";this.setProperty("value",r)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(r){return new(r||t)(h(we),h(X),h(ym,8))};static \u0275dir=g({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,o){r&1&&le("input",function(a){return o._handleInput(a.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(a){return o._compositionEnd(a.target.value)})},standalone:!1,features:[w([_m]),E]})}return t})();function hr(t){return t==null||pr(t)===0}function pr(t){return t==null?null:Array.isArray(t)||typeof t=="string"?t.length:t instanceof Set?t.size:null}var re=new M(""),Ne=new M(""),xm=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[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])?)*$/,Ci=class{static min(i){return za(i)}static max(i){return Ga(i)}static required(i){return qa(i)}static requiredTrue(i){return Sm(i)}static email(i){return Cm(i)}static minLength(i){return wm(i)}static maxLength(i){return Tm(i)}static pattern(i){return Ka(i)}static nullValidator(i){return wi()}static compose(i){return es(i)}static composeAsync(i){return ts(i)}};function za(t){return i=>{if(i.value==null||t==null)return null;let e=parseFloat(i.value);return!isNaN(e)&&e<t?{min:{min:t,actual:i.value}}:null}}function Ga(t){return i=>{if(i.value==null||t==null)return null;let e=parseFloat(i.value);return!isNaN(e)&&e>t?{max:{max:t,actual:i.value}}:null}}function qa(t){return hr(t.value)?{required:!0}:null}function Sm(t){return t.value===!0?null:{required:!0}}function Cm(t){return hr(t.value)||xm.test(t.value)?null:{email:!0}}function wm(t){return i=>{let e=i.value?.length??pr(i.value);return e===null||e===0?null:e<t?{minlength:{requiredLength:t,actualLength:e}}:null}}function Tm(t){return i=>{let e=i.value?.length??pr(i.value);return e!==null&&e>t?{maxlength:{requiredLength:t,actualLength:e}}:null}}function Ka(t){if(!t)return wi;let i,e;return typeof t=="string"?(e="",t.charAt(0)!=="^"&&(e+="^"),e+=t,t.charAt(t.length-1)!=="$"&&(e+="$"),i=new RegExp(e)):(e=t.toString(),i=t),r=>{if(hr(r.value))return null;let o=r.value;return i.test(o)?null:{pattern:{requiredPattern:e,actualValue:o}}}}function wi(t){return null}function Qa(t){return t!=null}function Za(t){return Xr(t)?Vr(t):t}function Ja(t){let i={};return t.forEach(e=>{i=e!=null?$($({},i),e):i}),Object.keys(i).length===0?null:i}function Ya(t,i){return i.map(e=>e(t))}function Dm(t){return!t.validate}function Xa(t){return t.map(i=>Dm(i)?i:e=>i.validate(e))}function es(t){if(!t)return null;let i=t.filter(Qa);return i.length==0?null:function(e){return Ja(Ya(e,i))}}function gr(t){return t!=null?es(Xa(t)):null}function ts(t){if(!t)return null;let i=t.filter(Qa);return i.length==0?null:function(e){let r=Ya(e,i).map(Za);return Ur(r).pipe(Se(Ja))}}function vr(t){return t!=null?ts(Xa(t)):null}function Va(t,i){return t===null?[i]:Array.isArray(t)?[...t,i]:[t,i]}function is(t){return t._rawValidators}function rs(t){return t._rawAsyncValidators}function fr(t){return t?Array.isArray(t)?t:[t]:[]}function Ti(t,i){return Array.isArray(t)?t.includes(i):t===i}function Pa(t,i){let e=fr(i);return fr(t).forEach(o=>{Ti(e,o)||e.push(o)}),e}function Na(t,i){return fr(i).filter(e=>!Ti(t,e))}var Di=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(i){this._rawValidators=i||[],this._composedValidatorFn=gr(this._rawValidators)}_setAsyncValidators(i){this._rawAsyncValidators=i||[],this._composedAsyncValidatorFn=vr(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(i){this._onDestroyCallbacks.push(i)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(i=>i()),this._onDestroyCallbacks=[]}reset(i=void 0){this.control&&this.control.reset(i)}hasError(i,e){return this.control?this.control.hasError(i,e):!1}getError(i,e){return this.control?this.control.getError(i,e):null}},P=class extends Di{name;get formDirective(){return null}get path(){return null}},ie=class extends Di{_parent=null;name=null;valueAccessor=null},Ai=class{_cd;constructor(i){this._cd=i}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Am={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},a0=Y($({},Am),{"[class.ng-submitted]":"isSubmitted"}),s0=(()=>{class t extends Ai{constructor(e){super(e)}static \u0275fac=function(r){return new(r||t)(h(ie,2))};static \u0275dir=g({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,o){r&2&&B("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},standalone:!1,features:[E]})}return t})(),l0=(()=>{class t extends Ai{constructor(e){super(e)}static \u0275fac=function(r){return new(r||t)(h(P,10))};static \u0275dir=g({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,o){r&2&&B("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)("ng-submitted",o.isSubmitted)},standalone:!1,features:[E]})}return t})();var Ot="VALID",Si="INVALID",ut="PENDING",It="DISABLED",Ie=class{},Mi=class extends Ie{value;source;constructor(i,e){super(),this.value=i,this.source=e}},Vt=class extends Ie{pristine;source;constructor(i,e){super(),this.pristine=i,this.source=e}},Pt=class extends Ie{touched;source;constructor(i,e){super(),this.touched=i,this.source=e}},mt=class extends Ie{status;source;constructor(i,e){super(),this.status=i,this.source=e}},Ei=class extends Ie{source;constructor(i){super(),this.source=i}},ki=class extends Ie{source;constructor(i){super(),this.source=i}};function _r(t){return(Ri(t)?t.validators:t)||null}function Mm(t){return Array.isArray(t)?gr(t):t||null}function br(t,i){return(Ri(i)?i.asyncValidators:t)||null}function Em(t){return Array.isArray(t)?vr(t):t||null}function Ri(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function os(t,i,e){let r=t.controls;if(!(i?Object.keys(r):r).length)throw new Bt(1e3,"");if(!r[e])throw new Bt(1001,"")}function ns(t,i,e){t._forEachChild((r,o)=>{if(e[o]===void 0)throw new Bt(1002,"")})}var pt=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(i,e){this._assignValidators(i),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(i){this._rawValidators=this._composedValidatorFn=i}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(i){this._rawAsyncValidators=this._composedAsyncValidatorFn=i}get parent(){return this._parent}get status(){return ge(this.statusReactive)}set status(i){ge(()=>this.statusReactive.set(i))}_status=ce(()=>this.statusReactive());statusReactive=ne(void 0);get valid(){return this.status===Ot}get invalid(){return this.status===Si}get pending(){return this.status==ut}get disabled(){return this.status===It}get enabled(){return this.status!==It}errors;get pristine(){return ge(this.pristineReactive)}set pristine(i){ge(()=>this.pristineReactive.set(i))}_pristine=ce(()=>this.pristineReactive());pristineReactive=ne(!0);get dirty(){return!this.pristine}get touched(){return ge(this.touchedReactive)}set touched(i){ge(()=>this.touchedReactive.set(i))}_touched=ce(()=>this.touchedReactive());touchedReactive=ne(!1);get untouched(){return!this.touched}_events=new _;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(i){this._assignValidators(i)}setAsyncValidators(i){this._assignAsyncValidators(i)}addValidators(i){this.setValidators(Pa(i,this._rawValidators))}addAsyncValidators(i){this.setAsyncValidators(Pa(i,this._rawAsyncValidators))}removeValidators(i){this.setValidators(Na(i,this._rawValidators))}removeAsyncValidators(i){this.setAsyncValidators(Na(i,this._rawAsyncValidators))}hasValidator(i){return Ti(this._rawValidators,i)}hasAsyncValidator(i){return Ti(this._rawAsyncValidators,i)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(i={}){let e=this.touched===!1;this.touched=!0;let r=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsTouched(Y($({},i),{sourceControl:r})),e&&i.emitEvent!==!1&&this._events.next(new Pt(!0,r))}markAllAsDirty(i={}){this.markAsDirty({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(i))}markAllAsTouched(i={}){this.markAsTouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(i))}markAsUntouched(i={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let r=i.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:r})}),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,r),e&&i.emitEvent!==!1&&this._events.next(new Pt(!1,r))}markAsDirty(i={}){let e=this.pristine===!0;this.pristine=!1;let r=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsDirty(Y($({},i),{sourceControl:r})),e&&i.emitEvent!==!1&&this._events.next(new Vt(!1,r))}markAsPristine(i={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let r=i.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:i.emitEvent})}),this._parent&&!i.onlySelf&&this._parent._updatePristine(i,r),e&&i.emitEvent!==!1&&this._events.next(new Vt(!0,r))}markAsPending(i={}){this.status=ut;let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new mt(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.markAsPending(Y($({},i),{sourceControl:e}))}disable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=It,this.errors=null,this._forEachChild(o=>{o.disable(Y($({},i),{onlySelf:!0}))}),this._updateValue();let r=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new Mi(this.value,r)),this._events.next(new mt(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Y($({},i),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=Ot,this._forEachChild(r=>{r.enable(Y($({},i),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent}),this._updateAncestors(Y($({},i),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(i,e){this._parent&&!i.onlySelf&&(this._parent.updateValueAndValidity(i),i.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(i){this._parent=i}getRawValue(){return this.value}updateValueAndValidity(i={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let r=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Ot||this.status===ut)&&this._runAsyncValidator(r,i.emitEvent)}let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new Mi(this.value,e)),this._events.next(new mt(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.updateValueAndValidity(Y($({},i),{sourceControl:e}))}_updateTreeValidity(i={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(i)),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?It:Ot}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(i,e){if(this.asyncValidator){this.status=ut,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:i!==!1};let r=Za(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:e,shouldHaveEmitted:i})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let i=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,i}return!1}setErrors(i,e={}){this.errors=i,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(i){let e=i;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((r,o)=>r&&r._find(o),this)}getError(i,e){let r=e?this.get(e):this;return r&&r.errors?r.errors[i]:null}hasError(i,e){return!!this.getError(i,e)}get root(){let i=this;for(;i._parent;)i=i._parent;return i}_updateControlsErrors(i,e,r){this.status=this._calculateStatus(),i&&this.statusChanges.emit(this.status),(i||r)&&this._events.next(new mt(this.status,e)),this._parent&&this._parent._updateControlsErrors(i,e,r)}_initObservables(){this.valueChanges=new pe,this.statusChanges=new pe}_calculateStatus(){return this._allControlsDisabled()?It:this.errors?Si:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(ut)?ut:this._anyControlsHaveStatus(Si)?Si:Ot}_anyControlsHaveStatus(i){return this._anyControls(e=>e.status===i)}_anyControlsDirty(){return this._anyControls(i=>i.dirty)}_anyControlsTouched(){return this._anyControls(i=>i.touched)}_updatePristine(i,e){let r=!this._anyControlsDirty(),o=this.pristine!==r;this.pristine=r,this._parent&&!i.onlySelf&&this._parent._updatePristine(i,e),o&&this._events.next(new Vt(this.pristine,e))}_updateTouched(i={},e){this.touched=this._anyControlsTouched(),this._events.next(new Pt(this.touched,e)),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,e)}_onDisabledChange=[];_registerOnCollectionChange(i){this._onCollectionChange=i}_setUpdateStrategy(i){Ri(i)&&i.updateOn!=null&&(this._updateOn=i.updateOn)}_parentMarkedDirty(i){let e=this._parent&&this._parent.dirty;return!i&&!!e&&!this._parent._anyControlsDirty()}_find(i){return null}_assignValidators(i){this._rawValidators=Array.isArray(i)?i.slice():i,this._composedValidatorFn=Mm(this._rawValidators)}_assignAsyncValidators(i){this._rawAsyncValidators=Array.isArray(i)?i.slice():i,this._composedAsyncValidatorFn=Em(this._rawAsyncValidators)}},Pe=class extends pt{constructor(i,e,r){super(_r(e),br(r,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(i,e){return this.controls[i]?this.controls[i]:(this.controls[i]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(i,e,r={}){this.registerControl(i,e),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(i,e={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(i,e,r={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],e&&this.registerControl(i,e),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(i){return this.controls.hasOwnProperty(i)&&this.controls[i].enabled}setValue(i,e={}){ns(this,!0,i),Object.keys(i).forEach(r=>{os(this,!0,r),this.controls[r].setValue(i[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){i!=null&&(Object.keys(i).forEach(r=>{let o=this.controls[r];o&&o.patchValue(i[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i={},e={}){this._forEachChild((r,o)=>{r.reset(i?i[o]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(i,e,r)=>(i[r]=e.getRawValue(),i))}_syncPendingControls(){let i=this._reduceChildren(!1,(e,r)=>r._syncPendingControls()?!0:e);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){Object.keys(this.controls).forEach(e=>{let r=this.controls[e];r&&i(r,e)})}_setUpControls(){this._forEachChild(i=>{i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(i){for(let[e,r]of Object.entries(this.controls))if(this.contains(e)&&i(r))return!0;return!1}_reduceValue(){let i={};return this._reduceChildren(i,(e,r,o)=>((r.enabled||this.disabled)&&(e[o]=r.value),e))}_reduceChildren(i,e){let r=i;return this._forEachChild((o,n)=>{r=e(r,o,n)}),r}_allControlsDisabled(){for(let i of Object.keys(this.controls))if(this.controls[i].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(i){return this.controls.hasOwnProperty(i)?this.controls[i]:null}};var d0=Pe;var ur=class extends Pe{};var gt=new M("",{providedIn:"root",factory:()=>Vi}),Vi="always";function Pi(t,i){return[...i.path,t]}function Nt(t,i,e=Vi){yr(t,i),i.valueAccessor.writeValue(t.value),(t.disabled||e==="always")&&i.valueAccessor.setDisabledState?.(t.disabled),Fm(t,i),Im(t,i),Om(t,i),km(t,i)}function Fi(t,i,e=!0){let r=()=>{};i.valueAccessor&&(i.valueAccessor.registerOnChange(r),i.valueAccessor.registerOnTouched(r)),Ii(t,i),t&&(i._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function Oi(t,i){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(i)})}function km(t,i){if(i.valueAccessor.setDisabledState){let e=r=>{i.valueAccessor.setDisabledState(r)};t.registerOnDisabledChange(e),i._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}function yr(t,i){let e=is(t);i.validator!==null?t.setValidators(Va(e,i.validator)):typeof e=="function"&&t.setValidators([e]);let r=rs(t);i.asyncValidator!==null?t.setAsyncValidators(Va(r,i.asyncValidator)):typeof r=="function"&&t.setAsyncValidators([r]);let o=()=>t.updateValueAndValidity();Oi(i._rawValidators,o),Oi(i._rawAsyncValidators,o)}function Ii(t,i){let e=!1;if(t!==null){if(i.validator!==null){let o=is(t);if(Array.isArray(o)&&o.length>0){let n=o.filter(a=>a!==i.validator);n.length!==o.length&&(e=!0,t.setValidators(n))}}if(i.asyncValidator!==null){let o=rs(t);if(Array.isArray(o)&&o.length>0){let n=o.filter(a=>a!==i.asyncValidator);n.length!==o.length&&(e=!0,t.setAsyncValidators(n))}}}let r=()=>{};return Oi(i._rawValidators,r),Oi(i._rawAsyncValidators,r),e}function Fm(t,i){i.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&as(t,i)})}function Om(t,i){i.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&as(t,i),t.updateOn!=="submit"&&t.markAsTouched()})}function as(t,i){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),i.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function Im(t,i){let e=(r,o)=>{i.valueAccessor.writeValue(r),o&&i.viewToModelUpdate(r)};t.registerOnChange(e),i._registerOnDestroy(()=>{t._unregisterOnChange(e)})}function ss(t,i){t==null,yr(t,i)}function Rm(t,i){return Ii(t,i)}function xr(t,i){if(!t.hasOwnProperty("model"))return!1;let e=t.model;return e.isFirstChange()?!0:!Object.is(i,e.currentValue)}function Vm(t){return Object.getPrototypeOf(t.constructor)===Ha}function ls(t,i){t._syncPendingControls(),i.forEach(e=>{let r=e.control;r.updateOn==="submit"&&r._pendingChange&&(e.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}function Sr(t,i){if(!i)return null;Array.isArray(i);let e,r,o;return i.forEach(n=>{n.constructor===Ba?e=n:Vm(n)?r=n:o=n}),o||r||e||null}function Pm(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}var Nm={provide:P,useExisting:N(()=>Cr)},Rt=Promise.resolve(),Cr=(()=>{class t extends P{callSetDisabledState;get submitted(){return ge(this.submittedReactive)}_submitted=ce(()=>this.submittedReactive());submittedReactive=ne(!1);_directives=new Set;form;ngSubmit=new pe;options;constructor(e,r,o){super(),this.callSetDisabledState=o,this.form=new Pe({},gr(e),vr(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Rt.then(()=>{let r=this._findContainer(e.path);e.control=r.registerControl(e.name,e.control),Nt(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Rt.then(()=>{let r=this._findContainer(e.path);r&&r.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Rt.then(()=>{let r=this._findContainer(e.path),o=new Pe({});ss(o,e),r.registerControl(e.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Rt.then(()=>{let r=this._findContainer(e.path);r&&r.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,r){Rt.then(()=>{this.form.get(e.path).setValue(r)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),ls(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new Ei(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1),this.form._events.next(new ki(this.form))}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(r){return new(r||t)(h(re,10),h(Ne,10),h(gt,8))};static \u0275dir=g({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(r,o){r&1&&le("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[w([Nm]),E]})}return t})();function Ua(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}function La(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var ht=class extends pt{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(i=null,e,r){super(_r(e),br(r,e)),this._applyFormState(i),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Ri(e)&&(e.nonNullable||e.initialValueIsDefault)&&(La(i)?this.defaultValue=i.value:this.defaultValue=i)}setValue(i,e={}){this.value=this._pendingValue=i,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(r=>r(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(i,e={}){this.setValue(i,e)}reset(i=this.defaultValue,e={}){this._applyFormState(i),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(i){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(i){this._onChange.push(i)}_unregisterOnChange(i){Ua(this._onChange,i)}registerOnDisabledChange(i){this._onDisabledChange.push(i)}_unregisterOnDisabledChange(i){Ua(this._onDisabledChange,i)}_forEachChild(i){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(i){La(i)?(this.value=this._pendingValue=i.value,i.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=i}},f0=ht,Um=t=>t instanceof ht,Lm=(()=>{class t extends P{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return Pi(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(o){return(e||(e=he(t)))(o||t)}})();static \u0275dir=g({type:t,standalone:!1,features:[E]})}return t})();var jm={provide:ie,useExisting:N(()=>$m)},ja=Promise.resolve(),$m=(()=>{class t extends ie{_changeDetectorRef;callSetDisabledState;control=new ht;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new pe;constructor(e,r,o,n,a,s){super(),this._changeDetectorRef=a,this.callSetDisabledState=s,this._parent=e,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=Sr(this,n)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let r=e.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),xr(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Nt(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){ja.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let r=e.isDisabled.currentValue,o=r!==0&&He(r);ja.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Pi(e,this._parent):[e]}static \u0275fac=function(r){return new(r||t)(h(P,9),h(re,10),h(Ne,10),h(Ut,10),h(Gt,8),h(gt,8))};static \u0275dir=g({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[w([jm]),E,Ce]})}return t})();var u0=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return t})(),Wm={provide:Ut,useExisting:N(()=>Hm),multi:!0},Hm=(()=>{class t extends Ha{writeValue(e){let r=e??"";this.setProperty("value",r)}registerOnChange(e){this.onChange=r=>{e(r==""?null:parseFloat(r))}}static \u0275fac=(()=>{let e;return function(o){return(e||(e=he(t)))(o||t)}})();static \u0275dir=g({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(r,o){r&1&&le("input",function(a){return o.onChange(a.target.value)})("blur",function(){return o.onTouched()})},standalone:!1,features:[w([Wm]),E]})}return t})();var wr=new M(""),Bm={provide:ie,useExisting:N(()=>zm)},zm=(()=>{class t extends ie{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new pe;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,r,o,n,a){super(),this._ngModelWarningConfig=n,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(r),this.valueAccessor=Sr(this,o)}ngOnChanges(e){if(this._isControlChanged(e)){let r=e.form.previousValue;r&&Fi(r,this,!1),Nt(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}xr(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&Fi(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(r){return new(r||t)(h(re,10),h(Ne,10),h(Ut,10),h(wr,8),h(gt,8))};static \u0275dir=g({type:t,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[w([Bm]),E,Ce]})}return t})(),Gm={provide:P,useExisting:N(()=>Ni)},Ni=(()=>{class t extends P{callSetDisabledState;get submitted(){return ge(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=ce(()=>this._submittedReactive());_submittedReactive=ne(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new pe;constructor(e,r,o){super(),this.callSetDisabledState=o,this._setValidators(e),this._setAsyncValidators(r)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Ii(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let r=this.form.get(e.path);return Nt(r,e,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),r}getControl(e){return this.form.get(e.path)}removeControl(e){Fi(e.control||null,e,!1),Pm(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,r){this.form.get(e.path).setValue(r)}onSubmit(e){return this._submittedReactive.set(!0),ls(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new Ei(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,r={}){this.form.reset(e,r),this._submittedReactive.set(!1),r?.emitEvent!==!1&&this.form._events.next(new ki(this.form))}_updateDomValue(){this.directives.forEach(e=>{let r=e.control,o=this.form.get(e.path);r!==o&&(Fi(r||null,e),Um(o)&&(Nt(o,e,this.callSetDisabledState),e.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let r=this.form.get(e.path);ss(r,e),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let r=this.form.get(e.path);r&&Rm(r,e)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){yr(this.form,this),this._oldForm&&Ii(this._oldForm,this)}static \u0275fac=function(r){return new(r||t)(h(re,10),h(Ne,10),h(gt,8))};static \u0275dir=g({type:t,selectors:[["","formGroup",""]],hostBindings:function(r,o){r&1&&le("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[w([Gm]),E,Ce]})}return t})(),qm={provide:P,useExisting:N(()=>ds)},ds=(()=>{class t extends Lm{name=null;constructor(e,r,o){super(),this._parent=e,this._setValidators(r),this._setAsyncValidators(o)}_checkParentType(){fs(this._parent)}static \u0275fac=function(r){return new(r||t)(h(P,13),h(re,10),h(Ne,10))};static \u0275dir=g({type:t,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[w([qm]),E]})}return t})(),Km={provide:P,useExisting:N(()=>cs)},cs=(()=>{class t extends P{_parent;name=null;constructor(e,r,o){super(),this._parent=e,this._setValidators(r),this._setAsyncValidators(o)}ngOnInit(){fs(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return Pi(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(r){return new(r||t)(h(P,13),h(re,10),h(Ne,10))};static \u0275dir=g({type:t,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[w([Km]),E]})}return t})();function fs(t){return!(t instanceof ds)&&!(t instanceof Ni)&&!(t instanceof cs)}var Qm={provide:ie,useExisting:N(()=>Zm)},Zm=(()=>{class t extends ie{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new pe;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,r,o,n,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=Sr(this,n)}ngOnChanges(e){this._added||this._setUpControl(),xr(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Pi(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(r){return new(r||t)(h(P,13),h(re,10),h(Ne,10),h(Ut,10),h(wr,8))};static \u0275dir=g({type:t,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[w([Qm]),E,Ce]})}return t})();function us(t){return typeof t=="number"?t:parseFloat(t)}var Ui=(()=>{class t{_validator=wi;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let r=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):wi,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t,features:[Ce]})}return t})(),Jm={provide:re,useExisting:N(()=>Ym),multi:!0},Ym=(()=>{class t extends Ui{max;inputName="max";normalizeInput=e=>us(e);createValidator=e=>Ga(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=he(t)))(o||t)}})();static \u0275dir=g({type:t,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(r,o){r&2&&se("max",o._enabled?o.max:null)},inputs:{max:"max"},standalone:!1,features:[w([Jm]),E]})}return t})(),Xm={provide:re,useExisting:N(()=>eh),multi:!0},eh=(()=>{class t extends Ui{min;inputName="min";normalizeInput=e=>us(e);createValidator=e=>za(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=he(t)))(o||t)}})();static \u0275dir=g({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(r,o){r&2&&se("min",o._enabled?o.min:null)},inputs:{min:"min"},standalone:!1,features:[w([Xm]),E]})}return t})(),th={provide:re,useExisting:N(()=>ih),multi:!0};var ih=(()=>{class t extends Ui{required;inputName="required";normalizeInput=He;createValidator=e=>qa;enabled(e){return e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=he(t)))(o||t)}})();static \u0275dir=g({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(r,o){r&2&&se("required",o._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[w([th]),E]})}return t})();var rh={provide:re,useExisting:N(()=>oh),multi:!0},oh=(()=>{class t extends Ui{pattern;inputName="pattern";normalizeInput=e=>e;createValidator=e=>Ka(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=he(t)))(o||t)}})();static \u0275dir=g({type:t,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(r,o){r&2&&se("pattern",o._enabled?o.pattern:null)},inputs:{pattern:"pattern"},standalone:!1,features:[w([rh]),E]})}return t})();var ms=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=ae({type:t});static \u0275inj=oe({})}return t})(),mr=class extends pt{constructor(i,e,r){super(_r(e),br(r,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(i){return this.controls[this._adjustIndex(i)]}push(i,e={}){this.controls.push(i),this._registerControl(i),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(i,e,r={}){this.controls.splice(i,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(i,e={}){let r=this._adjustIndex(i);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(i,e,r={}){let o=this._adjustIndex(i);o<0&&(o=0),this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),this.controls.splice(o,1),e&&(this.controls.splice(o,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(i,e={}){ns(this,!1,i),i.forEach((r,o)=>{os(this,!1,o),this.at(o).setValue(r,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){i!=null&&(i.forEach((r,o)=>{this.at(o)&&this.at(o).patchValue(r,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i=[],e={}){this._forEachChild((r,o)=>{r.reset(i[o],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(i=>i.getRawValue())}clear(i={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:i.emitEvent}))}_adjustIndex(i){return i<0?i+this.length:i}_syncPendingControls(){let i=this.controls.reduce((e,r)=>r._syncPendingControls()?!0:e,!1);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){this.controls.forEach((e,r)=>{i(e,r)})}_updateValue(){this.value=this.controls.filter(i=>i.enabled||this.disabled).map(i=>i.value)}_anyControls(i){return this.controls.some(e=>e.enabled&&i(e))}_setUpControls(){this._forEachChild(i=>this._registerControl(i))}_allControlsDisabled(){for(let i of this.controls)if(i.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(i){i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)}_find(i){return this.at(i)??null}};function $a(t){return!!t&&(t.asyncValidators!==void 0||t.validators!==void 0||t.updateOn!==void 0)}var nh=(()=>{class t{useNonNullable=!1;get nonNullable(){let e=new t;return e.useNonNullable=!0,e}group(e,r=null){let o=this._reduceControls(e),n={};return $a(r)?n=r:r!==null&&(n.validators=r.validator,n.asyncValidators=r.asyncValidator),new Pe(o,n)}record(e,r=null){let o=this._reduceControls(e);return new ur(o,r)}control(e,r,o){let n={};return this.useNonNullable?($a(r)?n=r:(n.validators=r,n.asyncValidators=o),new ht(e,Y($({},n),{nonNullable:!0}))):new ht(e,r,o)}array(e,r,o){let n=e.map(a=>this._createControl(a));return new mr(n,r,o)}_reduceControls(e){let r={};return Object.keys(e).forEach(o=>{r[o]=this._createControl(e[o])}),r}_createControl(e){if(e instanceof ht)return e;if(e instanceof pt)return e;if(Array.isArray(e)){let r=e[0],o=e.length>1?e[1]:null,n=e.length>2?e[2]:null;return this.control(r,o,n)}else return this.control(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var m0=(()=>{class t extends nh{group(e,r=null){return super.group(e,r)}control(e,r,o){return super.control(e,r,o)}array(e,r,o){return super.array(e,r,o)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=he(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var h0=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:gt,useValue:e.callSetDisabledState??Vi}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=ae({type:t});static \u0275inj=oe({imports:[ms]})}return t})(),p0=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:wr,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:gt,useValue:e.callSetDisabledState??Vi}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=ae({type:t});static \u0275inj=oe({imports:[ms]})}return t})();var Tr=class{_box;_destroyed=new _;_resizeSubject=new _;_resizeObserver;_elementObservables=new Map;constructor(i){this._box=i,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(i){return this._elementObservables.has(i)||this._elementObservables.set(i,new vt(e=>{let r=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(i,{box:this._box}),()=>{this._resizeObserver?.unobserve(i),r.unsubscribe(),this._elementObservables.delete(i)}}).pipe(Le(e=>e.some(r=>r.target===i)),zr({bufferSize:1,refCount:!0}),Ht(this._destroyed))),this._elementObservables.get(i)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},hs=(()=>{class t{_cleanupErrorListener;_observers=new Map;_ngZone=d(H);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(e,r){let o=r?.box||"content-box";return this._observers.has(o)||this._observers.set(o,new Tr(o)),this._observers.get(o).observe(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ah=["notch"],sh=["matFormFieldNotchedOutline",""],lh=["*"],ps=["iconPrefixContainer"],gs=["textPrefixContainer"],vs=["iconSuffixContainer"],_s=["textSuffixContainer"],dh=["textField"],ch=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],fh=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function uh(t,i){t&1&&yt(0,"span",20)}function mh(t,i){if(t&1&&(K(0,"label",19),ee(1,1),U(2,uh,1,0,"span",20),Q()),t&2){let e=Te(2);$e("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),se("for",e._control.disableAutomaticLabeling?null:e._control.id),F(2),L(!e.hideRequiredMarker&&e._control.required?2:-1)}}function hh(t,i){if(t&1&&U(0,mh,3,5,"label",19),t&2){let e=Te();L(e._hasFloatingLabel()?0:-1)}}function ph(t,i){t&1&&yt(0,"div",7)}function gh(t,i){}function vh(t,i){if(t&1&&zt(0,gh,0,0,"ng-template",13),t&2){Te(2);let e=Ki(1);$e("ngTemplateOutlet",e)}}function _h(t,i){if(t&1&&(K(0,"div",9),U(1,vh,1,1,null,13),Q()),t&2){let e=Te();$e("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),F(),L(e._forceDisplayInfixLabel()?-1:1)}}function bh(t,i){t&1&&(K(0,"div",10,2),ee(2,2),Q())}function yh(t,i){t&1&&(K(0,"div",11,3),ee(2,3),Q())}function xh(t,i){}function Sh(t,i){if(t&1&&zt(0,xh,0,0,"ng-template",13),t&2){Te();let e=Ki(1);$e("ngTemplateOutlet",e)}}function Ch(t,i){t&1&&(K(0,"div",14,4),ee(2,4),Q())}function wh(t,i){t&1&&(K(0,"div",15,5),ee(2,5),Q())}function Th(t,i){t&1&&yt(0,"div",16)}function Dh(t,i){t&1&&ee(0,6)}function Ah(t,i){if(t&1&&(K(0,"mat-hint",21),oo(1),Q()),t&2){let e=Te(2);$e("id",e._hintLabelId),F(),no(e.hintLabel)}}function Mh(t,i){if(t&1&&(U(0,Ah,2,2,"mat-hint",21),ee(1,7),yt(2,"div",22),ee(3,8)),t&2){let e=Te();L(e.hintLabel?0:-1)}}var Dr=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t,selectors:[["mat-label"]]})}return t})(),Mr=new M("MatError"),Eh=(()=>{class t{id=d(Ge).getId("mat-mdc-error-");constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t,selectors:[["mat-error"],["","matError",""]],hostAttrs:[1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(r,o){r&2&&xt("id",o.id)},inputs:{id:"id"},features:[w([{provide:Mr,useExisting:t}])]})}return t})(),Ar=(()=>{class t{align="start";id=d(Ge).getId("mat-mdc-hint-");static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(r,o){r&2&&(xt("id",o.id),se("align",null),B("mat-mdc-form-field-hint-end",o.align==="end"))},inputs:{align:"align",id:"id"}})}return t})(),Ts=new M("MatPrefix");var Er=new M("MatSuffix"),kh=(()=>{class t{set _isTextSelector(e){this._isText=!0}_isText=!1;static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[w([{provide:Er,useExisting:t}])]})}return t})(),Ds=new M("FloatingLabelParent"),bs=(()=>{class t{_elementRef=d(X);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize()}_floating=!1;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}_monitorResize=!1;_resizeObserver=d(hs);_ngZone=d(H);_parent=d(Ds);_resizeSubscription=new $t;constructor(){}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return Fh(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(r,o){r&2&&B("mdc-floating-label--float-above",o.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return t})();function Fh(t){let i=t;if(i.offsetParent!==null)return i.scrollWidth;let e=i.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let r=e.scrollWidth;return e.remove(),r}var ys="mdc-line-ripple--active",Li="mdc-line-ripple--deactivating",xs=(()=>{class t{_elementRef=d(X);_cleanupTransitionEnd;constructor(){let e=d(H),r=d(we);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=r.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove(Li),e.add(ys)}deactivate(){this._elementRef.nativeElement.classList.add(Li)}_handleTransitionEnd=e=>{let r=this._elementRef.nativeElement.classList,o=r.contains(Li);e.propertyName==="opacity"&&o&&r.remove(ys,Li)};ngOnDestroy(){this._cleanupTransitionEnd()}static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return t})(),Ss=(()=>{class t{_elementRef=d(X);_ngZone=d(H);open=!1;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,r=e.querySelector(".mdc-floating-label");r?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(r.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>r.style.transitionDuration="")}))):e.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(e){let r=this._notch.nativeElement;!this.open||!e?r.style.width="":r.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`)}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=bt({type:t,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(r,o){if(r&1&&de(ah,5),r&2){let n;R(n=V())&&(o._notch=n.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(r,o){r&2&&B("mdc-notched-outline--notched",o.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},attrs:sh,ngContentSelectors:lh,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(r,o){r&1&&(Gi(),zi(0,"div",1),eo(1,"div",2,0),ee(3),to(),zi(4,"div",3))},encapsulation:2,changeDetection:0})}return t})(),ji=(()=>{class t{value;stateChanges;id;placeholder;ngControl;focused;empty;shouldLabelFloat;required;disabled;errorState;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t})}return t})();var $i=new M("MatFormField"),As=new M("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Cs="fill",Oh="auto",ws="fixed",Ih="translateY(-50%)",kr=(()=>{class t{_elementRef=d(X);_changeDetectorRef=d(Gt);_dir=d(ho);_platform=d(ze);_idGenerator=d(Ge);_ngZone=d(H);_defaults=d(As,{optional:!0});_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=Ct("iconPrefixContainer");_textPrefixContainerSignal=Ct("textPrefixContainer");_iconSuffixContainerSignal=Ct("iconSuffixContainer");_textSuffixContainerSignal=Ct("textSuffixContainer");_prefixSuffixContainers=ce(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=lo(Dr);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=Ke(e)}_hideRequiredMarker=!1;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||Oh}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let r=e||this._defaults?.appearance||Cs;this._appearanceSignal.set(r)}_appearanceSignal=ne(Cs);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||ws}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||ws}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}_hintLabel="";_hasIconPrefix=!1;_hasTextPrefix=!1;_hasIconSuffix=!1;_hasTextSuffix=!1;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e}_destroyed=new _;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=po();constructor(){let e=this._defaults;e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),this._syncOutlineLabelOffset()}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled")},300)}),this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix()}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck()}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete()}getLabelId=ce(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(e){let r=this._control,o="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(o+e.controlType),r.controlType&&this._elementRef.nativeElement.classList.add(o+r.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=r.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck()}),this._describedByChanges?.unsubscribe(),this._describedByChanges=r.stateChanges.pipe(Gr([void 0,void 0]),Se(()=>[r.errorState,r.userAriaDescribedBy]),Br(),Le(([[n,a],[s,l]])=>n!==s||a!==l)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),r.ngControl&&r.ngControl.valueChanges&&(this._valueChanges=r.ngControl.valueChanges.pipe(Ht(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()))}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),$r(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){let e=this._control.focused;e&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!e&&(this._isFocused||this._isFocused===null)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._elementRef.nativeElement.classList.toggle("mat-focused",e),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",e)}_syncOutlineLabelOffset(){co({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset())});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"})}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())})}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=ce(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(e){let r=this._control?this._control.ngControl:null;return r&&r[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let n=this._hintChildren?this._hintChildren.find(s=>s.align==="start"):null,a=this._hintChildren?this._hintChildren.find(s=>s.align==="end"):null;n?e.push(n.id):this._hintLabel&&e.push(this._hintLabelId),a&&e.push(a.id)}else this._errorChildren&&e.push(...this._errorChildren.map(n=>n.id));let r=this._control.describedByIds,o;if(r){let n=this._describedByIds||e;o=e.concat(r.filter(a=>a&&!n.includes(a)))}else o=e;this._control.setDescribedByIds(o),this._describedByIds=e}}_getOutlinedLabelOffset(){let e=this._dir.valueSignal();if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return["",null];if(!this._isAttachedToDom())return null;let r=this._iconPrefixContainer?.nativeElement,o=this._textPrefixContainer?.nativeElement,n=this._iconSuffixContainer?.nativeElement,a=this._textSuffixContainer?.nativeElement,s=r?.getBoundingClientRect().width??0,l=o?.getBoundingClientRect().width??0,c=n?.getBoundingClientRect().width??0,p=a?.getBoundingClientRect().width??0,m=e==="rtl"?"-1":"1",u=`${s+l}px`,v=`calc(${m} * (${u} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,A=`var(--mat-mdc-form-field-label-transform, ${Ih} translateX(${v}))`,D=s+l+c+p;return[A,D]}_writeOutlinedLabelStyles(e){if(e!==null){let[r,o]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=r),o!==null&&this._notchedOutline?._setMaxWidth(o)}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let r=e.getRootNode();return r&&r!==e}return document.documentElement.contains(e)}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=bt({type:t,selectors:[["mat-form-field"]],contentQueries:function(r,o,n){if(r&1&&(ro(n,o._labelChild,Dr,5),We(n,ji,5),We(n,Ts,5),We(n,Er,5),We(n,Mr,5),We(n,Ar,5)),r&2){qi();let a;R(a=V())&&(o._formFieldControl=a.first),R(a=V())&&(o._prefixChildren=a),R(a=V())&&(o._suffixChildren=a),R(a=V())&&(o._errorChildren=a),R(a=V())&&(o._hintChildren=a)}},viewQuery:function(r,o){if(r&1&&(St(o._iconPrefixContainerSignal,ps,5),St(o._textPrefixContainerSignal,gs,5),St(o._iconSuffixContainerSignal,vs,5),St(o._textSuffixContainerSignal,_s,5),de(dh,5),de(ps,5),de(gs,5),de(vs,5),de(_s,5),de(bs,5),de(Ss,5),de(xs,5)),r&2){qi(4);let n;R(n=V())&&(o._textField=n.first),R(n=V())&&(o._iconPrefixContainer=n.first),R(n=V())&&(o._textPrefixContainer=n.first),R(n=V())&&(o._iconSuffixContainer=n.first),R(n=V())&&(o._textSuffixContainer=n.first),R(n=V())&&(o._floatingLabel=n.first),R(n=V())&&(o._notchedOutline=n.first),R(n=V())&&(o._lineRipple=n.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(r,o){r&2&&B("mat-mdc-form-field-label-always-float",o._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",o._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",o._hasIconSuffix)("mat-form-field-invalid",o._control.errorState)("mat-form-field-disabled",o._control.disabled)("mat-form-field-autofilled",o._control.autofilled)("mat-form-field-appearance-fill",o.appearance=="fill")("mat-form-field-appearance-outline",o.appearance=="outline")("mat-form-field-hide-placeholder",o._hasFloatingLabel()&&!o._shouldLabelFloat())("mat-primary",o.color!=="accent"&&o.color!=="warn")("mat-accent",o.color==="accent")("mat-warn",o.color==="warn")("ng-untouched",o._shouldForward("untouched"))("ng-touched",o._shouldForward("touched"))("ng-pristine",o._shouldForward("pristine"))("ng-dirty",o._shouldForward("dirty"))("ng-valid",o._shouldForward("valid"))("ng-invalid",o._shouldForward("invalid"))("ng-pending",o._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[w([{provide:$i,useExisting:t},{provide:Ds,useExisting:t}])],ngContentSelectors:fh,decls:19,vars:25,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],["aria-atomic","true","aria-live","polite"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(r,o){if(r&1){let n=io();Gi(ch),zt(0,hh,1,1,"ng-template",null,0,ao),K(2,"div",6,1),le("click",function(s){return Qr(n),Zr(o._control.onContainerClick(s))}),U(4,ph,1,0,"div",7),K(5,"div",8),U(6,_h,2,2,"div",9),U(7,bh,3,0,"div",10),U(8,yh,3,0,"div",11),K(9,"div",12),U(10,Sh,1,1,null,13),ee(11),Q(),U(12,Ch,3,0,"div",14),U(13,wh,3,0,"div",15),Q(),U(14,Th,1,0,"div",16),Q(),K(15,"div",17)(16,"div",18),U(17,Dh,1,0)(18,Mh,4,1),Q()()}if(r&2){let n;F(2),B("mdc-text-field--filled",!o._hasOutline())("mdc-text-field--outlined",o._hasOutline())("mdc-text-field--no-label",!o._hasFloatingLabel())("mdc-text-field--disabled",o._control.disabled)("mdc-text-field--invalid",o._control.errorState),F(2),L(!o._hasOutline()&&!o._control.disabled?4:-1),F(2),L(o._hasOutline()?6:-1),F(),L(o._hasIconPrefix?7:-1),F(),L(o._hasTextPrefix?8:-1),F(2),L(!o._hasOutline()||o._forceDisplayInfixLabel()?10:-1),F(2),L(o._hasTextSuffix?12:-1),F(),L(o._hasIconSuffix?13:-1),F(),L(o._hasOutline()?-1:14),F(),B("mat-mdc-form-field-subscript-dynamic-size",o.subscriptSizing==="dynamic");let a=o._getSubscriptMessageType();F(),B("mat-mdc-form-field-error-wrapper",a==="error")("mat-mdc-form-field-hint-wrapper",a==="hint"),F(),L((n=a)==="error"?17:n==="hint"?18:-1)}},dependencies:[bs,Ss,fo,xs,Ar],styles:[`.mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator,.mdc-text-field__input::-webkit-search-cancel-button{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-moz-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-webkit-input-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive:-ms-input-placeholder{opacity:0}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mat-form-field-filled-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mat-form-field-filled-caret-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mat-form-field-outlined-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mat-form-field-outlined-caret-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mat-form-field-filled-error-caret-color, var(--mat-sys-error))}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mat-form-field-outlined-error-caret-color, var(--mat-sys-error))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mat-form-field-filled-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mat-form-field-outlined-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mat-form-field-filled-container-shape, var(--mat-sys-corner-extra-small));border-top-right-radius:var(--mat-form-field-filled-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mat-form-field-filled-container-color, var(--mat-sys-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mat-form-field-filled-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 4%, transparent))}.mdc-text-field--outlined{height:56px;overflow:visible;padding-right:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)));padding-left:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)) + 4px);padding-left:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)))}.mdc-floating-label{position:absolute;left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}@media(forced-colors: active){.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mat-form-field-filled-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-filled-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mat-form-field-filled-hover-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mat-form-field-filled-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mat-form-field-filled-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-filled-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mat-form-field-filled-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mat-form-field-filled-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-form-field-filled-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-form-field-filled-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-form-field-filled-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mat-form-field-outlined-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-outlined-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mat-form-field-outlined-hover-label-text-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mat-form-field-outlined-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mat-form-field-outlined-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-outlined-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mat-form-field-outlined-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mat-form-field-outlined-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-form-field-outlined-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-form-field-outlined-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-form-field-outlined-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-outline-color, var(--mat-sys-outline));border-width:var(--mat-form-field-outlined-outline-width, 1px)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-hover-outline-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-focus-outline-color, var(--mat-sys-primary))}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-hover-outline-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-focus-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mat-form-field-outlined-focus-outline-width, 2px)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)))}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:min(var(--mat-form-field-notch-max-width, 100%),calc(100% - max(12px, var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))) * 2))}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{max-width:min(100%,calc(100% - max(12px, var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))) * 2))}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mat-form-field-filled-active-indicator-height, 1px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-active-indicator-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-hover-active-indicator-color, var(--mat-sys-on-surface))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-disabled-active-indicator-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-error-active-indicator-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-error-hover-active-indicator-color, var(--mat-sys-on-error-container))}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mat-form-field-filled-focus-active-indicator-height, 2px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mat-form-field-filled-focus-active-indicator-color, var(--mat-sys-primary))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mat-form-field-filled-error-focus-active-indicator-color, var(--mat-sys-error))}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height, 56px);padding-top:var(--mat-form-field-filled-with-label-container-padding-top, 24px);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom, 8px)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding, 16px);padding-bottom:var(--mat-form-field-container-vertical-padding, 16px)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height, 56px)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height, 56px) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}@keyframes _mat-form-field-subscript-animation{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px;opacity:1;transform:translateY(0);animation:_mat-form-field-subscript-animation 0ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color, var(--mat-sys-error))}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));letter-spacing:var(--mat-form-field-subscript-text-tracking, var(--mat-sys-body-small-tracking));font-weight:var(--mat-form-field-subscript-text-weight, var(--mat-sys-body-small-weight))}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color, var(--mat-sys-on-surface))}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity, 0)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color, var(--mat-sys-neutral10))}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color, color-mix(in srgb, var(--mat-sys-neutral10) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color, var(--mat-sys-on-surface-variant))}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}@media(forced-colors: active){.mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}}@media(forced-colors: active){.mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-form-field-container-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-form-field-container-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-form-field-container-text-tracking, var(--mat-sys-body-large-tracking));font-weight:var(--mat-form-field-container-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color, var(--mat-sys-error))}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color, var(--mat-sys-on-error-container))}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color, var(--mat-sys-error))}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field-infix:has(textarea[cols]){width:auto}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field.mat-form-field-animations-enabled .mat-mdc-form-field-error-wrapper{animation-duration:300ms}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}
|
|
3
|
+
`],encapsulation:2,changeDetection:0})}return t})();var Wi=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=ae({type:t});static \u0275inj=oe({imports:[qe,mo,kr,qe]})}return t})();var Rh=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=bt({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(r,o){},styles:[`textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}
|
|
4
|
+
`],encapsulation:2,changeDetection:0})}return t})(),Vh={passive:!0},Ms=(()=>{class t{_platform=d(ze);_ngZone=d(H);_renderer=d(Yr).createRenderer(null,null);_styleLoader=d(uo);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return Rr;this._styleLoader.load(Rh);let r=Zi(e),o=this._monitoredElements.get(r);if(o)return o.subject;let n=new _,a="cdk-text-field-autofilled",s=c=>{c.animationName==="cdk-text-field-autofill-start"&&!r.classList.contains(a)?(r.classList.add(a),this._ngZone.run(()=>n.next({target:c.target,isAutofilled:!0}))):c.animationName==="cdk-text-field-autofill-end"&&r.classList.contains(a)&&(r.classList.remove(a),this._ngZone.run(()=>n.next({target:c.target,isAutofilled:!1})))},l=this._ngZone.runOutsideAngular(()=>(r.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(r,"animationstart",s,Vh)));return this._monitoredElements.set(r,{subject:n,unlisten:l}),n}stopMonitoring(e){let r=Zi(e),o=this._monitoredElements.get(r);o&&(o.unlisten(),o.subject.complete(),r.classList.remove("cdk-text-field-autofill-monitored"),r.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(r))}ngOnDestroy(){this._monitoredElements.forEach((e,r)=>this.stopMonitoring(r))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Es=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=ae({type:t});static \u0275inj=oe({})}return t})();var ks=new M("MAT_INPUT_VALUE_ACCESSOR");var Fs=(()=>{class t{isErrorState(e,r){return!!(e&&e.invalid&&(e.touched||r&&r.submitted))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Hi=class{_defaultMatcher;ngControl;_parentFormGroup;_parentForm;_stateChanges;errorState=!1;matcher;constructor(i,e,r,o,n){this._defaultMatcher=i,this.ngControl=e,this._parentFormGroup=r,this._parentForm=o,this._stateChanges=n}updateErrorState(){let i=this.errorState,e=this._parentFormGroup||this._parentForm,r=this.matcher||this._defaultMatcher,o=this.ngControl?this.ngControl.control:null,n=r?.isErrorState(o,e)??!1;n!==i&&(this.errorState=n,this._stateChanges.next())}};var Ph=["button","checkbox","file","hidden","image","radio","range","reset","submit"],Nh=new M("MAT_INPUT_CONFIG"),$w=(()=>{class t{_elementRef=d(X);_platform=d(ze);ngControl=d(ie,{optional:!0,self:!0});_autofillMonitor=d(Ms);_ngZone=d(H);_formField=d($i,{optional:!0});_renderer=d(we);_uid=d(Ge).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder;_errorStateTracker;_config=d(Nh,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer;_isNativeSelect;_isTextarea;_isInFormField;focused=!1;stateChanges=new _;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=Ke(e),this.focused&&(this.focused=!1,this.stateChanges.next())}_disabled=!1;get id(){return this._id}set id(e){this._id=e||this._uid}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(Ci.required)??!1}set required(e){this._required=Ke(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&Ji().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}_type="text";get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(e){e!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(e):this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=Ke(e)}_readonly=!1;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}_neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(e=>Ji().has(e));constructor(){let e=d(Cr,{optional:!0}),r=d(Ni,{optional:!0}),o=d(Fs),n=d(ks,{optional:!0,self:!0}),a=this._elementRef.nativeElement,s=a.nodeName.toLowerCase();n?Jr(n.value)?this._signalBasedValueAccessor=n:this._inputValueAccessor=n:this._inputValueAccessor=a,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(a,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new Hi(o,this.ngControl,r,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=s==="select",this._isTextarea=s==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=a.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&so(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let r=this._elementRef.nativeElement;r.type==="number"?(r.type="text",r.setSelectionRange(0,0),r.type="number"):r.setSelectionRange(0,0)}this.focused=e,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let r=this._elementRef.nativeElement;this._previousPlaceholder=e,e?r.setAttribute("placeholder",e):r.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){Ph.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,r=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&r&&r.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let r=this._elementRef.nativeElement;e.length?r.setAttribute("aria-describedby",e.join(" ")):r.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let r=e.target;!r.value&&r.selectionStart===0&&r.selectionEnd===0&&(r.setSelectionRange(1,1),r.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(r){return new(r||t)};static \u0275dir=g({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(r,o){r&1&&le("focus",function(){return o._focusChanged(!0)})("blur",function(){return o._focusChanged(!1)})("input",function(){return o._onInput()}),r&2&&(xt("id",o.id)("disabled",o.disabled&&!o.disabledInteractive)("required",o.required),se("name",o.name||null)("readonly",o._getReadonlyAttribute())("aria-disabled",o.disabled&&o.disabledInteractive?"true":null)("aria-invalid",o.empty&&o.required?null:o.errorState)("aria-required",o.required)("id",o.id),B("mat-input-server",o._isServer)("mat-mdc-form-field-textarea-control",o._isInFormField&&o._isTextarea)("mat-mdc-form-field-input-control",o._isInFormField)("mat-mdc-input-disabled-interactive",o.disabledInteractive)("mdc-text-field__input",o._isInFormField)("mat-mdc-native-select-inline",o._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",He]},exportAs:["matInput"],features:[w([{provide:ji,useExisting:t}]),Ce]})}return t})(),Ww=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=ae({type:t});static \u0275inj=oe({imports:[qe,Wi,Wi,Es,qe]})}return t})();export{De as a,wt as b,To as c,qt as d,Qe as e,er as f,Kt as g,So as h,Np as i,hm as j,sr as k,ft as l,gm as m,Jn as n,cr as o,LC as p,Ut as q,Ba as r,re as s,Ci as t,P as u,ie as v,s0 as w,l0 as x,Pe as y,d0 as z,Cr as A,ht as B,f0 as C,$m as D,u0 as E,Hm as F,zm as G,Ni as H,ds as I,cs as J,Zm as K,Ym as L,eh as M,ih as N,oh as O,m0 as P,h0 as Q,p0 as R,hs as S,Dr as T,Eh as U,Ar as V,kh as W,ji as X,$i as Y,As as Z,kr as _,Wi as $,Fs as aa,Hi as ba,$w as ca,Ww as da};
|