@mxtommy/kip 3.9.0-beta.12 → 3.9.0-beta.15
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/instructions/angular.instructions.md +46 -0
- package/package.json +1 -1
- package/public/3rdpartylicenses.txt +39 -39
- package/public/assets/help-docs/configuration.md +4 -4
- package/public/assets/help-docs/dashboards.md +4 -2
- package/public/assets/svg/icons.svg +1 -1
- package/public/chunk-3PHQNZHK.js +3 -0
- package/public/{chunk-H5OPY2IR.js → chunk-4BZUNPAS.js} +12 -12
- package/public/{chunk-FVALI6JO.js → chunk-4TXMPFLE.js} +1 -1
- package/public/{chunk-EZMEBXXM.js → chunk-5ZFD7GS7.js} +1 -1
- package/public/{chunk-LR2ASNFJ.js → chunk-7ROSR534.js} +1 -1
- package/public/chunk-A7JAKUEN.js +2 -0
- package/public/{chunk-4WLU7SQK.js → chunk-AWECVMCK.js} +5 -5
- package/public/{chunk-Y27DLVLA.js → chunk-B2TLSQTS.js} +1 -1
- package/public/chunk-BAGWY54D.js +11 -0
- package/public/chunk-DSUPPAGD.js +1 -0
- package/public/chunk-E44UUOOY.js +1 -0
- package/public/chunk-EURN6O7T.js +1 -0
- package/public/chunk-FI56NUZD.js +2 -0
- package/public/chunk-IQFEZZ5Q.js +6 -0
- package/public/chunk-JGYVOFIW.js +1 -0
- package/public/{chunk-BPFSYA37.js → chunk-JRXB4H3R.js} +1 -1
- package/public/chunk-KH2LYQ34.js +1 -0
- package/public/chunk-L4UIO6KZ.js +3 -0
- package/public/{chunk-22UVF7E4.js → chunk-NMRNE6VS.js} +1 -1
- package/public/chunk-PECKIPUO.js +1 -0
- package/public/{chunk-IAZ6ZOIN.js → chunk-SOVSVBLY.js} +1 -1
- package/public/chunk-UE2C4S42.js +4 -0
- package/public/chunk-UYHYM4HU.js +9 -0
- package/public/{chunk-EWHP4JKO.js → chunk-WQ6UD7J4.js} +1 -1
- package/public/index.html +18 -16
- package/public/main-IMSYBGZF.js +53 -0
- package/public/{styles-AE6JMQ4R.css → styles-PDNHT2L2.css} +1 -1
- package/public/chunk-2NEY3YTE.js +0 -2
- package/public/chunk-3FJFLAW2.js +0 -1
- package/public/chunk-5KJ57S2K.js +0 -2
- package/public/chunk-7RQUFCX7.js +0 -1
- package/public/chunk-7TU3ZWML.js +0 -4
- package/public/chunk-EO34EE4V.js +0 -3
- package/public/chunk-FEXPC4HW.js +0 -4
- package/public/chunk-G5XHTLTP.js +0 -3
- package/public/chunk-LFVNB44Z.js +0 -6
- package/public/chunk-M5VFYACR.js +0 -11
- package/public/chunk-MIQ7Z5UW.js +0 -1
- package/public/chunk-RQ23BH6Q.js +0 -1
- package/public/chunk-SWYOATEE.js +0 -2
- package/public/chunk-TOY6DYVQ.js +0 -1
- package/public/chunk-YAK5FQIH.js +0 -2
- package/public/main-J5SSLV3T.js +0 -53
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{$b as Z,$d as yr,A as ke,Aa as To,Ac as Vo,B as ho,Bb as w,Bc as No,Cb as Eo,Da as he,Db as Ee,Ea as mr,F as ri,Fa as At,G as po,Gb as te,H as go,Hb as j,I as _o,Ia as Ao,Ib as hr,J as vo,Ja as re,K as oi,Ke as Cr,L as le,Ld as tt,Le as Ko,M as Ke,Me as Qo,N as bo,Na as pe,Nc as A,Oa as ee,Ob as Fo,Pe as It,Qa as P,Qd as k,Qe as Rt,R as Qe,Sb as $,Tb as q,Ub as K,Uc as Lo,V as yo,Vd as li,Wc as Ce,We as Zo,Xc as _e,Xd as Ie,Yc as si,Zb as Je,Zd as di,_ as xo,_b as Q,_e as fi,a as T,ac as Mt,ae as Bo,af as Jo,b as Y,bc as Oo,bf as Yo,cc as Io,cd as Et,ce as Wo,cf as Xo,da as Co,dc as pr,dd as Uo,ef as ui,f as X,fa as Ze,fd as Xe,ff as en,g as ti,ga as So,h as lo,ha as ni,hc as Ro,he as Ho,ia as Do,ic as Fe,ie as zo,j as Tt,jc as oe,jd as et,je as Go,jf as mi,la as ai,lc as Oe,ld as jo,le as qo,m as h,mb as V,mc as gr,me as ce,n as co,na as H,nc as de,nd as br,ne as ci,o as y,oa as x,ob as Mo,oc as Ye,p as qe,pa as z,pb as ko,pc as ne,qb as ge,qc as O,r as fo,ra as C,rb as g,rc as I,s as uo,sc as Po,t as mo,ta as d,tc as kt,te as Ft,u as ur,uc as _r,ue as Se,vc as vr,ve as xr,x as ie,xb as xe,xc as N,xe as Ot,yb as G,ye as it,z as ii,za as wo,zb as p,zd as $o}from"./chunk-4BZUNPAS.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||{}),hi=(()=>{class t{config={httpRetryCount:3,webSocketRetryCount:5,retryIntervals:[2e3,3e3,5e3],notificationDebounceMs:0};_currentState$=new y(f.Disconnected);_status$=new y(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,i,o,n){this._currentState$.next(e);let a=this.createStatus(e,i,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,i,o,n){return{state:e,operation:this.stateToOperationCode(e),message:i,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),i=this.config.retryIntervals[e];console.log(`[ConnectionStateMachine] Scheduling HTTP retry in ${i}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"))},i)}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)}ngOnDestroy(){this.clearRetryTimer(),this.clearNotificationTimeout(),this._httpRetryCallback=null,this._webSocketRetryCallback=null,this._currentState$?.complete(),this._status$?.complete()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var rt=(()=>{class t{TIMEOUT_DURATION=1e4;connectionStateMachine=d(hi);constructor(){this.connectionStateMachine.setHTTPRetryCallback(()=>{console.log("[SignalKConnectionService] Executing HTTP retry via callback"),this.retryCurrentConnection()})}serverServiceEndpoint$=new y({operation:0,message:"Not connected",serverDescription:null,httpServiceUrl:null,WsServiceUrl:null});signalKURL;serverName;serverVersion$=new y(null);serverRoles=[];http=d(tt);currentProxyEnabled;currentSubscribeAll;validateSignalKUrl(e){return X(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 i=e;i.endsWith("signalk/")||(i+="/signalk/"),console.log(`[Connection Service] Validating Signal K server at: ${e}`);try{if(!(yield ie(this.http.get(i,{observe:"response"}).pipe(ii(5e3),Ke(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,i,o){return X(this,null,function*(){if(!e.url){console.log("[Connection Service] Connection initialization called with null or empty URL value");return}this.currentProxyEnabled=i,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 ie(this.http.get(a,{observe:"response"}).pipe(ii(this.TIMEOUT_DURATION),Ke(l=>(l.name==="TimeoutError"&&console.error("[Connection Service] Connection request timed out after "+this.TIMEOUT_DURATION+"ms"),ur(l)))));Object.assign(n,this.processEndpointResponse(s,i,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 X(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 i=yield ie(this.http.get(e,{observe:"response"}).pipe(ii(this.TIMEOUT_DURATION),Ke(n=>(n.name==="TimeoutError"&&console.error("[Connection Service] Connection request timed out after "+this.TIMEOUT_DURATION+"ms"),ur(n))))),o=this.processEndpointResponse(i,this.currentProxyEnabled,this.currentSubscribeAll);this.connectionStateMachine.onHTTPDiscoverySuccess(),this.serverServiceEndpoint$.next(o)}catch(i){let o={operation:3,message:i.message,serverDescription:null,httpServiceUrl:null,WsServiceUrl:null};this.connectionStateMachine.onHTTPDiscoveryError(i.message),this.serverServiceEndpoint$.next(o),this.handleError(i)}})}processEndpointResponse(e,i,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(i)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 i=e.status===0?`[Connection Service] ${e.name}: ${e.message}`:`[Connection Service] Backend returned code ${e.status}, body was: ${e.error}`;throw console.error(i),e}getServiceEndpointStatusAsO(){return this.serverServiceEndpoint$.asObservable()}setServerInfo(e,i,o){this.serverName=e,this.serverRoles=o,console.log(`[Connection Service] Server Name: ${e}, Version: ${i}, Roles: ${JSON.stringify(o)}`)}get skServerName(){return this.serverName}get skServerVersion(){return this.serverVersion$.getValue()}get skServerRoles(){return this.serverRoles}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var kl="/signalk/v1/",tn="auth/login",El="auth/logout",Fl="auth/validate",Ol=60,pi=(()=>{class t{http=d(tt);conn=d(rt);_IsLoggedIn$=new y(!1);isLoggedIn$=this._IsLoggedIn$.asObservable();_authToken$=new y(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(i=>!!i&&i.expiry!==null),yo((i,o)=>i.expiry===o.expiry),ke(i=>{let o=this.getTokenExpirationDate(i.expiry,Ol),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)}),So(i=>_o(i))).subscribe(()=>{this.handleTokenRenewal()}),this.connectionEndpointSubscription=this.conn.serverServiceEndpoint$.subscribe(i=>{if(i.operation===2){let o=i.httpServiceUrl.substring(0,i.httpServiceUrl.length-4);this.loginUrl=o+tn,this.logoutUrl=o+El,this.validateTokenUrl=o+Fl}})}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 i=JSON.parse(localStorage.getItem("connectionConfig"));this.login({usr:i.loginName,pwd:i.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 X(this,arguments,function*({usr:e,pwd:i,newUrl:o}){let a;if(o?a=o.replace(/\/+$/,"")+kl+tn: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 ie(this.http.post(a,{username:e,password:i},{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 i=JSON.parse(atob(e.split(".")[1])).exp,o={token:null,expiry:null,isDeviceAccessToken:!1};i===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(i)?console.log("[Authentication Service] Received expired Session Token from server"):(o.token=e,o.expiry=i,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,i){let o=new Date(0);if(i){let n=new Date(0);n.setUTCSeconds(e-i),o=n}else o.setUTCSeconds(e);return o}renewToken(){return this.http.post(this.validateTokenUrl,null,{observe:"response"})}logout(e){return X(this,null,function*(){localStorage.removeItem("authorization_token"),yield ie(this.http.put(this.logoutUrl,null)).then(()=>{this._IsLoggedIn$.next(!1),e||this._authToken$.next(null),console.log("[Authentication Service] User logged out")}).catch(i=>{console.error(i)})})}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 i=JSON.parse(atob(e.split(".")[1])).exp,o={token:null,expiry:null,isDeviceAccessToken:!0};i===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(i)?console.log("[Authentication Service] Received expired Device Access Token from server"):(o.token=e,o.expiry=i,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(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Il=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Sr=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");let r=t.match(Il);if(!r)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return r.shift(),r},rn=t=>t==="*"||t==="x"||t==="X",on=t=>{let r=parseInt(t,10);return isNaN(r)?t:r},Rl=(t,r)=>typeof t!=typeof r?[String(t),String(r)]:[t,r],Pl=(t,r)=>{if(rn(t)||rn(r))return 0;let[e,i]=Rl(on(t),on(r));return e>i?1:e<i?-1:0},Dr=(t,r)=>{for(let e=0;e<Math.max(t.length,r.length);e++){let i=Pl(t[e]||"0",r[e]||"0");if(i!==0)return i}return 0};var nn=(t,r)=>{let e=Sr(t),i=Sr(r),o=e.pop(),n=i.pop(),a=Dr(e,i);return a!==0?a:o&&n?Dr(o.split("."),n.split(".")):o||n?o?-1:1:0};var wr=(t,r,e)=>{Vl(e);let i=nn(t,r);return sn[e].includes(i)},sn={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},an=Object.keys(sn),Vl=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(an.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${an.join("|")}`)};var ln=(()=>{class t{server=d(rt);http=d(tt);_auth=d(pi);serverEndpoint=null;isAppDataSupported=!1;configFileVersion=null;sharedConfigName;InitConfig=null;storageServiceReady$=new y(!1);_isLoggedIn=!1;_networkStatus=void 0;patchQueue$=new h;patch=function(e){return this.http.post(e.url,e.document).pipe(Do(()=>console.log("[Storage Service] Remote config patch request completed successfully")),Ke(i=>this.handleError(i)))};constructor(){let e=this.server;this._auth.isLoggedIn$.pipe(k()).subscribe(i=>{this._isLoggedIn=i,this.isStorageServiceReady()}),e.serverServiceEndpoint$.pipe(k()).subscribe(i=>{this._networkStatus=i,this.isStorageServiceReady()}),e.serverVersion$.pipe(k()).subscribe(i=>{i&&(this.isAppDataSupported=wr(i,"1.27.0",">="))}),this.patchQueue$.pipe(bo(i=>this.patch(i)),k()).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 X(this,null,function*(){this.ensureReady();let i=[];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 ie(this.http.get(n)).then(s=>{for(let l of s)i.push({scope:"global",name:l});console.log("[Storage Service] Retrieved Global config list")}).catch(s=>{this.handleError(s)}),yield ie(this.http.get(a)).then(s=>{for(let l of s)i.push({scope:"user",name:l});console.log("[Storage Service] Retrieved User config list")}).catch(s=>{this.handleError(s)}),i})}getConfig(e,i,o,n){return X(this,null,function*(){this.ensureReady();let a=null,s=this.serverEndpoint+e+"/kip/"+this.configFileVersion+"/"+i;return o&&(s=this.serverEndpoint+e+"/kip/"+o+"/"+i),yield ie(this.http.get(s)).then(l=>{a=l,console.log(`[Storage Service] Retrieved config [${i}] from [${e}] scope`),n&&(this.InitConfig=l)}).catch(l=>{this.handleError(l)}),a})}setConfig(e,i,o,n){return X(this,null,function*(){this.ensureReady();let a=this.serverEndpoint+e+"/kip/"+this.configFileVersion+"/"+i,s=null;return n&&(a=this.serverEndpoint+e+"/kip/"+n+"/"+i),yield ie(this.http.post(a,o)).then(l=>{console.log(`[Storage Service] Saved config [${i}] to [${e}] scope`),s=l}).catch(l=>{this.handleError(l)}),s})}patchConfig(e,i,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:i}];break;case"IThemeConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/theme/themeName`,value:i.themeName}];break;case"IWidgetConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/widget`,value:i}];break;case"ILayoutConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/layout`,value:i}];break;case"Dashboards":a=[{op:"replace",path:`/${this.sharedConfigName}/dashboards`,value:i}];break;case"Array<IUnitDefaults>":a=[{op:"replace",path:`/${this.sharedConfigName}/app/unitDefaults`,value:i}];break;case"Array<IDatasetDef>":a=[{op:"replace",path:`/${this.sharedConfigName}/app/dataSets`,value:i}];break;case"INotificationConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/app/notificationConfig`,value:i}];break;default:console.warn("[Storage Service] JSON Patch request type unknown");break}let s={url:n,document:a};this.patchQueue$.next(s)}patchGlobal(e,i,o,n,a){this.ensureReady();let s=this.serverEndpoint+i+"/kip/"+this.configFileVersion;a&&(s=this.serverEndpoint+i+"/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,i,o){this.ensureReady();let n=this.serverEndpoint+e+"/kip/"+this.configFileVersion;o&&(n=this.serverEndpoint+e+"/kip/"+o);let a=[{op:"remove",path:`/${i}`}],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(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Re=class{static create(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){let e=Math.random()*16|0;return(r=="x"?e:e&3|8).toString(16)})}};var Pt={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 gi={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 dn={configVersion:11,autoNightMode:!0,redNightMode:!1,nightModeBrightness:.27,dataSets:[],unitDefaults:gi,notificationConfig:Pt},cn={themeName:""};var fn={configVersion:11,kipUUID:Re.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}}},Ar=[{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"}}}}]}],Mr={themeName:""};var Ng={configVersion:11,kipUUID:Re.create(),signalKUrl:"https://demo.signalk.org",proxyEnabled:!1,signalKSubscribeAll:!1,useDeviceToken:!1,loginName:null,loginPassword:null,useSharedConfig:!1,sharedConfigName:"default"};var Nl="",Ll=11,Vt=11,Kg=(()=>{class t{storage=d(ln);unitDefaults=new y({});themeName=new y(Nl);kipKNotificationConfig=new y(Pt);autoNightMode=new y(!1);redNightMode=new y(!1);nightModeBrightness=new y(1);proxyEnabled=!1;signalKSubscribeAll=!1;useDeviceToken=!1;loginName;loginPassword;useSharedConfig;sharedConfigName;activeConfig={app:null,theme:null,dashboards:null};kipUUID;signalkUrl;widgets;_dashboards=[];dataSets=[];configUpgrade=re(!1);constructor(){if(console.log("[AppSettings Service] Service startup..."),this.storage.activeConfigFileVersion=Ll,!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 i={app:null,theme:null,dashboards:null};i.app=this.loadConfigFromLocalStorage("appConfig"),i.app.configVersion!==Vt&&this.checkConfigUpgradeRequired(!0),i.dashboards=this.loadConfigFromLocalStorage("dashboardsConfig"),i.theme=this.loadConfigFromLocalStorage("themeConfig"),this.activeConfig=i,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(i=>X(this,null,function*(){for(let o of i)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(i=>{console.error("[AppSettings Service] Error fetching configuration data:",i)})}loadConfigFromLocalStorage(e){let i=JSON.parse(localStorage.getItem(e));if(i===null)switch(console.log(`[AppSettings Service] Error loading ${e} config. Force loading ${e} defaults`),e){case"appConfig":i=this.getDefaultAppConfig();break;case"connectionConfig":i=this.getDefaultConnectionConfig();break;case"dashboardsConfig":i=this.getDefaultDashboardsConfig();break;case"themeConfig":i=this.getDefaultThemeConfig();break;default:console.error(`[AppSettings Service] Invalid ${e} default config requested`);break}if(e==="connectionConfig"&&i.configVersion!==Vt)switch(console.log(`[AppSettings Service] Invalid ${e} version. Force loading defaults`),e){case"connectionConfig":i=this.getDefaultConnectionConfig();break}return i}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 i={themeName:e};this.storage.patchConfig("IThemeConfig",i)}else this.saveThemeConfigToLocalStorage()}getThemeName(){return this.themeName.getValue()}getAutoNightModeAsO(){return this.autoNightMode.asObservable()}setAutoNightMode(e){this.autoNightMode.next(e);let i=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",i):this.saveAppConfigToLocalStorage()}getAutoNightMode(){return this.autoNightMode.getValue()}getRedNightModeAsO(){return this.redNightMode.asObservable()}getRedNightMode(){return this.redNightMode.getValue()}setRedNightMode(e){this.redNightMode.next(e);let i=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",i):this.saveAppConfigToLocalStorage()}getNightModeBrightness(){return this.nightModeBrightness.getValue()}setNightModeBrightness(e){this.nightModeBrightness.next(e);let i=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",i):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(i=>{console.error("[AppSettings Service] Error replacing server config name: "+this.sharedConfigName+", with default configuration values",i)}):this.reloadApp()}replaceConfig(e,i,o){let n=JSON.stringify(i);localStorage.setItem(e,n),o&&this.reloadApp()}loadDemoConfig(){if(this.useSharedConfig){let e={app:Tr,dashboards:Ar,theme:Mr};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",Ar),this.replaceConfig("themeConfig",Mr,!0)}reloadApp(){console.log("[AppSettings Service] Reload app"),!window.__KIP_TEST__&&location.replace("./")}buildAppStorageObject(){return{configVersion:Vt,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:Vt,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=dn;return e.notificationConfig=Pt,e.unitDefaults=gi,e.configVersion=Vt,localStorage.setItem("appConfig",JSON.stringify(e)),e}getDefaultConnectionConfig(){let e=fn;return e.kipUUID=Re.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=cn;return localStorage.setItem("themeConfig",JSON.stringify(e)),e}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ul(){this.__data__=[],this.size=0}var un=Ul;function jl(t,r){return t===r||t!==t&&r!==r}var ve=jl;function $l(t,r){for(var e=t.length;e--;)if(ve(t[e][0],r))return e;return-1}var Pe=$l;var Bl=Array.prototype,Wl=Bl.splice;function Hl(t){var r=this.__data__,e=Pe(r,t);if(e<0)return!1;var i=r.length-1;return e==i?r.pop():Wl.call(r,e,1),--this.size,!0}var mn=Hl;function zl(t){var r=this.__data__,e=Pe(r,t);return e<0?void 0:r[e][1]}var hn=zl;function Gl(t){return Pe(this.__data__,t)>-1}var pn=Gl;function ql(t,r){var e=this.__data__,i=Pe(e,t);return i<0?(++this.size,e.push([t,r])):e[i][1]=r,this}var gn=ql;function ot(t){var r=-1,e=t==null?0:t.length;for(this.clear();++r<e;){var i=t[r];this.set(i[0],i[1])}}ot.prototype.clear=un;ot.prototype.delete=mn;ot.prototype.get=hn;ot.prototype.has=pn;ot.prototype.set=gn;var Ve=ot;function Kl(){this.__data__=new Ve,this.size=0}var _n=Kl;function Ql(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e}var vn=Ql;function Zl(t){return this.__data__.get(t)}var bn=Zl;function Jl(t){return this.__data__.has(t)}var yn=Jl;var Yl=typeof global=="object"&&global&&global.Object===Object&&global,_i=Yl;var Xl=typeof self=="object"&&self&&self.Object===Object&&self,ed=_i||Xl||Function("return this")(),M=ed;var td=M.Symbol,ae=td;var xn=Object.prototype,id=xn.hasOwnProperty,rd=xn.toString,Nt=ae?ae.toStringTag:void 0;function od(t){var r=id.call(t,Nt),e=t[Nt];try{t[Nt]=void 0;var i=!0}catch{}var o=rd.call(t);return i&&(r?t[Nt]=e:delete t[Nt]),o}var Cn=od;var nd=Object.prototype,ad=nd.toString;function sd(t){return ad.call(t)}var Sn=sd;var ld="[object Null]",dd="[object Undefined]",Dn=ae?ae.toStringTag:void 0;function cd(t){return t==null?t===void 0?dd:ld:Dn&&Dn in Object(t)?Cn(t):Sn(t)}var fe=cd;function fd(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}var L=fd;var ud="[object AsyncFunction]",md="[object Function]",hd="[object GeneratorFunction]",pd="[object Proxy]";function gd(t){if(!L(t))return!1;var r=fe(t);return r==md||r==hd||r==ud||r==pd}var nt=gd;var _d=M["__core-js_shared__"],vi=_d;var wn=(function(){var t=/[^.]+$/.exec(vi&&vi.keys&&vi.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function vd(t){return!!wn&&wn in t}var Tn=vd;var bd=Function.prototype,yd=bd.toString;function xd(t){if(t!=null){try{return yd.call(t)}catch{}try{return t+""}catch{}}return""}var De=xd;var Cd=/[\\^$.*+?()[\]{}|]/g,Sd=/^\[object .+?Constructor\]$/,Dd=Function.prototype,wd=Object.prototype,Td=Dd.toString,Ad=wd.hasOwnProperty,Md=RegExp("^"+Td.call(Ad).replace(Cd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kd(t){if(!L(t)||Tn(t))return!1;var r=nt(t)?Md:Sd;return r.test(De(t))}var An=kd;function Ed(t,r){return t?.[r]}var Mn=Ed;function Fd(t,r){var e=Mn(t,r);return An(e)?e:void 0}var J=Fd;var Od=J(M,"Map"),Ne=Od;var Id=J(Object,"create"),we=Id;function Rd(){this.__data__=we?we(null):{},this.size=0}var kn=Rd;function Pd(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}var En=Pd;var Vd="__lodash_hash_undefined__",Nd=Object.prototype,Ld=Nd.hasOwnProperty;function Ud(t){var r=this.__data__;if(we){var e=r[t];return e===Vd?void 0:e}return Ld.call(r,t)?r[t]:void 0}var Fn=Ud;var jd=Object.prototype,$d=jd.hasOwnProperty;function Bd(t){var r=this.__data__;return we?r[t]!==void 0:$d.call(r,t)}var On=Bd;var Wd="__lodash_hash_undefined__";function Hd(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=we&&r===void 0?Wd:r,this}var In=Hd;function at(t){var r=-1,e=t==null?0:t.length;for(this.clear();++r<e;){var i=t[r];this.set(i[0],i[1])}}at.prototype.clear=kn;at.prototype.delete=En;at.prototype.get=Fn;at.prototype.has=On;at.prototype.set=In;var kr=at;function zd(){this.size=0,this.__data__={hash:new kr,map:new(Ne||Ve),string:new kr}}var Rn=zd;function Gd(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}var Pn=Gd;function qd(t,r){var e=t.__data__;return Pn(r)?e[typeof r=="string"?"string":"hash"]:e.map}var Le=qd;function Kd(t){var r=Le(this,t).delete(t);return this.size-=r?1:0,r}var Vn=Kd;function Qd(t){return Le(this,t).get(t)}var Nn=Qd;function Zd(t){return Le(this,t).has(t)}var Ln=Zd;function Jd(t,r){var e=Le(this,t),i=e.size;return e.set(t,r),this.size+=e.size==i?0:1,this}var Un=Jd;function st(t){var r=-1,e=t==null?0:t.length;for(this.clear();++r<e;){var i=t[r];this.set(i[0],i[1])}}st.prototype.clear=Rn;st.prototype.delete=Vn;st.prototype.get=Nn;st.prototype.has=Ln;st.prototype.set=Un;var bi=st;var Yd=200;function Xd(t,r){var e=this.__data__;if(e instanceof Ve){var i=e.__data__;if(!Ne||i.length<Yd-1)return i.push([t,r]),this.size=++e.size,this;e=this.__data__=new bi(i)}return e.set(t,r),this.size=e.size,this}var jn=Xd;function lt(t){var r=this.__data__=new Ve(t);this.size=r.size}lt.prototype.clear=_n;lt.prototype.delete=vn;lt.prototype.get=bn;lt.prototype.has=yn;lt.prototype.set=jn;var Ue=lt;function ec(t,r){for(var e=-1,i=t==null?0:t.length;++e<i&&r(t[e],e,t)!==!1;);return t}var $n=ec;var tc=(function(){try{var t=J(Object,"defineProperty");return t({},"",{}),t}catch{}})(),dt=tc;function ic(t,r,e){r=="__proto__"&&dt?dt(t,r,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[r]=e}var ct=ic;var rc=Object.prototype,oc=rc.hasOwnProperty;function nc(t,r,e){var i=t[r];(!(oc.call(t,r)&&ve(i,e))||e===void 0&&!(r in t))&&ct(t,r,e)}var yi=nc;function ac(t,r,e,i){var o=!e;e||(e={});for(var n=-1,a=r.length;++n<a;){var s=r[n],l=i?i(e[s],t[s],s,e,t):void 0;l===void 0&&(l=t[s]),o?ct(e,s,l):yi(e,s,l)}return e}var be=ac;function sc(t,r){for(var e=-1,i=Array(t);++e<t;)i[e]=r(e);return i}var Bn=sc;function lc(t){return t!=null&&typeof t=="object"}var R=lc;var dc="[object Arguments]";function cc(t){return R(t)&&fe(t)==dc}var Er=cc;var Wn=Object.prototype,fc=Wn.hasOwnProperty,uc=Wn.propertyIsEnumerable,mc=Er((function(){return arguments})())?Er:function(t){return R(t)&&fc.call(t,"callee")&&!uc.call(t,"callee")},Lt=mc;var hc=Array.isArray,se=hc;function pc(){return!1}var Hn=pc;var qn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zn=qn&&typeof module=="object"&&module&&!module.nodeType&&module,gc=zn&&zn.exports===qn,Gn=gc?M.Buffer:void 0,_c=Gn?Gn.isBuffer:void 0,vc=_c||Hn,Te=vc;var bc=9007199254740991,yc=/^(?:0|[1-9]\d*)$/;function xc(t,r){var e=typeof t;return r=r??bc,!!r&&(e=="number"||e!="symbol"&&yc.test(t))&&t>-1&&t%1==0&&t<r}var xi=xc;var Cc=9007199254740991;function Sc(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Cc}var Ci=Sc;var Dc="[object Arguments]",wc="[object Array]",Tc="[object Boolean]",Ac="[object Date]",Mc="[object Error]",kc="[object Function]",Ec="[object Map]",Fc="[object Number]",Oc="[object Object]",Ic="[object RegExp]",Rc="[object Set]",Pc="[object String]",Vc="[object WeakMap]",Nc="[object ArrayBuffer]",Lc="[object DataView]",Uc="[object Float32Array]",jc="[object Float64Array]",$c="[object Int8Array]",Bc="[object Int16Array]",Wc="[object Int32Array]",Hc="[object Uint8Array]",zc="[object Uint8ClampedArray]",Gc="[object Uint16Array]",qc="[object Uint32Array]",D={};D[Uc]=D[jc]=D[$c]=D[Bc]=D[Wc]=D[Hc]=D[zc]=D[Gc]=D[qc]=!0;D[Dc]=D[wc]=D[Nc]=D[Tc]=D[Lc]=D[Ac]=D[Mc]=D[kc]=D[Ec]=D[Fc]=D[Oc]=D[Ic]=D[Rc]=D[Pc]=D[Vc]=!1;function Kc(t){return R(t)&&Ci(t.length)&&!!D[fe(t)]}var Kn=Kc;function Qc(t){return function(r){return t(r)}}var ft=Qc;var Qn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ut=Qn&&typeof module=="object"&&module&&!module.nodeType&&module,Zc=Ut&&Ut.exports===Qn,Fr=Zc&&_i.process,Jc=(function(){try{var t=Ut&&Ut.require&&Ut.require("util").types;return t||Fr&&Fr.binding&&Fr.binding("util")}catch{}})(),Ae=Jc;var Zn=Ae&&Ae.isTypedArray,Yc=Zn?ft(Zn):Kn,ut=Yc;var Xc=Object.prototype,ef=Xc.hasOwnProperty;function tf(t,r){var e=se(t),i=!e&&Lt(t),o=!e&&!i&&Te(t),n=!e&&!i&&!o&&ut(t),a=e||i||o||n,s=a?Bn(t.length,String):[],l=s.length;for(var c in t)(r||ef.call(t,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||n&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||xi(c,l)))&&s.push(c);return s}var Si=tf;var rf=Object.prototype;function of(t){var r=t&&t.constructor,e=typeof r=="function"&&r.prototype||rf;return t===e}var mt=of;function nf(t,r){return function(e){return t(r(e))}}var Di=nf;var af=Di(Object.keys,Object),Jn=af;var sf=Object.prototype,lf=sf.hasOwnProperty;function df(t){if(!mt(t))return Jn(t);var r=[];for(var e in Object(t))lf.call(t,e)&&e!="constructor"&&r.push(e);return r}var Yn=df;function cf(t){return t!=null&&Ci(t.length)&&!nt(t)}var je=cf;function ff(t){return je(t)?Si(t):Yn(t)}var ht=ff;function uf(t,r){return t&&be(r,ht(r),t)}var Xn=uf;function mf(t){var r=[];if(t!=null)for(var e in Object(t))r.push(e);return r}var ea=mf;var hf=Object.prototype,pf=hf.hasOwnProperty;function gf(t){if(!L(t))return ea(t);var r=mt(t),e=[];for(var i in t)i=="constructor"&&(r||!pf.call(t,i))||e.push(i);return e}var ta=gf;function _f(t){return je(t)?Si(t,!0):ta(t)}var ye=_f;function vf(t,r){return t&&be(r,ye(r),t)}var ia=vf;var aa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ra=aa&&typeof module=="object"&&module&&!module.nodeType&&module,bf=ra&&ra.exports===aa,oa=bf?M.Buffer:void 0,na=oa?oa.allocUnsafe:void 0;function yf(t,r){if(r)return t.slice();var e=t.length,i=na?na(e):new t.constructor(e);return t.copy(i),i}var wi=yf;function xf(t,r){var e=-1,i=t.length;for(r||(r=Array(i));++e<i;)r[e]=t[e];return r}var Ti=xf;function Cf(t,r){for(var e=-1,i=t==null?0:t.length,o=0,n=[];++e<i;){var a=t[e];r(a,e,t)&&(n[o++]=a)}return n}var sa=Cf;function Sf(){return[]}var Ai=Sf;var Df=Object.prototype,wf=Df.propertyIsEnumerable,la=Object.getOwnPropertySymbols,Tf=la?function(t){return t==null?[]:(t=Object(t),sa(la(t),function(r){return wf.call(t,r)}))}:Ai,pt=Tf;function Af(t,r){return be(t,pt(t),r)}var da=Af;function Mf(t,r){for(var e=-1,i=r.length,o=t.length;++e<i;)t[o+e]=r[e];return t}var Mi=Mf;var kf=Di(Object.getPrototypeOf,Object),gt=kf;var Ef=Object.getOwnPropertySymbols,Ff=Ef?function(t){for(var r=[];t;)Mi(r,pt(t)),t=gt(t);return r}:Ai,ki=Ff;function Of(t,r){return be(t,ki(t),r)}var ca=Of;function If(t,r,e){var i=r(t);return se(t)?i:Mi(i,e(t))}var Ei=If;function Rf(t){return Ei(t,ht,pt)}var jt=Rf;function Pf(t){return Ei(t,ye,ki)}var fa=Pf;var Vf=J(M,"DataView"),Fi=Vf;var Nf=J(M,"Promise"),Oi=Nf;var Lf=J(M,"Set"),Ii=Lf;var Uf=J(M,"WeakMap"),Ri=Uf;var ua="[object Map]",jf="[object Object]",ma="[object Promise]",ha="[object Set]",pa="[object WeakMap]",ga="[object DataView]",$f=De(Fi),Bf=De(Ne),Wf=De(Oi),Hf=De(Ii),zf=De(Ri),He=fe;(Fi&&He(new Fi(new ArrayBuffer(1)))!=ga||Ne&&He(new Ne)!=ua||Oi&&He(Oi.resolve())!=ma||Ii&&He(new Ii)!=ha||Ri&&He(new Ri)!=pa)&&(He=function(t){var r=fe(t),e=r==jf?t.constructor:void 0,i=e?De(e):"";if(i)switch(i){case $f:return ga;case Bf:return ua;case Wf:return ma;case Hf:return ha;case zf:return pa}return r});var Me=He;var Gf=Object.prototype,qf=Gf.hasOwnProperty;function Kf(t){var r=t.length,e=new t.constructor(r);return r&&typeof t[0]=="string"&&qf.call(t,"index")&&(e.index=t.index,e.input=t.input),e}var _a=Kf;var Qf=M.Uint8Array,_t=Qf;function Zf(t){var r=new t.constructor(t.byteLength);return new _t(r).set(new _t(t)),r}var vt=Zf;function Jf(t,r){var e=r?vt(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}var va=Jf;var Yf=/\w*$/;function Xf(t){var r=new t.constructor(t.source,Yf.exec(t));return r.lastIndex=t.lastIndex,r}var ba=Xf;var ya=ae?ae.prototype:void 0,xa=ya?ya.valueOf:void 0;function eu(t){return xa?Object(xa.call(t)):{}}var Ca=eu;function tu(t,r){var e=r?vt(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}var Pi=tu;var iu="[object Boolean]",ru="[object Date]",ou="[object Map]",nu="[object Number]",au="[object RegExp]",su="[object Set]",lu="[object String]",du="[object Symbol]",cu="[object ArrayBuffer]",fu="[object DataView]",uu="[object Float32Array]",mu="[object Float64Array]",hu="[object Int8Array]",pu="[object Int16Array]",gu="[object Int32Array]",_u="[object Uint8Array]",vu="[object Uint8ClampedArray]",bu="[object Uint16Array]",yu="[object Uint32Array]";function xu(t,r,e){var i=t.constructor;switch(r){case cu:return vt(t);case iu:case ru:return new i(+t);case fu:return va(t,e);case uu:case mu:case hu:case pu:case gu:case _u:case vu:case bu:case yu:return Pi(t,e);case ou:return new i;case nu:case lu:return new i(t);case au:return ba(t);case su:return new i;case du:return Ca(t)}}var Sa=xu;var Da=Object.create,Cu=(function(){function t(){}return function(r){if(!L(r))return{};if(Da)return Da(r);t.prototype=r;var e=new t;return t.prototype=void 0,e}})(),wa=Cu;function Su(t){return typeof t.constructor=="function"&&!mt(t)?wa(gt(t)):{}}var Vi=Su;var Du="[object Map]";function wu(t){return R(t)&&Me(t)==Du}var Ta=wu;var Aa=Ae&&Ae.isMap,Tu=Aa?ft(Aa):Ta,Ma=Tu;var Au="[object Set]";function Mu(t){return R(t)&&Me(t)==Au}var ka=Mu;var Ea=Ae&&Ae.isSet,ku=Ea?ft(Ea):ka,Fa=ku;var Eu=1,Fu=2,Ou=4,Oa="[object Arguments]",Iu="[object Array]",Ru="[object Boolean]",Pu="[object Date]",Vu="[object Error]",Ia="[object Function]",Nu="[object GeneratorFunction]",Lu="[object Map]",Uu="[object Number]",Ra="[object Object]",ju="[object RegExp]",$u="[object Set]",Bu="[object String]",Wu="[object Symbol]",Hu="[object WeakMap]",zu="[object ArrayBuffer]",Gu="[object DataView]",qu="[object Float32Array]",Ku="[object Float64Array]",Qu="[object Int8Array]",Zu="[object Int16Array]",Ju="[object Int32Array]",Yu="[object Uint8Array]",Xu="[object Uint8ClampedArray]",em="[object Uint16Array]",tm="[object Uint32Array]",S={};S[Oa]=S[Iu]=S[zu]=S[Gu]=S[Ru]=S[Pu]=S[qu]=S[Ku]=S[Qu]=S[Zu]=S[Ju]=S[Lu]=S[Uu]=S[Ra]=S[ju]=S[$u]=S[Bu]=S[Wu]=S[Yu]=S[Xu]=S[em]=S[tm]=!0;S[Vu]=S[Ia]=S[Hu]=!1;function Ni(t,r,e,i,o,n){var a,s=r&Eu,l=r&Fu,c=r&Ou;if(e&&(a=o?e(t,i,o,n):e(t)),a!==void 0)return a;if(!L(t))return t;var _=se(t);if(_){if(a=_a(t),!s)return Ti(t,a)}else{var m=Me(t),u=m==Ia||m==Nu;if(Te(t))return wi(t,s);if(m==Ra||m==Oa||u&&!o){if(a=l||u?{}:Vi(t),!s)return l?ca(t,ia(a,t)):da(t,Xn(a,t))}else{if(!S[m])return o?t:{};a=Sa(t,m,s)}}n||(n=new Ue);var b=n.get(t);if(b)return b;n.set(t,a),Fa(t)?t.forEach(function(F){a.add(Ni(F,r,e,F,t,n))}):Ma(t)&&t.forEach(function(F,U){a.set(U,Ni(F,r,e,U,t,n))});var v=c?l?fa:jt:l?ye:ht,E=_?void 0:v(t);return $n(E||t,function(F,U){E&&(U=F,F=t[U]),yi(a,U,Ni(F,r,e,U,t,n))}),a}var Pa=Ni;var im=1,rm=4;function om(t){return Pa(t,im|rm)}var Or=om;var nm={url:"",deserializer:t=>JSON.parse(t.data),serializer:t=>JSON.stringify(t)},am="WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }",Li=class t extends co{constructor(r,e){if(super(),this._socket=null,r instanceof Tt)this.destination=e,this.source=r;else{let i=this._config=Object.assign({},nm);if(this._output=new h,typeof r=="string")i.url=r;else for(let o in r)r.hasOwnProperty(o)&&(i[o]=r[o]);if(!i.WebSocketCtor&&WebSocket)i.WebSocketCtor=WebSocket;else if(!i.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new qe}}lift(r){let e=new t(this._config,this.destination);return e.operator=r,e.source=this,e}_resetState(){this._socket=null,this.source||(this.destination=new qe),this._output=new h}multiplex(r,e,i){let o=this;return new Tt(n=>{try{o.next(r())}catch(s){n.error(s)}let a=o.subscribe({next:s=>{try{i(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:r,protocol:e,url:i,binaryType:o}=this._config,n=this._output,a=null;try{a=e?new r(i,e):new r(i),this._socket=a,o&&(this._socket.binaryType=o)}catch(l){n.error(l);return}let s=new ti(()=>{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:_}=this._config;_&&_.next(l);let m=this.destination;this.destination=lo.create(u=>{if(a.readyState===1)try{let{serializer:b}=this._config;a.send(b(u))}catch(b){this.destination.error(b)}},u=>{let{closingObserver:b}=this._config;b&&b.next(void 0),u&&u.code?a.close(u.code,u.reason):n.error(new TypeError(am)),this._resetState()},()=>{let{closingObserver:u}=this._config;u&&u.next(void 0),a.close(),this._resetState()}),m&&m instanceof qe&&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(r){let{source:e}=this;return e?e.subscribe(r):(this._socket||this._connectSocket(),this._output.subscribe(r),r.add(()=>{let{_socket:i}=this;this._output.observers.length===0&&(i&&(i.readyState===1||i.readyState===0)&&i.close(),this._resetState())}),r)}unsubscribe(){let{_socket:r}=this;r&&(r.readyState===1||r.readyState===0)&&r.close(),this._resetState(),super.unsubscribe()}};function Ir(t){return new Li(t)}var Va=(()=>{class t{_destroyRef=d(At);_skRequests$=new h;_skNotificationsMsg$=new h;_skValue$=new h;_skMetadata$=new h;_vesselSelfUrn$=new h;_selfUrn=void 0;streamEndpoint={operation:0,message:"Not connected",hasToken:!1};streamEndpoint$=new y(this.streamEndpoint);endpointWS=null;SubscriptionType="self";WS_CONNECTION_SUBSCRIBE="?subscribe=";WS_CONNECTION_META="&sendMeta=all";socketWS$;socketWSCloseEvent$=new h;socketWSOpenEvent$=new h;authToken=null;server=d(rt);auth=d(pi);connectionStateMachine=d(hi);zones=d(j);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(k(this._destroyRef)).subscribe(e=>{e.operation===2&&(this.endpointWS=e.WsServiceUrl,e.subscribeAll?this.SubscriptionType="all":this.SubscriptionType="self")}),this.connectionStateMachine.state$.pipe(k(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(k(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(k(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(k(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)}),go(document,"visibilitychange").pipe(k(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(k(this._destroyRef)).subscribe({next:i=>this.processWebsocketMessage(i),error:i=>{console.error("[Delta Service] WebSocket error:",i)}})})}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,Ir({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,i){e.forEach(o=>{o.meta!==void 0&&o.meta.forEach(n=>this.parseSkMeta(n,i)),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:i,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:i,path:`${n.path}.${a}`,source:o.$source,timestamp:o.timestamp,value:n.value[a]};this._skValue$.next(s)});else{let a={context:i,path:n.path,source:o.$source,timestamp:o.timestamp,value:n.value};this._skValue$.next(a)}})})}canFlattenCompletely(e,i,o,n=0){if(n>=i)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],i,o,n+1))return!1;return!0}flattenObjectValue(e,i,o=0){let n=[];if(typeof e!="object"||e===null||o>=this.FLATTEN_CONFIG.maxDepth)return[{path:i,value:e}];let a=Object.keys(e);for(let s of a){let l=i?`${i}.${s}`:s,c=this.flattenObjectValue(e[s],l,o+1);n.push(...c)}return n}parseSkMeta(e,i){e.value.properties!==void 0?Object.keys(e.value.properties).forEach(o=>{this._skMetadata$.next({context:i,path:`${e.path}.${o}`,meta:e.value.properties[o]})}):this._skMetadata$.next({context:i,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(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function sm(t){return t}var Ui=sm;function lm(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}var Na=lm;var dm=800,cm=16,fm=Date.now;function um(t){var r=0,e=0;return function(){var i=fm(),o=cm-(i-e);if(e=i,o>0){if(++r>=dm)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}var La=um;function mm(t){return function(){return t}}var Ua=mm;var hm=dt?function(t,r){return dt(t,"toString",{configurable:!0,enumerable:!1,value:Ua(r),writable:!0})}:Ui,ja=hm;var pm=La(ja),$a=pm;var Ba=Math.max;function gm(t,r,e){return r=Ba(r===void 0?t.length-1:r,0),function(){for(var i=arguments,o=-1,n=Ba(i.length-r,0),a=Array(n);++o<n;)a[o]=i[r+o];o=-1;for(var s=Array(r+1);++o<r;)s[o]=i[o];return s[r]=e(a),Na(t,this,s)}}var Wa=gm;function _m(t,r){return $a(Wa(t,r,Ui),t+"")}var Ha=_m;function vm(t,r,e){if(!L(e))return!1;var i=typeof r;return(i=="number"?je(e)&&xi(r,e.length):i=="string"&&r in e)?ve(e[r],t):!1}var za=vm;function bm(t){return Ha(function(r,e){var i=-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&&za(e[0],e[1],a)&&(n=o<3?void 0:n,o=1),r=Object(r);++i<o;){var s=e[i];s&&t(r,s,i,n)}return r})}var Ga=bm;var ym="[object Object]",xm=Function.prototype,Cm=Object.prototype,qa=xm.toString,Sm=Cm.hasOwnProperty,Dm=qa.call(Object);function wm(t){if(!R(t)||fe(t)!=ym)return!1;var r=gt(t);if(r===null)return!0;var e=Sm.call(r,"constructor")&&r.constructor;return typeof e=="function"&&e instanceof e&&qa.call(e)==Dm}var Ka=wm;var Tm="__lodash_hash_undefined__";function Am(t){return this.__data__.set(t,Tm),this}var Qa=Am;function Mm(t){return this.__data__.has(t)}var Za=Mm;function ji(t){var r=-1,e=t==null?0:t.length;for(this.__data__=new bi;++r<e;)this.add(t[r])}ji.prototype.add=ji.prototype.push=Qa;ji.prototype.has=Za;var Ja=ji;function km(t,r){for(var e=-1,i=t==null?0:t.length;++e<i;)if(r(t[e],e,t))return!0;return!1}var Ya=km;function Em(t,r){return t.has(r)}var Xa=Em;var Fm=1,Om=2;function Im(t,r,e,i,o,n){var a=e&Fm,s=t.length,l=r.length;if(s!=l&&!(a&&l>s))return!1;var c=n.get(t),_=n.get(r);if(c&&_)return c==r&&_==t;var m=-1,u=!0,b=e&Om?new Ja:void 0;for(n.set(t,r),n.set(r,t);++m<s;){var v=t[m],E=r[m];if(i)var F=a?i(E,v,m,r,t,n):i(v,E,m,t,r,n);if(F!==void 0){if(F)continue;u=!1;break}if(b){if(!Ya(r,function(U,We){if(!Xa(b,We)&&(v===U||o(v,U,e,i,n)))return b.push(We)})){u=!1;break}}else if(!(v===E||o(v,E,e,i,n))){u=!1;break}}return n.delete(t),n.delete(r),u}var $i=Im;function Rm(t){var r=-1,e=Array(t.size);return t.forEach(function(i,o){e[++r]=[o,i]}),e}var es=Rm;function Pm(t){var r=-1,e=Array(t.size);return t.forEach(function(i){e[++r]=i}),e}var ts=Pm;var Vm=1,Nm=2,Lm="[object Boolean]",Um="[object Date]",jm="[object Error]",$m="[object Map]",Bm="[object Number]",Wm="[object RegExp]",Hm="[object Set]",zm="[object String]",Gm="[object Symbol]",qm="[object ArrayBuffer]",Km="[object DataView]",is=ae?ae.prototype:void 0,Rr=is?is.valueOf:void 0;function Qm(t,r,e,i,o,n,a){switch(e){case Km:if(t.byteLength!=r.byteLength||t.byteOffset!=r.byteOffset)return!1;t=t.buffer,r=r.buffer;case qm:return!(t.byteLength!=r.byteLength||!n(new _t(t),new _t(r)));case Lm:case Um:case Bm:return ve(+t,+r);case jm:return t.name==r.name&&t.message==r.message;case Wm:case zm:return t==r+"";case $m:var s=es;case Hm:var l=i&Vm;if(s||(s=ts),t.size!=r.size&&!l)return!1;var c=a.get(t);if(c)return c==r;i|=Nm,a.set(t,r);var _=$i(s(t),s(r),i,o,n,a);return a.delete(t),_;case Gm:if(Rr)return Rr.call(t)==Rr.call(r)}return!1}var rs=Qm;var Zm=1,Jm=Object.prototype,Ym=Jm.hasOwnProperty;function Xm(t,r,e,i,o,n){var a=e&Zm,s=jt(t),l=s.length,c=jt(r),_=c.length;if(l!=_&&!a)return!1;for(var m=l;m--;){var u=s[m];if(!(a?u in r:Ym.call(r,u)))return!1}var b=n.get(t),v=n.get(r);if(b&&v)return b==r&&v==t;var E=!0;n.set(t,r),n.set(r,t);for(var F=a;++m<l;){u=s[m];var U=t[u],We=r[u];if(i)var so=a?i(We,U,u,r,t,n):i(U,We,u,t,r,n);if(!(so===void 0?U===We||o(U,We,e,i,n):so)){E=!1;break}F||(F=u=="constructor")}if(E&&!F){var Xt=t.constructor,ei=r.constructor;Xt!=ei&&"constructor"in t&&"constructor"in r&&!(typeof Xt=="function"&&Xt instanceof Xt&&typeof ei=="function"&&ei instanceof ei)&&(E=!1)}return n.delete(t),n.delete(r),E}var os=Xm;var eh=1,ns="[object Arguments]",as="[object Array]",Bi="[object Object]",th=Object.prototype,ss=th.hasOwnProperty;function ih(t,r,e,i,o,n){var a=se(t),s=se(r),l=a?as:Me(t),c=s?as:Me(r);l=l==ns?Bi:l,c=c==ns?Bi:c;var _=l==Bi,m=c==Bi,u=l==c;if(u&&Te(t)){if(!Te(r))return!1;a=!0,_=!1}if(u&&!_)return n||(n=new Ue),a||ut(t)?$i(t,r,e,i,o,n):rs(t,r,l,e,i,o,n);if(!(e&eh)){var b=_&&ss.call(t,"__wrapped__"),v=m&&ss.call(r,"__wrapped__");if(b||v){var E=b?t.value():t,F=v?r.value():r;return n||(n=new Ue),o(E,F,e,i,n)}}return u?(n||(n=new Ue),os(t,r,e,i,o,n)):!1}var ls=ih;function ds(t,r,e,i,o){return t===r?!0:t==null||r==null||!R(t)&&!R(r)?t!==t&&r!==r:ls(t,r,e,i,ds,o)}var cs=ds;function rh(t){return function(r,e,i){for(var o=-1,n=Object(r),a=i(r),s=a.length;s--;){var l=a[t?s:++o];if(e(n[l],l,n)===!1)break}return r}}var fs=rh;var oh=fs(),us=oh;function nh(t,r,e){(e!==void 0&&!ve(t[r],e)||e===void 0&&!(r in t))&&ct(t,r,e)}var $t=nh;function ah(t){return R(t)&&je(t)}var ms=ah;function sh(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}var Bt=sh;function lh(t){return be(t,ye(t))}var hs=lh;function dh(t,r,e,i,o,n,a){var s=Bt(t,e),l=Bt(r,e),c=a.get(l);if(c){$t(t,e,c);return}var _=n?n(s,l,e+"",t,r,a):void 0,m=_===void 0;if(m){var u=se(l),b=!u&&Te(l),v=!u&&!b&&ut(l);_=l,u||b||v?se(s)?_=s:ms(s)?_=Ti(s):b?(m=!1,_=wi(l,!0)):v?(m=!1,_=Pi(l,!0)):_=[]:Ka(l)||Lt(l)?(_=s,Lt(s)?_=hs(s):(!L(s)||nt(s))&&(_=Vi(l))):m=!1}m&&(a.set(l,_),o(_,l,i,n,a),a.delete(l)),$t(t,e,_)}var ps=dh;function gs(t,r,e,i,o){t!==r&&us(r,function(n,a){if(o||(o=new Ue),L(n))ps(t,r,a,e,gs,i,o);else{var s=i?i(Bt(t,a),n,a+"",t,r,o):void 0;s===void 0&&(s=n),$t(t,a,s)}},ye)}var _s=gs;function ch(t,r){return cs(t,r)}var fh=ch;var uh=Ga(function(t,r,e){_s(t,r,e)}),Pr=uh;var bt=(function(t){return t.Normal="normal",t.Nominal="nominal",t.Alert="alert",t.Warn="warn",t.Alarm="alarm",t.Emergency="emergency",t})(bt||{});var mh=(function(t){return t.Visual="visual",t.Sound="sound",t})(mh||{});var hh="self",vs=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,bs=t=>{if(t)return t==="RFC 3339 (UTC)"?"Date":"number"},Z0=(()=>{class t{delta=d(Va);_destroyRef=d(At);_deltaUpdatesCounter=0;_deltaUpdatesSubject=new qe(10);_isSkDataFullTreeActive=!1;_skDataSubject$=new y([]);_dataServiceMeta=[];_isSkMetaFullTreeActive=!1;_dataServiceMetaSubject$=new y([]);_skNotificationMsg$=new h;_skNotificationMeta$=new h;_isReset=new h;_selfUrn="self";_skData=[];_pathRegister=[];constructor(){vo(1e3).pipe(k(this._destroyRef)).subscribe(()=>{let e={timestamp:Date.now(),value:this._deltaUpdatesCounter};this._deltaUpdatesSubject.next(e),this._deltaUpdatesCounter=0}),this.delta.subscribeDataPathsUpdates().pipe(k(this._destroyRef)).subscribe(e=>{this.updatePathData(e)}),this.delta.subscribeMetadataUpdates().pipe(k(this._destroyRef)).subscribe(e=>{this.setMeta(e)}),this.delta.subscribeNotificationsUpdates().pipe(k(this._destroyRef)).subscribe(e=>{let i=e.path.replace("notifications.","self."),o=this._skData.find(n=>n.path==i);if(o&&o.state!==e.value.state){o.state=e.value.state;let n=this._pathRegister.find(a=>a.path==i);n&&n._pathState$.next(o.state)}this._skNotificationMsg$.next(e)}),this.delta.subscribeSelfUpdates().pipe(k(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 i=this._pathRegister.findIndex(o=>o.path===e);if(i!==-1){let o=this._pathRegister[i];o.combinedSub?.unsubscribe(),o._pathData$?.complete(),o._pathState$?.complete(),o.pathDataUpdate$?.complete(),o.pathMeta$?.complete(),this._pathRegister.splice(i,1)}}subscribePath(e,i){let o=this._pathRegister.find(v=>v.path===e&&v.source===i);if(o)return o.pathDataUpdate$;let n=null,a=null,s=null,l=bt.Normal,c={data:{value:null,timestamp:null},state:l},_=null,m=this._skData.find(v=>v.path==e);this._skData.length&&m&&(n=i==="default"?m.pathValue:m.sources?.[i]?.sourceValue??null,a=i==="default"?m.pathTimestamp:m.sources?.[i]?.sourceTimestamp??null,s=a?new Date(a):null,c={data:{value:n,timestamp:s},state:m.state||l},l=m.state||l,_=m.meta||null);let u={path:e,source:i,_pathData$:new y(c.data),_pathState$:new y(c.state),pathDataUpdate$:new y(c),pathMeta$:new y(_)},b=ho([u._pathData$,u._pathState$]).pipe(ke(([v,E])=>({data:v,state:E})));return u.combinedSub=b.subscribe(v=>u.pathDataUpdate$.next(v)),this._pathRegister.push(u),u.pathDataUpdate$}updatePathData(e){this._deltaUpdatesCounter++;let i=this.setPathContext(e.context,e.path),o=this._skData.find(a=>a.path==i);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"&&vs(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"&&vs(e.value)&&(a="Date"),o={path:i,pathValue:e.value,pathTimestamp:e.timestamp,defaultSource:e.source,type:a,state:bt.Normal,sources:{[e.source]:{sourceTimestamp:e.timestamp,sourceValue:e.value}}},this._skData.push(o)}let n=this._pathRegister.filter(a=>a.path===i);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 i=this.setPathContext(e.context,e.path),o=this._skData.find(a=>a.path===i);o?(o.type==="object"&&e.meta.units&&(o.type=bs(e.meta.units)),o.meta=Pr(o.meta,e.meta)):(o={path:i,pathValue:void 0,pathTimestamp:void 0,type:bs(e.meta.units),state:bt.Normal,defaultSource:void 0,sources:{},meta:e.meta},this._skData.push(o));let n=this._pathRegister.find(a=>a.path===i);n&&n.pathMeta$.next(o.meta),this._isSkMetaFullTreeActive&&(this._dataServiceMeta.push({path:i,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,i){return e!==this._selfUrn?`${e}.${i}`:`${hh}.${i}`}getPathsByType(e,i){return this._skData.filter(o=>o.type===e&&(!i||o.path.startsWith("self"))).map(o=>o.path)}getPathsAndMetaByType(e,i,o){return this._skData.filter(n=>{let a=n.type===e,s=!o||n.path.startsWith("self"),l=i===!0?n.meta?.supportsPut===!0:!0;return a&&s&&l}).map(n=>({path:n.path,meta:n.meta}))}getPathObject(e){return Or(this._skData.find(i=>i.path===e))||null}getPathUnitType(e){return this._skData.find(i=>i.path===e)?.meta?.units||null}timeoutPathObservable(e,i){let o=this._pathRegister.find(n=>n.path==e);if(o){let n;["string","Date","number"].includes(i)&&(n={data:{value:null,timestamp:null},state:bt.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()||mo(null)}getPathMeta(e){return this._skData.find(i=>i.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()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ph(t,r){}var $e=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;disableAnimations=!1;providers;container;templateContext};var Nr=(()=>{class t extends Qo{_elementRef=d(P);_focusTrapFactory=d(Go);_config;_interactivityChecker=d(zo);_ngZone=d(j);_focusMonitor=d(Bo);_renderer=d(ge);_changeDetectorRef=d(Xe);_injector=d(he);_platform=d(Ie);_document=d(mr);_portalOutlet;_focusTrapped=new h;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=d($e,{optional:!0})||new $e,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let i=this._ariaLabelledByQueue.indexOf(e);i>-1&&(this._ariaLabelledByQueue.splice(i,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),i}attachTemplatePortal(e){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),i}attachDomPortal=e=>{this._portalOutlet.hasAttached();let i=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),i};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,i){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let o=()=>{n(),a(),e.removeAttribute("tabindex")},n=this._renderer.listen(e,"blur",o),a=this._renderer.listen(e,"mousedown",o)})),e.focus(i)}_focusByCssSelector(e,i){let o=this._elementRef.nativeElement.querySelector(e);o&&this._forceFocus(o,i)}_trapFocus(e){this._isDestroyed||hr(()=>{let i=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||i.focus(e);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(e)||this._focusDialogContainer(e);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',e);break;default:this._focusByCssSelector(this._config.autoFocus,e);break}this._focusTrapped.next()},{injector:this._injector})}_restoreFocus(){let e=this._config.restoreFocus,i=null;if(typeof e=="string"?i=this._document.querySelector(e):typeof e=="boolean"?i=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(i=e),this._config.restoreFocus&&i&&typeof i.focus=="function"){let o=li(),n=this._elementRef.nativeElement;(!o||o===this._document.body||o===n||n.contains(o))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e)}_containsFocus(){let e=this._elementRef.nativeElement,i=li();return e===i||e.contains(i)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=li()))}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=xe({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(i,o){if(i&1&&ne(It,7),i&2){let n;O(n=I())&&(o._portalOutlet=n.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(i,o){i&2&&$("id",o._config.id||null)("role",o._config.role)("aria-modal",o._config.ariaModal)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null)},features:[w],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(i,o){i&1&&Ee(0,ph,0,0,"ng-template",0)},dependencies:[It],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
3
|
+
`],encapsulation:2})}return t})(),Wt=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new h;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(r,e){this.overlayRef=r,this.config=e,this.disableClose=e.disableClose,this.backdropClick=r.backdropClick(),this.keydownEvents=r.keydownEvents(),this.outsidePointerEvents=r.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(i=>{i.keyCode===27&&!this.disableClose&&!ci(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{!this.disableClose&&this._canClose()?this.close(void 0,{focusOrigin:"mouse"}):this.containerInstance._recaptureFocus?.()}),this._detachSubscription=r.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(r,e){if(this._canClose(r)){let i=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),i.next(r),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(r="",e=""){return this.overlayRef.updateSize({width:r,height:e}),this}addPanelClass(r){return this.overlayRef.addPanelClass(r),this}removePanelClass(r){return this.overlayRef.removePanelClass(r),this}_canClose(r){let e=this.config;return!!this.containerInstance&&(!e.closePredicate||e.closePredicate(r,e,this.componentInstance))}},gh=new C("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=d(he);return()=>fi(t)}}),_h=new C("DialogData"),vh=new C("DefaultDialogConfig");function bh(t){let r=re(t),e=new te;return{valueSignal:r,get value(){return r()},change:e,ngOnDestroy(){e.complete()}}}var Lr=(()=>{class t{_injector=d(he);_defaultOptions=d(vh,{optional:!0});_parentDialog=d(t,{optional:!0,skipSelf:!0});_overlayContainer=d(Yo);_idGenerator=d(ce);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new h;_afterOpenedAtThisLevel=new h;_ariaHiddenElements=new Map;_scrollStrategy=d(gh);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=ri(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ze(void 0)));constructor(){}open(e,i){let o=this._defaultOptions||new $e;i=T(T({},o),i),i.id=i.id||this._idGenerator.getId("cdk-dialog-"),i.id&&this.getDialogById(i.id);let n=this._getOverlayConfig(i),a=en(this._injector,n),s=new Wt(a,i),l=this._attachContainer(a,s,i);if(s.containerInstance=l,!this.openDialogs.length){let c=this._overlayContainer.getContainerElement();l._focusTrapped?l._focusTrapped.pipe(Qe(1)).subscribe(()=>{this._hideNonDialogContentFromAssistiveTechnology(c)}):this._hideNonDialogContentFromAssistiveTechnology(c)}return this._attachDialogContent(e,s,l,i),this.openDialogs.push(s),s.closed.subscribe(()=>this._removeOpenDialog(s,!0)),this.afterOpened.next(s),s}closeAll(){Vr(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){Vr(this._openDialogsAtThisLevel,e=>{e.config.closeOnDestroy===!1&&this._removeOpenDialog(e,!1)}),Vr(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let i=new Jo({positionStrategy:e.positionStrategy||ui().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation,disableAnimations:e.disableAnimations});return e.backdropClass&&(i.backdropClass=e.backdropClass),i}_attachContainer(e,i,o){let n=o.injector||o.viewContainerRef?.injector,a=[{provide:$e,useValue:o},{provide:Wt,useValue:i},{provide:Xo,useValue:e}],s;o.container?typeof o.container=="function"?s=o.container:(s=o.container.type,a.push(...o.container.providers(o))):s=Nr;let l=new Cr(s,o.viewContainerRef,he.create({parent:n||this._injector,providers:a}));return e.attach(l).instance}_attachDialogContent(e,i,o,n){if(e instanceof Mo){let a=this._createInjector(n,i,o,void 0),s={$implicit:n.data,dialogRef:i};n.templateContext&&(s=T(T({},s),typeof n.templateContext=="function"?n.templateContext():n.templateContext)),o.attachTemplatePortal(new Ko(e,null,s,a))}else{let a=this._createInjector(n,i,o,this._injector),s=o.attachComponentPortal(new Cr(e,n.viewContainerRef,a));i.componentRef=s,i.componentInstance=s.instance}}_createInjector(e,i,o,n){let a=e.injector||e.viewContainerRef?.injector,s=[{provide:_h,useValue:e.data},{provide:Wt,useValue:i}];return e.providers&&(typeof e.providers=="function"?s.push(...e.providers(i,e,o)):s.push(...e.providers)),e.direction&&(!a||!a.get(Ft,null,{optional:!0}))&&s.push({provide:Ft,useValue:bh(e.direction)}),he.create({parent:a||n,providers:s})}_removeOpenDialog(e,i){let o=this.openDialogs.indexOf(e);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((n,a)=>{n?a.setAttribute("aria-hidden",n):a.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(e){if(e.parentElement){let i=e.parentElement.children;for(let o=i.length-1;o>-1;o--){let n=i[o];n!==e&&n.nodeName!=="SCRIPT"&&n.nodeName!=="STYLE"&&!n.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(n,n.getAttribute("aria-hidden")),n.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Vr(t,r){let e=t.length;for(;e--;)r(t[e])}var xs=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=G({type:t});static \u0275inj=z({providers:[Lr],imports:[mi,Rt,qo,Rt]})}return t})();function yh(t,r){}var zt=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;position;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;delayFocusTrap=!0;scrollStrategy;closeOnNavigation=!0;enterAnimationDuration;exitAnimationDuration},Ur="mdc-dialog--open",Cs="mdc-dialog--opening",Ss="mdc-dialog--closing",xh=150,Ch=75,Ts=(()=>{class t extends Nr{_animationStateChanged=new te;_animationsEnabled=!Ot();_actionSectionCount=0;_hostElement=this._elementRef.nativeElement;_enterAnimationDuration=this._animationsEnabled?ws(this._config.enterAnimationDuration)??xh:0;_exitAnimationDuration=this._animationsEnabled?ws(this._config.exitAnimationDuration)??Ch:0;_animationTimer=null;_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(Ds,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Cs,Ur)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(Ur),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(Ur),this._animationsEnabled?(this._hostElement.style.setProperty(Ds,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Ss)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(e){this._actionSectionCount+=e,this._changeDetectorRef.markForCheck()}_finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)};_finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})};_clearAnimationClasses(){this._hostElement.classList.remove(Cs,Ss)}_waitForAnimationToComplete(e,i){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(i,e)}_requestAnimationFrame(e){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(e){let i=super.attachComponentPortal(e);return i.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),i}static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275cmp=xe({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(i,o){i&2&&(Fe("id",o._config.id),$("aria-modal",o._config.ariaModal)("role",o._config.role)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null),N("_mat-animation-noopable",!o._animationsEnabled)("mat-mdc-dialog-container-with-actions",o._actionSectionCount>0))},features:[w],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(i,o){i&1&&(Q(0,"div",0)(1,"div",1),Ee(2,yh,0,0,"ng-template",2),Z()())},dependencies:[It],styles:[`.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mat-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mat-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mat-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mat-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mat-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mat-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mat-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mat-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mat-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mat-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mat-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mat-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mat-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;box-sizing:border-box;min-height:52px;margin:0;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}
|
|
4
|
+
`],encapsulation:2})}return t})(),Ds="--mat-dialog-transition-duration";function ws(t){return t==null?null:typeof t=="number"?t:t.endsWith("ms")?di(t.substring(0,t.length-2)):t.endsWith("s")?di(t.substring(0,t.length-1))*1e3:t==="0"?0:null}var Ht=(function(t){return t[t.OPEN=0]="OPEN",t[t.CLOSING=1]="CLOSING",t[t.CLOSED=2]="CLOSED",t})(Ht||{}),yt=class{_ref;_config;_containerInstance;componentInstance;componentRef;disableClose;id;_afterOpened=new h;_beforeClosed=new h;_result;_closeFallbackTimeout;_state=Ht.OPEN;_closeInteractionType;constructor(r,e,i){this._ref=r,this._config=e,this._containerInstance=i,this.disableClose=e.disableClose,this.id=r.id,r.addPanelClass("mat-mdc-dialog-panel"),i._animationStateChanged.pipe(le(o=>o.state==="opened"),Qe(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(le(o=>o.state==="closed"),Qe(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),r.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),oi(this.backdropClick(),this.keydownEvents().pipe(le(o=>o.keyCode===27&&!this.disableClose&&!ci(o)))).subscribe(o=>{this.disableClose||(o.preventDefault(),jr(this,o.type==="keydown"?"keyboard":"mouse"))})}close(r){let e=this._config.closePredicate;e&&!e(r,this._config,this.componentInstance)||(this._result=r,this._containerInstance._animationStateChanged.pipe(le(i=>i.state==="closing"),Qe(1)).subscribe(i=>{this._beforeClosed.next(r),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),i.totalTime+100)}),this._state=Ht.CLOSING,this._containerInstance._startExitAnimation())}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(r){let e=this._ref.config.positionStrategy;return r&&(r.left||r.right)?r.left?e.left(r.left):e.right(r.right):e.centerHorizontally(),r&&(r.top||r.bottom)?r.top?e.top(r.top):e.bottom(r.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(r="",e=""){return this._ref.updateSize(r,e),this}addPanelClass(r){return this._ref.addPanelClass(r),this}removePanelClass(r){return this._ref.removePanelClass(r),this}getState(){return this._state}_finishDialogClose(){this._state=Ht.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function jr(t,r,e){return t._closeInteractionType=r,t.close(e)}var As=new C("MatMdcDialogData"),Ms=new C("mat-mdc-dialog-default-options"),ks=new C("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let t=d(he);return()=>fi(t)}}),Wi=(()=>{class t{_defaultOptions=d(Ms,{optional:!0});_scrollStrategy=d(ks);_parentDialog=d(t,{optional:!0,skipSelf:!0});_idGenerator=d(ce);_injector=d(he);_dialog=d(Lr);_animationsDisabled=Ot();_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new h;_afterOpenedAtThisLevel=new h;dialogConfigClass=zt;_dialogRefConstructor;_dialogContainerType;_dialogDataToken;get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}afterAllClosed=ri(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ze(void 0)));constructor(){this._dialogRefConstructor=yt,this._dialogContainerType=Ts,this._dialogDataToken=As}open(e,i){let o;i=T(T({},this._defaultOptions||new zt),i),i.id=i.id||this._idGenerator.getId("mat-mdc-dialog-"),i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();let n=this._dialog.open(e,Y(T({},i),{positionStrategy:ui(this._injector).centerHorizontally().centerVertically(),disableClose:!0,closePredicate:void 0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,disableAnimations:this._animationsDisabled||i.enterAnimationDuration?.toLocaleString()==="0"||i.exitAnimationDuration?.toString()==="0",container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:i},{provide:$e,useValue:i}]},templateContext:()=>({dialogRef:o}),providers:(a,s,l)=>(o=new this._dialogRefConstructor(a,i,l),o.updatePosition(i?.position),[{provide:this._dialogContainerType,useValue:l},{provide:this._dialogDataToken,useValue:s.data},{provide:this._dialogRefConstructor,useValue:o}])}));return o.componentRef=n.componentRef,o.componentInstance=n.componentInstance,this.openDialogs.push(o),this.afterOpened.next(o),o.afterClosed().subscribe(()=>{let a=this.openDialogs.indexOf(o);a>-1&&(this.openDialogs.splice(a,1),this.openDialogs.length||this._getAfterAllClosed().next())}),o}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let i=e.length;for(;i--;)e[i].close()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Sh=(()=>{class t{dialogRef=d(yt,{optional:!0});_elementRef=d(P);_dialog=d(Wi);ariaLabel;type="button";dialogResult;_matDialogClose;constructor(){}ngOnInit(){this.dialogRef||(this.dialogRef=Fs(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){let i=e._matDialogClose||e._matDialogCloseResult;i&&(this.dialogResult=i.currentValue)}_onButtonClick(e){jr(this.dialogRef,e.screenX===0&&e.screenY===0?"keyboard":"mouse",this.dialogResult)}static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(i,o){i&1&&oe("click",function(a){return o._onButtonClick(a)}),i&2&&$("aria-label",o.ariaLabel||null)("type",o.type)},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],type:"type",dialogResult:[0,"mat-dialog-close","dialogResult"],_matDialogClose:[0,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[pe]})}return t})(),Es=(()=>{class t{_dialogRef=d(yt,{optional:!0});_elementRef=d(P);_dialog=d(Wi);constructor(){}ngOnInit(){this._dialogRef||(this._dialogRef=Fs(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t})}return t})(),Dh=(()=>{class t extends Es{id=d(ce).getId("mat-mdc-dialog-title-");_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275dir=p({type:t,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(i,o){i&2&&Fe("id",o.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],features:[w]})}return t})(),wh=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],features:[Eo([Zo])]})}return t})(),Th=(()=>{class t extends Es{align;_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275dir=p({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(i,o){i&2&&N("mat-mdc-dialog-actions-align-start",o.align==="start")("mat-mdc-dialog-actions-align-center",o.align==="center")("mat-mdc-dialog-actions-align-end",o.align==="end")},inputs:{align:"align"},features:[w]})}return t})();function Fs(t,r){let e=t.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?r.find(i=>i.id===e.id):null}var Ah=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=G({type:t});static \u0275inj=z({providers:[Wi],imports:[xs,mi,Rt,Se,Se]})}return t})();var Us=(()=>{class t{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||t)(g(ge),g(P))};static \u0275dir=p({type:t})}return t})(),js=(()=>{class t extends Us{static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275dir=p({type:t,features:[w]})}return t})(),Yt=new C("");var Mh={provide:Yt,useExisting:H(()=>$s),multi:!0};function kh(){let t=br()?br().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var Eh=new C(""),$s=(()=>{class t extends Us{_compositionMode;_composing=!1;constructor(e,i,o){super(e,i),this._compositionMode=o,this._compositionMode==null&&(this._compositionMode=!kh())}writeValue(e){let i=e??"";this.setProperty("value",i)}_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(i){return new(i||t)(g(ge),g(P),g(Eh,8))};static \u0275dir=p({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(i,o){i&1&&oe("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:[A([Mh]),w]})}return t})();function Hr(t){return t==null||zr(t)===0}function zr(t){return t==null?null:Array.isArray(t)||typeof t=="string"?t.length:t instanceof Set?t.size:null}var me=new C(""),Ge=new C(""),Fh=/^(?=.{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])?)*$/,zi=class{static min(r){return Bs(r)}static max(r){return Ws(r)}static required(r){return Hs(r)}static requiredTrue(r){return Oh(r)}static email(r){return Ih(r)}static minLength(r){return Rh(r)}static maxLength(r){return Ph(r)}static pattern(r){return zs(r)}static nullValidator(r){return Gi()}static compose(r){return Js(r)}static composeAsync(r){return Ys(r)}};function Bs(t){return r=>{if(r.value==null||t==null)return null;let e=parseFloat(r.value);return!isNaN(e)&&e<t?{min:{min:t,actual:r.value}}:null}}function Ws(t){return r=>{if(r.value==null||t==null)return null;let e=parseFloat(r.value);return!isNaN(e)&&e>t?{max:{max:t,actual:r.value}}:null}}function Hs(t){return Hr(t.value)?{required:!0}:null}function Oh(t){return t.value===!0?null:{required:!0}}function Ih(t){return Hr(t.value)||Fh.test(t.value)?null:{email:!0}}function Rh(t){return r=>{let e=r.value?.length??zr(r.value);return e===null||e===0?null:e<t?{minlength:{requiredLength:t,actualLength:e}}:null}}function Ph(t){return r=>{let e=r.value?.length??zr(r.value);return e!==null&&e>t?{maxlength:{requiredLength:t,actualLength:e}}:null}}function zs(t){if(!t)return Gi;let r,e;return typeof t=="string"?(e="",t.charAt(0)!=="^"&&(e+="^"),e+=t,t.charAt(t.length-1)!=="$"&&(e+="$"),r=new RegExp(e)):(e=t.toString(),r=t),i=>{if(Hr(i.value))return null;let o=i.value;return r.test(o)?null:{pattern:{requiredPattern:e,actualValue:o}}}}function Gi(t){return null}function Gs(t){return t!=null}function qs(t){return Fo(t)?uo(t):t}function Ks(t){let r={};return t.forEach(e=>{r=e!=null?T(T({},r),e):r}),Object.keys(r).length===0?null:r}function Qs(t,r){return r.map(e=>e(t))}function Vh(t){return!t.validate}function Zs(t){return t.map(r=>Vh(r)?r:e=>r.validate(e))}function Js(t){if(!t)return null;let r=t.filter(Gs);return r.length==0?null:function(e){return Ks(Qs(e,r))}}function Gr(t){return t!=null?Js(Zs(t)):null}function Ys(t){if(!t)return null;let r=t.filter(Gs);return r.length==0?null:function(e){let i=Qs(e,r).map(qs);return po(i).pipe(ke(Ks))}}function qr(t){return t!=null?Ys(Zs(t)):null}function Os(t,r){return t===null?[r]:Array.isArray(t)?[...t,r]:[t,r]}function Xs(t){return t._rawValidators}function el(t){return t._rawAsyncValidators}function $r(t){return t?Array.isArray(t)?t:[t]:[]}function qi(t,r){return Array.isArray(t)?t.includes(r):t===r}function Is(t,r){let e=$r(r);return $r(t).forEach(o=>{qi(e,o)||e.push(o)}),e}function Rs(t,r){return $r(r).filter(e=>!qi(t,e))}var Ki=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(r){this._rawValidators=r||[],this._composedValidatorFn=Gr(this._rawValidators)}_setAsyncValidators(r){this._rawAsyncValidators=r||[],this._composedAsyncValidatorFn=qr(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(r){this._onDestroyCallbacks.push(r)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(r=>r()),this._onDestroyCallbacks=[]}reset(r=void 0){this.control&&this.control.reset(r)}hasError(r,e){return this.control?this.control.hasError(r,e):!1}getError(r,e){return this.control?this.control.getError(r,e):null}},W=class extends Ki{name;get formDirective(){return null}get path(){return null}},ue=class extends Ki{_parent=null;name=null;valueAccessor=null},Qi=class{_cd;constructor(r){this._cd=r}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}},Nh={"[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"},ow=Y(T({},Nh),{"[class.ng-submitted]":"isSubmitted"}),nw=(()=>{class t extends Qi{constructor(e){super(e)}static \u0275fac=function(i){return new(i||t)(g(ue,2))};static \u0275dir=p({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,o){i&2&&N("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:[w]})}return t})(),aw=(()=>{class t extends Qi{constructor(e){super(e)}static \u0275fac=function(i){return new(i||t)(g(W,10))};static \u0275dir=p({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,o){i&2&&N("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:[w]})}return t})();var Gt="VALID",Hi="INVALID",xt="PENDING",qt="DISABLED",Be=class{},Zi=class extends Be{value;source;constructor(r,e){super(),this.value=r,this.source=e}},Qt=class extends Be{pristine;source;constructor(r,e){super(),this.pristine=r,this.source=e}},Zt=class extends Be{touched;source;constructor(r,e){super(),this.touched=r,this.source=e}},Ct=class extends Be{status;source;constructor(r,e){super(),this.status=r,this.source=e}},Ji=class extends Be{source;constructor(r){super(),this.source=r}},Yi=class extends Be{source;constructor(r){super(),this.source=r}};function Kr(t){return(ir(t)?t.validators:t)||null}function Lh(t){return Array.isArray(t)?Gr(t):t||null}function Qr(t,r){return(ir(r)?r.asyncValidators:t)||null}function Uh(t){return Array.isArray(t)?qr(t):t||null}function ir(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function tl(t,r,e){let i=t.controls;if(!(r?Object.keys(i):i).length)throw new ai(1e3,"");if(!i[e])throw new ai(1001,"")}function il(t,r,e){t._forEachChild((i,o)=>{if(e[o]===void 0)throw new ai(1002,"")})}var Dt=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(r,e){this._assignValidators(r),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(r){this._rawValidators=this._composedValidatorFn=r}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(r){this._rawAsyncValidators=this._composedAsyncValidatorFn=r}get parent(){return this._parent}get status(){return Ce(this.statusReactive)}set status(r){Ce(()=>this.statusReactive.set(r))}_status=_e(()=>this.statusReactive());statusReactive=re(void 0);get valid(){return this.status===Gt}get invalid(){return this.status===Hi}get pending(){return this.status==xt}get disabled(){return this.status===qt}get enabled(){return this.status!==qt}errors;get pristine(){return Ce(this.pristineReactive)}set pristine(r){Ce(()=>this.pristineReactive.set(r))}_pristine=_e(()=>this.pristineReactive());pristineReactive=re(!0);get dirty(){return!this.pristine}get touched(){return Ce(this.touchedReactive)}set touched(r){Ce(()=>this.touchedReactive.set(r))}_touched=_e(()=>this.touchedReactive());touchedReactive=re(!1);get untouched(){return!this.touched}_events=new h;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(r){this._assignValidators(r)}setAsyncValidators(r){this._assignAsyncValidators(r)}addValidators(r){this.setValidators(Is(r,this._rawValidators))}addAsyncValidators(r){this.setAsyncValidators(Is(r,this._rawAsyncValidators))}removeValidators(r){this.setValidators(Rs(r,this._rawValidators))}removeAsyncValidators(r){this.setAsyncValidators(Rs(r,this._rawAsyncValidators))}hasValidator(r){return qi(this._rawValidators,r)}hasAsyncValidator(r){return qi(this._rawAsyncValidators,r)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(r={}){let e=this.touched===!1;this.touched=!0;let i=r.sourceControl??this;this._parent&&!r.onlySelf&&this._parent.markAsTouched(Y(T({},r),{sourceControl:i})),e&&r.emitEvent!==!1&&this._events.next(new Zt(!0,i))}markAllAsDirty(r={}){this.markAsDirty({onlySelf:!0,emitEvent:r.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(r))}markAllAsTouched(r={}){this.markAsTouched({onlySelf:!0,emitEvent:r.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(r))}markAsUntouched(r={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=r.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:r.emitEvent,sourceControl:i})}),this._parent&&!r.onlySelf&&this._parent._updateTouched(r,i),e&&r.emitEvent!==!1&&this._events.next(new Zt(!1,i))}markAsDirty(r={}){let e=this.pristine===!0;this.pristine=!1;let i=r.sourceControl??this;this._parent&&!r.onlySelf&&this._parent.markAsDirty(Y(T({},r),{sourceControl:i})),e&&r.emitEvent!==!1&&this._events.next(new Qt(!1,i))}markAsPristine(r={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=r.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:r.emitEvent})}),this._parent&&!r.onlySelf&&this._parent._updatePristine(r,i),e&&r.emitEvent!==!1&&this._events.next(new Qt(!0,i))}markAsPending(r={}){this.status=xt;let e=r.sourceControl??this;r.emitEvent!==!1&&(this._events.next(new Ct(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!r.onlySelf&&this._parent.markAsPending(Y(T({},r),{sourceControl:e}))}disable(r={}){let e=this._parentMarkedDirty(r.onlySelf);this.status=qt,this.errors=null,this._forEachChild(o=>{o.disable(Y(T({},r),{onlySelf:!0}))}),this._updateValue();let i=r.sourceControl??this;r.emitEvent!==!1&&(this._events.next(new Zi(this.value,i)),this._events.next(new Ct(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Y(T({},r),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(r={}){let e=this._parentMarkedDirty(r.onlySelf);this.status=Gt,this._forEachChild(i=>{i.enable(Y(T({},r),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:r.emitEvent}),this._updateAncestors(Y(T({},r),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(r,e){this._parent&&!r.onlySelf&&(this._parent.updateValueAndValidity(r),r.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(r){this._parent=r}getRawValue(){return this.value}updateValueAndValidity(r={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Gt||this.status===xt)&&this._runAsyncValidator(i,r.emitEvent)}let e=r.sourceControl??this;r.emitEvent!==!1&&(this._events.next(new Zi(this.value,e)),this._events.next(new Ct(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!r.onlySelf&&this._parent.updateValueAndValidity(Y(T({},r),{sourceControl:e}))}_updateTreeValidity(r={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(r)),this.updateValueAndValidity({onlySelf:!0,emitEvent:r.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?qt:Gt}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(r,e){if(this.asyncValidator){this.status=xt,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:r!==!1};let i=qs(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:e,shouldHaveEmitted:r})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let r=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,r}return!1}setErrors(r,e={}){this.errors=r,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(r){let e=r;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,o)=>i&&i._find(o),this)}getError(r,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[r]:null}hasError(r,e){return!!this.getError(r,e)}get root(){let r=this;for(;r._parent;)r=r._parent;return r}_updateControlsErrors(r,e,i){this.status=this._calculateStatus(),r&&this.statusChanges.emit(this.status),(r||i)&&this._events.next(new Ct(this.status,e)),this._parent&&this._parent._updateControlsErrors(r,e,i)}_initObservables(){this.valueChanges=new te,this.statusChanges=new te}_calculateStatus(){return this._allControlsDisabled()?qt:this.errors?Hi:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(xt)?xt:this._anyControlsHaveStatus(Hi)?Hi:Gt}_anyControlsHaveStatus(r){return this._anyControls(e=>e.status===r)}_anyControlsDirty(){return this._anyControls(r=>r.dirty)}_anyControlsTouched(){return this._anyControls(r=>r.touched)}_updatePristine(r,e){let i=!this._anyControlsDirty(),o=this.pristine!==i;this.pristine=i,this._parent&&!r.onlySelf&&this._parent._updatePristine(r,e),o&&this._events.next(new Qt(this.pristine,e))}_updateTouched(r={},e){this.touched=this._anyControlsTouched(),this._events.next(new Zt(this.touched,e)),this._parent&&!r.onlySelf&&this._parent._updateTouched(r,e)}_onDisabledChange=[];_registerOnCollectionChange(r){this._onCollectionChange=r}_setUpdateStrategy(r){ir(r)&&r.updateOn!=null&&(this._updateOn=r.updateOn)}_parentMarkedDirty(r){let e=this._parent&&this._parent.dirty;return!r&&!!e&&!this._parent._anyControlsDirty()}_find(r){return null}_assignValidators(r){this._rawValidators=Array.isArray(r)?r.slice():r,this._composedValidatorFn=Lh(this._rawValidators)}_assignAsyncValidators(r){this._rawAsyncValidators=Array.isArray(r)?r.slice():r,this._composedAsyncValidatorFn=Uh(this._rawAsyncValidators)}},ze=class extends Dt{constructor(r,e,i){super(Kr(e),Qr(i,e)),this.controls=r,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(r,e){return this.controls[r]?this.controls[r]:(this.controls[r]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(r,e,i={}){this.registerControl(r,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(r,e={}){this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),delete this.controls[r],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(r,e,i={}){this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),delete this.controls[r],e&&this.registerControl(r,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(r){return this.controls.hasOwnProperty(r)&&this.controls[r].enabled}setValue(r,e={}){il(this,!0,r),Object.keys(r).forEach(i=>{tl(this,!0,i),this.controls[i].setValue(r[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(r,e={}){r!=null&&(Object.keys(r).forEach(i=>{let o=this.controls[i];o&&o.patchValue(r[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(r={},e={}){this._forEachChild((i,o)=>{i.reset(r?r[o]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(r,e,i)=>(r[i]=e.getRawValue(),r))}_syncPendingControls(){let r=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return r&&this.updateValueAndValidity({onlySelf:!0}),r}_forEachChild(r){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&r(i,e)})}_setUpControls(){this._forEachChild(r=>{r.setParent(this),r._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(r){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&r(i))return!0;return!1}_reduceValue(){let r={};return this._reduceChildren(r,(e,i,o)=>((i.enabled||this.disabled)&&(e[o]=i.value),e))}_reduceChildren(r,e){let i=r;return this._forEachChild((o,n)=>{i=e(i,o,n)}),i}_allControlsDisabled(){for(let r of Object.keys(this.controls))if(this.controls[r].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(r){return this.controls.hasOwnProperty(r)?this.controls[r]:null}};var sw=ze;var Br=class extends ze{};var wt=new C("",{providedIn:"root",factory:()=>rr}),rr="always";function or(t,r){return[...r.path,t]}function Jt(t,r,e=rr){Zr(t,r),r.valueAccessor.writeValue(t.value),(t.disabled||e==="always")&&r.valueAccessor.setDisabledState?.(t.disabled),$h(t,r),Wh(t,r),Bh(t,r),jh(t,r)}function Xi(t,r,e=!0){let i=()=>{};r.valueAccessor&&(r.valueAccessor.registerOnChange(i),r.valueAccessor.registerOnTouched(i)),tr(t,r),t&&(r._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function er(t,r){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(r)})}function jh(t,r){if(r.valueAccessor.setDisabledState){let e=i=>{r.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(e),r._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}function Zr(t,r){let e=Xs(t);r.validator!==null?t.setValidators(Os(e,r.validator)):typeof e=="function"&&t.setValidators([e]);let i=el(t);r.asyncValidator!==null?t.setAsyncValidators(Os(i,r.asyncValidator)):typeof i=="function"&&t.setAsyncValidators([i]);let o=()=>t.updateValueAndValidity();er(r._rawValidators,o),er(r._rawAsyncValidators,o)}function tr(t,r){let e=!1;if(t!==null){if(r.validator!==null){let o=Xs(t);if(Array.isArray(o)&&o.length>0){let n=o.filter(a=>a!==r.validator);n.length!==o.length&&(e=!0,t.setValidators(n))}}if(r.asyncValidator!==null){let o=el(t);if(Array.isArray(o)&&o.length>0){let n=o.filter(a=>a!==r.asyncValidator);n.length!==o.length&&(e=!0,t.setAsyncValidators(n))}}}let i=()=>{};return er(r._rawValidators,i),er(r._rawAsyncValidators,i),e}function $h(t,r){r.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&rl(t,r)})}function Bh(t,r){r.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&rl(t,r),t.updateOn!=="submit"&&t.markAsTouched()})}function rl(t,r){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),r.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function Wh(t,r){let e=(i,o)=>{r.valueAccessor.writeValue(i),o&&r.viewToModelUpdate(i)};t.registerOnChange(e),r._registerOnDestroy(()=>{t._unregisterOnChange(e)})}function ol(t,r){t==null,Zr(t,r)}function Hh(t,r){return tr(t,r)}function Jr(t,r){if(!t.hasOwnProperty("model"))return!1;let e=t.model;return e.isFirstChange()?!0:!Object.is(r,e.currentValue)}function zh(t){return Object.getPrototypeOf(t.constructor)===js}function nl(t,r){t._syncPendingControls(),r.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function Yr(t,r){if(!r)return null;Array.isArray(r);let e,i,o;return r.forEach(n=>{n.constructor===$s?e=n:zh(n)?i=n:o=n}),o||i||e||null}function Gh(t,r){let e=t.indexOf(r);e>-1&&t.splice(e,1)}var qh={provide:W,useExisting:H(()=>Xr)},Kt=Promise.resolve(),Xr=(()=>{class t extends W{callSetDisabledState;get submitted(){return Ce(this.submittedReactive)}_submitted=_e(()=>this.submittedReactive());submittedReactive=re(!1);_directives=new Set;form;ngSubmit=new te;options;constructor(e,i,o){super(),this.callSetDisabledState=o,this.form=new ze({},Gr(e),qr(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Kt.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),Jt(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Kt.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Kt.then(()=>{let i=this._findContainer(e.path),o=new ze({});ol(o,e),i.registerControl(e.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Kt.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){Kt.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),nl(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new Ji(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 Yi(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(i){return new(i||t)(g(me,10),g(Ge,10),g(wt,8))};static \u0275dir=p({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,o){i&1&&oe("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:[A([qh]),w]})}return t})();function Ps(t,r){let e=t.indexOf(r);e>-1&&t.splice(e,1)}function Vs(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var St=class extends Dt{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(r=null,e,i){super(Kr(e),Qr(i,e)),this._applyFormState(r),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ir(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Vs(r)?this.defaultValue=r.value:this.defaultValue=r)}setValue(r,e={}){this.value=this._pendingValue=r,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(r,e={}){this.setValue(r,e)}reset(r=this.defaultValue,e={}){this._applyFormState(r),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(r){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(r){this._onChange.push(r)}_unregisterOnChange(r){Ps(this._onChange,r)}registerOnDisabledChange(r){this._onDisabledChange.push(r)}_unregisterOnDisabledChange(r){Ps(this._onDisabledChange,r)}_forEachChild(r){}_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(r){Vs(r)?(this.value=this._pendingValue=r.value,r.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=r}},dw=St,Kh=t=>t instanceof St,Qh=(()=>{class t extends W{_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 or(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=ee(t)))(o||t)}})();static \u0275dir=p({type:t,standalone:!1,features:[w]})}return t})();var Zh={provide:ue,useExisting:H(()=>Jh)},Ns=Promise.resolve(),Jh=(()=>{class t extends ue{_changeDetectorRef;callSetDisabledState;control=new St;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new te;constructor(e,i,o,n,a,s){super(),this._changeDetectorRef=a,this.callSetDisabledState=s,this._parent=e,this._setValidators(i),this._setAsyncValidators(o),this.valueAccessor=Yr(this,n)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),Jr(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(){Jt(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){Ns.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,o=i!==0&&et(i);Ns.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?or(e,this._parent):[e]}static \u0275fac=function(i){return new(i||t)(g(W,9),g(me,10),g(Ge,10),g(Yt,10),g(Xe,8),g(wt,8))};static \u0275dir=p({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:[A([Zh]),w,pe]})}return t})();var cw=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return t})(),Yh={provide:Yt,useExisting:H(()=>Xh),multi:!0},Xh=(()=>{class t extends js{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275dir=p({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,o){i&1&&oe("input",function(a){return o.onChange(a.target.value)})("blur",function(){return o.onTouched()})},standalone:!1,features:[A([Yh]),w]})}return t})();var eo=new C(""),ep={provide:ue,useExisting:H(()=>tp)},tp=(()=>{class t extends ue{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new te;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,o,n,a){super(),this._ngModelWarningConfig=n,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Yr(this,o)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&Xi(i,this,!1),Jt(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Jr(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&Xi(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(i){return new(i||t)(g(me,10),g(Ge,10),g(Yt,10),g(eo,8),g(wt,8))};static \u0275dir=p({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:[A([ep]),w,pe]})}return t})(),ip={provide:W,useExisting:H(()=>nr)},nr=(()=>{class t extends W{callSetDisabledState;get submitted(){return Ce(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=_e(()=>this._submittedReactive());_submittedReactive=re(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new te;constructor(e,i,o){super(),this.callSetDisabledState=o,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(tr(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 i=this.form.get(e.path);return Jt(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){Xi(e.control||null,e,!1),Gh(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,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),nl(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new Ji(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(!1),i?.emitEvent!==!1&&this.form._events.next(new Yi(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,o=this.form.get(e.path);i!==o&&(Xi(i||null,e),Kh(o)&&(Jt(o,e,this.callSetDisabledState),e.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);ol(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&Hh(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Zr(this.form,this),this._oldForm&&tr(this._oldForm,this)}static \u0275fac=function(i){return new(i||t)(g(me,10),g(Ge,10),g(wt,8))};static \u0275dir=p({type:t,selectors:[["","formGroup",""]],hostBindings:function(i,o){i&1&&oe("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:[A([ip]),w,pe]})}return t})(),rp={provide:W,useExisting:H(()=>al)},al=(()=>{class t extends Qh{name=null;constructor(e,i,o){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(o)}_checkParentType(){ll(this._parent)}static \u0275fac=function(i){return new(i||t)(g(W,13),g(me,10),g(Ge,10))};static \u0275dir=p({type:t,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[A([rp]),w]})}return t})(),op={provide:W,useExisting:H(()=>sl)},sl=(()=>{class t extends W{_parent;name=null;constructor(e,i,o){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(o)}ngOnInit(){ll(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 or(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(i){return new(i||t)(g(W,13),g(me,10),g(Ge,10))};static \u0275dir=p({type:t,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[A([op]),w]})}return t})();function ll(t){return!(t instanceof al)&&!(t instanceof nr)&&!(t instanceof sl)}var np={provide:ue,useExisting:H(()=>ap)},ap=(()=>{class t extends ue{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new te;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,o,n,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(o),this.valueAccessor=Yr(this,n)}ngOnChanges(e){this._added||this._setUpControl(),Jr(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 or(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(i){return new(i||t)(g(W,13),g(me,10),g(Ge,10),g(Yt,10),g(eo,8))};static \u0275dir=p({type:t,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[A([np]),w,pe]})}return t})();function dl(t){return typeof t=="number"?t:parseFloat(t)}var ar=(()=>{class t{_validator=Gi;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):Gi,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,features:[pe]})}return t})(),sp={provide:me,useExisting:H(()=>lp),multi:!0},lp=(()=>{class t extends ar{max;inputName="max";normalizeInput=e=>dl(e);createValidator=e=>Ws(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275dir=p({type:t,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,o){i&2&&$("max",o._enabled?o.max:null)},inputs:{max:"max"},standalone:!1,features:[A([sp]),w]})}return t})(),dp={provide:me,useExisting:H(()=>cp),multi:!0},cp=(()=>{class t extends ar{min;inputName="min";normalizeInput=e=>dl(e);createValidator=e=>Bs(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275dir=p({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,o){i&2&&$("min",o._enabled?o.min:null)},inputs:{min:"min"},standalone:!1,features:[A([dp]),w]})}return t})(),fp={provide:me,useExisting:H(()=>up),multi:!0};var up=(()=>{class t extends ar{required;inputName="required";normalizeInput=et;createValidator=e=>Hs;enabled(e){return e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275dir=p({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,o){i&2&&$("required",o._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[A([fp]),w]})}return t})();var mp={provide:me,useExisting:H(()=>hp),multi:!0},hp=(()=>{class t extends ar{pattern;inputName="pattern";normalizeInput=e=>e;createValidator=e=>zs(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275dir=p({type:t,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(i,o){i&2&&$("pattern",o._enabled?o.pattern:null)},inputs:{pattern:"pattern"},standalone:!1,features:[A([mp]),w]})}return t})();var cl=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=G({type:t});static \u0275inj=z({})}return t})(),Wr=class extends Dt{constructor(r,e,i){super(Kr(e),Qr(i,e)),this.controls=r,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(r){return this.controls[this._adjustIndex(r)]}push(r,e={}){this.controls.push(r),this._registerControl(r),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(r,e,i={}){this.controls.splice(r,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(r,e={}){let i=this._adjustIndex(r);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(r,e,i={}){let o=this._adjustIndex(r);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:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(r,e={}){il(this,!1,r),r.forEach((i,o)=>{tl(this,!1,o),this.at(o).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(r,e={}){r!=null&&(r.forEach((i,o)=>{this.at(o)&&this.at(o).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(r=[],e={}){this._forEachChild((i,o)=>{i.reset(r[o],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(r=>r.getRawValue())}clear(r={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:r.emitEvent}))}_adjustIndex(r){return r<0?r+this.length:r}_syncPendingControls(){let r=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return r&&this.updateValueAndValidity({onlySelf:!0}),r}_forEachChild(r){this.controls.forEach((e,i)=>{r(e,i)})}_updateValue(){this.value=this.controls.filter(r=>r.enabled||this.disabled).map(r=>r.value)}_anyControls(r){return this.controls.some(e=>e.enabled&&r(e))}_setUpControls(){this._forEachChild(r=>this._registerControl(r))}_allControlsDisabled(){for(let r of this.controls)if(r.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(r){r.setParent(this),r._registerOnCollectionChange(this._onCollectionChange)}_find(r){return this.at(r)??null}};function Ls(t){return!!t&&(t.asyncValidators!==void 0||t.validators!==void 0||t.updateOn!==void 0)}var pp=(()=>{class t{useNonNullable=!1;get nonNullable(){let e=new t;return e.useNonNullable=!0,e}group(e,i=null){let o=this._reduceControls(e),n={};return Ls(i)?n=i:i!==null&&(n.validators=i.validator,n.asyncValidators=i.asyncValidator),new ze(o,n)}record(e,i=null){let o=this._reduceControls(e);return new Br(o,i)}control(e,i,o){let n={};return this.useNonNullable?(Ls(i)?n=i:(n.validators=i,n.asyncValidators=o),new St(e,Y(T({},n),{nonNullable:!0}))):new St(e,i,o)}array(e,i,o){let n=e.map(a=>this._createControl(a));return new Wr(n,i,o)}_reduceControls(e){let i={};return Object.keys(e).forEach(o=>{i[o]=this._createControl(e[o])}),i}_createControl(e){if(e instanceof St)return e;if(e instanceof Dt)return e;if(Array.isArray(e)){let i=e[0],o=e.length>1?e[1]:null,n=e.length>2?e[2]:null;return this.control(i,o,n)}else return this.control(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var fw=(()=>{class t extends pp{group(e,i=null){return super.group(e,i)}control(e,i,o){return super.control(e,i,o)}array(e,i,o){return super.array(e,i,o)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var uw=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:wt,useValue:e.callSetDisabledState??rr}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=G({type:t});static \u0275inj=z({imports:[cl]})}return t})(),mw=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:eo,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:wt,useValue:e.callSetDisabledState??rr}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=G({type:t});static \u0275inj=z({imports:[cl]})}return t})();var to=class{_box;_destroyed=new h;_resizeSubject=new h;_resizeObserver;_elementObservables=new Map;constructor(r){this._box=r,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(r){return this._elementObservables.has(r)||this._elementObservables.set(r,new Tt(e=>{let i=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(r,{box:this._box}),()=>{this._resizeObserver?.unobserve(r),i.unsubscribe(),this._elementObservables.delete(r)}}).pipe(le(e=>e.some(i=>i.target===r)),Co({bufferSize:1,refCount:!0}),ni(this._destroyed))),this._elementObservables.get(r)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},fl=(()=>{class t{_cleanupErrorListener;_observers=new Map;_ngZone=d(j);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(e,i){let o=i?.box||"content-box";return this._observers.has(o)||this._observers.set(o,new to(o)),this._observers.get(o).observe(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var gp=["notch"],_p=["matFormFieldNotchedOutline",""],vp=["*"],ul=["iconPrefixContainer"],ml=["textPrefixContainer"],hl=["iconSuffixContainer"],pl=["textSuffixContainer"],bp=["textField"],yp=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],xp=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function Cp(t,r){t&1&&Mt(0,"span",20)}function Sp(t,r){if(t&1&&(Q(0,"label",19),de(1,1),q(2,Cp,1,0,"span",20),Z()),t&2){let e=Oe(2);Je("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),$("for",e._control.disableAutomaticLabeling?null:e._control.id),V(2),K(!e.hideRequiredMarker&&e._control.required?2:-1)}}function Dp(t,r){if(t&1&&q(0,Sp,3,5,"label",19),t&2){let e=Oe();K(e._hasFloatingLabel()?0:-1)}}function wp(t,r){t&1&&Mt(0,"div",7)}function Tp(t,r){}function Ap(t,r){if(t&1&&Ee(0,Tp,0,0,"ng-template",13),t&2){Oe(2);let e=vr(1);Je("ngTemplateOutlet",e)}}function Mp(t,r){if(t&1&&(Q(0,"div",9),q(1,Ap,1,1,null,13),Z()),t&2){let e=Oe();Je("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),V(),K(e._forceDisplayInfixLabel()?-1:1)}}function kp(t,r){t&1&&(Q(0,"div",10,2),de(2,2),Z())}function Ep(t,r){t&1&&(Q(0,"div",11,3),de(2,3),Z())}function Fp(t,r){}function Op(t,r){if(t&1&&Ee(0,Fp,0,0,"ng-template",13),t&2){Oe();let e=vr(1);Je("ngTemplateOutlet",e)}}function Ip(t,r){t&1&&(Q(0,"div",14,4),de(2,4),Z())}function Rp(t,r){t&1&&(Q(0,"div",15,5),de(2,5),Z())}function Pp(t,r){t&1&&Mt(0,"div",16)}function Vp(t,r){t&1&&de(0,6)}function Np(t,r){if(t&1&&(Q(0,"mat-hint",21),Vo(1),Z()),t&2){let e=Oe(2);Je("id",e._hintLabelId),V(),No(e.hintLabel)}}function Lp(t,r){if(t&1&&(q(0,Np,2,2,"mat-hint",21),de(1,7),Mt(2,"div",22),de(3,8)),t&2){let e=Oe();K(e.hintLabel?0:-1)}}var io=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["mat-label"]]})}return t})(),oo=new C("MatError"),Up=(()=>{class t{id=d(ce).getId("mat-mdc-error-");constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["mat-error"],["","matError",""]],hostAttrs:[1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(i,o){i&2&&Fe("id",o.id)},inputs:{id:"id"},features:[A([{provide:oo,useExisting:t}])]})}return t})(),ro=(()=>{class t{align="start";id=d(ce).getId("mat-mdc-hint-");static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(i,o){i&2&&(Fe("id",o.id),$("align",null),N("mat-mdc-form-field-hint-end",o.align==="end"))},inputs:{align:"align",id:"id"}})}return t})(),Cl=new C("MatPrefix");var no=new C("MatSuffix"),jp=(()=>{class t{set _isTextSelector(e){this._isText=!0}_isText=!1;static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[A([{provide:no,useExisting:t}])]})}return t})(),Sl=new C("FloatingLabelParent"),gl=(()=>{class t{_elementRef=d(P);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(fl);_ngZone=d(j);_parent=d(Sl);_resizeSubscription=new ti;constructor(){}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return $p(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(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(i,o){i&2&&N("mdc-floating-label--float-above",o.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return t})();function $p(t){let r=t;if(r.offsetParent!==null)return r.scrollWidth;let e=r.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let i=e.scrollWidth;return e.remove(),i}var _l="mdc-line-ripple--active",sr="mdc-line-ripple--deactivating",vl=(()=>{class t{_elementRef=d(P);_cleanupTransitionEnd;constructor(){let e=d(j),i=d(ge);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=i.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove(sr),e.add(_l)}deactivate(){this._elementRef.nativeElement.classList.add(sr)}_handleTransitionEnd=e=>{let i=this._elementRef.nativeElement.classList,o=i.contains(sr);e.propertyName==="opacity"&&o&&i.remove(_l,sr)};ngOnDestroy(){this._cleanupTransitionEnd()}static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return t})(),bl=(()=>{class t{_elementRef=d(P);_ngZone=d(j);open=!1;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,i=e.querySelector(".mdc-floating-label");i?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(i.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>i.style.transitionDuration="")}))):e.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(e){let i=this._notch.nativeElement;!this.open||!e?i.style.width="":i.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(i){return new(i||t)};static \u0275cmp=xe({type:t,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(i,o){if(i&1&&ne(gp,5),i&2){let n;O(n=I())&&(o._notch=n.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(i,o){i&2&&N("mdc-notched-outline--notched",o.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},attrs:_p,ngContentSelectors:vp,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(i,o){i&1&&(gr(),pr(0,"div",1),Oo(1,"div",2,0),de(3),Io(),pr(4,"div",3))},encapsulation:2,changeDetection:0})}return t})(),lr=(()=>{class t{value;stateChanges;id;placeholder;ngControl;focused;empty;shouldLabelFloat;required;disabled;errorState;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t})}return t})();var dr=new C("MatFormField"),Dl=new C("MAT_FORM_FIELD_DEFAULT_OPTIONS"),yl="fill",Bp="auto",xl="fixed",Wp="translateY(-50%)",ao=(()=>{class t{_elementRef=d(P);_changeDetectorRef=d(Xe);_platform=d(Ie);_idGenerator=d(ce);_ngZone=d(j);_defaults=d(Dl,{optional:!0});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=Et("iconPrefixContainer");_textPrefixContainerSignal=Et("textPrefixContainer");_iconSuffixContainerSignal=Et("iconSuffixContainer");_textSuffixContainerSignal=Et("textSuffixContainer");_prefixSuffixContainers=_e(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=Uo(io);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=it(e)}_hideRequiredMarker=!1;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||Bp}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let i=e||this._defaults?.appearance||yl;this._appearanceSignal.set(i)}_appearanceSignal=re(yl);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||xl}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||xl}_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 h;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=Ot();constructor(){let e=this._defaults,i=d(Ft);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),si(()=>this._currentDirection=i.valueSignal()),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=_e(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(e){let i=this._control,o="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(o+e.controlType),i.controlType&&this._elementRef.nativeElement.classList.add(o+i.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=i.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck()}),this._describedByChanges?.unsubscribe(),this._describedByChanges=i.stateChanges.pipe(Ze([void 0,void 0]),ke(()=>[i.errorState,i.userAriaDescribedBy]),xo(),le(([[n,a],[s,l]])=>n!==s||a!==l)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),i.ngControl&&i.ngControl.valueChanges&&(this._valueChanges=i.ngControl.valueChanges.pipe(ni(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(),oi(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(){jo({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=_e(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(e){let i=this._control?this._control.ngControl:null;return i&&i[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 i=this._control.describedByIds,o;if(i){let n=this._describedByIds||e;o=e.concat(i.filter(a=>a&&!n.includes(a)))}else o=e;this._control.setDescribedByIds(o),this._describedByIds=e}}_getOutlinedLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return["",null];if(!this._isAttachedToDom())return null;let e=this._iconPrefixContainer?.nativeElement,i=this._textPrefixContainer?.nativeElement,o=this._iconSuffixContainer?.nativeElement,n=this._textSuffixContainer?.nativeElement,a=e?.getBoundingClientRect().width??0,s=i?.getBoundingClientRect().width??0,l=o?.getBoundingClientRect().width??0,c=n?.getBoundingClientRect().width??0,_=this._currentDirection==="rtl"?"-1":"1",m=`${a+s}px`,b=`calc(${_} * (${m} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,v=`var(--mat-mdc-form-field-label-transform, ${Wp} translateX(${b}))`,E=a+s+l+c;return[v,E]}_writeOutlinedLabelStyles(e){if(e!==null){let[i,o]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=i),o!==null&&this._notchedOutline?._setMaxWidth(o)}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let i=e.getRootNode();return i&&i!==e}return document.documentElement.contains(e)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=xe({type:t,selectors:[["mat-form-field"]],contentQueries:function(i,o,n){if(i&1&&(Po(n,o._labelChild,io,5),Ye(n,lr,5),Ye(n,Cl,5),Ye(n,no,5),Ye(n,oo,5),Ye(n,ro,5)),i&2){_r();let a;O(a=I())&&(o._formFieldControl=a.first),O(a=I())&&(o._prefixChildren=a),O(a=I())&&(o._suffixChildren=a),O(a=I())&&(o._errorChildren=a),O(a=I())&&(o._hintChildren=a)}},viewQuery:function(i,o){if(i&1&&(kt(o._iconPrefixContainerSignal,ul,5),kt(o._textPrefixContainerSignal,ml,5),kt(o._iconSuffixContainerSignal,hl,5),kt(o._textSuffixContainerSignal,pl,5),ne(bp,5),ne(ul,5),ne(ml,5),ne(hl,5),ne(pl,5),ne(gl,5),ne(bl,5),ne(vl,5)),i&2){_r(4);let n;O(n=I())&&(o._textField=n.first),O(n=I())&&(o._iconPrefixContainer=n.first),O(n=I())&&(o._textPrefixContainer=n.first),O(n=I())&&(o._iconSuffixContainer=n.first),O(n=I())&&(o._textSuffixContainer=n.first),O(n=I())&&(o._floatingLabel=n.first),O(n=I())&&(o._notchedOutline=n.first),O(n=I())&&(o._lineRipple=n.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(i,o){i&2&&N("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:[A([{provide:dr,useExisting:t},{provide:Sl,useExisting:t}])],ngContentSelectors:xp,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(i,o){if(i&1){let n=Ro();gr(yp),Ee(0,Dp,1,1,"ng-template",null,0,Lo),Q(2,"div",6,1),oe("click",function(s){return wo(n),To(o._control.onContainerClick(s))}),q(4,wp,1,0,"div",7),Q(5,"div",8),q(6,Mp,2,2,"div",9),q(7,kp,3,0,"div",10),q(8,Ep,3,0,"div",11),Q(9,"div",12),q(10,Op,1,1,null,13),de(11),Z(),q(12,Ip,3,0,"div",14),q(13,Rp,3,0,"div",15),Z(),q(14,Pp,1,0,"div",16),Z(),Q(15,"div",17)(16,"div",18),q(17,Vp,1,0)(18,Lp,4,1),Z()()}if(i&2){let n;V(2),N("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),V(2),K(!o._hasOutline()&&!o._control.disabled?4:-1),V(2),K(o._hasOutline()?6:-1),V(),K(o._hasIconPrefix?7:-1),V(),K(o._hasTextPrefix?8:-1),V(2),K(!o._hasOutline()||o._forceDisplayInfixLabel()?10:-1),V(2),K(o._hasTextSuffix?12:-1),V(),K(o._hasIconSuffix?13:-1),V(),K(o._hasOutline()?-1:14),V(),N("mat-mdc-form-field-subscript-dynamic-size",o.subscriptSizing==="dynamic");let a=o._getSubscriptMessageType();V(),N("mat-mdc-form-field-error-wrapper",a==="error")("mat-mdc-form-field-hint-wrapper",a==="hint"),V(),K((n=a)==="error"?17:n==="hint"?18:-1)}},dependencies:[gl,bl,$o,vl,ro],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)}
|
|
5
|
+
`],encapsulation:2,changeDetection:0})}return t})();var cr=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=G({type:t});static \u0275inj=z({imports:[Se,Ho,ao,Se]})}return t})();var Hp=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=xe({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(i,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}
|
|
6
|
+
`],encapsulation:2,changeDetection:0})}return t})(),zp={passive:!0},wl=(()=>{class t{_platform=d(Ie);_ngZone=d(j);_renderer=d(ko).createRenderer(null,null);_styleLoader=d(Wo);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return fo;this._styleLoader.load(Hp);let i=yr(e),o=this._monitoredElements.get(i);if(o)return o.subject;let n=new h,a="cdk-text-field-autofilled",s=c=>{c.animationName==="cdk-text-field-autofill-start"&&!i.classList.contains(a)?(i.classList.add(a),this._ngZone.run(()=>n.next({target:c.target,isAutofilled:!0}))):c.animationName==="cdk-text-field-autofill-end"&&i.classList.contains(a)&&(i.classList.remove(a),this._ngZone.run(()=>n.next({target:c.target,isAutofilled:!1})))},l=this._ngZone.runOutsideAngular(()=>(i.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(i,"animationstart",s,zp)));return this._monitoredElements.set(i,{subject:n,unlisten:l}),n}stopMonitoring(e){let i=yr(e),o=this._monitoredElements.get(i);o&&(o.unlisten(),o.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}ngOnDestroy(){this._monitoredElements.forEach((e,i)=>this.stopMonitoring(i))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Tl=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=G({type:t});static \u0275inj=z({})}return t})();var Al=new C("MAT_INPUT_VALUE_ACCESSOR");var Ml=(()=>{class t{isErrorState(e,i){return!!(e&&e.invalid&&(e.touched||i&&i.submitted))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var fr=class{_defaultMatcher;ngControl;_parentFormGroup;_parentForm;_stateChanges;errorState=!1;matcher;constructor(r,e,i,o,n){this._defaultMatcher=r,this.ngControl=e,this._parentFormGroup=i,this._parentForm=o,this._stateChanges=n}updateErrorState(){let r=this.errorState,e=this._parentFormGroup||this._parentForm,i=this.matcher||this._defaultMatcher,o=this.ngControl?this.ngControl.control:null,n=i?.isErrorState(o,e)??!1;n!==r&&(this.errorState=n,this._stateChanges.next())}};var Gp=["button","checkbox","file","hidden","image","radio","range","reset","submit"],qp=new C("MAT_INPUT_CONFIG"),NT=(()=>{class t{_elementRef=d(P);_platform=d(Ie);ngControl=d(ue,{optional:!0,self:!0});_autofillMonitor=d(wl);_ngZone=d(j);_formField=d(dr,{optional:!0});_renderer=d(ge);_uid=d(ce).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder;_errorStateTracker;_config=d(qp,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer;_isNativeSelect;_isTextarea;_isInFormField;focused=!1;stateChanges=new h;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=it(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(zi.required)??!1}set required(e){this._required=it(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&xr().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=it(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=>xr().has(e));constructor(){let e=d(Xr,{optional:!0}),i=d(nr,{optional:!0}),o=d(Ml),n=d(Al,{optional:!0,self:!0}),a=this._elementRef.nativeElement,s=a.nodeName.toLowerCase();n?Ao(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 fr(o,this.ngControl,i,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&&si(()=>{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 i=this._elementRef.nativeElement;i.type==="number"?(i.type="text",i.setSelectionRange(0,0),i.type="number"):i.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 i=this._elementRef.nativeElement;this._previousPlaceholder=e,e?i.setAttribute("placeholder",e):i.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){Gp.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,i=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&i&&i.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let i=this._elementRef.nativeElement;e.length?i.setAttribute("aria-describedby",e.join(" ")):i.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 i=e.target;!i.value&&i.selectionStart===0&&i.selectionEnd===0&&(i.setSelectionRange(1,1),i.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(i,o){i&1&&oe("focus",function(){return o._focusChanged(!0)})("blur",function(){return o._focusChanged(!1)})("input",function(){return o._onInput()}),i&2&&(Fe("id",o.id)("disabled",o.disabled&&!o.disabledInteractive)("required",o.required),$("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),N("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",et]},exportAs:["matInput"],features:[A([{provide:lr,useExisting:t}]),pe]})}return t})(),LT=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=G({type:t});static \u0275inj=z({imports:[Se,cr,cr,Tl,Se]})}return t})();export{Re as a,Pt as b,fn as c,hi as d,rt as e,wr as f,pi as g,ln as h,Kg as i,fh as j,Or as k,bt as l,mh as m,Va as n,Pr as o,Z0 as p,Nr as q,Lr as r,xs as s,yt as t,As as u,Ms as v,Wi as w,Sh as x,Dh as y,wh as z,Th as A,Ah as B,Yt as C,$s as D,me as E,zi as F,W as G,ue as H,nw as I,aw as J,ze as K,sw as L,Xr as M,St as N,dw as O,Jh as P,cw as Q,Xh as R,tp as S,nr as T,al as U,sl as V,ap as W,lp as X,cp as Y,up as Z,hp as _,fw as $,uw as aa,mw as ba,fl as ca,io as da,Up as ea,ro as fa,jp as ga,lr as ha,dr as ia,Dl as ja,ao as ka,cr as la,Ml as ma,fr as na,NT as oa,LT as pa};
|