aiservermanager 0.5.9 → 0.5.10

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.
@@ -1,5 +1,5 @@
1
- import{$ as Ce,$a as nr,$b as Qs,A as Kt,Aa as io,Ab as Ve,Ac as yd,B as Yc,Ba as no,Bb as dt,Bc as Ko,C as Vt,Ca as od,Cb as jt,Cc as sr,D as ct,Da as ad,Db as Je,E as Xc,Ea as rd,Eb as A,Ec as Cd,F as xi,Fa as sd,Fb as ar,G as Qa,Ga as ld,Gb as w,Gc as lr,H as Hs,Ha as cd,Hb as ce,I as Zc,Ia as dd,Ib as U,Ic as xd,J as Us,Ja as Ct,Jb as at,K as Ja,Ka as Ws,Kb as Me,L as Se,La as oo,Lb as P,M as We,Ma as md,Mb as F,N as ae,Na as qs,Nb as hd,Nc as wd,O as Qc,Oa as tr,Ob as pd,P as di,Pa as je,Pb as Zs,Q as re,Qa as c,Qb as Fe,R as nt,Ra as Ye,Rb as Ne,S as ne,Sa as ot,Sb as p,T as z,Ta as ve,Tb as et,U as x,Ua as b,Ub as m,V as oe,Va as y,Vb as W,W as d,Wa as Uo,Wb as he,X as Ho,Xa as de,Xb as An,Y as Jc,Ya as ir,Yb as J,Z as mi,Za as Xe,Zb as Go,_ as ed,_a as Ks,_b as $o,a as V,aa as xe,ab as T,ac as Js,b as Oe,ba as wi,bb as j,bc as G,c as ye,ca as Gs,cb as S,cc as pt,d as De,da as X,db as Ys,dc as Di,e as yt,ea as q,eb as Xs,ec as fd,f as Wc,fa as Bt,fb as ud,fc as ao,g as R,ga as K,gb as Q,gc as Wo,h as Qn,ha as H,hb as He,hc as gd,i as qa,ia as Mn,ib as or,ic as qo,j as Bs,ja as I,jb as Qi,jc as te,k as zs,ka as En,kb as Z,kc as _d,l as Ka,la as td,lb as M,lc as vd,m as qc,ma as eo,mb as E,mc as L,n as ge,na as Pi,nb as xt,nc as wt,o as Ya,oa as to,ob as me,oc as bd,p as js,pa as id,pb as ue,pc as rr,q as Te,qa as zt,qb as C,r as Pe,ra as Xi,rb as s,s as Jn,sa as $s,sb as l,t as Kc,ta as ke,tb as _,u as Yi,ua as _e,ub as Ie,v as Xa,va as Y,vb as Ue,w as Za,wa as N,wb as ht,x as $e,xa as Zi,xb as ui,y as we,ya as nd,yb as hi,z as jo,za as er,zb as Yt}from"./chunk-JGNPKRLU.js";var Dd=null;function Xt(){return Dd}function el(i){Dd??=i}var Yo=class{},ro=(()=>{class i{historyGo(e){throw new Error("")}static \u0275fac=function(t){return new(t||i)};static \u0275prov=ne({token:i,factory:()=>d(Sd),providedIn:"platform"})}return i})();var Sd=(()=>{class i extends ro{_location;_history;_doc=d(q);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Xt().getBaseHref(this._doc)}onPopState(e){let t=Xt().getGlobalEventTarget(this._doc,"window");return t.addEventListener("popstate",e,!1),()=>t.removeEventListener("popstate",e)}onHashChange(e){let t=Xt().getGlobalEventTarget(this._doc,"window");return t.addEventListener("hashchange",e,!1),()=>t.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,t,n){this._history.pushState(e,t,n)}replaceState(e,t,n){this._history.replaceState(e,t,n)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static \u0275fac=function(t){return new(t||i)};static \u0275prov=ne({token:i,factory:()=>new i,providedIn:"platform"})}return i})();function Ed(i,o){return i?o?i.endsWith("/")?o.startsWith("/")?i+o.slice(1):i+o:o.startsWith("/")?i+o:`${i}/${o}`:i:o}function kd(i){let o=i.search(/#|\?|$/);return i[o-1]==="/"?i.slice(0,o-1)+i.slice(o):i}function Ji(i){return i&&i[0]!=="?"?`?${i}`:i}var cr=(()=>{class i{historyGo(e){throw new Error("")}static \u0275fac=function(t){return new(t||i)};static \u0275prov=ne({token:i,factory:()=>d(Hp),providedIn:"root"})}return i})(),jp=new x(""),Hp=(()=>{class i extends cr{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,t){super(),this._platformLocation=e,this._baseHref=t??this._platformLocation.getBaseHrefFromDOM()??d(q).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return Ed(this._baseHref,e)}path(e=!1){let t=this._platformLocation.pathname+Ji(this._platformLocation.search),n=this._platformLocation.hash;return n&&e?`${t}${n}`:t}pushState(e,t,n,a){let r=this.prepareExternalUrl(n+Ji(a));this._platformLocation.pushState(e,t,r)}replaceState(e,t,n,a){let r=this.prepareExternalUrl(n+Ji(a));this._platformLocation.replaceState(e,t,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(t){return new(t||i)(oe(ro),oe(jp,8))};static \u0275prov=ne({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var dr=(()=>{class i{_subject=new R;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let t=this._locationStrategy.getBaseHref();this._basePath=$p(kd(Md(t))),this._locationStrategy.onPopState(n=>{this._subject.next({url:this.path(!0),pop:!0,state:n.state,type:n.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,t=""){return this.path()==this.normalize(e+Ji(t))}normalize(e){return i.stripTrailingSlash(Gp(this._basePath,Md(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,t="",n=null){this._locationStrategy.pushState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ji(t)),n)}replaceState(e,t="",n=null){this._locationStrategy.replaceState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ji(t)),n)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe(t=>{this._notifyUrlChangeListeners(t.url,t.state)}),()=>{let t=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(t,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",t){this._urlChangeListeners.forEach(n=>n(e,t))}subscribe(e,t,n){return this._subject.subscribe({next:e,error:t??void 0,complete:n??void 0})}static normalizeQueryParams=Ji;static joinWithSlash=Ed;static stripTrailingSlash=kd;static \u0275fac=function(t){return new(t||i)(oe(cr))};static \u0275prov=ne({token:i,factory:()=>Up(),providedIn:"root"})}return i})();function Up(){return new dr(oe(cr))}function Gp(i,o){if(!i||!o.startsWith(i))return o;let e=o.substring(i.length);return e===""||["/",";","?","#"].includes(e[0])?e:o}function Md(i){return i.replace(/\/index\.html$/,"")}function $p(i){if(new RegExp("^(https?:)?//").test(i)){let[,e]=i.split(/\/\/[^\/]+/);return e}return i}var sl=(function(i){return i[i.Decimal=0]="Decimal",i[i.Percent=1]="Percent",i[i.Currency=2]="Currency",i[i.Scientific=3]="Scientific",i})(sl||{});var ft=(function(i){return i[i.Format=0]="Format",i[i.Standalone=1]="Standalone",i})(ft||{}),Re=(function(i){return i[i.Narrow=0]="Narrow",i[i.Abbreviated=1]="Abbreviated",i[i.Wide=2]="Wide",i[i.Short=3]="Short",i})(Re||{}),Tt=(function(i){return i[i.Short=0]="Short",i[i.Medium=1]="Medium",i[i.Long=2]="Long",i[i.Full=3]="Full",i})(Tt||{}),It={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function Od(i){return jt(i)[Je.LocaleId]}function Pd(i,o,e){let t=jt(i),n=[t[Je.DayPeriodsFormat],t[Je.DayPeriodsStandalone]],a=Zt(n,o);return Zt(a,e)}function Fd(i,o,e){let t=jt(i),n=[t[Je.DaysFormat],t[Je.DaysStandalone]],a=Zt(n,o);return Zt(a,e)}function Nd(i,o,e){let t=jt(i),n=[t[Je.MonthsFormat],t[Je.MonthsStandalone]],a=Zt(n,o);return Zt(a,e)}function Ld(i,o){let t=jt(i)[Je.Eras];return Zt(t,o)}function Xo(i,o){let e=jt(i);return Zt(e[Je.DateFormat],o)}function Zo(i,o){let e=jt(i);return Zt(e[Je.TimeFormat],o)}function Qo(i,o){let t=jt(i)[Je.DateTimeFormat];return Zt(t,o)}function Si(i,o){let e=jt(i),t=e[Je.NumberSymbols][o];if(typeof t>"u"){if(o===It.CurrencyDecimal)return e[Je.NumberSymbols][It.Decimal];if(o===It.CurrencyGroup)return e[Je.NumberSymbols][It.Group]}return t}function Vd(i,o){return jt(i)[Je.NumberFormats][o]}function Bd(i){if(!i[Je.ExtraData])throw new re(2303,!1)}function zd(i){let o=jt(i);return Bd(o),(o[Je.ExtraData][2]||[]).map(t=>typeof t=="string"?tl(t):[tl(t[0]),tl(t[1])])}function jd(i,o,e){let t=jt(i);Bd(t);let n=[t[Je.ExtraData][0],t[Je.ExtraData][1]],a=Zt(n,o)||[];return Zt(a,e)||[]}function Zt(i,o){for(let e=o;e>-1;e--)if(typeof i[e]<"u")return i[e];throw new re(2304,!1)}function tl(i){let[o,e]=i.split(":");return{hours:+o,minutes:+e}}var Wp=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,mr={},qp=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,Kp=256;function Hd(i,o,e,t){let n=af(i);Yp(o),o=Fi(e,o)||o;let r=[],u;for(;o;)if(u=qp.exec(o),u){r=r.concat(u.slice(1));let v=r.pop();if(!v)break;o=v}else{r.push(o);break}let h=n.getTimezoneOffset();t&&(h=Gd(t,h),n=of(n,t));let g="";return r.forEach(v=>{let D=tf(v);g+=D?D(n,e,h):v==="''"?"'":v.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),g}function Yp(i){if(i.length>Kp)throw new re(2300,!1)}function gr(i,o,e){let t=new Date(0);return t.setFullYear(i,o,e),t.setHours(0,0,0),t}function Fi(i,o){let e=Od(i);if(mr[e]??={},mr[e][o])return mr[e][o];let t="";switch(o){case"shortDate":t=Xo(i,Tt.Short);break;case"mediumDate":t=Xo(i,Tt.Medium);break;case"longDate":t=Xo(i,Tt.Long);break;case"fullDate":t=Xo(i,Tt.Full);break;case"shortTime":t=Zo(i,Tt.Short);break;case"mediumTime":t=Zo(i,Tt.Medium);break;case"longTime":t=Zo(i,Tt.Long);break;case"fullTime":t=Zo(i,Tt.Full);break;case"short":let n=Fi(i,"shortTime"),a=Fi(i,"shortDate");t=ur(Qo(i,Tt.Short),[n,a]);break;case"medium":let r=Fi(i,"mediumTime"),u=Fi(i,"mediumDate");t=ur(Qo(i,Tt.Medium),[r,u]);break;case"long":let h=Fi(i,"longTime"),g=Fi(i,"longDate");t=ur(Qo(i,Tt.Long),[h,g]);break;case"full":let v=Fi(i,"fullTime"),D=Fi(i,"fullDate");t=ur(Qo(i,Tt.Full),[v,D]);break}return t&&(mr[e][o]=t),t}function ur(i,o){return o&&(i=i.replace(/\{([^}]+)}/g,function(e,t){return Object.hasOwn(o,t)?o[t]:e})),i}function pi(i,o,e="-",t,n){let a="";(i<0||n&&i<=0)&&(n?i=-i+1:(i=-i,a=e));let r=String(i);for(;r.length<o;)r="0"+r;return t&&(r=r.slice(r.length-o)),a+r}function Xp(i,o){return pi(i,3).substring(0,o)}function tt(i,o,e=0,t=!1,n=!1){return function(a,r){let u=Zp(i,a);if((e>0||u>-e)&&(u+=e),i===3)u===0&&e===-12&&(u=12);else if(i===6)return Xp(u,o);let h=Si(r,It.MinusSign);return pi(u,o,h,t,n)}}function Zp(i,o){switch(i){case 0:return o.getFullYear();case 1:return o.getMonth();case 2:return o.getDate();case 3:return o.getHours();case 4:return o.getMinutes();case 5:return o.getSeconds();case 6:return o.getMilliseconds();case 7:return o.getDay();default:throw new re(2301,!1)}}function Be(i,o,e=ft.Format,t=!1){return function(n,a){return Qp(n,a,i,o,e,t)}}function Qp(i,o,e,t,n,a){switch(e){case 2:return Nd(o,n,t)[i.getMonth()];case 1:return Fd(o,n,t)[i.getDay()];case 0:let r=i.getHours(),u=i.getMinutes();if(a){let g=zd(o),v=jd(o,n,t),D=g.findIndex(B=>{if(Array.isArray(B)){let[$,ie]=B,fe=r>=$.hours&&u>=$.minutes,se=r<ie.hours||r===ie.hours&&u<ie.minutes;if($.hours<ie.hours){if(fe&&se)return!0}else if(fe||se)return!0}else if(B.hours===r&&B.minutes===u)return!0;return!1});if(D!==-1)return v[D]}return Pd(o,n,t)[r<12?0:1];case 3:return Ld(o,t)[i.getFullYear()<=0?0:1];default:let h=e;throw new re(2302,!1)}}function hr(i){return function(o,e,t){let n=-1*t,a=Si(e,It.MinusSign),r=n>0?Math.floor(n/60):Math.ceil(n/60);switch(i){case 0:return(n>=0?"+":"")+pi(r,2,a)+pi(Math.abs(n%60),2,a);case 1:return"GMT"+(n>=0?"+":"")+pi(r,1,a);case 2:return"GMT"+(n>=0?"+":"")+pi(r,2,a)+":"+pi(Math.abs(n%60),2,a);case 3:return t===0?"Z":(n>=0?"+":"")+pi(r,2,a)+":"+pi(Math.abs(n%60),2,a);default:throw new re(2310,!1)}}}var Jp=0,fr=4;function ef(i){let o=gr(i,Jp,1).getDay();return gr(i,0,1+(o<=fr?fr:fr+7)-o)}function Ud(i){let o=i.getDay(),e=o===0?-3:fr-o;return gr(i.getFullYear(),i.getMonth(),i.getDate()+e)}function il(i,o=!1){return function(e,t){let n;if(o){let a=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,r=e.getDate();n=1+Math.floor((r+a)/7)}else{let a=Ud(e),r=ef(a.getFullYear()),u=a.getTime()-r.getTime();n=1+Math.round(u/6048e5)}return pi(n,i,Si(t,It.MinusSign))}}function pr(i,o=!1){return function(e,t){let a=Ud(e).getFullYear();return pi(a,i,Si(t,It.MinusSign),o)}}var nl={};function tf(i){if(nl[i])return nl[i];let o;switch(i){case"G":case"GG":case"GGG":o=Be(3,Re.Abbreviated);break;case"GGGG":o=Be(3,Re.Wide);break;case"GGGGG":o=Be(3,Re.Narrow);break;case"y":o=tt(0,1,0,!1,!0);break;case"yy":o=tt(0,2,0,!0,!0);break;case"yyy":o=tt(0,3,0,!1,!0);break;case"yyyy":o=tt(0,4,0,!1,!0);break;case"Y":o=pr(1);break;case"YY":o=pr(2,!0);break;case"YYY":o=pr(3);break;case"YYYY":o=pr(4);break;case"M":case"L":o=tt(1,1,1);break;case"MM":case"LL":o=tt(1,2,1);break;case"MMM":o=Be(2,Re.Abbreviated);break;case"MMMM":o=Be(2,Re.Wide);break;case"MMMMM":o=Be(2,Re.Narrow);break;case"LLL":o=Be(2,Re.Abbreviated,ft.Standalone);break;case"LLLL":o=Be(2,Re.Wide,ft.Standalone);break;case"LLLLL":o=Be(2,Re.Narrow,ft.Standalone);break;case"w":o=il(1);break;case"ww":o=il(2);break;case"W":o=il(1,!0);break;case"d":o=tt(2,1);break;case"dd":o=tt(2,2);break;case"c":case"cc":o=tt(7,1);break;case"ccc":o=Be(1,Re.Abbreviated,ft.Standalone);break;case"cccc":o=Be(1,Re.Wide,ft.Standalone);break;case"ccccc":o=Be(1,Re.Narrow,ft.Standalone);break;case"cccccc":o=Be(1,Re.Short,ft.Standalone);break;case"E":case"EE":case"EEE":o=Be(1,Re.Abbreviated);break;case"EEEE":o=Be(1,Re.Wide);break;case"EEEEE":o=Be(1,Re.Narrow);break;case"EEEEEE":o=Be(1,Re.Short);break;case"a":case"aa":case"aaa":o=Be(0,Re.Abbreviated);break;case"aaaa":o=Be(0,Re.Wide);break;case"aaaaa":o=Be(0,Re.Narrow);break;case"b":case"bb":case"bbb":o=Be(0,Re.Abbreviated,ft.Standalone,!0);break;case"bbbb":o=Be(0,Re.Wide,ft.Standalone,!0);break;case"bbbbb":o=Be(0,Re.Narrow,ft.Standalone,!0);break;case"B":case"BB":case"BBB":o=Be(0,Re.Abbreviated,ft.Format,!0);break;case"BBBB":o=Be(0,Re.Wide,ft.Format,!0);break;case"BBBBB":o=Be(0,Re.Narrow,ft.Format,!0);break;case"h":o=tt(3,1,-12);break;case"hh":o=tt(3,2,-12);break;case"H":o=tt(3,1);break;case"HH":o=tt(3,2);break;case"m":o=tt(4,1);break;case"mm":o=tt(4,2);break;case"s":o=tt(5,1);break;case"ss":o=tt(5,2);break;case"S":o=tt(6,1);break;case"SS":o=tt(6,2);break;case"SSS":o=tt(6,3);break;case"Z":case"ZZ":case"ZZZ":o=hr(0);break;case"ZZZZZ":o=hr(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":o=hr(1);break;case"OOOO":case"ZZZZ":case"zzzz":o=hr(2);break;default:return null}return nl[i]=o,o}function Gd(i,o){i=i.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+i)/6e4;return isNaN(e)?o:e}function nf(i,o){return i=new Date(i.getTime()),i.setMinutes(i.getMinutes()+o),i}function of(i,o,e){let n=i.getTimezoneOffset(),a=Gd(o,n);return nf(i,-1*(a-n))}function af(i){if(Ad(i))return i;if(typeof i=="number"&&!isNaN(i))return new Date(i);if(typeof i=="string"){if(i=i.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(i)){let[n,a=1,r=1]=i.split("-").map(u=>+u);return gr(n,a-1,r)}let e=parseFloat(i);if(!isNaN(i-e))return new Date(e);let t;if(t=i.match(Wp))return rf(t)}let o=new Date(i);if(!Ad(o))throw new re(2311,!1);return o}function rf(i){let o=new Date(0),e=0,t=0,n=i[8]?o.setUTCFullYear:o.setFullYear,a=i[8]?o.setUTCHours:o.setHours;i[9]&&(e=Number(i[9]+i[10]),t=Number(i[9]+i[11])),n.call(o,Number(i[1]),Number(i[2])-1,Number(i[3]));let r=Number(i[4]||0)-e,u=Number(i[5]||0)-t,h=Number(i[6]||0),g=Math.floor(parseFloat("0."+(i[7]||0))*1e3);return a.call(o,r,u,h,g),o}function Ad(i){return i instanceof Date&&!isNaN(i.valueOf())}var sf=/^(\d+)?\.((\d+)(-(\d+))?)?$/,Td=22,_r=".",Jo="0",lf=";",cf=",",ol="#";function df(i,o,e,t,n,a,r=!1){let u="",h=!1;if(!isFinite(i))u=Si(e,It.Infinity);else{let g=hf(i);r&&(g=uf(g));let v=o.minInt,D=o.minFrac,B=o.maxFrac;if(a){let lt=a.match(sf);if(lt===null)throw new re(2306,!1);let li=lt[1],Ci=lt[3],Ki=lt[5];li!=null&&(v=al(li)),Ci!=null&&(D=al(Ci)),Ki!=null?B=al(Ki):Ci!=null&&D>B&&(B=D);let ci=100;if(v>ci||D>ci||B>ci)throw new re(2306,!1)}pf(g,D,B);let $=g.digits,ie=g.integerLen,fe=g.exponent,se=[];for(h=$.every(lt=>!lt);ie<v;ie++)$.unshift(0);for(;ie<0;ie++)$.unshift(0);ie>0?se=$.splice(ie,$.length):(se=$,$=[0]);let Ae=[];for($.length>=o.lgSize&&Ae.unshift($.splice(-o.lgSize,$.length).join(""));$.length>o.gSize;)Ae.unshift($.splice(-o.gSize,$.length).join(""));$.length&&Ae.unshift($.join("")),u=Ae.join(Si(e,t)),se.length&&(u+=Si(e,n)+se.join("")),fe&&(u+=Si(e,It.Exponential)+"+"+fe)}return i<0&&!h?u=o.negPre+u+o.negSuf:u=o.posPre+u+o.posSuf,u}function $d(i,o,e){let t=Vd(o,sl.Decimal),n=mf(t,Si(o,It.MinusSign));return df(i,n,o,It.Group,It.Decimal,e)}function mf(i,o="-"){let e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},t=i.split(lf),n=t[0],a=t[1],r=n.indexOf(_r)!==-1?n.split(_r):[n.substring(0,n.lastIndexOf(Jo)+1),n.substring(n.lastIndexOf(Jo)+1)],u=r[0],h=r[1]||"";e.posPre=u.substring(0,u.indexOf(ol));for(let v=0;v<h.length;v++){let D=h.charAt(v);D===Jo?e.minFrac=e.maxFrac=v+1:D===ol?e.maxFrac=v+1:e.posSuf+=D}let g=u.split(cf);if(e.gSize=g[1]?g[1].length:0,e.lgSize=g[2]||g[1]?(g[2]||g[1]).length:0,a){let v=n.length-e.posPre.length-e.posSuf.length,D=a.indexOf(ol);e.negPre=a.substring(0,D).replace(/'/g,""),e.negSuf=a.slice(D+v).replace(/'/g,"")}else e.negPre=o+e.posPre,e.negSuf=e.posSuf;return e}function uf(i){if(i.digits[0]===0)return i;let o=i.digits.length-i.integerLen;return i.exponent?i.exponent+=2:(o===0?i.digits.push(0,0):o===1&&i.digits.push(0),i.integerLen+=2),i}function hf(i){let o=Math.abs(i)+"",e=0,t,n,a,r,u;for((n=o.indexOf(_r))>-1&&(o=o.replace(_r,"")),(a=o.search(/e/i))>0?(n<0&&(n=a),n+=+o.slice(a+1),o=o.substring(0,a)):n<0&&(n=o.length),a=0;o.charAt(a)===Jo;a++);if(a===(u=o.length))t=[0],n=1;else{for(u--;o.charAt(u)===Jo;)u--;for(n-=a,t=[],r=0;a<=u;a++,r++)t[r]=Number(o.charAt(a))}return n>Td&&(t=t.splice(0,Td-1),e=n-1,n=1),{digits:t,exponent:e,integerLen:n}}function pf(i,o,e){if(o>e)throw new re(2307,!1);let t=i.digits,n=t.length-i.integerLen,a=Math.min(Math.max(o,n),e),r=a+i.integerLen,u=t[r];if(r>0){t.splice(Math.max(i.integerLen,r));for(let D=r;D<t.length;D++)t[D]=0}else{n=Math.max(0,n),i.integerLen=1,t.length=Math.max(1,r=a+1),t[0]=0;for(let D=1;D<r;D++)t[D]=0}if(u>=5)if(r-1<0){for(let D=0;D>r;D--)t.unshift(0),i.integerLen++;t.unshift(1),i.integerLen++}else t[r-1]++;for(;n<Math.max(0,a);n++)t.push(0);let h=a!==0,g=o+i.integerLen,v=t.reduceRight(function(D,B,$,ie){return B=B+D,ie[$]=B<10?B:B-10,h&&(ie[$]===0&&$>=g?ie.pop():h=!1),B>=10?1:0},0);v&&(t.unshift(v),i.integerLen++)}function al(i){let o=parseInt(i);if(isNaN(o))throw new re(2305,!1);return o}var rl=/\s+/,Id=[],ll=(()=>{class i{_ngEl;_renderer;initialClasses=Id;rawClass;stateMap=new Map;constructor(e,t){this._ngEl=e,this._renderer=t}set klass(e){this.initialClasses=e!=null?e.trim().split(rl):Id}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(rl):e}ngDoCheck(){for(let t of this.initialClasses)this._updateState(t,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let t of e)this._updateState(t,!0);else if(e!=null)for(let t of Object.keys(e))this._updateState(t,!!e[t]);this._applyStateDiff()}_updateState(e,t){let n=this.stateMap.get(e);n!==void 0?(n.enabled!==t&&(n.changed=!0,n.enabled=t),n.touched=!0):this.stateMap.set(e,{enabled:t,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let t=e[0],n=e[1];n.changed?(this._toggleClass(t,n.enabled),n.changed=!1):n.touched||(n.enabled&&this._toggleClass(t,!1),this.stateMap.delete(t)),n.touched=!1}}_toggleClass(e,t){e=e.trim(),e.length>0&&e.split(rl).forEach(n=>{t?this._renderer.addClass(this._ngEl.nativeElement,n):this._renderer.removeClass(this._ngEl.nativeElement,n)})}static \u0275fac=function(t){return new(t||i)(de(N),de(ve))};static \u0275dir=S({type:i,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return i})();var cl=(()=>{class i{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=d(X);constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let t=this._viewContainerRef;if(this._viewRef&&t.remove(t.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let n=this._createContextForwardProxy();this._viewRef=t.createEmbeddedView(this.ngTemplateOutlet,n,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector==="outlet"?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,t,n)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,t,n):!1,get:(e,t,n)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,t,n)}})}static \u0275fac=function(t){return new(t||i)(de(Xe))};static \u0275dir=S({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[ke]})}return i})();function Wd(i,o){return new re(2100,!1)}var ff="mediumDate",qd=new x(""),Kd=new x(""),dl=(()=>{class i{locale;defaultTimezone;defaultOptions;constructor(e,t,n){this.locale=e,this.defaultTimezone=t,this.defaultOptions=n}transform(e,t,n,a){if(e==null||e===""||e!==e)return null;try{let r=t??this.defaultOptions?.dateFormat??ff,u=n??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Hd(e,r,a||this.locale,u)}catch(r){throw Wd(i,r.message)}}static \u0275fac=function(t){return new(t||i)(de(Js,16),de(qd,24),de(Kd,24))};static \u0275pipe=Ys({name:"date",type:i,pure:!0})}return i})();var ml=(()=>{class i{_locale;constructor(e){this._locale=e}transform(e,t,n){if(!gf(e))return null;n||=this._locale;try{let a=_f(e);return $d(a,n,t)}catch(a){throw Wd(i,a.message)}}static \u0275fac=function(t){return new(t||i)(de(Js,16))};static \u0275pipe=Ys({name:"number",type:i,pure:!0})}return i})();function gf(i){return!(i==null||i===""||i!==i)}function _f(i){if(typeof i=="string"&&!isNaN(Number(i)-parseFloat(i)))return Number(i);if(typeof i!="number")throw new re(2309,!1);return i}var ze=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({})}return i})();function ea(i,o){o=encodeURIComponent(o);for(let e of i.split(";")){let t=e.indexOf("="),[n,a]=t==-1?[e,""]:[e.slice(0,t),e.slice(t+1)];if(n.trim()===o)return decodeURIComponent(a)}return null}var ul="browser";function Yd(i){return i===ul}var ta=class{_doc;constructor(o){this._doc=o}manager},vr=(()=>{class i extends ta{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,n,a){return e.addEventListener(t,n,a),()=>this.removeEventListener(e,t,n,a)}removeEventListener(e,t,n,a){return e.removeEventListener(t,n,a)}static \u0275fac=function(t){return new(t||i)(oe(q))};static \u0275prov=ne({token:i,factory:i.\u0275fac})}return i})(),Cr=new x(""),gl=(()=>{class i{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(r=>{r.manager=this});let n=e.filter(r=>!(r instanceof vr));this._plugins=n.slice().reverse();let a=e.find(r=>r instanceof vr);a&&this._plugins.push(a)}addEventListener(e,t,n,a){return this._findPluginFor(t).addEventListener(e,t,n,a)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(a=>a.supports(e)),!t)throw new re(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static \u0275fac=function(t){return new(t||i)(oe(Cr),oe(H))};static \u0275prov=ne({token:i,factory:i.\u0275fac})}return i})(),hl="ng-app-id";function Zd(i){for(let o of i)o.remove()}function Qd(i,o){let e=o.createElement("style");return e.textContent=i,e}function yf(i,o,e,t){let n=i.head?.querySelectorAll(`style[${hl}="${o}"],link[${hl}="${o}"]`);if(!n||n.length===0)return!1;for(let a of n)a.removeAttribute(hl),a instanceof HTMLLinkElement?t.set(a.href.slice(a.href.lastIndexOf("/")+1),{usage:0,elements:[a]}):a.textContent&&e.set(a.textContent,{usage:0,elements:[a]});return!0}function fl(i,o){let e=o.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",i),e}var _l=(()=>{class i{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,t,n,a={}){this.doc=e,this.appId=t,this.nonce=n,yf(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let n of e)this.addUsage(n,this.inline,Qd);t?.forEach(n=>this.addUsage(n,this.external,fl))}removeStyles(e,t){for(let n of e)this.removeUsage(n,this.inline);t?.forEach(n=>this.removeUsage(n,this.external))}addUsage(e,t,n){let a=t.get(e);a?a.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(r=>this.addElement(r,n(e,this.doc)))})}removeUsage(e,t){let n=t.get(e);n&&(n.usage--,n.usage<=0&&(Zd(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Zd(e);this.hosts.clear()}addHost(e){if(!this.hosts.has(e)){this.hosts.add(e);for(let[t,{elements:n}]of this.inline)n.push(this.addElement(e,Qd(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,fl(t,this.doc)))}}removeHost(e){this.hosts.delete(e);for(let t of[...this.inline.values(),...this.external.values()]){let n=[];for(let a of t.elements)a.parentNode===e?a.remove():n.push(a);t.elements=n}}addElement(e,t){return this.nonce&&t.setAttribute("nonce",this.nonce),e.appendChild(t)}static \u0275fac=function(t){return new(t||i)(oe(q),oe(En),oe(to,8),oe(eo))};static \u0275prov=ne({token:i,factory:i.\u0275fac})}return i})(),pl={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},vl=/%COMP%/g;var em="%COMP%",Cf=`_nghost-${em}`,xf=`_ngcontent-${em}`,wf=!0,Df=new x("",{factory:()=>wf});function Sf(i){return xf.replace(vl,i)}function kf(i){return Cf.replace(vl,i)}function tm(i,o){return o.map(e=>e.replace(vl,i))}var Tn=(()=>{class i{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(e,t,n,a,r,u,h=null,g=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.removeStylesOnCompDestroy=a,this.doc=r,this.ngZone=u,this.nonce=h,this.tracingService=g,this.defaultRenderer=new ia(e,r,u,this.tracingService)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let n=this.getOrCreateRenderer(e,t);return n instanceof yr?n.applyToHost(e):n instanceof na&&n.applyStyles(),n}getOrCreateRenderer(e,t){let n=this.rendererByCompId,a=n.get(t.id);if(!a){let r=this.doc,u=this.ngZone,h=this.eventManager,g=this.sharedStylesHost,v=this.removeStylesOnCompDestroy,D=this.tracingService;switch(t.encapsulation){case er.Emulated:a=new yr(h,g,t,this.appId,v,r,u,D);break;case er.ShadowDom:return new br(h,e,t,r,u,this.nonce,D,g);case er.ExperimentalIsolatedShadowDom:return new br(h,e,t,r,u,this.nonce,D);default:a=new na(h,g,t,v,r,u,D);break}n.set(t.id,a)}return a}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(t){return new(t||i)(oe(gl),oe(Uo),oe(En),oe(Df),oe(q),oe(H),oe(to),oe(qs,8))};static \u0275prov=ne({token:i,factory:i.\u0275fac})}return i})(),ia=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(o,e,t,n){this.eventManager=o,this.doc=e,this.ngZone=t,this.tracingService=n}destroy(){}destroyNode=null;createElement(o,e){return e?this.doc.createElementNS(pl[e]||e,o):this.doc.createElement(o)}createComment(o){return this.doc.createComment(o)}createText(o){return this.doc.createTextNode(o)}appendChild(o,e){(Jd(o)?o.content:o).appendChild(e)}insertBefore(o,e,t){o&&(Jd(o)?o.content:o).insertBefore(e,t)}removeChild(o,e){e.remove()}selectRootElement(o,e){let t=typeof o=="string"?this.doc.querySelector(o):o;if(!t)throw new re(-5104,!1);return e||(t.textContent=""),t}parentNode(o){return o.parentNode}nextSibling(o){return o.nextSibling}setAttribute(o,e,t,n){if(n){e=n+":"+e;let a=pl[n];a?o.setAttributeNS(a,e,t):o.setAttribute(e,t)}else o.setAttribute(e,t)}removeAttribute(o,e,t){if(t){let n=pl[t];n?o.removeAttributeNS(n,e):o.removeAttribute(`${t}:${e}`)}else o.removeAttribute(e)}addClass(o,e){o.classList.add(e)}removeClass(o,e){o.classList.remove(e)}setStyle(o,e,t,n){n&(oo.DashCase|oo.Important)?o.style.setProperty(e,t,n&oo.Important?"important":""):o.style[e]=t}removeStyle(o,e,t){t&oo.DashCase?o.style.removeProperty(e):o.style[e]=""}setProperty(o,e,t){o!=null&&(o[e]=t)}setValue(o,e){o.nodeValue=e}listen(o,e,t,n){if(typeof o=="string"&&(o=Xt().getGlobalEventTarget(this.doc,o),!o))throw new re(-5102,!1);let a=this.decoratePreventDefault(t);return this.tracingService?.wrapEventListener&&(a=this.tracingService.wrapEventListener(o,e,a)),this.eventManager.addEventListener(o,e,a,n)}decoratePreventDefault(o){return e=>{if(e==="__ngUnwrap__")return o;o(e)===!1&&e.preventDefault()}}};function Jd(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var br=class extends ia{hostEl;sharedStylesHost;shadowRoot;constructor(o,e,t,n,a,r,u,h){super(o,n,a,u),this.hostEl=e,this.sharedStylesHost=h,this.shadowRoot=e.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let g=t.styles;g=tm(t.id,g);for(let D of g){let B=document.createElement("style");r&&B.setAttribute("nonce",r),B.textContent=D,this.shadowRoot.appendChild(B)}let v=t.getExternalStyles?.();if(v)for(let D of v){let B=fl(D,n);r&&B.setAttribute("nonce",r),this.shadowRoot.appendChild(B)}}nodeOrShadowRoot(o){return o===this.hostEl?this.shadowRoot:o}appendChild(o,e){return super.appendChild(this.nodeOrShadowRoot(o),e)}insertBefore(o,e,t){return super.insertBefore(this.nodeOrShadowRoot(o),e,t)}removeChild(o,e){return super.removeChild(null,e)}parentNode(o){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(o)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},na=class extends ia{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(o,e,t,n,a,r,u,h){super(o,a,r,u),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=n;let g=t.styles;this.styles=h?tm(h,g):g,this.styleUrls=t.getExternalStyles?.(h)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&md.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},yr=class extends na{contentAttr;hostAttr;constructor(o,e,t,n,a,r,u,h){let g=n+"-"+t.id;super(o,e,t,a,r,u,h,g),this.contentAttr=Sf(g),this.hostAttr=kf(g)}applyToHost(o){this.applyStyles(),this.setAttribute(o,this.hostAttr,"")}createElement(o,e){let t=super.createElement(o,e);return super.setAttribute(t,this.contentAttr,""),t}};var xr=class i extends Yo{supportsDOMEvents=!0;static makeCurrent(){el(new i)}onAndCancel(o,e,t,n){return o.addEventListener(e,t,n),()=>{o.removeEventListener(e,t,n)}}dispatchEvent(o,e){o.dispatchEvent(e)}remove(o){o.remove()}createElement(o,e){return e=e||this.getDefaultDocument(),e.createElement(o)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(o){return o.nodeType===Node.ELEMENT_NODE}isShadowRoot(o){return o instanceof DocumentFragment}getGlobalEventTarget(o,e){return e==="window"?window:e==="document"?o:e==="body"?o.body:null}getBaseHref(o){let e=Ef();return e==null?null:Af(e)}resetBaseElement(){oa=null}getUserAgent(){return window.navigator.userAgent}getCookie(o){return ea(document.cookie,o)}},oa=null;function Ef(){return oa=oa||document.head.querySelector("base"),oa?oa.getAttribute("href"):null}function Af(i){return new URL(i,document.baseURI).pathname}var im=["alt","control","meta","shift"],Tf={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},If={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},nm=(()=>{class i extends ta{constructor(e){super(e)}supports(e){return i.parseEventName(e)!=null}addEventListener(e,t,n,a){let r=i.parseEventName(t),u=i.eventCallback(r.fullKey,n,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Xt().onAndCancel(e,r.domEventName,u,a))}static parseEventName(e){let t=e.toLowerCase().split("."),n=t.shift();if(t.length===0||!(n==="keydown"||n==="keyup"))return null;let a=i._normalizeKey(t.pop()),r="",u=t.indexOf("code");if(u>-1&&(t.splice(u,1),r="code."),im.forEach(g=>{let v=t.indexOf(g);v>-1&&(t.splice(v,1),r+=g+".")}),r+=a,t.length!=0||a.length===0)return null;let h={};return h.domEventName=n,h.fullKey=r,h}static matchEventFullKeyCode(e,t){let n=Tf[e.key]||e.key,a="";return t.indexOf("code.")>-1&&(n=e.code,a="code."),n==null||!n?!1:(n=n.toLowerCase(),n===" "?n="space":n==="."&&(n="dot"),im.forEach(r=>{if(r!==n){let u=If[r];u(e)&&(a+=r+".")}}),a+=n,a===t)}static eventCallback(e,t,n){return a=>{i.matchEventFullKeyCode(a,e)&&n.runGuarded(()=>t(a))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(t){return new(t||i)(oe(q))};static \u0275prov=ne({token:i,factory:i.\u0275fac})}return i})();function bl(i,o,e){return ye(this,null,function*(){let t=V({rootComponent:i},Rf(o,e));return vd(t)})}function Rf(i,o){return{platformRef:o?.platformRef,appProviders:[...Lf,...i?.providers??[]],platformProviders:Nf}}function Of(){xr.makeCurrent()}function Pf(){return new Mn}function Ff(){return nd(document),document}var Nf=[{provide:eo,useValue:ul},{provide:td,useValue:Of,multi:!0},{provide:q,useFactory:Ff}];var Lf=[{provide:Jc,useValue:"root"},{provide:Mn,useFactory:Pf},{provide:Cr,useClass:vr,multi:!0},{provide:Cr,useClass:nm,multi:!0},Tn,{provide:Uo,useClass:_l},{provide:_l,useExisting:Uo},gl,{provide:ot,useExisting:Tn},[]];var Li=class i{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(o){o?typeof o=="string"?this.lazyInit=()=>{this.headers=new Map,o.split(`
2
- `).forEach(e=>{let t=e.indexOf(":");if(t>0){let n=e.slice(0,t),a=e.slice(t+1).trim();this.addHeaderEntry(n,a)}})}:typeof Headers<"u"&&o instanceof Headers?(this.headers=new Map,o.forEach((e,t)=>{this.addHeaderEntry(t,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(o).forEach(([e,t])=>{this.setHeaderEntries(e,t)})}:this.headers=new Map}has(o){return this.init(),this.headers.has(o.toLowerCase())}get(o){this.init();let e=this.headers.get(o.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(o){return this.init(),this.headers.get(o.toLowerCase())||null}append(o,e){return this.clone({name:o,value:e,op:"a"})}set(o,e){return this.clone({name:o,value:e,op:"s"})}delete(o,e){return this.clone({name:o,value:e,op:"d"})}maybeSetNormalizedName(o,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,o)}init(){this.lazyInit&&(this.lazyInit instanceof i?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(o=>this.applyUpdate(o)),this.lazyUpdate=null))}copyFrom(o){o.init(),Array.from(o.headers.keys()).forEach(e=>{this.headers.set(e,o.headers.get(e)),this.normalizedNames.set(e,o.normalizedNames.get(e))})}clone(o){let e=new i;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof i?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([o]),e}applyUpdate(o){let e=o.name.toLowerCase();switch(o.op){case"a":case"s":let t=o.value;if(typeof t=="string"&&(t=[t]),t.length===0)return;this.maybeSetNormalizedName(o.name,e);let n=(o.op==="a"?this.headers.get(e):void 0)||[];n.push(...t),this.headers.set(e,n);break;case"d":let a=o.value;if(!a)this.headers.delete(e),this.normalizedNames.delete(e);else{let r=this.headers.get(e);if(!r)return;r=r.filter(u=>a.indexOf(u)===-1),r.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,r)}break}}addHeaderEntry(o,e){let t=o.toLowerCase();this.maybeSetNormalizedName(o,t),this.headers.has(t)?this.headers.get(t).push(e):this.headers.set(t,[e])}setHeaderEntries(o,e){let t=(Array.isArray(e)?e:[e]).map(a=>a.toString()),n=o.toLowerCase();this.headers.set(n,t),this.maybeSetNormalizedName(o,n)}forEach(o){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>o(this.normalizedNames.get(e),this.headers.get(e)))}};var Dr=class{map=new Map;set(o,e){return this.map.set(o,e),this}get(o){return this.map.has(o)||this.map.set(o,o.defaultValue()),this.map.get(o)}delete(o){return this.map.delete(o),this}has(o){return this.map.has(o)}keys(){return this.map.keys()}},Sr=class{encodeKey(o){return om(o)}encodeValue(o){return om(o)}decodeKey(o){return decodeURIComponent(o)}decodeValue(o){return decodeURIComponent(o)}};function Vf(i,o){let e=new Map;return i.length>0&&i.replace(/^\?/,"").split("&").forEach(n=>{let a=n.indexOf("="),[r,u]=a==-1?[o.decodeKey(n),""]:[o.decodeKey(n.slice(0,a)),o.decodeValue(n.slice(a+1))],h=e.get(r)||[];h.push(u),e.set(r,h)}),e}var Bf=/%(\d[a-f0-9])/gi,zf={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function om(i){return encodeURIComponent(i).replace(Bf,(o,e)=>zf[e]??o)}function wr(i){return`${i}`}var Ni=class i{map;encoder;updates=null;cloneFrom=null;constructor(o={}){if(this.encoder=o.encoder||new Sr,o.fromString){if(o.fromObject)throw new re(2805,!1);this.map=Vf(o.fromString,this.encoder)}else o.fromObject?(this.map=new Map,Object.keys(o.fromObject).forEach(e=>{let t=o.fromObject[e],n=Array.isArray(t)?t.map(wr):[wr(t)];this.map.set(e,n)})):this.map=null}has(o){return this.init(),this.map.has(o)}get(o){this.init();let e=this.map.get(o);return e?e[0]:null}getAll(o){return this.init(),this.map.get(o)||null}keys(){return this.init(),Array.from(this.map.keys())}append(o,e){return this.clone({param:o,value:e,op:"a"})}appendAll(o){let e=[];return Object.keys(o).forEach(t=>{let n=o[t];Array.isArray(n)?n.forEach(a=>{e.push({param:t,value:a,op:"a"})}):e.push({param:t,value:n,op:"a"})}),this.clone(e)}set(o,e){return this.clone({param:o,value:e,op:"s"})}delete(o,e){return this.clone({param:o,value:e,op:"d"})}toString(){return this.init(),this.keys().map(o=>{let e=this.encoder.encodeKey(o);return this.map.get(o).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).filter(o=>o!=="").join("&")}clone(o){let e=new i({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(o),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(o=>this.map.set(o,this.cloneFrom.map.get(o))),this.updates.forEach(o=>{switch(o.op){case"a":case"s":let e=(o.op==="a"?this.map.get(o.param):void 0)||[];e.push(wr(o.value)),this.map.set(o.param,e);break;case"d":if(o.value!==void 0){let t=this.map.get(o.param)||[],n=t.indexOf(wr(o.value));n!==-1&&t.splice(n,1),t.length>0?this.map.set(o.param,t):this.map.delete(o.param)}else{this.map.delete(o.param);break}}}),this.cloneFrom=this.updates=null)}};function jf(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function am(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function rm(i){return typeof Blob<"u"&&i instanceof Blob}function sm(i){return typeof FormData<"u"&&i instanceof FormData}function Hf(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var yl="Content-Type",lm="Accept",dm="text/plain",mm="application/json",Uf=`${mm}, ${dm}, */*`,so=class i{url;body=null;headers;context;reportProgress=!1;reportUploadProgress=!1;reportDownloadProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(o,e,t,n){this.url=e,this.method=o.toUpperCase();let a;if(jf(this.method)||n?(this.body=t!==void 0?t:null,a=n):a=t,a){if(this.reportProgress=!!a.reportProgress,this.reportUploadProgress=!!a.reportUploadProgress,this.reportDownloadProgress=!!a.reportDownloadProgress,this.withCredentials=!!a.withCredentials,this.keepalive=!!a.keepalive,a.responseType&&(this.responseType=a.responseType),a.headers&&(this.headers=a.headers),a.context&&(this.context=a.context),a.params&&(this.params=a.params),a.priority&&(this.priority=a.priority),a.cache&&(this.cache=a.cache),a.credentials&&(this.credentials=a.credentials),typeof a.timeout=="number"){if(a.timeout<1||!Number.isInteger(a.timeout))throw new re(2822,"");this.timeout=a.timeout}a.mode&&(this.mode=a.mode),a.redirect&&(this.redirect=a.redirect),a.integrity&&(this.integrity=a.integrity),a.referrer!==void 0&&(this.referrer=a.referrer),a.referrerPolicy&&(this.referrerPolicy=a.referrerPolicy),this.transferCache=a.transferCache}if(this.headers??=new Li,this.context??=new Dr,!this.params)this.params=new Ni,this.urlWithParams=e;else{let r=this.params.toString();if(r.length===0)this.urlWithParams=e;else{let u=e,h="",g=e.indexOf("#");g!==-1&&(h=e.substring(g),u=e.substring(0,g));let v=u.indexOf("?"),D=v===-1?"?":v<u.length-1?"&":"";this.urlWithParams=u+D+r+h}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||am(this.body)||rm(this.body)||sm(this.body)||Hf(this.body)?this.body:this.body instanceof Ni?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||sm(this.body)?null:rm(this.body)?this.body.type||null:am(this.body)?null:typeof this.body=="string"?dm:this.body instanceof Ni?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?mm:null}clone(o={}){let e=o.method||this.method,t=o.url||this.url,n=o.responseType||this.responseType,a=o.keepalive??this.keepalive,r=o.priority||this.priority,u=o.cache||this.cache,h=o.mode||this.mode,g=o.redirect||this.redirect,v=o.credentials||this.credentials,D=o.referrer??this.referrer,B=o.integrity||this.integrity,$=o.referrerPolicy||this.referrerPolicy,ie=o.transferCache??this.transferCache,fe=o.timeout??this.timeout,se=o.body!==void 0?o.body:this.body,Ae=o.withCredentials??this.withCredentials,lt=o.reportProgress??this.reportProgress,li=o.reportUploadProgress??this.reportUploadProgress,Ci=o.reportDownloadProgress??this.reportDownloadProgress,Ki=o.headers||this.headers,ci=o.params||this.params,Wa=o.context??this.context;return o.setHeaders!==void 0&&(Ki=Object.keys(o.setHeaders).reduce((Zn,kn)=>Zn.set(kn,o.setHeaders[kn]),Ki)),o.setParams&&(ci=Object.keys(o.setParams).reduce((Zn,kn)=>Zn.set(kn,o.setParams[kn]),ci)),new i(e,t,se,{params:ci,headers:Ki,context:Wa,reportProgress:lt,reportUploadProgress:li,reportDownloadProgress:Ci,responseType:n,withCredentials:Ae,transferCache:ie,keepalive:a,cache:u,priority:r,timeout:fe,mode:h,redirect:g,credentials:v,referrer:D,integrity:B,referrerPolicy:$})}},lo=(function(i){return i[i.Sent=0]="Sent",i[i.UploadProgress=1]="UploadProgress",i[i.ResponseHeader=2]="ResponseHeader",i[i.DownloadProgress=3]="DownloadProgress",i[i.Response=4]="Response",i[i.User=5]="User",i})(lo||{}),co=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(o,e=200,t="OK"){this.headers=o.headers||new Li,this.status=o.status!==void 0?o.status:e,this.statusText=o.statusText||t,this.url=o.url||null,this.redirected=o.redirected,this.responseType=o.responseType,this.ok=this.status>=200&&this.status<300}},kr=class i extends co{constructor(o={}){super(o)}type=lo.ResponseHeader;clone(o={}){return new i({headers:o.headers||this.headers,status:o.status!==void 0?o.status:this.status,statusText:o.statusText||this.statusText,url:o.url||this.url||void 0})}},aa=class i extends co{body;constructor(o={}){super(o),this.body=o.body!==void 0?o.body:null}type=lo.Response;clone(o={}){return new i({body:o.body!==void 0?o.body:this.body,headers:o.headers||this.headers,status:o.status!==void 0?o.status:this.status,statusText:o.statusText||this.statusText,url:o.url||this.url||void 0,redirected:o.redirected??this.redirected,responseType:o.responseType??this.responseType})}},In=class extends co{name="HttpErrorResponse";message;error;ok=!1;constructor(o){super(o,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${o.url||"(unknown url)"}`:this.message=`Http failure response for ${o.url||"(unknown url)"}: ${o.status} ${o.statusText}`,this.error=o.error||null}},Gf=200;var $f=/^\)\]\}',?\n/,aD=1024*1024,um=new x("",{factory:()=>null}),Mr=(()=>{class i{fetchImpl=d(xl,{optional:!0})?.fetch??((...e)=>globalThis.fetch(...e));ngZone=d(H);destroyRef=d(Bt);maxResponseSize=d(um);handle(e){return new yt(t=>{let n=new AbortController;this.doRequest(e,n.signal,t).then(wl,r=>t.error(new In({error:r})));let a;return e.timeout&&(a=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{n.signal.aborted||n.abort(new DOMException("signal timed out","TimeoutError"))},e.timeout))),()=>{a!==void 0&&clearTimeout(a),n.abort()}})}doRequest(e,t,n){return ye(this,null,function*(){let a=this.createRequestInit(e),r;try{let se=this.ngZone.runOutsideAngular(()=>this.fetchImpl(e.urlWithParams,V({signal:t},a)));Wf(se),n.next({type:lo.Sent}),r=yield se}catch(se){n.error(new In({error:se,status:se.status??0,statusText:se.statusText,url:e.urlWithParams,headers:se.headers}));return}let u=new Li(r.headers),h=r.statusText,g=r.url||e.urlWithParams,v=r.status,D=null,B=e.reportProgress||e.reportDownloadProgress;if(B&&n.next(new kr({headers:u,status:v,statusText:h,url:g})),r.body){let se=r.headers.get("content-length"),Ae=se!==null?Number(se):NaN;this.maxResponseSize!==null&&Number.isFinite(Ae)&&Ae>this.maxResponseSize&&cm(this.maxResponseSize);let lt=[],li=r.body.getReader(),Ci=0,Ki,ci,Wa=typeof Zone<"u"&&Zone.current,Zn=!1;if(yield this.ngZone.runOutsideAngular(()=>ye(this,null,function*(){for(;;){if(this.destroyRef.destroyed){yield li.cancel(),Zn=!0;break}let{done:zo,value:Vs}=yield li.read();if(zo)break;if(lt.push(Vs),Ci+=Vs.length,this.maxResponseSize!==null&&Ci>this.maxResponseSize&&(yield li.cancel(),cm(this.maxResponseSize)),B){ci=e.responseType==="text"?(ci??"")+(Ki??=new TextDecoder).decode(Vs,{stream:!0}):void 0;let $c=()=>n.next({type:lo.DownloadProgress,total:Number.isFinite(Ae)?Ae:void 0,loaded:Ci,partialText:ci});Wa?Wa.run($c):$c()}}})),Zn){n.complete();return}let kn=this.concatChunks(lt,Ci);try{let zo=r.headers.get(yl)??"";D=this.parseBody(e,kn,zo,v)}catch(zo){n.error(new In({error:zo,headers:new Li(r.headers),status:r.status,statusText:r.statusText,url:r.url||e.urlWithParams}));return}}v===0&&(v=D?Gf:0);let $=v>=200&&v<300,ie=r.redirected,fe=r.type;$?(n.next(new aa({body:D,headers:u,status:v,statusText:h,url:g,redirected:ie,responseType:fe})),n.complete()):n.error(new In({error:D,headers:u,status:v,statusText:h,url:g,redirected:ie,responseType:fe}))})}parseBody(e,t,n,a){switch(e.responseType){case"json":let r=new TextDecoder().decode(t).replace($f,"");if(r==="")return null;try{return JSON.parse(r)}catch(u){if(a<200||a>=300)return r;throw u}case"text":return new TextDecoder().decode(t);case"blob":return new Blob([t],{type:n});case"arraybuffer":return t.buffer}}createRequestInit(e){if(e.reportUploadProgress)throw new re(2824,!1);let t={},n;if(n=e.credentials,e.withCredentials&&(n="include"),e.headers.forEach((a,r)=>t[a]=r.join(",")),e.headers.has(lm)||(t[lm]=Uf),!e.headers.has(yl)){let a=e.detectContentTypeHeader();a!==null&&(t[yl]=a)}return{body:e.serializeBody(),method:e.method,headers:t,credentials:n,keepalive:e.keepalive,cache:e.cache,priority:e.priority,mode:e.mode,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity,referrerPolicy:e.referrerPolicy}}concatChunks(e,t){let n=new Uint8Array(t),a=0;for(let r of e)n.set(r,a),a+=r.length;return n}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),xl=class{};function wl(){}function Wf(i){i.then(wl,wl)}function cm(i){throw new re(-2825,!1)}function qf(i,o){return o(i)}function Kf(i,o,e){return(t,n)=>ed(e,()=>o(t,a=>i(a,n)))}var Dl=new x("",{factory:()=>[]}),hm=new x(""),pm=new x("",{factory:()=>!0});var Sl=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275prov=ne({token:i,factory:function(t){let n=null;return t?n=new(t||i):n=oe(Mr),n},providedIn:"root"})}return i})();var Er=(()=>{class i{backend;injector;chain=null;pendingTasks=d($s);contributeToStability=d(pm);constructor(e,t){this.backend=e,this.injector=t}handle(e){if(this.chain===null){let t=Array.from(new Set([...this.injector.get(Dl),...this.injector.get(hm,[])]));this.chain=t.reduceRight((n,a)=>Kf(n,a,this.injector),qf)}if(this.contributeToStability){let t=this.pendingTasks.add();return this.chain(e,n=>this.backend.handle(n)).pipe(Qa(t))}else return this.chain(e,t=>this.backend.handle(t))}static \u0275fac=function(t){return new(t||i)(oe(Sl),oe(mi))};static \u0275prov=ne({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),kl=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275prov=ne({token:i,factory:function(t){let n=null;return t?n=new(t||i):n=oe(Er),n},providedIn:"root"})}return i})();function Cl(i,o){return V({body:o},i)}var Qt=(()=>{class i{handler;constructor(e){this.handler=e}request(e,t,n={}){let a;if(e instanceof so)a=e;else{let h;n.headers instanceof Li?h=n.headers:h=new Li(n.headers);let g;n.params&&(n.params instanceof Ni?g=n.params:g=new Ni({fromObject:n.params})),a=new so(e,t,n.body!==void 0?n.body:null,{headers:h,context:n.context,params:g,reportProgress:n.reportProgress,reportUploadProgress:n.reportUploadProgress,reportDownloadProgress:n.reportDownloadProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials,transferCache:n.transferCache,keepalive:n.keepalive,priority:n.priority,cache:n.cache,mode:n.mode,redirect:n.redirect,credentials:n.credentials,referrer:n.referrer,referrerPolicy:n.referrerPolicy,integrity:n.integrity,timeout:n.timeout})}let r=ge(a).pipe(Yc(h=>this.handler.handle(h)));if(e instanceof so||n.observe==="events")return r;let u=r.pipe(we(h=>h instanceof aa));switch(n.observe||"body"){case"body":switch(a.responseType){case"arraybuffer":return u.pipe(Pe(h=>{if(h.body!==null&&!(h.body instanceof ArrayBuffer))throw new re(2806,!1);return h.body}));case"blob":return u.pipe(Pe(h=>{if(h.body!==null&&!(h.body instanceof Blob))throw new re(2807,!1);return h.body}));case"text":return u.pipe(Pe(h=>{if(h.body!==null&&typeof h.body!="string")throw new re(2808,!1);return h.body}));default:return u.pipe(Pe(h=>h.body))}case"response":return u;default:throw new re(2809,!1)}}delete(e,t={}){return this.request("DELETE",e,t)}get(e,t={}){return this.request("GET",e,t)}head(e,t={}){return this.request("HEAD",e,t)}jsonp(e,t){return this.request("JSONP",e,{params:new Ni().append(t,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,t={}){return this.request("OPTIONS",e,t)}patch(e,t,n={}){return this.request("PATCH",e,Cl(n,t))}post(e,t,n={}){return this.request("POST",e,Cl(n,t))}put(e,t,n={}){return this.request("PUT",e,Cl(n,t))}static \u0275fac=function(t){return new(t||i)(oe(kl))};static \u0275prov=ne({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Yf=new x("",{factory:()=>!0}),Xf="XSRF-TOKEN",Zf=new x("",{factory:()=>Xf}),Qf="X-XSRF-TOKEN",Jf=new x("",{factory:()=>Qf}),eg=(()=>{class i{cookieName=d(Zf);doc=d(q);lastCookieString="";lastToken=null;parseCount=0;getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=ea(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),fm=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275prov=ne({token:i,factory:function(t){let n=null;return t?n=new(t||i):n=oe(eg),n},providedIn:"root"})}return i})();function tg(i,o){if(!d(Yf)||i.method==="GET"||i.method==="HEAD")return o(i);try{let n=d(ro).href,{origin:a}=new URL(n),{origin:r}=new URL(i.url,a);if(a!==r)return o(i)}catch(n){return o(i)}let e=d(fm).getToken(),t=d(Jf);return e!=null&&!i.headers.has(t)&&(i=i.clone({headers:i.headers.set(t,e)})),o(i)}var Ml=(function(i){return i[i.Interceptors=0]="Interceptors",i[i.LegacyInterceptors=1]="LegacyInterceptors",i[i.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",i[i.NoXsrfProtection=3]="NoXsrfProtection",i[i.JsonpSupport=4]="JsonpSupport",i[i.RequestsMadeViaParent=5]="RequestsMadeViaParent",i[i.Fetch=6]="Fetch",i[i.Xhr=7]="Xhr",i})(Ml||{});function ig(i,o){return{\u0275kind:i,\u0275providers:o}}function El(...i){let o=[Qt,Mr,Er,{provide:kl,useExisting:Er},{provide:Sl,useFactory:()=>d(Mr)},{provide:Dl,useValue:tg,multi:!0}];for(let e of i)o.push(...e.\u0275providers);return Ho(o)}function Al(i){return ig(Ml.Interceptors,i.map(o=>({provide:Dl,useValue:o,multi:!0})))}var ra=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275prov=ne({token:i,factory:function(t){let n=null;return t?n=new(t||i):n=oe(ag),n},providedIn:"root"})}return i})(),ag=(()=>{class i extends ra{_doc=d(q);sanitize(e,t){if(t==null)return null;switch(e){case Ct.NONE:return t;case Ct.HTML:return no(t,"HTML")?io(t):dd(this._doc,String(t)).toString();case Ct.STYLE:return no(t,"Style")?io(t):t;case Ct.SCRIPT:if(no(t,"Script"))return io(t);throw new re(5200,!1);case Ct.URL:return no(t,"URL")?io(t):cd(String(t));case Ct.RESOURCE_URL:if(no(t,"ResourceURL"))return io(t);throw new re(5201,!1);default:throw new re(5202,!1)}}bypassSecurityTrustHtml(e){return od(e)}bypassSecurityTrustStyle(e){return ad(e)}bypassSecurityTrustScript(e){return rd(e)}bypassSecurityTrustUrl(e){return sd(e)}bypassSecurityTrustResourceUrl(e){return ld(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var sg=(()=>{class i extends lr{constructor(e,t,n){super(e,t,n)}ngOnDestroy(){this.flush()}static \u0275fac=function(t){return new(t||i)(oe(q),oe(Ko),oe(sr))};static \u0275prov=ne({token:i,factory:i.\u0275fac})}return i})();function lg(){return new Cd}function cg(){return new wd(d(Tn),d(lr),d(H))}var gm=[{provide:sr,useFactory:lg},{provide:lr,useClass:sg},{provide:ot,useFactory:cg}],aS=[{provide:Ko,useClass:yd},{provide:Pi,useValue:"NoopAnimations"},...gm],dg=[{provide:Ko,useFactory:()=>new xd},{provide:Pi,useFactory:()=>"BrowserAnimations"},...gm];function _m(){return tr("NgEagerAnimations"),[...dg]}var mg="@",ug=(()=>{class i{doc;delegate;zone;animationType;moduleImpl;_rendererFactoryPromise=null;scheduler=null;injector=d(X);loadingSchedulerFn=d(hg,{optional:!0});_engine;constructor(e,t,n,a,r){this.doc=e,this.delegate=t,this.zone=n,this.animationType=a,this.moduleImpl=r}ngOnDestroy(){this._engine?.flush()}loadImpl(){let e=()=>this.moduleImpl??import("./chunk-34LU6STA.js").then(n=>n),t;return this.loadingSchedulerFn?t=this.loadingSchedulerFn(e):t=e(),t.catch(n=>{throw new re(5300,!1)}).then(({\u0275createEngine:n,\u0275AnimationRendererFactory:a})=>{this._engine=n(this.animationType,this.doc);let r=new a(this.delegate,this._engine,this.zone);return this.delegate=r,r})}createRenderer(e,t){let n=this.delegate.createRenderer(e,t);if(n.\u0275type===0)return n;typeof n.throwOnSyntheticProps=="boolean"&&(n.throwOnSyntheticProps=!1);let a=new Tl(n);return t?.data?.animation&&!this._rendererFactoryPromise&&(this._rendererFactoryPromise=this.loadImpl()),this._rendererFactoryPromise?.then(r=>{let u=r.createRenderer(e,t);a.use(u),this.scheduler??=this.injector.get(id,null,{optional:!0}),this.scheduler?.notify(10)}).catch(r=>{a.use(n)}),a}begin(){this.delegate.begin?.()}end(){this.delegate.end?.()}whenRenderingDone(){return this.delegate.whenRenderingDone?.()??Promise.resolve()}componentReplaced(e){this._engine?.flush(),this.delegate.componentReplaced?.(e)}static \u0275fac=function(t){ir()};static \u0275prov=ne({token:i,factory:i.\u0275fac})}return i})(),Tl=class{delegate;replay=[];\u0275type=1;constructor(o){this.delegate=o}use(o){if(this.delegate=o,this.replay!==null){for(let e of this.replay)e(o);this.replay=null}}get data(){return this.delegate.data}destroy(){this.replay=null,this.delegate.destroy()}createElement(o,e){return this.delegate.createElement(o,e)}createComment(o){return this.delegate.createComment(o)}createText(o){return this.delegate.createText(o)}get destroyNode(){return this.delegate.destroyNode}appendChild(o,e){this.delegate.appendChild(o,e)}insertBefore(o,e,t,n){this.delegate.insertBefore(o,e,t,n)}removeChild(o,e,t,n){this.delegate.removeChild(o,e,t,n)}selectRootElement(o,e){return this.delegate.selectRootElement(o,e)}parentNode(o){return this.delegate.parentNode(o)}nextSibling(o){return this.delegate.nextSibling(o)}setAttribute(o,e,t,n){this.delegate.setAttribute(o,e,t,n)}removeAttribute(o,e,t){this.delegate.removeAttribute(o,e,t)}addClass(o,e){this.delegate.addClass(o,e)}removeClass(o,e){this.delegate.removeClass(o,e)}setStyle(o,e,t,n){this.delegate.setStyle(o,e,t,n)}removeStyle(o,e,t){this.delegate.removeStyle(o,e,t)}setProperty(o,e,t){this.shouldReplay(e)&&this.replay.push(n=>n.setProperty(o,e,t)),this.delegate.setProperty(o,e,t)}setValue(o,e){this.delegate.setValue(o,e)}listen(o,e,t,n){return this.shouldReplay(e)&&this.replay.push(a=>a.listen(o,e,t,n)),this.delegate.listen(o,e,t,n)}shouldReplay(o){return this.replay!==null&&o.startsWith(mg)}},hg=new x("");function vm(i="animations"){return tr("NgAsyncAnimations"),Ho([{provide:ot,useFactory:()=>new ug(d(q),d(Tn),d(H),i)},{provide:Pi,useValue:i==="noop"?"NoopAnimations":"BrowserAnimations"}])}var Ar="asm_token",Tr=(()=>{class i{constructor(){this.http=d(Qt),this.authState=new Qn(this.hasToken())}login(e){return ye(this,null,function*(){try{let t=yield Te(this.http.post("/api/auth/login",{password:e}));return localStorage.setItem(Ar,t.token),this.authState.next(!0),!0}catch(t){return!1}})}logout(){localStorage.removeItem(Ar),this.authState.next(!1)}getToken(){return localStorage.getItem(Ar)}isAuthenticated(){return this.hasToken()}hasToken(){return!!localStorage.getItem(Ar)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ne({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var bm=(i,o)=>{let e=d(Tr),t=e.getToken(),n=i.url.includes("/api/auth/login"),a=t&&!n?i.clone({setHeaders:{Authorization:`Bearer ${t}`}}):i;return o(a).pipe(Kt(r=>(r.status===401&&!n&&e.logout(),Ya(()=>r))))};var ym={providers:[_d({eventCoalescing:!0}),El(Al([bm])),_m(),vm()]};var Il;try{Il=typeof Intl<"u"&&Intl.v8BreakIterator}catch(i){Il=!1}var le=(()=>{class i{_platformId=d(eo);isBrowser=this._platformId?Yd(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Il)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function Vi(i){return Array.isArray(i)?i:[i]}var Cm=new Set,Rn,mo=(()=>{class i{_platform=d(le);_nonce=d(to,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):fg}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&pg(e,this._nonce),this._matchMedia(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function pg(i,o){if(!Cm.has(i))try{Rn||(Rn=document.createElement("style"),o&&Rn.setAttribute("nonce",o),Rn.setAttribute("type","text/css"),document.head.appendChild(Rn)),Rn.sheet&&(Rn.sheet.insertRule(`@media ${i.replace(/[{}]/g,"")} {body{ }}`,0),Cm.add(i))}catch(e){console.error(e)}}function fg(i){return{matches:i==="all"||i==="",media:i,addListener:()=>{},removeListener:()=>{}}}var On=(()=>{class i{_mediaMatcher=d(mo);_zone=d(H);_queries=new Map;_destroySubject=new R;ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return xm(Vi(e)).some(n=>this._registerQuery(n).mql.matches)}observe(e){let n=xm(Vi(e)).map(r=>this._registerQuery(r).observable),a=Jn(n);return a=Kc(a.pipe(ct(1)),a.pipe(Ja(1),Vt(0))),a.pipe(Pe(r=>{let u={matches:!1,breakpoints:{}};return r.forEach(({matches:h,query:g})=>{u.matches=u.matches||h,u.breakpoints[g]=h}),u}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let t=this._mediaMatcher.matchMedia(e),a={observable:new yt(r=>{let u=h=>this._zone.run(()=>r.next(h));return t.addListener(u),()=>{t.removeListener(u)}}).pipe(Se(t),Pe(({matches:r})=>({query:e,matches:r})),ae(this._destroySubject)),mql:t};return this._queries.set(e,a),a}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function xm(i){return i.map(o=>o.split(",")).reduce((o,e)=>o.concat(e)).map(o=>o.trim())}var Ir={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};var gg=new x("MATERIAL_ANIMATIONS"),wm=null;function Rl(){return d(gg,{optional:!0})?.animationsDisabled||d(Pi,{optional:!0})==="NoopAnimations"?"di-disabled":(wm??=d(mo).matchMedia("(prefers-reduced-motion)").matches,wm?"reduced-motion":"enabled")}function pe(){return Rl()!=="enabled"}var _g=new x("cdk-dir-doc",{providedIn:"root",factory:()=>d(q)}),vg=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function Dm(i){let o=i?.toLowerCase()||"";return o==="auto"&&typeof navigator<"u"&&navigator?.language?vg.test(navigator.language)?"rtl":"ltr":o==="rtl"?"rtl":"ltr"}var qe=(()=>{class i{get value(){return this.valueSignal()}valueSignal=I("ltr");change=new K;constructor(){let e=d(_g,{optional:!0});if(e){let t=e.body?e.body.dir:null,n=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(Dm(t||n||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var ee=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({})}return i})();function bg(i,o){i&1&&ht(0,"div",2)}var yg=new x("MAT_PROGRESS_BAR_DEFAULT_OPTIONS");var en=(()=>{class i{_elementRef=d(N);_ngZone=d(H);_changeDetectorRef=d(te);_renderer=d(ve);_cleanupTransitionEnd;constructor(){let e=Rl(),t=d(yg,{optional:!0});this._isNoopAnimation=e==="di-disabled",e==="reduced-motion"&&this._elementRef.nativeElement.classList.add("mat-progress-bar-reduced-motion"),t&&(t.color&&(this.color=this._defaultColor=t.color),this.mode=t.mode||this.mode)}_isNoopAnimation;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;_defaultColor="primary";get value(){return this._value}set value(e){this._value=Sm(e||0),this._changeDetectorRef.markForCheck()}_value=0;get bufferValue(){return this._bufferValue||0}set bufferValue(e){this._bufferValue=Sm(e||0),this._changeDetectorRef.markForCheck()}_bufferValue=0;animationEnd=new K;get mode(){return this._mode}set mode(e){this._mode=e,this._changeDetectorRef.markForCheck()}_mode="determinate";ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._cleanupTransitionEnd=this._renderer.listen(this._elementRef.nativeElement,"transitionend",this._transitionendHandler)})}ngOnDestroy(){this._cleanupTransitionEnd?.()}_getPrimaryBarTransform(){return`scaleX(${this._isIndeterminate()?1:this.value/100})`}_getBufferBarFlexBasis(){return`${this.mode==="buffer"?this.bufferValue:100}%`}_isIndeterminate(){return this.mode==="indeterminate"||this.mode==="query"}_transitionendHandler=e=>{this.animationEnd.observers.length===0||!e.target||!e.target.classList.contains("mdc-linear-progress__primary-bar")||(this.mode==="determinate"||this.mode==="buffer")&&this._ngZone.run(()=>this.animationEnd.next({value:this.value}))};static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["mat-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100","tabindex","-1",1,"mat-mdc-progress-bar","mdc-linear-progress"],hostVars:10,hostBindings:function(t,n){t&2&&(Z("aria-valuenow",n._isIndeterminate()?null:n.value)("mode",n.mode),et("mat-"+n.color),p("_mat-animation-noopable",n._isNoopAnimation)("mdc-linear-progress--animation-ready",!n._isNoopAnimation)("mdc-linear-progress--indeterminate",n._isIndeterminate()))},inputs:{color:"color",value:[2,"value","value",wt],bufferValue:[2,"bufferValue","bufferValue",wt],mode:"mode"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],decls:7,vars:5,consts:[["aria-hidden","true",1,"mdc-linear-progress__buffer"],[1,"mdc-linear-progress__buffer-bar"],[1,"mdc-linear-progress__buffer-dots"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__primary-bar"],[1,"mdc-linear-progress__bar-inner"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__secondary-bar"]],template:function(t,n){t&1&&(Ie(0,"div",0),ht(1,"div",1),M(2,bg,1,0,"div",2),Ue(),Ie(3,"div",3),ht(4,"span",4),Ue(),Ie(5,"div",5),ht(6,"span",4),Ue()),t&2&&(c(),Ne("flex-basis",n._getBufferBarFlexBasis()),c(),E(n.mode==="buffer"?2:-1),c(),Ne("transform",n._getPrimaryBarTransform()))},styles:[`.mat-mdc-progress-bar {
1
+ import{$ as de,$a as or,$b as Js,A as Zt,Aa as no,Ab as Se,Ac as Cd,B as Xc,Ba as oo,Bb as dt,Bc as Ko,C as jt,Ca as ad,Cb as Gt,Cc as lr,D as ct,Da as rd,Db as et,E as Zc,Ea as sd,Eb as E,Ec as xd,F as Si,Fa as ld,Fb as rr,G as Ja,Ga as cd,Gb as C,Gc as cr,H as Us,Ha as dd,Hb as fe,I as Qc,Ia as md,Ib as G,Ic as wd,J as Gs,Ja as Dt,Jb as at,K as er,Ka as qs,Kb as Ae,L as Me,La as ao,Lb as P,M as We,Ma as ud,Mb as F,N as re,Na as Ks,Nb as pd,Nc as Dd,O as Jc,Oa as ir,Ob as fd,P as mi,Pa as je,Pb as Qs,Q as se,Qa as c,Qb as Le,R as nt,Ra as Ze,Rb as Ve,S as J,Sa as ot,Sb as p,T as j,Ta as Ce,Tb as tt,U as w,Ua as b,Ub as m,V as ae,Va as y,Vb as B,W as d,Wa as Uo,Wb as pe,X as Ho,Xa as ge,Xb as Mi,Y as ed,Ya as nr,Yb as ee,Z as ui,Za as Qe,Zb as Go,_ as td,_a as Ys,_b as $o,a as V,aa as me,ab as I,ac as el,b as Fe,ba as ki,bb as H,bc as $,c as oe,ca as $s,cb as S,cc as ft,d as ke,da as X,db as Xs,dc as Ei,e as wt,ea as q,eb as Zs,ec as gd,f as qc,fa as Ht,fb as hd,fc as ro,g as R,ga as K,gb as Q,gc as Wo,h as Jn,ha as U,hb as He,hc as _d,i as Ka,ia as An,ib as ar,ic as qo,j as zs,ja as T,jb as en,jc as ie,k as js,ka as Tn,kb as Z,kc as vd,l as Ya,la as id,lb as k,lc as bd,m as Kc,ma as to,mb as M,mc as L,n as be,na as Li,nb as St,nc as kt,o as Xa,oa as io,ob as ue,oc as yd,p as Hs,pa as nd,pb as he,pc as sr,q as we,qa as Ut,qb as x,r as Ne,ra as Qi,rb as s,s as eo,sa as Ws,sb as l,t as Yc,ta as Ee,tb as _,u as Zi,ua as ye,ub as Re,v as Za,va as Y,vb as Ue,w as Qa,wa as N,wb as pt,x as $e,xa as Ji,xb as hi,y as De,ya as od,yb as pi,z as jo,za as tr,zb as Qt}from"./chunk-JGNPKRLU.js";var Sd=null;function Jt(){return Sd}function tl(i){Sd??=i}var Yo=class{},so=(()=>{class i{historyGo(e){throw new Error("")}static \u0275fac=function(t){return new(t||i)};static \u0275prov=J({token:i,factory:()=>d(kd),providedIn:"platform"})}return i})();var kd=(()=>{class i extends so{_location;_history;_doc=d(q);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Jt().getBaseHref(this._doc)}onPopState(e){let t=Jt().getGlobalEventTarget(this._doc,"window");return t.addEventListener("popstate",e,!1),()=>t.removeEventListener("popstate",e)}onHashChange(e){let t=Jt().getGlobalEventTarget(this._doc,"window");return t.addEventListener("hashchange",e,!1),()=>t.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,t,n){this._history.pushState(e,t,n)}replaceState(e,t,n){this._history.replaceState(e,t,n)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static \u0275fac=function(t){return new(t||i)};static \u0275prov=J({token:i,factory:()=>new i,providedIn:"platform"})}return i})();function Ad(i,o){return i?o?i.endsWith("/")?o.startsWith("/")?i+o.slice(1):i+o:o.startsWith("/")?i+o:`${i}/${o}`:i:o}function Md(i){let o=i.search(/#|\?|$/);return i[o-1]==="/"?i.slice(0,o-1)+i.slice(o):i}function tn(i){return i&&i[0]!=="?"?`?${i}`:i}var dr=(()=>{class i{historyGo(e){throw new Error("")}static \u0275fac=function(t){return new(t||i)};static \u0275prov=J({token:i,factory:()=>d(Gp),providedIn:"root"})}return i})(),Up=new w(""),Gp=(()=>{class i extends dr{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,t){super(),this._platformLocation=e,this._baseHref=t??this._platformLocation.getBaseHrefFromDOM()??d(q).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return Ad(this._baseHref,e)}path(e=!1){let t=this._platformLocation.pathname+tn(this._platformLocation.search),n=this._platformLocation.hash;return n&&e?`${t}${n}`:t}pushState(e,t,n,a){let r=this.prepareExternalUrl(n+tn(a));this._platformLocation.pushState(e,t,r)}replaceState(e,t,n,a){let r=this.prepareExternalUrl(n+tn(a));this._platformLocation.replaceState(e,t,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(t){return new(t||i)(ae(so),ae(Up,8))};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var mr=(()=>{class i{_subject=new R;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let t=this._locationStrategy.getBaseHref();this._basePath=qp(Md(Ed(t))),this._locationStrategy.onPopState(n=>{this._subject.next({url:this.path(!0),pop:!0,state:n.state,type:n.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,t=""){return this.path()==this.normalize(e+tn(t))}normalize(e){return i.stripTrailingSlash(Wp(this._basePath,Ed(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,t="",n=null){this._locationStrategy.pushState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+tn(t)),n)}replaceState(e,t="",n=null){this._locationStrategy.replaceState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+tn(t)),n)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe(t=>{this._notifyUrlChangeListeners(t.url,t.state)}),()=>{let t=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(t,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",t){this._urlChangeListeners.forEach(n=>n(e,t))}subscribe(e,t,n){return this._subject.subscribe({next:e,error:t??void 0,complete:n??void 0})}static normalizeQueryParams=tn;static joinWithSlash=Ad;static stripTrailingSlash=Md;static \u0275fac=function(t){return new(t||i)(ae(dr))};static \u0275prov=J({token:i,factory:()=>$p(),providedIn:"root"})}return i})();function $p(){return new mr(ae(dr))}function Wp(i,o){if(!i||!o.startsWith(i))return o;let e=o.substring(i.length);return e===""||["/",";","?","#"].includes(e[0])?e:o}function Ed(i){return i.replace(/\/index\.html$/,"")}function qp(i){if(new RegExp("^(https?:)?//").test(i)){let[,e]=i.split(/\/\/[^\/]+/);return e}return i}var ll=(function(i){return i[i.Decimal=0]="Decimal",i[i.Percent=1]="Percent",i[i.Currency=2]="Currency",i[i.Scientific=3]="Scientific",i})(ll||{});var gt=(function(i){return i[i.Format=0]="Format",i[i.Standalone=1]="Standalone",i})(gt||{}),Oe=(function(i){return i[i.Narrow=0]="Narrow",i[i.Abbreviated=1]="Abbreviated",i[i.Wide=2]="Wide",i[i.Short=3]="Short",i})(Oe||{}),Ot=(function(i){return i[i.Short=0]="Short",i[i.Medium=1]="Medium",i[i.Long=2]="Long",i[i.Full=3]="Full",i})(Ot||{}),Pt={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function Pd(i){return Gt(i)[et.LocaleId]}function Fd(i,o,e){let t=Gt(i),n=[t[et.DayPeriodsFormat],t[et.DayPeriodsStandalone]],a=ei(n,o);return ei(a,e)}function Nd(i,o,e){let t=Gt(i),n=[t[et.DaysFormat],t[et.DaysStandalone]],a=ei(n,o);return ei(a,e)}function Ld(i,o,e){let t=Gt(i),n=[t[et.MonthsFormat],t[et.MonthsStandalone]],a=ei(n,o);return ei(a,e)}function Vd(i,o){let t=Gt(i)[et.Eras];return ei(t,o)}function Xo(i,o){let e=Gt(i);return ei(e[et.DateFormat],o)}function Zo(i,o){let e=Gt(i);return ei(e[et.TimeFormat],o)}function Qo(i,o){let t=Gt(i)[et.DateTimeFormat];return ei(t,o)}function Ai(i,o){let e=Gt(i),t=e[et.NumberSymbols][o];if(typeof t>"u"){if(o===Pt.CurrencyDecimal)return e[et.NumberSymbols][Pt.Decimal];if(o===Pt.CurrencyGroup)return e[et.NumberSymbols][Pt.Group]}return t}function Bd(i,o){return Gt(i)[et.NumberFormats][o]}function zd(i){if(!i[et.ExtraData])throw new se(2303,!1)}function jd(i){let o=Gt(i);return zd(o),(o[et.ExtraData][2]||[]).map(t=>typeof t=="string"?il(t):[il(t[0]),il(t[1])])}function Hd(i,o,e){let t=Gt(i);zd(t);let n=[t[et.ExtraData][0],t[et.ExtraData][1]],a=ei(n,o)||[];return ei(a,e)||[]}function ei(i,o){for(let e=o;e>-1;e--)if(typeof i[e]<"u")return i[e];throw new se(2304,!1)}function il(i){let[o,e]=i.split(":");return{hours:+o,minutes:+e}}var Kp=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,ur={},Yp=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,Xp=256;function Ud(i,o,e,t){let n=sf(i);Zp(o),o=Vi(e,o)||o;let r=[],u;for(;o;)if(u=Yp.exec(o),u){r=r.concat(u.slice(1));let v=r.pop();if(!v)break;o=v}else{r.push(o);break}let h=n.getTimezoneOffset();t&&(h=$d(t,h),n=rf(n,t));let g="";return r.forEach(v=>{let D=of(v);g+=D?D(n,e,h):v==="''"?"'":v.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),g}function Zp(i){if(i.length>Xp)throw new se(2300,!1)}function _r(i,o,e){let t=new Date(0);return t.setFullYear(i,o,e),t.setHours(0,0,0),t}function Vi(i,o){let e=Pd(i);if(ur[e]??={},ur[e][o])return ur[e][o];let t="";switch(o){case"shortDate":t=Xo(i,Ot.Short);break;case"mediumDate":t=Xo(i,Ot.Medium);break;case"longDate":t=Xo(i,Ot.Long);break;case"fullDate":t=Xo(i,Ot.Full);break;case"shortTime":t=Zo(i,Ot.Short);break;case"mediumTime":t=Zo(i,Ot.Medium);break;case"longTime":t=Zo(i,Ot.Long);break;case"fullTime":t=Zo(i,Ot.Full);break;case"short":let n=Vi(i,"shortTime"),a=Vi(i,"shortDate");t=hr(Qo(i,Ot.Short),[n,a]);break;case"medium":let r=Vi(i,"mediumTime"),u=Vi(i,"mediumDate");t=hr(Qo(i,Ot.Medium),[r,u]);break;case"long":let h=Vi(i,"longTime"),g=Vi(i,"longDate");t=hr(Qo(i,Ot.Long),[h,g]);break;case"full":let v=Vi(i,"fullTime"),D=Vi(i,"fullDate");t=hr(Qo(i,Ot.Full),[v,D]);break}return t&&(ur[e][o]=t),t}function hr(i,o){return o&&(i=i.replace(/\{([^}]+)}/g,function(e,t){return Object.hasOwn(o,t)?o[t]:e})),i}function fi(i,o,e="-",t,n){let a="";(i<0||n&&i<=0)&&(n?i=-i+1:(i=-i,a=e));let r=String(i);for(;r.length<o;)r="0"+r;return t&&(r=r.slice(r.length-o)),a+r}function Qp(i,o){return fi(i,3).substring(0,o)}function it(i,o,e=0,t=!1,n=!1){return function(a,r){let u=Jp(i,a);if((e>0||u>-e)&&(u+=e),i===3)u===0&&e===-12&&(u=12);else if(i===6)return Qp(u,o);let h=Ai(r,Pt.MinusSign);return fi(u,o,h,t,n)}}function Jp(i,o){switch(i){case 0:return o.getFullYear();case 1:return o.getMonth();case 2:return o.getDate();case 3:return o.getHours();case 4:return o.getMinutes();case 5:return o.getSeconds();case 6:return o.getMilliseconds();case 7:return o.getDay();default:throw new se(2301,!1)}}function ze(i,o,e=gt.Format,t=!1){return function(n,a){return ef(n,a,i,o,e,t)}}function ef(i,o,e,t,n,a){switch(e){case 2:return Ld(o,n,t)[i.getMonth()];case 1:return Nd(o,n,t)[i.getDay()];case 0:let r=i.getHours(),u=i.getMinutes();if(a){let g=jd(o),v=Hd(o,n,t),D=g.findIndex(z=>{if(Array.isArray(z)){let[W,ne]=z,ve=r>=W.hours&&u>=W.minutes,le=r<ne.hours||r===ne.hours&&u<ne.minutes;if(W.hours<ne.hours){if(ve&&le)return!0}else if(ve||le)return!0}else if(z.hours===r&&z.minutes===u)return!0;return!1});if(D!==-1)return v[D]}return Fd(o,n,t)[r<12?0:1];case 3:return Vd(o,t)[i.getFullYear()<=0?0:1];default:let h=e;throw new se(2302,!1)}}function pr(i){return function(o,e,t){let n=-1*t,a=Ai(e,Pt.MinusSign),r=n>0?Math.floor(n/60):Math.ceil(n/60);switch(i){case 0:return(n>=0?"+":"")+fi(r,2,a)+fi(Math.abs(n%60),2,a);case 1:return"GMT"+(n>=0?"+":"")+fi(r,1,a);case 2:return"GMT"+(n>=0?"+":"")+fi(r,2,a)+":"+fi(Math.abs(n%60),2,a);case 3:return t===0?"Z":(n>=0?"+":"")+fi(r,2,a)+":"+fi(Math.abs(n%60),2,a);default:throw new se(2310,!1)}}}var tf=0,gr=4;function nf(i){let o=_r(i,tf,1).getDay();return _r(i,0,1+(o<=gr?gr:gr+7)-o)}function Gd(i){let o=i.getDay(),e=o===0?-3:gr-o;return _r(i.getFullYear(),i.getMonth(),i.getDate()+e)}function nl(i,o=!1){return function(e,t){let n;if(o){let a=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,r=e.getDate();n=1+Math.floor((r+a)/7)}else{let a=Gd(e),r=nf(a.getFullYear()),u=a.getTime()-r.getTime();n=1+Math.round(u/6048e5)}return fi(n,i,Ai(t,Pt.MinusSign))}}function fr(i,o=!1){return function(e,t){let a=Gd(e).getFullYear();return fi(a,i,Ai(t,Pt.MinusSign),o)}}var ol={};function of(i){if(ol[i])return ol[i];let o;switch(i){case"G":case"GG":case"GGG":o=ze(3,Oe.Abbreviated);break;case"GGGG":o=ze(3,Oe.Wide);break;case"GGGGG":o=ze(3,Oe.Narrow);break;case"y":o=it(0,1,0,!1,!0);break;case"yy":o=it(0,2,0,!0,!0);break;case"yyy":o=it(0,3,0,!1,!0);break;case"yyyy":o=it(0,4,0,!1,!0);break;case"Y":o=fr(1);break;case"YY":o=fr(2,!0);break;case"YYY":o=fr(3);break;case"YYYY":o=fr(4);break;case"M":case"L":o=it(1,1,1);break;case"MM":case"LL":o=it(1,2,1);break;case"MMM":o=ze(2,Oe.Abbreviated);break;case"MMMM":o=ze(2,Oe.Wide);break;case"MMMMM":o=ze(2,Oe.Narrow);break;case"LLL":o=ze(2,Oe.Abbreviated,gt.Standalone);break;case"LLLL":o=ze(2,Oe.Wide,gt.Standalone);break;case"LLLLL":o=ze(2,Oe.Narrow,gt.Standalone);break;case"w":o=nl(1);break;case"ww":o=nl(2);break;case"W":o=nl(1,!0);break;case"d":o=it(2,1);break;case"dd":o=it(2,2);break;case"c":case"cc":o=it(7,1);break;case"ccc":o=ze(1,Oe.Abbreviated,gt.Standalone);break;case"cccc":o=ze(1,Oe.Wide,gt.Standalone);break;case"ccccc":o=ze(1,Oe.Narrow,gt.Standalone);break;case"cccccc":o=ze(1,Oe.Short,gt.Standalone);break;case"E":case"EE":case"EEE":o=ze(1,Oe.Abbreviated);break;case"EEEE":o=ze(1,Oe.Wide);break;case"EEEEE":o=ze(1,Oe.Narrow);break;case"EEEEEE":o=ze(1,Oe.Short);break;case"a":case"aa":case"aaa":o=ze(0,Oe.Abbreviated);break;case"aaaa":o=ze(0,Oe.Wide);break;case"aaaaa":o=ze(0,Oe.Narrow);break;case"b":case"bb":case"bbb":o=ze(0,Oe.Abbreviated,gt.Standalone,!0);break;case"bbbb":o=ze(0,Oe.Wide,gt.Standalone,!0);break;case"bbbbb":o=ze(0,Oe.Narrow,gt.Standalone,!0);break;case"B":case"BB":case"BBB":o=ze(0,Oe.Abbreviated,gt.Format,!0);break;case"BBBB":o=ze(0,Oe.Wide,gt.Format,!0);break;case"BBBBB":o=ze(0,Oe.Narrow,gt.Format,!0);break;case"h":o=it(3,1,-12);break;case"hh":o=it(3,2,-12);break;case"H":o=it(3,1);break;case"HH":o=it(3,2);break;case"m":o=it(4,1);break;case"mm":o=it(4,2);break;case"s":o=it(5,1);break;case"ss":o=it(5,2);break;case"S":o=it(6,1);break;case"SS":o=it(6,2);break;case"SSS":o=it(6,3);break;case"Z":case"ZZ":case"ZZZ":o=pr(0);break;case"ZZZZZ":o=pr(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":o=pr(1);break;case"OOOO":case"ZZZZ":case"zzzz":o=pr(2);break;default:return null}return ol[i]=o,o}function $d(i,o){i=i.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+i)/6e4;return isNaN(e)?o:e}function af(i,o){return i=new Date(i.getTime()),i.setMinutes(i.getMinutes()+o),i}function rf(i,o,e){let n=i.getTimezoneOffset(),a=$d(o,n);return af(i,-1*(a-n))}function sf(i){if(Td(i))return i;if(typeof i=="number"&&!isNaN(i))return new Date(i);if(typeof i=="string"){if(i=i.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(i)){let[n,a=1,r=1]=i.split("-").map(u=>+u);return _r(n,a-1,r)}let e=parseFloat(i);if(!isNaN(i-e))return new Date(e);let t;if(t=i.match(Kp))return lf(t)}let o=new Date(i);if(!Td(o))throw new se(2311,!1);return o}function lf(i){let o=new Date(0),e=0,t=0,n=i[8]?o.setUTCFullYear:o.setFullYear,a=i[8]?o.setUTCHours:o.setHours;i[9]&&(e=Number(i[9]+i[10]),t=Number(i[9]+i[11])),n.call(o,Number(i[1]),Number(i[2])-1,Number(i[3]));let r=Number(i[4]||0)-e,u=Number(i[5]||0)-t,h=Number(i[6]||0),g=Math.floor(parseFloat("0."+(i[7]||0))*1e3);return a.call(o,r,u,h,g),o}function Td(i){return i instanceof Date&&!isNaN(i.valueOf())}var cf=/^(\d+)?\.((\d+)(-(\d+))?)?$/,Id=22,vr=".",Jo="0",df=";",mf=",",al="#";function uf(i,o,e,t,n,a,r=!1){let u="",h=!1;if(!isFinite(i))u=Ai(e,Pt.Infinity);else{let g=ff(i);r&&(g=pf(g));let v=o.minInt,D=o.minFrac,z=o.maxFrac;if(a){let lt=a.match(cf);if(lt===null)throw new se(2306,!1);let ci=lt[1],Di=lt[3],Xi=lt[5];ci!=null&&(v=rl(ci)),Di!=null&&(D=rl(Di)),Xi!=null?z=rl(Xi):Di!=null&&D>z&&(z=D);let di=100;if(v>di||D>di||z>di)throw new se(2306,!1)}gf(g,D,z);let W=g.digits,ne=g.integerLen,ve=g.exponent,le=[];for(h=W.every(lt=>!lt);ne<v;ne++)W.unshift(0);for(;ne<0;ne++)W.unshift(0);ne>0?le=W.splice(ne,W.length):(le=W,W=[0]);let Ie=[];for(W.length>=o.lgSize&&Ie.unshift(W.splice(-o.lgSize,W.length).join(""));W.length>o.gSize;)Ie.unshift(W.splice(-o.gSize,W.length).join(""));W.length&&Ie.unshift(W.join("")),u=Ie.join(Ai(e,t)),le.length&&(u+=Ai(e,n)+le.join("")),ve&&(u+=Ai(e,Pt.Exponential)+"+"+ve)}return i<0&&!h?u=o.negPre+u+o.negSuf:u=o.posPre+u+o.posSuf,u}function Wd(i,o,e){let t=Bd(o,ll.Decimal),n=hf(t,Ai(o,Pt.MinusSign));return uf(i,n,o,Pt.Group,Pt.Decimal,e)}function hf(i,o="-"){let e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},t=i.split(df),n=t[0],a=t[1],r=n.indexOf(vr)!==-1?n.split(vr):[n.substring(0,n.lastIndexOf(Jo)+1),n.substring(n.lastIndexOf(Jo)+1)],u=r[0],h=r[1]||"";e.posPre=u.substring(0,u.indexOf(al));for(let v=0;v<h.length;v++){let D=h.charAt(v);D===Jo?e.minFrac=e.maxFrac=v+1:D===al?e.maxFrac=v+1:e.posSuf+=D}let g=u.split(mf);if(e.gSize=g[1]?g[1].length:0,e.lgSize=g[2]||g[1]?(g[2]||g[1]).length:0,a){let v=n.length-e.posPre.length-e.posSuf.length,D=a.indexOf(al);e.negPre=a.substring(0,D).replace(/'/g,""),e.negSuf=a.slice(D+v).replace(/'/g,"")}else e.negPre=o+e.posPre,e.negSuf=e.posSuf;return e}function pf(i){if(i.digits[0]===0)return i;let o=i.digits.length-i.integerLen;return i.exponent?i.exponent+=2:(o===0?i.digits.push(0,0):o===1&&i.digits.push(0),i.integerLen+=2),i}function ff(i){let o=Math.abs(i)+"",e=0,t,n,a,r,u;for((n=o.indexOf(vr))>-1&&(o=o.replace(vr,"")),(a=o.search(/e/i))>0?(n<0&&(n=a),n+=+o.slice(a+1),o=o.substring(0,a)):n<0&&(n=o.length),a=0;o.charAt(a)===Jo;a++);if(a===(u=o.length))t=[0],n=1;else{for(u--;o.charAt(u)===Jo;)u--;for(n-=a,t=[],r=0;a<=u;a++,r++)t[r]=Number(o.charAt(a))}return n>Id&&(t=t.splice(0,Id-1),e=n-1,n=1),{digits:t,exponent:e,integerLen:n}}function gf(i,o,e){if(o>e)throw new se(2307,!1);let t=i.digits,n=t.length-i.integerLen,a=Math.min(Math.max(o,n),e),r=a+i.integerLen,u=t[r];if(r>0){t.splice(Math.max(i.integerLen,r));for(let D=r;D<t.length;D++)t[D]=0}else{n=Math.max(0,n),i.integerLen=1,t.length=Math.max(1,r=a+1),t[0]=0;for(let D=1;D<r;D++)t[D]=0}if(u>=5)if(r-1<0){for(let D=0;D>r;D--)t.unshift(0),i.integerLen++;t.unshift(1),i.integerLen++}else t[r-1]++;for(;n<Math.max(0,a);n++)t.push(0);let h=a!==0,g=o+i.integerLen,v=t.reduceRight(function(D,z,W,ne){return z=z+D,ne[W]=z<10?z:z-10,h&&(ne[W]===0&&W>=g?ne.pop():h=!1),z>=10?1:0},0);v&&(t.unshift(v),i.integerLen++)}function rl(i){let o=parseInt(i);if(isNaN(o))throw new se(2305,!1);return o}var sl=/\s+/,Rd=[],cl=(()=>{class i{_ngEl;_renderer;initialClasses=Rd;rawClass;stateMap=new Map;constructor(e,t){this._ngEl=e,this._renderer=t}set klass(e){this.initialClasses=e!=null?e.trim().split(sl):Rd}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(sl):e}ngDoCheck(){for(let t of this.initialClasses)this._updateState(t,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let t of e)this._updateState(t,!0);else if(e!=null)for(let t of Object.keys(e))this._updateState(t,!!e[t]);this._applyStateDiff()}_updateState(e,t){let n=this.stateMap.get(e);n!==void 0?(n.enabled!==t&&(n.changed=!0,n.enabled=t),n.touched=!0):this.stateMap.set(e,{enabled:t,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let t=e[0],n=e[1];n.changed?(this._toggleClass(t,n.enabled),n.changed=!1):n.touched||(n.enabled&&this._toggleClass(t,!1),this.stateMap.delete(t)),n.touched=!1}}_toggleClass(e,t){e=e.trim(),e.length>0&&e.split(sl).forEach(n=>{t?this._renderer.addClass(this._ngEl.nativeElement,n):this._renderer.removeClass(this._ngEl.nativeElement,n)})}static \u0275fac=function(t){return new(t||i)(ge(N),ge(Ce))};static \u0275dir=S({type:i,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return i})();var dl=(()=>{class i{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=d(X);constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let t=this._viewContainerRef;if(this._viewRef&&t.remove(t.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let n=this._createContextForwardProxy();this._viewRef=t.createEmbeddedView(this.ngTemplateOutlet,n,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector==="outlet"?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,t,n)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,t,n):!1,get:(e,t,n)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,t,n)}})}static \u0275fac=function(t){return new(t||i)(ge(Qe))};static \u0275dir=S({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[Ee]})}return i})();function qd(i,o){return new se(2100,!1)}var _f="mediumDate",Kd=new w(""),Yd=new w(""),ml=(()=>{class i{locale;defaultTimezone;defaultOptions;constructor(e,t,n){this.locale=e,this.defaultTimezone=t,this.defaultOptions=n}transform(e,t,n,a){if(e==null||e===""||e!==e)return null;try{let r=t??this.defaultOptions?.dateFormat??_f,u=n??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Ud(e,r,a||this.locale,u)}catch(r){throw qd(i,r.message)}}static \u0275fac=function(t){return new(t||i)(ge(el,16),ge(Kd,24),ge(Yd,24))};static \u0275pipe=Xs({name:"date",type:i,pure:!0})}return i})();var ul=(()=>{class i{_locale;constructor(e){this._locale=e}transform(e,t,n){if(!vf(e))return null;n||=this._locale;try{let a=bf(e);return Wd(a,n,t)}catch(a){throw qd(i,a.message)}}static \u0275fac=function(t){return new(t||i)(ge(el,16))};static \u0275pipe=Xs({name:"number",type:i,pure:!0})}return i})();function vf(i){return!(i==null||i===""||i!==i)}function bf(i){if(typeof i=="string"&&!isNaN(Number(i)-parseFloat(i)))return Number(i);if(typeof i!="number")throw new se(2309,!1);return i}var Pe=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({})}return i})();function ea(i,o){o=encodeURIComponent(o);for(let e of i.split(";")){let t=e.indexOf("="),[n,a]=t==-1?[e,""]:[e.slice(0,t),e.slice(t+1)];if(n.trim()===o)return decodeURIComponent(a)}return null}var hl="browser";function Xd(i){return i===hl}var ta=class{_doc;constructor(o){this._doc=o}manager},br=(()=>{class i extends ta{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,n,a){return e.addEventListener(t,n,a),()=>this.removeEventListener(e,t,n,a)}removeEventListener(e,t,n,a){return e.removeEventListener(t,n,a)}static \u0275fac=function(t){return new(t||i)(ae(q))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})(),xr=new w(""),_l=(()=>{class i{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(r=>{r.manager=this});let n=e.filter(r=>!(r instanceof br));this._plugins=n.slice().reverse();let a=e.find(r=>r instanceof br);a&&this._plugins.push(a)}addEventListener(e,t,n,a){return this._findPluginFor(t).addEventListener(e,t,n,a)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(a=>a.supports(e)),!t)throw new se(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static \u0275fac=function(t){return new(t||i)(ae(xr),ae(U))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})(),pl="ng-app-id";function Qd(i){for(let o of i)o.remove()}function Jd(i,o){let e=o.createElement("style");return e.textContent=i,e}function xf(i,o,e,t){let n=i.head?.querySelectorAll(`style[${pl}="${o}"],link[${pl}="${o}"]`);if(!n||n.length===0)return!1;for(let a of n)a.removeAttribute(pl),a instanceof HTMLLinkElement?t.set(a.href.slice(a.href.lastIndexOf("/")+1),{usage:0,elements:[a]}):a.textContent&&e.set(a.textContent,{usage:0,elements:[a]});return!0}function gl(i,o){let e=o.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",i),e}var vl=(()=>{class i{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,t,n,a={}){this.doc=e,this.appId=t,this.nonce=n,xf(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let n of e)this.addUsage(n,this.inline,Jd);t?.forEach(n=>this.addUsage(n,this.external,gl))}removeStyles(e,t){for(let n of e)this.removeUsage(n,this.inline);t?.forEach(n=>this.removeUsage(n,this.external))}addUsage(e,t,n){let a=t.get(e);a?a.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(r=>this.addElement(r,n(e,this.doc)))})}removeUsage(e,t){let n=t.get(e);n&&(n.usage--,n.usage<=0&&(Qd(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Qd(e);this.hosts.clear()}addHost(e){if(!this.hosts.has(e)){this.hosts.add(e);for(let[t,{elements:n}]of this.inline)n.push(this.addElement(e,Jd(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,gl(t,this.doc)))}}removeHost(e){this.hosts.delete(e);for(let t of[...this.inline.values(),...this.external.values()]){let n=[];for(let a of t.elements)a.parentNode===e?a.remove():n.push(a);t.elements=n}}addElement(e,t){return this.nonce&&t.setAttribute("nonce",this.nonce),e.appendChild(t)}static \u0275fac=function(t){return new(t||i)(ae(q),ae(Tn),ae(io,8),ae(to))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})(),fl={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},bl=/%COMP%/g;var tm="%COMP%",wf=`_nghost-${tm}`,Df=`_ngcontent-${tm}`,Sf=!0,kf=new w("",{factory:()=>Sf});function Mf(i){return Df.replace(bl,i)}function Ef(i){return wf.replace(bl,i)}function im(i,o){return o.map(e=>e.replace(bl,i))}var In=(()=>{class i{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(e,t,n,a,r,u,h=null,g=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.removeStylesOnCompDestroy=a,this.doc=r,this.ngZone=u,this.nonce=h,this.tracingService=g,this.defaultRenderer=new ia(e,r,u,this.tracingService)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let n=this.getOrCreateRenderer(e,t);return n instanceof Cr?n.applyToHost(e):n instanceof na&&n.applyStyles(),n}getOrCreateRenderer(e,t){let n=this.rendererByCompId,a=n.get(t.id);if(!a){let r=this.doc,u=this.ngZone,h=this.eventManager,g=this.sharedStylesHost,v=this.removeStylesOnCompDestroy,D=this.tracingService;switch(t.encapsulation){case tr.Emulated:a=new Cr(h,g,t,this.appId,v,r,u,D);break;case tr.ShadowDom:return new yr(h,e,t,r,u,this.nonce,D,g);case tr.ExperimentalIsolatedShadowDom:return new yr(h,e,t,r,u,this.nonce,D);default:a=new na(h,g,t,v,r,u,D);break}n.set(t.id,a)}return a}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(t){return new(t||i)(ae(_l),ae(Uo),ae(Tn),ae(kf),ae(q),ae(U),ae(io),ae(Ks,8))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})(),ia=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(o,e,t,n){this.eventManager=o,this.doc=e,this.ngZone=t,this.tracingService=n}destroy(){}destroyNode=null;createElement(o,e){return e?this.doc.createElementNS(fl[e]||e,o):this.doc.createElement(o)}createComment(o){return this.doc.createComment(o)}createText(o){return this.doc.createTextNode(o)}appendChild(o,e){(em(o)?o.content:o).appendChild(e)}insertBefore(o,e,t){o&&(em(o)?o.content:o).insertBefore(e,t)}removeChild(o,e){e.remove()}selectRootElement(o,e){let t=typeof o=="string"?this.doc.querySelector(o):o;if(!t)throw new se(-5104,!1);return e||(t.textContent=""),t}parentNode(o){return o.parentNode}nextSibling(o){return o.nextSibling}setAttribute(o,e,t,n){if(n){e=n+":"+e;let a=fl[n];a?o.setAttributeNS(a,e,t):o.setAttribute(e,t)}else o.setAttribute(e,t)}removeAttribute(o,e,t){if(t){let n=fl[t];n?o.removeAttributeNS(n,e):o.removeAttribute(`${t}:${e}`)}else o.removeAttribute(e)}addClass(o,e){o.classList.add(e)}removeClass(o,e){o.classList.remove(e)}setStyle(o,e,t,n){n&(ao.DashCase|ao.Important)?o.style.setProperty(e,t,n&ao.Important?"important":""):o.style[e]=t}removeStyle(o,e,t){t&ao.DashCase?o.style.removeProperty(e):o.style[e]=""}setProperty(o,e,t){o!=null&&(o[e]=t)}setValue(o,e){o.nodeValue=e}listen(o,e,t,n){if(typeof o=="string"&&(o=Jt().getGlobalEventTarget(this.doc,o),!o))throw new se(-5102,!1);let a=this.decoratePreventDefault(t);return this.tracingService?.wrapEventListener&&(a=this.tracingService.wrapEventListener(o,e,a)),this.eventManager.addEventListener(o,e,a,n)}decoratePreventDefault(o){return e=>{if(e==="__ngUnwrap__")return o;o(e)===!1&&e.preventDefault()}}};function em(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var yr=class extends ia{hostEl;sharedStylesHost;shadowRoot;constructor(o,e,t,n,a,r,u,h){super(o,n,a,u),this.hostEl=e,this.sharedStylesHost=h,this.shadowRoot=e.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let g=t.styles;g=im(t.id,g);for(let D of g){let z=document.createElement("style");r&&z.setAttribute("nonce",r),z.textContent=D,this.shadowRoot.appendChild(z)}let v=t.getExternalStyles?.();if(v)for(let D of v){let z=gl(D,n);r&&z.setAttribute("nonce",r),this.shadowRoot.appendChild(z)}}nodeOrShadowRoot(o){return o===this.hostEl?this.shadowRoot:o}appendChild(o,e){return super.appendChild(this.nodeOrShadowRoot(o),e)}insertBefore(o,e,t){return super.insertBefore(this.nodeOrShadowRoot(o),e,t)}removeChild(o,e){return super.removeChild(null,e)}parentNode(o){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(o)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},na=class extends ia{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(o,e,t,n,a,r,u,h){super(o,a,r,u),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=n;let g=t.styles;this.styles=h?im(h,g):g,this.styleUrls=t.getExternalStyles?.(h)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&ud.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Cr=class extends na{contentAttr;hostAttr;constructor(o,e,t,n,a,r,u,h){let g=n+"-"+t.id;super(o,e,t,a,r,u,h,g),this.contentAttr=Mf(g),this.hostAttr=Ef(g)}applyToHost(o){this.applyStyles(),this.setAttribute(o,this.hostAttr,"")}createElement(o,e){let t=super.createElement(o,e);return super.setAttribute(t,this.contentAttr,""),t}};var wr=class i extends Yo{supportsDOMEvents=!0;static makeCurrent(){tl(new i)}onAndCancel(o,e,t,n){return o.addEventListener(e,t,n),()=>{o.removeEventListener(e,t,n)}}dispatchEvent(o,e){o.dispatchEvent(e)}remove(o){o.remove()}createElement(o,e){return e=e||this.getDefaultDocument(),e.createElement(o)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(o){return o.nodeType===Node.ELEMENT_NODE}isShadowRoot(o){return o instanceof DocumentFragment}getGlobalEventTarget(o,e){return e==="window"?window:e==="document"?o:e==="body"?o.body:null}getBaseHref(o){let e=Tf();return e==null?null:If(e)}resetBaseElement(){oa=null}getUserAgent(){return window.navigator.userAgent}getCookie(o){return ea(document.cookie,o)}},oa=null;function Tf(){return oa=oa||document.head.querySelector("base"),oa?oa.getAttribute("href"):null}function If(i){return new URL(i,document.baseURI).pathname}var nm=["alt","control","meta","shift"],Rf={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Of={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},om=(()=>{class i extends ta{constructor(e){super(e)}supports(e){return i.parseEventName(e)!=null}addEventListener(e,t,n,a){let r=i.parseEventName(t),u=i.eventCallback(r.fullKey,n,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Jt().onAndCancel(e,r.domEventName,u,a))}static parseEventName(e){let t=e.toLowerCase().split("."),n=t.shift();if(t.length===0||!(n==="keydown"||n==="keyup"))return null;let a=i._normalizeKey(t.pop()),r="",u=t.indexOf("code");if(u>-1&&(t.splice(u,1),r="code."),nm.forEach(g=>{let v=t.indexOf(g);v>-1&&(t.splice(v,1),r+=g+".")}),r+=a,t.length!=0||a.length===0)return null;let h={};return h.domEventName=n,h.fullKey=r,h}static matchEventFullKeyCode(e,t){let n=Rf[e.key]||e.key,a="";return t.indexOf("code.")>-1&&(n=e.code,a="code."),n==null||!n?!1:(n=n.toLowerCase(),n===" "?n="space":n==="."&&(n="dot"),nm.forEach(r=>{if(r!==n){let u=Of[r];u(e)&&(a+=r+".")}}),a+=n,a===t)}static eventCallback(e,t,n){return a=>{i.matchEventFullKeyCode(a,e)&&n.runGuarded(()=>t(a))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(t){return new(t||i)(ae(q))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();function yl(i,o,e){return oe(this,null,function*(){let t=V({rootComponent:i},Pf(o,e));return bd(t)})}function Pf(i,o){return{platformRef:o?.platformRef,appProviders:[...Bf,...i?.providers??[]],platformProviders:Vf}}function Ff(){wr.makeCurrent()}function Nf(){return new An}function Lf(){return od(document),document}var Vf=[{provide:to,useValue:hl},{provide:id,useValue:Ff,multi:!0},{provide:q,useFactory:Lf}];var Bf=[{provide:ed,useValue:"root"},{provide:An,useFactory:Nf},{provide:xr,useClass:br,multi:!0},{provide:xr,useClass:om,multi:!0},In,{provide:Uo,useClass:vl},{provide:vl,useExisting:Uo},_l,{provide:ot,useExisting:In},[]];var zi=class i{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(o){o?typeof o=="string"?this.lazyInit=()=>{this.headers=new Map,o.split(`
2
+ `).forEach(e=>{let t=e.indexOf(":");if(t>0){let n=e.slice(0,t),a=e.slice(t+1).trim();this.addHeaderEntry(n,a)}})}:typeof Headers<"u"&&o instanceof Headers?(this.headers=new Map,o.forEach((e,t)=>{this.addHeaderEntry(t,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(o).forEach(([e,t])=>{this.setHeaderEntries(e,t)})}:this.headers=new Map}has(o){return this.init(),this.headers.has(o.toLowerCase())}get(o){this.init();let e=this.headers.get(o.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(o){return this.init(),this.headers.get(o.toLowerCase())||null}append(o,e){return this.clone({name:o,value:e,op:"a"})}set(o,e){return this.clone({name:o,value:e,op:"s"})}delete(o,e){return this.clone({name:o,value:e,op:"d"})}maybeSetNormalizedName(o,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,o)}init(){this.lazyInit&&(this.lazyInit instanceof i?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(o=>this.applyUpdate(o)),this.lazyUpdate=null))}copyFrom(o){o.init(),Array.from(o.headers.keys()).forEach(e=>{this.headers.set(e,o.headers.get(e)),this.normalizedNames.set(e,o.normalizedNames.get(e))})}clone(o){let e=new i;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof i?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([o]),e}applyUpdate(o){let e=o.name.toLowerCase();switch(o.op){case"a":case"s":let t=o.value;if(typeof t=="string"&&(t=[t]),t.length===0)return;this.maybeSetNormalizedName(o.name,e);let n=(o.op==="a"?this.headers.get(e):void 0)||[];n.push(...t),this.headers.set(e,n);break;case"d":let a=o.value;if(!a)this.headers.delete(e),this.normalizedNames.delete(e);else{let r=this.headers.get(e);if(!r)return;r=r.filter(u=>a.indexOf(u)===-1),r.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,r)}break}}addHeaderEntry(o,e){let t=o.toLowerCase();this.maybeSetNormalizedName(o,t),this.headers.has(t)?this.headers.get(t).push(e):this.headers.set(t,[e])}setHeaderEntries(o,e){let t=(Array.isArray(e)?e:[e]).map(a=>a.toString()),n=o.toLowerCase();this.headers.set(n,t),this.maybeSetNormalizedName(o,n)}forEach(o){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>o(this.normalizedNames.get(e),this.headers.get(e)))}};var Sr=class{map=new Map;set(o,e){return this.map.set(o,e),this}get(o){return this.map.has(o)||this.map.set(o,o.defaultValue()),this.map.get(o)}delete(o){return this.map.delete(o),this}has(o){return this.map.has(o)}keys(){return this.map.keys()}},kr=class{encodeKey(o){return am(o)}encodeValue(o){return am(o)}decodeKey(o){return decodeURIComponent(o)}decodeValue(o){return decodeURIComponent(o)}};function zf(i,o){let e=new Map;return i.length>0&&i.replace(/^\?/,"").split("&").forEach(n=>{let a=n.indexOf("="),[r,u]=a==-1?[o.decodeKey(n),""]:[o.decodeKey(n.slice(0,a)),o.decodeValue(n.slice(a+1))],h=e.get(r)||[];h.push(u),e.set(r,h)}),e}var jf=/%(\d[a-f0-9])/gi,Hf={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function am(i){return encodeURIComponent(i).replace(jf,(o,e)=>Hf[e]??o)}function Dr(i){return`${i}`}var Bi=class i{map;encoder;updates=null;cloneFrom=null;constructor(o={}){if(this.encoder=o.encoder||new kr,o.fromString){if(o.fromObject)throw new se(2805,!1);this.map=zf(o.fromString,this.encoder)}else o.fromObject?(this.map=new Map,Object.keys(o.fromObject).forEach(e=>{let t=o.fromObject[e],n=Array.isArray(t)?t.map(Dr):[Dr(t)];this.map.set(e,n)})):this.map=null}has(o){return this.init(),this.map.has(o)}get(o){this.init();let e=this.map.get(o);return e?e[0]:null}getAll(o){return this.init(),this.map.get(o)||null}keys(){return this.init(),Array.from(this.map.keys())}append(o,e){return this.clone({param:o,value:e,op:"a"})}appendAll(o){let e=[];return Object.keys(o).forEach(t=>{let n=o[t];Array.isArray(n)?n.forEach(a=>{e.push({param:t,value:a,op:"a"})}):e.push({param:t,value:n,op:"a"})}),this.clone(e)}set(o,e){return this.clone({param:o,value:e,op:"s"})}delete(o,e){return this.clone({param:o,value:e,op:"d"})}toString(){return this.init(),this.keys().map(o=>{let e=this.encoder.encodeKey(o);return this.map.get(o).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).filter(o=>o!=="").join("&")}clone(o){let e=new i({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(o),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(o=>this.map.set(o,this.cloneFrom.map.get(o))),this.updates.forEach(o=>{switch(o.op){case"a":case"s":let e=(o.op==="a"?this.map.get(o.param):void 0)||[];e.push(Dr(o.value)),this.map.set(o.param,e);break;case"d":if(o.value!==void 0){let t=this.map.get(o.param)||[],n=t.indexOf(Dr(o.value));n!==-1&&t.splice(n,1),t.length>0?this.map.set(o.param,t):this.map.delete(o.param)}else{this.map.delete(o.param);break}}}),this.cloneFrom=this.updates=null)}};function Uf(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function rm(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function sm(i){return typeof Blob<"u"&&i instanceof Blob}function lm(i){return typeof FormData<"u"&&i instanceof FormData}function Gf(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var Cl="Content-Type",cm="Accept",mm="text/plain",um="application/json",$f=`${um}, ${mm}, */*`,lo=class i{url;body=null;headers;context;reportProgress=!1;reportUploadProgress=!1;reportDownloadProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(o,e,t,n){this.url=e,this.method=o.toUpperCase();let a;if(Uf(this.method)||n?(this.body=t!==void 0?t:null,a=n):a=t,a){if(this.reportProgress=!!a.reportProgress,this.reportUploadProgress=!!a.reportUploadProgress,this.reportDownloadProgress=!!a.reportDownloadProgress,this.withCredentials=!!a.withCredentials,this.keepalive=!!a.keepalive,a.responseType&&(this.responseType=a.responseType),a.headers&&(this.headers=a.headers),a.context&&(this.context=a.context),a.params&&(this.params=a.params),a.priority&&(this.priority=a.priority),a.cache&&(this.cache=a.cache),a.credentials&&(this.credentials=a.credentials),typeof a.timeout=="number"){if(a.timeout<1||!Number.isInteger(a.timeout))throw new se(2822,"");this.timeout=a.timeout}a.mode&&(this.mode=a.mode),a.redirect&&(this.redirect=a.redirect),a.integrity&&(this.integrity=a.integrity),a.referrer!==void 0&&(this.referrer=a.referrer),a.referrerPolicy&&(this.referrerPolicy=a.referrerPolicy),this.transferCache=a.transferCache}if(this.headers??=new zi,this.context??=new Sr,!this.params)this.params=new Bi,this.urlWithParams=e;else{let r=this.params.toString();if(r.length===0)this.urlWithParams=e;else{let u=e,h="",g=e.indexOf("#");g!==-1&&(h=e.substring(g),u=e.substring(0,g));let v=u.indexOf("?"),D=v===-1?"?":v<u.length-1?"&":"";this.urlWithParams=u+D+r+h}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||rm(this.body)||sm(this.body)||lm(this.body)||Gf(this.body)?this.body:this.body instanceof Bi?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||lm(this.body)?null:sm(this.body)?this.body.type||null:rm(this.body)?null:typeof this.body=="string"?mm:this.body instanceof Bi?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?um:null}clone(o={}){let e=o.method||this.method,t=o.url||this.url,n=o.responseType||this.responseType,a=o.keepalive??this.keepalive,r=o.priority||this.priority,u=o.cache||this.cache,h=o.mode||this.mode,g=o.redirect||this.redirect,v=o.credentials||this.credentials,D=o.referrer??this.referrer,z=o.integrity||this.integrity,W=o.referrerPolicy||this.referrerPolicy,ne=o.transferCache??this.transferCache,ve=o.timeout??this.timeout,le=o.body!==void 0?o.body:this.body,Ie=o.withCredentials??this.withCredentials,lt=o.reportProgress??this.reportProgress,ci=o.reportUploadProgress??this.reportUploadProgress,Di=o.reportDownloadProgress??this.reportDownloadProgress,Xi=o.headers||this.headers,di=o.params||this.params,qa=o.context??this.context;return o.setHeaders!==void 0&&(Xi=Object.keys(o.setHeaders).reduce((Qn,En)=>Qn.set(En,o.setHeaders[En]),Xi)),o.setParams&&(di=Object.keys(o.setParams).reduce((Qn,En)=>Qn.set(En,o.setParams[En]),di)),new i(e,t,le,{params:di,headers:Xi,context:qa,reportProgress:lt,reportUploadProgress:ci,reportDownloadProgress:Di,responseType:n,withCredentials:Ie,transferCache:ne,keepalive:a,cache:u,priority:r,timeout:ve,mode:h,redirect:g,credentials:v,referrer:D,integrity:z,referrerPolicy:W})}},co=(function(i){return i[i.Sent=0]="Sent",i[i.UploadProgress=1]="UploadProgress",i[i.ResponseHeader=2]="ResponseHeader",i[i.DownloadProgress=3]="DownloadProgress",i[i.Response=4]="Response",i[i.User=5]="User",i})(co||{}),mo=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(o,e=200,t="OK"){this.headers=o.headers||new zi,this.status=o.status!==void 0?o.status:e,this.statusText=o.statusText||t,this.url=o.url||null,this.redirected=o.redirected,this.responseType=o.responseType,this.ok=this.status>=200&&this.status<300}},Mr=class i extends mo{constructor(o={}){super(o)}type=co.ResponseHeader;clone(o={}){return new i({headers:o.headers||this.headers,status:o.status!==void 0?o.status:this.status,statusText:o.statusText||this.statusText,url:o.url||this.url||void 0})}},aa=class i extends mo{body;constructor(o={}){super(o),this.body=o.body!==void 0?o.body:null}type=co.Response;clone(o={}){return new i({body:o.body!==void 0?o.body:this.body,headers:o.headers||this.headers,status:o.status!==void 0?o.status:this.status,statusText:o.statusText||this.statusText,url:o.url||this.url||void 0,redirected:o.redirected??this.redirected,responseType:o.responseType??this.responseType})}},Rn=class extends mo{name="HttpErrorResponse";message;error;ok=!1;constructor(o){super(o,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${o.url||"(unknown url)"}`:this.message=`Http failure response for ${o.url||"(unknown url)"}: ${o.status} ${o.statusText}`,this.error=o.error||null}},Wf=200;var qf=/^\)\]\}',?\n/,vD=1024*1024,hm=new w("",{factory:()=>null}),Er=(()=>{class i{fetchImpl=d(wl,{optional:!0})?.fetch??((...e)=>globalThis.fetch(...e));ngZone=d(U);destroyRef=d(Ht);maxResponseSize=d(hm);handle(e){return new wt(t=>{let n=new AbortController;this.doRequest(e,n.signal,t).then(Dl,r=>t.error(new Rn({error:r})));let a;return e.timeout&&(a=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{n.signal.aborted||n.abort(new DOMException("signal timed out","TimeoutError"))},e.timeout))),()=>{a!==void 0&&clearTimeout(a),n.abort()}})}doRequest(e,t,n){return oe(this,null,function*(){let a=this.createRequestInit(e),r;try{let le=this.ngZone.runOutsideAngular(()=>this.fetchImpl(e.urlWithParams,V({signal:t},a)));Kf(le),n.next({type:co.Sent}),r=yield le}catch(le){n.error(new Rn({error:le,status:le.status??0,statusText:le.statusText,url:e.urlWithParams,headers:le.headers}));return}let u=new zi(r.headers),h=r.statusText,g=r.url||e.urlWithParams,v=r.status,D=null,z=e.reportProgress||e.reportDownloadProgress;if(z&&n.next(new Mr({headers:u,status:v,statusText:h,url:g})),r.body){let le=r.headers.get("content-length"),Ie=le!==null?Number(le):NaN;this.maxResponseSize!==null&&Number.isFinite(Ie)&&Ie>this.maxResponseSize&&dm(this.maxResponseSize);let lt=[],ci=r.body.getReader(),Di=0,Xi,di,qa=typeof Zone<"u"&&Zone.current,Qn=!1;if(yield this.ngZone.runOutsideAngular(()=>oe(this,null,function*(){for(;;){if(this.destroyRef.destroyed){yield ci.cancel(),Qn=!0;break}let{done:zo,value:Bs}=yield ci.read();if(zo)break;if(lt.push(Bs),Di+=Bs.length,this.maxResponseSize!==null&&Di>this.maxResponseSize&&(yield ci.cancel(),dm(this.maxResponseSize)),z){di=e.responseType==="text"?(di??"")+(Xi??=new TextDecoder).decode(Bs,{stream:!0}):void 0;let Wc=()=>n.next({type:co.DownloadProgress,total:Number.isFinite(Ie)?Ie:void 0,loaded:Di,partialText:di});qa?qa.run(Wc):Wc()}}})),Qn){n.complete();return}let En=this.concatChunks(lt,Di);try{let zo=r.headers.get(Cl)??"";D=this.parseBody(e,En,zo,v)}catch(zo){n.error(new Rn({error:zo,headers:new zi(r.headers),status:r.status,statusText:r.statusText,url:r.url||e.urlWithParams}));return}}v===0&&(v=D?Wf:0);let W=v>=200&&v<300,ne=r.redirected,ve=r.type;W?(n.next(new aa({body:D,headers:u,status:v,statusText:h,url:g,redirected:ne,responseType:ve})),n.complete()):n.error(new Rn({error:D,headers:u,status:v,statusText:h,url:g,redirected:ne,responseType:ve}))})}parseBody(e,t,n,a){switch(e.responseType){case"json":let r=new TextDecoder().decode(t).replace(qf,"");if(r==="")return null;try{return JSON.parse(r)}catch(u){if(a<200||a>=300)return r;throw u}case"text":return new TextDecoder().decode(t);case"blob":return new Blob([t],{type:n});case"arraybuffer":return t.buffer}}createRequestInit(e){if(e.reportUploadProgress)throw new se(2824,!1);let t={},n;if(n=e.credentials,e.withCredentials&&(n="include"),e.headers.forEach((a,r)=>t[a]=r.join(",")),e.headers.has(cm)||(t[cm]=$f),!e.headers.has(Cl)){let a=e.detectContentTypeHeader();a!==null&&(t[Cl]=a)}return{body:e.serializeBody(),method:e.method,headers:t,credentials:n,keepalive:e.keepalive,cache:e.cache,priority:e.priority,mode:e.mode,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity,referrerPolicy:e.referrerPolicy}}concatChunks(e,t){let n=new Uint8Array(t),a=0;for(let r of e)n.set(r,a),a+=r.length;return n}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),wl=class{};function Dl(){}function Kf(i){i.then(Dl,Dl)}function dm(i){throw new se(-2825,!1)}function Yf(i,o){return o(i)}function Xf(i,o,e){return(t,n)=>td(e,()=>o(t,a=>i(a,n)))}var Sl=new w("",{factory:()=>[]}),pm=new w(""),fm=new w("",{factory:()=>!0});var kl=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275prov=J({token:i,factory:function(t){let n=null;return t?n=new(t||i):n=ae(Er),n},providedIn:"root"})}return i})();var Ar=(()=>{class i{backend;injector;chain=null;pendingTasks=d(Ws);contributeToStability=d(fm);constructor(e,t){this.backend=e,this.injector=t}handle(e){if(this.chain===null){let t=Array.from(new Set([...this.injector.get(Sl),...this.injector.get(pm,[])]));this.chain=t.reduceRight((n,a)=>Xf(n,a,this.injector),Yf)}if(this.contributeToStability){let t=this.pendingTasks.add();return this.chain(e,n=>this.backend.handle(n)).pipe(Ja(t))}else return this.chain(e,t=>this.backend.handle(t))}static \u0275fac=function(t){return new(t||i)(ae(kl),ae(ui))};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Ml=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275prov=J({token:i,factory:function(t){let n=null;return t?n=new(t||i):n=ae(Ar),n},providedIn:"root"})}return i})();function xl(i,o){return V({body:o},i)}var Ft=(()=>{class i{handler;constructor(e){this.handler=e}request(e,t,n={}){let a;if(e instanceof lo)a=e;else{let h;n.headers instanceof zi?h=n.headers:h=new zi(n.headers);let g;n.params&&(n.params instanceof Bi?g=n.params:g=new Bi({fromObject:n.params})),a=new lo(e,t,n.body!==void 0?n.body:null,{headers:h,context:n.context,params:g,reportProgress:n.reportProgress,reportUploadProgress:n.reportUploadProgress,reportDownloadProgress:n.reportDownloadProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials,transferCache:n.transferCache,keepalive:n.keepalive,priority:n.priority,cache:n.cache,mode:n.mode,redirect:n.redirect,credentials:n.credentials,referrer:n.referrer,referrerPolicy:n.referrerPolicy,integrity:n.integrity,timeout:n.timeout})}let r=be(a).pipe(Xc(h=>this.handler.handle(h)));if(e instanceof lo||n.observe==="events")return r;let u=r.pipe(De(h=>h instanceof aa));switch(n.observe||"body"){case"body":switch(a.responseType){case"arraybuffer":return u.pipe(Ne(h=>{if(h.body!==null&&!(h.body instanceof ArrayBuffer))throw new se(2806,!1);return h.body}));case"blob":return u.pipe(Ne(h=>{if(h.body!==null&&!(h.body instanceof Blob))throw new se(2807,!1);return h.body}));case"text":return u.pipe(Ne(h=>{if(h.body!==null&&typeof h.body!="string")throw new se(2808,!1);return h.body}));default:return u.pipe(Ne(h=>h.body))}case"response":return u;default:throw new se(2809,!1)}}delete(e,t={}){return this.request("DELETE",e,t)}get(e,t={}){return this.request("GET",e,t)}head(e,t={}){return this.request("HEAD",e,t)}jsonp(e,t){return this.request("JSONP",e,{params:new Bi().append(t,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,t={}){return this.request("OPTIONS",e,t)}patch(e,t,n={}){return this.request("PATCH",e,xl(n,t))}post(e,t,n={}){return this.request("POST",e,xl(n,t))}put(e,t,n={}){return this.request("PUT",e,xl(n,t))}static \u0275fac=function(t){return new(t||i)(ae(Ml))};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Zf=new w("",{factory:()=>!0}),Qf="XSRF-TOKEN",Jf=new w("",{factory:()=>Qf}),eg="X-XSRF-TOKEN",tg=new w("",{factory:()=>eg}),ig=(()=>{class i{cookieName=d(Jf);doc=d(q);lastCookieString="";lastToken=null;parseCount=0;getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=ea(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),gm=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275prov=J({token:i,factory:function(t){let n=null;return t?n=new(t||i):n=ae(ig),n},providedIn:"root"})}return i})();function ng(i,o){if(!d(Zf)||i.method==="GET"||i.method==="HEAD")return o(i);try{let n=d(so).href,{origin:a}=new URL(n),{origin:r}=new URL(i.url,a);if(a!==r)return o(i)}catch(n){return o(i)}let e=d(gm).getToken(),t=d(tg);return e!=null&&!i.headers.has(t)&&(i=i.clone({headers:i.headers.set(t,e)})),o(i)}var El=(function(i){return i[i.Interceptors=0]="Interceptors",i[i.LegacyInterceptors=1]="LegacyInterceptors",i[i.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",i[i.NoXsrfProtection=3]="NoXsrfProtection",i[i.JsonpSupport=4]="JsonpSupport",i[i.RequestsMadeViaParent=5]="RequestsMadeViaParent",i[i.Fetch=6]="Fetch",i[i.Xhr=7]="Xhr",i})(El||{});function og(i,o){return{\u0275kind:i,\u0275providers:o}}function Al(...i){let o=[Ft,Er,Ar,{provide:Ml,useExisting:Ar},{provide:kl,useFactory:()=>d(Er)},{provide:Sl,useValue:ng,multi:!0}];for(let e of i)o.push(...e.\u0275providers);return Ho(o)}function Tl(i){return og(El.Interceptors,i.map(o=>({provide:Sl,useValue:o,multi:!0})))}var ra=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275prov=J({token:i,factory:function(t){let n=null;return t?n=new(t||i):n=ae(sg),n},providedIn:"root"})}return i})(),sg=(()=>{class i extends ra{_doc=d(q);sanitize(e,t){if(t==null)return null;switch(e){case Dt.NONE:return t;case Dt.HTML:return oo(t,"HTML")?no(t):md(this._doc,String(t)).toString();case Dt.STYLE:return oo(t,"Style")?no(t):t;case Dt.SCRIPT:if(oo(t,"Script"))return no(t);throw new se(5200,!1);case Dt.URL:return oo(t,"URL")?no(t):dd(String(t));case Dt.RESOURCE_URL:if(oo(t,"ResourceURL"))return no(t);throw new se(5201,!1);default:throw new se(5202,!1)}}bypassSecurityTrustHtml(e){return ad(e)}bypassSecurityTrustStyle(e){return rd(e)}bypassSecurityTrustScript(e){return sd(e)}bypassSecurityTrustUrl(e){return ld(e)}bypassSecurityTrustResourceUrl(e){return cd(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var cg=(()=>{class i extends cr{constructor(e,t,n){super(e,t,n)}ngOnDestroy(){this.flush()}static \u0275fac=function(t){return new(t||i)(ae(q),ae(Ko),ae(lr))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();function dg(){return new xd}function mg(){return new Dd(d(In),d(cr),d(U))}var _m=[{provide:lr,useFactory:dg},{provide:cr,useClass:cg},{provide:ot,useFactory:mg}],vS=[{provide:Ko,useClass:Cd},{provide:Li,useValue:"NoopAnimations"},..._m],ug=[{provide:Ko,useFactory:()=>new wd},{provide:Li,useFactory:()=>"BrowserAnimations"},..._m];function vm(){return ir("NgEagerAnimations"),[...ug]}var hg="@",pg=(()=>{class i{doc;delegate;zone;animationType;moduleImpl;_rendererFactoryPromise=null;scheduler=null;injector=d(X);loadingSchedulerFn=d(fg,{optional:!0});_engine;constructor(e,t,n,a,r){this.doc=e,this.delegate=t,this.zone=n,this.animationType=a,this.moduleImpl=r}ngOnDestroy(){this._engine?.flush()}loadImpl(){let e=()=>this.moduleImpl??import("./chunk-34LU6STA.js").then(n=>n),t;return this.loadingSchedulerFn?t=this.loadingSchedulerFn(e):t=e(),t.catch(n=>{throw new se(5300,!1)}).then(({\u0275createEngine:n,\u0275AnimationRendererFactory:a})=>{this._engine=n(this.animationType,this.doc);let r=new a(this.delegate,this._engine,this.zone);return this.delegate=r,r})}createRenderer(e,t){let n=this.delegate.createRenderer(e,t);if(n.\u0275type===0)return n;typeof n.throwOnSyntheticProps=="boolean"&&(n.throwOnSyntheticProps=!1);let a=new Il(n);return t?.data?.animation&&!this._rendererFactoryPromise&&(this._rendererFactoryPromise=this.loadImpl()),this._rendererFactoryPromise?.then(r=>{let u=r.createRenderer(e,t);a.use(u),this.scheduler??=this.injector.get(nd,null,{optional:!0}),this.scheduler?.notify(10)}).catch(r=>{a.use(n)}),a}begin(){this.delegate.begin?.()}end(){this.delegate.end?.()}whenRenderingDone(){return this.delegate.whenRenderingDone?.()??Promise.resolve()}componentReplaced(e){this._engine?.flush(),this.delegate.componentReplaced?.(e)}static \u0275fac=function(t){nr()};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})(),Il=class{delegate;replay=[];\u0275type=1;constructor(o){this.delegate=o}use(o){if(this.delegate=o,this.replay!==null){for(let e of this.replay)e(o);this.replay=null}}get data(){return this.delegate.data}destroy(){this.replay=null,this.delegate.destroy()}createElement(o,e){return this.delegate.createElement(o,e)}createComment(o){return this.delegate.createComment(o)}createText(o){return this.delegate.createText(o)}get destroyNode(){return this.delegate.destroyNode}appendChild(o,e){this.delegate.appendChild(o,e)}insertBefore(o,e,t,n){this.delegate.insertBefore(o,e,t,n)}removeChild(o,e,t,n){this.delegate.removeChild(o,e,t,n)}selectRootElement(o,e){return this.delegate.selectRootElement(o,e)}parentNode(o){return this.delegate.parentNode(o)}nextSibling(o){return this.delegate.nextSibling(o)}setAttribute(o,e,t,n){this.delegate.setAttribute(o,e,t,n)}removeAttribute(o,e,t){this.delegate.removeAttribute(o,e,t)}addClass(o,e){this.delegate.addClass(o,e)}removeClass(o,e){this.delegate.removeClass(o,e)}setStyle(o,e,t,n){this.delegate.setStyle(o,e,t,n)}removeStyle(o,e,t){this.delegate.removeStyle(o,e,t)}setProperty(o,e,t){this.shouldReplay(e)&&this.replay.push(n=>n.setProperty(o,e,t)),this.delegate.setProperty(o,e,t)}setValue(o,e){this.delegate.setValue(o,e)}listen(o,e,t,n){return this.shouldReplay(e)&&this.replay.push(a=>a.listen(o,e,t,n)),this.delegate.listen(o,e,t,n)}shouldReplay(o){return this.replay!==null&&o.startsWith(hg)}},fg=new w("");function bm(i="animations"){return ir("NgAsyncAnimations"),Ho([{provide:ot,useFactory:()=>new pg(d(q),d(In),d(U),i)},{provide:Li,useValue:i==="noop"?"NoopAnimations":"BrowserAnimations"}])}var Tr="asm_token",Ir=(()=>{class i{constructor(){this.http=d(Ft),this.authState=new Jn(this.hasToken())}login(e){return oe(this,null,function*(){try{let t=yield we(this.http.post("/api/auth/login",{password:e}));return localStorage.setItem(Tr,t.token),this.authState.next(!0),!0}catch(t){return!1}})}logout(){localStorage.removeItem(Tr),this.authState.next(!1)}getToken(){return localStorage.getItem(Tr)}isAuthenticated(){return this.hasToken()}hasToken(){return!!localStorage.getItem(Tr)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var ym=(i,o)=>{let e=d(Ir),t=e.getToken(),n=i.url.includes("/api/auth/login"),a=t&&!n?i.clone({setHeaders:{Authorization:`Bearer ${t}`}}):i;return o(a).pipe(Zt(r=>(r.status===401&&!n&&e.logout(),Xa(()=>r))))};var Cm={providers:[vd({eventCoalescing:!0}),Al(Tl([ym])),vm(),bm()]};var Rl;try{Rl=typeof Intl<"u"&&Intl.v8BreakIterator}catch(i){Rl=!1}var ce=(()=>{class i{_platformId=d(to);isBrowser=this._platformId?Xd(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Rl)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function ji(i){return Array.isArray(i)?i:[i]}var xm=new Set,On,uo=(()=>{class i{_platform=d(ce);_nonce=d(io,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):_g}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&gg(e,this._nonce),this._matchMedia(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function gg(i,o){if(!xm.has(i))try{On||(On=document.createElement("style"),o&&On.setAttribute("nonce",o),On.setAttribute("type","text/css"),document.head.appendChild(On)),On.sheet&&(On.sheet.insertRule(`@media ${i.replace(/[{}]/g,"")} {body{ }}`,0),xm.add(i))}catch(e){console.error(e)}}function _g(i){return{matches:i==="all"||i==="",media:i,addListener:()=>{},removeListener:()=>{}}}var Pn=(()=>{class i{_mediaMatcher=d(uo);_zone=d(U);_queries=new Map;_destroySubject=new R;ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return wm(ji(e)).some(n=>this._registerQuery(n).mql.matches)}observe(e){let n=wm(ji(e)).map(r=>this._registerQuery(r).observable),a=eo(n);return a=Yc(a.pipe(ct(1)),a.pipe(er(1),jt(0))),a.pipe(Ne(r=>{let u={matches:!1,breakpoints:{}};return r.forEach(({matches:h,query:g})=>{u.matches=u.matches||h,u.breakpoints[g]=h}),u}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let t=this._mediaMatcher.matchMedia(e),a={observable:new wt(r=>{let u=h=>this._zone.run(()=>r.next(h));return t.addListener(u),()=>{t.removeListener(u)}}).pipe(Me(t),Ne(({matches:r})=>({query:e,matches:r})),re(this._destroySubject)),mql:t};return this._queries.set(e,a),a}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function wm(i){return i.map(o=>o.split(",")).reduce((o,e)=>o.concat(e)).map(o=>o.trim())}var Rr={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};var vg=new w("MATERIAL_ANIMATIONS"),Dm=null;function Ol(){return d(vg,{optional:!0})?.animationsDisabled||d(Li,{optional:!0})==="NoopAnimations"?"di-disabled":(Dm??=d(uo).matchMedia("(prefers-reduced-motion)").matches,Dm?"reduced-motion":"enabled")}function _e(){return Ol()!=="enabled"}var bg=new w("cdk-dir-doc",{providedIn:"root",factory:()=>d(q)}),yg=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function Sm(i){let o=i?.toLowerCase()||"";return o==="auto"&&typeof navigator<"u"&&navigator?.language?yg.test(navigator.language)?"rtl":"ltr":o==="rtl"?"rtl":"ltr"}var qe=(()=>{class i{get value(){return this.valueSignal()}valueSignal=T("ltr");change=new K;constructor(){let e=d(bg,{optional:!0});if(e){let t=e.body?e.body.dir:null,n=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(Sm(t||n||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var te=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({})}return i})();function Cg(i,o){i&1&&pt(0,"div",2)}var xg=new w("MAT_PROGRESS_BAR_DEFAULT_OPTIONS");var Ti=(()=>{class i{_elementRef=d(N);_ngZone=d(U);_changeDetectorRef=d(ie);_renderer=d(Ce);_cleanupTransitionEnd;constructor(){let e=Ol(),t=d(xg,{optional:!0});this._isNoopAnimation=e==="di-disabled",e==="reduced-motion"&&this._elementRef.nativeElement.classList.add("mat-progress-bar-reduced-motion"),t&&(t.color&&(this.color=this._defaultColor=t.color),this.mode=t.mode||this.mode)}_isNoopAnimation;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;_defaultColor="primary";get value(){return this._value}set value(e){this._value=km(e||0),this._changeDetectorRef.markForCheck()}_value=0;get bufferValue(){return this._bufferValue||0}set bufferValue(e){this._bufferValue=km(e||0),this._changeDetectorRef.markForCheck()}_bufferValue=0;animationEnd=new K;get mode(){return this._mode}set mode(e){this._mode=e,this._changeDetectorRef.markForCheck()}_mode="determinate";ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._cleanupTransitionEnd=this._renderer.listen(this._elementRef.nativeElement,"transitionend",this._transitionendHandler)})}ngOnDestroy(){this._cleanupTransitionEnd?.()}_getPrimaryBarTransform(){return`scaleX(${this._isIndeterminate()?1:this.value/100})`}_getBufferBarFlexBasis(){return`${this.mode==="buffer"?this.bufferValue:100}%`}_isIndeterminate(){return this.mode==="indeterminate"||this.mode==="query"}_transitionendHandler=e=>{this.animationEnd.observers.length===0||!e.target||!e.target.classList.contains("mdc-linear-progress__primary-bar")||(this.mode==="determinate"||this.mode==="buffer")&&this._ngZone.run(()=>this.animationEnd.next({value:this.value}))};static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["mat-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100","tabindex","-1",1,"mat-mdc-progress-bar","mdc-linear-progress"],hostVars:10,hostBindings:function(t,n){t&2&&(Z("aria-valuenow",n._isIndeterminate()?null:n.value)("mode",n.mode),tt("mat-"+n.color),p("_mat-animation-noopable",n._isNoopAnimation)("mdc-linear-progress--animation-ready",!n._isNoopAnimation)("mdc-linear-progress--indeterminate",n._isIndeterminate()))},inputs:{color:"color",value:[2,"value","value",kt],bufferValue:[2,"bufferValue","bufferValue",kt],mode:"mode"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],decls:7,vars:5,consts:[["aria-hidden","true",1,"mdc-linear-progress__buffer"],[1,"mdc-linear-progress__buffer-bar"],[1,"mdc-linear-progress__buffer-dots"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__primary-bar"],[1,"mdc-linear-progress__bar-inner"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__secondary-bar"]],template:function(t,n){t&1&&(Re(0,"div",0),pt(1,"div",1),k(2,Cg,1,0,"div",2),Ue(),Re(3,"div",3),pt(4,"span",4),Ue(),Re(5,"div",5),pt(6,"span",4),Ue()),t&2&&(c(),Ve("flex-basis",n._getBufferBarFlexBasis()),c(),M(n.mode==="buffer"?2:-1),c(),Ve("transform",n._getPrimaryBarTransform()))},styles:[`.mat-mdc-progress-bar {
3
3
  --mat-progress-bar-animation-multiplier: 1;
4
4
  display: block;
5
5
  text-align: start;
@@ -253,7 +253,7 @@ import{$ as Ce,$a as nr,$b as Qs,A as Kt,Aa as io,Ab as Ve,Ac as yd,B as Yc,Ba a
253
253
  transform: translateX(-10px);
254
254
  }
255
255
  }
256
- `],encapsulation:2})}return i})();function Sm(i,o=0,e=100){return Math.max(o,Math.min(e,i))}var ki=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[ee]})}return i})();var Cg=["*"];var xg=new x("MAT_CARD_CONFIG"),tn=(()=>{class i{appearance;constructor(){let e=d(xg,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:8,hostBindings:function(t,n){t&2&&p("mat-mdc-card-outlined",n.appearance==="outlined")("mdc-card--outlined",n.appearance==="outlined")("mat-mdc-card-filled",n.appearance==="filled")("mdc-card--filled",n.appearance==="filled")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Cg,decls:1,vars:0,template:function(t,n){t&1&&(ce(),U(0))},styles:[`.mat-mdc-card {
256
+ `],encapsulation:2})}return i})();function km(i,o=0,e=100){return Math.max(o,Math.min(e,i))}var ti=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[te]})}return i})();var wg=["*"];var Dg=new w("MAT_CARD_CONFIG"),nn=(()=>{class i{appearance;constructor(){let e=d(Dg,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:8,hostBindings:function(t,n){t&2&&p("mat-mdc-card-outlined",n.appearance==="outlined")("mdc-card--outlined",n.appearance==="outlined")("mat-mdc-card-filled",n.appearance==="filled")("mdc-card--filled",n.appearance==="filled")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:wg,decls:1,vars:0,template:function(t,n){t&1&&(fe(),G(0))},styles:[`.mat-mdc-card {
257
257
  display: flex;
258
258
  flex-direction: column;
259
259
  box-sizing: border-box;
@@ -423,7 +423,7 @@ import{$ as Ce,$a as nr,$b as Qs,A as Kt,Aa as io,Ab as Ve,Ac as yd,B as Yc,Ba a
423
423
  .mat-mdc-card-actions-align-end {
424
424
  justify-content: flex-end;
425
425
  }
426
- `],encapsulation:2})}return i})();var nn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["mat-card-content"]],hostAttrs:[1,"mat-mdc-card-content"]})}return i})();var on=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[ee]})}return i})();function Ht(i,o=0){return km(i)?Number(i):arguments.length===2?o:0}function km(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}function Dt(i){return i instanceof N?i.nativeElement:i}function Ze(i){return i==null?"":typeof i=="string"?i:`${i}px`}function mt(i){return i!=null&&`${i}`!="false"}var fi=(function(i){return i[i.NORMAL=0]="NORMAL",i[i.NEGATED=1]="NEGATED",i[i.INVERTED=2]="INVERTED",i})(fi||{}),Pr,Pn;function Fr(){if(Pn==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Pn=!1,Pn;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)Pn=!0;else{let i=Element.prototype.scrollTo;i?Pn=!/\{\s*\[native code\]\s*\}/.test(i.toString()):Pn=!1}}return Pn}function uo(){if(typeof document!="object"||!document)return fi.NORMAL;if(Pr==null){let i=document.createElement("div"),o=i.style;i.dir="rtl",o.width="1px",o.overflow="auto",o.visibility="hidden",o.pointerEvents="none",o.position="absolute";let e=document.createElement("div"),t=e.style;t.width="2px",t.height="1px",i.appendChild(e),document.body.appendChild(i),Pr=fi.NORMAL,i.scrollLeft===0&&(i.scrollLeft=1,Pr=i.scrollLeft===0?fi.NEGATED:fi.INVERTED),i.remove()}return Pr}var Ol;function Mm(){if(Ol==null){let i=typeof document<"u"?document.head:null;Ol=!!(i&&(i.createShadowRoot||i.attachShadow))}return Ol}function Pl(i){if(Mm()){let o=i.getRootNode?i.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&o instanceof ShadowRoot)return o}return null}function an(){let i=typeof document<"u"&&document?document.activeElement:null;for(;i&&i.shadowRoot;){let o=i.shadowRoot.activeElement;if(o===i)break;i=o}return i}function rt(i){if(i.composedPath)try{return i.composedPath()[0]}catch(o){}return i.target}function Fl(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var sa;function Em(){if(sa==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>sa=!0}))}finally{sa=sa||!1}return sa}function ho(i){return Em()?i:!!i.capture}var po,Am=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function Nl(){if(po)return po;if(typeof document!="object"||!document)return po=new Set(Am),po;let i=document.createElement("input");return po=new Set(Am.filter(o=>(i.setAttribute("type",o),i.type===o))),po}var Nr=new WeakMap,Le=(()=>{class i{_appRef;_injector=d(X);_environmentInjector=d(mi);load(e){let t=this._appRef=this._appRef||this._injector.get(Qi),n=Nr.get(t);n||(n={loaders:new Set,refs:[]},Nr.set(t,n),t.onDestroy(()=>{Nr.get(t)?.refs.forEach(a=>a.destroy()),Nr.delete(t)})),n.loaders.has(e)||(n.loaders.add(e),n.refs.push(rr(e,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var wg=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(t,n){},styles:[`textarea.cdk-textarea-autosize {
426
+ `],encapsulation:2})}return i})();var on=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["mat-card-content"]],hostAttrs:[1,"mat-mdc-card-content"]})}return i})();var an=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[te]})}return i})();function $t(i,o=0){return Mm(i)?Number(i):arguments.length===2?o:0}function Mm(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}function Mt(i){return i instanceof N?i.nativeElement:i}function Je(i){return i==null?"":typeof i=="string"?i:`${i}px`}function mt(i){return i!=null&&`${i}`!="false"}var gi=(function(i){return i[i.NORMAL=0]="NORMAL",i[i.NEGATED=1]="NEGATED",i[i.INVERTED=2]="INVERTED",i})(gi||{}),Pr,Fn;function Fr(){if(Fn==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Fn=!1,Fn;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)Fn=!0;else{let i=Element.prototype.scrollTo;i?Fn=!/\{\s*\[native code\]\s*\}/.test(i.toString()):Fn=!1}}return Fn}function ho(){if(typeof document!="object"||!document)return gi.NORMAL;if(Pr==null){let i=document.createElement("div"),o=i.style;i.dir="rtl",o.width="1px",o.overflow="auto",o.visibility="hidden",o.pointerEvents="none",o.position="absolute";let e=document.createElement("div"),t=e.style;t.width="2px",t.height="1px",i.appendChild(e),document.body.appendChild(i),Pr=gi.NORMAL,i.scrollLeft===0&&(i.scrollLeft=1,Pr=i.scrollLeft===0?gi.NEGATED:gi.INVERTED),i.remove()}return Pr}var Pl;function Em(){if(Pl==null){let i=typeof document<"u"?document.head:null;Pl=!!(i&&(i.createShadowRoot||i.attachShadow))}return Pl}function Fl(i){if(Em()){let o=i.getRootNode?i.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&o instanceof ShadowRoot)return o}return null}function rn(){let i=typeof document<"u"&&document?document.activeElement:null;for(;i&&i.shadowRoot;){let o=i.shadowRoot.activeElement;if(o===i)break;i=o}return i}function rt(i){if(i.composedPath)try{return i.composedPath()[0]}catch(o){}return i.target}function Nl(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var la;function Am(){if(la==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>la=!0}))}finally{la=la||!1}return la}function po(i){return Am()?i:!!i.capture}var fo,Tm=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function Ll(){if(fo)return fo;if(typeof document!="object"||!document)return fo=new Set(Tm),fo;let i=document.createElement("input");return fo=new Set(Tm.filter(o=>(i.setAttribute("type",o),i.type===o))),fo}var Nr=new WeakMap,Be=(()=>{class i{_appRef;_injector=d(X);_environmentInjector=d(ui);load(e){let t=this._appRef=this._appRef||this._injector.get(en),n=Nr.get(t);n||(n={loaders:new Set,refs:[]},Nr.set(t,n),t.onDestroy(()=>{Nr.get(t)?.refs.forEach(a=>a.destroy()),Nr.delete(t)})),n.loaders.has(e)||(n.loaders.add(e),n.refs.push(sr(e,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Sg=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(t,n){},styles:[`textarea.cdk-textarea-autosize {
427
427
  resize: none;
428
428
  }
429
429
 
@@ -449,7 +449,7 @@ textarea.cdk-textarea-autosize-measuring-firefox {
449
449
  .cdk-text-field-autofill-monitored:not(:-webkit-autofill) {
450
450
  animation: cdk-text-field-autofill-end 0s 1ms;
451
451
  }
452
- `],encapsulation:2})}return i})(),Dg={passive:!0},Tm=(()=>{class i{_platform=d(le);_ngZone=d(H);_renderer=d(ot).createRenderer(null,null);_styleLoader=d(Le);_monitoredElements=new Map;monitor(e){if(!this._platform.isBrowser)return Ka;this._styleLoader.load(wg);let t=Dt(e),n=this._monitoredElements.get(t);if(n)return n.subject;let a=new R,r="cdk-text-field-autofilled",u=g=>{g.animationName==="cdk-text-field-autofill-start"&&!t.classList.contains(r)?(t.classList.add(r),this._ngZone.run(()=>a.next({target:g.target,isAutofilled:!0}))):g.animationName==="cdk-text-field-autofill-end"&&t.classList.contains(r)&&(t.classList.remove(r),this._ngZone.run(()=>a.next({target:g.target,isAutofilled:!1})))},h=this._ngZone.runOutsideAngular(()=>(t.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(t,"animationstart",u,Dg)));return this._monitoredElements.set(t,{subject:a,unlisten:h}),a}stopMonitoring(e){let t=Dt(e),n=this._monitoredElements.get(t);n&&(n.unlisten(),n.subject.complete(),t.classList.remove("cdk-text-field-autofill-monitored"),t.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(t))}ngOnDestroy(){this._monitoredElements.forEach((e,t)=>this.stopMonitoring(t))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Im=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({})}return i})();function Fn(i){return i.buttons===0||i.detail===0}function Nn(i){let o=i.touches&&i.touches[0]||i.changedTouches&&i.changedTouches[0];return!!o&&o.identifier===-1&&(o.radiusX==null||o.radiusX===1)&&(o.radiusY==null||o.radiusY===1)}var Rm=new x("cdk-input-modality-detector-options"),Om={ignoreKeys:[18,17,224,91,16]},Pm=650,Ll={passive:!0,capture:!0},Fm=(()=>{class i{_platform=d(le);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new Qn(null);_options;_lastTouchMs=0;_onKeydown=e=>{this._options?.ignoreKeys?.some(t=>t===e.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=rt(e))};_onMousedown=e=>{Date.now()-this._lastTouchMs<Pm||(this._modality.next(Fn(e)?"keyboard":"mouse"),this._mostRecentTarget=rt(e))};_onTouchstart=e=>{if(Nn(e)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=rt(e)};constructor(){let e=d(H),t=d(q),n=d(Rm,{optional:!0});if(this._options=V(V({},Om),n),this.modalityDetected=this._modality.pipe(Ja(1)),this.modalityChanged=this.modalityDetected.pipe(xi()),this._platform.isBrowser){let a=d(ot).createRenderer(null,null);this._listenerCleanups=e.runOutsideAngular(()=>[a.listen(t,"keydown",this._onKeydown,Ll),a.listen(t,"mousedown",this._onMousedown,Ll),a.listen(t,"touchstart",this._onTouchstart,Ll)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(e=>e())}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),la=(function(i){return i[i.IMMEDIATE=0]="IMMEDIATE",i[i.EVENTUAL=1]="EVENTUAL",i})(la||{}),Nm=new x("cdk-focus-monitor-default-options"),Lr=ho({passive:!0,capture:!0}),Rt=(()=>{class i{_ngZone=d(H);_platform=d(le);_inputModalityDetector=d(Fm);_origin=null;_lastFocusOrigin=null;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=d(q);_stopInputModalityDetector=new R;constructor(){let e=d(Nm,{optional:!0});this._detectionMode=e?.detectionMode||la.IMMEDIATE}_rootNodeFocusAndBlurListener=e=>{let t=rt(e);for(let n=t;n;n=n.parentElement)e.type==="focus"?this._onFocus(e,n):this._onBlur(e,n)};monitor(e,t=!1){let n=Dt(e);if(!this._platform.isBrowser||n.nodeType!==1)return ge();let a=Pl(n)||this._document,r=this._elementInfo.get(n);if(r)return t&&(r.checkChildren=!0),r.subject;let u={checkChildren:t,subject:new R,rootNode:a};return this._elementInfo.set(n,u),this._registerGlobalListeners(u),u.subject}stopMonitoring(e){let t=Dt(e),n=this._elementInfo.get(t);n&&(n.subject.complete(),this._setClasses(t),this._elementInfo.delete(t),this._removeGlobalListeners(n))}focusVia(e,t,n){let a=Dt(e),r=this._document.activeElement;a===r?this._getClosestElementsInfo(a).forEach(([u,h])=>this._originChanged(u,t,h)):(this._setOrigin(t),typeof a.focus=="function"&&a.focus(n))}ngOnDestroy(){this._elementInfo.forEach((e,t)=>this.stopMonitoring(t))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return this._detectionMode===la.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,t){e.classList.toggle("cdk-focused",!!t),e.classList.toggle("cdk-touch-focused",t==="touch"),e.classList.toggle("cdk-keyboard-focused",t==="keyboard"),e.classList.toggle("cdk-mouse-focused",t==="mouse"),e.classList.toggle("cdk-program-focused",t==="program")}_setOrigin(e,t=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&t,this._detectionMode===la.IMMEDIATE){clearTimeout(this._originTimeoutId);let n=this._originFromTouchInteraction?Pm:1;this._originTimeoutId=setTimeout(()=>this._origin=null,n)}})}_onFocus(e,t){let n=this._elementInfo.get(t),a=rt(e);!n||!n.checkChildren&&t!==a||this._originChanged(t,this._getFocusOrigin(a),n)}_onBlur(e,t){let n=this._elementInfo.get(t);!n||n.checkChildren&&e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||(this._setClasses(t),this._emitOrigin(n,null))}_emitOrigin(e,t){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(t))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let t=e.rootNode,n=this._rootNodeFocusListenerCount.get(t)||0;n||this._ngZone.runOutsideAngular(()=>{t.addEventListener("focus",this._rootNodeFocusAndBlurListener,Lr),t.addEventListener("blur",this._rootNodeFocusAndBlurListener,Lr)}),this._rootNodeFocusListenerCount.set(t,n+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(ae(this._stopInputModalityDetector)).subscribe(a=>{this._setOrigin(a,!0)}))}_removeGlobalListeners(e){let t=e.rootNode;if(this._rootNodeFocusListenerCount.has(t)){let n=this._rootNodeFocusListenerCount.get(t);n>1?this._rootNodeFocusListenerCount.set(t,n-1):(t.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Lr),t.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Lr),this._rootNodeFocusListenerCount.delete(t))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,t,n){this._setClasses(e,t),this._emitOrigin(n,t),this._lastFocusOrigin=t}_getClosestElementsInfo(e){let t=[];return this._elementInfo.forEach((n,a)=>{(a===e||n.checkChildren&&a.contains(e))&&t.push([a,n])}),t}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:t,mostRecentModality:n}=this._inputModalityDetector;if(n!=="mouse"||!t||t===e||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"||e.disabled)return!1;let a=e.labels;if(a){for(let r=0;r<a.length;r++)if(a[r].contains(t))return!0}return!1}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var rn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(t,n){},styles:[`.cdk-visually-hidden {
452
+ `],encapsulation:2})}return i})(),kg={passive:!0},Im=(()=>{class i{_platform=d(ce);_ngZone=d(U);_renderer=d(ot).createRenderer(null,null);_styleLoader=d(Be);_monitoredElements=new Map;monitor(e){if(!this._platform.isBrowser)return Ya;this._styleLoader.load(Sg);let t=Mt(e),n=this._monitoredElements.get(t);if(n)return n.subject;let a=new R,r="cdk-text-field-autofilled",u=g=>{g.animationName==="cdk-text-field-autofill-start"&&!t.classList.contains(r)?(t.classList.add(r),this._ngZone.run(()=>a.next({target:g.target,isAutofilled:!0}))):g.animationName==="cdk-text-field-autofill-end"&&t.classList.contains(r)&&(t.classList.remove(r),this._ngZone.run(()=>a.next({target:g.target,isAutofilled:!1})))},h=this._ngZone.runOutsideAngular(()=>(t.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(t,"animationstart",u,kg)));return this._monitoredElements.set(t,{subject:a,unlisten:h}),a}stopMonitoring(e){let t=Mt(e),n=this._monitoredElements.get(t);n&&(n.unlisten(),n.subject.complete(),t.classList.remove("cdk-text-field-autofill-monitored"),t.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(t))}ngOnDestroy(){this._monitoredElements.forEach((e,t)=>this.stopMonitoring(t))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Rm=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({})}return i})();function Nn(i){return i.buttons===0||i.detail===0}function Ln(i){let o=i.touches&&i.touches[0]||i.changedTouches&&i.changedTouches[0];return!!o&&o.identifier===-1&&(o.radiusX==null||o.radiusX===1)&&(o.radiusY==null||o.radiusY===1)}var Om=new w("cdk-input-modality-detector-options"),Pm={ignoreKeys:[18,17,224,91,16]},Fm=650,Vl={passive:!0,capture:!0},Nm=(()=>{class i{_platform=d(ce);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new Jn(null);_options;_lastTouchMs=0;_onKeydown=e=>{this._options?.ignoreKeys?.some(t=>t===e.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=rt(e))};_onMousedown=e=>{Date.now()-this._lastTouchMs<Fm||(this._modality.next(Nn(e)?"keyboard":"mouse"),this._mostRecentTarget=rt(e))};_onTouchstart=e=>{if(Ln(e)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=rt(e)};constructor(){let e=d(U),t=d(q),n=d(Om,{optional:!0});if(this._options=V(V({},Pm),n),this.modalityDetected=this._modality.pipe(er(1)),this.modalityChanged=this.modalityDetected.pipe(Si()),this._platform.isBrowser){let a=d(ot).createRenderer(null,null);this._listenerCleanups=e.runOutsideAngular(()=>[a.listen(t,"keydown",this._onKeydown,Vl),a.listen(t,"mousedown",this._onMousedown,Vl),a.listen(t,"touchstart",this._onTouchstart,Vl)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(e=>e())}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),ca=(function(i){return i[i.IMMEDIATE=0]="IMMEDIATE",i[i.EVENTUAL=1]="EVENTUAL",i})(ca||{}),Lm=new w("cdk-focus-monitor-default-options"),Lr=po({passive:!0,capture:!0}),Nt=(()=>{class i{_ngZone=d(U);_platform=d(ce);_inputModalityDetector=d(Nm);_origin=null;_lastFocusOrigin=null;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=d(q);_stopInputModalityDetector=new R;constructor(){let e=d(Lm,{optional:!0});this._detectionMode=e?.detectionMode||ca.IMMEDIATE}_rootNodeFocusAndBlurListener=e=>{let t=rt(e);for(let n=t;n;n=n.parentElement)e.type==="focus"?this._onFocus(e,n):this._onBlur(e,n)};monitor(e,t=!1){let n=Mt(e);if(!this._platform.isBrowser||n.nodeType!==1)return be();let a=Fl(n)||this._document,r=this._elementInfo.get(n);if(r)return t&&(r.checkChildren=!0),r.subject;let u={checkChildren:t,subject:new R,rootNode:a};return this._elementInfo.set(n,u),this._registerGlobalListeners(u),u.subject}stopMonitoring(e){let t=Mt(e),n=this._elementInfo.get(t);n&&(n.subject.complete(),this._setClasses(t),this._elementInfo.delete(t),this._removeGlobalListeners(n))}focusVia(e,t,n){let a=Mt(e),r=this._document.activeElement;a===r?this._getClosestElementsInfo(a).forEach(([u,h])=>this._originChanged(u,t,h)):(this._setOrigin(t),typeof a.focus=="function"&&a.focus(n))}ngOnDestroy(){this._elementInfo.forEach((e,t)=>this.stopMonitoring(t))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return this._detectionMode===ca.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,t){e.classList.toggle("cdk-focused",!!t),e.classList.toggle("cdk-touch-focused",t==="touch"),e.classList.toggle("cdk-keyboard-focused",t==="keyboard"),e.classList.toggle("cdk-mouse-focused",t==="mouse"),e.classList.toggle("cdk-program-focused",t==="program")}_setOrigin(e,t=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&t,this._detectionMode===ca.IMMEDIATE){clearTimeout(this._originTimeoutId);let n=this._originFromTouchInteraction?Fm:1;this._originTimeoutId=setTimeout(()=>this._origin=null,n)}})}_onFocus(e,t){let n=this._elementInfo.get(t),a=rt(e);!n||!n.checkChildren&&t!==a||this._originChanged(t,this._getFocusOrigin(a),n)}_onBlur(e,t){let n=this._elementInfo.get(t);!n||n.checkChildren&&e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||(this._setClasses(t),this._emitOrigin(n,null))}_emitOrigin(e,t){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(t))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let t=e.rootNode,n=this._rootNodeFocusListenerCount.get(t)||0;n||this._ngZone.runOutsideAngular(()=>{t.addEventListener("focus",this._rootNodeFocusAndBlurListener,Lr),t.addEventListener("blur",this._rootNodeFocusAndBlurListener,Lr)}),this._rootNodeFocusListenerCount.set(t,n+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(re(this._stopInputModalityDetector)).subscribe(a=>{this._setOrigin(a,!0)}))}_removeGlobalListeners(e){let t=e.rootNode;if(this._rootNodeFocusListenerCount.has(t)){let n=this._rootNodeFocusListenerCount.get(t);n>1?this._rootNodeFocusListenerCount.set(t,n-1):(t.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Lr),t.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Lr),this._rootNodeFocusListenerCount.delete(t))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,t,n){this._setClasses(e,t),this._emitOrigin(n,t),this._lastFocusOrigin=t}_getClosestElementsInfo(e){let t=[];return this._elementInfo.forEach((n,a)=>{(a===e||n.checkChildren&&a.contains(e))&&t.push([a,n])}),t}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:t,mostRecentModality:n}=this._inputModalityDetector;if(n!=="mouse"||!t||t===e||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"||e.disabled)return!1;let a=e.labels;if(a){for(let r=0;r<a.length;r++)if(a[r].contains(t))return!0}return!1}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var sn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(t,n){},styles:[`.cdk-visually-hidden {
453
453
  border: 0;
454
454
  clip: rect(0 0 0 0);
455
455
  height: 1px;
@@ -468,7 +468,7 @@ textarea.cdk-textarea-autosize-measuring-firefox {
468
468
  left: auto;
469
469
  right: 0;
470
470
  }
471
- `],encapsulation:2})}return i})(),Vr;function Sg(){if(Vr===void 0&&(Vr=null,typeof window<"u")){let i=window;i.trustedTypes!==void 0&&(Vr=i.trustedTypes.createPolicy("angular#components",{createHTML:o=>o}))}return Vr}function Ln(i){return Sg()?.createHTML(i)||i}function Lm(i,o,e){let t=e.sanitize(Ct.HTML,o);i.innerHTML=Ln(t||"")}function kg(i){if(i.type==="characterData"&&i.target instanceof Comment)return!0;if(i.type==="childList"){for(let o=0;o<i.addedNodes.length;o++)if(!(i.addedNodes[o]instanceof Comment))return!1;for(let o=0;o<i.removedNodes.length;o++)if(!(i.removedNodes[o]instanceof Comment))return!1;return!0}return!1}var Vm=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Bm=(()=>{class i{_mutationObserverFactory=d(Vm);_observedElements=new Map;_ngZone=d(H);ngOnDestroy(){this._observedElements.forEach((e,t)=>this._cleanupObserver(t))}observe(e){let t=Dt(e);return new yt(n=>{let r=this._observeElement(t).pipe(Pe(u=>u.filter(h=>!kg(h))),we(u=>!!u.length)).subscribe(u=>{this._ngZone.run(()=>{n.next(u)})});return()=>{r.unsubscribe(),this._unobserveElement(t)}})}_observeElement(e){return this._ngZone.runOutsideAngular(()=>{if(this._observedElements.has(e))this._observedElements.get(e).count++;else{let t=new R,n=this._mutationObserverFactory.create(a=>t.next(a));n&&n.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:n,stream:t,count:1})}return this._observedElements.get(e).stream})}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){let{observer:t,stream:n}=this._observedElements.get(e);t&&t.disconnect(),n.complete(),this._observedElements.delete(e)}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),zm=(()=>{class i{_contentObserver=d(Bm);_elementRef=d(N);event=new K;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._disabled?this._unsubscribe():this._subscribe()}_disabled=!1;get debounce(){return this._debounce}set debounce(e){this._debounce=Ht(e),this._subscribe()}_debounce;_currentSubscription=null;ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();let e=this._contentObserver.observe(this._elementRef);this._currentSubscription=(this.debounce?e.pipe(Vt(this.debounce)):e).subscribe(this.event)}_unsubscribe(){this._currentSubscription?.unsubscribe()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[2,"cdkObserveContentDisabled","disabled",L],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]})}return i})(),fo=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({providers:[Vm]})}return i})();var zl=(()=>{class i{_platform=d(le);isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return Eg(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let t=Mg(Ng(e));if(t&&(jm(t)===-1||!this.isVisible(t)))return!1;let n=e.nodeName.toLowerCase(),a=jm(e);return e.hasAttribute("contenteditable")?a!==-1:n==="iframe"||n==="object"||this._platform.WEBKIT&&this._platform.IOS&&!Pg(e)?!1:n==="audio"?e.hasAttribute("controls")?a!==-1:!1:n==="video"?a===-1?!1:a!==null?!0:this._platform.FIREFOX||e.hasAttribute("controls"):e.tabIndex>=0}isFocusable(e,t){return Fg(e)&&!this.isDisabled(e)&&(t?.ignoreVisibility||this.isVisible(e))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function Mg(i){try{return i.frameElement}catch(o){return null}}function Eg(i){return!!(i.offsetWidth||i.offsetHeight||typeof i.getClientRects=="function"&&i.getClientRects().length)}function Ag(i){let o=i.nodeName.toLowerCase();return o==="input"||o==="select"||o==="button"||o==="textarea"}function Tg(i){return Rg(i)&&i.type=="hidden"}function Ig(i){return Og(i)&&i.hasAttribute("href")}function Rg(i){return i.nodeName.toLowerCase()=="input"}function Og(i){return i.nodeName.toLowerCase()=="a"}function Gm(i){if(!i.hasAttribute("tabindex")||i.tabIndex===void 0)return!1;let o=i.getAttribute("tabindex");return!!(o&&!isNaN(parseInt(o,10)))}function jm(i){if(!Gm(i))return null;let o=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(o)?-1:o}function Pg(i){let o=i.nodeName.toLowerCase(),e=o==="input"&&i.type;return e==="text"||e==="password"||o==="select"||o==="textarea"}function Fg(i){return Tg(i)?!1:Ag(i)||Ig(i)||i.hasAttribute("contenteditable")||Gm(i)}function Ng(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}var Bl=class{_element;_checker;_ngZone;_document;_injector;_startAnchor=null;_endAnchor=null;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(o){this._enabled=o,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(o,this._startAnchor),this._toggleAnchorTabIndex(o,this._endAnchor))}_enabled=!0;constructor(o,e,t,n,a=!1,r){this._element=o,this._checker=e,this._ngZone=t,this._document=n,this._injector=r,a||this.attachAnchors()}destroy(){let o=this._startAnchor,e=this._endAnchor;o&&(o.removeEventListener("focus",this.startAnchorListener),o.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(o){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(o)))})}focusFirstTabbableElementWhenReady(o){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(o)))})}focusLastTabbableElementWhenReady(o){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(o)))})}_getRegionBoundary(o){let e=this._element.querySelectorAll(`[cdk-focus-region-${o}], [cdkFocusRegion${o}], [cdk-focus-${o}]`);return o=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(o){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let t=this._getFirstTabbableElement(e);return t?.focus(o),!!t}return e.focus(o),!0}return this.focusFirstTabbableElement(o)}focusFirstTabbableElement(o){let e=this._getRegionBoundary("start");return e&&e.focus(o),!!e}focusLastTabbableElement(o){let e=this._getRegionBoundary("end");return e&&e.focus(o),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(o){if(this._checker.isFocusable(o)&&this._checker.isTabbable(o))return o;let e=o.children;for(let t=0;t<e.length;t++){let n=e[t].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[t]):null;if(n)return n}return null}_getLastTabbableElement(o){if(this._checker.isFocusable(o)&&this._checker.isTabbable(o))return o;let e=o.children;for(let t=e.length-1;t>=0;t--){let n=e[t].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[t]):null;if(n)return n}return null}_createAnchor(){let o=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,o),o.classList.add("cdk-visually-hidden"),o.classList.add("cdk-focus-trap-anchor"),o.setAttribute("aria-hidden","true"),o}_toggleAnchorTabIndex(o,e){o?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(o){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(o,this._startAnchor),this._toggleAnchorTabIndex(o,this._endAnchor))}_executeOnStable(o){je(o,{injector:this._injector})}},jl=(()=>{class i{_checker=d(zl);_ngZone=d(H);_document=d(q);_injector=d(X);constructor(){d(Le).load(rn)}create(e,t=!1){return new Bl(e,this._checker,this._ngZone,this._document,t,this._injector)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var $m=new x("liveAnnouncerElement",{providedIn:"root",factory:()=>null}),Wm=new x("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),Lg=0,ca=(()=>{class i{_ngZone=d(H);_defaultOptions=d(Wm,{optional:!0});_liveElement;_document=d(q);_sanitizer=d(ra);_previousTimeout;_currentPromise;_currentResolve;constructor(){let e=d($m,{optional:!0});this._liveElement=e||this._createLiveElement()}announce(e,...t){let n=this._defaultOptions,a,r;return t.length===1&&typeof t[0]=="number"?r=t[0]:[a,r]=t,this.clear(),clearTimeout(this._previousTimeout),a||(a=n&&n.politeness?n.politeness:"polite"),r==null&&n&&(r=n.duration),this._liveElement.setAttribute("aria-live",a),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(u=>this._currentResolve=u)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{!e||typeof e=="string"?this._liveElement.textContent=e:Lm(this._liveElement,e,this._sanitizer),typeof r=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),r)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let e="cdk-live-announcer-element",t=this._document.getElementsByClassName(e),n=this._document.createElement("div");for(let a=0;a<t.length;a++)t[a].remove();return n.classList.add(e),n.classList.add("cdk-visually-hidden"),n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live","polite"),n.id=`cdk-live-announcer-${Lg++}`,this._document.body.appendChild(n),n}_exposeAnnouncerToModals(e){let t=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let n=0;n<t.length;n++){let a=t[n],r=a.getAttribute("aria-owns");r?r.indexOf(e)===-1&&a.setAttribute("aria-owns",r+" "+e):a.setAttribute("aria-owns",e)}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var sn=(function(i){return i[i.NONE=0]="NONE",i[i.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",i[i.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",i})(sn||{}),Hm="cdk-high-contrast-black-on-white",Um="cdk-high-contrast-white-on-black",Vl="cdk-high-contrast-active",qm=(()=>{class i{_platform=d(le);_hasCheckedHighContrastMode=!1;_document=d(q);_breakpointSubscription;constructor(){this._breakpointSubscription=d(On).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return sn.NONE;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let t=this._document.defaultView||window,n=t&&t.getComputedStyle?t.getComputedStyle(e):null,a=(n&&n.backgroundColor||"").replace(/ /g,"");switch(e.remove(),a){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return sn.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return sn.BLACK_ON_WHITE}return sn.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(Vl,Hm,Um),this._hasCheckedHighContrastMode=!0;let t=this.getHighContrastMode();t===sn.BLACK_ON_WHITE?e.add(Vl,Hm):t===sn.WHITE_ON_BLACK&&e.add(Vl,Um)}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),da=(()=>{class i{constructor(){d(qm)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[fo]})}return i})();var Vg=200,Br=class{_letterKeyStream=new R;_items=[];_selectedItemIndex=-1;_pressedLetters=[];_skipPredicateFn;_selectedItem=new R;selectedItem=this._selectedItem;constructor(o,e){let t=typeof e?.debounceInterval=="number"?e.debounceInterval:Vg;e?.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),this.setItems(o),this._setupKeyHandler(t)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(o){this._selectedItemIndex=o}setItems(o){this._items=o}handleKey(o){let e=o.keyCode;o.key&&o.key.length===1?this._letterKeyStream.next(o.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(o){this._letterKeyStream.pipe(di(e=>this._pressedLetters.push(e)),Vt(o),we(()=>this._pressedLetters.length>0),Pe(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(e=>{for(let t=1;t<this._items.length+1;t++){let n=(this._selectedItemIndex+t)%this._items.length,a=this._items[n];if(!this._skipPredicateFn?.(a)&&a.getLabel?.().toLocaleUpperCase().trim().indexOf(e)===0){this._selectedItem.next(a);break}}this._pressedLetters=[]})}};function Ge(i,...o){return o.length?o.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}var go=class{_items;_activeItemIndex=I(-1);_activeItem=I(null);_wrap=!1;_typeaheadSubscription=De.EMPTY;_itemChangesSubscription;_vertical=!0;_horizontal=null;_allowedModifierKeys=[];_homeAndEnd=!1;_pageUpAndDown={enabled:!1,delta:10};_effectRef;_typeahead;_skipPredicateFn=o=>o.disabled;constructor(o,e){this._items=o,o instanceof Zi?this._itemChangesSubscription=o.changes.subscribe(t=>this._itemsChanged(t.toArray())):Xi(o)&&(this._effectRef=zt(()=>this._itemsChanged(o()),{injector:e}))}tabOut=new R;change=new R;skipPredicate(o){return this._skipPredicateFn=o,this}withWrap(o=!0){return this._wrap=o,this}withVerticalOrientation(o=!0){return this._vertical=o,this}withHorizontalOrientation(o){return this._horizontal=o,this}withAllowedModifierKeys(o){return this._allowedModifierKeys=o,this}withTypeAhead(o=200){this._typeaheadSubscription.unsubscribe();let e=this._getItemsArray();return this._typeahead=new Br(e,{debounceInterval:typeof o=="number"?o:void 0,skipPredicate:t=>this._skipPredicateFn(t)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(t=>{this.setActiveItem(t)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(o=!0){return this._homeAndEnd=o,this}withPageUpDown(o=!0,e=10){return this._pageUpAndDown={enabled:o,delta:e},this}setActiveItem(o){let e=this._activeItem();this.updateActiveItem(o),this._activeItem()!==e&&this.change.next(this._activeItemIndex())}onKeydown(o){let e=o.keyCode,n=["altKey","ctrlKey","metaKey","shiftKey"].every(a=>!o[a]||this._allowedModifierKeys.indexOf(a)>-1);switch(e){case 9:this.tabOut.next();return;case 40:if(this._vertical&&n){this.setNextItemActive();break}else return;case 38:if(this._vertical&&n){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&n){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&n){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&n){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&n){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&n){let a=this._activeItemIndex()-this._pageUpAndDown.delta;this._setActiveItemByIndex(a>0?a:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&n){let a=this._activeItemIndex()+this._pageUpAndDown.delta,r=this._getItemsArray().length;this._setActiveItemByIndex(a<r?a:r-1,-1);break}else return;default:(n||Ge(o,"shiftKey"))&&this._typeahead?.handleKey(o);return}this._typeahead?.reset(),o.preventDefault()}get activeItemIndex(){return this._activeItemIndex()}get activeItem(){return this._activeItem()}isTyping(){return!!this._typeahead&&this._typeahead.isTyping()}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._getItemsArray().length-1,-1)}setNextItemActive(){this._activeItemIndex()<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex()<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(o){let e=this._getItemsArray(),t=typeof o=="number"?o:e.indexOf(o),n=e[t];this._activeItem.set(n??null),this._activeItemIndex.set(t),this._typeahead?.setCurrentSelectedItemIndex(t)}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._effectRef?.destroy(),this._typeahead?.destroy(),this.tabOut.complete(),this.change.complete()}_setActiveItemByDelta(o){this._wrap?this._setActiveInWrapMode(o):this._setActiveInDefaultMode(o)}_setActiveInWrapMode(o){let e=this._getItemsArray();for(let t=1;t<=e.length;t++){let n=(this._activeItemIndex()+o*t+e.length)%e.length,a=e[n];if(!this._skipPredicateFn(a)){this.setActiveItem(n);return}}}_setActiveInDefaultMode(o){this._setActiveItemByIndex(this._activeItemIndex()+o,o)}_setActiveItemByIndex(o,e){let t=this._getItemsArray();if(t[o]){for(;this._skipPredicateFn(t[o]);)if(o+=e,!t[o])return;this.setActiveItem(o)}}_getItemsArray(){return Xi(this._items)?this._items():this._items instanceof Zi?this._items.toArray():this._items}_itemsChanged(o){this._typeahead?.setItems(o);let e=this._activeItem();if(e){let t=o.indexOf(e);t>-1&&t!==this._activeItemIndex()&&(this._activeItemIndex.set(t),this._typeahead?.setCurrentSelectedItemIndex(t))}}};var Bn=class extends go{setActiveItem(o){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(o),this.activeItem&&this.activeItem.setActiveStyles()}};var cn=class extends go{_origin="program";setFocusOrigin(o){return this._origin=o,this}setActiveItem(o){super.setActiveItem(o),this.activeItem&&this.activeItem.focus(this._origin)}};var Xm=new Map,be=class i{_appId=d(En);static _infix=`a${Math.floor(Math.random()*1e5).toString()}`;getId(o,e=!1){this._appId!=="ng"&&(o+=this._appId);let t=Xm.get(o);return t===void 0?t=0:t++,Xm.set(o,t),`${o}${e?i._infix+"-":""}${t}`}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})};var Qm=" ";function Bg(i,o,e){let t=jr(i,o);e=e.trim(),!t.some(n=>n.trim()===e)&&(t.push(e),i.setAttribute(o,t.join(Qm)))}function zg(i,o,e){let t=jr(i,o);e=e.trim();let n=t.filter(a=>a!==e);n.length?i.setAttribute(o,n.join(Qm)):i.removeAttribute(o)}function jr(i,o){return i.getAttribute(o)?.match(/\S+/g)??[]}var Jm="cdk-describedby-message",zr="cdk-describedby-host",Ul=0,eu=(()=>{class i{_platform=d(le);_document=d(q);_messageRegistry=new Map;_messagesContainer=null;_id=`${Ul++}`;constructor(){d(Le).load(rn),this._id=d(En)+"-"+Ul++}describe(e,t,n){if(!this._canBeDescribed(e,t))return;let a=Hl(t,n);typeof t!="string"?(Zm(t,this._id),this._messageRegistry.set(a,{messageElement:t,referenceCount:0})):this._messageRegistry.has(a)||this._createMessageElement(t,n),this._isElementDescribedByMessage(e,a)||this._addMessageReference(e,a)}removeDescription(e,t,n){if(!t||!this._isElementNode(e))return;let a=Hl(t,n);if(this._isElementDescribedByMessage(e,a)&&this._removeMessageReference(e,a),typeof t=="string"){let r=this._messageRegistry.get(a);r&&r.referenceCount===0&&this._deleteMessageElement(a)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let e=this._document.querySelectorAll(`[${zr}="${this._id}"]`);for(let t=0;t<e.length;t++)this._removeCdkDescribedByReferenceIds(e[t]),e[t].removeAttribute(zr);this._messagesContainer?.remove(),this._messagesContainer=null,this._messageRegistry.clear()}_createMessageElement(e,t){let n=this._document.createElement("div");Zm(n,this._id),n.textContent=e,t&&n.setAttribute("role",t),this._createMessagesContainer(),this._messagesContainer.appendChild(n),this._messageRegistry.set(Hl(e,t),{messageElement:n,referenceCount:0})}_deleteMessageElement(e){this._messageRegistry.get(e)?.messageElement?.remove(),this._messageRegistry.delete(e)}_createMessagesContainer(){if(this._messagesContainer)return;let e="cdk-describedby-message-container",t=this._document.querySelectorAll(`.${e}[platform="server"]`);for(let a=0;a<t.length;a++)t[a].remove();let n=this._document.createElement("div");n.style.visibility="hidden",n.classList.add(e),n.classList.add("cdk-visually-hidden"),this._platform.isBrowser||n.setAttribute("platform","server"),this._document.body.appendChild(n),this._messagesContainer=n}_removeCdkDescribedByReferenceIds(e){let t=jr(e,"aria-describedby").filter(n=>n.indexOf(Jm)!=0);e.setAttribute("aria-describedby",t.join(" "))}_addMessageReference(e,t){let n=this._messageRegistry.get(t);Bg(e,"aria-describedby",n.messageElement.id),e.setAttribute(zr,this._id),n.referenceCount++}_removeMessageReference(e,t){let n=this._messageRegistry.get(t);n.referenceCount--,zg(e,"aria-describedby",n.messageElement.id),e.removeAttribute(zr)}_isElementDescribedByMessage(e,t){let n=jr(e,"aria-describedby"),a=this._messageRegistry.get(t),r=a&&a.messageElement.id;return!!r&&n.indexOf(r)!=-1}_canBeDescribed(e,t){if(!this._isElementNode(e))return!1;if(t&&typeof t=="object")return!0;let n=t==null?"":`${t}`.trim(),a=e.getAttribute("aria-label");return n?!a||a.trim()!==n:!1}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function Hl(i,o){return typeof i=="string"?`${o||""}/${i}`:i}function Zm(i,o){i.id||(i.id=`${Jm}-${o}-${Ul++}`)}var cu=(()=>{class i{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,t){this._renderer=e,this._elementRef=t}setProperty(e,t){this._renderer.setProperty(this._elementRef.nativeElement,e,t)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(t){return new(t||i)(de(ve),de(N))};static \u0275dir=S({type:i})}return i})(),du=(()=>{class i extends cu{static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,features:[Q]})}return i})(),Mi=new x("");var jg={provide:Mi,useExisting:nt(()=>Ei),multi:!0};function Hg(){let i=Xt()?Xt().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var Ug=new x(""),Ei=(()=>{class i extends cu{_compositionMode;_composing=!1;constructor(e,t,n){super(e,t),this._compositionMode=n,this._compositionMode==null&&(this._compositionMode=!Hg())}writeValue(e){let t=e??"";this.setProperty("value",t)}_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(t){return new(t||i)(de(ve),de(N),de(Ug,8))};static \u0275dir=S({type:i,selectors:[["input","formControlName","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControlName","",3,"ngNoCva",""],["input","formControl","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControl","",3,"ngNoCva",""],["input","ngModel","",3,"type","checkbox",3,"ngNoCva",""],["textarea","ngModel","",3,"ngNoCva",""],["","ngDefaultControl",""]],hostBindings:function(t,n){t&1&&A("input",function(r){return n._handleInput(r.target.value)})("blur",function(){return n.onTouched()})("compositionstart",function(){return n._compositionStart()})("compositionend",function(r){return n._compositionEnd(r.target.value)})},standalone:!1,features:[J([jg]),Q]})}return i})();function Yl(i){return i==null||Xl(i)===0}function Xl(i){return i==null?null:Array.isArray(i)||typeof i=="string"?i.length:i instanceof Set?i.size:null}var zi=new x(""),Zr=new x(""),Gg=/^(?=.{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])?)*$/,st=class{static min(o){return mu(o)}static max(o){return uu(o)}static required(o){return hu(o)}static requiredTrue(o){return $g(o)}static email(o){return Wg(o)}static minLength(o){return qg(o)}static maxLength(o){return Kg(o)}static pattern(o){return Yg(o)}static nullValidator(o){return Ur()}static compose(o){return bu(o)}static composeAsync(o){return yu(o)}};function mu(i){return o=>{if(o.value==null||i==null)return null;let e=parseFloat(o.value);return!isNaN(e)&&e<i?{min:{min:i,actual:o.value}}:null}}function uu(i){return o=>{if(o.value==null||i==null)return null;let e=parseFloat(o.value);return!isNaN(e)&&e>i?{max:{max:i,actual:o.value}}:null}}function hu(i){return Yl(i.value)?{required:!0}:null}function $g(i){return i.value===!0?null:{required:!0}}function Wg(i){return Yl(i.value)||Gg.test(i.value)?null:{email:!0}}function qg(i){return o=>{let e=o.value?.length??Xl(o.value);return e===null||e===0?null:e<i?{minlength:{requiredLength:i,actualLength:e}}:null}}function Kg(i){return o=>{let e=o.value?.length??Xl(o.value);return e!==null&&e>i?{maxlength:{requiredLength:i,actualLength:e}}:null}}function Yg(i){if(!i)return Ur;let o,e;return typeof i=="string"?(e="",i.charAt(0)!=="^"&&(e+="^"),e+=i,i.charAt(i.length-1)!=="$"&&(e+="$"),o=new RegExp(e)):(e=i.toString(),o=i),t=>{if(Yl(t.value))return null;let n=t.value;return o.test(n)?null:{pattern:{requiredPattern:e,actualValue:n}}}}function Ur(i){return null}function pu(i){return i!=null}function fu(i){return Ks(i)?qc(i):i}function gu(i){let o={};return i.forEach(e=>{o=e!=null?V(V({},o),e):o}),Object.keys(o).length===0?null:o}function _u(i,o){return o.map(e=>e(i))}function Xg(i){return!i.validate}function vu(i){return i.map(o=>Xg(o)?o:e=>o.validate(e))}function bu(i){if(!i)return null;let o=i.filter(pu);return o.length==0?null:function(e){return gu(_u(e,o))}}function Zl(i){return i!=null?bu(vu(i)):null}function yu(i){if(!i)return null;let o=i.filter(pu);return o.length==0?null:function(e){let t=_u(e,o).map(fu);return Xa(t).pipe(Pe(gu))}}function Ql(i){return i!=null?yu(vu(i)):null}function tu(i,o){return i===null?[o]:Array.isArray(i)?[...i,o]:[i,o]}function Cu(i){return i._rawValidators}function xu(i){return i._rawAsyncValidators}function Gl(i){return i?Array.isArray(i)?i:[i]:[]}function Gr(i,o){return Array.isArray(i)?i.includes(o):i===o}function iu(i,o){let e=Gl(o);return Gl(i).forEach(n=>{Gr(e,n)||e.push(n)}),e}function nu(i,o){return Gl(o).filter(e=>!Gr(i,e))}var $r=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(o){this._rawValidators=o||[],this._composedValidatorFn=Zl(this._rawValidators)}_setAsyncValidators(o){this._rawAsyncValidators=o||[],this._composedAsyncValidatorFn=Ql(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(o){this._onDestroyCallbacks.push(o)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(o=>o()),this._onDestroyCallbacks=[]}reset(o=void 0){this.control?.reset(o)}hasError(o,e){return this.control?this.control.hasError(o,e):!1}getError(o,e){return this.control?this.control.getError(o,e):null}},Bi=class extends $r{name;get formDirective(){return null}get path(){return null}};var ha="VALID",Hr="INVALID",_o="PENDING",pa="DISABLED",dn=class{},Wr=class extends dn{value;source;constructor(o,e){super(),this.value=o,this.source=e}},ga=class extends dn{pristine;source;constructor(o,e){super(),this.pristine=o,this.source=e}},_a=class extends dn{touched;source;constructor(o,e){super(),this.touched=o,this.source=e}},vo=class extends dn{status;source;constructor(o,e){super(),this.status=o,this.source=e}},qr=class extends dn{source;constructor(o){super(),this.source=o}},zn=class extends dn{source;constructor(o){super(),this.source=o}};function Jl(i){return(Qr(i)?i.validators:i)||null}function Zg(i){return Array.isArray(i)?Zl(i):i||null}function ec(i,o){return(Qr(o)?o.asyncValidators:i)||null}function Qg(i){return Array.isArray(i)?Ql(i):i||null}function Qr(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function wu(i,o,e){let t=i.controls;if(!(o?Object.keys(t):t).length)throw new re(1e3,"");if(!Su(t,e))throw new re(1001,"")}function Du(i,o,e){i._forEachChild((t,n)=>{if(e[n]===void 0)throw new re(-1002,"")})}var bo=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_hasRequired=I(!1);_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(o,e){this._assignValidators(o),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(o){this._rawValidators=this._composedValidatorFn=o,this._updateHasRequiredValidator()}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(o){this._rawAsyncValidators=this._composedAsyncValidatorFn=o}get parent(){return this._parent}get status(){return pt(this.statusReactive)}set status(o){pt(()=>this.statusReactive.set(o))}_status=G(()=>this.statusReactive());statusReactive=I(void 0);get valid(){return this.status===ha}get invalid(){return this.status===Hr}get pending(){return this.status===_o}get disabled(){return this.status===pa}get enabled(){return this.status!==pa}errors;get pristine(){return pt(this.pristineReactive)}set pristine(o){pt(()=>this.pristineReactive.set(o))}_pristine=G(()=>this.pristineReactive());pristineReactive=I(!0);get dirty(){return!this.pristine}get touched(){return pt(this.touchedReactive)}set touched(o){pt(()=>this.touchedReactive.set(o))}_touched=G(()=>this.touchedReactive());touchedReactive=I(!1);get untouched(){return!this.touched}_events=new R;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(o){this._assignValidators(o)}setAsyncValidators(o){this._assignAsyncValidators(o)}addValidators(o){this.setValidators(iu(o,this._rawValidators))}addAsyncValidators(o){this.setAsyncValidators(iu(o,this._rawAsyncValidators))}removeValidators(o){this.setValidators(nu(o,this._rawValidators))}removeAsyncValidators(o){this.setAsyncValidators(nu(o,this._rawAsyncValidators))}hasValidator(o){return Gr(this._rawValidators,o)}hasAsyncValidator(o){return Gr(this._rawAsyncValidators,o)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(o={}){let e=this.touched===!1;this.touched=!0;let t=o.sourceControl??this;o.onlySelf||this._parent?.markAsTouched(Oe(V({},o),{sourceControl:t})),e&&o.emitEvent!==!1&&this._events.next(new _a(!0,t))}markAllAsDirty(o={}){this.markAsDirty({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(o))}markAllAsTouched(o={}){this.markAsTouched({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(o))}markAsUntouched(o={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let t=o.sourceControl??this;this._forEachChild(n=>{n.markAsUntouched({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:t})}),o.onlySelf||this._parent?._updateTouched(o,t),e&&o.emitEvent!==!1&&this._events.next(new _a(!1,t))}markAsDirty(o={}){let e=this.pristine===!0;this.pristine=!1;let t=o.sourceControl??this;o.onlySelf||this._parent?.markAsDirty(Oe(V({},o),{sourceControl:t})),e&&o.emitEvent!==!1&&this._events.next(new ga(!1,t))}markAsPristine(o={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let t=o.sourceControl??this;this._forEachChild(n=>{n.markAsPristine({onlySelf:!0,emitEvent:o.emitEvent})}),o.onlySelf||this._parent?._updatePristine(o,t),e&&o.emitEvent!==!1&&this._events.next(new ga(!0,t))}markAsPending(o={}){this.status=_o;let e=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new vo(this.status,e)),this.statusChanges.emit(this.status)),o.onlySelf||this._parent?.markAsPending(Oe(V({},o),{sourceControl:e}))}disable(o={}){let e=this._parentMarkedDirty(o.onlySelf);this.status=pa,this.errors=null,this._forEachChild(n=>{n.disable(Oe(V({},o),{onlySelf:!0}))}),this._updateValue();let t=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new Wr(this.value,t)),this._events.next(new vo(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Oe(V({},o),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!0))}enable(o={}){let e=this._parentMarkedDirty(o.onlySelf);this.status=ha,this._forEachChild(t=>{t.enable(Oe(V({},o),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:o.emitEvent}),this._updateAncestors(Oe(V({},o),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(o,e){o.onlySelf||(this._parent?.updateValueAndValidity(o),o.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e))}setParent(o){this._parent=o}getRawValue(){return this.value}updateValueAndValidity(o={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let t=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===ha||this.status===_o)&&this._runAsyncValidator(t,o.emitEvent)}let e=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new Wr(this.value,e)),this._events.next(new vo(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),o.onlySelf||this._parent?.updateValueAndValidity(Oe(V({},o),{sourceControl:e}))}_updateTreeValidity(o={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(o)),this.updateValueAndValidity({onlySelf:!0,emitEvent:o.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?pa:ha}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(o,e){if(this.asyncValidator){this.status=_o,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:o!==!1};let t=fu(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(n=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(n,{emitEvent:e,shouldHaveEmitted:o})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let o=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,o}return!1}setErrors(o,e={}){this.errors=o,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(o){let e=o;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((t,n)=>t&&t._find(n),this)}getError(o,e){let t=e?this.get(e):this;return t?.errors?t.errors[o]:null}hasError(o,e){return!!this.getError(o,e)}get root(){let o=this;for(;o._parent;)o=o._parent;return o}_updateControlsErrors(o,e,t){this.status=this._calculateStatus(),o&&this.statusChanges.emit(this.status),(o||t)&&this._events.next(new vo(this.status,e)),this._parent&&this._parent._updateControlsErrors(o,e,t)}_initObservables(){this.valueChanges=new K,this.statusChanges=new K}_calculateStatus(){return this._allControlsDisabled()?pa:this.errors?Hr:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(_o)?_o:this._anyControlsHaveStatus(Hr)?Hr:ha}_anyControlsHaveStatus(o){return this._anyControls(e=>e.status===o)}_anyControlsDirty(){return this._anyControls(o=>o.dirty)}_anyControlsTouched(){return this._anyControls(o=>o.touched)}_updatePristine(o,e){let t=!this._anyControlsDirty(),n=this.pristine!==t;this.pristine=t,o.onlySelf||this._parent?._updatePristine(o,e),n&&this._events.next(new ga(this.pristine,e))}_updateTouched(o={},e){this.touched=this._anyControlsTouched(),this._events.next(new _a(this.touched,e)),o.onlySelf||this._parent?._updateTouched(o,e)}_onDisabledChange=[];_registerOnCollectionChange(o){this._onCollectionChange=o}_setUpdateStrategy(o){Qr(o)&&o.updateOn!=null&&(this._updateOn=o.updateOn)}_parentMarkedDirty(o){return!o&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(o){return null}_assignValidators(o){this._rawValidators=Array.isArray(o)?o.slice():o,this._composedValidatorFn=Zg(this._rawValidators),this._updateHasRequiredValidator()}_assignAsyncValidators(o){this._rawAsyncValidators=Array.isArray(o)?o.slice():o,this._composedAsyncValidatorFn=Qg(this._rawAsyncValidators)}_updateHasRequiredValidator(){pt(()=>this._hasRequired.set(this.hasValidator(st.required)))}};function Su(i,o){return Object.hasOwn(i,o)}function Jg(i){return i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"}function e_(i,o,e,t){switch(e){case"name":i.setAttribute(o,e,t);break;case"disabled":case"readonly":case"required":t?i.setAttribute(o,e,""):i.removeAttribute(o,e);break;case"max":case"min":case"minLength":case"maxLength":t!==void 0?i.setAttribute(o,e,t.toString()):i.removeAttribute(o,e);break}}var $l=class{kind;context;control;message;constructor({kind:o,context:e,control:t}){this.kind=o,this.context=e,this.control=t}};function ku(i){return typeof i=="number"?i:parseFloat(i)}var tc=(()=>{class i{_validator=Ur;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let t=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(t),this._validator=this._enabled?this.createValidator(t):Ur,this._onChange?.()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,features:[ke]})}return i})(),t_={provide:zi,useExisting:nt(()=>ic),multi:!0},ic=(()=>{class i extends tc{max;inputName="max";normalizeInput=e=>ku(e);createValidator=e=>uu(e);static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(t,n){t&2&&Z("max",n._enabled?n.max:null)},inputs:{max:"max"},standalone:!1,features:[J([t_]),Q]})}return i})(),i_={provide:zi,useExisting:nt(()=>nc),multi:!0},nc=(()=>{class i extends tc{min;inputName="min";normalizeInput=e=>ku(e);createValidator=e=>mu(e);static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(t,n){t&2&&Z("min",n._enabled?n.min:null)},inputs:{min:"min"},standalone:!1,features:[J([i_]),Q]})}return i})(),n_={provide:zi,useExisting:nt(()=>Jr),multi:!0};var Jr=(()=>{class i extends tc{required;inputName="required";normalizeInput=L;createValidator=e=>hu;enabled(e){return e}static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,n){t&2&&Z("required",n._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[J([n_]),Q]})}return i})();var o_=new x(""),ba=new x("",{factory:()=>es}),es="always";function Mu(i,o){return[...o.path,i]}function Wl(i,o,e=es){oc(i,o),o.valueAccessor.writeValue(i.value),(i.disabled||e==="always")&&o.valueAccessor.setDisabledState?.(i.disabled),r_(i,o),l_(i,o),s_(i,o),a_(i,o)}function ou(i,o,e=!0){let t=()=>{};o?.valueAccessor?.registerOnChange(t),o?.valueAccessor?.registerOnTouched(t),Yr(i,o),i&&(o._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function Kr(i,o){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(o)})}function a_(i,o){if(o.valueAccessor.setDisabledState){let e=t=>{o.valueAccessor.setDisabledState(t)};i.registerOnDisabledChange(e),o._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}function oc(i,o){let e=Cu(i);o.validator!==null?i.setValidators(tu(e,o.validator)):typeof e=="function"&&i.setValidators([e]);let t=xu(i);o.asyncValidator!==null?i.setAsyncValidators(tu(t,o.asyncValidator)):typeof t=="function"&&i.setAsyncValidators([t]);let n=()=>i.updateValueAndValidity();Kr(o._rawValidators,n),Kr(o._rawAsyncValidators,n)}function Yr(i,o){let e=!1;if(i!==null){if(o.validator!==null){let n=Cu(i);if(Array.isArray(n)&&n.length>0){let a=n.filter(r=>r!==o.validator);a.length!==n.length&&(e=!0,i.setValidators(a))}}if(o.asyncValidator!==null){let n=xu(i);if(Array.isArray(n)&&n.length>0){let a=n.filter(r=>r!==o.asyncValidator);a.length!==n.length&&(e=!0,i.setAsyncValidators(a))}}}let t=()=>{};return Kr(o._rawValidators,t),Kr(o._rawAsyncValidators,t),e}function r_(i,o){o.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Eu(i,o)})}function s_(i,o){o.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Eu(i,o),i.updateOn!=="submit"&&i.markAsTouched()})}function Eu(i,o){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),o.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function l_(i,o){let e=(t,n)=>{o.valueAccessor.writeValue(t),n&&o.viewToModelUpdate(t)};i.registerOnChange(e),o._registerOnDestroy(()=>{i._unregisterOnChange(e)})}function Au(i,o){i==null,oc(i,o)}function c_(i,o){return Yr(i,o)}function Tu(i,o){if(!i.hasOwnProperty("model"))return!1;let e=i.model;return e.isFirstChange()?!0:!Object.is(o,e.currentValue)}function d_(i){return Object.getPrototypeOf(i.constructor)===du}function Iu(i,o){i._syncPendingControls(),o.forEach(e=>{let t=e.control;t.updateOn==="submit"&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function m_(i,o){if(!o)return null;Array.isArray(o);let e,t,n;return o.forEach(a=>{a.constructor===Ei?e=a:d_(a)?t=a:n=a}),n||t||e||null}function u_(i,o){let e=i.indexOf(o);e>-1&&i.splice(e,1)}var Ru={provide:o_,useFactory:()=>{let i=d(Jt,{self:!0});return{setParseErrors:o=>{i.setParseErrorSource(o)},set onReset(o){i.onReset=o}}}},Jt=class extends $r{_parent=null;name=null;valueAccessor=null;isCustomControlBased=!1;userOnReset;resetSubscription;set onReset(o){this.userOnReset=o,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof zn&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription?.add(this.resetSubscription))}isNativeFormElement=!1;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=m_(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(o,e,t){super(),this.injector=o,this.renderer=e,this.rawValueAccessors=t,this.injector?.get(Bt)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe()})}setupCustomControl(){this.subscription?.unsubscribe();let o=this.injector?.get(te);if(!this.control||!o)return;let e=o.markForCheck.bind(o);this.subscription=new De,this.subscription.add(this.control.valueChanges.subscribe(e)),this.subscription.add(this.control.statusChanges.subscribe(e)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(t=>{t instanceof zn&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator)}ngControlCreate(o){!o.nativeElement.hasAttribute?.("ngNoCva")&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!o.customControl||(this.isCustomControlBased=!0,o.listenToCustomControlModel(n=>{this.control?.setValue(n,{emitModelToViewChange:!1}),this.control?.markAsDirty(),this.viewToModelUpdate(n)}),o.listenToCustomControlOutput("touch",()=>{this.control?.markAsTouched()}),this.customControlBindings={},this.isNativeFormElement=Jg(o.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(n=>n instanceof Jr))}ngControlUpdate(o,e){if(!this.isCustomControlBased)return;let t=this.control,n=this.customControlBindings;Object.is(n.value,t.value)||(n.value=t.value,o.setCustomControlModelInput(t.value)),this.bindControlProperty(o,n,"touched",t.touched),this.bindControlProperty(o,n,"dirty",t.dirty),this.bindControlProperty(o,n,"valid",t.valid),this.bindControlProperty(o,n,"invalid",t.invalid),this.bindControlProperty(o,n,"pending",t.pending),this.bindControlProperty(o,n,"disabled",t.disabled),this.shouldBindRequired&&this.bindControlProperty(o,n,"required",this.isRequired);let a=t.errors;if(n.errors!==a){n.errors=a;let r=this._convertErrors(a);o.setInputOnDirectives("errors",r)}}get isRequired(){return(this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??!1}get shouldBindRequired(){return!0}bindControlProperty(o,e,t,n){if(e[t]===n)return;e[t]=n;let a=o.setInputOnDirectives(t,n);this.isNativeFormElement&&!a&&(t==="disabled"||t==="required")&&this.renderer&&e_(this.renderer,o.nativeElement,t,n)}_convertErrors(o){if(o===null)return[];let e=this.control;return Object.entries(o).map(([t,n])=>new $l({context:n,kind:t,control:e}))}setParseErrorSource(o){if(o===void 0)return;let e=null,t=G(()=>{let n=o();return n.length===0?null:n.reduce((a,r)=>(a[r.kind]=r,a),{})});this.parseErrorsValidator=(()=>e).bind(this),zt(()=>{e=t(),this.control?.updateValueAndValidity({emitEvent:!1})},{injector:this.injector})}removeParseErrorsValidator(o){this.parseErrorsValidator&&(o?.removeValidators(this.parseErrorsValidator),o?.updateValueAndValidity({emitEvent:!1}))}},Xr=class{_cd;constructor(o){this._cd=o}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}};var Ai=(()=>{class i extends Xr{constructor(e){super(e)}static \u0275fac=function(t){return new(t||i)(de(Jt,2))};static \u0275dir=S({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,n){t&2&&p("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)},standalone:!1,features:[Q]})}return i})(),mn=(()=>{class i extends Xr{constructor(e){super(e)}static \u0275fac=function(t){return new(t||i)(de(Bi,10))};static \u0275dir=S({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,n){t&2&&p("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)("ng-submitted",n.isSubmitted)},standalone:!1,features:[Q]})}return i})(),yo=class extends bo{constructor(o,e,t){super(Jl(e),ec(t,e)),this.controls=o,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(o,e){let t=this._find(o);return t||(this.controls[o]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(o,e,t={}){this.registerControl(o,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}removeControl(o,e={}){let t=this._find(o);t&&t._registerOnCollectionChange(()=>{}),delete this.controls[o],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(o,e,t={}){let n=this._find(o);n&&n._registerOnCollectionChange(()=>{}),delete this.controls[o],e&&this.registerControl(o,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}contains(o){return this._find(o)?.enabled===!0}setValue(o,e={}){pt(()=>{Du(this,!0,o),Object.keys(o).forEach(t=>{wu(this,!0,t),this.controls[t].setValue(o[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)})}patchValue(o,e={}){o!=null&&(Object.keys(o).forEach(t=>{let n=this._find(t);n&&n.patchValue(o[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(o={},e={}){this._forEachChild((t,n)=>{t.reset(o?o[n]:null,Oe(V({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new zn(this))}getRawValue(){return this._reduceChildren({},(o,e,t)=>(o[t]=e.getRawValue(),o))}_syncPendingControls(){let o=this._reduceChildren(!1,(e,t)=>t._syncPendingControls()?!0:e);return o&&this.updateValueAndValidity({onlySelf:!0}),o}_forEachChild(o){Object.keys(this.controls).forEach(e=>{let t=this.controls[e];t&&o(t,e)})}_setUpControls(){this._forEachChild(o=>{o.setParent(this),o._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(o){for(let[e,t]of Object.entries(this.controls))if(this.contains(e)&&o(t))return!0;return!1}_reduceValue(){let o={};return this._reduceChildren(o,(e,t,n)=>((t.enabled||this.disabled)&&(e[n]=t.value),e))}_reduceChildren(o,e){let t=o;return this._forEachChild((n,a)=>{t=e(t,n,a)}),t}_allControlsDisabled(){for(let o of Object.keys(this.controls))if(this.controls[o].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(o){return Su(this.controls,o)?this.controls[o]:null}};var ql=class extends yo{};var h_={provide:Bi,useExisting:nt(()=>ya)},fa=Promise.resolve(),ya=(()=>{class i extends Bi{callSetDisabledState;get submitted(){return pt(this.submittedReactive)}_submitted=G(()=>this.submittedReactive());submittedReactive=I(!1);_directives=new Set;form;ngSubmit=new K;options;constructor(e,t,n){super(),this.callSetDisabledState=n,this.form=new yo({},Zl(e),Ql(t))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){fa.then(()=>{let t=this._findContainer(e.path);e.control=t.registerControl(e.name,e.control),e._setupWithForm(this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){fa.then(()=>{this._findContainer(e.path)?.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){fa.then(()=>{let t=this._findContainer(e.path),n=new yo({});Au(n,e),t.registerControl(e.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){fa.then(()=>{this._findContainer(e.path)?.removeControl?.(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,t){fa.then(()=>{this.form.get(e.path).setValue(t)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),Iu(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new qr(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_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(t){return new(t||i)(de(zi,10),de(Zr,10),de(ba,8))};static \u0275dir=S({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,n){t&1&&A("submit",function(r){return n.onSubmit(r)})("reset",function(){return n.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[J([h_]),Q]})}return i})();function au(i,o){let e=i.indexOf(o);e>-1&&i.splice(e,1)}function ru(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var va=class extends bo{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(o=null,e,t){super(Jl(e),ec(t,e)),this._applyFormState(o),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Qr(e)&&(e.nonNullable||e.initialValueIsDefault)&&(ru(o)?this.defaultValue=o.value:this.defaultValue=o)}setValue(o,e={}){pt(()=>{this.value=this._pendingValue=o,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(t=>t(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)})}patchValue(o,e={}){this.setValue(o,e)}reset(o=this.defaultValue,e={}){this._applyFormState(o),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new zn(this))}_updateValue(){}_anyControls(o){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(o){this._onChange.push(o)}_unregisterOnChange(o){au(this._onChange,o)}registerOnDisabledChange(o){this._onDisabledChange.push(o)}_unregisterOnDisabledChange(o){au(this._onDisabledChange,o)}_forEachChild(o){}_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(o){ru(o)?(this.value=this._pendingValue=o.value,o.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=o}};var p_=i=>i instanceof va;var f_={provide:Jt,useExisting:nt(()=>ac)},su=Promise.resolve(),ac=(()=>{class i extends Jt{_changeDetectorRef;callSetDisabledState;control=new va;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new K;constructor(e,t,n,a,r,u,h,g){super(h,g,a),this._changeDetectorRef=r,this.callSetDisabledState=u,this._parent=e,this._setValidators(t),this._setAsyncValidators(n)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let t=e.name.previousValue;this.formDirective.removeControl({name:t,path:this._getPath(t)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),Tu(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}\u0275ngControlCreate(e){super.ngControlCreate(e)}\u0275ngControlUpdate(e){super.ngControlUpdate(e,!1)}get shouldBindRequired(){return!1}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(){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,Wl(this.control,this,this.callSetDisabledState)),this.control.updateValueAndValidity({emitEvent:!1})}_setupWithForm(e){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,Wl(this.control,this,e))}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){su.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let t=e.isDisabled.currentValue,n=t!==0&&L(t);su.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Mu(e,this._parent):[e]}static \u0275fac=function(t){return new(t||i)(de(Bi,9),de(zi,10),de(Zr,10),de(Mi,10),de(te,8),de(ba,8),de(X,8),de(ve,8))};static \u0275dir=S({type:i,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:[J([f_,Ru]),Q,ke,Xs(null)]})}return i})();var Co=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return i})(),g_={provide:Mi,useExisting:nt(()=>Ca),multi:!0},Ca=(()=>{class i extends du{writeValue(e){let t=e??"";this.setProperty("value",t)}registerOnChange(e){this.onChange=t=>{e(t==""?null:parseFloat(t))}}static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["input","type","number","formControlName","",3,"ngNoCva",""],["input","type","number","formControl","",3,"ngNoCva",""],["input","type","number","ngModel","",3,"ngNoCva",""]],hostBindings:function(t,n){t&1&&A("input",function(r){return n.onChange(r.target.value)})("blur",function(){return n.onTouched()})},standalone:!1,features:[J([g_]),Q]})}return i})();var Kl=class extends bo{constructor(o,e,t){super(Jl(e),ec(t,e)),this.controls=o,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(o){return this.controls[this._adjustIndex(o)]}push(o,e={}){Array.isArray(o)?o.forEach(t=>{this.controls.push(t),this._registerControl(t)}):(this.controls.push(o),this._registerControl(o)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(o,e,t={}){this.controls.splice(o,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent})}removeAt(o,e={}){let t=this._adjustIndex(o);t<0&&(t=0),this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(o,e,t={}){let n=this._adjustIndex(o);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),e&&(this.controls.splice(n,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(o,e={}){pt(()=>{Du(this,!1,o),o.forEach((t,n)=>{wu(this,!1,n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)})}patchValue(o,e={}){o!=null&&(o.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(o=[],e={}){this._forEachChild((t,n)=>{t.reset(o[n],Oe(V({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new zn(this))}getRawValue(){return this.controls.map(o=>o.getRawValue())}clear(o={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:o.emitEvent}))}_adjustIndex(o){return o<0?o+this.length:o}_syncPendingControls(){let o=this.controls.reduce((e,t)=>t._syncPendingControls()?!0:e,!1);return o&&this.updateValueAndValidity({onlySelf:!0}),o}_forEachChild(o){this.controls.forEach((e,t)=>{o(e,t)})}_updateValue(){this.value=this.controls.filter(o=>o.enabled||this.disabled).map(o=>o.value)}_anyControls(o){return this.controls.some(e=>e.enabled&&o(e))}_setUpControls(){this._forEachChild(o=>this._registerControl(o))}_allControlsDisabled(){for(let o of this.controls)if(o.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(o){o.setParent(this),o._registerOnCollectionChange(this._onCollectionChange)}_find(o){return this.at(o)??null}};var __=(()=>{class i extends Bi{callSetDisabledState;get submitted(){return pt(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=G(()=>this._submittedReactive());_submittedReactive=I(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,t,n){super(),this.callSetDisabledState=n,this._setValidators(e),this._setAsyncValidators(t)}ngOnChanges(e){this.onChanges(e)}ngOnDestroy(){this.onDestroy()}onChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}onDestroy(){this.form&&(Yr(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get path(){return[]}addControl(e){let t=this.form.get(e.path);return e._setupWithForm(t,this.callSetDisabledState),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t}getControl(e){return this.form.get(e.path)}removeControl(e){ou(e.control||null,e,!1),u_(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}getFormArray(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}updateModel(e,t){this.form.get(e.path).setValue(t)}onReset(){this.resetForm()}resetForm(e=void 0,t={}){this.form.reset(e,t),this._submittedReactive.set(!1)}onSubmit(e){return this.submitted=!0,Iu(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new qr(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let t=e.control,n=this.form.get(e.path);t!==n&&(ou(t||null,e),p_(n)&&e._setupWithForm(n,this.callSetDisabledState))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let t=this.form.get(e.path);Au(t,e),t.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){let t=this.form?.get(e.path);t&&c_(t,e)&&t.updateValueAndValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm?._registerOnCollectionChange(()=>{})}_updateValidators(){oc(this.form,this),this._oldForm&&Yr(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(t){return new(t||i)(de(zi,10),de(Zr,10),de(ba,8))};static \u0275dir=S({type:i,features:[Q,ke]})}return i})();var Ou=new x("");var v_={provide:Jt,useExisting:nt(()=>ji)},ji=(()=>{class i extends Jt{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new K;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,t,n,a,r,u,h){super(h,u,a),this._ngModelWarningConfig=r,this._parent=e,this._setValidators(t),this._setAsyncValidators(n)}_setupWithForm(e,t){this.control=e,this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,Wl(e,this,t))}ngOnChanges(e){this._added||this._setUpControl(),Tu(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective?.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Mu(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}\u0275ngControlCreate(e){super.ngControlCreate(e)}\u0275ngControlUpdate(e){this.isCustomControlBased&&(this._added||this._setUpControl(),super.ngControlUpdate(e,!0))}static \u0275fac=function(t){return new(t||i)(de(Bi,13),de(zi,10),de(Zr,10),de(Mi,10),de(Ou,8),de(ve,8),de(X,8))};static \u0275dir=S({type:i,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[J([v_,Ru]),Q,ke,Xs(null)]})}return i})();var b_={provide:Bi,useExisting:nt(()=>Ut)},Ut=(()=>{class i extends __{form=null;ngSubmit=new K;get control(){return this.form}static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","formGroup",""]],hostBindings:function(t,n){t&1&&A("submit",function(r){return n.onSubmit(r)})("reset",function(){return n.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[J([b_]),Q]})}return i})();var Pu=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({})}return i})();function lu(i){return!!i&&(i.asyncValidators!==void 0||i.validators!==void 0||i.updateOn!==void 0)}var un=(()=>{class i{useNonNullable=!1;get nonNullable(){let e=new i;return e.useNonNullable=!0,e}group(e,t=null){let n=this._reduceControls(e),a={};return lu(t)?a=t:t!==null&&(a.validators=t.validator,a.asyncValidators=t.asyncValidator),new yo(n,a)}record(e,t=null){let n=this._reduceControls(e);return new ql(n,t)}control(e,t,n){let a={};return this.useNonNullable?(lu(t)?a=t:(a.validators=t,a.asyncValidators=n),new va(e,Oe(V({},a),{nonNullable:!0}))):new va(e,t,n)}array(e,t,n){let a=e.map(r=>this._createControl(r));return new Kl(a,t,n)}_reduceControls(e){let t={};return Object.keys(e).forEach(n=>{t[n]=this._createControl(e[n])}),t}_createControl(e){if(e instanceof va)return e;if(e instanceof bo)return e;if(Array.isArray(e)){let t=e[0],n=e.length>1?e[1]:null,a=e.length>2?e[2]:null;return this.control(t,n,a)}else return this.control(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var hn=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:ba,useValue:e.callSetDisabledState??es}]}}static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[Pu]})}return i})(),pn=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Ou,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:ba,useValue:e.callSetDisabledState??es}]}}static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[Pu]})}return i})();var Fu=new x("MAT_INPUT_VALUE_ACCESSOR");var rc=class{_box;_destroyed=new R;_resizeSubject=new R;_resizeObserver;_elementObservables=new Map;constructor(o){this._box=o,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(o){return this._elementObservables.has(o)||this._elementObservables.set(o,new yt(e=>{let t=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(o,{box:this._box}),()=>{this._resizeObserver?.unobserve(o),t.unsubscribe(),this._elementObservables.delete(o)}}).pipe(we(e=>e.some(t=>t.target===o)),Us({bufferSize:1,refCount:!0}),ae(this._destroyed))),this._elementObservables.get(o)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},Nu=(()=>{class i{_cleanupErrorListener;_observers=new Map;_ngZone=d(H);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(e,t){let n=t?.box||"content-box";return this._observers.has(n)||this._observers.set(n,new rc(n)),this._observers.get(n).observe(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var y_=["notch"],C_=["*"],Lu=["iconPrefixContainer"],Vu=["textPrefixContainer"],Bu=["iconSuffixContainer"],zu=["textSuffixContainer"],x_=["textField"],w_=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],D_=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function S_(i,o){i&1&&_(0,"span",21)}function k_(i,o){if(i&1&&(s(0,"label",20),U(1,1),M(2,S_,1,0,"span",21),l()),i&2){let e=w(2);C("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),Z("for",e._control.disableAutomaticLabeling?null:e._control.id),c(2),E(!e.hideRequiredMarker&&e._control.required?2:-1)}}function M_(i,o){if(i&1&&M(0,k_,3,5,"label",20),i&2){let e=w();E(e._hasFloatingLabel()?0:-1)}}function E_(i,o){i&1&&_(0,"div",7)}function A_(i,o){}function T_(i,o){if(i&1&&He(0,A_,0,0,"ng-template",13),i&2){w(2);let e=Fe(1);C("ngTemplateOutlet",e)}}function I_(i,o){if(i&1&&(s(0,"div",9),M(1,T_,1,1,null,13),l()),i&2){let e=w();C("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),c(),E(e._forceDisplayInfixLabel()?-1:1)}}function R_(i,o){i&1&&(s(0,"div",10,2),U(2,2),l())}function O_(i,o){i&1&&(s(0,"div",11,3),U(2,3),l())}function P_(i,o){}function F_(i,o){if(i&1&&He(0,P_,0,0,"ng-template",13),i&2){w();let e=Fe(1);C("ngTemplateOutlet",e)}}function N_(i,o){i&1&&(s(0,"div",14,4),U(2,4),l())}function L_(i,o){i&1&&(s(0,"div",15,5),U(2,5),l())}function V_(i,o){i&1&&_(0,"div",16)}function B_(i,o){i&1&&(s(0,"div",18),U(1,6),l())}function z_(i,o){if(i&1&&(s(0,"mat-hint",22),m(1),l()),i&2){let e=w(2);C("id",e._hintLabelId),c(),W(e.hintLabel)}}function j_(i,o){if(i&1&&(s(0,"div",19),M(1,z_,2,2,"mat-hint",22),U(2,7),_(3,"div",23),U(4,8),l()),i&2){let e=w();c(),E(e.hintLabel?1:-1)}}var Ot=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["mat-label"]]})}return i})(),qu=new x("MatError"),fn=(()=>{class i{id=d(be).getId("mat-mdc-error-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["mat-error"],["","matError",""]],hostAttrs:[1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(t,n){t&2&&dt("id",n.id)},inputs:{id:"id"},features:[J([{provide:qu,useExisting:i}])]})}return i})(),is=(()=>{class i{align="start";id=d(be).getId("mat-mdc-hint-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(t,n){t&2&&(dt("id",n.id),Z("align",null),p("mat-mdc-form-field-hint-end",n.align==="end"))},inputs:{align:"align",id:"id"}})}return i})(),H_=new x("MatPrefix");var U_=new x("MatSuffix");var Ku=new x("FloatingLabelParent"),ju=(()=>{class i{_elementRef=d(N);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(Nu);_ngZone=d(H);_parent=d(Ku);_resizeSubscription=new De;ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return G_(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(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(t,n){t&2&&p("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return i})();function G_(i){let o=i;if(o.offsetParent!==null)return o.scrollWidth;let e=o.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let t=e.scrollWidth;return e.remove(),t}var Hu="mdc-line-ripple--active",ts="mdc-line-ripple--deactivating",Uu=(()=>{class i{_elementRef=d(N);_cleanupTransitionEnd;constructor(){let e=d(H),t=d(ve);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=t.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove(ts),e.add(Hu)}deactivate(){this._elementRef.nativeElement.classList.add(ts)}_handleTransitionEnd=e=>{let t=this._elementRef.nativeElement.classList,n=t.contains(ts);e.propertyName==="opacity"&&n&&t.remove(Hu,ts)};ngOnDestroy(){this._cleanupTransitionEnd()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return i})(),Gu=(()=>{class i{_elementRef=d(N);_ngZone=d(H);open=!1;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,t=e.querySelector(".mdc-floating-label");t?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="")}))):e.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(e){let t=this._notch.nativeElement;!this.open||!e?t.style.width="":t.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(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(t,n){if(t&1&&Me(y_,5),t&2){let a;P(a=F())&&(n._notch=a.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(t,n){t&2&&p("mdc-notched-outline--notched",n.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},ngContentSelectors:C_,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(t,n){t&1&&(ce(),ht(0,"div",1),Ie(1,"div",2,0),U(3),Ue(),ht(4,"div",3))},encapsulation:2})}return i})(),wa=(()=>{class i{value=null;stateChanges;id;placeholder;ngControl=null;focused=!1;empty=!1;shouldLabelFloat=!1;required=!1;disabled=!1;errorState=!1;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i})}return i})();var jn=new x("MatFormField"),$_=new x("MAT_FORM_FIELD_DEFAULT_OPTIONS"),$u="fill",W_="auto",Wu="fixed",q_="translateY(-50%)",St=(()=>{class i{_elementRef=d(N);_changeDetectorRef=d(te);_platform=d(le);_idGenerator=d(be);_ngZone=d(H);_defaults=d($_,{optional:!0});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=Wo("iconPrefixContainer");_textPrefixContainerSignal=Wo("textPrefixContainer");_iconSuffixContainerSignal=Wo("iconSuffixContainer");_textSuffixContainerSignal=Wo("textSuffixContainer");_prefixSuffixContainers=G(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=gd(Ot);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=mt(e)}_hideRequiredMarker=!1;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||W_}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let t=e||this._defaults?.appearance||$u;this._appearanceSignal.set(t)}_appearanceSignal=I($u);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||Wu}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||Wu}_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 R;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=pe();constructor(){let e=this._defaults,t=d(qe);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),zt(()=>this._currentDirection=t.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=G(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(e){let t=this._control,n="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(n+e.controlType),t.controlType&&this._elementRef.nativeElement.classList.add(n+t.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=t.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck()}),this._describedByChanges?.unsubscribe(),this._describedByChanges=t.stateChanges.pipe(Se([void 0,void 0]),Pe(()=>[t.errorState,t.userAriaDescribedBy]),Hs(),we(([[a,r],[u,h]])=>a!==u||r!==h)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),t.ngControl&&t.ngControl.valueChanges&&(this._valueChanges=t.ngControl.valueChanges.pipe(ae(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(),$e(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(){bd({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=G(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(e){let t=this._control?this._control.ngControl:null;return t&&t[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 a=this._hintChildren?this._hintChildren.find(u=>u.align==="start"):null,r=this._hintChildren?this._hintChildren.find(u=>u.align==="end"):null;a?e.push(a.id):this._hintLabel&&e.push(this._hintLabelId),r&&e.push(r.id)}else this._errorChildren&&e.push(...this._errorChildren.map(a=>a.id));let t=this._control.describedByIds,n;if(t){let a=this._describedByIds||e;n=e.concat(t.filter(r=>r&&!a.includes(r)))}else n=e;this._control.setDescribedByIds(n),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,t=this._textPrefixContainer?.nativeElement,n=this._iconSuffixContainer?.nativeElement,a=this._textSuffixContainer?.nativeElement,r=e?.getBoundingClientRect().width??0,u=t?.getBoundingClientRect().width??0,h=n?.getBoundingClientRect().width??0,g=a?.getBoundingClientRect().width??0,v=this._currentDirection==="rtl"?"-1":"1",D=`${r+u}px`,$=`calc(${v} * (${D} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,ie=`var(--mat-mdc-form-field-label-transform, ${q_} translateX(${$}))`,fe=r+u+h+g;return[ie,fe]}_writeOutlinedLabelStyles(e){if(e!==null){let[t,n]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=t),n!==null&&this._notchedOutline?._setMaxWidth(n)}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let t=e.getRootNode();return t&&t!==e}return document.documentElement.contains(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["mat-form-field"]],contentQueries:function(t,n,a){if(t&1&&(hd(a,n._labelChild,Ot,5),at(a,wa,5)(a,H_,5)(a,U_,5)(a,qu,5)(a,is,5)),t&2){Zs();let r;P(r=F())&&(n._formFieldControl=r.first),P(r=F())&&(n._prefixChildren=r),P(r=F())&&(n._suffixChildren=r),P(r=F())&&(n._errorChildren=r),P(r=F())&&(n._hintChildren=r)}},viewQuery:function(t,n){if(t&1&&(pd(n._iconPrefixContainerSignal,Lu,5)(n._textPrefixContainerSignal,Vu,5)(n._iconSuffixContainerSignal,Bu,5)(n._textSuffixContainerSignal,zu,5),Me(x_,5)(Lu,5)(Vu,5)(Bu,5)(zu,5)(ju,5)(Gu,5)(Uu,5)),t&2){Zs(4);let a;P(a=F())&&(n._textField=a.first),P(a=F())&&(n._iconPrefixContainer=a.first),P(a=F())&&(n._textPrefixContainer=a.first),P(a=F())&&(n._iconSuffixContainer=a.first),P(a=F())&&(n._textSuffixContainer=a.first),P(a=F())&&(n._floatingLabel=a.first),P(a=F())&&(n._notchedOutline=a.first),P(a=F())&&(n._lineRipple=a.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(t,n){t&2&&p("mat-mdc-form-field-label-always-float",n._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",n._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",n._hasIconSuffix)("mat-form-field-invalid",n._control.errorState)("mat-form-field-disabled",n._control.disabled)("mat-form-field-autofilled",n._control.autofilled)("mat-form-field-appearance-fill",n.appearance=="fill")("mat-form-field-appearance-outline",n.appearance=="outline")("mat-form-field-hide-placeholder",n._hasFloatingLabel()&&!n._shouldLabelFloat())("mat-primary",n.color!=="accent"&&n.color!=="warn")("mat-accent",n.color==="accent")("mat-warn",n.color==="warn")("ng-untouched",n._shouldForward("untouched"))("ng-touched",n._shouldForward("touched"))("ng-pristine",n._shouldForward("pristine"))("ng-dirty",n._shouldForward("dirty"))("ng-valid",n._shouldForward("valid"))("ng-invalid",n._shouldForward("invalid"))("ng-pending",n._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[J([{provide:jn,useExisting:i},{provide:Ku,useExisting:i}])],ngContentSelectors:D_,decls:18,vars:21,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",""],["aria-atomic","true","aria-live","polite",1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["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(t,n){if(t&1&&(ce(w_),He(0,M_,1,1,"ng-template",null,0,Qs),s(2,"div",6,1),A("click",function(r){return n._control.onContainerClick(r)}),M(4,E_,1,0,"div",7),s(5,"div",8),M(6,I_,2,2,"div",9),M(7,R_,3,0,"div",10),M(8,O_,3,0,"div",11),s(9,"div",12),M(10,F_,1,1,null,13),U(11),l(),M(12,N_,3,0,"div",14),M(13,L_,3,0,"div",15),l(),M(14,V_,1,0,"div",16),l(),s(15,"div",17),M(16,B_,2,0,"div",18)(17,j_,5,1,"div",19),l()),t&2){let a;c(2),p("mdc-text-field--filled",!n._hasOutline())("mdc-text-field--outlined",n._hasOutline())("mdc-text-field--no-label",!n._hasFloatingLabel())("mdc-text-field--disabled",n._control.disabled)("mdc-text-field--invalid",n._control.errorState),c(2),E(!n._hasOutline()&&!n._control.disabled?4:-1),c(2),E(n._hasOutline()?6:-1),c(),E(n._hasIconPrefix?7:-1),c(),E(n._hasTextPrefix?8:-1),c(2),E(!n._hasOutline()||n._forceDisplayInfixLabel()?10:-1),c(2),E(n._hasTextSuffix?12:-1),c(),E(n._hasIconSuffix?13:-1),c(),E(n._hasOutline()?-1:14),c(),p("mat-mdc-form-field-subscript-dynamic-size",n.subscriptSizing==="dynamic");let r=n._getSubscriptMessageType();c(),E((a=r)==="error"?16:a==="hint"?17:-1)}},dependencies:[ju,Gu,cl,Uu,is],styles:[`.mdc-text-field {
471
+ `],encapsulation:2})}return i})(),Vr;function Mg(){if(Vr===void 0&&(Vr=null,typeof window<"u")){let i=window;i.trustedTypes!==void 0&&(Vr=i.trustedTypes.createPolicy("angular#components",{createHTML:o=>o}))}return Vr}function Vn(i){return Mg()?.createHTML(i)||i}function Vm(i,o,e){let t=e.sanitize(Dt.HTML,o);i.innerHTML=Vn(t||"")}function Eg(i){if(i.type==="characterData"&&i.target instanceof Comment)return!0;if(i.type==="childList"){for(let o=0;o<i.addedNodes.length;o++)if(!(i.addedNodes[o]instanceof Comment))return!1;for(let o=0;o<i.removedNodes.length;o++)if(!(i.removedNodes[o]instanceof Comment))return!1;return!0}return!1}var Bm=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),zm=(()=>{class i{_mutationObserverFactory=d(Bm);_observedElements=new Map;_ngZone=d(U);ngOnDestroy(){this._observedElements.forEach((e,t)=>this._cleanupObserver(t))}observe(e){let t=Mt(e);return new wt(n=>{let r=this._observeElement(t).pipe(Ne(u=>u.filter(h=>!Eg(h))),De(u=>!!u.length)).subscribe(u=>{this._ngZone.run(()=>{n.next(u)})});return()=>{r.unsubscribe(),this._unobserveElement(t)}})}_observeElement(e){return this._ngZone.runOutsideAngular(()=>{if(this._observedElements.has(e))this._observedElements.get(e).count++;else{let t=new R,n=this._mutationObserverFactory.create(a=>t.next(a));n&&n.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:n,stream:t,count:1})}return this._observedElements.get(e).stream})}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){let{observer:t,stream:n}=this._observedElements.get(e);t&&t.disconnect(),n.complete(),this._observedElements.delete(e)}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),jm=(()=>{class i{_contentObserver=d(zm);_elementRef=d(N);event=new K;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._disabled?this._unsubscribe():this._subscribe()}_disabled=!1;get debounce(){return this._debounce}set debounce(e){this._debounce=$t(e),this._subscribe()}_debounce;_currentSubscription=null;ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();let e=this._contentObserver.observe(this._elementRef);this._currentSubscription=(this.debounce?e.pipe(jt(this.debounce)):e).subscribe(this.event)}_unsubscribe(){this._currentSubscription?.unsubscribe()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[2,"cdkObserveContentDisabled","disabled",L],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]})}return i})(),go=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({providers:[Bm]})}return i})();var jl=(()=>{class i{_platform=d(ce);isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return Tg(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let t=Ag(Vg(e));if(t&&(Hm(t)===-1||!this.isVisible(t)))return!1;let n=e.nodeName.toLowerCase(),a=Hm(e);return e.hasAttribute("contenteditable")?a!==-1:n==="iframe"||n==="object"||this._platform.WEBKIT&&this._platform.IOS&&!Ng(e)?!1:n==="audio"?e.hasAttribute("controls")?a!==-1:!1:n==="video"?a===-1?!1:a!==null?!0:this._platform.FIREFOX||e.hasAttribute("controls"):e.tabIndex>=0}isFocusable(e,t){return Lg(e)&&!this.isDisabled(e)&&(t?.ignoreVisibility||this.isVisible(e))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function Ag(i){try{return i.frameElement}catch(o){return null}}function Tg(i){return!!(i.offsetWidth||i.offsetHeight||typeof i.getClientRects=="function"&&i.getClientRects().length)}function Ig(i){let o=i.nodeName.toLowerCase();return o==="input"||o==="select"||o==="button"||o==="textarea"}function Rg(i){return Pg(i)&&i.type=="hidden"}function Og(i){return Fg(i)&&i.hasAttribute("href")}function Pg(i){return i.nodeName.toLowerCase()=="input"}function Fg(i){return i.nodeName.toLowerCase()=="a"}function $m(i){if(!i.hasAttribute("tabindex")||i.tabIndex===void 0)return!1;let o=i.getAttribute("tabindex");return!!(o&&!isNaN(parseInt(o,10)))}function Hm(i){if(!$m(i))return null;let o=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(o)?-1:o}function Ng(i){let o=i.nodeName.toLowerCase(),e=o==="input"&&i.type;return e==="text"||e==="password"||o==="select"||o==="textarea"}function Lg(i){return Rg(i)?!1:Ig(i)||Og(i)||i.hasAttribute("contenteditable")||$m(i)}function Vg(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}var zl=class{_element;_checker;_ngZone;_document;_injector;_startAnchor=null;_endAnchor=null;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(o){this._enabled=o,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(o,this._startAnchor),this._toggleAnchorTabIndex(o,this._endAnchor))}_enabled=!0;constructor(o,e,t,n,a=!1,r){this._element=o,this._checker=e,this._ngZone=t,this._document=n,this._injector=r,a||this.attachAnchors()}destroy(){let o=this._startAnchor,e=this._endAnchor;o&&(o.removeEventListener("focus",this.startAnchorListener),o.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(o){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(o)))})}focusFirstTabbableElementWhenReady(o){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(o)))})}focusLastTabbableElementWhenReady(o){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(o)))})}_getRegionBoundary(o){let e=this._element.querySelectorAll(`[cdk-focus-region-${o}], [cdkFocusRegion${o}], [cdk-focus-${o}]`);return o=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(o){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let t=this._getFirstTabbableElement(e);return t?.focus(o),!!t}return e.focus(o),!0}return this.focusFirstTabbableElement(o)}focusFirstTabbableElement(o){let e=this._getRegionBoundary("start");return e&&e.focus(o),!!e}focusLastTabbableElement(o){let e=this._getRegionBoundary("end");return e&&e.focus(o),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(o){if(this._checker.isFocusable(o)&&this._checker.isTabbable(o))return o;let e=o.children;for(let t=0;t<e.length;t++){let n=e[t].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[t]):null;if(n)return n}return null}_getLastTabbableElement(o){if(this._checker.isFocusable(o)&&this._checker.isTabbable(o))return o;let e=o.children;for(let t=e.length-1;t>=0;t--){let n=e[t].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[t]):null;if(n)return n}return null}_createAnchor(){let o=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,o),o.classList.add("cdk-visually-hidden"),o.classList.add("cdk-focus-trap-anchor"),o.setAttribute("aria-hidden","true"),o}_toggleAnchorTabIndex(o,e){o?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(o){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(o,this._startAnchor),this._toggleAnchorTabIndex(o,this._endAnchor))}_executeOnStable(o){je(o,{injector:this._injector})}},Hl=(()=>{class i{_checker=d(jl);_ngZone=d(U);_document=d(q);_injector=d(X);constructor(){d(Be).load(sn)}create(e,t=!1){return new zl(e,this._checker,this._ngZone,this._document,t,this._injector)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Wm=new w("liveAnnouncerElement",{providedIn:"root",factory:()=>null}),qm=new w("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),Bg=0,da=(()=>{class i{_ngZone=d(U);_defaultOptions=d(qm,{optional:!0});_liveElement;_document=d(q);_sanitizer=d(ra);_previousTimeout;_currentPromise;_currentResolve;constructor(){let e=d(Wm,{optional:!0});this._liveElement=e||this._createLiveElement()}announce(e,...t){let n=this._defaultOptions,a,r;return t.length===1&&typeof t[0]=="number"?r=t[0]:[a,r]=t,this.clear(),clearTimeout(this._previousTimeout),a||(a=n&&n.politeness?n.politeness:"polite"),r==null&&n&&(r=n.duration),this._liveElement.setAttribute("aria-live",a),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(u=>this._currentResolve=u)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{!e||typeof e=="string"?this._liveElement.textContent=e:Vm(this._liveElement,e,this._sanitizer),typeof r=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),r)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let e="cdk-live-announcer-element",t=this._document.getElementsByClassName(e),n=this._document.createElement("div");for(let a=0;a<t.length;a++)t[a].remove();return n.classList.add(e),n.classList.add("cdk-visually-hidden"),n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live","polite"),n.id=`cdk-live-announcer-${Bg++}`,this._document.body.appendChild(n),n}_exposeAnnouncerToModals(e){let t=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let n=0;n<t.length;n++){let a=t[n],r=a.getAttribute("aria-owns");r?r.indexOf(e)===-1&&a.setAttribute("aria-owns",r+" "+e):a.setAttribute("aria-owns",e)}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var ln=(function(i){return i[i.NONE=0]="NONE",i[i.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",i[i.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",i})(ln||{}),Um="cdk-high-contrast-black-on-white",Gm="cdk-high-contrast-white-on-black",Bl="cdk-high-contrast-active",Km=(()=>{class i{_platform=d(ce);_hasCheckedHighContrastMode=!1;_document=d(q);_breakpointSubscription;constructor(){this._breakpointSubscription=d(Pn).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return ln.NONE;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let t=this._document.defaultView||window,n=t&&t.getComputedStyle?t.getComputedStyle(e):null,a=(n&&n.backgroundColor||"").replace(/ /g,"");switch(e.remove(),a){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return ln.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return ln.BLACK_ON_WHITE}return ln.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(Bl,Um,Gm),this._hasCheckedHighContrastMode=!0;let t=this.getHighContrastMode();t===ln.BLACK_ON_WHITE?e.add(Bl,Um):t===ln.WHITE_ON_BLACK&&e.add(Bl,Gm)}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),ma=(()=>{class i{constructor(){d(Km)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[go]})}return i})();var zg=200,Br=class{_letterKeyStream=new R;_items=[];_selectedItemIndex=-1;_pressedLetters=[];_skipPredicateFn;_selectedItem=new R;selectedItem=this._selectedItem;constructor(o,e){let t=typeof e?.debounceInterval=="number"?e.debounceInterval:zg;e?.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),this.setItems(o),this._setupKeyHandler(t)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(o){this._selectedItemIndex=o}setItems(o){this._items=o}handleKey(o){let e=o.keyCode;o.key&&o.key.length===1?this._letterKeyStream.next(o.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(o){this._letterKeyStream.pipe(mi(e=>this._pressedLetters.push(e)),jt(o),De(()=>this._pressedLetters.length>0),Ne(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(e=>{for(let t=1;t<this._items.length+1;t++){let n=(this._selectedItemIndex+t)%this._items.length,a=this._items[n];if(!this._skipPredicateFn?.(a)&&a.getLabel?.().toLocaleUpperCase().trim().indexOf(e)===0){this._selectedItem.next(a);break}}this._pressedLetters=[]})}};function Ge(i,...o){return o.length?o.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}var _o=class{_items;_activeItemIndex=T(-1);_activeItem=T(null);_wrap=!1;_typeaheadSubscription=ke.EMPTY;_itemChangesSubscription;_vertical=!0;_horizontal=null;_allowedModifierKeys=[];_homeAndEnd=!1;_pageUpAndDown={enabled:!1,delta:10};_effectRef;_typeahead;_skipPredicateFn=o=>o.disabled;constructor(o,e){this._items=o,o instanceof Ji?this._itemChangesSubscription=o.changes.subscribe(t=>this._itemsChanged(t.toArray())):Qi(o)&&(this._effectRef=Ut(()=>this._itemsChanged(o()),{injector:e}))}tabOut=new R;change=new R;skipPredicate(o){return this._skipPredicateFn=o,this}withWrap(o=!0){return this._wrap=o,this}withVerticalOrientation(o=!0){return this._vertical=o,this}withHorizontalOrientation(o){return this._horizontal=o,this}withAllowedModifierKeys(o){return this._allowedModifierKeys=o,this}withTypeAhead(o=200){this._typeaheadSubscription.unsubscribe();let e=this._getItemsArray();return this._typeahead=new Br(e,{debounceInterval:typeof o=="number"?o:void 0,skipPredicate:t=>this._skipPredicateFn(t)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(t=>{this.setActiveItem(t)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(o=!0){return this._homeAndEnd=o,this}withPageUpDown(o=!0,e=10){return this._pageUpAndDown={enabled:o,delta:e},this}setActiveItem(o){let e=this._activeItem();this.updateActiveItem(o),this._activeItem()!==e&&this.change.next(this._activeItemIndex())}onKeydown(o){let e=o.keyCode,n=["altKey","ctrlKey","metaKey","shiftKey"].every(a=>!o[a]||this._allowedModifierKeys.indexOf(a)>-1);switch(e){case 9:this.tabOut.next();return;case 40:if(this._vertical&&n){this.setNextItemActive();break}else return;case 38:if(this._vertical&&n){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&n){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&n){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&n){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&n){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&n){let a=this._activeItemIndex()-this._pageUpAndDown.delta;this._setActiveItemByIndex(a>0?a:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&n){let a=this._activeItemIndex()+this._pageUpAndDown.delta,r=this._getItemsArray().length;this._setActiveItemByIndex(a<r?a:r-1,-1);break}else return;default:(n||Ge(o,"shiftKey"))&&this._typeahead?.handleKey(o);return}this._typeahead?.reset(),o.preventDefault()}get activeItemIndex(){return this._activeItemIndex()}get activeItem(){return this._activeItem()}isTyping(){return!!this._typeahead&&this._typeahead.isTyping()}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._getItemsArray().length-1,-1)}setNextItemActive(){this._activeItemIndex()<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex()<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(o){let e=this._getItemsArray(),t=typeof o=="number"?o:e.indexOf(o),n=e[t];this._activeItem.set(n??null),this._activeItemIndex.set(t),this._typeahead?.setCurrentSelectedItemIndex(t)}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._effectRef?.destroy(),this._typeahead?.destroy(),this.tabOut.complete(),this.change.complete()}_setActiveItemByDelta(o){this._wrap?this._setActiveInWrapMode(o):this._setActiveInDefaultMode(o)}_setActiveInWrapMode(o){let e=this._getItemsArray();for(let t=1;t<=e.length;t++){let n=(this._activeItemIndex()+o*t+e.length)%e.length,a=e[n];if(!this._skipPredicateFn(a)){this.setActiveItem(n);return}}}_setActiveInDefaultMode(o){this._setActiveItemByIndex(this._activeItemIndex()+o,o)}_setActiveItemByIndex(o,e){let t=this._getItemsArray();if(t[o]){for(;this._skipPredicateFn(t[o]);)if(o+=e,!t[o])return;this.setActiveItem(o)}}_getItemsArray(){return Qi(this._items)?this._items():this._items instanceof Ji?this._items.toArray():this._items}_itemsChanged(o){this._typeahead?.setItems(o);let e=this._activeItem();if(e){let t=o.indexOf(e);t>-1&&t!==this._activeItemIndex()&&(this._activeItemIndex.set(t),this._typeahead?.setCurrentSelectedItemIndex(t))}}};var zn=class extends _o{setActiveItem(o){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(o),this.activeItem&&this.activeItem.setActiveStyles()}};var dn=class extends _o{_origin="program";setFocusOrigin(o){return this._origin=o,this}setActiveItem(o){super.setActiveItem(o),this.activeItem&&this.activeItem.focus(this._origin)}};var Zm=new Map,xe=class i{_appId=d(Tn);static _infix=`a${Math.floor(Math.random()*1e5).toString()}`;getId(o,e=!1){this._appId!=="ng"&&(o+=this._appId);let t=Zm.get(o);return t===void 0?t=0:t++,Zm.set(o,t),`${o}${e?i._infix+"-":""}${t}`}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})};var Jm=" ";function jg(i,o,e){let t=jr(i,o);e=e.trim(),!t.some(n=>n.trim()===e)&&(t.push(e),i.setAttribute(o,t.join(Jm)))}function Hg(i,o,e){let t=jr(i,o);e=e.trim();let n=t.filter(a=>a!==e);n.length?i.setAttribute(o,n.join(Jm)):i.removeAttribute(o)}function jr(i,o){return i.getAttribute(o)?.match(/\S+/g)??[]}var eu="cdk-describedby-message",zr="cdk-describedby-host",Gl=0,tu=(()=>{class i{_platform=d(ce);_document=d(q);_messageRegistry=new Map;_messagesContainer=null;_id=`${Gl++}`;constructor(){d(Be).load(sn),this._id=d(Tn)+"-"+Gl++}describe(e,t,n){if(!this._canBeDescribed(e,t))return;let a=Ul(t,n);typeof t!="string"?(Qm(t,this._id),this._messageRegistry.set(a,{messageElement:t,referenceCount:0})):this._messageRegistry.has(a)||this._createMessageElement(t,n),this._isElementDescribedByMessage(e,a)||this._addMessageReference(e,a)}removeDescription(e,t,n){if(!t||!this._isElementNode(e))return;let a=Ul(t,n);if(this._isElementDescribedByMessage(e,a)&&this._removeMessageReference(e,a),typeof t=="string"){let r=this._messageRegistry.get(a);r&&r.referenceCount===0&&this._deleteMessageElement(a)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let e=this._document.querySelectorAll(`[${zr}="${this._id}"]`);for(let t=0;t<e.length;t++)this._removeCdkDescribedByReferenceIds(e[t]),e[t].removeAttribute(zr);this._messagesContainer?.remove(),this._messagesContainer=null,this._messageRegistry.clear()}_createMessageElement(e,t){let n=this._document.createElement("div");Qm(n,this._id),n.textContent=e,t&&n.setAttribute("role",t),this._createMessagesContainer(),this._messagesContainer.appendChild(n),this._messageRegistry.set(Ul(e,t),{messageElement:n,referenceCount:0})}_deleteMessageElement(e){this._messageRegistry.get(e)?.messageElement?.remove(),this._messageRegistry.delete(e)}_createMessagesContainer(){if(this._messagesContainer)return;let e="cdk-describedby-message-container",t=this._document.querySelectorAll(`.${e}[platform="server"]`);for(let a=0;a<t.length;a++)t[a].remove();let n=this._document.createElement("div");n.style.visibility="hidden",n.classList.add(e),n.classList.add("cdk-visually-hidden"),this._platform.isBrowser||n.setAttribute("platform","server"),this._document.body.appendChild(n),this._messagesContainer=n}_removeCdkDescribedByReferenceIds(e){let t=jr(e,"aria-describedby").filter(n=>n.indexOf(eu)!=0);e.setAttribute("aria-describedby",t.join(" "))}_addMessageReference(e,t){let n=this._messageRegistry.get(t);jg(e,"aria-describedby",n.messageElement.id),e.setAttribute(zr,this._id),n.referenceCount++}_removeMessageReference(e,t){let n=this._messageRegistry.get(t);n.referenceCount--,Hg(e,"aria-describedby",n.messageElement.id),e.removeAttribute(zr)}_isElementDescribedByMessage(e,t){let n=jr(e,"aria-describedby"),a=this._messageRegistry.get(t),r=a&&a.messageElement.id;return!!r&&n.indexOf(r)!=-1}_canBeDescribed(e,t){if(!this._isElementNode(e))return!1;if(t&&typeof t=="object")return!0;let n=t==null?"":`${t}`.trim(),a=e.getAttribute("aria-label");return n?!a||a.trim()!==n:!1}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function Ul(i,o){return typeof i=="string"?`${o||""}/${i}`:i}function Qm(i,o){i.id||(i.id=`${eu}-${o}-${Gl++}`)}var du=(()=>{class i{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,t){this._renderer=e,this._elementRef=t}setProperty(e,t){this._renderer.setProperty(this._elementRef.nativeElement,e,t)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(t){return new(t||i)(ge(Ce),ge(N))};static \u0275dir=S({type:i})}return i})(),mu=(()=>{class i extends du{static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,features:[Q]})}return i})(),Ii=new w("");var Ug={provide:Ii,useExisting:nt(()=>Ri),multi:!0};function Gg(){let i=Jt()?Jt().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var $g=new w(""),Ri=(()=>{class i extends du{_compositionMode;_composing=!1;constructor(e,t,n){super(e,t),this._compositionMode=n,this._compositionMode==null&&(this._compositionMode=!Gg())}writeValue(e){let t=e??"";this.setProperty("value",t)}_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(t){return new(t||i)(ge(Ce),ge(N),ge($g,8))};static \u0275dir=S({type:i,selectors:[["input","formControlName","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControlName","",3,"ngNoCva",""],["input","formControl","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControl","",3,"ngNoCva",""],["input","ngModel","",3,"type","checkbox",3,"ngNoCva",""],["textarea","ngModel","",3,"ngNoCva",""],["","ngDefaultControl",""]],hostBindings:function(t,n){t&1&&E("input",function(r){return n._handleInput(r.target.value)})("blur",function(){return n.onTouched()})("compositionstart",function(){return n._compositionStart()})("compositionend",function(r){return n._compositionEnd(r.target.value)})},standalone:!1,features:[ee([Ug]),Q]})}return i})();function Xl(i){return i==null||Zl(i)===0}function Zl(i){return i==null?null:Array.isArray(i)||typeof i=="string"?i.length:i instanceof Set?i.size:null}var Ui=new w(""),Zr=new w(""),Wg=/^(?=.{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])?)*$/,st=class{static min(o){return uu(o)}static max(o){return hu(o)}static required(o){return pu(o)}static requiredTrue(o){return qg(o)}static email(o){return Kg(o)}static minLength(o){return Yg(o)}static maxLength(o){return Xg(o)}static pattern(o){return Zg(o)}static nullValidator(o){return Ur()}static compose(o){return yu(o)}static composeAsync(o){return Cu(o)}};function uu(i){return o=>{if(o.value==null||i==null)return null;let e=parseFloat(o.value);return!isNaN(e)&&e<i?{min:{min:i,actual:o.value}}:null}}function hu(i){return o=>{if(o.value==null||i==null)return null;let e=parseFloat(o.value);return!isNaN(e)&&e>i?{max:{max:i,actual:o.value}}:null}}function pu(i){return Xl(i.value)?{required:!0}:null}function qg(i){return i.value===!0?null:{required:!0}}function Kg(i){return Xl(i.value)||Wg.test(i.value)?null:{email:!0}}function Yg(i){return o=>{let e=o.value?.length??Zl(o.value);return e===null||e===0?null:e<i?{minlength:{requiredLength:i,actualLength:e}}:null}}function Xg(i){return o=>{let e=o.value?.length??Zl(o.value);return e!==null&&e>i?{maxlength:{requiredLength:i,actualLength:e}}:null}}function Zg(i){if(!i)return Ur;let o,e;return typeof i=="string"?(e="",i.charAt(0)!=="^"&&(e+="^"),e+=i,i.charAt(i.length-1)!=="$"&&(e+="$"),o=new RegExp(e)):(e=i.toString(),o=i),t=>{if(Xl(t.value))return null;let n=t.value;return o.test(n)?null:{pattern:{requiredPattern:e,actualValue:n}}}}function Ur(i){return null}function fu(i){return i!=null}function gu(i){return Ys(i)?Kc(i):i}function _u(i){let o={};return i.forEach(e=>{o=e!=null?V(V({},o),e):o}),Object.keys(o).length===0?null:o}function vu(i,o){return o.map(e=>e(i))}function Qg(i){return!i.validate}function bu(i){return i.map(o=>Qg(o)?o:e=>o.validate(e))}function yu(i){if(!i)return null;let o=i.filter(fu);return o.length==0?null:function(e){return _u(vu(e,o))}}function Ql(i){return i!=null?yu(bu(i)):null}function Cu(i){if(!i)return null;let o=i.filter(fu);return o.length==0?null:function(e){let t=vu(e,o).map(gu);return Za(t).pipe(Ne(_u))}}function Jl(i){return i!=null?Cu(bu(i)):null}function iu(i,o){return i===null?[o]:Array.isArray(i)?[...i,o]:[i,o]}function xu(i){return i._rawValidators}function wu(i){return i._rawAsyncValidators}function $l(i){return i?Array.isArray(i)?i:[i]:[]}function Gr(i,o){return Array.isArray(i)?i.includes(o):i===o}function nu(i,o){let e=$l(o);return $l(i).forEach(n=>{Gr(e,n)||e.push(n)}),e}function ou(i,o){return $l(o).filter(e=>!Gr(i,e))}var $r=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(o){this._rawValidators=o||[],this._composedValidatorFn=Ql(this._rawValidators)}_setAsyncValidators(o){this._rawAsyncValidators=o||[],this._composedAsyncValidatorFn=Jl(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(o){this._onDestroyCallbacks.push(o)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(o=>o()),this._onDestroyCallbacks=[]}reset(o=void 0){this.control?.reset(o)}hasError(o,e){return this.control?this.control.hasError(o,e):!1}getError(o,e){return this.control?this.control.getError(o,e):null}},Hi=class extends $r{name;get formDirective(){return null}get path(){return null}};var pa="VALID",Hr="INVALID",vo="PENDING",fa="DISABLED",mn=class{},Wr=class extends mn{value;source;constructor(o,e){super(),this.value=o,this.source=e}},_a=class extends mn{pristine;source;constructor(o,e){super(),this.pristine=o,this.source=e}},va=class extends mn{touched;source;constructor(o,e){super(),this.touched=o,this.source=e}},bo=class extends mn{status;source;constructor(o,e){super(),this.status=o,this.source=e}},qr=class extends mn{source;constructor(o){super(),this.source=o}},jn=class extends mn{source;constructor(o){super(),this.source=o}};function ec(i){return(Qr(i)?i.validators:i)||null}function Jg(i){return Array.isArray(i)?Ql(i):i||null}function tc(i,o){return(Qr(o)?o.asyncValidators:i)||null}function e_(i){return Array.isArray(i)?Jl(i):i||null}function Qr(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function Du(i,o,e){let t=i.controls;if(!(o?Object.keys(t):t).length)throw new se(1e3,"");if(!ku(t,e))throw new se(1001,"")}function Su(i,o,e){i._forEachChild((t,n)=>{if(e[n]===void 0)throw new se(-1002,"")})}var yo=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_hasRequired=T(!1);_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(o,e){this._assignValidators(o),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(o){this._rawValidators=this._composedValidatorFn=o,this._updateHasRequiredValidator()}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(o){this._rawAsyncValidators=this._composedAsyncValidatorFn=o}get parent(){return this._parent}get status(){return ft(this.statusReactive)}set status(o){ft(()=>this.statusReactive.set(o))}_status=$(()=>this.statusReactive());statusReactive=T(void 0);get valid(){return this.status===pa}get invalid(){return this.status===Hr}get pending(){return this.status===vo}get disabled(){return this.status===fa}get enabled(){return this.status!==fa}errors;get pristine(){return ft(this.pristineReactive)}set pristine(o){ft(()=>this.pristineReactive.set(o))}_pristine=$(()=>this.pristineReactive());pristineReactive=T(!0);get dirty(){return!this.pristine}get touched(){return ft(this.touchedReactive)}set touched(o){ft(()=>this.touchedReactive.set(o))}_touched=$(()=>this.touchedReactive());touchedReactive=T(!1);get untouched(){return!this.touched}_events=new R;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(o){this._assignValidators(o)}setAsyncValidators(o){this._assignAsyncValidators(o)}addValidators(o){this.setValidators(nu(o,this._rawValidators))}addAsyncValidators(o){this.setAsyncValidators(nu(o,this._rawAsyncValidators))}removeValidators(o){this.setValidators(ou(o,this._rawValidators))}removeAsyncValidators(o){this.setAsyncValidators(ou(o,this._rawAsyncValidators))}hasValidator(o){return Gr(this._rawValidators,o)}hasAsyncValidator(o){return Gr(this._rawAsyncValidators,o)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(o={}){let e=this.touched===!1;this.touched=!0;let t=o.sourceControl??this;o.onlySelf||this._parent?.markAsTouched(Fe(V({},o),{sourceControl:t})),e&&o.emitEvent!==!1&&this._events.next(new va(!0,t))}markAllAsDirty(o={}){this.markAsDirty({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(o))}markAllAsTouched(o={}){this.markAsTouched({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(o))}markAsUntouched(o={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let t=o.sourceControl??this;this._forEachChild(n=>{n.markAsUntouched({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:t})}),o.onlySelf||this._parent?._updateTouched(o,t),e&&o.emitEvent!==!1&&this._events.next(new va(!1,t))}markAsDirty(o={}){let e=this.pristine===!0;this.pristine=!1;let t=o.sourceControl??this;o.onlySelf||this._parent?.markAsDirty(Fe(V({},o),{sourceControl:t})),e&&o.emitEvent!==!1&&this._events.next(new _a(!1,t))}markAsPristine(o={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let t=o.sourceControl??this;this._forEachChild(n=>{n.markAsPristine({onlySelf:!0,emitEvent:o.emitEvent})}),o.onlySelf||this._parent?._updatePristine(o,t),e&&o.emitEvent!==!1&&this._events.next(new _a(!0,t))}markAsPending(o={}){this.status=vo;let e=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new bo(this.status,e)),this.statusChanges.emit(this.status)),o.onlySelf||this._parent?.markAsPending(Fe(V({},o),{sourceControl:e}))}disable(o={}){let e=this._parentMarkedDirty(o.onlySelf);this.status=fa,this.errors=null,this._forEachChild(n=>{n.disable(Fe(V({},o),{onlySelf:!0}))}),this._updateValue();let t=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new Wr(this.value,t)),this._events.next(new bo(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Fe(V({},o),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!0))}enable(o={}){let e=this._parentMarkedDirty(o.onlySelf);this.status=pa,this._forEachChild(t=>{t.enable(Fe(V({},o),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:o.emitEvent}),this._updateAncestors(Fe(V({},o),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(o,e){o.onlySelf||(this._parent?.updateValueAndValidity(o),o.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e))}setParent(o){this._parent=o}getRawValue(){return this.value}updateValueAndValidity(o={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let t=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===pa||this.status===vo)&&this._runAsyncValidator(t,o.emitEvent)}let e=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new Wr(this.value,e)),this._events.next(new bo(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),o.onlySelf||this._parent?.updateValueAndValidity(Fe(V({},o),{sourceControl:e}))}_updateTreeValidity(o={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(o)),this.updateValueAndValidity({onlySelf:!0,emitEvent:o.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?fa:pa}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(o,e){if(this.asyncValidator){this.status=vo,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:o!==!1};let t=gu(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(n=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(n,{emitEvent:e,shouldHaveEmitted:o})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let o=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,o}return!1}setErrors(o,e={}){this.errors=o,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(o){let e=o;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((t,n)=>t&&t._find(n),this)}getError(o,e){let t=e?this.get(e):this;return t?.errors?t.errors[o]:null}hasError(o,e){return!!this.getError(o,e)}get root(){let o=this;for(;o._parent;)o=o._parent;return o}_updateControlsErrors(o,e,t){this.status=this._calculateStatus(),o&&this.statusChanges.emit(this.status),(o||t)&&this._events.next(new bo(this.status,e)),this._parent&&this._parent._updateControlsErrors(o,e,t)}_initObservables(){this.valueChanges=new K,this.statusChanges=new K}_calculateStatus(){return this._allControlsDisabled()?fa:this.errors?Hr:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(vo)?vo:this._anyControlsHaveStatus(Hr)?Hr:pa}_anyControlsHaveStatus(o){return this._anyControls(e=>e.status===o)}_anyControlsDirty(){return this._anyControls(o=>o.dirty)}_anyControlsTouched(){return this._anyControls(o=>o.touched)}_updatePristine(o,e){let t=!this._anyControlsDirty(),n=this.pristine!==t;this.pristine=t,o.onlySelf||this._parent?._updatePristine(o,e),n&&this._events.next(new _a(this.pristine,e))}_updateTouched(o={},e){this.touched=this._anyControlsTouched(),this._events.next(new va(this.touched,e)),o.onlySelf||this._parent?._updateTouched(o,e)}_onDisabledChange=[];_registerOnCollectionChange(o){this._onCollectionChange=o}_setUpdateStrategy(o){Qr(o)&&o.updateOn!=null&&(this._updateOn=o.updateOn)}_parentMarkedDirty(o){return!o&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(o){return null}_assignValidators(o){this._rawValidators=Array.isArray(o)?o.slice():o,this._composedValidatorFn=Jg(this._rawValidators),this._updateHasRequiredValidator()}_assignAsyncValidators(o){this._rawAsyncValidators=Array.isArray(o)?o.slice():o,this._composedAsyncValidatorFn=e_(this._rawAsyncValidators)}_updateHasRequiredValidator(){ft(()=>this._hasRequired.set(this.hasValidator(st.required)))}};function ku(i,o){return Object.hasOwn(i,o)}function t_(i){return i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"}function i_(i,o,e,t){switch(e){case"name":i.setAttribute(o,e,t);break;case"disabled":case"readonly":case"required":t?i.setAttribute(o,e,""):i.removeAttribute(o,e);break;case"max":case"min":case"minLength":case"maxLength":t!==void 0?i.setAttribute(o,e,t.toString()):i.removeAttribute(o,e);break}}var Wl=class{kind;context;control;message;constructor({kind:o,context:e,control:t}){this.kind=o,this.context=e,this.control=t}};function Mu(i){return typeof i=="number"?i:parseFloat(i)}var ic=(()=>{class i{_validator=Ur;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let t=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(t),this._validator=this._enabled?this.createValidator(t):Ur,this._onChange?.()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,features:[Ee]})}return i})(),n_={provide:Ui,useExisting:nt(()=>nc),multi:!0},nc=(()=>{class i extends ic{max;inputName="max";normalizeInput=e=>Mu(e);createValidator=e=>hu(e);static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(t,n){t&2&&Z("max",n._enabled?n.max:null)},inputs:{max:"max"},standalone:!1,features:[ee([n_]),Q]})}return i})(),o_={provide:Ui,useExisting:nt(()=>oc),multi:!0},oc=(()=>{class i extends ic{min;inputName="min";normalizeInput=e=>Mu(e);createValidator=e=>uu(e);static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(t,n){t&2&&Z("min",n._enabled?n.min:null)},inputs:{min:"min"},standalone:!1,features:[ee([o_]),Q]})}return i})(),a_={provide:Ui,useExisting:nt(()=>Jr),multi:!0};var Jr=(()=>{class i extends ic{required;inputName="required";normalizeInput=L;createValidator=e=>pu;enabled(e){return e}static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,n){t&2&&Z("required",n._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[ee([a_]),Q]})}return i})();var r_=new w(""),ya=new w("",{factory:()=>es}),es="always";function Eu(i,o){return[...o.path,i]}function ql(i,o,e=es){ac(i,o),o.valueAccessor.writeValue(i.value),(i.disabled||e==="always")&&o.valueAccessor.setDisabledState?.(i.disabled),l_(i,o),d_(i,o),c_(i,o),s_(i,o)}function au(i,o,e=!0){let t=()=>{};o?.valueAccessor?.registerOnChange(t),o?.valueAccessor?.registerOnTouched(t),Yr(i,o),i&&(o._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function Kr(i,o){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(o)})}function s_(i,o){if(o.valueAccessor.setDisabledState){let e=t=>{o.valueAccessor.setDisabledState(t)};i.registerOnDisabledChange(e),o._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}function ac(i,o){let e=xu(i);o.validator!==null?i.setValidators(iu(e,o.validator)):typeof e=="function"&&i.setValidators([e]);let t=wu(i);o.asyncValidator!==null?i.setAsyncValidators(iu(t,o.asyncValidator)):typeof t=="function"&&i.setAsyncValidators([t]);let n=()=>i.updateValueAndValidity();Kr(o._rawValidators,n),Kr(o._rawAsyncValidators,n)}function Yr(i,o){let e=!1;if(i!==null){if(o.validator!==null){let n=xu(i);if(Array.isArray(n)&&n.length>0){let a=n.filter(r=>r!==o.validator);a.length!==n.length&&(e=!0,i.setValidators(a))}}if(o.asyncValidator!==null){let n=wu(i);if(Array.isArray(n)&&n.length>0){let a=n.filter(r=>r!==o.asyncValidator);a.length!==n.length&&(e=!0,i.setAsyncValidators(a))}}}let t=()=>{};return Kr(o._rawValidators,t),Kr(o._rawAsyncValidators,t),e}function l_(i,o){o.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Au(i,o)})}function c_(i,o){o.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Au(i,o),i.updateOn!=="submit"&&i.markAsTouched()})}function Au(i,o){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),o.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function d_(i,o){let e=(t,n)=>{o.valueAccessor.writeValue(t),n&&o.viewToModelUpdate(t)};i.registerOnChange(e),o._registerOnDestroy(()=>{i._unregisterOnChange(e)})}function Tu(i,o){i==null,ac(i,o)}function m_(i,o){return Yr(i,o)}function Iu(i,o){if(!i.hasOwnProperty("model"))return!1;let e=i.model;return e.isFirstChange()?!0:!Object.is(o,e.currentValue)}function u_(i){return Object.getPrototypeOf(i.constructor)===mu}function Ru(i,o){i._syncPendingControls(),o.forEach(e=>{let t=e.control;t.updateOn==="submit"&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function h_(i,o){if(!o)return null;Array.isArray(o);let e,t,n;return o.forEach(a=>{a.constructor===Ri?e=a:u_(a)?t=a:n=a}),n||t||e||null}function p_(i,o){let e=i.indexOf(o);e>-1&&i.splice(e,1)}var Ou={provide:r_,useFactory:()=>{let i=d(ii,{self:!0});return{setParseErrors:o=>{i.setParseErrorSource(o)},set onReset(o){i.onReset=o}}}},ii=class extends $r{_parent=null;name=null;valueAccessor=null;isCustomControlBased=!1;userOnReset;resetSubscription;set onReset(o){this.userOnReset=o,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof jn&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription?.add(this.resetSubscription))}isNativeFormElement=!1;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=h_(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(o,e,t){super(),this.injector=o,this.renderer=e,this.rawValueAccessors=t,this.injector?.get(Ht)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe()})}setupCustomControl(){this.subscription?.unsubscribe();let o=this.injector?.get(ie);if(!this.control||!o)return;let e=o.markForCheck.bind(o);this.subscription=new ke,this.subscription.add(this.control.valueChanges.subscribe(e)),this.subscription.add(this.control.statusChanges.subscribe(e)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(t=>{t instanceof jn&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator)}ngControlCreate(o){!o.nativeElement.hasAttribute?.("ngNoCva")&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!o.customControl||(this.isCustomControlBased=!0,o.listenToCustomControlModel(n=>{this.control?.setValue(n,{emitModelToViewChange:!1}),this.control?.markAsDirty(),this.viewToModelUpdate(n)}),o.listenToCustomControlOutput("touch",()=>{this.control?.markAsTouched()}),this.customControlBindings={},this.isNativeFormElement=t_(o.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(n=>n instanceof Jr))}ngControlUpdate(o,e){if(!this.isCustomControlBased)return;let t=this.control,n=this.customControlBindings;Object.is(n.value,t.value)||(n.value=t.value,o.setCustomControlModelInput(t.value)),this.bindControlProperty(o,n,"touched",t.touched),this.bindControlProperty(o,n,"dirty",t.dirty),this.bindControlProperty(o,n,"valid",t.valid),this.bindControlProperty(o,n,"invalid",t.invalid),this.bindControlProperty(o,n,"pending",t.pending),this.bindControlProperty(o,n,"disabled",t.disabled),this.shouldBindRequired&&this.bindControlProperty(o,n,"required",this.isRequired);let a=t.errors;if(n.errors!==a){n.errors=a;let r=this._convertErrors(a);o.setInputOnDirectives("errors",r)}}get isRequired(){return(this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??!1}get shouldBindRequired(){return!0}bindControlProperty(o,e,t,n){if(e[t]===n)return;e[t]=n;let a=o.setInputOnDirectives(t,n);this.isNativeFormElement&&!a&&(t==="disabled"||t==="required")&&this.renderer&&i_(this.renderer,o.nativeElement,t,n)}_convertErrors(o){if(o===null)return[];let e=this.control;return Object.entries(o).map(([t,n])=>new Wl({context:n,kind:t,control:e}))}setParseErrorSource(o){if(o===void 0)return;let e=null,t=$(()=>{let n=o();return n.length===0?null:n.reduce((a,r)=>(a[r.kind]=r,a),{})});this.parseErrorsValidator=(()=>e).bind(this),Ut(()=>{e=t(),this.control?.updateValueAndValidity({emitEvent:!1})},{injector:this.injector})}removeParseErrorsValidator(o){this.parseErrorsValidator&&(o?.removeValidators(this.parseErrorsValidator),o?.updateValueAndValidity({emitEvent:!1}))}},Xr=class{_cd;constructor(o){this._cd=o}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}};var Oi=(()=>{class i extends Xr{constructor(e){super(e)}static \u0275fac=function(t){return new(t||i)(ge(ii,2))};static \u0275dir=S({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,n){t&2&&p("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)},standalone:!1,features:[Q]})}return i})(),un=(()=>{class i extends Xr{constructor(e){super(e)}static \u0275fac=function(t){return new(t||i)(ge(Hi,10))};static \u0275dir=S({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,n){t&2&&p("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)("ng-submitted",n.isSubmitted)},standalone:!1,features:[Q]})}return i})(),Co=class extends yo{constructor(o,e,t){super(ec(e),tc(t,e)),this.controls=o,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(o,e){let t=this._find(o);return t||(this.controls[o]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(o,e,t={}){this.registerControl(o,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}removeControl(o,e={}){let t=this._find(o);t&&t._registerOnCollectionChange(()=>{}),delete this.controls[o],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(o,e,t={}){let n=this._find(o);n&&n._registerOnCollectionChange(()=>{}),delete this.controls[o],e&&this.registerControl(o,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}contains(o){return this._find(o)?.enabled===!0}setValue(o,e={}){ft(()=>{Su(this,!0,o),Object.keys(o).forEach(t=>{Du(this,!0,t),this.controls[t].setValue(o[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)})}patchValue(o,e={}){o!=null&&(Object.keys(o).forEach(t=>{let n=this._find(t);n&&n.patchValue(o[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(o={},e={}){this._forEachChild((t,n)=>{t.reset(o?o[n]:null,Fe(V({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new jn(this))}getRawValue(){return this._reduceChildren({},(o,e,t)=>(o[t]=e.getRawValue(),o))}_syncPendingControls(){let o=this._reduceChildren(!1,(e,t)=>t._syncPendingControls()?!0:e);return o&&this.updateValueAndValidity({onlySelf:!0}),o}_forEachChild(o){Object.keys(this.controls).forEach(e=>{let t=this.controls[e];t&&o(t,e)})}_setUpControls(){this._forEachChild(o=>{o.setParent(this),o._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(o){for(let[e,t]of Object.entries(this.controls))if(this.contains(e)&&o(t))return!0;return!1}_reduceValue(){let o={};return this._reduceChildren(o,(e,t,n)=>((t.enabled||this.disabled)&&(e[n]=t.value),e))}_reduceChildren(o,e){let t=o;return this._forEachChild((n,a)=>{t=e(t,n,a)}),t}_allControlsDisabled(){for(let o of Object.keys(this.controls))if(this.controls[o].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(o){return ku(this.controls,o)?this.controls[o]:null}};var Kl=class extends Co{};var f_={provide:Hi,useExisting:nt(()=>Ca)},ga=Promise.resolve(),Ca=(()=>{class i extends Hi{callSetDisabledState;get submitted(){return ft(this.submittedReactive)}_submitted=$(()=>this.submittedReactive());submittedReactive=T(!1);_directives=new Set;form;ngSubmit=new K;options;constructor(e,t,n){super(),this.callSetDisabledState=n,this.form=new Co({},Ql(e),Jl(t))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){ga.then(()=>{let t=this._findContainer(e.path);e.control=t.registerControl(e.name,e.control),e._setupWithForm(this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){ga.then(()=>{this._findContainer(e.path)?.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){ga.then(()=>{let t=this._findContainer(e.path),n=new Co({});Tu(n,e),t.registerControl(e.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){ga.then(()=>{this._findContainer(e.path)?.removeControl?.(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,t){ga.then(()=>{this.form.get(e.path).setValue(t)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),Ru(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new qr(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_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(t){return new(t||i)(ge(Ui,10),ge(Zr,10),ge(ya,8))};static \u0275dir=S({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,n){t&1&&E("submit",function(r){return n.onSubmit(r)})("reset",function(){return n.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[ee([f_]),Q]})}return i})();function ru(i,o){let e=i.indexOf(o);e>-1&&i.splice(e,1)}function su(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var ba=class extends yo{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(o=null,e,t){super(ec(e),tc(t,e)),this._applyFormState(o),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Qr(e)&&(e.nonNullable||e.initialValueIsDefault)&&(su(o)?this.defaultValue=o.value:this.defaultValue=o)}setValue(o,e={}){ft(()=>{this.value=this._pendingValue=o,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(t=>t(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)})}patchValue(o,e={}){this.setValue(o,e)}reset(o=this.defaultValue,e={}){this._applyFormState(o),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new jn(this))}_updateValue(){}_anyControls(o){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(o){this._onChange.push(o)}_unregisterOnChange(o){ru(this._onChange,o)}registerOnDisabledChange(o){this._onDisabledChange.push(o)}_unregisterOnDisabledChange(o){ru(this._onDisabledChange,o)}_forEachChild(o){}_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(o){su(o)?(this.value=this._pendingValue=o.value,o.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=o}};var g_=i=>i instanceof ba;var __={provide:ii,useExisting:nt(()=>rc)},lu=Promise.resolve(),rc=(()=>{class i extends ii{_changeDetectorRef;callSetDisabledState;control=new ba;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new K;constructor(e,t,n,a,r,u,h,g){super(h,g,a),this._changeDetectorRef=r,this.callSetDisabledState=u,this._parent=e,this._setValidators(t),this._setAsyncValidators(n)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let t=e.name.previousValue;this.formDirective.removeControl({name:t,path:this._getPath(t)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),Iu(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}\u0275ngControlCreate(e){super.ngControlCreate(e)}\u0275ngControlUpdate(e){super.ngControlUpdate(e,!1)}get shouldBindRequired(){return!1}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(){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,ql(this.control,this,this.callSetDisabledState)),this.control.updateValueAndValidity({emitEvent:!1})}_setupWithForm(e){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,ql(this.control,this,e))}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){lu.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let t=e.isDisabled.currentValue,n=t!==0&&L(t);lu.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Eu(e,this._parent):[e]}static \u0275fac=function(t){return new(t||i)(ge(Hi,9),ge(Ui,10),ge(Zr,10),ge(Ii,10),ge(ie,8),ge(ya,8),ge(X,8),ge(Ce,8))};static \u0275dir=S({type:i,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:[ee([__,Ou]),Q,Ee,Zs(null)]})}return i})();var xo=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return i})(),v_={provide:Ii,useExisting:nt(()=>xa),multi:!0},xa=(()=>{class i extends mu{writeValue(e){let t=e??"";this.setProperty("value",t)}registerOnChange(e){this.onChange=t=>{e(t==""?null:parseFloat(t))}}static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["input","type","number","formControlName","",3,"ngNoCva",""],["input","type","number","formControl","",3,"ngNoCva",""],["input","type","number","ngModel","",3,"ngNoCva",""]],hostBindings:function(t,n){t&1&&E("input",function(r){return n.onChange(r.target.value)})("blur",function(){return n.onTouched()})},standalone:!1,features:[ee([v_]),Q]})}return i})();var Yl=class extends yo{constructor(o,e,t){super(ec(e),tc(t,e)),this.controls=o,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(o){return this.controls[this._adjustIndex(o)]}push(o,e={}){Array.isArray(o)?o.forEach(t=>{this.controls.push(t),this._registerControl(t)}):(this.controls.push(o),this._registerControl(o)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(o,e,t={}){this.controls.splice(o,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent})}removeAt(o,e={}){let t=this._adjustIndex(o);t<0&&(t=0),this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(o,e,t={}){let n=this._adjustIndex(o);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),e&&(this.controls.splice(n,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(o,e={}){ft(()=>{Su(this,!1,o),o.forEach((t,n)=>{Du(this,!1,n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)})}patchValue(o,e={}){o!=null&&(o.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(o=[],e={}){this._forEachChild((t,n)=>{t.reset(o[n],Fe(V({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new jn(this))}getRawValue(){return this.controls.map(o=>o.getRawValue())}clear(o={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:o.emitEvent}))}_adjustIndex(o){return o<0?o+this.length:o}_syncPendingControls(){let o=this.controls.reduce((e,t)=>t._syncPendingControls()?!0:e,!1);return o&&this.updateValueAndValidity({onlySelf:!0}),o}_forEachChild(o){this.controls.forEach((e,t)=>{o(e,t)})}_updateValue(){this.value=this.controls.filter(o=>o.enabled||this.disabled).map(o=>o.value)}_anyControls(o){return this.controls.some(e=>e.enabled&&o(e))}_setUpControls(){this._forEachChild(o=>this._registerControl(o))}_allControlsDisabled(){for(let o of this.controls)if(o.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(o){o.setParent(this),o._registerOnCollectionChange(this._onCollectionChange)}_find(o){return this.at(o)??null}};var b_=(()=>{class i extends Hi{callSetDisabledState;get submitted(){return ft(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=$(()=>this._submittedReactive());_submittedReactive=T(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,t,n){super(),this.callSetDisabledState=n,this._setValidators(e),this._setAsyncValidators(t)}ngOnChanges(e){this.onChanges(e)}ngOnDestroy(){this.onDestroy()}onChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}onDestroy(){this.form&&(Yr(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get path(){return[]}addControl(e){let t=this.form.get(e.path);return e._setupWithForm(t,this.callSetDisabledState),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t}getControl(e){return this.form.get(e.path)}removeControl(e){au(e.control||null,e,!1),p_(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}getFormArray(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}updateModel(e,t){this.form.get(e.path).setValue(t)}onReset(){this.resetForm()}resetForm(e=void 0,t={}){this.form.reset(e,t),this._submittedReactive.set(!1)}onSubmit(e){return this.submitted=!0,Ru(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new qr(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let t=e.control,n=this.form.get(e.path);t!==n&&(au(t||null,e),g_(n)&&e._setupWithForm(n,this.callSetDisabledState))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let t=this.form.get(e.path);Tu(t,e),t.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){let t=this.form?.get(e.path);t&&m_(t,e)&&t.updateValueAndValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm?._registerOnCollectionChange(()=>{})}_updateValidators(){ac(this.form,this),this._oldForm&&Yr(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(t){return new(t||i)(ge(Ui,10),ge(Zr,10),ge(ya,8))};static \u0275dir=S({type:i,features:[Q,Ee]})}return i})();var Pu=new w("");var y_={provide:ii,useExisting:nt(()=>Gi)},Gi=(()=>{class i extends ii{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new K;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,t,n,a,r,u,h){super(h,u,a),this._ngModelWarningConfig=r,this._parent=e,this._setValidators(t),this._setAsyncValidators(n)}_setupWithForm(e,t){this.control=e,this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,ql(e,this,t))}ngOnChanges(e){this._added||this._setUpControl(),Iu(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective?.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Eu(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}\u0275ngControlCreate(e){super.ngControlCreate(e)}\u0275ngControlUpdate(e){this.isCustomControlBased&&(this._added||this._setUpControl(),super.ngControlUpdate(e,!0))}static \u0275fac=function(t){return new(t||i)(ge(Hi,13),ge(Ui,10),ge(Zr,10),ge(Ii,10),ge(Pu,8),ge(Ce,8),ge(X,8))};static \u0275dir=S({type:i,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[ee([y_,Ou]),Q,Ee,Zs(null)]})}return i})();var C_={provide:Hi,useExisting:nt(()=>Wt)},Wt=(()=>{class i extends b_{form=null;ngSubmit=new K;get control(){return this.form}static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","formGroup",""]],hostBindings:function(t,n){t&1&&E("submit",function(r){return n.onSubmit(r)})("reset",function(){return n.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[ee([C_]),Q]})}return i})();var Fu=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({})}return i})();function cu(i){return!!i&&(i.asyncValidators!==void 0||i.validators!==void 0||i.updateOn!==void 0)}var hn=(()=>{class i{useNonNullable=!1;get nonNullable(){let e=new i;return e.useNonNullable=!0,e}group(e,t=null){let n=this._reduceControls(e),a={};return cu(t)?a=t:t!==null&&(a.validators=t.validator,a.asyncValidators=t.asyncValidator),new Co(n,a)}record(e,t=null){let n=this._reduceControls(e);return new Kl(n,t)}control(e,t,n){let a={};return this.useNonNullable?(cu(t)?a=t:(a.validators=t,a.asyncValidators=n),new ba(e,Fe(V({},a),{nonNullable:!0}))):new ba(e,t,n)}array(e,t,n){let a=e.map(r=>this._createControl(r));return new Yl(a,t,n)}_reduceControls(e){let t={};return Object.keys(e).forEach(n=>{t[n]=this._createControl(e[n])}),t}_createControl(e){if(e instanceof ba)return e;if(e instanceof yo)return e;if(Array.isArray(e)){let t=e[0],n=e.length>1?e[1]:null,a=e.length>2?e[2]:null;return this.control(t,n,a)}else return this.control(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var pn=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:ya,useValue:e.callSetDisabledState??es}]}}static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[Fu]})}return i})(),fn=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Pu,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:ya,useValue:e.callSetDisabledState??es}]}}static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[Fu]})}return i})();var Nu=new w("MAT_INPUT_VALUE_ACCESSOR");var sc=class{_box;_destroyed=new R;_resizeSubject=new R;_resizeObserver;_elementObservables=new Map;constructor(o){this._box=o,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(o){return this._elementObservables.has(o)||this._elementObservables.set(o,new wt(e=>{let t=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(o,{box:this._box}),()=>{this._resizeObserver?.unobserve(o),t.unsubscribe(),this._elementObservables.delete(o)}}).pipe(De(e=>e.some(t=>t.target===o)),Gs({bufferSize:1,refCount:!0}),re(this._destroyed))),this._elementObservables.get(o)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},Lu=(()=>{class i{_cleanupErrorListener;_observers=new Map;_ngZone=d(U);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(e,t){let n=t?.box||"content-box";return this._observers.has(n)||this._observers.set(n,new sc(n)),this._observers.get(n).observe(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var x_=["notch"],w_=["*"],Vu=["iconPrefixContainer"],Bu=["textPrefixContainer"],zu=["iconSuffixContainer"],ju=["textSuffixContainer"],D_=["textField"],S_=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],k_=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function M_(i,o){i&1&&_(0,"span",21)}function E_(i,o){if(i&1&&(s(0,"label",20),G(1,1),k(2,M_,1,0,"span",21),l()),i&2){let e=C(2);x("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),Z("for",e._control.disableAutomaticLabeling?null:e._control.id),c(2),M(!e.hideRequiredMarker&&e._control.required?2:-1)}}function A_(i,o){if(i&1&&k(0,E_,3,5,"label",20),i&2){let e=C();M(e._hasFloatingLabel()?0:-1)}}function T_(i,o){i&1&&_(0,"div",7)}function I_(i,o){}function R_(i,o){if(i&1&&He(0,I_,0,0,"ng-template",13),i&2){C(2);let e=Le(1);x("ngTemplateOutlet",e)}}function O_(i,o){if(i&1&&(s(0,"div",9),k(1,R_,1,1,null,13),l()),i&2){let e=C();x("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),c(),M(e._forceDisplayInfixLabel()?-1:1)}}function P_(i,o){i&1&&(s(0,"div",10,2),G(2,2),l())}function F_(i,o){i&1&&(s(0,"div",11,3),G(2,3),l())}function N_(i,o){}function L_(i,o){if(i&1&&He(0,N_,0,0,"ng-template",13),i&2){C();let e=Le(1);x("ngTemplateOutlet",e)}}function V_(i,o){i&1&&(s(0,"div",14,4),G(2,4),l())}function B_(i,o){i&1&&(s(0,"div",15,5),G(2,5),l())}function z_(i,o){i&1&&_(0,"div",16)}function j_(i,o){i&1&&(s(0,"div",18),G(1,6),l())}function H_(i,o){if(i&1&&(s(0,"mat-hint",22),m(1),l()),i&2){let e=C(2);x("id",e._hintLabelId),c(),B(e.hintLabel)}}function U_(i,o){if(i&1&&(s(0,"div",19),k(1,H_,2,2,"mat-hint",22),G(2,7),_(3,"div",23),G(4,8),l()),i&2){let e=C();c(),M(e.hintLabel?1:-1)}}var Lt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["mat-label"]]})}return i})(),Ku=new w("MatError"),gn=(()=>{class i{id=d(xe).getId("mat-mdc-error-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["mat-error"],["","matError",""]],hostAttrs:[1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(t,n){t&2&&dt("id",n.id)},inputs:{id:"id"},features:[ee([{provide:Ku,useExisting:i}])]})}return i})(),is=(()=>{class i{align="start";id=d(xe).getId("mat-mdc-hint-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(t,n){t&2&&(dt("id",n.id),Z("align",null),p("mat-mdc-form-field-hint-end",n.align==="end"))},inputs:{align:"align",id:"id"}})}return i})(),G_=new w("MatPrefix");var $_=new w("MatSuffix");var Yu=new w("FloatingLabelParent"),Hu=(()=>{class i{_elementRef=d(N);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(Lu);_ngZone=d(U);_parent=d(Yu);_resizeSubscription=new ke;ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return W_(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(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(t,n){t&2&&p("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return i})();function W_(i){let o=i;if(o.offsetParent!==null)return o.scrollWidth;let e=o.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let t=e.scrollWidth;return e.remove(),t}var Uu="mdc-line-ripple--active",ts="mdc-line-ripple--deactivating",Gu=(()=>{class i{_elementRef=d(N);_cleanupTransitionEnd;constructor(){let e=d(U),t=d(Ce);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=t.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove(ts),e.add(Uu)}deactivate(){this._elementRef.nativeElement.classList.add(ts)}_handleTransitionEnd=e=>{let t=this._elementRef.nativeElement.classList,n=t.contains(ts);e.propertyName==="opacity"&&n&&t.remove(Uu,ts)};ngOnDestroy(){this._cleanupTransitionEnd()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return i})(),$u=(()=>{class i{_elementRef=d(N);_ngZone=d(U);open=!1;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,t=e.querySelector(".mdc-floating-label");t?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="")}))):e.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(e){let t=this._notch.nativeElement;!this.open||!e?t.style.width="":t.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(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(t,n){if(t&1&&Ae(x_,5),t&2){let a;P(a=F())&&(n._notch=a.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(t,n){t&2&&p("mdc-notched-outline--notched",n.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},ngContentSelectors:w_,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(t,n){t&1&&(fe(),pt(0,"div",1),Re(1,"div",2,0),G(3),Ue(),pt(4,"div",3))},encapsulation:2})}return i})(),Da=(()=>{class i{value=null;stateChanges;id;placeholder;ngControl=null;focused=!1;empty=!1;shouldLabelFloat=!1;required=!1;disabled=!1;errorState=!1;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i})}return i})();var Hn=new w("MatFormField"),q_=new w("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Wu="fill",K_="auto",qu="fixed",Y_="translateY(-50%)",Et=(()=>{class i{_elementRef=d(N);_changeDetectorRef=d(ie);_platform=d(ce);_idGenerator=d(xe);_ngZone=d(U);_defaults=d(q_,{optional:!0});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=Wo("iconPrefixContainer");_textPrefixContainerSignal=Wo("textPrefixContainer");_iconSuffixContainerSignal=Wo("iconSuffixContainer");_textSuffixContainerSignal=Wo("textSuffixContainer");_prefixSuffixContainers=$(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=_d(Lt);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=mt(e)}_hideRequiredMarker=!1;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||K_}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let t=e||this._defaults?.appearance||Wu;this._appearanceSignal.set(t)}_appearanceSignal=T(Wu);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||qu}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||qu}_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 R;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=_e();constructor(){let e=this._defaults,t=d(qe);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),Ut(()=>this._currentDirection=t.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=$(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(e){let t=this._control,n="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(n+e.controlType),t.controlType&&this._elementRef.nativeElement.classList.add(n+t.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=t.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck()}),this._describedByChanges?.unsubscribe(),this._describedByChanges=t.stateChanges.pipe(Me([void 0,void 0]),Ne(()=>[t.errorState,t.userAriaDescribedBy]),Us(),De(([[a,r],[u,h]])=>a!==u||r!==h)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),t.ngControl&&t.ngControl.valueChanges&&(this._valueChanges=t.ngControl.valueChanges.pipe(re(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(),$e(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(){yd({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=$(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(e){let t=this._control?this._control.ngControl:null;return t&&t[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 a=this._hintChildren?this._hintChildren.find(u=>u.align==="start"):null,r=this._hintChildren?this._hintChildren.find(u=>u.align==="end"):null;a?e.push(a.id):this._hintLabel&&e.push(this._hintLabelId),r&&e.push(r.id)}else this._errorChildren&&e.push(...this._errorChildren.map(a=>a.id));let t=this._control.describedByIds,n;if(t){let a=this._describedByIds||e;n=e.concat(t.filter(r=>r&&!a.includes(r)))}else n=e;this._control.setDescribedByIds(n),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,t=this._textPrefixContainer?.nativeElement,n=this._iconSuffixContainer?.nativeElement,a=this._textSuffixContainer?.nativeElement,r=e?.getBoundingClientRect().width??0,u=t?.getBoundingClientRect().width??0,h=n?.getBoundingClientRect().width??0,g=a?.getBoundingClientRect().width??0,v=this._currentDirection==="rtl"?"-1":"1",D=`${r+u}px`,W=`calc(${v} * (${D} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,ne=`var(--mat-mdc-form-field-label-transform, ${Y_} translateX(${W}))`,ve=r+u+h+g;return[ne,ve]}_writeOutlinedLabelStyles(e){if(e!==null){let[t,n]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=t),n!==null&&this._notchedOutline?._setMaxWidth(n)}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let t=e.getRootNode();return t&&t!==e}return document.documentElement.contains(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["mat-form-field"]],contentQueries:function(t,n,a){if(t&1&&(pd(a,n._labelChild,Lt,5),at(a,Da,5)(a,G_,5)(a,$_,5)(a,Ku,5)(a,is,5)),t&2){Qs();let r;P(r=F())&&(n._formFieldControl=r.first),P(r=F())&&(n._prefixChildren=r),P(r=F())&&(n._suffixChildren=r),P(r=F())&&(n._errorChildren=r),P(r=F())&&(n._hintChildren=r)}},viewQuery:function(t,n){if(t&1&&(fd(n._iconPrefixContainerSignal,Vu,5)(n._textPrefixContainerSignal,Bu,5)(n._iconSuffixContainerSignal,zu,5)(n._textSuffixContainerSignal,ju,5),Ae(D_,5)(Vu,5)(Bu,5)(zu,5)(ju,5)(Hu,5)($u,5)(Gu,5)),t&2){Qs(4);let a;P(a=F())&&(n._textField=a.first),P(a=F())&&(n._iconPrefixContainer=a.first),P(a=F())&&(n._textPrefixContainer=a.first),P(a=F())&&(n._iconSuffixContainer=a.first),P(a=F())&&(n._textSuffixContainer=a.first),P(a=F())&&(n._floatingLabel=a.first),P(a=F())&&(n._notchedOutline=a.first),P(a=F())&&(n._lineRipple=a.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(t,n){t&2&&p("mat-mdc-form-field-label-always-float",n._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",n._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",n._hasIconSuffix)("mat-form-field-invalid",n._control.errorState)("mat-form-field-disabled",n._control.disabled)("mat-form-field-autofilled",n._control.autofilled)("mat-form-field-appearance-fill",n.appearance=="fill")("mat-form-field-appearance-outline",n.appearance=="outline")("mat-form-field-hide-placeholder",n._hasFloatingLabel()&&!n._shouldLabelFloat())("mat-primary",n.color!=="accent"&&n.color!=="warn")("mat-accent",n.color==="accent")("mat-warn",n.color==="warn")("ng-untouched",n._shouldForward("untouched"))("ng-touched",n._shouldForward("touched"))("ng-pristine",n._shouldForward("pristine"))("ng-dirty",n._shouldForward("dirty"))("ng-valid",n._shouldForward("valid"))("ng-invalid",n._shouldForward("invalid"))("ng-pending",n._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[ee([{provide:Hn,useExisting:i},{provide:Yu,useExisting:i}])],ngContentSelectors:k_,decls:18,vars:21,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",""],["aria-atomic","true","aria-live","polite",1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["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(t,n){if(t&1&&(fe(S_),He(0,A_,1,1,"ng-template",null,0,Js),s(2,"div",6,1),E("click",function(r){return n._control.onContainerClick(r)}),k(4,T_,1,0,"div",7),s(5,"div",8),k(6,O_,2,2,"div",9),k(7,P_,3,0,"div",10),k(8,F_,3,0,"div",11),s(9,"div",12),k(10,L_,1,1,null,13),G(11),l(),k(12,V_,3,0,"div",14),k(13,B_,3,0,"div",15),l(),k(14,z_,1,0,"div",16),l(),s(15,"div",17),k(16,j_,2,0,"div",18)(17,U_,5,1,"div",19),l()),t&2){let a;c(2),p("mdc-text-field--filled",!n._hasOutline())("mdc-text-field--outlined",n._hasOutline())("mdc-text-field--no-label",!n._hasFloatingLabel())("mdc-text-field--disabled",n._control.disabled)("mdc-text-field--invalid",n._control.errorState),c(2),M(!n._hasOutline()&&!n._control.disabled?4:-1),c(2),M(n._hasOutline()?6:-1),c(),M(n._hasIconPrefix?7:-1),c(),M(n._hasTextPrefix?8:-1),c(2),M(!n._hasOutline()||n._forceDisplayInfixLabel()?10:-1),c(2),M(n._hasTextSuffix?12:-1),c(),M(n._hasIconSuffix?13:-1),c(),M(n._hasOutline()?-1:14),c(),p("mat-mdc-form-field-subscript-dynamic-size",n.subscriptSizing==="dynamic");let r=n._getSubscriptMessageType();c(),M((a=r)==="error"?16:a==="hint"?17:-1)}},dependencies:[Hu,$u,dl,Gu,is],styles:[`.mdc-text-field {
472
472
  display: inline-flex;
473
473
  align-items: baseline;
474
474
  padding: 0 16px;
@@ -1417,7 +1417,7 @@ select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) optio
1417
1417
  .mdc-notched-outline--upgraded .mdc-floating-label--float-above {
1418
1418
  max-width: calc(133.3333333333% + 1px);
1419
1419
  }
1420
- `],encapsulation:2})}return i})();var xo=(()=>{class i{isErrorState(e,t){return!!(e&&e.invalid&&(e.touched||t&&t.submitted))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var wo=class{_defaultMatcher;ngControl;_parentFormGroup;_parentForm;_stateChanges;errorState=!1;matcher;constructor(o,e,t,n,a){this._defaultMatcher=o,this.ngControl=e,this._parentFormGroup=t,this._parentForm=n,this._stateChanges=a}updateErrorState(){let o=this.errorState,e=this._parentFormGroup||this._parentForm,t=this.matcher||this._defaultMatcher,n=this.ngControl?this.ngControl.control:null,a=t?.isErrorState(n,e)??!1;a!==o&&(this.errorState=a,this._stateChanges.next())}};var kt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[fo,St,ee]})}return i})();var X_=["button","checkbox","file","hidden","image","radio","range","reset","submit"],Z_=new x("MAT_INPUT_CONFIG"),ei=(()=>{class i{_elementRef=d(N);_platform=d(le);ngControl=d(Jt,{optional:!0,self:!0});_autofillMonitor=d(Tm);_ngZone=d(H);_formField=d(jn,{optional:!0});_renderer=d(ve);_uid=d(be).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder=null;_errorStateTracker;_config=d(Z_,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer=!1;_isNativeSelect=!1;_isTextarea=!1;_isInFormField=!1;focused=!1;stateChanges=new R;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=mt(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(st.required)??!1}set required(e){this._required=mt(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&Nl().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=mt(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=>Nl().has(e));constructor(){let e=d(ya,{optional:!0}),t=d(Ut,{optional:!0}),n=d(xo),a=d(Fu,{optional:!0,self:!0}),r=this._elementRef.nativeElement,u=r.nodeName.toLowerCase();a?Xi(a.value)?this._signalBasedValueAccessor=a:this._inputValueAccessor=a:this._inputValueAccessor=r,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(r,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new wo(n,this.ngControl,t,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=u==="select",this._isTextarea=u==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=r.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&zt(()=>{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 t=this._elementRef.nativeElement;t.type==="number"?(t.type="text",t.setSelectionRange(0,0),t.type="number"):t.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 t=this._elementRef.nativeElement;this._previousPlaceholder=e,e?t.setAttribute("placeholder",e):t.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){X_.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,t=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&t&&t.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.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 t=e.target;!t.value&&t.selectionStart===0&&t.selectionEnd===0&&(t.setSelectionRange(1,1),t.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(t,n){t&1&&A("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),t&2&&(dt("id",n.id)("disabled",n.disabled&&!n.disabledInteractive)("required",n.required),Z("name",n.name||null)("readonly",n._getReadonlyAttribute())("aria-disabled",n.disabled&&n.disabledInteractive?"true":null)("aria-invalid",n.empty&&n.required?null:n.errorState)("aria-required",n.required)("id",n.id),p("mat-input-server",n._isServer)("mat-mdc-form-field-textarea-control",n._isInFormField&&n._isTextarea)("mat-mdc-form-field-input-control",n._isInFormField)("mat-mdc-input-disabled-interactive",n.disabledInteractive)("mdc-text-field__input",n._isInFormField)("mat-mdc-native-select-inline",n._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",L]},exportAs:["matInput"],features:[J([{provide:wa,useExisting:i}]),ke]})}return i})(),ti=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[kt,kt,Im,ee]})}return i})();var ii=(function(i){return i[i.FADING_IN=0]="FADING_IN",i[i.VISIBLE=1]="VISIBLE",i[i.FADING_OUT=2]="FADING_OUT",i[i.HIDDEN=3]="HIDDEN",i})(ii||{}),sc=class{_renderer;element;config;_animationForciblyDisabledThroughCss;state=ii.HIDDEN;constructor(o,e,t,n=!1){this._renderer=o,this.element=e,this.config=t,this._animationForciblyDisabledThroughCss=n}fadeOut(){this._renderer.fadeOutRipple(this)}},Yu=ho({passive:!0,capture:!0}),lc=class{_events=new Map;addHandler(o,e,t,n){let a=this._events.get(e);if(a){let r=a.get(t);r?r.add(n):a.set(t,new Set([n]))}else this._events.set(e,new Map([[t,new Set([n])]])),o.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,Yu)})}removeHandler(o,e,t){let n=this._events.get(o);if(!n)return;let a=n.get(e);a&&(a.delete(t),a.size===0&&n.delete(e),n.size===0&&(this._events.delete(o),document.removeEventListener(o,this._delegateEventHandler,Yu)))}_delegateEventHandler=o=>{let e=rt(o);e&&this._events.get(o.type)?.forEach((t,n)=>{(n===e||n.contains(e))&&t.forEach(a=>a.handleEvent(o))})}},Da={enterDuration:225,exitDuration:150},Q_=800,Xu=ho({passive:!0,capture:!0}),Zu=["mousedown","touchstart"],Qu=["mouseup","mouseleave","touchend","touchcancel"],J_=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],decls:0,vars:0,template:function(t,n){},styles:[`.mat-ripple {
1420
+ `],encapsulation:2})}return i})();var wo=(()=>{class i{isErrorState(e,t){return!!(e&&e.invalid&&(e.touched||t&&t.submitted))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Do=class{_defaultMatcher;ngControl;_parentFormGroup;_parentForm;_stateChanges;errorState=!1;matcher;constructor(o,e,t,n,a){this._defaultMatcher=o,this.ngControl=e,this._parentFormGroup=t,this._parentForm=n,this._stateChanges=a}updateErrorState(){let o=this.errorState,e=this._parentFormGroup||this._parentForm,t=this.matcher||this._defaultMatcher,n=this.ngControl?this.ngControl.control:null,a=t?.isErrorState(n,e)??!1;a!==o&&(this.errorState=a,this._stateChanges.next())}};var At=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[go,Et,te]})}return i})();var Q_=["button","checkbox","file","hidden","image","radio","range","reset","submit"],J_=new w("MAT_INPUT_CONFIG"),ni=(()=>{class i{_elementRef=d(N);_platform=d(ce);ngControl=d(ii,{optional:!0,self:!0});_autofillMonitor=d(Im);_ngZone=d(U);_formField=d(Hn,{optional:!0});_renderer=d(Ce);_uid=d(xe).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder=null;_errorStateTracker;_config=d(J_,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer=!1;_isNativeSelect=!1;_isTextarea=!1;_isInFormField=!1;focused=!1;stateChanges=new R;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=mt(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(st.required)??!1}set required(e){this._required=mt(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&Ll().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=mt(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=>Ll().has(e));constructor(){let e=d(Ca,{optional:!0}),t=d(Wt,{optional:!0}),n=d(wo),a=d(Nu,{optional:!0,self:!0}),r=this._elementRef.nativeElement,u=r.nodeName.toLowerCase();a?Qi(a.value)?this._signalBasedValueAccessor=a:this._inputValueAccessor=a:this._inputValueAccessor=r,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(r,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new Do(n,this.ngControl,t,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=u==="select",this._isTextarea=u==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=r.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&Ut(()=>{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 t=this._elementRef.nativeElement;t.type==="number"?(t.type="text",t.setSelectionRange(0,0),t.type="number"):t.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 t=this._elementRef.nativeElement;this._previousPlaceholder=e,e?t.setAttribute("placeholder",e):t.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){Q_.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,t=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&t&&t.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.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 t=e.target;!t.value&&t.selectionStart===0&&t.selectionEnd===0&&(t.setSelectionRange(1,1),t.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(t,n){t&1&&E("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),t&2&&(dt("id",n.id)("disabled",n.disabled&&!n.disabledInteractive)("required",n.required),Z("name",n.name||null)("readonly",n._getReadonlyAttribute())("aria-disabled",n.disabled&&n.disabledInteractive?"true":null)("aria-invalid",n.empty&&n.required?null:n.errorState)("aria-required",n.required)("id",n.id),p("mat-input-server",n._isServer)("mat-mdc-form-field-textarea-control",n._isInFormField&&n._isTextarea)("mat-mdc-form-field-input-control",n._isInFormField)("mat-mdc-input-disabled-interactive",n.disabledInteractive)("mdc-text-field__input",n._isInFormField)("mat-mdc-native-select-inline",n._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",L]},exportAs:["matInput"],features:[ee([{provide:Da,useExisting:i}]),Ee]})}return i})(),oi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[At,At,Rm,te]})}return i})();var ai=(function(i){return i[i.FADING_IN=0]="FADING_IN",i[i.VISIBLE=1]="VISIBLE",i[i.FADING_OUT=2]="FADING_OUT",i[i.HIDDEN=3]="HIDDEN",i})(ai||{}),lc=class{_renderer;element;config;_animationForciblyDisabledThroughCss;state=ai.HIDDEN;constructor(o,e,t,n=!1){this._renderer=o,this.element=e,this.config=t,this._animationForciblyDisabledThroughCss=n}fadeOut(){this._renderer.fadeOutRipple(this)}},Xu=po({passive:!0,capture:!0}),cc=class{_events=new Map;addHandler(o,e,t,n){let a=this._events.get(e);if(a){let r=a.get(t);r?r.add(n):a.set(t,new Set([n]))}else this._events.set(e,new Map([[t,new Set([n])]])),o.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,Xu)})}removeHandler(o,e,t){let n=this._events.get(o);if(!n)return;let a=n.get(e);a&&(a.delete(t),a.size===0&&n.delete(e),n.size===0&&(this._events.delete(o),document.removeEventListener(o,this._delegateEventHandler,Xu)))}_delegateEventHandler=o=>{let e=rt(o);e&&this._events.get(o.type)?.forEach((t,n)=>{(n===e||n.contains(e))&&t.forEach(a=>a.handleEvent(o))})}},Sa={enterDuration:225,exitDuration:150},ev=800,Zu=po({passive:!0,capture:!0}),Qu=["mousedown","touchstart"],Ju=["mouseup","mouseleave","touchend","touchcancel"],tv=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],decls:0,vars:0,template:function(t,n){},styles:[`.mat-ripple {
1421
1421
  overflow: hidden;
1422
1422
  position: relative;
1423
1423
  }
@@ -1445,7 +1445,7 @@ select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) optio
1445
1445
  .cdk-drag-preview .mat-ripple-element, .cdk-drag-placeholder .mat-ripple-element {
1446
1446
  display: none;
1447
1447
  }
1448
- `],encapsulation:2})}return i})(),Hn=class i{_target;_ngZone;_platform;_containerElement;_triggerElement=null;_isPointerDown=!1;_activeRipples=new Map;_mostRecentTransientRipple=null;_lastTouchStartEvent;_pointerUpEventsRegistered=!1;_containerRect=null;static _eventManager=new lc;constructor(o,e,t,n,a){this._target=o,this._ngZone=e,this._platform=n,n.isBrowser&&(this._containerElement=Dt(t)),a&&a.get(Le).load(J_)}fadeInRipple(o,e,t={}){let n=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),a=V(V({},Da),t.animation);t.centered&&(o=n.left+n.width/2,e=n.top+n.height/2);let r=t.radius||ev(o,e,n),u=o-n.left,h=e-n.top,g=a.enterDuration,v=document.createElement("div");v.classList.add("mat-ripple-element"),v.style.left=`${u-r}px`,v.style.top=`${h-r}px`,v.style.height=`${r*2}px`,v.style.width=`${r*2}px`,t.color!=null&&(v.style.backgroundColor=t.color),v.style.transitionDuration=`${g}ms`,this._containerElement.appendChild(v);let D=window.getComputedStyle(v),B=D.transitionProperty,$=D.transitionDuration,ie=B==="none"||$==="0s"||$==="0s, 0s"||n.width===0&&n.height===0,fe=new sc(this,v,t,ie);v.style.transform="scale3d(1, 1, 1)",fe.state=ii.FADING_IN,t.persistent||(this._mostRecentTransientRipple=fe);let se=null;return!ie&&(g||a.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let Ae=()=>{se&&(se.fallbackTimer=null),clearTimeout(li),this._finishRippleTransition(fe)},lt=()=>this._destroyRipple(fe),li=setTimeout(lt,g+100);v.addEventListener("transitionend",Ae),v.addEventListener("transitioncancel",lt),se={onTransitionEnd:Ae,onTransitionCancel:lt,fallbackTimer:li}}),this._activeRipples.set(fe,se),(ie||!g)&&this._finishRippleTransition(fe),fe}fadeOutRipple(o){if(o.state===ii.FADING_OUT||o.state===ii.HIDDEN)return;let e=o.element,t=V(V({},Da),o.config.animation);e.style.transitionDuration=`${t.exitDuration}ms`,e.style.opacity="0",o.state=ii.FADING_OUT,(o._animationForciblyDisabledThroughCss||!t.exitDuration)&&this._finishRippleTransition(o)}fadeOutAll(){this._getActiveRipples().forEach(o=>o.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(o=>{o.config.persistent||o.fadeOut()})}setupTriggerEvents(o){let e=Dt(o);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,Zu.forEach(t=>{i._eventManager.addHandler(this._ngZone,t,e,this)}))}handleEvent(o){o.type==="mousedown"?this._onMousedown(o):o.type==="touchstart"?this._onTouchStart(o):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{Qu.forEach(e=>{this._triggerElement.addEventListener(e,this,Xu)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(o){o.state===ii.FADING_IN?this._startFadeOutTransition(o):o.state===ii.FADING_OUT&&this._destroyRipple(o)}_startFadeOutTransition(o){let e=o===this._mostRecentTransientRipple,{persistent:t}=o.config;o.state=ii.VISIBLE,!t&&(!e||!this._isPointerDown)&&o.fadeOut()}_destroyRipple(o){let e=this._activeRipples.get(o)??null;this._activeRipples.delete(o),this._activeRipples.size||(this._containerRect=null),o===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),o.state=ii.HIDDEN,e!==null&&(o.element.removeEventListener("transitionend",e.onTransitionEnd),o.element.removeEventListener("transitioncancel",e.onTransitionCancel),e.fallbackTimer!==null&&clearTimeout(e.fallbackTimer)),o.element.remove()}_onMousedown(o){let e=Fn(o),t=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+Q_;!this._target.rippleDisabled&&!e&&!t&&(this._isPointerDown=!0,this.fadeInRipple(o.clientX,o.clientY,this._target.rippleConfig))}_onTouchStart(o){if(!this._target.rippleDisabled&&!Nn(o)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;let e=o.changedTouches;if(e)for(let t=0;t<e.length;t++)this.fadeInRipple(e[t].clientX,e[t].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._getActiveRipples().forEach(o=>{let e=o.state===ii.VISIBLE||o.config.terminateOnPointerUp&&o.state===ii.FADING_IN;!o.config.persistent&&e&&o.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let o=this._triggerElement;o&&(Zu.forEach(e=>i._eventManager.removeHandler(e,o,this)),this._pointerUpEventsRegistered&&(Qu.forEach(e=>o.removeEventListener(e,this,Xu)),this._pointerUpEventsRegistered=!1))}};function ev(i,o,e){let t=Math.max(Math.abs(i-e.left),Math.abs(i-e.right)),n=Math.max(Math.abs(o-e.top),Math.abs(o-e.bottom));return Math.sqrt(t*t+n*n)}var Un=new x("mat-ripple-global-options"),So=(()=>{class i{_elementRef=d(N);_animationsDisabled=pe();color;unbounded=!1;centered=!1;radius=0;animation;get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}_disabled=!1;get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}_trigger;_rippleRenderer;_globalOptions;_isInitialized=!1;constructor(){let e=d(H),t=d(le),n=d(Un,{optional:!0}),a=d(X);this._globalOptions=n||{},this._rippleRenderer=new Hn(this,e,this._elementRef,t,a)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:V(V(V({},this._globalOptions.animation),this._animationsDisabled?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,t=0,n){return typeof e=="number"?this._rippleRenderer.fadeInRipple(e,t,V(V({},this.rippleConfig),n)):this._rippleRenderer.fadeInRipple(0,0,V(V({},this.rippleConfig),e))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,n){t&2&&p("mat-ripple-unbounded",n.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"]})}return i})();var tv={capture:!0},iv=["focus","mousedown","mouseenter","touchstart"],cc="mat-ripple-loader-uninitialized",dc="mat-ripple-loader-class-name",Ju="mat-ripple-loader-centered",ns="mat-ripple-loader-disabled",os=(()=>{class i{_document=d(q);_animationsDisabled=pe();_globalRippleOptions=d(Un,{optional:!0});_platform=d(le);_ngZone=d(H);_injector=d(X);_eventCleanups;_hosts=new Map;constructor(){let e=d(ot).createRenderer(null,null);this._eventCleanups=this._ngZone.runOutsideAngular(()=>iv.map(t=>e.listen(this._document,t,this._onInteraction,tv)))}ngOnDestroy(){let e=this._hosts.keys();for(let t of e)this.destroyRipple(t);this._eventCleanups.forEach(t=>t())}configureRipple(e,t){e.setAttribute(cc,this._globalRippleOptions?.namespace??""),(t.className||!e.hasAttribute(dc))&&e.setAttribute(dc,t.className||""),t.centered&&e.setAttribute(Ju,""),t.disabled&&e.setAttribute(ns,"")}setDisabled(e,t){let n=this._hosts.get(e);n?(n.target.rippleDisabled=t,!t&&!n.hasSetUpEvents&&(n.hasSetUpEvents=!0,n.renderer.setupTriggerEvents(e))):t?e.setAttribute(ns,""):e.removeAttribute(ns)}_onInteraction=e=>{let t=rt(e);if(t instanceof HTMLElement){let n=t.closest(`[${cc}="${this._globalRippleOptions?.namespace??""}"]`);n&&this._createRipple(n)}};_createRipple(e){if(!this._document||this._hosts.has(e))return;e.querySelector(".mat-ripple")?.remove();let t=this._document.createElement("span");t.classList.add("mat-ripple",e.getAttribute(dc)),e.append(t);let n=this._globalRippleOptions,a=this._animationsDisabled?0:n?.animation?.enterDuration??Da.enterDuration,r=this._animationsDisabled?0:n?.animation?.exitDuration??Da.exitDuration,u={rippleDisabled:this._animationsDisabled||n?.disabled||e.hasAttribute(ns),rippleConfig:{centered:e.hasAttribute(Ju),terminateOnPointerUp:n?.terminateOnPointerUp,animation:{enterDuration:a,exitDuration:r}}},h=new Hn(u,this._ngZone,t,this._platform,this._injector),g=!u.rippleDisabled;g&&h.setupTriggerEvents(e),this._hosts.set(e,{target:u,renderer:h,hasSetUpEvents:g}),e.removeAttribute(cc)}destroyRipple(e){let t=this._hosts.get(e);t&&(t.renderer._removeTriggerEvents(),this._hosts.delete(e))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Mt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["structural-styles"]],decls:0,vars:0,template:function(t,n){},styles:[`.mat-focus-indicator {
1448
+ `],encapsulation:2})}return i})(),Un=class i{_target;_ngZone;_platform;_containerElement;_triggerElement=null;_isPointerDown=!1;_activeRipples=new Map;_mostRecentTransientRipple=null;_lastTouchStartEvent;_pointerUpEventsRegistered=!1;_containerRect=null;static _eventManager=new cc;constructor(o,e,t,n,a){this._target=o,this._ngZone=e,this._platform=n,n.isBrowser&&(this._containerElement=Mt(t)),a&&a.get(Be).load(tv)}fadeInRipple(o,e,t={}){let n=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),a=V(V({},Sa),t.animation);t.centered&&(o=n.left+n.width/2,e=n.top+n.height/2);let r=t.radius||iv(o,e,n),u=o-n.left,h=e-n.top,g=a.enterDuration,v=document.createElement("div");v.classList.add("mat-ripple-element"),v.style.left=`${u-r}px`,v.style.top=`${h-r}px`,v.style.height=`${r*2}px`,v.style.width=`${r*2}px`,t.color!=null&&(v.style.backgroundColor=t.color),v.style.transitionDuration=`${g}ms`,this._containerElement.appendChild(v);let D=window.getComputedStyle(v),z=D.transitionProperty,W=D.transitionDuration,ne=z==="none"||W==="0s"||W==="0s, 0s"||n.width===0&&n.height===0,ve=new lc(this,v,t,ne);v.style.transform="scale3d(1, 1, 1)",ve.state=ai.FADING_IN,t.persistent||(this._mostRecentTransientRipple=ve);let le=null;return!ne&&(g||a.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let Ie=()=>{le&&(le.fallbackTimer=null),clearTimeout(ci),this._finishRippleTransition(ve)},lt=()=>this._destroyRipple(ve),ci=setTimeout(lt,g+100);v.addEventListener("transitionend",Ie),v.addEventListener("transitioncancel",lt),le={onTransitionEnd:Ie,onTransitionCancel:lt,fallbackTimer:ci}}),this._activeRipples.set(ve,le),(ne||!g)&&this._finishRippleTransition(ve),ve}fadeOutRipple(o){if(o.state===ai.FADING_OUT||o.state===ai.HIDDEN)return;let e=o.element,t=V(V({},Sa),o.config.animation);e.style.transitionDuration=`${t.exitDuration}ms`,e.style.opacity="0",o.state=ai.FADING_OUT,(o._animationForciblyDisabledThroughCss||!t.exitDuration)&&this._finishRippleTransition(o)}fadeOutAll(){this._getActiveRipples().forEach(o=>o.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(o=>{o.config.persistent||o.fadeOut()})}setupTriggerEvents(o){let e=Mt(o);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,Qu.forEach(t=>{i._eventManager.addHandler(this._ngZone,t,e,this)}))}handleEvent(o){o.type==="mousedown"?this._onMousedown(o):o.type==="touchstart"?this._onTouchStart(o):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{Ju.forEach(e=>{this._triggerElement.addEventListener(e,this,Zu)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(o){o.state===ai.FADING_IN?this._startFadeOutTransition(o):o.state===ai.FADING_OUT&&this._destroyRipple(o)}_startFadeOutTransition(o){let e=o===this._mostRecentTransientRipple,{persistent:t}=o.config;o.state=ai.VISIBLE,!t&&(!e||!this._isPointerDown)&&o.fadeOut()}_destroyRipple(o){let e=this._activeRipples.get(o)??null;this._activeRipples.delete(o),this._activeRipples.size||(this._containerRect=null),o===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),o.state=ai.HIDDEN,e!==null&&(o.element.removeEventListener("transitionend",e.onTransitionEnd),o.element.removeEventListener("transitioncancel",e.onTransitionCancel),e.fallbackTimer!==null&&clearTimeout(e.fallbackTimer)),o.element.remove()}_onMousedown(o){let e=Nn(o),t=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+ev;!this._target.rippleDisabled&&!e&&!t&&(this._isPointerDown=!0,this.fadeInRipple(o.clientX,o.clientY,this._target.rippleConfig))}_onTouchStart(o){if(!this._target.rippleDisabled&&!Ln(o)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;let e=o.changedTouches;if(e)for(let t=0;t<e.length;t++)this.fadeInRipple(e[t].clientX,e[t].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._getActiveRipples().forEach(o=>{let e=o.state===ai.VISIBLE||o.config.terminateOnPointerUp&&o.state===ai.FADING_IN;!o.config.persistent&&e&&o.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let o=this._triggerElement;o&&(Qu.forEach(e=>i._eventManager.removeHandler(e,o,this)),this._pointerUpEventsRegistered&&(Ju.forEach(e=>o.removeEventListener(e,this,Zu)),this._pointerUpEventsRegistered=!1))}};function iv(i,o,e){let t=Math.max(Math.abs(i-e.left),Math.abs(i-e.right)),n=Math.max(Math.abs(o-e.top),Math.abs(o-e.bottom));return Math.sqrt(t*t+n*n)}var Gn=new w("mat-ripple-global-options"),ko=(()=>{class i{_elementRef=d(N);_animationsDisabled=_e();color;unbounded=!1;centered=!1;radius=0;animation;get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}_disabled=!1;get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}_trigger;_rippleRenderer;_globalOptions;_isInitialized=!1;constructor(){let e=d(U),t=d(ce),n=d(Gn,{optional:!0}),a=d(X);this._globalOptions=n||{},this._rippleRenderer=new Un(this,e,this._elementRef,t,a)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:V(V(V({},this._globalOptions.animation),this._animationsDisabled?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,t=0,n){return typeof e=="number"?this._rippleRenderer.fadeInRipple(e,t,V(V({},this.rippleConfig),n)):this._rippleRenderer.fadeInRipple(0,0,V(V({},this.rippleConfig),e))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,n){t&2&&p("mat-ripple-unbounded",n.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"]})}return i})();var nv={capture:!0},ov=["focus","mousedown","mouseenter","touchstart"],dc="mat-ripple-loader-uninitialized",mc="mat-ripple-loader-class-name",eh="mat-ripple-loader-centered",ns="mat-ripple-loader-disabled",os=(()=>{class i{_document=d(q);_animationsDisabled=_e();_globalRippleOptions=d(Gn,{optional:!0});_platform=d(ce);_ngZone=d(U);_injector=d(X);_eventCleanups;_hosts=new Map;constructor(){let e=d(ot).createRenderer(null,null);this._eventCleanups=this._ngZone.runOutsideAngular(()=>ov.map(t=>e.listen(this._document,t,this._onInteraction,nv)))}ngOnDestroy(){let e=this._hosts.keys();for(let t of e)this.destroyRipple(t);this._eventCleanups.forEach(t=>t())}configureRipple(e,t){e.setAttribute(dc,this._globalRippleOptions?.namespace??""),(t.className||!e.hasAttribute(mc))&&e.setAttribute(mc,t.className||""),t.centered&&e.setAttribute(eh,""),t.disabled&&e.setAttribute(ns,"")}setDisabled(e,t){let n=this._hosts.get(e);n?(n.target.rippleDisabled=t,!t&&!n.hasSetUpEvents&&(n.hasSetUpEvents=!0,n.renderer.setupTriggerEvents(e))):t?e.setAttribute(ns,""):e.removeAttribute(ns)}_onInteraction=e=>{let t=rt(e);if(t instanceof HTMLElement){let n=t.closest(`[${dc}="${this._globalRippleOptions?.namespace??""}"]`);n&&this._createRipple(n)}};_createRipple(e){if(!this._document||this._hosts.has(e))return;e.querySelector(".mat-ripple")?.remove();let t=this._document.createElement("span");t.classList.add("mat-ripple",e.getAttribute(mc)),e.append(t);let n=this._globalRippleOptions,a=this._animationsDisabled?0:n?.animation?.enterDuration??Sa.enterDuration,r=this._animationsDisabled?0:n?.animation?.exitDuration??Sa.exitDuration,u={rippleDisabled:this._animationsDisabled||n?.disabled||e.hasAttribute(ns),rippleConfig:{centered:e.hasAttribute(eh),terminateOnPointerUp:n?.terminateOnPointerUp,animation:{enterDuration:a,exitDuration:r}}},h=new Un(u,this._ngZone,t,this._platform,this._injector),g=!u.rippleDisabled;g&&h.setupTriggerEvents(e),this._hosts.set(e,{target:u,renderer:h,hasSetUpEvents:g}),e.removeAttribute(dc)}destroyRipple(e){let t=this._hosts.get(e);t&&(t.renderer._removeTriggerEvents(),this._hosts.delete(e))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Tt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["structural-styles"]],decls:0,vars:0,template:function(t,n){},styles:[`.mat-focus-indicator {
1449
1449
  position: relative;
1450
1450
  }
1451
1451
  .mat-focus-indicator::before {
@@ -1471,7 +1471,7 @@ select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) optio
1471
1471
  --mat-focus-indicator-display: block;
1472
1472
  }
1473
1473
  }
1474
- `],encapsulation:2})}return i})();var nv=["*",[["","progressIndicator",""]]],ov=["*","[progressIndicator]"];function av(i,o){i&1&&(Ie(0,"div",1),U(1,1),Ue())}var rv=new x("MAT_BUTTON_CONFIG");function eh(i){return i==null?void 0:wt(i)}var mc=(()=>{class i{_elementRef=d(N);_ngZone=d(H);_animationsDisabled=pe();_config=d(rv,{optional:!0});_focusMonitor=d(Rt);_cleanupClick;_renderer=d(ve);_rippleLoader=d(os);_isAnchor;_isFab=!1;color;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=e,this._updateRippleDisabled()}_disableRipple=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._updateRippleDisabled()}_disabled=!1;ariaDisabled;disabledInteractive;tabIndex;set _tabindex(e){this.tabIndex=e}showProgress=ao(!1,{transform:L});constructor(){d(Le).load(Mt);let e=this._elementRef.nativeElement;this._isAnchor=e.tagName==="A",this.disabledInteractive=this._config?.disabledInteractive??!1,this.color=this._config?.color??null,this._rippleLoader?.configureRipple(e,{className:"mat-mdc-button-ripple"})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0),this._isAnchor&&this._setupAsAnchor()}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(e="program",t){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,t):this._elementRef.nativeElement.focus(t)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this._isAnchor?this.disabled||null:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}_getTabIndex(){return this._isAnchor?this.disabled&&!this.disabledInteractive?-1:this.tabIndex:this.tabIndex}_setupAsAnchor(){this._cleanupClick=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"click",e=>{this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,hostAttrs:[1,"mat-mdc-button-base"],hostVars:15,hostBindings:function(t,n){t&2&&(Z("disabled",n._getDisabledAttribute())("aria-disabled",n._getAriaDisabled())("tabindex",n._getTabIndex()),et(n.color?"mat-"+n.color:""),p("mat-mdc-button-progress-indicator-shown",n.showProgress())("mat-mdc-button-disabled",n.disabled)("mat-mdc-button-disabled-interactive",n.disabledInteractive)("mat-unthemed",!n.color)("_mat-animation-noopable",n._animationsDisabled))},inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",L],disabled:[2,"disabled","disabled",L],ariaDisabled:[2,"aria-disabled","ariaDisabled",L],disabledInteractive:[2,"disabledInteractive","disabledInteractive",L],tabIndex:[2,"tabIndex","tabIndex",eh],_tabindex:[2,"tabindex","_tabindex",eh],showProgress:[1,"showProgress"]}})}return i})(),Hi=(()=>{class i extends mc{constructor(){super(),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["button","mat-icon-button",""],["a","mat-icon-button",""],["button","matIconButton",""],["a","matIconButton",""]],hostAttrs:[1,"mdc-icon-button","mat-mdc-icon-button"],exportAs:["matButton","matAnchor"],features:[Q],ngContentSelectors:ov,decls:5,vars:1,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-button-progress-indicator-container"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(t,n){t&1&&(ce(nv),ht(0,"span",0),U(1),M(2,av,2,0,"div",1),ht(3,"span",2)(4,"span",3)),t&2&&(c(2),E(n.showProgress()?2:-1))},styles:[`.mat-mdc-icon-button {
1474
+ `],encapsulation:2})}return i})();var av=["*",[["","progressIndicator",""]]],rv=["*","[progressIndicator]"];function sv(i,o){i&1&&(Re(0,"div",1),G(1,1),Ue())}var lv=new w("MAT_BUTTON_CONFIG");function th(i){return i==null?void 0:kt(i)}var uc=(()=>{class i{_elementRef=d(N);_ngZone=d(U);_animationsDisabled=_e();_config=d(lv,{optional:!0});_focusMonitor=d(Nt);_cleanupClick;_renderer=d(Ce);_rippleLoader=d(os);_isAnchor;_isFab=!1;color;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=e,this._updateRippleDisabled()}_disableRipple=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._updateRippleDisabled()}_disabled=!1;ariaDisabled;disabledInteractive;tabIndex;set _tabindex(e){this.tabIndex=e}showProgress=ro(!1,{transform:L});constructor(){d(Be).load(Tt);let e=this._elementRef.nativeElement;this._isAnchor=e.tagName==="A",this.disabledInteractive=this._config?.disabledInteractive??!1,this.color=this._config?.color??null,this._rippleLoader?.configureRipple(e,{className:"mat-mdc-button-ripple"})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0),this._isAnchor&&this._setupAsAnchor()}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(e="program",t){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,t):this._elementRef.nativeElement.focus(t)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this._isAnchor?this.disabled||null:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}_getTabIndex(){return this._isAnchor?this.disabled&&!this.disabledInteractive?-1:this.tabIndex:this.tabIndex}_setupAsAnchor(){this._cleanupClick=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"click",e=>{this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,hostAttrs:[1,"mat-mdc-button-base"],hostVars:15,hostBindings:function(t,n){t&2&&(Z("disabled",n._getDisabledAttribute())("aria-disabled",n._getAriaDisabled())("tabindex",n._getTabIndex()),tt(n.color?"mat-"+n.color:""),p("mat-mdc-button-progress-indicator-shown",n.showProgress())("mat-mdc-button-disabled",n.disabled)("mat-mdc-button-disabled-interactive",n.disabledInteractive)("mat-unthemed",!n.color)("_mat-animation-noopable",n._animationsDisabled))},inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",L],disabled:[2,"disabled","disabled",L],ariaDisabled:[2,"aria-disabled","ariaDisabled",L],disabledInteractive:[2,"disabledInteractive","disabledInteractive",L],tabIndex:[2,"tabIndex","tabIndex",th],_tabindex:[2,"tabindex","_tabindex",th],showProgress:[1,"showProgress"]}})}return i})(),_i=(()=>{class i extends uc{constructor(){super(),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["button","mat-icon-button",""],["a","mat-icon-button",""],["button","matIconButton",""],["a","matIconButton",""]],hostAttrs:[1,"mdc-icon-button","mat-mdc-icon-button"],exportAs:["matButton","matAnchor"],features:[Q],ngContentSelectors:rv,decls:5,vars:1,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-button-progress-indicator-container"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(t,n){t&1&&(fe(av),pt(0,"span",0),G(1),k(2,sv,2,0,"div",1),pt(3,"span",2)(4,"span",3)),t&2&&(c(2),M(n.showProgress()?2:-1))},styles:[`.mat-mdc-icon-button {
1475
1475
  -webkit-user-select: none;
1476
1476
  user-select: none;
1477
1477
  display: inline-block;
@@ -1619,7 +1619,7 @@ select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) optio
1619
1619
  outline: solid 1px;
1620
1620
  }
1621
1621
  }
1622
- `],encapsulation:2})}return i})();var Ti=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[ee]})}return i})();var sv=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]],[["","progressIndicator",""]]],lv=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]","[progressIndicator]"];function cv(i,o){i&1&&(Ie(0,"div",2),U(1,3),Ue())}var th=new Map([["text",["mat-mdc-button"]],["filled",["mdc-button--unelevated","mat-mdc-unelevated-button"]],["elevated",["mdc-button--raised","mat-mdc-raised-button"]],["outlined",["mdc-button--outlined","mat-mdc-outlined-button"]],["tonal",["mat-tonal-button"]]]),it=(()=>{class i extends mc{get appearance(){return this._appearance}set appearance(e){this.setAppearance(e||this._config?.defaultAppearance||"text")}_appearance=null;constructor(){super();let e=dv(this._elementRef.nativeElement);e&&this.setAppearance(e)}setAppearance(e){if(e===this._appearance)return;let t=this._elementRef.nativeElement.classList,n=this._appearance?th.get(this._appearance):null,a=th.get(e);n&&t.remove(...n),t.add(...a),this._appearance=e}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["button","matButton",""],["a","matButton",""],["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""],["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostAttrs:[1,"mdc-button"],inputs:{appearance:[0,"matButton","appearance"]},exportAs:["matButton","matAnchor"],features:[Q],ngContentSelectors:lv,decls:8,vars:5,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-button-progress-indicator-container"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(t,n){t&1&&(ce(sv),ht(0,"span",0),U(1),Ie(2,"span",1),U(3,1),Ue(),U(4,2),M(5,cv,2,0,"div",2),ht(6,"span",3)(7,"span",4)),t&2&&(p("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),c(5),E(n.showProgress()?5:-1))},styles:[`.mat-mdc-button-base {
1622
+ `],encapsulation:2})}return i})();var Pi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[te]})}return i})();var cv=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]],[["","progressIndicator",""]]],dv=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]","[progressIndicator]"];function mv(i,o){i&1&&(Re(0,"div",2),G(1,3),Ue())}var ih=new Map([["text",["mat-mdc-button"]],["filled",["mdc-button--unelevated","mat-mdc-unelevated-button"]],["elevated",["mdc-button--raised","mat-mdc-raised-button"]],["outlined",["mdc-button--outlined","mat-mdc-outlined-button"]],["tonal",["mat-tonal-button"]]]),Xe=(()=>{class i extends uc{get appearance(){return this._appearance}set appearance(e){this.setAppearance(e||this._config?.defaultAppearance||"text")}_appearance=null;constructor(){super();let e=uv(this._elementRef.nativeElement);e&&this.setAppearance(e)}setAppearance(e){if(e===this._appearance)return;let t=this._elementRef.nativeElement.classList,n=this._appearance?ih.get(this._appearance):null,a=ih.get(e);n&&t.remove(...n),t.add(...a),this._appearance=e}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["button","matButton",""],["a","matButton",""],["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""],["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostAttrs:[1,"mdc-button"],inputs:{appearance:[0,"matButton","appearance"]},exportAs:["matButton","matAnchor"],features:[Q],ngContentSelectors:dv,decls:8,vars:5,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-button-progress-indicator-container"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(t,n){t&1&&(fe(cv),pt(0,"span",0),G(1),Re(2,"span",1),G(3,1),Ue(),G(4,2),k(5,mv,2,0,"div",2),pt(6,"span",3)(7,"span",4)),t&2&&(p("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),c(5),M(n.showProgress()?5:-1))},styles:[`.mat-mdc-button-base {
1623
1623
  text-decoration: none;
1624
1624
  }
1625
1625
  .mat-mdc-button-base .mat-icon {
@@ -2184,7 +2184,7 @@ select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) optio
2184
2184
  outline: solid 1px;
2185
2185
  }
2186
2186
  }
2187
- `],encapsulation:2})}return i})();function dv(i){return i.hasAttribute("mat-raised-button")?"elevated":i.hasAttribute("mat-stroked-button")?"outlined":i.hasAttribute("mat-flat-button")?"filled":i.hasAttribute("mat-button")?"text":null}var Qe=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[Ti,ee]})}return i})();function ih(i){return Error(`Unable to find icon with the name "${i}"`)}function mv(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function nh(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function oh(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}var Ui=class{url;svgText;options;svgElement=null;constructor(o,e,t){this.url=o,this.svgText=e,this.options=t}},rh=(()=>{class i{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass=["material-icons","mat-ligature-font"];constructor(e,t,n,a){this._httpClient=e,this._sanitizer=t,this._errorHandler=a,this._document=n}addSvgIcon(e,t,n){return this.addSvgIconInNamespace("",e,t,n)}addSvgIconLiteral(e,t,n){return this.addSvgIconLiteralInNamespace("",e,t,n)}addSvgIconInNamespace(e,t,n,a){return this._addSvgIconConfig(e,t,new Ui(n,null,a))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,t,n,a){let r=this._sanitizer.sanitize(Ct.HTML,n);if(!r)throw oh(n);let u=Ln(r);return this._addSvgIconConfig(e,t,new Ui("",u,a))}addSvgIconSet(e,t){return this.addSvgIconSetInNamespace("",e,t)}addSvgIconSetLiteral(e,t){return this.addSvgIconSetLiteralInNamespace("",e,t)}addSvgIconSetInNamespace(e,t,n){return this._addSvgIconSetConfig(e,new Ui(t,null,n))}addSvgIconSetLiteralInNamespace(e,t,n){let a=this._sanitizer.sanitize(Ct.HTML,t);if(!a)throw oh(t);let r=Ln(a);return this._addSvgIconSetConfig(e,new Ui("",r,n))}registerFontClassAlias(e,t=e){return this._fontCssClassesByAlias.set(e,t),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){let t=this._sanitizer.sanitize(Ct.RESOURCE_URL,e);if(!t)throw nh(e);let n=this._cachedIconsByUrl.get(t);return n?ge(as(n)):this._loadSvgIconFromConfig(new Ui(e,null)).pipe(di(a=>this._cachedIconsByUrl.set(t,a)),Pe(a=>as(a)))}getNamedSvgIcon(e,t=""){let n=ah(t,e),a=this._svgIconConfigs.get(n);if(a)return this._getSvgFromConfig(a);if(a=this._getIconConfigFromResolvers(t,e),a)return this._svgIconConfigs.set(n,a),this._getSvgFromConfig(a);let r=this._iconSetConfigs.get(t);return r?this._getSvgFromIconSetConfigs(e,r):Ya(ih(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ge(as(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(Pe(t=>as(t)))}_getSvgFromIconSetConfigs(e,t){let n=this._extractIconWithNameFromAnySet(e,t);if(n)return ge(n);let a=t.filter(r=>!r.svgText).map(r=>this._loadSvgIconSetFromConfig(r).pipe(Kt(u=>{let g=`Loading icon set URL: ${this._sanitizer.sanitize(Ct.RESOURCE_URL,r.url)} failed: ${u.message}`;return this._errorHandler.handleError(new Error(g)),ge(null)})));return Xa(a).pipe(Pe(()=>{let r=this._extractIconWithNameFromAnySet(e,t);if(!r)throw ih(e);return r}))}_extractIconWithNameFromAnySet(e,t){for(let n=t.length-1;n>=0;n--){let a=t[n];if(a.svgText&&a.svgText.toString().indexOf(e)>-1){let r=this._svgElementFromConfig(a),u=this._extractSvgIconFromSet(r,e,a.options);if(u)return u}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(di(t=>e.svgText=t),Pe(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ge(null):this._fetchIcon(e).pipe(di(t=>e.svgText=t))}_extractSvgIconFromSet(e,t,n){let a=e.querySelector(`[id="${t}"]`);if(!a)return null;let r=a.cloneNode(!0);if(r.removeAttribute("id"),r.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(r,n);if(r.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(r),n);let u=this._svgElementFromString(Ln("<svg></svg>"));return u.appendChild(r),this._setSvgAttributes(u,n)}_svgElementFromString(e){let t=this._document.createElement("DIV");t.innerHTML=e;let n=t.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(e){let t=this._svgElementFromString(Ln("<svg></svg>")),n=e.attributes;for(let a=0;a<n.length;a++){let{name:r,value:u}=n[a];r!=="id"&&t.setAttribute(r,u)}for(let a=0;a<e.childNodes.length;a++)e.childNodes[a].nodeType===this._document.ELEMENT_NODE&&t.appendChild(e.childNodes[a].cloneNode(!0));return t}_setSvgAttributes(e,t){return e.setAttribute("fit",""),e.setAttribute("height","100%"),e.setAttribute("width","100%"),e.setAttribute("preserveAspectRatio","xMidYMid meet"),e.setAttribute("focusable","false"),t&&t.viewBox&&e.setAttribute("viewBox",t.viewBox),e}_fetchIcon(e){let{url:t,options:n}=e,a=n?.withCredentials??!1;if(!this._httpClient)throw mv();if(t==null)throw Error(`Cannot fetch icon from URL "${t}".`);let r=this._sanitizer.sanitize(Ct.RESOURCE_URL,t);if(!r)throw nh(t);let u=this._inProgressUrlFetches.get(r);if(u)return u;let h=this._httpClient.get(r,{responseType:"text",withCredentials:a}).pipe(Pe(g=>Ln(g)),Qa(()=>this._inProgressUrlFetches.delete(r)),Zc());return this._inProgressUrlFetches.set(r,h),h}_addSvgIconConfig(e,t,n){return this._svgIconConfigs.set(ah(e,t),n),this}_addSvgIconSetConfig(e,t){let n=this._iconSetConfigs.get(e);return n?n.push(t):this._iconSetConfigs.set(e,[t]),this}_svgElementFromConfig(e){if(!e.svgElement){let t=this._svgElementFromString(e.svgText);this._setSvgAttributes(t,e.options),e.svgElement=t}return e.svgElement}_getIconConfigFromResolvers(e,t){for(let n=0;n<this._resolvers.length;n++){let a=this._resolvers[n](t,e);if(a)return uv(a)?new Ui(a.url,null,a.options):new Ui(a,null)}}static \u0275fac=function(t){return new(t||i)(oe(Qt,8),oe(ra),oe(q,8),oe(Mn))};static \u0275prov=ne({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function as(i){return i.cloneNode(!0)}function ah(i,o){return i+":"+o}function uv(i){return!!(i.url&&i.options)}var hv=["*"],pv=new x("MAT_ICON_DEFAULT_OPTIONS"),fv=new x("mat-icon-location",{providedIn:"root",factory:()=>{let i=d(q),o=i?i.location:null;return{getPathname:()=>o?o.pathname+o.search:""}}}),sh=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],gv=sh.map(i=>`[${i}]`).join(", "),_v=/^url\(['"]?#(.*?)['"]?\)$/,Pt=(()=>{class i{_elementRef=d(N);_iconRegistry=d(rh);_location=d(fv);_errorHandler=d(Mn);_defaultColor;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;inline=!1;get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}_svgIcon;get fontSet(){return this._fontSet}set fontSet(e){let t=this._cleanupFontValue(e);t!==this._fontSet&&(this._fontSet=t,this._updateFontIconClasses())}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(e){let t=this._cleanupFontValue(e);t!==this._fontIcon&&(this._fontIcon=t,this._updateFontIconClasses())}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName=null;_svgNamespace=null;_previousPath;_elementsWithExternalReferences;_currentIconFetch=De.EMPTY;constructor(){let e=d(new Di("aria-hidden"),{optional:!0}),t=d(pv,{optional:!0});t&&(t.color&&(this.color=this._defaultColor=t.color),t.fontSet&&(this.fontSet=t.fontSet)),e||this._elementRef.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(e){if(!e)return["",""];let t=e.split(":");switch(t.length){case 1:return["",t[0]];case 2:return t;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let e=this._elementsWithExternalReferences;if(e&&e.size){let t=this._location.getPathname();t!==this._previousPath&&(this._previousPath=t,this._prependPathToReferences(t))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();let t=this._location.getPathname();this._previousPath=t,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(t),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){let e=this._elementRef.nativeElement,t=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();t--;){let n=e.childNodes[t];(n.nodeType!==1||n.nodeName.toLowerCase()==="svg")&&n.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let e=this._elementRef.nativeElement,t=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>e.classList.remove(n)),t.forEach(n=>e.classList.add(n)),this._previousFontSetClass=t,this.fontIcon!==this._previousFontIconClass&&!t.includes("mat-ligature-font")&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return typeof e=="string"?e.trim().split(" ")[0]:e}_prependPathToReferences(e){let t=this._elementsWithExternalReferences;t&&t.forEach((n,a)=>{n.forEach(r=>{a.setAttribute(r.name,`url('${e}#${r.value}')`)})})}_cacheChildrenWithExternalReferences(e){let t=e.querySelectorAll(gv),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let a=0;a<t.length;a++)sh.forEach(r=>{let u=t[a],h=u.getAttribute(r),g=h?h.match(_v):null;if(g){let v=n.get(u);v||(v=[],n.set(u,v)),v.push({name:r,value:g[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){let[t,n]=this._splitIconName(e);t&&(this._svgNamespace=t),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,t).pipe(ct(1)).subscribe(a=>this._setSvgElement(a),a=>{let r=`Error retrieving icon ${t}:${n}! ${a.message}`;this._errorHandler.handleError(new Error(r))})}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(t,n){t&2&&(Z("data-mat-icon-type",n._usingFontIcon()?"font":"svg")("data-mat-icon-name",n._svgName||n.fontIcon)("data-mat-icon-namespace",n._svgNamespace||n.fontSet)("fontIcon",n._usingFontIcon()?n.fontIcon:null),et(n.color?"mat-"+n.color:""),p("mat-icon-inline",n.inline)("mat-icon-no-color",n.color!=="primary"&&n.color!=="accent"&&n.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",L],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],ngContentSelectors:hv,decls:1,vars:0,template:function(t,n){t&1&&(ce(),U(0))},styles:[`mat-icon, mat-icon.mat-primary, mat-icon.mat-accent, mat-icon.mat-warn {
2187
+ `],encapsulation:2})}return i})();function uv(i){return i.hasAttribute("mat-raised-button")?"elevated":i.hasAttribute("mat-stroked-button")?"outlined":i.hasAttribute("mat-flat-button")?"filled":i.hasAttribute("mat-button")?"text":null}var Ke=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[Pi,te]})}return i})();function nh(i){return Error(`Unable to find icon with the name "${i}"`)}function hv(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function oh(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function ah(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}var $i=class{url;svgText;options;svgElement=null;constructor(o,e,t){this.url=o,this.svgText=e,this.options=t}},sh=(()=>{class i{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass=["material-icons","mat-ligature-font"];constructor(e,t,n,a){this._httpClient=e,this._sanitizer=t,this._errorHandler=a,this._document=n}addSvgIcon(e,t,n){return this.addSvgIconInNamespace("",e,t,n)}addSvgIconLiteral(e,t,n){return this.addSvgIconLiteralInNamespace("",e,t,n)}addSvgIconInNamespace(e,t,n,a){return this._addSvgIconConfig(e,t,new $i(n,null,a))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,t,n,a){let r=this._sanitizer.sanitize(Dt.HTML,n);if(!r)throw ah(n);let u=Vn(r);return this._addSvgIconConfig(e,t,new $i("",u,a))}addSvgIconSet(e,t){return this.addSvgIconSetInNamespace("",e,t)}addSvgIconSetLiteral(e,t){return this.addSvgIconSetLiteralInNamespace("",e,t)}addSvgIconSetInNamespace(e,t,n){return this._addSvgIconSetConfig(e,new $i(t,null,n))}addSvgIconSetLiteralInNamespace(e,t,n){let a=this._sanitizer.sanitize(Dt.HTML,t);if(!a)throw ah(t);let r=Vn(a);return this._addSvgIconSetConfig(e,new $i("",r,n))}registerFontClassAlias(e,t=e){return this._fontCssClassesByAlias.set(e,t),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){let t=this._sanitizer.sanitize(Dt.RESOURCE_URL,e);if(!t)throw oh(e);let n=this._cachedIconsByUrl.get(t);return n?be(as(n)):this._loadSvgIconFromConfig(new $i(e,null)).pipe(mi(a=>this._cachedIconsByUrl.set(t,a)),Ne(a=>as(a)))}getNamedSvgIcon(e,t=""){let n=rh(t,e),a=this._svgIconConfigs.get(n);if(a)return this._getSvgFromConfig(a);if(a=this._getIconConfigFromResolvers(t,e),a)return this._svgIconConfigs.set(n,a),this._getSvgFromConfig(a);let r=this._iconSetConfigs.get(t);return r?this._getSvgFromIconSetConfigs(e,r):Xa(nh(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?be(as(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(Ne(t=>as(t)))}_getSvgFromIconSetConfigs(e,t){let n=this._extractIconWithNameFromAnySet(e,t);if(n)return be(n);let a=t.filter(r=>!r.svgText).map(r=>this._loadSvgIconSetFromConfig(r).pipe(Zt(u=>{let g=`Loading icon set URL: ${this._sanitizer.sanitize(Dt.RESOURCE_URL,r.url)} failed: ${u.message}`;return this._errorHandler.handleError(new Error(g)),be(null)})));return Za(a).pipe(Ne(()=>{let r=this._extractIconWithNameFromAnySet(e,t);if(!r)throw nh(e);return r}))}_extractIconWithNameFromAnySet(e,t){for(let n=t.length-1;n>=0;n--){let a=t[n];if(a.svgText&&a.svgText.toString().indexOf(e)>-1){let r=this._svgElementFromConfig(a),u=this._extractSvgIconFromSet(r,e,a.options);if(u)return u}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(mi(t=>e.svgText=t),Ne(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?be(null):this._fetchIcon(e).pipe(mi(t=>e.svgText=t))}_extractSvgIconFromSet(e,t,n){let a=e.querySelector(`[id="${t}"]`);if(!a)return null;let r=a.cloneNode(!0);if(r.removeAttribute("id"),r.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(r,n);if(r.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(r),n);let u=this._svgElementFromString(Vn("<svg></svg>"));return u.appendChild(r),this._setSvgAttributes(u,n)}_svgElementFromString(e){let t=this._document.createElement("DIV");t.innerHTML=e;let n=t.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(e){let t=this._svgElementFromString(Vn("<svg></svg>")),n=e.attributes;for(let a=0;a<n.length;a++){let{name:r,value:u}=n[a];r!=="id"&&t.setAttribute(r,u)}for(let a=0;a<e.childNodes.length;a++)e.childNodes[a].nodeType===this._document.ELEMENT_NODE&&t.appendChild(e.childNodes[a].cloneNode(!0));return t}_setSvgAttributes(e,t){return e.setAttribute("fit",""),e.setAttribute("height","100%"),e.setAttribute("width","100%"),e.setAttribute("preserveAspectRatio","xMidYMid meet"),e.setAttribute("focusable","false"),t&&t.viewBox&&e.setAttribute("viewBox",t.viewBox),e}_fetchIcon(e){let{url:t,options:n}=e,a=n?.withCredentials??!1;if(!this._httpClient)throw hv();if(t==null)throw Error(`Cannot fetch icon from URL "${t}".`);let r=this._sanitizer.sanitize(Dt.RESOURCE_URL,t);if(!r)throw oh(t);let u=this._inProgressUrlFetches.get(r);if(u)return u;let h=this._httpClient.get(r,{responseType:"text",withCredentials:a}).pipe(Ne(g=>Vn(g)),Ja(()=>this._inProgressUrlFetches.delete(r)),Qc());return this._inProgressUrlFetches.set(r,h),h}_addSvgIconConfig(e,t,n){return this._svgIconConfigs.set(rh(e,t),n),this}_addSvgIconSetConfig(e,t){let n=this._iconSetConfigs.get(e);return n?n.push(t):this._iconSetConfigs.set(e,[t]),this}_svgElementFromConfig(e){if(!e.svgElement){let t=this._svgElementFromString(e.svgText);this._setSvgAttributes(t,e.options),e.svgElement=t}return e.svgElement}_getIconConfigFromResolvers(e,t){for(let n=0;n<this._resolvers.length;n++){let a=this._resolvers[n](t,e);if(a)return pv(a)?new $i(a.url,null,a.options):new $i(a,null)}}static \u0275fac=function(t){return new(t||i)(ae(Ft,8),ae(ra),ae(q,8),ae(An))};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function as(i){return i.cloneNode(!0)}function rh(i,o){return i+":"+o}function pv(i){return!!(i.url&&i.options)}var fv=["*"],gv=new w("MAT_ICON_DEFAULT_OPTIONS"),_v=new w("mat-icon-location",{providedIn:"root",factory:()=>{let i=d(q),o=i?i.location:null;return{getPathname:()=>o?o.pathname+o.search:""}}}),lh=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],vv=lh.map(i=>`[${i}]`).join(", "),bv=/^url\(['"]?#(.*?)['"]?\)$/,_t=(()=>{class i{_elementRef=d(N);_iconRegistry=d(sh);_location=d(_v);_errorHandler=d(An);_defaultColor;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;inline=!1;get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}_svgIcon;get fontSet(){return this._fontSet}set fontSet(e){let t=this._cleanupFontValue(e);t!==this._fontSet&&(this._fontSet=t,this._updateFontIconClasses())}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(e){let t=this._cleanupFontValue(e);t!==this._fontIcon&&(this._fontIcon=t,this._updateFontIconClasses())}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName=null;_svgNamespace=null;_previousPath;_elementsWithExternalReferences;_currentIconFetch=ke.EMPTY;constructor(){let e=d(new Ei("aria-hidden"),{optional:!0}),t=d(gv,{optional:!0});t&&(t.color&&(this.color=this._defaultColor=t.color),t.fontSet&&(this.fontSet=t.fontSet)),e||this._elementRef.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(e){if(!e)return["",""];let t=e.split(":");switch(t.length){case 1:return["",t[0]];case 2:return t;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let e=this._elementsWithExternalReferences;if(e&&e.size){let t=this._location.getPathname();t!==this._previousPath&&(this._previousPath=t,this._prependPathToReferences(t))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();let t=this._location.getPathname();this._previousPath=t,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(t),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){let e=this._elementRef.nativeElement,t=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();t--;){let n=e.childNodes[t];(n.nodeType!==1||n.nodeName.toLowerCase()==="svg")&&n.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let e=this._elementRef.nativeElement,t=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>e.classList.remove(n)),t.forEach(n=>e.classList.add(n)),this._previousFontSetClass=t,this.fontIcon!==this._previousFontIconClass&&!t.includes("mat-ligature-font")&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return typeof e=="string"?e.trim().split(" ")[0]:e}_prependPathToReferences(e){let t=this._elementsWithExternalReferences;t&&t.forEach((n,a)=>{n.forEach(r=>{a.setAttribute(r.name,`url('${e}#${r.value}')`)})})}_cacheChildrenWithExternalReferences(e){let t=e.querySelectorAll(vv),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let a=0;a<t.length;a++)lh.forEach(r=>{let u=t[a],h=u.getAttribute(r),g=h?h.match(bv):null;if(g){let v=n.get(u);v||(v=[],n.set(u,v)),v.push({name:r,value:g[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){let[t,n]=this._splitIconName(e);t&&(this._svgNamespace=t),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,t).pipe(ct(1)).subscribe(a=>this._setSvgElement(a),a=>{let r=`Error retrieving icon ${t}:${n}! ${a.message}`;this._errorHandler.handleError(new Error(r))})}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(t,n){t&2&&(Z("data-mat-icon-type",n._usingFontIcon()?"font":"svg")("data-mat-icon-name",n._svgName||n.fontIcon)("data-mat-icon-namespace",n._svgNamespace||n.fontSet)("fontIcon",n._usingFontIcon()?n.fontIcon:null),tt(n.color?"mat-"+n.color:""),p("mat-icon-inline",n.inline)("mat-icon-no-color",n.color!=="primary"&&n.color!=="accent"&&n.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",L],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],ngContentSelectors:fv,decls:1,vars:0,template:function(t,n){t&1&&(fe(),G(0))},styles:[`mat-icon, mat-icon.mat-primary, mat-icon.mat-accent, mat-icon.mat-warn {
2188
2188
  color: var(--mat-icon-color, inherit);
2189
2189
  }
2190
2190
 
@@ -2220,10 +2220,10 @@ select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) optio
2220
2220
  .mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon {
2221
2221
  margin: auto;
2222
2222
  }
2223
- `],encapsulation:2})}return i})(),Ft=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[ee]})}return i})();var lh=(()=>{class i{constructor(){this.http=d(Qt),this.staticUrl="/api/gpus",this.usageUrl="/api/gpus/usage"}fetchGpus(){return this.http.get(this.staticUrl).pipe(di({error:e=>console.error("[GpuService] static fetch error:",e)}))}fetchStatus(){return this.http.get(this.usageUrl).pipe(di({error:e=>console.error("[GpuService] status fetch error:",e)}))}watchStatus(e){return Za(0,e).pipe(We(()=>this.fetchStatus()))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ne({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var ch="dashboard-layout",rs=(()=>{class i{constructor(){this.layout=I(this.readSaved())}setLayout(e){this.layout.set(e),localStorage.setItem(ch,e)}readSaved(){return localStorage.getItem(ch)==="horizontal"?"horizontal":"vertical"}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ne({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function ss(i){return i&&typeof i.connect=="function"&&!(i instanceof Wc)}var gi=(function(i){return i[i.REPLACED=0]="REPLACED",i[i.INSERTED=1]="INSERTED",i[i.MOVED=2]="MOVED",i[i.REMOVED=3]="REMOVED",i})(gi||{}),ls=class{viewCacheSize=20;_viewCache=[];applyChanges(o,e,t,n,a){o.forEachOperation((r,u,h)=>{let g,v;if(r.previousIndex==null){let D=()=>t(r,u,h);g=this._insertView(D,h,e,n(r)),v=g?gi.INSERTED:gi.REPLACED}else h==null?(this._detachAndCacheView(u,e),v=gi.REMOVED):(g=this._moveView(u,h,e,n(r)),v=gi.MOVED);a&&a({context:g?.context,operation:v,record:r})})}detach(){for(let o of this._viewCache)o.destroy();this._viewCache=[]}_insertView(o,e,t,n){let a=this._insertViewFromCache(e,t);if(a){a.context.$implicit=n;return}let r=o();return t.createEmbeddedView(r.templateRef,r.context,r.index)}_detachAndCacheView(o,e){let t=e.detach(o);this._maybeCacheView(t,e)}_moveView(o,e,t,n){let a=t.get(o);return t.move(a,e),a.context.$implicit=n,a}_maybeCacheView(o,e){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(o);else{let t=e.indexOf(o);t===-1?o.destroy():e.remove(t)}}_insertViewFromCache(o,e){let t=this._viewCache.pop();return t&&e.insert(t,o),t||null}};var vv=20,gn=(()=>{class i{_ngZone=d(H);_platform=d(le);_renderer=d(ot).createRenderer(null,null);_cleanupGlobalListener;_scrolled=new R;_scrolledCount=0;scrollContainers=new Map;register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let t=this.scrollContainers.get(e);t&&(t.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=vv){return this._platform.isBrowser?new yt(t=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let n=e>0?this._scrolled.pipe(jo(e)).subscribe(t):this._scrolled.subscribe(t);return this._scrolledCount++,()=>{n.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):ge()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,t)=>this.deregister(t)),this._scrolled.complete()}ancestorScrolled(e,t){let n=this.getAncestorScrollContainers(e);return this.scrolled(t).pipe(we(a=>!a||n.indexOf(a)>-1))}getAncestorScrollContainers(e){let t=[];return this.scrollContainers.forEach((n,a)=>{this._targetContainsElement(a,e)&&t.push(a)}),t}_targetContainsElement(e,t){let n=Dt(t),a=e.getElementRef().nativeElement;do if(n==a)return!0;while(n=n.parentElement);return!1}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),uc=(()=>{class i{elementRef=d(N);scrollDispatcher=d(gn);ngZone=d(H);dir=d(qe,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new R;_renderer=d(ve);_cleanupScroll;_elementScrolled=new R;ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",e=>this._elementScrolled.next(e))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let t=this.elementRef.nativeElement,n=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=n?e.end:e.start),e.right==null&&(e.right=n?e.start:e.end),e.bottom!=null&&(e.top=t.scrollHeight-t.clientHeight-e.bottom),n&&uo()!=fi.NORMAL?(e.left!=null&&(e.right=t.scrollWidth-t.clientWidth-e.left),uo()==fi.INVERTED?e.left=e.right:uo()==fi.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=t.scrollWidth-t.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let t=this.elementRef.nativeElement;Fr()?t.scrollTo(e):(e.top!=null&&(t.scrollTop=e.top),e.left!=null&&(t.scrollLeft=e.left))}measureScrollOffset(e){let t="left",n="right",a=this.elementRef.nativeElement;if(e=="top")return a.scrollTop;if(e=="bottom")return a.scrollHeight-a.clientHeight-a.scrollTop;let r=this.dir&&this.dir.value=="rtl";return e=="start"?e=r?n:t:e=="end"&&(e=r?t:n),r&&uo()==fi.INVERTED?e==t?a.scrollWidth-a.clientWidth-a.scrollLeft:a.scrollLeft:r&&uo()==fi.NEGATED?e==t?a.scrollLeft+a.scrollWidth-a.clientWidth:-a.scrollLeft:e==t?a.scrollLeft:a.scrollWidth-a.clientWidth-a.scrollLeft}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return i})(),bv=20,Gt=(()=>{class i{_platform=d(le);_listeners;_viewportSize=null;_change=new R;_document=d(q);constructor(){let e=d(H),t=d(ot).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let n=a=>this._change.next(a);this._listeners=[t.listen("window","resize",n),t.listen("window","orientationchange",n)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(e=>e()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:t,height:n}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+n,right:e.left+t,height:n,width:t}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,t=this._getWindow(),n=e.documentElement,a=n.getBoundingClientRect(),r=-a.top||e.body?.scrollTop||t.scrollY||n.scrollTop||0,u=-a.left||e.body?.scrollLeft||t.scrollX||n.scrollLeft||0;return{top:r,left:u}}change(e=bv){return e>0?this._change.pipe(jo(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var dh=new x("CDK_VIRTUAL_SCROLL_VIEWPORT");var _i=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({})}return i})(),Sa=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[ee,_i,ee,_i]})}return i})();var cs=class{applyChanges(o,e,t,n,a){o.forEachOperation((r,u,h)=>{let g,v;if(r.previousIndex==null){let D=t(r,u,h);g=e.createEmbeddedView(D.templateRef,D.context,D.index),v=gi.INSERTED}else h==null?(e.remove(u),v=gi.REMOVED):(g=e.get(u),e.move(g,h),v=gi.MOVED);a&&a({context:g?.context,operation:v,record:r})})}detach(){}};var Cv=[[["caption"]],[["colgroup"],["col"]],"*"],xv=["caption","colgroup, col","*"];function wv(i,o){i&1&&U(0,2)}function Dv(i,o){i&1&&(s(0,"thead",0),Yt(1,1),l(),s(2,"tbody",0),Yt(3,2)(4,3),l(),s(5,"tfoot",0),Yt(6,4),l())}function Sv(i,o){i&1&&Yt(0,1)(1,2)(2,3)(3,4)}var vi=new x("CDK_TABLE");var ms=(()=>{class i{template=d(Ye);static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdkCellDef",""]]})}return i})(),hh=(()=>{class i{template=d(Ye);static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdkHeaderCellDef",""]]})}return i})(),ph=(()=>{class i{template=d(Ye);static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdkFooterCellDef",""]]})}return i})(),Ea=(()=>{class i{_table=d(vi,{optional:!0});_hasStickyChanged=!1;get name(){return this._name}set name(e){this._setNameInput(e)}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=!0)}_stickyEnd=!1;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,n,a){if(t&1&&at(a,ms,5)(a,hh,5)(a,ph,5),t&2){let r;P(r=F())&&(n.cell=r.first),P(r=F())&&(n.headerCell=r.first),P(r=F())&&(n.footerCell=r.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",L],stickyEnd:[2,"stickyEnd","stickyEnd",L]}})}return i})(),hc=class{constructor(o,e){e.nativeElement.classList.add(...o._columnCssClassName)}};var fh=(()=>{class i extends hc{constructor(){let e=d(Ea),t=d(N);super(e,t);let n=e._table?._getCellRole();n&&t.nativeElement.setAttribute("role",n)}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[Q]})}return i})();var fc=(()=>{class i{template=d(Ye);_differs=d(qo);columns;_columnsDiffer;ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof gc?e.headerCell.template:this instanceof _c?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,features:[ke]})}return i})(),gc=(()=>{class i extends fc{_table=d(vi,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",L]},features:[Q,ke]})}return i})(),_c=(()=>{class i extends fc{_table=d(vi,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",L]},features:[Q,ke]})}return i})(),us=(()=>{class i extends fc{_table=d(vi,{optional:!0});when;static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[Q]})}return i})(),Ma=(()=>{class i{_viewContainer=d(Xe);cells;context;static mostRecentCellOutlet=null;constructor(){i.mostRecentCellOutlet=this}ngOnDestroy(){i.mostRecentCellOutlet===this&&(i.mostRecentCellOutlet=null)}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdkCellOutlet",""]]})}return i})();var vc=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&Yt(0,0)},dependencies:[Ma],encapsulation:2,changeDetection:1})}return i})(),gh=(()=>{class i{templateRef=d(Ye);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["ng-template","cdkNoDataRow",""]]})}return i})(),mh=["top","bottom","left","right"],pc=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(o=>this._updateCachedSizes(o)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=!1;constructor(o,e,t=!0,n=!0,a,r,u){this._isNativeHtmlTable=o,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=n,this.direction=a,this._positionListener=r,this._tableInjector=u,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(o,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(o);let t=[];for(let n of o)n.nodeType===n.ELEMENT_NODE&&t.push(n,...Array.from(n.children));je({write:()=>{for(let n of t)this._removeStickyStyle(n,e)}},{injector:this._tableInjector})}updateStickyColumns(o,e,t,n=!0,a=!0){if(!o.length||!this._isBrowser||!(e.some(se=>se)||t.some(se=>se))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let r=o[0],u=r.children.length,h=this.direction==="rtl",g=h?"right":"left",v=h?"left":"right",D=e.lastIndexOf(!0),B=t.indexOf(!0),$,ie,fe;a&&this._updateStickyColumnReplayQueue({rows:[...o],stickyStartStates:[...e],stickyEndStates:[...t]}),je({earlyRead:()=>{$=this._getCellWidths(r,n),ie=this._getStickyStartColumnPositions($,e),fe=this._getStickyEndColumnPositions($,t)},write:()=>{for(let se of o)for(let Ae=0;Ae<u;Ae++){let lt=se.children[Ae];e[Ae]&&this._addStickyStyle(lt,g,ie[Ae],Ae===D),t[Ae]&&this._addStickyStyle(lt,v,fe[Ae],Ae===B)}this._positionListener&&$.some(se=>!!se)&&(this._positionListener.stickyColumnsUpdated({sizes:D===-1?[]:$.slice(0,D+1).map((se,Ae)=>e[Ae]?se:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:B===-1?[]:$.slice(B).map((se,Ae)=>t[Ae+B]?se:null).reverse()}))}},{injector:this._tableInjector})}stickRows(o,e,t){if(!this._isBrowser)return;let n=t==="bottom"?o.slice().reverse():o,a=t==="bottom"?e.slice().reverse():e,r=[],u=[],h=[];je({earlyRead:()=>{for(let g=0,v=0;g<n.length;g++){if(!a[g])continue;r[g]=v;let D=n[g];h[g]=this._isNativeHtmlTable?Array.from(D.children):[D];let B=this._retrieveElementSize(D).height;v+=B,u[g]=B}},write:()=>{let g=a.lastIndexOf(!0);for(let v=0;v<n.length;v++){if(!a[v])continue;let D=r[v],B=v===g;for(let $ of h[v])this._addStickyStyle($,t,D,B)}t==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:u,offsets:r,elements:h}):this._positionListener?.stickyFooterRowsUpdated({sizes:u,offsets:r,elements:h})}},{injector:this._tableInjector})}updateStickyFooterContainer(o,e){this._isNativeHtmlTable&&je({write:()=>{let t=o.querySelector("tfoot");t&&(e.some(n=>!n)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,!1))}},{injector:this._tableInjector})}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=!0}_removeStickyStyle(o,e){if(!o.classList.contains(this._stickCellCss))return;for(let n of e)o.style[n]="",o.classList.remove(this._borderCellCss[n]);mh.some(n=>e.indexOf(n)===-1&&o.style[n])?o.style.zIndex=this._getCalculatedZIndex(o):(o.style.zIndex="",this._needsPositionStickyOnElement&&(o.style.position=""),o.classList.remove(this._stickCellCss))}_addStickyStyle(o,e,t,n){o.classList.add(this._stickCellCss),n&&o.classList.add(this._borderCellCss[e]),o.style[e]=`${t}px`,o.style.zIndex=this._getCalculatedZIndex(o),this._needsPositionStickyOnElement&&(o.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(o){let e={top:100,bottom:10,left:1,right:1},t=0;for(let n of mh)o.style[n]&&(t+=e[n]);return t?`${t}`:""}_getCellWidths(o,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],n=o.children;for(let a=0;a<n.length;a++){let r=n[a];t.push(this._retrieveElementSize(r).width)}return this._cachedCellWidths=t,t}_getStickyStartColumnPositions(o,e){let t=[],n=0;for(let a=0;a<o.length;a++)e[a]&&(t[a]=n,n+=o[a]);return t}_getStickyEndColumnPositions(o,e){let t=[],n=0;for(let a=o.length;a>0;a--)e[a]&&(t[a]=n,n+=o[a]);return t}_retrieveElementSize(o){let e=this._elemSizeCache.get(o);if(e)return e;let t=o.getBoundingClientRect(),n={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(o,n),this._resizeObserver.observe(o,{box:"border-box"})),n}_updateStickyColumnReplayQueue(o){this._removeFromStickyColumnReplayQueue(o.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(o)}_removeFromStickyColumnReplayQueue(o){let e=new Set(o);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(n=>!e.has(n));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length)}_updateCachedSizes(o){let e=!1;for(let t of o){let n=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};n.width!==this._elemSizeCache.get(t.target)?.width&&kv(t.target)&&(e=!0),this._elemSizeCache.set(t.target,n)}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null}},0))}};function kv(i){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(o=>i.classList.contains(o))}var ka=new x("STICKY_POSITIONING_LISTENER");var bc=(()=>{class i{viewContainer=d(Xe);elementRef=d(N);constructor(){let e=d(vi);e._rowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","rowOutlet",""]]})}return i})(),yc=(()=>{class i{viewContainer=d(Xe);elementRef=d(N);constructor(){let e=d(vi);e._headerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","headerRowOutlet",""]]})}return i})(),Cc=(()=>{class i{viewContainer=d(Xe);elementRef=d(N);constructor(){let e=d(vi);e._footerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","footerRowOutlet",""]]})}return i})(),xc=(()=>{class i{viewContainer=d(Xe);elementRef=d(N);constructor(){let e=d(vi);e._noDataRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","noDataRowOutlet",""]]})}return i})(),wc=(()=>{class i{_differs=d(qo);_changeDetectorRef=d(te);_elementRef=d(N);_dir=d(qe,{optional:!0});_platform=d(le);_viewRepeater;_viewportRuler=d(Gt);_injector=d(X);_virtualScrollViewport=d(dh,{optional:!0,host:!0});_positionListener=d(ka,{optional:!0})||d(ka,{optional:!0,skipSelf:!0});_document=d(q);_data;_renderedRange;_onDestroy=new R;_renderRows;_renderChangeSubscription=null;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef=null;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow=null;_headerRowDefChanged=!0;_footerRowDefChanged=!0;_stickyColumnStylesNeedReset=!0;_forceRecalculateCellWidths=!0;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=!0;_isServer;_isShowingNoDataRow=!1;_hasAllOutlets=!1;_hasInitialized=!1;_headerRowStickyUpdates=new R;_footerRowStickyUpdates=new R;_disableVirtualScrolling=!1;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&(this._switchDataSource(e),this._changeDetectorRef.markForCheck())}_dataSource;_dataSourceChanges=new R;_dataStream=new R;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}_multiTemplateDataRows=!1;get fixedLayout(){return this._virtualScrollEnabled()?!0:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}_fixedLayout=!1;recycleRows=!1;contentChanged=new K;viewChange=new Qn({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;get renderedRows(){return this._renderRows}constructor(){d(new Di("role"),{optional:!0})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((t,n)=>this.trackBy?this.trackBy(n.dataIndex,n.data):n)}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(ae(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new ls:new cs,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._headerRowStickyUpdates.complete(),this._footerRowStickyUpdates.complete(),this._onDestroy.next(),this._onDestroy.complete(),ss(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(n,a,r)=>this._getEmbeddedViewArgs(n.item,r),n=>n.item.data,n=>{n.operation===gi.INSERTED&&n.context&&this._renderCellTemplateForItem(n.record.item.rowDef,n.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(n=>{let a=t.get(n.currentIndex);a.context.$implicit=n.item.data}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let n=uh(this._headerRowOutlet,"thead");n&&(n.style.display=e.length?"":"none")}let t=this._headerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(n=>n.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let n=uh(this._footerRowOutlet,"tfoot");n&&(n.style.display=e.length?"":"none")}let t=this._footerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(n=>n.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),n=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...n],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((a,r)=>{this._addStickyColumnStyles([a],this._headerRowDefs[r])}),this._rowDefs.forEach(a=>{let r=[];for(let u=0;u<t.length;u++)this._renderRows[u].rowDef===a&&r.push(t[u]);this._addStickyColumnStyles(r,a)}),n.forEach((a,r)=>{this._addStickyColumnStyles([a],this._footerRowDefs[r])}),Array.from(this._columnDefsByName.values()).forEach(a=>a.resetStickyChanged())}stickyColumnsUpdated(e){this._positionListener?.stickyColumnsUpdated(e)}stickyEndColumnsUpdated(e){this._positionListener?.stickyEndColumnsUpdated(e)}stickyHeaderRowsUpdated(e){this._headerRowStickyUpdates.next(e),this._positionListener?.stickyHeaderRowsUpdated(e)}stickyFooterRowsUpdated(e){this._footerRowStickyUpdates.next(e),this._positionListener?.stickyFooterRowsUpdated(e)}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){if(!Array.isArray(this._data)||!this._renderedRange)return[];let e=[],t=Math.min(this._data.length,this._renderedRange.end),n=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let a=this._renderedRange.start;a<t;a++){let r=this._data[a],u=this._getRenderRowsForData(r,a,n.get(r));this._cachedRenderRowsMap.has(r)||this._cachedRenderRowsMap.set(r,new WeakMap);for(let h=0;h<u.length;h++){let g=u[h],v=this._cachedRenderRowsMap.get(g.data);v.has(g.rowDef)?v.get(g.rowDef).push(g):v.set(g.rowDef,[g]),e.push(g)}}return e}_getRenderRowsForData(e,t,n){return this._getRowDefs(e,t).map(r=>{let u=n&&n.has(r)?n.get(r):[];if(u.length){let h=u.shift();return h.dataIndex=t,h}else return{data:e,rowDef:r,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),ds(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=ds(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=ds(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=ds(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(r,u)=>{let h=!!u.getColumnsDiff();return r||h},t=this._rowDefs.reduce(e,!1);t&&this._forceRenderDataRows();let n=this._headerRowDefs.reduce(e,!1);n&&this._forceRenderHeaderRows();let a=this._footerRowDefs.reduce(e,!1);return a&&this._forceRenderFooterRows(),t||n||a}_switchDataSource(e){this._data=[],ss(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;ss(this.dataSource)?e=this.dataSource.connect(this):js(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=ge(this.dataSource)),this._renderChangeSubscription=Jn([e,this.viewChange]).pipe(ae(this._onDestroy)).subscribe(([t,n])=>{this._data=t||[],this._renderedRange=n,this._dataStream.next(t),this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,t){let n=Array.from(t?.columns||[]).map(u=>{let h=this._columnDefsByName.get(u);return h}),a=n.map(u=>u.sticky),r=n.map(u=>u.stickyEnd);this._stickyStyler.updateStickyColumns(e,a,r,!this.fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let t=[];for(let n=0;n<e.viewContainer.length;n++){let a=e.viewContainer.get(n);t.push(a.rootNodes[0])}return t}_getRowDefs(e,t){if(this._rowDefs.length===1)return[this._rowDefs[0]];let n=[];if(this.multiTemplateDataRows)n=this._rowDefs.filter(a=>!a.when||a.when(t,e));else{let a=this._rowDefs.find(r=>r.when&&r.when(t,e))||this._defaultRowDef;a&&n.push(a)}return n.length,n}_getEmbeddedViewArgs(e,t){let n=e.rowDef,a={$implicit:e.data};return{templateRef:n.template,context:a,index:t}}_renderRow(e,t,n,a={}){let r=e.viewContainer.createEmbeddedView(t.template,a,n);return this._renderCellTemplateForItem(t,a),r}_renderCellTemplateForItem(e,t){for(let n of this._getCellTemplates(e))Ma.mostRecentCellOutlet&&Ma.mostRecentCellOutlet._viewContainer.createEmbeddedView(n,t);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,n=e.length;t<n;t++){let r=e.get(t).context;r.count=n,r.first=t===0,r.last=t===n-1,r.even=t%2===0,r.odd=!r.even,this.multiTemplateDataRows?(r.dataIndex=this._renderRows[t].dataIndex,r.renderIndex=t):r.index=this._renderRows[t].dataIndex}}_getCellTemplates(e){return!e||!e.columns?[]:Array.from(e.columns,t=>{let n=this._columnDefsByName.get(t);return e.extractCellTemplate(n)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(t,n)=>t||n.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",t=this._injector;this._stickyStyler=new pc(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:ge()).pipe(ae(this._onDestroy)).subscribe(n=>{this._stickyStyler.direction=n,this.updateStickyColumnStyles()})}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?zs:Bs;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(jo(0,t),ae(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(n,a)=>this._measureRangeSize(n,a)}),Jn([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(ae(this._onDestroy)).subscribe(([n,a])=>{if(!(!a.sizes||!a.offsets||!a.elements))for(let r=0;r<a.elements.length;r++){let u=a.elements[r];if(u){let h=a.offsets[r],g=n!==0?Math.max(n-h,h):-h;for(let v of u)v.style.top=`${-g}px`}}}),Jn([e.renderedContentOffset,this._footerRowStickyUpdates]).pipe(ae(this._onDestroy)).subscribe(([n,a])=>{if(!(!a.sizes||!a.offsets||!a.elements))for(let r=0;r<a.elements.length;r++){let u=a.elements[r];if(u)for(let h of u)h.style.bottom=`${n+a.offsets[r]}px`}})}_getOwnDefs(e){return e.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let n=this._noDataRowOutlet.viewContainer;if(t){let a=n.createEmbeddedView(e.templateRef),r=a.rootNodes[0];if(a.rootNodes.length===1&&r?.nodeType===this._document.ELEMENT_NODE){r.setAttribute("role","row"),r.classList.add(...e._contentClassNames);let u=r.querySelectorAll(e._cellSelector);for(let h=0;h<u.length;h++)u[h].classList.add(...e._cellClassNames)}}else n.clear();this._isShowingNoDataRow=t,this._changeDetectorRef.markForCheck()}_measureRangeSize(e,t){if(e.start>=e.end||t!=="vertical")return 0;let n=this.viewChange.value,a=this._rowOutlet.viewContainer;e.start<n.start||e.end>n.end;let r=e.start-n.start,u=e.end-e.start,h,g;for(let B=0;B<u;B++){let $=a.get(B+r);if($&&$.rootNodes.length){h=g=$.rootNodes[0];break}}for(let B=u-1;B>-1;B--){let $=a.get(B+r);if($&&$.rootNodes.length){g=$.rootNodes[$.rootNodes.length-1];break}}let v=h?.getBoundingClientRect?.(),D=g?.getBoundingClientRect?.();return v&&D?D.bottom-v.top:0}_virtualScrollEnabled(){return!this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,n,a){if(t&1&&at(a,gh,5)(a,Ea,5)(a,us,5)(a,gc,5)(a,_c,5),t&2){let r;P(r=F())&&(n._noDataRow=r.first),P(r=F())&&(n._contentColumnDefs=r),P(r=F())&&(n._contentRowDefs=r),P(r=F())&&(n._contentHeaderRowDefs=r),P(r=F())&&(n._contentFooterRowDefs=r)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,n){t&2&&p("cdk-table-fixed-layout",n.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",L],fixedLayout:[2,"fixedLayout","fixedLayout",L],recycleRows:[2,"recycleRows","recycleRows",L]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[J([{provide:vi,useExisting:i},{provide:ka,useValue:null}])],ngContentSelectors:xv,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,n){t&1&&(ce(Cv),U(0),U(1,1),M(2,wv,1,0),M(3,Dv,7,0)(4,Sv,4,0)),t&2&&(c(2),E(n._isServer?2:-1),c(),E(n._isNativeHtmlTable?3:4))},dependencies:[yc,bc,xc,Cc],styles:[`.cdk-table-fixed-layout {
2223
+ `],encapsulation:2})}return i})(),vt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[te]})}return i})();var ch=(()=>{class i{constructor(){this.http=d(Ft),this.staticUrl="/api/gpus",this.usageUrl="/api/gpus/usage"}fetchGpus(){return this.http.get(this.staticUrl).pipe(mi({error:e=>console.error("[GpuService] static fetch error:",e)}))}fetchStatus(){return this.http.get(this.usageUrl).pipe(mi({error:e=>console.error("[GpuService] status fetch error:",e)}))}watchStatus(e){return Qa(0,e).pipe(We(()=>this.fetchStatus()))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var dh="dashboard-layout",rs=(()=>{class i{constructor(){this.layout=T(this.readSaved())}setLayout(e){this.layout.set(e),localStorage.setItem(dh,e)}readSaved(){return localStorage.getItem(dh)==="horizontal"?"horizontal":"vertical"}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function ss(i){return i&&typeof i.connect=="function"&&!(i instanceof qc)}var bi=(function(i){return i[i.REPLACED=0]="REPLACED",i[i.INSERTED=1]="INSERTED",i[i.MOVED=2]="MOVED",i[i.REMOVED=3]="REMOVED",i})(bi||{}),ls=class{viewCacheSize=20;_viewCache=[];applyChanges(o,e,t,n,a){o.forEachOperation((r,u,h)=>{let g,v;if(r.previousIndex==null){let D=()=>t(r,u,h);g=this._insertView(D,h,e,n(r)),v=g?bi.INSERTED:bi.REPLACED}else h==null?(this._detachAndCacheView(u,e),v=bi.REMOVED):(g=this._moveView(u,h,e,n(r)),v=bi.MOVED);a&&a({context:g?.context,operation:v,record:r})})}detach(){for(let o of this._viewCache)o.destroy();this._viewCache=[]}_insertView(o,e,t,n){let a=this._insertViewFromCache(e,t);if(a){a.context.$implicit=n;return}let r=o();return t.createEmbeddedView(r.templateRef,r.context,r.index)}_detachAndCacheView(o,e){let t=e.detach(o);this._maybeCacheView(t,e)}_moveView(o,e,t,n){let a=t.get(o);return t.move(a,e),a.context.$implicit=n,a}_maybeCacheView(o,e){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(o);else{let t=e.indexOf(o);t===-1?o.destroy():e.remove(t)}}_insertViewFromCache(o,e){let t=this._viewCache.pop();return t&&e.insert(t,o),t||null}};var yv=20,vn=(()=>{class i{_ngZone=d(U);_platform=d(ce);_renderer=d(ot).createRenderer(null,null);_cleanupGlobalListener;_scrolled=new R;_scrolledCount=0;scrollContainers=new Map;register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let t=this.scrollContainers.get(e);t&&(t.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=yv){return this._platform.isBrowser?new wt(t=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let n=e>0?this._scrolled.pipe(jo(e)).subscribe(t):this._scrolled.subscribe(t);return this._scrolledCount++,()=>{n.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):be()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,t)=>this.deregister(t)),this._scrolled.complete()}ancestorScrolled(e,t){let n=this.getAncestorScrollContainers(e);return this.scrolled(t).pipe(De(a=>!a||n.indexOf(a)>-1))}getAncestorScrollContainers(e){let t=[];return this.scrollContainers.forEach((n,a)=>{this._targetContainsElement(a,e)&&t.push(a)}),t}_targetContainsElement(e,t){let n=Mt(t),a=e.getElementRef().nativeElement;do if(n==a)return!0;while(n=n.parentElement);return!1}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),hc=(()=>{class i{elementRef=d(N);scrollDispatcher=d(vn);ngZone=d(U);dir=d(qe,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new R;_renderer=d(Ce);_cleanupScroll;_elementScrolled=new R;ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",e=>this._elementScrolled.next(e))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let t=this.elementRef.nativeElement,n=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=n?e.end:e.start),e.right==null&&(e.right=n?e.start:e.end),e.bottom!=null&&(e.top=t.scrollHeight-t.clientHeight-e.bottom),n&&ho()!=gi.NORMAL?(e.left!=null&&(e.right=t.scrollWidth-t.clientWidth-e.left),ho()==gi.INVERTED?e.left=e.right:ho()==gi.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=t.scrollWidth-t.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let t=this.elementRef.nativeElement;Fr()?t.scrollTo(e):(e.top!=null&&(t.scrollTop=e.top),e.left!=null&&(t.scrollLeft=e.left))}measureScrollOffset(e){let t="left",n="right",a=this.elementRef.nativeElement;if(e=="top")return a.scrollTop;if(e=="bottom")return a.scrollHeight-a.clientHeight-a.scrollTop;let r=this.dir&&this.dir.value=="rtl";return e=="start"?e=r?n:t:e=="end"&&(e=r?t:n),r&&ho()==gi.INVERTED?e==t?a.scrollWidth-a.clientWidth-a.scrollLeft:a.scrollLeft:r&&ho()==gi.NEGATED?e==t?a.scrollLeft+a.scrollWidth-a.clientWidth:-a.scrollLeft:e==t?a.scrollLeft:a.scrollWidth-a.clientWidth-a.scrollLeft}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return i})(),Cv=20,qt=(()=>{class i{_platform=d(ce);_listeners;_viewportSize=null;_change=new R;_document=d(q);constructor(){let e=d(U),t=d(ot).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let n=a=>this._change.next(a);this._listeners=[t.listen("window","resize",n),t.listen("window","orientationchange",n)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(e=>e()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:t,height:n}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+n,right:e.left+t,height:n,width:t}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,t=this._getWindow(),n=e.documentElement,a=n.getBoundingClientRect(),r=-a.top||e.body?.scrollTop||t.scrollY||n.scrollTop||0,u=-a.left||e.body?.scrollLeft||t.scrollX||n.scrollLeft||0;return{top:r,left:u}}change(e=Cv){return e>0?this._change.pipe(jo(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var mh=new w("CDK_VIRTUAL_SCROLL_VIEWPORT");var yi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({})}return i})(),ka=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[te,yi,te,yi]})}return i})();var cs=class{applyChanges(o,e,t,n,a){o.forEachOperation((r,u,h)=>{let g,v;if(r.previousIndex==null){let D=t(r,u,h);g=e.createEmbeddedView(D.templateRef,D.context,D.index),v=bi.INSERTED}else h==null?(e.remove(u),v=bi.REMOVED):(g=e.get(u),e.move(g,h),v=bi.MOVED);a&&a({context:g?.context,operation:v,record:r})})}detach(){}};var wv=[[["caption"]],[["colgroup"],["col"]],"*"],Dv=["caption","colgroup, col","*"];function Sv(i,o){i&1&&G(0,2)}function kv(i,o){i&1&&(s(0,"thead",0),Qt(1,1),l(),s(2,"tbody",0),Qt(3,2)(4,3),l(),s(5,"tfoot",0),Qt(6,4),l())}function Mv(i,o){i&1&&Qt(0,1)(1,2)(2,3)(3,4)}var Ci=new w("CDK_TABLE");var ms=(()=>{class i{template=d(Ze);static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdkCellDef",""]]})}return i})(),ph=(()=>{class i{template=d(Ze);static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdkHeaderCellDef",""]]})}return i})(),fh=(()=>{class i{template=d(Ze);static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdkFooterCellDef",""]]})}return i})(),Aa=(()=>{class i{_table=d(Ci,{optional:!0});_hasStickyChanged=!1;get name(){return this._name}set name(e){this._setNameInput(e)}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=!0)}_stickyEnd=!1;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,n,a){if(t&1&&at(a,ms,5)(a,ph,5)(a,fh,5),t&2){let r;P(r=F())&&(n.cell=r.first),P(r=F())&&(n.headerCell=r.first),P(r=F())&&(n.footerCell=r.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",L],stickyEnd:[2,"stickyEnd","stickyEnd",L]}})}return i})(),pc=class{constructor(o,e){e.nativeElement.classList.add(...o._columnCssClassName)}};var gh=(()=>{class i extends pc{constructor(){let e=d(Aa),t=d(N);super(e,t);let n=e._table?._getCellRole();n&&t.nativeElement.setAttribute("role",n)}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[Q]})}return i})();var gc=(()=>{class i{template=d(Ze);_differs=d(qo);columns;_columnsDiffer;ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof _c?e.headerCell.template:this instanceof vc?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,features:[Ee]})}return i})(),_c=(()=>{class i extends gc{_table=d(Ci,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",L]},features:[Q,Ee]})}return i})(),vc=(()=>{class i extends gc{_table=d(Ci,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",L]},features:[Q,Ee]})}return i})(),us=(()=>{class i extends gc{_table=d(Ci,{optional:!0});when;static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[Q]})}return i})(),Ea=(()=>{class i{_viewContainer=d(Qe);cells;context;static mostRecentCellOutlet=null;constructor(){i.mostRecentCellOutlet=this}ngOnDestroy(){i.mostRecentCellOutlet===this&&(i.mostRecentCellOutlet=null)}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdkCellOutlet",""]]})}return i})();var bc=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&Qt(0,0)},dependencies:[Ea],encapsulation:2,changeDetection:1})}return i})(),_h=(()=>{class i{templateRef=d(Ze);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["ng-template","cdkNoDataRow",""]]})}return i})(),uh=["top","bottom","left","right"],fc=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(o=>this._updateCachedSizes(o)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=!1;constructor(o,e,t=!0,n=!0,a,r,u){this._isNativeHtmlTable=o,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=n,this.direction=a,this._positionListener=r,this._tableInjector=u,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(o,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(o);let t=[];for(let n of o)n.nodeType===n.ELEMENT_NODE&&t.push(n,...Array.from(n.children));je({write:()=>{for(let n of t)this._removeStickyStyle(n,e)}},{injector:this._tableInjector})}updateStickyColumns(o,e,t,n=!0,a=!0){if(!o.length||!this._isBrowser||!(e.some(le=>le)||t.some(le=>le))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let r=o[0],u=r.children.length,h=this.direction==="rtl",g=h?"right":"left",v=h?"left":"right",D=e.lastIndexOf(!0),z=t.indexOf(!0),W,ne,ve;a&&this._updateStickyColumnReplayQueue({rows:[...o],stickyStartStates:[...e],stickyEndStates:[...t]}),je({earlyRead:()=>{W=this._getCellWidths(r,n),ne=this._getStickyStartColumnPositions(W,e),ve=this._getStickyEndColumnPositions(W,t)},write:()=>{for(let le of o)for(let Ie=0;Ie<u;Ie++){let lt=le.children[Ie];e[Ie]&&this._addStickyStyle(lt,g,ne[Ie],Ie===D),t[Ie]&&this._addStickyStyle(lt,v,ve[Ie],Ie===z)}this._positionListener&&W.some(le=>!!le)&&(this._positionListener.stickyColumnsUpdated({sizes:D===-1?[]:W.slice(0,D+1).map((le,Ie)=>e[Ie]?le:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:z===-1?[]:W.slice(z).map((le,Ie)=>t[Ie+z]?le:null).reverse()}))}},{injector:this._tableInjector})}stickRows(o,e,t){if(!this._isBrowser)return;let n=t==="bottom"?o.slice().reverse():o,a=t==="bottom"?e.slice().reverse():e,r=[],u=[],h=[];je({earlyRead:()=>{for(let g=0,v=0;g<n.length;g++){if(!a[g])continue;r[g]=v;let D=n[g];h[g]=this._isNativeHtmlTable?Array.from(D.children):[D];let z=this._retrieveElementSize(D).height;v+=z,u[g]=z}},write:()=>{let g=a.lastIndexOf(!0);for(let v=0;v<n.length;v++){if(!a[v])continue;let D=r[v],z=v===g;for(let W of h[v])this._addStickyStyle(W,t,D,z)}t==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:u,offsets:r,elements:h}):this._positionListener?.stickyFooterRowsUpdated({sizes:u,offsets:r,elements:h})}},{injector:this._tableInjector})}updateStickyFooterContainer(o,e){this._isNativeHtmlTable&&je({write:()=>{let t=o.querySelector("tfoot");t&&(e.some(n=>!n)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,!1))}},{injector:this._tableInjector})}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=!0}_removeStickyStyle(o,e){if(!o.classList.contains(this._stickCellCss))return;for(let n of e)o.style[n]="",o.classList.remove(this._borderCellCss[n]);uh.some(n=>e.indexOf(n)===-1&&o.style[n])?o.style.zIndex=this._getCalculatedZIndex(o):(o.style.zIndex="",this._needsPositionStickyOnElement&&(o.style.position=""),o.classList.remove(this._stickCellCss))}_addStickyStyle(o,e,t,n){o.classList.add(this._stickCellCss),n&&o.classList.add(this._borderCellCss[e]),o.style[e]=`${t}px`,o.style.zIndex=this._getCalculatedZIndex(o),this._needsPositionStickyOnElement&&(o.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(o){let e={top:100,bottom:10,left:1,right:1},t=0;for(let n of uh)o.style[n]&&(t+=e[n]);return t?`${t}`:""}_getCellWidths(o,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],n=o.children;for(let a=0;a<n.length;a++){let r=n[a];t.push(this._retrieveElementSize(r).width)}return this._cachedCellWidths=t,t}_getStickyStartColumnPositions(o,e){let t=[],n=0;for(let a=0;a<o.length;a++)e[a]&&(t[a]=n,n+=o[a]);return t}_getStickyEndColumnPositions(o,e){let t=[],n=0;for(let a=o.length;a>0;a--)e[a]&&(t[a]=n,n+=o[a]);return t}_retrieveElementSize(o){let e=this._elemSizeCache.get(o);if(e)return e;let t=o.getBoundingClientRect(),n={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(o,n),this._resizeObserver.observe(o,{box:"border-box"})),n}_updateStickyColumnReplayQueue(o){this._removeFromStickyColumnReplayQueue(o.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(o)}_removeFromStickyColumnReplayQueue(o){let e=new Set(o);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(n=>!e.has(n));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length)}_updateCachedSizes(o){let e=!1;for(let t of o){let n=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};n.width!==this._elemSizeCache.get(t.target)?.width&&Ev(t.target)&&(e=!0),this._elemSizeCache.set(t.target,n)}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null}},0))}};function Ev(i){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(o=>i.classList.contains(o))}var Ma=new w("STICKY_POSITIONING_LISTENER");var yc=(()=>{class i{viewContainer=d(Qe);elementRef=d(N);constructor(){let e=d(Ci);e._rowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","rowOutlet",""]]})}return i})(),Cc=(()=>{class i{viewContainer=d(Qe);elementRef=d(N);constructor(){let e=d(Ci);e._headerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","headerRowOutlet",""]]})}return i})(),xc=(()=>{class i{viewContainer=d(Qe);elementRef=d(N);constructor(){let e=d(Ci);e._footerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","footerRowOutlet",""]]})}return i})(),wc=(()=>{class i{viewContainer=d(Qe);elementRef=d(N);constructor(){let e=d(Ci);e._noDataRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","noDataRowOutlet",""]]})}return i})(),Dc=(()=>{class i{_differs=d(qo);_changeDetectorRef=d(ie);_elementRef=d(N);_dir=d(qe,{optional:!0});_platform=d(ce);_viewRepeater;_viewportRuler=d(qt);_injector=d(X);_virtualScrollViewport=d(mh,{optional:!0,host:!0});_positionListener=d(Ma,{optional:!0})||d(Ma,{optional:!0,skipSelf:!0});_document=d(q);_data;_renderedRange;_onDestroy=new R;_renderRows;_renderChangeSubscription=null;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef=null;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow=null;_headerRowDefChanged=!0;_footerRowDefChanged=!0;_stickyColumnStylesNeedReset=!0;_forceRecalculateCellWidths=!0;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=!0;_isServer;_isShowingNoDataRow=!1;_hasAllOutlets=!1;_hasInitialized=!1;_headerRowStickyUpdates=new R;_footerRowStickyUpdates=new R;_disableVirtualScrolling=!1;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&(this._switchDataSource(e),this._changeDetectorRef.markForCheck())}_dataSource;_dataSourceChanges=new R;_dataStream=new R;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}_multiTemplateDataRows=!1;get fixedLayout(){return this._virtualScrollEnabled()?!0:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}_fixedLayout=!1;recycleRows=!1;contentChanged=new K;viewChange=new Jn({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;get renderedRows(){return this._renderRows}constructor(){d(new Ei("role"),{optional:!0})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((t,n)=>this.trackBy?this.trackBy(n.dataIndex,n.data):n)}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(re(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new ls:new cs,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._headerRowStickyUpdates.complete(),this._footerRowStickyUpdates.complete(),this._onDestroy.next(),this._onDestroy.complete(),ss(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(n,a,r)=>this._getEmbeddedViewArgs(n.item,r),n=>n.item.data,n=>{n.operation===bi.INSERTED&&n.context&&this._renderCellTemplateForItem(n.record.item.rowDef,n.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(n=>{let a=t.get(n.currentIndex);a.context.$implicit=n.item.data}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let n=hh(this._headerRowOutlet,"thead");n&&(n.style.display=e.length?"":"none")}let t=this._headerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(n=>n.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let n=hh(this._footerRowOutlet,"tfoot");n&&(n.style.display=e.length?"":"none")}let t=this._footerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(n=>n.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),n=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...n],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((a,r)=>{this._addStickyColumnStyles([a],this._headerRowDefs[r])}),this._rowDefs.forEach(a=>{let r=[];for(let u=0;u<t.length;u++)this._renderRows[u].rowDef===a&&r.push(t[u]);this._addStickyColumnStyles(r,a)}),n.forEach((a,r)=>{this._addStickyColumnStyles([a],this._footerRowDefs[r])}),Array.from(this._columnDefsByName.values()).forEach(a=>a.resetStickyChanged())}stickyColumnsUpdated(e){this._positionListener?.stickyColumnsUpdated(e)}stickyEndColumnsUpdated(e){this._positionListener?.stickyEndColumnsUpdated(e)}stickyHeaderRowsUpdated(e){this._headerRowStickyUpdates.next(e),this._positionListener?.stickyHeaderRowsUpdated(e)}stickyFooterRowsUpdated(e){this._footerRowStickyUpdates.next(e),this._positionListener?.stickyFooterRowsUpdated(e)}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){if(!Array.isArray(this._data)||!this._renderedRange)return[];let e=[],t=Math.min(this._data.length,this._renderedRange.end),n=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let a=this._renderedRange.start;a<t;a++){let r=this._data[a],u=this._getRenderRowsForData(r,a,n.get(r));this._cachedRenderRowsMap.has(r)||this._cachedRenderRowsMap.set(r,new WeakMap);for(let h=0;h<u.length;h++){let g=u[h],v=this._cachedRenderRowsMap.get(g.data);v.has(g.rowDef)?v.get(g.rowDef).push(g):v.set(g.rowDef,[g]),e.push(g)}}return e}_getRenderRowsForData(e,t,n){return this._getRowDefs(e,t).map(r=>{let u=n&&n.has(r)?n.get(r):[];if(u.length){let h=u.shift();return h.dataIndex=t,h}else return{data:e,rowDef:r,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),ds(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=ds(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=ds(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=ds(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(r,u)=>{let h=!!u.getColumnsDiff();return r||h},t=this._rowDefs.reduce(e,!1);t&&this._forceRenderDataRows();let n=this._headerRowDefs.reduce(e,!1);n&&this._forceRenderHeaderRows();let a=this._footerRowDefs.reduce(e,!1);return a&&this._forceRenderFooterRows(),t||n||a}_switchDataSource(e){this._data=[],ss(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;ss(this.dataSource)?e=this.dataSource.connect(this):Hs(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=be(this.dataSource)),this._renderChangeSubscription=eo([e,this.viewChange]).pipe(re(this._onDestroy)).subscribe(([t,n])=>{this._data=t||[],this._renderedRange=n,this._dataStream.next(t),this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,t){let n=Array.from(t?.columns||[]).map(u=>{let h=this._columnDefsByName.get(u);return h}),a=n.map(u=>u.sticky),r=n.map(u=>u.stickyEnd);this._stickyStyler.updateStickyColumns(e,a,r,!this.fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let t=[];for(let n=0;n<e.viewContainer.length;n++){let a=e.viewContainer.get(n);t.push(a.rootNodes[0])}return t}_getRowDefs(e,t){if(this._rowDefs.length===1)return[this._rowDefs[0]];let n=[];if(this.multiTemplateDataRows)n=this._rowDefs.filter(a=>!a.when||a.when(t,e));else{let a=this._rowDefs.find(r=>r.when&&r.when(t,e))||this._defaultRowDef;a&&n.push(a)}return n.length,n}_getEmbeddedViewArgs(e,t){let n=e.rowDef,a={$implicit:e.data};return{templateRef:n.template,context:a,index:t}}_renderRow(e,t,n,a={}){let r=e.viewContainer.createEmbeddedView(t.template,a,n);return this._renderCellTemplateForItem(t,a),r}_renderCellTemplateForItem(e,t){for(let n of this._getCellTemplates(e))Ea.mostRecentCellOutlet&&Ea.mostRecentCellOutlet._viewContainer.createEmbeddedView(n,t);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,n=e.length;t<n;t++){let r=e.get(t).context;r.count=n,r.first=t===0,r.last=t===n-1,r.even=t%2===0,r.odd=!r.even,this.multiTemplateDataRows?(r.dataIndex=this._renderRows[t].dataIndex,r.renderIndex=t):r.index=this._renderRows[t].dataIndex}}_getCellTemplates(e){return!e||!e.columns?[]:Array.from(e.columns,t=>{let n=this._columnDefsByName.get(t);return e.extractCellTemplate(n)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(t,n)=>t||n.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",t=this._injector;this._stickyStyler=new fc(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:be()).pipe(re(this._onDestroy)).subscribe(n=>{this._stickyStyler.direction=n,this.updateStickyColumnStyles()})}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?js:zs;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(jo(0,t),re(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(n,a)=>this._measureRangeSize(n,a)}),eo([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(re(this._onDestroy)).subscribe(([n,a])=>{if(!(!a.sizes||!a.offsets||!a.elements))for(let r=0;r<a.elements.length;r++){let u=a.elements[r];if(u){let h=a.offsets[r],g=n!==0?Math.max(n-h,h):-h;for(let v of u)v.style.top=`${-g}px`}}}),eo([e.renderedContentOffset,this._footerRowStickyUpdates]).pipe(re(this._onDestroy)).subscribe(([n,a])=>{if(!(!a.sizes||!a.offsets||!a.elements))for(let r=0;r<a.elements.length;r++){let u=a.elements[r];if(u)for(let h of u)h.style.bottom=`${n+a.offsets[r]}px`}})}_getOwnDefs(e){return e.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let n=this._noDataRowOutlet.viewContainer;if(t){let a=n.createEmbeddedView(e.templateRef),r=a.rootNodes[0];if(a.rootNodes.length===1&&r?.nodeType===this._document.ELEMENT_NODE){r.setAttribute("role","row"),r.classList.add(...e._contentClassNames);let u=r.querySelectorAll(e._cellSelector);for(let h=0;h<u.length;h++)u[h].classList.add(...e._cellClassNames)}}else n.clear();this._isShowingNoDataRow=t,this._changeDetectorRef.markForCheck()}_measureRangeSize(e,t){if(e.start>=e.end||t!=="vertical")return 0;let n=this.viewChange.value,a=this._rowOutlet.viewContainer;e.start<n.start||e.end>n.end;let r=e.start-n.start,u=e.end-e.start,h,g;for(let z=0;z<u;z++){let W=a.get(z+r);if(W&&W.rootNodes.length){h=g=W.rootNodes[0];break}}for(let z=u-1;z>-1;z--){let W=a.get(z+r);if(W&&W.rootNodes.length){g=W.rootNodes[W.rootNodes.length-1];break}}let v=h?.getBoundingClientRect?.(),D=g?.getBoundingClientRect?.();return v&&D?D.bottom-v.top:0}_virtualScrollEnabled(){return!this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,n,a){if(t&1&&at(a,_h,5)(a,Aa,5)(a,us,5)(a,_c,5)(a,vc,5),t&2){let r;P(r=F())&&(n._noDataRow=r.first),P(r=F())&&(n._contentColumnDefs=r),P(r=F())&&(n._contentRowDefs=r),P(r=F())&&(n._contentHeaderRowDefs=r),P(r=F())&&(n._contentFooterRowDefs=r)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,n){t&2&&p("cdk-table-fixed-layout",n.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",L],fixedLayout:[2,"fixedLayout","fixedLayout",L],recycleRows:[2,"recycleRows","recycleRows",L]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[ee([{provide:Ci,useExisting:i},{provide:Ma,useValue:null}])],ngContentSelectors:Dv,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,n){t&1&&(fe(wv),G(0),G(1,1),k(2,Sv,1,0),k(3,kv,7,0)(4,Mv,4,0)),t&2&&(c(2),M(n._isServer?2:-1),c(),M(n._isNativeHtmlTable?3:4))},dependencies:[Cc,yc,wc,xc],styles:[`.cdk-table-fixed-layout {
2224
2224
  table-layout: fixed;
2225
2225
  }
2226
- `],encapsulation:2,changeDetection:1})}return i})();function ds(i,o){return i.concat(Array.from(o))}function uh(i,o){let e=o.toUpperCase(),t=i.viewContainer.element.nativeElement;for(;t;){let n=t.nodeType===1?t.nodeName:null;if(n===e)return t;if(n==="TABLE")break;t=t.parentNode}return null}var _h=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[Sa]})}return i})();var Aa=class{_multiple;_emitChanges;compareWith;_selection=new Set;_deselectedToEmit=[];_selectedToEmit=[];_selected=null;get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}changed=new R;bulk={select:o=>this._select(o),deselect:o=>this._deselect(o),setSelection:o=>this._setSelection(o)};constructor(o=!1,e,t=!0,n){this._multiple=o,this._emitChanges=t,this.compareWith=n,e&&e.length&&(o?e.forEach(a=>this._markSelected(a)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...o){return this._select(o)}deselect(...o){return this._deselect(o)}setSelection(...o){return this._setSelection(o)}toggle(o){return this.isSelected(o)?this.deselect(o):this.select(o)}clear(o=!0){this._unmarkAll();let e=this._hasQueuedChanges();return o&&this._emitChangeEvent(),e}isSelected(o){return this._selection.has(this._getConcreteValue(o))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(o){this._multiple&&this.selected&&this._selected.sort(o)}isMultipleSelection(){return this._multiple}_select(o){this._verifyValueAssignment(o),o.forEach(t=>this._markSelected(t));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}_deselect(o){this._verifyValueAssignment(o),o.forEach(t=>this._unmarkSelected(t));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}_setSelection(o){this._verifyValueAssignment(o);let e=this.selected,t=new Set(o.map(a=>this._getConcreteValue(a)));o.forEach(a=>this._markSelected(a)),e.filter(a=>!t.has(this._getConcreteValue(a,t))).forEach(a=>this._unmarkSelected(a));let n=this._hasQueuedChanges();return this._emitChangeEvent(),n}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(o){o=this._getConcreteValue(o),this.isSelected(o)||(this._multiple||this._unmarkAll(),this.isSelected(o)||this._selection.add(o),this._emitChanges&&this._selectedToEmit.push(o))}_unmarkSelected(o){o=this._getConcreteValue(o),this.isSelected(o)&&(this._selection.delete(o),this._emitChanges&&this._deselectedToEmit.push(o))}_unmarkAll(){this.isEmpty()||this._selection.forEach(o=>this._unmarkSelected(o))}_verifyValueAssignment(o){o.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(o,e){if(this.compareWith){e=e??this._selection;for(let t of e)if(this.compareWith(o,t))return t;return o}else return o}};var Ta=(()=>{class i{_listeners=[];notify(e,t){for(let n of this._listeners)n(e,t)}listen(e){return this._listeners.push(e),()=>{this._listeners=this._listeners.filter(t=>e!==t)}}ngOnDestroy(){this._listeners=[]}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Mv=[[["caption"]],[["colgroup"],["col"]],"*"],Ev=["caption","colgroup, col","*"];function Av(i,o){i&1&&U(0,2)}function Tv(i,o){i&1&&(s(0,"thead",0),Yt(1,1),l(),s(2,"tbody",2),Yt(3,3)(4,4),l(),s(5,"tfoot",0),Yt(6,5),l())}function Iv(i,o){i&1&&Yt(0,1)(1,3)(2,4)(3,5)}var vh=(()=>{class i extends wc{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=!1;static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275cmp=T({type:i,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(t,n){t&2&&p("mat-table-fixed-layout",n.fixedLayout)},exportAs:["matTable"],features:[J([{provide:wc,useExisting:i},{provide:vi,useExisting:i},{provide:ka,useValue:null}]),Q],ngContentSelectors:Ev,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,n){t&1&&(ce(Mv),U(0),U(1,1),M(2,Av,1,0),M(3,Tv,7,0)(4,Iv,4,0)),t&2&&(c(2),E(n._isServer?2:-1),c(),E(n._isNativeHtmlTable?3:4))},dependencies:[yc,bc,xc,Cc],styles:[`.mat-mdc-table-sticky {
2226
+ `],encapsulation:2,changeDetection:1})}return i})();function ds(i,o){return i.concat(Array.from(o))}function hh(i,o){let e=o.toUpperCase(),t=i.viewContainer.element.nativeElement;for(;t;){let n=t.nodeType===1?t.nodeName:null;if(n===e)return t;if(n==="TABLE")break;t=t.parentNode}return null}var vh=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[ka]})}return i})();var Ta=class{_multiple;_emitChanges;compareWith;_selection=new Set;_deselectedToEmit=[];_selectedToEmit=[];_selected=null;get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}changed=new R;bulk={select:o=>this._select(o),deselect:o=>this._deselect(o),setSelection:o=>this._setSelection(o)};constructor(o=!1,e,t=!0,n){this._multiple=o,this._emitChanges=t,this.compareWith=n,e&&e.length&&(o?e.forEach(a=>this._markSelected(a)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...o){return this._select(o)}deselect(...o){return this._deselect(o)}setSelection(...o){return this._setSelection(o)}toggle(o){return this.isSelected(o)?this.deselect(o):this.select(o)}clear(o=!0){this._unmarkAll();let e=this._hasQueuedChanges();return o&&this._emitChangeEvent(),e}isSelected(o){return this._selection.has(this._getConcreteValue(o))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(o){this._multiple&&this.selected&&this._selected.sort(o)}isMultipleSelection(){return this._multiple}_select(o){this._verifyValueAssignment(o),o.forEach(t=>this._markSelected(t));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}_deselect(o){this._verifyValueAssignment(o),o.forEach(t=>this._unmarkSelected(t));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}_setSelection(o){this._verifyValueAssignment(o);let e=this.selected,t=new Set(o.map(a=>this._getConcreteValue(a)));o.forEach(a=>this._markSelected(a)),e.filter(a=>!t.has(this._getConcreteValue(a,t))).forEach(a=>this._unmarkSelected(a));let n=this._hasQueuedChanges();return this._emitChangeEvent(),n}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(o){o=this._getConcreteValue(o),this.isSelected(o)||(this._multiple||this._unmarkAll(),this.isSelected(o)||this._selection.add(o),this._emitChanges&&this._selectedToEmit.push(o))}_unmarkSelected(o){o=this._getConcreteValue(o),this.isSelected(o)&&(this._selection.delete(o),this._emitChanges&&this._deselectedToEmit.push(o))}_unmarkAll(){this.isEmpty()||this._selection.forEach(o=>this._unmarkSelected(o))}_verifyValueAssignment(o){o.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(o,e){if(this.compareWith){e=e??this._selection;for(let t of e)if(this.compareWith(o,t))return t;return o}else return o}};var Ia=(()=>{class i{_listeners=[];notify(e,t){for(let n of this._listeners)n(e,t)}listen(e){return this._listeners.push(e),()=>{this._listeners=this._listeners.filter(t=>e!==t)}}ngOnDestroy(){this._listeners=[]}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var Av=[[["caption"]],[["colgroup"],["col"]],"*"],Tv=["caption","colgroup, col","*"];function Iv(i,o){i&1&&G(0,2)}function Rv(i,o){i&1&&(s(0,"thead",0),Qt(1,1),l(),s(2,"tbody",2),Qt(3,3)(4,4),l(),s(5,"tfoot",0),Qt(6,5),l())}function Ov(i,o){i&1&&Qt(0,1)(1,3)(2,4)(3,5)}var bh=(()=>{class i extends Dc{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=!1;static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275cmp=I({type:i,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(t,n){t&2&&p("mat-table-fixed-layout",n.fixedLayout)},exportAs:["matTable"],features:[ee([{provide:Dc,useExisting:i},{provide:Ci,useExisting:i},{provide:Ma,useValue:null}]),Q],ngContentSelectors:Tv,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,n){t&1&&(fe(Av),G(0),G(1,1),k(2,Iv,1,0),k(3,Rv,7,0)(4,Ov,4,0)),t&2&&(c(2),M(n._isServer?2:-1),c(),M(n._isNativeHtmlTable?3:4))},dependencies:[Cc,yc,wc,xc],styles:[`.mat-mdc-table-sticky {
2227
2227
  position: sticky !important;
2228
2228
  }
2229
2229
 
@@ -2400,7 +2400,7 @@ mat-cell.mat-mdc-cell,
2400
2400
  mat-footer-cell.mat-mdc-footer-cell {
2401
2401
  align-self: stretch;
2402
2402
  }
2403
- `],encapsulation:2,changeDetection:1})}return i})(),bh=(()=>{class i extends ms{static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","matCellDef",""]],features:[J([{provide:ms,useExisting:i}]),Q]})}return i})();var yh=(()=>{class i extends Ea{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[J([{provide:Ea,useExisting:i}]),Q]})}return i})();var Ch=(()=>{class i extends fh{static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[Q]})}return i})();var xh=(()=>{class i extends us{static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[J([{provide:us,useExisting:i}]),Q]})}return i})();var wh=(()=>{class i extends vc{static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275cmp=T({type:i,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[J([{provide:vc,useExisting:i}]),Q],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&Yt(0,0)},dependencies:[Ma],encapsulation:2,changeDetection:1})}return i})();var Dh=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[_h,ee]})}return i})();var Ov=["*",[["mat-chip-avatar"],["","matChipAvatar",""]],[["mat-chip-trailing-icon"],["","matChipRemove",""],["","matChipTrailingIcon",""]]],Pv=["*","mat-chip-avatar, [matChipAvatar]","mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"];function Fv(i,o){i&1&&(s(0,"span",3),U(1,1),l())}function Nv(i,o){i&1&&(s(0,"span",6),U(1,2),l())}var Lv=["*"];var Vv=new x("mat-chips-default-options",{providedIn:"root",factory:()=>({separatorKeyCodes:[13]})}),Sh=new x("MatChipAvatar"),kh=new x("MatChipTrailingIcon"),Mh=new x("MatChipEdit"),Eh=new x("MatChipRemove"),Ah=new x("MatChip"),Th=(()=>{class i{_elementRef=d(N);_parentChip=d(Ah);_isPrimary=!0;_isLeading=!1;get disabled(){return this._disabled||this._parentChip?.disabled||!1}set disabled(e){this._disabled=e}_disabled=!1;tabIndex=-1;_allowFocusWhenDisabled=!1;_getDisabledAttribute(){return this.disabled&&!this._allowFocusWhenDisabled?"":null}constructor(){d(Le).load(Mt),this._elementRef.nativeElement.nodeName==="BUTTON"&&this._elementRef.nativeElement.setAttribute("type","button")}focus(){this._elementRef.nativeElement.focus()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","matChipContent",""]],hostAttrs:[1,"mat-mdc-chip-action","mdc-evolution-chip__action","mdc-evolution-chip__action--presentational"],hostVars:8,hostBindings:function(t,n){t&2&&(Z("disabled",n._getDisabledAttribute())("aria-disabled",n.disabled),p("mdc-evolution-chip__action--primary",n._isPrimary)("mdc-evolution-chip__action--secondary",!n._isPrimary)("mdc-evolution-chip__action--trailing",!n._isPrimary&&!n._isLeading))},inputs:{disabled:[2,"disabled","disabled",L],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?-1:wt(e)],_allowFocusWhenDisabled:"_allowFocusWhenDisabled"}})}return i})(),Bv=(()=>{class i extends Th{_getTabindex(){return this.disabled&&!this._allowFocusWhenDisabled?null:this.tabIndex.toString()}_handleClick(e){!this.disabled&&this._isPrimary&&(e.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!this.disabled&&this._isPrimary&&!this._parentChip._isEditing&&(e.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","matChipAction",""]],hostVars:3,hostBindings:function(t,n){t&1&&A("click",function(r){return n._handleClick(r)})("keydown",function(r){return n._handleKeydown(r)}),t&2&&(Z("tabindex",n._getTabindex()),p("mdc-evolution-chip__action--presentational",!1))},features:[Q]})}return i})();var Ia=(()=>{class i{_changeDetectorRef=d(te);_elementRef=d(N);_tagName=d(fd);_ngZone=d(H);_focusMonitor=d(Rt);_globalRippleOptions=d(Un,{optional:!0});_document=d(q);_onFocus=new R;_onBlur=new R;_isBasicChip=!1;role=null;_hasFocusInternal=!1;_pendingFocus=!1;_actionChanges;_animationsDisabled=pe();_allLeadingIcons;_allTrailingIcons;_allEditIcons;_allRemoveIcons;_hasFocus(){return this._hasFocusInternal}id=d(be).getId("mat-mdc-chip-");ariaLabel=null;ariaDescription=null;_chipListDisabled=!1;_hadFocusOnRemove=!1;_textElement;get value(){return this._value!==void 0?this._value:this._textElement.textContent.trim()}set value(e){this._value=e}_value;color;removable=!0;highlighted=!1;disableRipple=!1;get disabled(){return this._disabled||this._chipListDisabled}set disabled(e){this._disabled=e}_disabled=!1;removed=new K;destroyed=new K;basicChipAttrName="mat-basic-chip";leadingIcon;editIcon;trailingIcon;removeIcon;primaryAction;_rippleLoader=d(os);_injector=d(X);constructor(){let e=d(Le);e.load(Mt),e.load(rn),this._monitorFocus(),this._rippleLoader?.configureRipple(this._elementRef.nativeElement,{className:"mat-mdc-chip-ripple",disabled:this._isRippleDisabled()})}ngOnInit(){this._isBasicChip=this._elementRef.nativeElement.hasAttribute(this.basicChipAttrName)||this._tagName.toLowerCase()===this.basicChipAttrName}ngAfterViewInit(){this._textElement=this._elementRef.nativeElement.querySelector(".mat-mdc-chip-action-label"),this._pendingFocus&&(this._pendingFocus=!1,this.focus())}ngAfterContentInit(){this._actionChanges=$e(this._allLeadingIcons.changes,this._allTrailingIcons.changes,this._allEditIcons.changes,this._allRemoveIcons.changes).subscribe(()=>this._changeDetectorRef.markForCheck())}ngDoCheck(){this._rippleLoader.setDisabled(this._elementRef.nativeElement,this._isRippleDisabled())}ngOnDestroy(){this.destroyed.emit({chip:this}),this.destroyed.complete(),this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement),this._actionChanges?.unsubscribe()}remove(){this.removable&&(this._hadFocusOnRemove=this._hasFocus(),this.removed.emit({chip:this}))}_isRippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||this._isBasicChip||!this._hasInteractiveActions()||!!this._globalRippleOptions?.disabled}_hasTrailingIcon(){return!!(this.trailingIcon||this.removeIcon)}_handleKeydown(e){(e.keyCode===8&&!e.repeat||e.keyCode===46)&&(e.preventDefault(),this.remove())}focus(){this.disabled||(this.primaryAction?this.primaryAction.focus():this._pendingFocus=!0)}_getSourceAction(e){return this._getActions().find(t=>{let n=t._elementRef.nativeElement;return n===e||n.contains(e)})}_getActions(){let e=[];return this.editIcon&&e.push(this.editIcon),this.primaryAction&&e.push(this.primaryAction),this.removeIcon&&e.push(this.removeIcon),e}_handlePrimaryActionInteraction(){}_hasInteractiveActions(){return this._getActions().length>0}_edit(e){}_monitorFocus(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{let t=e!==null;t!==this._hasFocusInternal&&(this._hasFocusInternal=t,t?this._onFocus.next({chip:this}):(this._changeDetectorRef.markForCheck(),setTimeout(()=>this._ngZone.run(()=>this._onBlur.next({chip:this})))))})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(t,n,a){if(t&1&&at(a,Sh,5)(a,Mh,5)(a,kh,5)(a,Eh,5)(a,Sh,5)(a,kh,5)(a,Mh,5)(a,Eh,5),t&2){let r;P(r=F())&&(n.leadingIcon=r.first),P(r=F())&&(n.editIcon=r.first),P(r=F())&&(n.trailingIcon=r.first),P(r=F())&&(n.removeIcon=r.first),P(r=F())&&(n._allLeadingIcons=r),P(r=F())&&(n._allTrailingIcons=r),P(r=F())&&(n._allEditIcons=r),P(r=F())&&(n._allRemoveIcons=r)}},viewQuery:function(t,n){if(t&1&&Me(Bv,5),t&2){let a;P(a=F())&&(n.primaryAction=a.first)}},hostAttrs:[1,"mat-mdc-chip"],hostVars:31,hostBindings:function(t,n){t&1&&A("keydown",function(r){return n._handleKeydown(r)}),t&2&&(dt("id",n.id),Z("role",n.role)("aria-label",n.ariaLabel),et("mat-"+(n.color||"primary")),p("mdc-evolution-chip",!n._isBasicChip)("mdc-evolution-chip--disabled",n.disabled)("mdc-evolution-chip--with-trailing-action",n._hasTrailingIcon())("mdc-evolution-chip--with-primary-graphic",n.leadingIcon)("mdc-evolution-chip--with-primary-icon",n.leadingIcon)("mdc-evolution-chip--with-avatar",n.leadingIcon)("mat-mdc-chip-with-avatar",n.leadingIcon)("mat-mdc-chip-highlighted",n.highlighted)("mat-mdc-chip-disabled",n.disabled)("mat-mdc-basic-chip",n._isBasicChip)("mat-mdc-standard-chip",!n._isBasicChip)("mat-mdc-chip-with-trailing-icon",n._hasTrailingIcon())("_mat-animation-noopable",n._animationsDisabled))},inputs:{role:"role",id:"id",ariaLabel:[0,"aria-label","ariaLabel"],ariaDescription:[0,"aria-description","ariaDescription"],value:"value",color:"color",removable:[2,"removable","removable",L],highlighted:[2,"highlighted","highlighted",L],disableRipple:[2,"disableRipple","disableRipple",L],disabled:[2,"disabled","disabled",L]},outputs:{removed:"removed",destroyed:"destroyed"},exportAs:["matChip"],features:[J([{provide:Ah,useExisting:i}])],ngContentSelectors:Pv,decls:8,vars:2,consts:[[1,"mat-mdc-chip-focus-overlay"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--primary"],["matChipContent",""],[1,"mdc-evolution-chip__graphic","mat-mdc-chip-graphic"],[1,"mdc-evolution-chip__text-label","mat-mdc-chip-action-label"],[1,"mat-mdc-chip-primary-focus-indicator","mat-focus-indicator"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--trailing"]],template:function(t,n){t&1&&(ce(Ov),_(0,"span",0),s(1,"span",1)(2,"span",2),M(3,Fv,2,0,"span",3),s(4,"span",4),U(5),_(6,"span",5),l()()(),M(7,Nv,2,0,"span",6)),t&2&&(c(3),E(n.leadingIcon?3:-1),c(4),E(n._hasTrailingIcon()?7:-1))},dependencies:[Th],styles:[`.mdc-evolution-chip,
2403
+ `],encapsulation:2,changeDetection:1})}return i})(),yh=(()=>{class i extends ms{static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","matCellDef",""]],features:[ee([{provide:ms,useExisting:i}]),Q]})}return i})();var Ch=(()=>{class i extends Aa{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[ee([{provide:Aa,useExisting:i}]),Q]})}return i})();var xh=(()=>{class i extends gh{static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[Q]})}return i})();var wh=(()=>{class i extends us{static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[ee([{provide:us,useExisting:i}]),Q]})}return i})();var Dh=(()=>{class i extends bc{static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275cmp=I({type:i,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[ee([{provide:bc,useExisting:i}]),Q],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&Qt(0,0)},dependencies:[Ea],encapsulation:2,changeDetection:1})}return i})();var Sh=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[vh,te]})}return i})();var Fv=["*",[["mat-chip-avatar"],["","matChipAvatar",""]],[["mat-chip-trailing-icon"],["","matChipRemove",""],["","matChipTrailingIcon",""]]],Nv=["*","mat-chip-avatar, [matChipAvatar]","mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"];function Lv(i,o){i&1&&(s(0,"span",3),G(1,1),l())}function Vv(i,o){i&1&&(s(0,"span",6),G(1,2),l())}var Bv=["*"];var zv=new w("mat-chips-default-options",{providedIn:"root",factory:()=>({separatorKeyCodes:[13]})}),kh=new w("MatChipAvatar"),Mh=new w("MatChipTrailingIcon"),Eh=new w("MatChipEdit"),Ah=new w("MatChipRemove"),Th=new w("MatChip"),Ih=(()=>{class i{_elementRef=d(N);_parentChip=d(Th);_isPrimary=!0;_isLeading=!1;get disabled(){return this._disabled||this._parentChip?.disabled||!1}set disabled(e){this._disabled=e}_disabled=!1;tabIndex=-1;_allowFocusWhenDisabled=!1;_getDisabledAttribute(){return this.disabled&&!this._allowFocusWhenDisabled?"":null}constructor(){d(Be).load(Tt),this._elementRef.nativeElement.nodeName==="BUTTON"&&this._elementRef.nativeElement.setAttribute("type","button")}focus(){this._elementRef.nativeElement.focus()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","matChipContent",""]],hostAttrs:[1,"mat-mdc-chip-action","mdc-evolution-chip__action","mdc-evolution-chip__action--presentational"],hostVars:8,hostBindings:function(t,n){t&2&&(Z("disabled",n._getDisabledAttribute())("aria-disabled",n.disabled),p("mdc-evolution-chip__action--primary",n._isPrimary)("mdc-evolution-chip__action--secondary",!n._isPrimary)("mdc-evolution-chip__action--trailing",!n._isPrimary&&!n._isLeading))},inputs:{disabled:[2,"disabled","disabled",L],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?-1:kt(e)],_allowFocusWhenDisabled:"_allowFocusWhenDisabled"}})}return i})(),jv=(()=>{class i extends Ih{_getTabindex(){return this.disabled&&!this._allowFocusWhenDisabled?null:this.tabIndex.toString()}_handleClick(e){!this.disabled&&this._isPrimary&&(e.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!this.disabled&&this._isPrimary&&!this._parentChip._isEditing&&(e.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","matChipAction",""]],hostVars:3,hostBindings:function(t,n){t&1&&E("click",function(r){return n._handleClick(r)})("keydown",function(r){return n._handleKeydown(r)}),t&2&&(Z("tabindex",n._getTabindex()),p("mdc-evolution-chip__action--presentational",!1))},features:[Q]})}return i})();var Ra=(()=>{class i{_changeDetectorRef=d(ie);_elementRef=d(N);_tagName=d(gd);_ngZone=d(U);_focusMonitor=d(Nt);_globalRippleOptions=d(Gn,{optional:!0});_document=d(q);_onFocus=new R;_onBlur=new R;_isBasicChip=!1;role=null;_hasFocusInternal=!1;_pendingFocus=!1;_actionChanges;_animationsDisabled=_e();_allLeadingIcons;_allTrailingIcons;_allEditIcons;_allRemoveIcons;_hasFocus(){return this._hasFocusInternal}id=d(xe).getId("mat-mdc-chip-");ariaLabel=null;ariaDescription=null;_chipListDisabled=!1;_hadFocusOnRemove=!1;_textElement;get value(){return this._value!==void 0?this._value:this._textElement.textContent.trim()}set value(e){this._value=e}_value;color;removable=!0;highlighted=!1;disableRipple=!1;get disabled(){return this._disabled||this._chipListDisabled}set disabled(e){this._disabled=e}_disabled=!1;removed=new K;destroyed=new K;basicChipAttrName="mat-basic-chip";leadingIcon;editIcon;trailingIcon;removeIcon;primaryAction;_rippleLoader=d(os);_injector=d(X);constructor(){let e=d(Be);e.load(Tt),e.load(sn),this._monitorFocus(),this._rippleLoader?.configureRipple(this._elementRef.nativeElement,{className:"mat-mdc-chip-ripple",disabled:this._isRippleDisabled()})}ngOnInit(){this._isBasicChip=this._elementRef.nativeElement.hasAttribute(this.basicChipAttrName)||this._tagName.toLowerCase()===this.basicChipAttrName}ngAfterViewInit(){this._textElement=this._elementRef.nativeElement.querySelector(".mat-mdc-chip-action-label"),this._pendingFocus&&(this._pendingFocus=!1,this.focus())}ngAfterContentInit(){this._actionChanges=$e(this._allLeadingIcons.changes,this._allTrailingIcons.changes,this._allEditIcons.changes,this._allRemoveIcons.changes).subscribe(()=>this._changeDetectorRef.markForCheck())}ngDoCheck(){this._rippleLoader.setDisabled(this._elementRef.nativeElement,this._isRippleDisabled())}ngOnDestroy(){this.destroyed.emit({chip:this}),this.destroyed.complete(),this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement),this._actionChanges?.unsubscribe()}remove(){this.removable&&(this._hadFocusOnRemove=this._hasFocus(),this.removed.emit({chip:this}))}_isRippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||this._isBasicChip||!this._hasInteractiveActions()||!!this._globalRippleOptions?.disabled}_hasTrailingIcon(){return!!(this.trailingIcon||this.removeIcon)}_handleKeydown(e){(e.keyCode===8&&!e.repeat||e.keyCode===46)&&(e.preventDefault(),this.remove())}focus(){this.disabled||(this.primaryAction?this.primaryAction.focus():this._pendingFocus=!0)}_getSourceAction(e){return this._getActions().find(t=>{let n=t._elementRef.nativeElement;return n===e||n.contains(e)})}_getActions(){let e=[];return this.editIcon&&e.push(this.editIcon),this.primaryAction&&e.push(this.primaryAction),this.removeIcon&&e.push(this.removeIcon),e}_handlePrimaryActionInteraction(){}_hasInteractiveActions(){return this._getActions().length>0}_edit(e){}_monitorFocus(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{let t=e!==null;t!==this._hasFocusInternal&&(this._hasFocusInternal=t,t?this._onFocus.next({chip:this}):(this._changeDetectorRef.markForCheck(),setTimeout(()=>this._ngZone.run(()=>this._onBlur.next({chip:this})))))})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(t,n,a){if(t&1&&at(a,kh,5)(a,Eh,5)(a,Mh,5)(a,Ah,5)(a,kh,5)(a,Mh,5)(a,Eh,5)(a,Ah,5),t&2){let r;P(r=F())&&(n.leadingIcon=r.first),P(r=F())&&(n.editIcon=r.first),P(r=F())&&(n.trailingIcon=r.first),P(r=F())&&(n.removeIcon=r.first),P(r=F())&&(n._allLeadingIcons=r),P(r=F())&&(n._allTrailingIcons=r),P(r=F())&&(n._allEditIcons=r),P(r=F())&&(n._allRemoveIcons=r)}},viewQuery:function(t,n){if(t&1&&Ae(jv,5),t&2){let a;P(a=F())&&(n.primaryAction=a.first)}},hostAttrs:[1,"mat-mdc-chip"],hostVars:31,hostBindings:function(t,n){t&1&&E("keydown",function(r){return n._handleKeydown(r)}),t&2&&(dt("id",n.id),Z("role",n.role)("aria-label",n.ariaLabel),tt("mat-"+(n.color||"primary")),p("mdc-evolution-chip",!n._isBasicChip)("mdc-evolution-chip--disabled",n.disabled)("mdc-evolution-chip--with-trailing-action",n._hasTrailingIcon())("mdc-evolution-chip--with-primary-graphic",n.leadingIcon)("mdc-evolution-chip--with-primary-icon",n.leadingIcon)("mdc-evolution-chip--with-avatar",n.leadingIcon)("mat-mdc-chip-with-avatar",n.leadingIcon)("mat-mdc-chip-highlighted",n.highlighted)("mat-mdc-chip-disabled",n.disabled)("mat-mdc-basic-chip",n._isBasicChip)("mat-mdc-standard-chip",!n._isBasicChip)("mat-mdc-chip-with-trailing-icon",n._hasTrailingIcon())("_mat-animation-noopable",n._animationsDisabled))},inputs:{role:"role",id:"id",ariaLabel:[0,"aria-label","ariaLabel"],ariaDescription:[0,"aria-description","ariaDescription"],value:"value",color:"color",removable:[2,"removable","removable",L],highlighted:[2,"highlighted","highlighted",L],disableRipple:[2,"disableRipple","disableRipple",L],disabled:[2,"disabled","disabled",L]},outputs:{removed:"removed",destroyed:"destroyed"},exportAs:["matChip"],features:[ee([{provide:Th,useExisting:i}])],ngContentSelectors:Nv,decls:8,vars:2,consts:[[1,"mat-mdc-chip-focus-overlay"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--primary"],["matChipContent",""],[1,"mdc-evolution-chip__graphic","mat-mdc-chip-graphic"],[1,"mdc-evolution-chip__text-label","mat-mdc-chip-action-label"],[1,"mat-mdc-chip-primary-focus-indicator","mat-focus-indicator"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--trailing"]],template:function(t,n){t&1&&(fe(Fv),_(0,"span",0),s(1,"span",1)(2,"span",2),k(3,Lv,2,0,"span",3),s(4,"span",4),G(5),_(6,"span",5),l()()(),k(7,Vv,2,0,"span",6)),t&2&&(c(3),M(n.leadingIcon?3:-1),c(4),M(n._hasTrailingIcon()?7:-1))},dependencies:[Ih],styles:[`.mdc-evolution-chip,
2404
2404
  .mdc-evolution-chip__cell,
2405
2405
  .mdc-evolution-chip__action {
2406
2406
  display: inline-flex;
@@ -2948,7 +2948,7 @@ mat-footer-cell.mat-mdc-footer-cell {
2948
2948
  img.mdc-evolution-chip__icon {
2949
2949
  min-height: 0;
2950
2950
  }
2951
- `],encapsulation:2})}return i})();var Ih=(()=>{class i{_elementRef=d(N);_changeDetectorRef=d(te);_dir=d(qe,{optional:!0});_lastDestroyedFocusedChipIndex=null;_keyManager;_destroyed=new R;_defaultRole="presentation";get chipFocusChanges(){return this._getChipStream(e=>e._onFocus)}get chipDestroyedChanges(){return this._getChipStream(e=>e.destroyed)}get chipRemovedChanges(){return this._getChipStream(e=>e.removed)}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._syncChipsState()}_disabled=!1;get empty(){return!this._chips||this._chips.length===0}get role(){return this._explicitRole?this._explicitRole:this.empty?null:this._defaultRole}tabIndex=0;set role(e){this._explicitRole=e}_explicitRole=null;get focused(){return this._hasFocusedChip()}_chips;_chipActions=new Zi;ngAfterViewInit(){this._setUpFocusManagement(),this._trackChipSetChanges(),this._trackDestroyedFocusedChip()}ngOnDestroy(){this._keyManager?.destroy(),this._chipActions.destroy(),this._destroyed.next(),this._destroyed.complete()}_hasFocusedChip(){return this._chips&&this._chips.some(e=>e._hasFocus())}_syncChipsState(){this._chips?.forEach(e=>{e._chipListDisabled=this._disabled,e._changeDetectorRef.markForCheck()})}focus(){}_handleKeydown(e){this._originatesFromChip(e)&&this._keyManager.onKeydown(e)}_isValidIndex(e){return e>=0&&e<this._chips.length}_allowFocusEscape(){let e=this._elementRef.nativeElement.tabIndex;e!==-1&&(this._elementRef.nativeElement.tabIndex=-1,setTimeout(()=>this._elementRef.nativeElement.tabIndex=e))}_getChipStream(e){return this._chips.changes.pipe(Se(null),We(()=>$e(...this._chips.map(e))))}_originatesFromChip(e){let t=e.target;for(;t&&t!==this._elementRef.nativeElement;){if(t.classList.contains("mat-mdc-chip"))return!0;t=t.parentElement}return!1}_setUpFocusManagement(){this._chips.changes.pipe(Se(this._chips)).subscribe(e=>{let t=[];e.forEach(n=>n._getActions().forEach(a=>t.push(a))),this._chipActions.reset(t),this._chipActions.notifyOnChanges()}),this._keyManager=new cn(this._chipActions).withVerticalOrientation().withHorizontalOrientation(this._dir?this._dir.value:"ltr").withHomeAndEnd().skipPredicate(e=>this._skipPredicate(e)),this.chipFocusChanges.pipe(ae(this._destroyed)).subscribe(({chip:e})=>{let t=e._getSourceAction(document.activeElement);t&&this._keyManager.updateActiveItem(t)}),this._dir?.change.pipe(ae(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e))}_skipPredicate(e){return e.disabled}_trackChipSetChanges(){this._chips.changes.pipe(Se(null),ae(this._destroyed)).subscribe(()=>{this.disabled&&Promise.resolve().then(()=>this._syncChipsState()),this._redirectDestroyedChipFocus()})}_trackDestroyedFocusedChip(){this.chipDestroyedChanges.pipe(ae(this._destroyed)).subscribe(e=>{let n=this._chips.toArray().indexOf(e.chip),a=e.chip._hasFocus(),r=e.chip._hadFocusOnRemove&&this._keyManager.activeItem&&e.chip._getActions().includes(this._keyManager.activeItem),u=a||r;this._isValidIndex(n)&&u&&(this._lastDestroyedFocusedChipIndex=n)})}_redirectDestroyedChipFocus(){if(this._lastDestroyedFocusedChipIndex!=null){if(this._chips.length){let e=Math.min(this._lastDestroyedFocusedChipIndex,this._chips.length-1),t=this._chips.toArray()[e];t.disabled?this._chips.length===1?this.focus():this._keyManager.setPreviousItemActive():t.focus()}else this.focus();this._lastDestroyedFocusedChipIndex=null}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["mat-chip-set"]],contentQueries:function(t,n,a){if(t&1&&at(a,Ia,5),t&2){let r;P(r=F())&&(n._chips=r)}},hostAttrs:[1,"mat-mdc-chip-set","mdc-evolution-chip-set"],hostVars:1,hostBindings:function(t,n){t&1&&A("keydown",function(r){return n._handleKeydown(r)}),t&2&&Z("role",n.role)},inputs:{disabled:[2,"disabled","disabled",L],role:"role",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:wt(e)]},ngContentSelectors:Lv,decls:2,vars:0,consts:[["role","presentation",1,"mdc-evolution-chip-set__chips"]],template:function(t,n){t&1&&(ce(),Ie(0,"div",0),U(1),Ue())},styles:[`.mat-mdc-chip-set {
2951
+ `],encapsulation:2})}return i})();var Rh=(()=>{class i{_elementRef=d(N);_changeDetectorRef=d(ie);_dir=d(qe,{optional:!0});_lastDestroyedFocusedChipIndex=null;_keyManager;_destroyed=new R;_defaultRole="presentation";get chipFocusChanges(){return this._getChipStream(e=>e._onFocus)}get chipDestroyedChanges(){return this._getChipStream(e=>e.destroyed)}get chipRemovedChanges(){return this._getChipStream(e=>e.removed)}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._syncChipsState()}_disabled=!1;get empty(){return!this._chips||this._chips.length===0}get role(){return this._explicitRole?this._explicitRole:this.empty?null:this._defaultRole}tabIndex=0;set role(e){this._explicitRole=e}_explicitRole=null;get focused(){return this._hasFocusedChip()}_chips;_chipActions=new Ji;ngAfterViewInit(){this._setUpFocusManagement(),this._trackChipSetChanges(),this._trackDestroyedFocusedChip()}ngOnDestroy(){this._keyManager?.destroy(),this._chipActions.destroy(),this._destroyed.next(),this._destroyed.complete()}_hasFocusedChip(){return this._chips&&this._chips.some(e=>e._hasFocus())}_syncChipsState(){this._chips?.forEach(e=>{e._chipListDisabled=this._disabled,e._changeDetectorRef.markForCheck()})}focus(){}_handleKeydown(e){this._originatesFromChip(e)&&this._keyManager.onKeydown(e)}_isValidIndex(e){return e>=0&&e<this._chips.length}_allowFocusEscape(){let e=this._elementRef.nativeElement.tabIndex;e!==-1&&(this._elementRef.nativeElement.tabIndex=-1,setTimeout(()=>this._elementRef.nativeElement.tabIndex=e))}_getChipStream(e){return this._chips.changes.pipe(Me(null),We(()=>$e(...this._chips.map(e))))}_originatesFromChip(e){let t=e.target;for(;t&&t!==this._elementRef.nativeElement;){if(t.classList.contains("mat-mdc-chip"))return!0;t=t.parentElement}return!1}_setUpFocusManagement(){this._chips.changes.pipe(Me(this._chips)).subscribe(e=>{let t=[];e.forEach(n=>n._getActions().forEach(a=>t.push(a))),this._chipActions.reset(t),this._chipActions.notifyOnChanges()}),this._keyManager=new dn(this._chipActions).withVerticalOrientation().withHorizontalOrientation(this._dir?this._dir.value:"ltr").withHomeAndEnd().skipPredicate(e=>this._skipPredicate(e)),this.chipFocusChanges.pipe(re(this._destroyed)).subscribe(({chip:e})=>{let t=e._getSourceAction(document.activeElement);t&&this._keyManager.updateActiveItem(t)}),this._dir?.change.pipe(re(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e))}_skipPredicate(e){return e.disabled}_trackChipSetChanges(){this._chips.changes.pipe(Me(null),re(this._destroyed)).subscribe(()=>{this.disabled&&Promise.resolve().then(()=>this._syncChipsState()),this._redirectDestroyedChipFocus()})}_trackDestroyedFocusedChip(){this.chipDestroyedChanges.pipe(re(this._destroyed)).subscribe(e=>{let n=this._chips.toArray().indexOf(e.chip),a=e.chip._hasFocus(),r=e.chip._hadFocusOnRemove&&this._keyManager.activeItem&&e.chip._getActions().includes(this._keyManager.activeItem),u=a||r;this._isValidIndex(n)&&u&&(this._lastDestroyedFocusedChipIndex=n)})}_redirectDestroyedChipFocus(){if(this._lastDestroyedFocusedChipIndex!=null){if(this._chips.length){let e=Math.min(this._lastDestroyedFocusedChipIndex,this._chips.length-1),t=this._chips.toArray()[e];t.disabled?this._chips.length===1?this.focus():this._keyManager.setPreviousItemActive():t.focus()}else this.focus();this._lastDestroyedFocusedChipIndex=null}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["mat-chip-set"]],contentQueries:function(t,n,a){if(t&1&&at(a,Ra,5),t&2){let r;P(r=F())&&(n._chips=r)}},hostAttrs:[1,"mat-mdc-chip-set","mdc-evolution-chip-set"],hostVars:1,hostBindings:function(t,n){t&1&&E("keydown",function(r){return n._handleKeydown(r)}),t&2&&Z("role",n.role)},inputs:{disabled:[2,"disabled","disabled",L],role:"role",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:kt(e)]},ngContentSelectors:Bv,decls:2,vars:0,consts:[["role","presentation",1,"mdc-evolution-chip-set__chips"]],template:function(t,n){t&1&&(fe(),Re(0,"div",0),G(1),Ue())},styles:[`.mat-mdc-chip-set {
2952
2952
  display: flex;
2953
2953
  }
2954
2954
  .mat-mdc-chip-set:focus {
@@ -3016,7 +3016,7 @@ input.mat-mdc-chip-input {
3016
3016
  margin-left: 0;
3017
3017
  margin-right: 0;
3018
3018
  }
3019
- `],encapsulation:2})}return i})();var ko=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({providers:[xo,{provide:Vv,useValue:{separatorKeyCodes:[13]}}],imports:[Ti,ee]})}return i})();function zv(i,o){if(i&1&&(s(0,"td",14),m(1),l()),i&2){let e=o.$implicit;c(),W(e.gpuIndex)}}function jv(i,o){if(i&1&&(s(0,"td",15)(1,"mat-chip",16),m(2),l()()),i&2){let e=o.$implicit,t=w();c(),C("ngClass",t.getVendorCssClass(e)),c(),he(" ",t.makeGpuNameShort(e.name)+" / "+e.brand," ")}}function Hv(i,o){if(i&1&&(s(0,"td",17)(1,"div",18)(2,"span",19),m(3),Go(4,"number"),Go(5,"number"),l(),s(6,"div",20),_(7,"div",21),l()()()),i&2){let e=o.$implicit,t=w();c(3),An(" ",$o(4,6,e.vramUsed,"1.0-0")," / ",$o(5,9,e.vramTotal,"1.0-0")," GB "),c(4),Ne("width",t.vramPercent(e),"%")("background",t.colorForUsage(t.vramPercent(e)))}}function Uv(i,o){if(i&1&&(s(0,"td",22)(1,"div",23)(2,"span",24),m(3),l(),s(4,"div",25),_(5,"div",26),l()()()),i&2){let e=o.$implicit,t=w();c(2),Ne("color",t.colorForUsage(e.usage)),c(),he(" ",e.usage,"% "),c(2),Ne("width",e.usage,"%")("background",t.colorForUsage(e.usage))}}function Gv(i,o){if(i&1&&(s(0,"td",27)(1,"span",28),m(2),l()()),i&2){let e=o.$implicit,t=w();c(),Ne("color",t.colorForTemp(e.temperature)),c(),he(" ",e.temperature,"\xB0C ")}}function $v(i,o){if(i&1&&(s(0,"td",29),m(1),l()),i&2){let e=o.$implicit;c(),W(e.pciBusId)}}function Wv(i,o){i&1&&_(0,"tr",30)}var Oh=(()=>{class i{constructor(){this.gpus=ao.required(),this.displayedColumns=["index","name","vram","usage","temperature","pciBusId"]}getVendorCssClass(e){return{"gpu-name":!0,"gpu-vendor-nvidia":e.vendor==="NVIDIA","gpu-vendor-amd":e.vendor==="AMD","gpu-vendor-other":!["NVIDIA","AMD"].includes(e.vendor)}}vramPercent(e){return e.vramTotal===0?0:Math.round(e.vramUsed/e.vramTotal*100)}colorForUsage(e){return e<40?"#4caf50":e<75?"#ff9800":"#f44336"}colorForTemp(e){return e<60?"#4caf50":e<80?"#ff9800":"#f44336"}makeGpuNameShort(e){return e=e.replace(/^AMD Radeon RX /,"RX "),e}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=T({type:i,selectors:[["app-gpu-table"]],inputs:{gpus:[1,"gpus"]},decls:16,vars:2,consts:[["mat-table","",1,"gpu-table",3,"dataSource"],["matColumnDef","index"],["mat-cell","","class","index-cell","title","#",4,"matCellDef"],["matColumnDef","name"],["mat-cell","","title","Name",4,"matCellDef"],["matColumnDef","vram"],["mat-cell","","title","VRAM",4,"matCellDef"],["matColumnDef","usage"],["mat-cell","","title","GPU Usage",4,"matCellDef"],["matColumnDef","temperature"],["mat-cell","","title","Temp \xB0C",4,"matCellDef"],["matColumnDef","pciBusId"],["mat-cell","","class","pci-cell","title","PCI Bus",4,"matCellDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-cell","","title","#",1,"index-cell"],["mat-cell","","title","Name"],[1,"gpu-name",3,"ngClass"],["mat-cell","","title","VRAM"],[1,"vram-cell"],[1,"vram-text"],[1,"vram-bar-bg"],[1,"vram-bar-fill"],["mat-cell","","title","GPU Usage"],[1,"usage-cell"],[1,"usage-value"],[1,"usage-bar-bg"],[1,"usage-bar-fill"],["mat-cell","","title","Temp \xB0C"],[1,"temp-value"],["mat-cell","","title","PCI Bus",1,"pci-cell"],["mat-row",""]],template:function(t,n){t&1&&(s(0,"mat-card")(1,"mat-card-content")(2,"table",0),ui(3,1),He(4,zv,2,1,"td",2),hi(),ui(5,3),He(6,jv,3,2,"td",4),hi(),ui(7,5),He(8,Hv,8,12,"td",6),hi(),ui(9,7),He(10,Uv,6,7,"td",8),hi(),ui(11,9),He(12,Gv,3,3,"td",10),hi(),ui(13,11),He(14,$v,2,1,"td",12),hi(),He(15,Wv,1,0,"tr",13),l()()()),t&2&&(c(2),C("dataSource",n.gpus()),c(13),C("matRowDefColumns",n.displayedColumns))},dependencies:[ze,ll,Dh,vh,yh,bh,xh,Ch,wh,on,tn,nn,ko,Ia,ml],styles:[".gpu-table[_ngcontent-%COMP%]{width:100%;white-space:nowrap}.gpu-name[_ngcontent-%COMP%]{font-weight:500}.gpu-vendor-nvidia[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #a4f021}.gpu-vendor-amd[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #ffa1a1}.gpu-vendor-other[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #b6e7ff}.index-cell[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.pci-cell[_ngcontent-%COMP%]{font-family:Roboto Mono,monospace;font-size:.85rem;color:#666}.vram-cell[_ngcontent-%COMP%]{min-width:160px}.vram-text[_ngcontent-%COMP%]{display:block;margin-bottom:4px;font-size:.85rem}.vram-bar-bg[_ngcontent-%COMP%]{height:8px;background:#e0e0e0;border-radius:4px;overflow:hidden}.vram-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:4px;transition:width .4s ease,background .4s ease}.usage-cell[_ngcontent-%COMP%]{min-width:130px}.usage-value[_ngcontent-%COMP%]{display:block;margin-bottom:4px;font-weight:500;font-size:.9rem}.usage-bar-bg[_ngcontent-%COMP%]{height:8px;background:#e0e0e0;border-radius:4px;overflow:hidden}.usage-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:4px;transition:width .4s ease,background .4s ease}.temp-value[_ngcontent-%COMP%]{font-weight:500;font-size:.95rem}.mat-row[_ngcontent-%COMP%]{transition:background .2s ease;height:44px}.mat-row[_ngcontent-%COMP%]:hover{background:#fafafa}mat-card-content[_ngcontent-%COMP%]{overflow-x:hidden}"]})}}return i})();var Ra=class{_attachedHost=null;attach(o){return this._attachedHost=o,o.attach(this)}detach(){let o=this._attachedHost;o!=null&&(this._attachedHost=null,o.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(o){this._attachedHost=o}},bi=class extends Ra{component;viewContainerRef;injector;projectableNodes;bindings;directives;constructor(o,e,t,n,a,r){super(),this.component=o,this.viewContainerRef=e,this.injector=t,this.projectableNodes=n,this.bindings=a||null,this.directives=r||null}},Et=class extends Ra{templateRef;viewContainerRef;context;injector;constructor(o,e,t,n){super(),this.templateRef=o,this.viewContainerRef=e,this.context=t,this.injector=n}get origin(){return this.templateRef.elementRef}attach(o,e=this.context){return this.context=e,super.attach(o)}detach(){return this.context=void 0,super.detach()}},Dc=class extends Ra{element;constructor(o){super(),this.element=o instanceof N?o.nativeElement:o}},_n=class{_attachedPortal=null;_disposeFn=null;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(o){if(o instanceof bi)return this._attachedPortal=o,this.attachComponentPortal(o);if(o instanceof Et)return this._attachedPortal=o,this.attachTemplatePortal(o);if(this.attachDomPortal&&o instanceof Dc)return this._attachedPortal=o,this.attachDomPortal(o)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(o){this._disposeFn=o}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},Oa=class extends _n{outletElement;_appRef;_defaultInjector;constructor(o,e,t){super(),this.outletElement=o,this._appRef=e,this._defaultInjector=t}attachComponentPortal(o){let e;if(o.viewContainerRef){let t=o.injector||o.viewContainerRef.injector,n=t.get(nr,null,{optional:!0})||void 0;e=o.viewContainerRef.createComponent(o.component,{index:o.viewContainerRef.length,injector:t,ngModuleRef:n,projectableNodes:o.projectableNodes||void 0,bindings:o.bindings||void 0,directives:o.directives||void 0}),this.setDisposeFn(()=>e.destroy())}else{let t=this._appRef,n=o.injector||this._defaultInjector||X.NULL,a=n.get(mi,t.injector);e=rr(o.component,{elementInjector:n,environmentInjector:a,projectableNodes:o.projectableNodes||void 0,bindings:o.bindings||void 0,directives:o.directives||void 0}),t.attachView(e.hostView),this.setDisposeFn(()=>{t.viewCount>0&&t.detachView(e.hostView),e.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=o,e}attachTemplatePortal(o){let e=o.viewContainerRef,t=e.createEmbeddedView(o.templateRef,o.context,{injector:o.injector});return t.rootNodes.forEach(n=>this.outletElement.appendChild(n)),t.detectChanges(),this.setDisposeFn(()=>{let n=e.indexOf(t);n!==-1&&e.remove(n)}),this._attachedPortal=o,t}attachDomPortal=o=>{let e=o.element;e.parentNode;let t=this.outletElement.ownerDocument.createComment("dom-portal");e.parentNode.insertBefore(t,e),this.outletElement.appendChild(e),this._attachedPortal=o,super.setDisposeFn(()=>{t.parentNode&&t.parentNode.replaceChild(e,t)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(o){return o.hostView.rootNodes[0]}};var Ri=(()=>{class i extends _n{_moduleRef=d(nr,{optional:!0});_document=d(q);_viewContainerRef=d(Xe);_isInitialized=!1;_attachedRef=null;get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}attached=new K;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);let t=e.viewContainerRef!=null?e.viewContainerRef:this._viewContainerRef,n=t.createComponent(e.component,{index:t.length,injector:e.injector||t.injector,projectableNodes:e.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0,bindings:e.bindings||void 0,directives:e.directives||void 0});return t!==this._viewContainerRef&&this._getRootNode().appendChild(n.hostView.rootNodes[0]),super.setDisposeFn(()=>n.destroy()),this._attachedPortal=e,this._attachedRef=n,this.attached.emit(n),n}attachTemplatePortal(e){e.setAttachedHost(this);let t=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=t,this.attached.emit(t),t}attachDomPortal=e=>{let t=e.element;t.parentNode;let n=this._document.createComment("dom-portal");e.setAttachedHost(this),t.parentNode.insertBefore(n,t),this._getRootNode().appendChild(t),this._attachedPortal=e,super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(t,n)})};_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Q]})}return i})(),Oi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({})}return i})();var Ph=Fr();function Ao(i){return new hs(i.get(Gt),i.get(q))}var hs=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(o,e){this._viewportRuler=o,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let o=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=o.style.left||"",this._previousHTMLStyles.top=o.style.top||"",o.style.left=Ze(-this._previousScrollPosition.left),o.style.top=Ze(-this._previousScrollPosition.top),o.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let o=this._document.documentElement,e=this._document.body,t=o.style,n=e.style,a=t.scrollBehavior||"",r=n.scrollBehavior||"";this._isEnabled=!1,t.left=this._previousHTMLStyles.left,t.top=this._previousHTMLStyles.top,o.classList.remove("cdk-global-scrollblock"),Ph&&(t.scrollBehavior=n.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Ph&&(t.scrollBehavior=a,n.scrollBehavior=r)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,t=this._viewportRuler.getViewportSize();return e.scrollHeight>t.height||e.scrollWidth>t.width}};function jh(i,o){return new ps(i.get(gn),i.get(H),i.get(Gt),o)}var ps=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(o,e,t,n){this._scrollDispatcher=o,this._ngZone=e,this._viewportRuler=t,this._config=n}attach(o){this._overlayRef,this._overlayRef=o}enable(){if(this._scrollSubscription)return;let o=this._scrollDispatcher.scrolled(0).pipe(we(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=o.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=o.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}};var Pa=class{enable(){}disable(){}attach(){}};function Sc(i,o){return o.some(e=>{let t=i.bottom<e.top,n=i.top>e.bottom,a=i.right<e.left,r=i.left>e.right;return t||n||a||r})}function Fh(i,o){return o.some(e=>{let t=i.top<e.top,n=i.bottom>e.bottom,a=i.left<e.left,r=i.right>e.right;return t||n||a||r})}function yi(i,o){return new fs(i.get(gn),i.get(Gt),i.get(H),o)}var fs=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(o,e,t,n){this._scrollDispatcher=o,this._viewportRuler=e,this._ngZone=t,this._config=n}attach(o){this._overlayRef,this._overlayRef=o}enable(){if(!this._scrollSubscription){let o=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(o).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:t,height:n}=this._viewportRuler.getViewportSize();Sc(e,[{width:t,height:n,bottom:n,right:t,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},Hh=(()=>{class i{_injector=d(X);noop=()=>new Pa;close=e=>jh(this._injector,e);block=()=>Ao(this._injector);reposition=e=>yi(this._injector,e);static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Wt=class{positionStrategy;scrollStrategy=new Pa;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";disableAnimations;width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;usePopover;eventPredicate;constructor(o){if(o){let e=Object.keys(o);for(let t of e)o[t]!==void 0&&(this[t]=o[t])}}};var gs=class{connectionPair;scrollableViewProperties;constructor(o,e){this.connectionPair=o,this.scrollableViewProperties=e}};var Uh=(()=>{class i{_attachedOverlays=[];_document=d(q);_isAttached=!1;ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let t=this._attachedOverlays.indexOf(e);t>-1&&this._attachedOverlays.splice(t,1),this._attachedOverlays.length===0&&this.detach()}canReceiveEvent(e,t,n){return n.observers.length<1?!1:e.eventPredicate?e.eventPredicate(t):!0}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Gh=(()=>{class i extends Uh{_ngZone=d(H);_renderer=d(ot).createRenderer(null,null);_cleanupKeydown;add(e){super.add(e),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=e=>{let t=this._attachedOverlays;for(let n=t.length-1;n>-1;n--){let a=t[n];if(this.canReceiveEvent(a,e,a._keydownEvents)){this._ngZone.run(()=>a._keydownEvents.next(e));break}}};static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),$h=(()=>{class i extends Uh{_platform=d(le);_ngZone=d(H);_renderer=d(ot).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget=null;_cleanups;add(e){if(super.add(e),!this._isAttached){let t=this._document.body,n={capture:!0},a=this._renderer;this._cleanups=this._ngZone.runOutsideAngular(()=>[a.listen(t,"pointerdown",this._pointerDownListener,n),a.listen(t,"click",this._clickListener,n),a.listen(t,"auxclick",this._clickListener,n),a.listen(t,"contextmenu",this._clickListener,n)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=t.style.cursor,t.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(e=>e()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=e=>{this._pointerDownEventTarget=rt(e)};_clickListener=e=>{let t=rt(e),n=e.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:t;this._pointerDownEventTarget=null;let a=this._attachedOverlays.slice();for(let r=a.length-1;r>-1;r--){let u=a[r],h=u._outsidePointerEvents;if(!(!u.hasAttached()||!this.canReceiveEvent(u,e,h))){if(Nh(u.overlayElement,t)||Nh(u.overlayElement,n))break;this._ngZone?this._ngZone.run(()=>h.next(e)):h.next(e)}}};static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function Nh(i,o){let e=typeof ShadowRoot<"u"&&ShadowRoot,t=o;for(;t;){if(t===i)return!0;t=e&&t instanceof ShadowRoot?t.host:t.parentNode}return!1}var Wh=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(t,n){},styles:[`.cdk-overlay-container, .cdk-global-overlay-wrapper {
3019
+ `],encapsulation:2})}return i})();var Mo=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({providers:[wo,{provide:zv,useValue:{separatorKeyCodes:[13]}}],imports:[Pi,te]})}return i})();function Hv(i,o){if(i&1&&(s(0,"td",14),m(1),l()),i&2){let e=o.$implicit;c(),B(e.gpuIndex)}}function Uv(i,o){if(i&1&&(s(0,"td",15)(1,"mat-chip",16),m(2),l()()),i&2){let e=o.$implicit,t=C();c(),x("ngClass",t.getVendorCssClass(e)),c(),pe(" ",t.makeGpuNameShort(e.name)+" / "+e.brand," ")}}function Gv(i,o){if(i&1&&(s(0,"td",17)(1,"div",18)(2,"span",19),m(3),Go(4,"number"),Go(5,"number"),l(),s(6,"div",20),_(7,"div",21),l()()()),i&2){let e=o.$implicit,t=C();c(3),Mi(" ",$o(4,6,e.vramUsed,"1.0-0")," / ",$o(5,9,e.vramTotal,"1.0-0")," GB "),c(4),Ve("width",t.vramPercent(e),"%")("background",t.colorForUsage(t.vramPercent(e)))}}function $v(i,o){if(i&1&&(s(0,"td",22)(1,"div",23)(2,"span",24),m(3),l(),s(4,"div",25),_(5,"div",26),l()()()),i&2){let e=o.$implicit,t=C();c(2),Ve("color",t.colorForUsage(e.usage)),c(),pe(" ",e.usage,"% "),c(2),Ve("width",e.usage,"%")("background",t.colorForUsage(e.usage))}}function Wv(i,o){if(i&1&&(s(0,"td",27)(1,"span",28),m(2),l()()),i&2){let e=o.$implicit,t=C();c(),Ve("color",t.colorForTemp(e.temperature)),c(),pe(" ",e.temperature,"\xB0C ")}}function qv(i,o){if(i&1&&(s(0,"td",29),m(1),l()),i&2){let e=o.$implicit;c(),B(e.pciBusId)}}function Kv(i,o){i&1&&_(0,"tr",30)}var Ph=(()=>{class i{constructor(){this.gpus=ro.required(),this.displayedColumns=["index","name","vram","usage","temperature","pciBusId"]}getVendorCssClass(e){return{"gpu-name":!0,"gpu-vendor-nvidia":e.vendor==="NVIDIA","gpu-vendor-amd":e.vendor==="AMD","gpu-vendor-other":!["NVIDIA","AMD"].includes(e.vendor)}}vramPercent(e){return e.vramTotal===0?0:Math.round(e.vramUsed/e.vramTotal*100)}colorForUsage(e){return e<40?"#4caf50":e<75?"#ff9800":"#f44336"}colorForTemp(e){return e<60?"#4caf50":e<80?"#ff9800":"#f44336"}makeGpuNameShort(e){return e=e.replace(/^AMD Radeon RX /,"RX "),e}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=I({type:i,selectors:[["app-gpu-table"]],inputs:{gpus:[1,"gpus"]},decls:16,vars:2,consts:[["mat-table","",1,"gpu-table",3,"dataSource"],["matColumnDef","index"],["mat-cell","","class","index-cell","title","#",4,"matCellDef"],["matColumnDef","name"],["mat-cell","","title","Name",4,"matCellDef"],["matColumnDef","vram"],["mat-cell","","title","VRAM",4,"matCellDef"],["matColumnDef","usage"],["mat-cell","","title","GPU Usage",4,"matCellDef"],["matColumnDef","temperature"],["mat-cell","","title","Temp \xB0C",4,"matCellDef"],["matColumnDef","pciBusId"],["mat-cell","","class","pci-cell","title","PCI Bus",4,"matCellDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-cell","","title","#",1,"index-cell"],["mat-cell","","title","Name"],[1,"gpu-name",3,"ngClass"],["mat-cell","","title","VRAM"],[1,"vram-cell"],[1,"vram-text"],[1,"vram-bar-bg"],[1,"vram-bar-fill"],["mat-cell","","title","GPU Usage"],[1,"usage-cell"],[1,"usage-value"],[1,"usage-bar-bg"],[1,"usage-bar-fill"],["mat-cell","","title","Temp \xB0C"],[1,"temp-value"],["mat-cell","","title","PCI Bus",1,"pci-cell"],["mat-row",""]],template:function(t,n){t&1&&(s(0,"mat-card")(1,"mat-card-content")(2,"table",0),hi(3,1),He(4,Hv,2,1,"td",2),pi(),hi(5,3),He(6,Uv,3,2,"td",4),pi(),hi(7,5),He(8,Gv,8,12,"td",6),pi(),hi(9,7),He(10,$v,6,7,"td",8),pi(),hi(11,9),He(12,Wv,3,3,"td",10),pi(),hi(13,11),He(14,qv,2,1,"td",12),pi(),He(15,Kv,1,0,"tr",13),l()()()),t&2&&(c(2),x("dataSource",n.gpus()),c(13),x("matRowDefColumns",n.displayedColumns))},dependencies:[Pe,cl,Sh,bh,Ch,yh,wh,xh,Dh,an,nn,on,Mo,Ra,ul],styles:[".gpu-table[_ngcontent-%COMP%]{width:100%;white-space:nowrap}.gpu-name[_ngcontent-%COMP%]{font-weight:500}.gpu-vendor-nvidia[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #a4f021}.gpu-vendor-amd[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #ffa1a1}.gpu-vendor-other[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #b6e7ff}.index-cell[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.pci-cell[_ngcontent-%COMP%]{font-family:Roboto Mono,monospace;font-size:.85rem;color:#666}.vram-cell[_ngcontent-%COMP%]{min-width:160px}.vram-text[_ngcontent-%COMP%]{display:block;margin-bottom:4px;font-size:.85rem}.vram-bar-bg[_ngcontent-%COMP%]{height:8px;background:#e0e0e0;border-radius:4px;overflow:hidden}.vram-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:4px;transition:width .4s ease,background .4s ease}.usage-cell[_ngcontent-%COMP%]{min-width:130px}.usage-value[_ngcontent-%COMP%]{display:block;margin-bottom:4px;font-weight:500;font-size:.9rem}.usage-bar-bg[_ngcontent-%COMP%]{height:8px;background:#e0e0e0;border-radius:4px;overflow:hidden}.usage-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:4px;transition:width .4s ease,background .4s ease}.temp-value[_ngcontent-%COMP%]{font-weight:500;font-size:.95rem}.mat-row[_ngcontent-%COMP%]{transition:background .2s ease;height:44px}.mat-row[_ngcontent-%COMP%]:hover{background:#fafafa}mat-card-content[_ngcontent-%COMP%]{overflow-x:hidden}"]})}}return i})();var Oa=class{_attachedHost=null;attach(o){return this._attachedHost=o,o.attach(this)}detach(){let o=this._attachedHost;o!=null&&(this._attachedHost=null,o.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(o){this._attachedHost=o}},xi=class extends Oa{component;viewContainerRef;injector;projectableNodes;bindings;directives;constructor(o,e,t,n,a,r){super(),this.component=o,this.viewContainerRef=e,this.injector=t,this.projectableNodes=n,this.bindings=a||null,this.directives=r||null}},It=class extends Oa{templateRef;viewContainerRef;context;injector;constructor(o,e,t,n){super(),this.templateRef=o,this.viewContainerRef=e,this.context=t,this.injector=n}get origin(){return this.templateRef.elementRef}attach(o,e=this.context){return this.context=e,super.attach(o)}detach(){return this.context=void 0,super.detach()}},Sc=class extends Oa{element;constructor(o){super(),this.element=o instanceof N?o.nativeElement:o}},bn=class{_attachedPortal=null;_disposeFn=null;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(o){if(o instanceof xi)return this._attachedPortal=o,this.attachComponentPortal(o);if(o instanceof It)return this._attachedPortal=o,this.attachTemplatePortal(o);if(this.attachDomPortal&&o instanceof Sc)return this._attachedPortal=o,this.attachDomPortal(o)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(o){this._disposeFn=o}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},Pa=class extends bn{outletElement;_appRef;_defaultInjector;constructor(o,e,t){super(),this.outletElement=o,this._appRef=e,this._defaultInjector=t}attachComponentPortal(o){let e;if(o.viewContainerRef){let t=o.injector||o.viewContainerRef.injector,n=t.get(or,null,{optional:!0})||void 0;e=o.viewContainerRef.createComponent(o.component,{index:o.viewContainerRef.length,injector:t,ngModuleRef:n,projectableNodes:o.projectableNodes||void 0,bindings:o.bindings||void 0,directives:o.directives||void 0}),this.setDisposeFn(()=>e.destroy())}else{let t=this._appRef,n=o.injector||this._defaultInjector||X.NULL,a=n.get(ui,t.injector);e=sr(o.component,{elementInjector:n,environmentInjector:a,projectableNodes:o.projectableNodes||void 0,bindings:o.bindings||void 0,directives:o.directives||void 0}),t.attachView(e.hostView),this.setDisposeFn(()=>{t.viewCount>0&&t.detachView(e.hostView),e.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=o,e}attachTemplatePortal(o){let e=o.viewContainerRef,t=e.createEmbeddedView(o.templateRef,o.context,{injector:o.injector});return t.rootNodes.forEach(n=>this.outletElement.appendChild(n)),t.detectChanges(),this.setDisposeFn(()=>{let n=e.indexOf(t);n!==-1&&e.remove(n)}),this._attachedPortal=o,t}attachDomPortal=o=>{let e=o.element;e.parentNode;let t=this.outletElement.ownerDocument.createComment("dom-portal");e.parentNode.insertBefore(t,e),this.outletElement.appendChild(e),this._attachedPortal=o,super.setDisposeFn(()=>{t.parentNode&&t.parentNode.replaceChild(e,t)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(o){return o.hostView.rootNodes[0]}};var Fi=(()=>{class i extends bn{_moduleRef=d(or,{optional:!0});_document=d(q);_viewContainerRef=d(Qe);_isInitialized=!1;_attachedRef=null;get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}attached=new K;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);let t=e.viewContainerRef!=null?e.viewContainerRef:this._viewContainerRef,n=t.createComponent(e.component,{index:t.length,injector:e.injector||t.injector,projectableNodes:e.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0,bindings:e.bindings||void 0,directives:e.directives||void 0});return t!==this._viewContainerRef&&this._getRootNode().appendChild(n.hostView.rootNodes[0]),super.setDisposeFn(()=>n.destroy()),this._attachedPortal=e,this._attachedRef=n,this.attached.emit(n),n}attachTemplatePortal(e){e.setAttachedHost(this);let t=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=t,this.attached.emit(t),t}attachDomPortal=e=>{let t=e.element;t.parentNode;let n=this._document.createComment("dom-portal");e.setAttachedHost(this),t.parentNode.insertBefore(n,t),this._getRootNode().appendChild(t),this._attachedPortal=e,super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(t,n)})};_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Q]})}return i})(),Ni=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({})}return i})();var Fh=Fr();function To(i){return new hs(i.get(qt),i.get(q))}var hs=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(o,e){this._viewportRuler=o,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let o=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=o.style.left||"",this._previousHTMLStyles.top=o.style.top||"",o.style.left=Je(-this._previousScrollPosition.left),o.style.top=Je(-this._previousScrollPosition.top),o.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let o=this._document.documentElement,e=this._document.body,t=o.style,n=e.style,a=t.scrollBehavior||"",r=n.scrollBehavior||"";this._isEnabled=!1,t.left=this._previousHTMLStyles.left,t.top=this._previousHTMLStyles.top,o.classList.remove("cdk-global-scrollblock"),Fh&&(t.scrollBehavior=n.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Fh&&(t.scrollBehavior=a,n.scrollBehavior=r)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,t=this._viewportRuler.getViewportSize();return e.scrollHeight>t.height||e.scrollWidth>t.width}};function Hh(i,o){return new ps(i.get(vn),i.get(U),i.get(qt),o)}var ps=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(o,e,t,n){this._scrollDispatcher=o,this._ngZone=e,this._viewportRuler=t,this._config=n}attach(o){this._overlayRef,this._overlayRef=o}enable(){if(this._scrollSubscription)return;let o=this._scrollDispatcher.scrolled(0).pipe(De(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=o.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=o.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}};var Fa=class{enable(){}disable(){}attach(){}};function kc(i,o){return o.some(e=>{let t=i.bottom<e.top,n=i.top>e.bottom,a=i.right<e.left,r=i.left>e.right;return t||n||a||r})}function Nh(i,o){return o.some(e=>{let t=i.top<e.top,n=i.bottom>e.bottom,a=i.left<e.left,r=i.right>e.right;return t||n||a||r})}function wi(i,o){return new fs(i.get(vn),i.get(qt),i.get(U),o)}var fs=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(o,e,t,n){this._scrollDispatcher=o,this._viewportRuler=e,this._ngZone=t,this._config=n}attach(o){this._overlayRef,this._overlayRef=o}enable(){if(!this._scrollSubscription){let o=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(o).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:t,height:n}=this._viewportRuler.getViewportSize();kc(e,[{width:t,height:n,bottom:n,right:t,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},Uh=(()=>{class i{_injector=d(X);noop=()=>new Fa;close=e=>Hh(this._injector,e);block=()=>To(this._injector);reposition=e=>wi(this._injector,e);static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Yt=class{positionStrategy;scrollStrategy=new Fa;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";disableAnimations;width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;usePopover;eventPredicate;constructor(o){if(o){let e=Object.keys(o);for(let t of e)o[t]!==void 0&&(this[t]=o[t])}}};var gs=class{connectionPair;scrollableViewProperties;constructor(o,e){this.connectionPair=o,this.scrollableViewProperties=e}};var Gh=(()=>{class i{_attachedOverlays=[];_document=d(q);_isAttached=!1;ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let t=this._attachedOverlays.indexOf(e);t>-1&&this._attachedOverlays.splice(t,1),this._attachedOverlays.length===0&&this.detach()}canReceiveEvent(e,t,n){return n.observers.length<1?!1:e.eventPredicate?e.eventPredicate(t):!0}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),$h=(()=>{class i extends Gh{_ngZone=d(U);_renderer=d(ot).createRenderer(null,null);_cleanupKeydown;add(e){super.add(e),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=e=>{let t=this._attachedOverlays;for(let n=t.length-1;n>-1;n--){let a=t[n];if(this.canReceiveEvent(a,e,a._keydownEvents)){this._ngZone.run(()=>a._keydownEvents.next(e));break}}};static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Wh=(()=>{class i extends Gh{_platform=d(ce);_ngZone=d(U);_renderer=d(ot).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget=null;_cleanups;add(e){if(super.add(e),!this._isAttached){let t=this._document.body,n={capture:!0},a=this._renderer;this._cleanups=this._ngZone.runOutsideAngular(()=>[a.listen(t,"pointerdown",this._pointerDownListener,n),a.listen(t,"click",this._clickListener,n),a.listen(t,"auxclick",this._clickListener,n),a.listen(t,"contextmenu",this._clickListener,n)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=t.style.cursor,t.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(e=>e()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=e=>{this._pointerDownEventTarget=rt(e)};_clickListener=e=>{let t=rt(e),n=e.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:t;this._pointerDownEventTarget=null;let a=this._attachedOverlays.slice();for(let r=a.length-1;r>-1;r--){let u=a[r],h=u._outsidePointerEvents;if(!(!u.hasAttached()||!this.canReceiveEvent(u,e,h))){if(Lh(u.overlayElement,t)||Lh(u.overlayElement,n))break;this._ngZone?this._ngZone.run(()=>h.next(e)):h.next(e)}}};static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function Lh(i,o){let e=typeof ShadowRoot<"u"&&ShadowRoot,t=o;for(;t;){if(t===i)return!0;t=e&&t instanceof ShadowRoot?t.host:t.parentNode}return!1}var qh=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(t,n){},styles:[`.cdk-overlay-container, .cdk-global-overlay-wrapper {
3020
3020
  pointer-events: none;
3021
3021
  top: 0;
3022
3022
  left: 0;
@@ -3155,14 +3155,14 @@ input.mat-mdc-chip-input {
3155
3155
  position: fixed;
3156
3156
  z-index: auto;
3157
3157
  }
3158
- `],encapsulation:2})}return i})(),bs=(()=>{class i{_platform=d(le);_containerElement;_document=d(q);_styleLoader=d(Le);ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e="cdk-overlay-container";if(this._platform.isBrowser||Fl()){let n=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let a=0;a<n.length;a++)n[a].remove()}let t=this._document.createElement("div");t.classList.add(e),Fl()?t.setAttribute("platform","test"):this._platform.isBrowser||t.setAttribute("platform","server"),this._document.body.appendChild(t),this._containerElement=t}_loadStyles(){this._styleLoader.load(Wh)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),kc=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(o,e,t,n){this._renderer=e,this._ngZone=t,this.element=o.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=e.listen(this.element,"click",n)}detach(){this._ngZone.runOutsideAngular(()=>{let o=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(o,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),o.style.pointerEvents="none",o.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}};function Mc(i){return i&&i.nodeType===1}var Mo=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new R;_attachments=new R;_detachments=new R;_positionStrategy;_scrollStrategy;_locationChanges=De.EMPTY;_backdropRef=null;_detachContentMutationObserver;_detachContentAfterRenderRef;_disposed=!1;_previousHostParent;_keydownEvents=new R;_outsidePointerEvents=new R;_afterNextRenderRef;constructor(o,e,t,n,a,r,u,h,g,v=!1,D,B){this._portalOutlet=o,this._host=e,this._pane=t,this._config=n,this._ngZone=a,this._keyboardDispatcher=r,this._document=u,this._location=h,this._outsideClickDispatcher=g,this._animationsDisabled=v,this._injector=D,this._renderer=B,n.scrollStrategy&&(this._scrollStrategy=n.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=n.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}get eventPredicate(){return this._config?.eventPredicate||null}attach(o){if(this._disposed)return null;this._attachHost();let e=this._portalOutlet.attach(o);return this._positionStrategy?.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=je(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._completeDetachContent(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof e?.onDestroy=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let o=this._portalOutlet.detach();return this._detachments.next(),this._completeDetachContent(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),o}dispose(){if(this._disposed)return;let o=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,o&&this._detachments.next(),this._detachments.complete(),this._completeDetachContent(),this._disposed=!0}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(o){o!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=o,this.hasAttached()&&(o.attach(this),this.updatePosition()))}updateSize(o){this._config=V(V({},this._config),o),this._updateElementSize()}setDirection(o){this._config=Oe(V({},this._config),{direction:o}),this._updateElementDirection()}addPanelClass(o){this._pane&&this._toggleClasses(this._pane,o,!0)}removePanelClass(o){this._pane&&this._toggleClasses(this._pane,o,!1)}getDirection(){let o=this._config.direction;return o?typeof o=="string"?o:o.value:"ltr"}updateScrollStrategy(o){o!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=o,this.hasAttached()&&(o.attach(this),o.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let o=this._pane.style;o.width=Ze(this._config.width),o.height=Ze(this._config.height),o.minWidth=Ze(this._config.minWidth),o.minHeight=Ze(this._config.minHeight),o.maxWidth=Ze(this._config.maxWidth),o.maxHeight=Ze(this._config.maxHeight)}_togglePointerEvents(o){this._pane.style.pointerEvents=o?"":"none"}_attachHost(){if(!this._host.parentElement){let o=this._config.usePopover?this._positionStrategy?.getPopoverInsertionPoint?.():null;Mc(o)?o.after(this._host):o?.type==="parent"?o.element.appendChild(this._host):this._previousHostParent?.appendChild(this._host)}if(this._config.usePopover)try{this._host.showPopover()}catch(o){}}_attachBackdrop(){let o="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new kc(this._document,this._renderer,this._ngZone,e=>{this._backdropClick.next(e)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._config.usePopover?this._host.prepend(this._backdropRef.element):this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(o))}):this._backdropRef.element.classList.add(o)}_updateStackingOrder(){!this._config.usePopover&&this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(o,e,t){let n=Vi(e||[]).filter(a=>!!a);n.length&&(t?o.classList.add(...n):o.classList.remove(...n))}_detachContentWhenEmpty(){let o=!1;try{this._detachContentAfterRenderRef=je(()=>{o=!0,this._detachContent()},{injector:this._injector})}catch(e){if(o)throw e;this._detachContent()}globalThis.MutationObserver&&this._pane&&(this._detachContentMutationObserver||=new globalThis.MutationObserver(()=>{this._detachContent()}),this._detachContentMutationObserver.observe(this._pane,{childList:!0}))}_detachContent(){(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),this._completeDetachContent())}_completeDetachContent(){this._detachContentAfterRenderRef?.destroy(),this._detachContentAfterRenderRef=void 0,this._detachContentMutationObserver?.disconnect()}_disposeScrollStrategy(){let o=this._scrollStrategy;o?.disable(),o?.detach?.()}},Lh="cdk-overlay-connected-position-bounding-box",qv=/([A-Za-z%]+)$/;function $i(i,o){return new _s(o,i.get(Gt),i.get(q),i.get(le),i.get(bs))}var _s=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender=!1;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed=!1;_boundingBox=null;_lastPosition=null;_lastScrollVisibility=null;_positionChanges=new R;_resizeSubscription=De.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount=null;_popoverLocation="global";positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(o,e,t,n,a){this._viewportRuler=e,this._document=t,this._platform=n,this._overlayContainer=a,this.setOrigin(o)}attach(o){this._overlayRef&&this._overlayRef,this._validatePositions(),o.hostElement.classList.add(Lh),this._overlayRef=o,this._boundingBox=o.hostElement,this._pane=o.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._getContainerRect();let o=this._originRect,e=this._overlayRect,t=this._viewportRect,n=this._containerRect,a=[],r;for(let u of this._preferredPositions){let h=this._getOriginPoint(o,n,u),g=this._getOverlayPoint(h,e,u),v=this._getOverlayFit(g,e,t,u);if(v.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(u,h);return}if(this._canFitWithFlexibleDimensions(v,g,t)){a.push({position:u,origin:h,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(h,u)});continue}(!r||r.overlayFit.visibleArea<v.visibleArea)&&(r={overlayFit:v,overlayPoint:g,originPoint:h,position:u,overlayRect:e})}if(a.length){let u=null,h=-1;for(let g of a){let v=g.boundingBoxRect.width*g.boundingBoxRect.height*(g.position.weight||1);v>h&&(h=v,u=g)}this._isPushed=!1,this._applyPosition(u.position,u.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(r.position,r.originPoint);return}this._applyPosition(r.position,r.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&$n(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Lh),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let o=this._lastPosition;o?(this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._getContainerRect(),this._applyPosition(o,this._getOriginPoint(this._originRect,this._containerRect,o))):this.apply()}withScrollableContainers(o){return this._scrollables=o,this}withPositions(o){return this._preferredPositions=o,o.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(o){return this._viewportMargin=o,this}withFlexibleDimensions(o=!0){return this._hasFlexibleDimensions=o,this}withGrowAfterOpen(o=!0){return this._growAfterOpen=o,this}withPush(o=!0){return this._canPush=o,this}withLockedPosition(o=!0){return this._positionLocked=o,this}setOrigin(o){return this._origin=o,this}withDefaultOffsetX(o){return this._offsetX=o,this}withDefaultOffsetY(o){return this._offsetY=o,this}withTransformOriginOn(o){return this._transformOriginSelector=o,this}withPopoverLocation(o){return this._popoverLocation=o,this}getPopoverInsertionPoint(){return this._popoverLocation==="global"?null:this._popoverLocation!=="inline"?this._popoverLocation:this._origin instanceof N?this._origin.nativeElement:Mc(this._origin)?this._origin:null}_getOriginPoint(o,e,t){let n;if(t.originX=="center")n=o.left+o.width/2;else{let r=this._isRtl()?o.right:o.left,u=this._isRtl()?o.left:o.right;n=t.originX=="start"?r:u}e.left<0&&(n-=e.left);let a;return t.originY=="center"?a=o.top+o.height/2:a=t.originY=="top"?o.top:o.bottom,e.top<0&&(a-=e.top),{x:n,y:a}}_getOverlayPoint(o,e,t){let n;t.overlayX=="center"?n=-e.width/2:t.overlayX==="start"?n=this._isRtl()?-e.width:0:n=this._isRtl()?0:-e.width;let a;return t.overlayY=="center"?a=-e.height/2:a=t.overlayY=="top"?0:-e.height,{x:o.x+n,y:o.y+a}}_getOverlayFit(o,e,t,n){let a=Bh(e),{x:r,y:u}=o,h=this._getOffset(n,"x"),g=this._getOffset(n,"y");h&&(r+=h),g&&(u+=g);let v=0-r,D=r+a.width-t.width,B=0-u,$=u+a.height-t.height,ie=this._subtractOverflows(a.width,v,D),fe=this._subtractOverflows(a.height,B,$),se=ie*fe;return{visibleArea:se,isCompletelyWithinViewport:a.width*a.height===se,fitsInViewportVertically:fe===a.height,fitsInViewportHorizontally:ie==a.width}}_canFitWithFlexibleDimensions(o,e,t){if(this._hasFlexibleDimensions){let n=t.bottom-e.y,a=t.right-e.x,r=Vh(this._overlayRef.getConfig().minHeight),u=Vh(this._overlayRef.getConfig().minWidth),h=o.fitsInViewportVertically||r!=null&&r<=n,g=o.fitsInViewportHorizontally||u!=null&&u<=a;return h&&g}return!1}_pushOverlayOnScreen(o,e,t){if(this._previousPushAmount&&this._positionLocked)return{x:o.x+this._previousPushAmount.x,y:o.y+this._previousPushAmount.y};let n=Bh(e),a=this._viewportRect,r=Math.max(o.x+n.width-a.width,0),u=Math.max(o.y+n.height-a.height,0),h=Math.max(a.top-t.top-o.y,0),g=Math.max(a.left-t.left-o.x,0),v=0,D=0;return n.width<=a.width?v=g||-r:v=o.x<this._getViewportMarginStart()?a.left-t.left-o.x:0,n.height<=a.height?D=h||-u:D=o.y<this._getViewportMarginTop()?a.top-t.top-o.y:0,this._previousPushAmount={x:v,y:D},{x:o.x+v,y:o.y+D}}_applyPosition(o,e){if(this._setTransformOrigin(o),this._setOverlayElementStyles(e,o),this._setBoundingBoxStyles(e,o),o.panelClass&&this._addPanelClasses(o.panelClass),this._positionChanges.observers.length){let t=this._getScrollVisibility();if(o!==this._lastPosition||!this._lastScrollVisibility||!Kv(this._lastScrollVisibility,t)){let n=new gs(o,t);this._positionChanges.next(n)}this._lastScrollVisibility=t}this._lastPosition=o,this._isInitialRender=!1}_setTransformOrigin(o){if(!this._transformOriginSelector)return;let e=this._boundingBox.querySelectorAll(this._transformOriginSelector),t,n=o.overlayY;o.overlayX==="center"?t="center":this._isRtl()?t=o.overlayX==="start"?"right":"left":t=o.overlayX==="start"?"left":"right";for(let a=0;a<e.length;a++)e[a].style.transformOrigin=`${t} ${n}`}_calculateBoundingBoxRect(o,e){let t=this._viewportRect,n=this._isRtl(),a,r,u;if(e.overlayY==="top")r=o.y,a=t.height-r+this._getViewportMarginBottom();else if(e.overlayY==="bottom")u=t.height-o.y+this._getViewportMarginTop()+this._getViewportMarginBottom(),a=t.height-u+this._getViewportMarginTop();else{let $=Math.min(t.bottom-o.y+t.top,o.y),ie=this._lastBoundingBoxSize.height;a=$*2,r=o.y-$,a>ie&&!this._isInitialRender&&!this._growAfterOpen&&(r=o.y-ie/2)}let h=e.overlayX==="start"&&!n||e.overlayX==="end"&&n,g=e.overlayX==="end"&&!n||e.overlayX==="start"&&n,v,D,B;if(g)B=t.width-o.x+this._getViewportMarginStart()+this._getViewportMarginEnd(),v=o.x-this._getViewportMarginStart();else if(h)D=o.x,v=t.right-o.x-this._getViewportMarginEnd();else{let $=Math.min(t.right-o.x+t.left,o.x),ie=this._lastBoundingBoxSize.width;v=$*2,D=o.x-$,v>ie&&!this._isInitialRender&&!this._growAfterOpen&&(D=o.x-ie/2)}return{top:r,left:D,bottom:u,right:B,width:v,height:a}}_setBoundingBoxStyles(o,e){let t=this._calculateBoundingBoxRect(o,e);!this._isInitialRender&&!this._growAfterOpen&&(t.height=Math.min(t.height,this._lastBoundingBoxSize.height),t.width=Math.min(t.width,this._lastBoundingBoxSize.width));let n={};if(this._hasExactPosition())n.top=n.left="0",n.bottom=n.right="auto",n.maxHeight=n.maxWidth="",n.width=n.height="100%";else{let a=this._overlayRef.getConfig().maxHeight,r=this._overlayRef.getConfig().maxWidth;n.width=Ze(t.width),n.height=Ze(t.height),n.top=Ze(t.top)||"auto",n.bottom=Ze(t.bottom)||"auto",n.left=Ze(t.left)||"auto",n.right=Ze(t.right)||"auto",e.overlayX==="center"?n.alignItems="center":n.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?n.justifyContent="center":n.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",a&&(n.maxHeight=Ze(a)),r&&(n.maxWidth=Ze(r))}this._lastBoundingBoxSize=t,$n(this._boundingBox.style,n)}_resetBoundingBoxStyles(){$n(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){$n(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(o,e){let t={},n=this._hasExactPosition(),a=this._hasFlexibleDimensions,r=this._overlayRef.getConfig();if(n){let v=this._viewportRuler.getViewportScrollPosition();$n(t,this._getExactOverlayY(e,o,v)),$n(t,this._getExactOverlayX(e,o,v))}else t.position="static";let u="",h=this._getOffset(e,"x"),g=this._getOffset(e,"y");h&&(u+=`translateX(${h}px) `),g&&(u+=`translateY(${g}px)`),t.transform=u.trim(),r.maxHeight&&(n?t.maxHeight=Ze(r.maxHeight):a&&(t.maxHeight="")),r.maxWidth&&(n?t.maxWidth=Ze(r.maxWidth):a&&(t.maxWidth="")),$n(this._pane.style,t)}_getExactOverlayY(o,e,t){let n={top:"",bottom:""},a=this._getOverlayPoint(e,this._overlayRect,o);if(this._isPushed&&(a=this._pushOverlayOnScreen(a,this._overlayRect,t)),o.overlayY==="bottom"){let r=this._document.documentElement.clientHeight;n.bottom=`${r-(a.y+this._overlayRect.height)}px`}else n.top=Ze(a.y);return n}_getExactOverlayX(o,e,t){let n={left:"",right:""},a=this._getOverlayPoint(e,this._overlayRect,o);this._isPushed&&(a=this._pushOverlayOnScreen(a,this._overlayRect,t));let r;if(this._isRtl()?r=o.overlayX==="end"?"left":"right":r=o.overlayX==="end"?"right":"left",r==="right"){let u=this._document.documentElement.clientWidth;n.right=`${u-(a.x+this._overlayRect.width)}px`}else n.left=Ze(a.x);return n}_getScrollVisibility(){let o=this._getOriginRect(),e=this._pane.getBoundingClientRect(),t=this._scrollables.map(n=>n.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Fh(o,t),isOriginOutsideView:Sc(o,t),isOverlayClipped:Fh(e,t),isOverlayOutsideView:Sc(e,t)}}_subtractOverflows(o,...e){return e.reduce((t,n)=>t-Math.max(n,0),o)}_getNarrowedViewportRect(){let o=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,t=this._viewportRuler.getViewportScrollPosition();return{top:t.top+this._getViewportMarginTop(),left:t.left+this._getViewportMarginStart(),right:t.left+o-this._getViewportMarginEnd(),bottom:t.top+e-this._getViewportMarginBottom(),width:o-this._getViewportMarginStart()-this._getViewportMarginEnd(),height:e-this._getViewportMarginTop()-this._getViewportMarginBottom()}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(o,e){return e==="x"?o.offsetX==null?this._offsetX:o.offsetX:o.offsetY==null?this._offsetY:o.offsetY}_validatePositions(){}_addPanelClasses(o){this._pane&&Vi(o).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(o=>{this._pane.classList.remove(o)}),this._appliedPanelClasses=[])}_getViewportMarginStart(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.start??0}_getViewportMarginEnd(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.end??0}_getViewportMarginTop(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.top??0}_getViewportMarginBottom(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.bottom??0}_getOriginRect(){let o=this._origin;if(o instanceof N)return o.nativeElement.getBoundingClientRect();if(o instanceof Element)return o.getBoundingClientRect();let e=o.width||0,t=o.height||0;return{top:o.y,bottom:o.y+t,left:o.x,right:o.x+e,height:t,width:e}}_getContainerRect(){let o=this._overlayRef.getConfig().usePopover&&this._popoverLocation!=="global",e=this._overlayContainer.getContainerElement();o&&(e.style.display="block");let t=e.getBoundingClientRect();return o&&(e.style.display=""),t}};function $n(i,o){for(let e in o)o.hasOwnProperty(e)&&(i[e]=o[e]);return i}function Vh(i){if(typeof i!="number"&&i!=null){let[o,e]=i.split(qv);return!e||e==="px"?parseFloat(o):null}return i||null}function Bh(i){return{top:Math.floor(i.top),right:Math.floor(i.right),bottom:Math.floor(i.bottom),left:Math.floor(i.left),width:Math.floor(i.width),height:Math.floor(i.height)}}function Kv(i,o){return i===o?!0:i.isOriginClipped===o.isOriginClipped&&i.isOriginOutsideView===o.isOriginOutsideView&&i.isOverlayClipped===o.isOverlayClipped&&i.isOverlayOutsideView===o.isOverlayOutsideView}var zh="cdk-global-overlay-wrapper";function vn(i){return new vs}var vs=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(o){let e=o.getConfig();this._overlayRef=o,this._width&&!e.width&&o.updateSize({width:this._width}),this._height&&!e.height&&o.updateSize({height:this._height}),o.hostElement.classList.add(zh),this._isDisposed=!1}top(o=""){return this._bottomOffset="",this._topOffset=o,this._alignItems="flex-start",this}left(o=""){return this._xOffset=o,this._xPosition="left",this}bottom(o=""){return this._topOffset="",this._bottomOffset=o,this._alignItems="flex-end",this}right(o=""){return this._xOffset=o,this._xPosition="right",this}start(o=""){return this._xOffset=o,this._xPosition="start",this}end(o=""){return this._xOffset=o,this._xPosition="end",this}width(o=""){return this._overlayRef?this._overlayRef.updateSize({width:o}):this._width=o,this}height(o=""){return this._overlayRef?this._overlayRef.updateSize({height:o}):this._height=o,this}centerHorizontally(o=""){return this.left(o),this._xPosition="center",this}centerVertically(o=""){return this.top(o),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let o=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,t=this._overlayRef.getConfig(),{width:n,height:a,maxWidth:r,maxHeight:u}=t,h=(n==="100%"||n==="100vw")&&(!r||r==="100%"||r==="100vw"),g=(a==="100%"||a==="100vh")&&(!u||u==="100%"||u==="100vh"),v=this._xPosition,D=this._xOffset,B=this._overlayRef.getConfig().direction==="rtl",$="",ie="",fe="";h?fe="flex-start":v==="center"?(fe="center",B?ie=D:$=D):B?v==="left"||v==="end"?(fe="flex-end",$=D):(v==="right"||v==="start")&&(fe="flex-start",ie=D):v==="left"||v==="start"?(fe="flex-start",$=D):(v==="right"||v==="end")&&(fe="flex-end",ie=D),o.position=this._cssPosition,o.marginLeft=h?"0":$,o.marginTop=g?"0":this._topOffset,o.marginBottom=this._bottomOffset,o.marginRight=h?"0":ie,e.justifyContent=fe,e.alignItems=g?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let o=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,t=e.style;e.classList.remove(zh),t.justifyContent=t.alignItems=o.marginTop=o.marginBottom=o.marginLeft=o.marginRight=o.position="",this._overlayRef=null,this._isDisposed=!0}},qh=(()=>{class i{_injector=d(X);global(){return vn()}flexibleConnectedTo(e){return $i(this._injector,e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Fa=new x("OVERLAY_DEFAULT_CONFIG");function qt(i,o){i.get(Le).load(Wh);let e=i.get(bs),t=i.get(q),n=i.get(be),a=i.get(Qi),r=i.get(qe),u=i.get(ve,null,{optional:!0})||i.get(ot).createRenderer(null,null),h=new Wt(o),g=i.get(Fa,null,{optional:!0})?.usePopover??!0;h.direction=h.direction||r.value,"showPopover"in t.body?h.usePopover=o?.usePopover??g:h.usePopover=!1;let v=t.createElement("div"),D=t.createElement("div");v.id=n.getId("cdk-overlay-"),v.classList.add("cdk-overlay-pane"),D.appendChild(v),h.usePopover&&(D.setAttribute("popover","manual"),D.classList.add("cdk-overlay-popover"));let B=h.usePopover?h.positionStrategy?.getPopoverInsertionPoint?.():null;return Mc(B)?B.after(D):B?.type==="parent"?B.element.appendChild(D):e.getContainerElement().appendChild(D),new Mo(new Oa(v,a,i),D,v,h,i.get(H),i.get(Gh),t,i.get(dr),i.get($h),o?.disableAnimations??i.get(Pi,null,{optional:!0})==="NoopAnimations",i.get(mi),u)}var Kh=(()=>{class i{scrollStrategies=d(Hh);_positionBuilder=d(qh);_injector=d(X);create(e){return qt(this._injector,e)}position(){return this._positionBuilder}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Yv=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],Xv=new x("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let i=d(X);return()=>yi(i)}}),Eo=(()=>{class i{elementRef=d(N);static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]})}return i})(),Yh=new x("cdk-connected-overlay-default-config"),ys=(()=>{class i{_dir=d(qe,{optional:!0});_injector=d(X);_overlayRef;_templatePortal;_backdropSubscription=De.EMPTY;_attachSubscription=De.EMPTY;_detachSubscription=De.EMPTY;_positionSubscription=De.EMPTY;_offsetX;_offsetY;_position;_scrollStrategyFactory=d(Xv);_ngZone=d(H);origin;positions;positionStrategy;get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}width;height;minWidth;minHeight;backdropClass;panelClass;viewportMargin=0;scrollStrategy;open=!1;disableClose=!1;transformOriginSelector;hasBackdrop=!1;lockPosition=!1;flexibleDimensions=!1;growAfterOpen=!1;push=!1;disposeOnNavigation=!1;usePopover;matchWidth=!1;set _config(e){typeof e!="string"&&this._assignConfig(e)}backdropClick=new K;positionChange=new K;attach=new K;detach=new K;overlayKeydown=new K;overlayOutsideClick=new K;constructor(){let e=d(Ye),t=d(Xe),n=d(Yh,{optional:!0}),a=d(Fa,{optional:!0});this.usePopover=a?.usePopover===!1?null:"global",this._templatePortal=new Et(e,t),this.scrollStrategy=this._scrollStrategyFactory(),n&&this._assignConfig(n)}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef?.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef?.updateSize({width:this._getWidth(),minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this.attachOverlay():this.detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=Yv);let e=this._overlayRef=qt(this._injector,this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(t=>{this.overlayKeydown.next(t),t.keyCode===27&&!this.disableClose&&!Ge(t)&&(t.preventDefault(),this.detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(t=>{let n=this._getOriginElement(),a=rt(t);(!n||n!==a&&!n.contains(a))&&this.overlayOutsideClick.next(t)})}_buildConfig(){let e=this._position=this.positionStrategy||this._createPositionStrategy(),t=new Wt({direction:this._dir||"ltr",positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation,usePopover:!!this.usePopover});return(this.height||this.height===0)&&(t.height=this.height),(this.minWidth||this.minWidth===0)&&(t.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(t.minHeight=this.minHeight),this.backdropClass&&(t.backdropClass=this.backdropClass),this.panelClass&&(t.panelClass=this.panelClass),t}_updatePositionStrategy(e){let t=this.positions.map(n=>({originX:n.originX,originY:n.originY,overlayX:n.overlayX,overlayY:n.overlayY,offsetX:n.offsetX||this.offsetX,offsetY:n.offsetY||this.offsetY,panelClass:n.panelClass||void 0}));return e.setOrigin(this._getOrigin()).withPositions(t).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector).withPopoverLocation(this.usePopover===null?"global":this.usePopover)}_createPositionStrategy(){let e=$i(this._injector,this._getOrigin());return this._updatePositionStrategy(e),e}_getOrigin(){return this.origin instanceof Eo?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof Eo?this.origin.elementRef.nativeElement:this.origin instanceof N?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}_getWidth(){return this.width?this.width:this.matchWidth?this._getOriginElement()?.getBoundingClientRect?.().width:void 0}attachOverlay(){this._overlayRef||this._createOverlay();let e=this._overlayRef;e.getConfig().hasBackdrop=this.hasBackdrop,e.updateSize({width:this._getWidth()}),e.hasAttached()||e.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=e.backdropClick().subscribe(t=>this.backdropClick.emit(t)):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(Qc(()=>this.positionChange.observers.length>0)).subscribe(t=>{this._ngZone.run(()=>this.positionChange.emit(t)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()})),this.open=!0}detachOverlay(){this._overlayRef?.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.open=!1}_assignConfig(e){this.origin=e.origin??this.origin,this.positions=e.positions??this.positions,this.positionStrategy=e.positionStrategy??this.positionStrategy,this.offsetX=e.offsetX??this.offsetX,this.offsetY=e.offsetY??this.offsetY,this.width=e.width??this.width,this.height=e.height??this.height,this.minWidth=e.minWidth??this.minWidth,this.minHeight=e.minHeight??this.minHeight,this.backdropClass=e.backdropClass??this.backdropClass,this.panelClass=e.panelClass??this.panelClass,this.viewportMargin=e.viewportMargin??this.viewportMargin,this.scrollStrategy=e.scrollStrategy??this.scrollStrategy,this.disableClose=e.disableClose??this.disableClose,this.transformOriginSelector=e.transformOriginSelector??this.transformOriginSelector,this.hasBackdrop=e.hasBackdrop??this.hasBackdrop,this.lockPosition=e.lockPosition??this.lockPosition,this.flexibleDimensions=e.flexibleDimensions??this.flexibleDimensions,this.growAfterOpen=e.growAfterOpen??this.growAfterOpen,this.push=e.push??this.push,this.disposeOnNavigation=e.disposeOnNavigation??this.disposeOnNavigation,this.usePopover=e.usePopover??this.usePopover,this.matchWidth=e.matchWidth??this.matchWidth}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",L],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",L],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",L],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",L],push:[2,"cdkConnectedOverlayPush","push",L],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",L],usePopover:[0,"cdkConnectedOverlayUsePopover","usePopover"],matchWidth:[2,"cdkConnectedOverlayMatchWidth","matchWidth",L],_config:[0,"cdkConnectedOverlay","_config"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[ke]})}return i})(),Nt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({providers:[Kh],imports:[ee,Oi,Sa,Sa]})}return i})();function Zv(i,o){}var bn=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;bindings};var Ac=(()=>{class i extends _n{_elementRef=d(N);_focusTrapFactory=d(jl);_config;_interactivityChecker=d(zl);_ngZone=d(H);_focusMonitor=d(Rt);_renderer=d(ve);_changeDetectorRef=d(te);_injector=d(X);_platform=d(le);_document=d(q);_portalOutlet;_focusTrapped=new R;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=d(bn,{optional:!0})||new bn,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let t=this._ariaLabelledByQueue.indexOf(e);t>-1&&(this._ariaLabelledByQueue.splice(t,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 t=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),t}attachTemplatePortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),t}attachDomPortal=e=>{this._portalOutlet.hasAttached();let t=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),t};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,t){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let n=()=>{a(),r(),e.removeAttribute("tabindex")},a=this._renderer.listen(e,"blur",n),r=this._renderer.listen(e,"mousedown",n)})),e.focus(t)}_focusByCssSelector(e,t){let n=this._elementRef.nativeElement.querySelector(e);n&&this._forceFocus(n,t)}_trapFocus(e){this._isDestroyed||je(()=>{let t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||t.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,t=null;if(typeof e=="string"?t=this._document.querySelector(e):typeof e=="boolean"?t=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(t=e),this._config.restoreFocus&&t&&typeof t.focus=="function"){let n=an(),a=this._elementRef.nativeElement;(!n||n===this._document.body||n===a||a.contains(n))&&(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e)}_containsFocus(){let e=this._elementRef.nativeElement,t=an();return e===t||e.contains(t)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=an()))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(t,n){if(t&1&&Me(Ri,7),t&2){let a;P(a=F())&&(n._portalOutlet=a.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(t,n){t&2&&Z("id",n._config.id||null)("role",n._config.role)("aria-modal",n._config.ariaModal)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null)},features:[Q],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,n){t&1&&He(0,Zv,0,0,"ng-template",0)},dependencies:[Ri],styles:[`.cdk-dialog-container {
3158
+ `],encapsulation:2})}return i})(),bs=(()=>{class i{_platform=d(ce);_containerElement;_document=d(q);_styleLoader=d(Be);ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e="cdk-overlay-container";if(this._platform.isBrowser||Nl()){let n=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let a=0;a<n.length;a++)n[a].remove()}let t=this._document.createElement("div");t.classList.add(e),Nl()?t.setAttribute("platform","test"):this._platform.isBrowser||t.setAttribute("platform","server"),this._document.body.appendChild(t),this._containerElement=t}_loadStyles(){this._styleLoader.load(qh)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Mc=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(o,e,t,n){this._renderer=e,this._ngZone=t,this.element=o.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=e.listen(this.element,"click",n)}detach(){this._ngZone.runOutsideAngular(()=>{let o=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(o,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),o.style.pointerEvents="none",o.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}};function Ec(i){return i&&i.nodeType===1}var Eo=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new R;_attachments=new R;_detachments=new R;_positionStrategy;_scrollStrategy;_locationChanges=ke.EMPTY;_backdropRef=null;_detachContentMutationObserver;_detachContentAfterRenderRef;_disposed=!1;_previousHostParent;_keydownEvents=new R;_outsidePointerEvents=new R;_afterNextRenderRef;constructor(o,e,t,n,a,r,u,h,g,v=!1,D,z){this._portalOutlet=o,this._host=e,this._pane=t,this._config=n,this._ngZone=a,this._keyboardDispatcher=r,this._document=u,this._location=h,this._outsideClickDispatcher=g,this._animationsDisabled=v,this._injector=D,this._renderer=z,n.scrollStrategy&&(this._scrollStrategy=n.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=n.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}get eventPredicate(){return this._config?.eventPredicate||null}attach(o){if(this._disposed)return null;this._attachHost();let e=this._portalOutlet.attach(o);return this._positionStrategy?.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=je(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._completeDetachContent(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof e?.onDestroy=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let o=this._portalOutlet.detach();return this._detachments.next(),this._completeDetachContent(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),o}dispose(){if(this._disposed)return;let o=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,o&&this._detachments.next(),this._detachments.complete(),this._completeDetachContent(),this._disposed=!0}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(o){o!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=o,this.hasAttached()&&(o.attach(this),this.updatePosition()))}updateSize(o){this._config=V(V({},this._config),o),this._updateElementSize()}setDirection(o){this._config=Fe(V({},this._config),{direction:o}),this._updateElementDirection()}addPanelClass(o){this._pane&&this._toggleClasses(this._pane,o,!0)}removePanelClass(o){this._pane&&this._toggleClasses(this._pane,o,!1)}getDirection(){let o=this._config.direction;return o?typeof o=="string"?o:o.value:"ltr"}updateScrollStrategy(o){o!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=o,this.hasAttached()&&(o.attach(this),o.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let o=this._pane.style;o.width=Je(this._config.width),o.height=Je(this._config.height),o.minWidth=Je(this._config.minWidth),o.minHeight=Je(this._config.minHeight),o.maxWidth=Je(this._config.maxWidth),o.maxHeight=Je(this._config.maxHeight)}_togglePointerEvents(o){this._pane.style.pointerEvents=o?"":"none"}_attachHost(){if(!this._host.parentElement){let o=this._config.usePopover?this._positionStrategy?.getPopoverInsertionPoint?.():null;Ec(o)?o.after(this._host):o?.type==="parent"?o.element.appendChild(this._host):this._previousHostParent?.appendChild(this._host)}if(this._config.usePopover)try{this._host.showPopover()}catch(o){}}_attachBackdrop(){let o="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Mc(this._document,this._renderer,this._ngZone,e=>{this._backdropClick.next(e)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._config.usePopover?this._host.prepend(this._backdropRef.element):this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(o))}):this._backdropRef.element.classList.add(o)}_updateStackingOrder(){!this._config.usePopover&&this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(o,e,t){let n=ji(e||[]).filter(a=>!!a);n.length&&(t?o.classList.add(...n):o.classList.remove(...n))}_detachContentWhenEmpty(){let o=!1;try{this._detachContentAfterRenderRef=je(()=>{o=!0,this._detachContent()},{injector:this._injector})}catch(e){if(o)throw e;this._detachContent()}globalThis.MutationObserver&&this._pane&&(this._detachContentMutationObserver||=new globalThis.MutationObserver(()=>{this._detachContent()}),this._detachContentMutationObserver.observe(this._pane,{childList:!0}))}_detachContent(){(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),this._completeDetachContent())}_completeDetachContent(){this._detachContentAfterRenderRef?.destroy(),this._detachContentAfterRenderRef=void 0,this._detachContentMutationObserver?.disconnect()}_disposeScrollStrategy(){let o=this._scrollStrategy;o?.disable(),o?.detach?.()}},Vh="cdk-overlay-connected-position-bounding-box",Yv=/([A-Za-z%]+)$/;function qi(i,o){return new _s(o,i.get(qt),i.get(q),i.get(ce),i.get(bs))}var _s=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender=!1;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed=!1;_boundingBox=null;_lastPosition=null;_lastScrollVisibility=null;_positionChanges=new R;_resizeSubscription=ke.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount=null;_popoverLocation="global";positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(o,e,t,n,a){this._viewportRuler=e,this._document=t,this._platform=n,this._overlayContainer=a,this.setOrigin(o)}attach(o){this._overlayRef&&this._overlayRef,this._validatePositions(),o.hostElement.classList.add(Vh),this._overlayRef=o,this._boundingBox=o.hostElement,this._pane=o.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._getContainerRect();let o=this._originRect,e=this._overlayRect,t=this._viewportRect,n=this._containerRect,a=[],r;for(let u of this._preferredPositions){let h=this._getOriginPoint(o,n,u),g=this._getOverlayPoint(h,e,u),v=this._getOverlayFit(g,e,t,u);if(v.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(u,h);return}if(this._canFitWithFlexibleDimensions(v,g,t)){a.push({position:u,origin:h,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(h,u)});continue}(!r||r.overlayFit.visibleArea<v.visibleArea)&&(r={overlayFit:v,overlayPoint:g,originPoint:h,position:u,overlayRect:e})}if(a.length){let u=null,h=-1;for(let g of a){let v=g.boundingBoxRect.width*g.boundingBoxRect.height*(g.position.weight||1);v>h&&(h=v,u=g)}this._isPushed=!1,this._applyPosition(u.position,u.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(r.position,r.originPoint);return}this._applyPosition(r.position,r.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&$n(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Vh),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let o=this._lastPosition;o?(this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._getContainerRect(),this._applyPosition(o,this._getOriginPoint(this._originRect,this._containerRect,o))):this.apply()}withScrollableContainers(o){return this._scrollables=o,this}withPositions(o){return this._preferredPositions=o,o.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(o){return this._viewportMargin=o,this}withFlexibleDimensions(o=!0){return this._hasFlexibleDimensions=o,this}withGrowAfterOpen(o=!0){return this._growAfterOpen=o,this}withPush(o=!0){return this._canPush=o,this}withLockedPosition(o=!0){return this._positionLocked=o,this}setOrigin(o){return this._origin=o,this}withDefaultOffsetX(o){return this._offsetX=o,this}withDefaultOffsetY(o){return this._offsetY=o,this}withTransformOriginOn(o){return this._transformOriginSelector=o,this}withPopoverLocation(o){return this._popoverLocation=o,this}getPopoverInsertionPoint(){return this._popoverLocation==="global"?null:this._popoverLocation!=="inline"?this._popoverLocation:this._origin instanceof N?this._origin.nativeElement:Ec(this._origin)?this._origin:null}_getOriginPoint(o,e,t){let n;if(t.originX=="center")n=o.left+o.width/2;else{let r=this._isRtl()?o.right:o.left,u=this._isRtl()?o.left:o.right;n=t.originX=="start"?r:u}e.left<0&&(n-=e.left);let a;return t.originY=="center"?a=o.top+o.height/2:a=t.originY=="top"?o.top:o.bottom,e.top<0&&(a-=e.top),{x:n,y:a}}_getOverlayPoint(o,e,t){let n;t.overlayX=="center"?n=-e.width/2:t.overlayX==="start"?n=this._isRtl()?-e.width:0:n=this._isRtl()?0:-e.width;let a;return t.overlayY=="center"?a=-e.height/2:a=t.overlayY=="top"?0:-e.height,{x:o.x+n,y:o.y+a}}_getOverlayFit(o,e,t,n){let a=zh(e),{x:r,y:u}=o,h=this._getOffset(n,"x"),g=this._getOffset(n,"y");h&&(r+=h),g&&(u+=g);let v=0-r,D=r+a.width-t.width,z=0-u,W=u+a.height-t.height,ne=this._subtractOverflows(a.width,v,D),ve=this._subtractOverflows(a.height,z,W),le=ne*ve;return{visibleArea:le,isCompletelyWithinViewport:a.width*a.height===le,fitsInViewportVertically:ve===a.height,fitsInViewportHorizontally:ne==a.width}}_canFitWithFlexibleDimensions(o,e,t){if(this._hasFlexibleDimensions){let n=t.bottom-e.y,a=t.right-e.x,r=Bh(this._overlayRef.getConfig().minHeight),u=Bh(this._overlayRef.getConfig().minWidth),h=o.fitsInViewportVertically||r!=null&&r<=n,g=o.fitsInViewportHorizontally||u!=null&&u<=a;return h&&g}return!1}_pushOverlayOnScreen(o,e,t){if(this._previousPushAmount&&this._positionLocked)return{x:o.x+this._previousPushAmount.x,y:o.y+this._previousPushAmount.y};let n=zh(e),a=this._viewportRect,r=Math.max(o.x+n.width-a.width,0),u=Math.max(o.y+n.height-a.height,0),h=Math.max(a.top-t.top-o.y,0),g=Math.max(a.left-t.left-o.x,0),v=0,D=0;return n.width<=a.width?v=g||-r:v=o.x<this._getViewportMarginStart()?a.left-t.left-o.x:0,n.height<=a.height?D=h||-u:D=o.y<this._getViewportMarginTop()?a.top-t.top-o.y:0,this._previousPushAmount={x:v,y:D},{x:o.x+v,y:o.y+D}}_applyPosition(o,e){if(this._setTransformOrigin(o),this._setOverlayElementStyles(e,o),this._setBoundingBoxStyles(e,o),o.panelClass&&this._addPanelClasses(o.panelClass),this._positionChanges.observers.length){let t=this._getScrollVisibility();if(o!==this._lastPosition||!this._lastScrollVisibility||!Xv(this._lastScrollVisibility,t)){let n=new gs(o,t);this._positionChanges.next(n)}this._lastScrollVisibility=t}this._lastPosition=o,this._isInitialRender=!1}_setTransformOrigin(o){if(!this._transformOriginSelector)return;let e=this._boundingBox.querySelectorAll(this._transformOriginSelector),t,n=o.overlayY;o.overlayX==="center"?t="center":this._isRtl()?t=o.overlayX==="start"?"right":"left":t=o.overlayX==="start"?"left":"right";for(let a=0;a<e.length;a++)e[a].style.transformOrigin=`${t} ${n}`}_calculateBoundingBoxRect(o,e){let t=this._viewportRect,n=this._isRtl(),a,r,u;if(e.overlayY==="top")r=o.y,a=t.height-r+this._getViewportMarginBottom();else if(e.overlayY==="bottom")u=t.height-o.y+this._getViewportMarginTop()+this._getViewportMarginBottom(),a=t.height-u+this._getViewportMarginTop();else{let W=Math.min(t.bottom-o.y+t.top,o.y),ne=this._lastBoundingBoxSize.height;a=W*2,r=o.y-W,a>ne&&!this._isInitialRender&&!this._growAfterOpen&&(r=o.y-ne/2)}let h=e.overlayX==="start"&&!n||e.overlayX==="end"&&n,g=e.overlayX==="end"&&!n||e.overlayX==="start"&&n,v,D,z;if(g)z=t.width-o.x+this._getViewportMarginStart()+this._getViewportMarginEnd(),v=o.x-this._getViewportMarginStart();else if(h)D=o.x,v=t.right-o.x-this._getViewportMarginEnd();else{let W=Math.min(t.right-o.x+t.left,o.x),ne=this._lastBoundingBoxSize.width;v=W*2,D=o.x-W,v>ne&&!this._isInitialRender&&!this._growAfterOpen&&(D=o.x-ne/2)}return{top:r,left:D,bottom:u,right:z,width:v,height:a}}_setBoundingBoxStyles(o,e){let t=this._calculateBoundingBoxRect(o,e);!this._isInitialRender&&!this._growAfterOpen&&(t.height=Math.min(t.height,this._lastBoundingBoxSize.height),t.width=Math.min(t.width,this._lastBoundingBoxSize.width));let n={};if(this._hasExactPosition())n.top=n.left="0",n.bottom=n.right="auto",n.maxHeight=n.maxWidth="",n.width=n.height="100%";else{let a=this._overlayRef.getConfig().maxHeight,r=this._overlayRef.getConfig().maxWidth;n.width=Je(t.width),n.height=Je(t.height),n.top=Je(t.top)||"auto",n.bottom=Je(t.bottom)||"auto",n.left=Je(t.left)||"auto",n.right=Je(t.right)||"auto",e.overlayX==="center"?n.alignItems="center":n.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?n.justifyContent="center":n.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",a&&(n.maxHeight=Je(a)),r&&(n.maxWidth=Je(r))}this._lastBoundingBoxSize=t,$n(this._boundingBox.style,n)}_resetBoundingBoxStyles(){$n(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){$n(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(o,e){let t={},n=this._hasExactPosition(),a=this._hasFlexibleDimensions,r=this._overlayRef.getConfig();if(n){let v=this._viewportRuler.getViewportScrollPosition();$n(t,this._getExactOverlayY(e,o,v)),$n(t,this._getExactOverlayX(e,o,v))}else t.position="static";let u="",h=this._getOffset(e,"x"),g=this._getOffset(e,"y");h&&(u+=`translateX(${h}px) `),g&&(u+=`translateY(${g}px)`),t.transform=u.trim(),r.maxHeight&&(n?t.maxHeight=Je(r.maxHeight):a&&(t.maxHeight="")),r.maxWidth&&(n?t.maxWidth=Je(r.maxWidth):a&&(t.maxWidth="")),$n(this._pane.style,t)}_getExactOverlayY(o,e,t){let n={top:"",bottom:""},a=this._getOverlayPoint(e,this._overlayRect,o);if(this._isPushed&&(a=this._pushOverlayOnScreen(a,this._overlayRect,t)),o.overlayY==="bottom"){let r=this._document.documentElement.clientHeight;n.bottom=`${r-(a.y+this._overlayRect.height)}px`}else n.top=Je(a.y);return n}_getExactOverlayX(o,e,t){let n={left:"",right:""},a=this._getOverlayPoint(e,this._overlayRect,o);this._isPushed&&(a=this._pushOverlayOnScreen(a,this._overlayRect,t));let r;if(this._isRtl()?r=o.overlayX==="end"?"left":"right":r=o.overlayX==="end"?"right":"left",r==="right"){let u=this._document.documentElement.clientWidth;n.right=`${u-(a.x+this._overlayRect.width)}px`}else n.left=Je(a.x);return n}_getScrollVisibility(){let o=this._getOriginRect(),e=this._pane.getBoundingClientRect(),t=this._scrollables.map(n=>n.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Nh(o,t),isOriginOutsideView:kc(o,t),isOverlayClipped:Nh(e,t),isOverlayOutsideView:kc(e,t)}}_subtractOverflows(o,...e){return e.reduce((t,n)=>t-Math.max(n,0),o)}_getNarrowedViewportRect(){let o=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,t=this._viewportRuler.getViewportScrollPosition();return{top:t.top+this._getViewportMarginTop(),left:t.left+this._getViewportMarginStart(),right:t.left+o-this._getViewportMarginEnd(),bottom:t.top+e-this._getViewportMarginBottom(),width:o-this._getViewportMarginStart()-this._getViewportMarginEnd(),height:e-this._getViewportMarginTop()-this._getViewportMarginBottom()}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(o,e){return e==="x"?o.offsetX==null?this._offsetX:o.offsetX:o.offsetY==null?this._offsetY:o.offsetY}_validatePositions(){}_addPanelClasses(o){this._pane&&ji(o).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(o=>{this._pane.classList.remove(o)}),this._appliedPanelClasses=[])}_getViewportMarginStart(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.start??0}_getViewportMarginEnd(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.end??0}_getViewportMarginTop(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.top??0}_getViewportMarginBottom(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.bottom??0}_getOriginRect(){let o=this._origin;if(o instanceof N)return o.nativeElement.getBoundingClientRect();if(o instanceof Element)return o.getBoundingClientRect();let e=o.width||0,t=o.height||0;return{top:o.y,bottom:o.y+t,left:o.x,right:o.x+e,height:t,width:e}}_getContainerRect(){let o=this._overlayRef.getConfig().usePopover&&this._popoverLocation!=="global",e=this._overlayContainer.getContainerElement();o&&(e.style.display="block");let t=e.getBoundingClientRect();return o&&(e.style.display=""),t}};function $n(i,o){for(let e in o)o.hasOwnProperty(e)&&(i[e]=o[e]);return i}function Bh(i){if(typeof i!="number"&&i!=null){let[o,e]=i.split(Yv);return!e||e==="px"?parseFloat(o):null}return i||null}function zh(i){return{top:Math.floor(i.top),right:Math.floor(i.right),bottom:Math.floor(i.bottom),left:Math.floor(i.left),width:Math.floor(i.width),height:Math.floor(i.height)}}function Xv(i,o){return i===o?!0:i.isOriginClipped===o.isOriginClipped&&i.isOriginOutsideView===o.isOriginOutsideView&&i.isOverlayClipped===o.isOverlayClipped&&i.isOverlayOutsideView===o.isOverlayOutsideView}var jh="cdk-global-overlay-wrapper";function yn(i){return new vs}var vs=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(o){let e=o.getConfig();this._overlayRef=o,this._width&&!e.width&&o.updateSize({width:this._width}),this._height&&!e.height&&o.updateSize({height:this._height}),o.hostElement.classList.add(jh),this._isDisposed=!1}top(o=""){return this._bottomOffset="",this._topOffset=o,this._alignItems="flex-start",this}left(o=""){return this._xOffset=o,this._xPosition="left",this}bottom(o=""){return this._topOffset="",this._bottomOffset=o,this._alignItems="flex-end",this}right(o=""){return this._xOffset=o,this._xPosition="right",this}start(o=""){return this._xOffset=o,this._xPosition="start",this}end(o=""){return this._xOffset=o,this._xPosition="end",this}width(o=""){return this._overlayRef?this._overlayRef.updateSize({width:o}):this._width=o,this}height(o=""){return this._overlayRef?this._overlayRef.updateSize({height:o}):this._height=o,this}centerHorizontally(o=""){return this.left(o),this._xPosition="center",this}centerVertically(o=""){return this.top(o),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let o=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,t=this._overlayRef.getConfig(),{width:n,height:a,maxWidth:r,maxHeight:u}=t,h=(n==="100%"||n==="100vw")&&(!r||r==="100%"||r==="100vw"),g=(a==="100%"||a==="100vh")&&(!u||u==="100%"||u==="100vh"),v=this._xPosition,D=this._xOffset,z=this._overlayRef.getConfig().direction==="rtl",W="",ne="",ve="";h?ve="flex-start":v==="center"?(ve="center",z?ne=D:W=D):z?v==="left"||v==="end"?(ve="flex-end",W=D):(v==="right"||v==="start")&&(ve="flex-start",ne=D):v==="left"||v==="start"?(ve="flex-start",W=D):(v==="right"||v==="end")&&(ve="flex-end",ne=D),o.position=this._cssPosition,o.marginLeft=h?"0":W,o.marginTop=g?"0":this._topOffset,o.marginBottom=this._bottomOffset,o.marginRight=h?"0":ne,e.justifyContent=ve,e.alignItems=g?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let o=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,t=e.style;e.classList.remove(jh),t.justifyContent=t.alignItems=o.marginTop=o.marginBottom=o.marginLeft=o.marginRight=o.position="",this._overlayRef=null,this._isDisposed=!0}},Kh=(()=>{class i{_injector=d(X);global(){return yn()}flexibleConnectedTo(e){return qi(this._injector,e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Na=new w("OVERLAY_DEFAULT_CONFIG");function Xt(i,o){i.get(Be).load(qh);let e=i.get(bs),t=i.get(q),n=i.get(xe),a=i.get(en),r=i.get(qe),u=i.get(Ce,null,{optional:!0})||i.get(ot).createRenderer(null,null),h=new Yt(o),g=i.get(Na,null,{optional:!0})?.usePopover??!0;h.direction=h.direction||r.value,"showPopover"in t.body?h.usePopover=o?.usePopover??g:h.usePopover=!1;let v=t.createElement("div"),D=t.createElement("div");v.id=n.getId("cdk-overlay-"),v.classList.add("cdk-overlay-pane"),D.appendChild(v),h.usePopover&&(D.setAttribute("popover","manual"),D.classList.add("cdk-overlay-popover"));let z=h.usePopover?h.positionStrategy?.getPopoverInsertionPoint?.():null;return Ec(z)?z.after(D):z?.type==="parent"?z.element.appendChild(D):e.getContainerElement().appendChild(D),new Eo(new Pa(v,a,i),D,v,h,i.get(U),i.get($h),t,i.get(mr),i.get(Wh),o?.disableAnimations??i.get(Li,null,{optional:!0})==="NoopAnimations",i.get(ui),u)}var Yh=(()=>{class i{scrollStrategies=d(Uh);_positionBuilder=d(Kh);_injector=d(X);create(e){return Xt(this._injector,e)}position(){return this._positionBuilder}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})(),Zv=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],Qv=new w("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let i=d(X);return()=>wi(i)}}),Ao=(()=>{class i{elementRef=d(N);static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]})}return i})(),Xh=new w("cdk-connected-overlay-default-config"),ys=(()=>{class i{_dir=d(qe,{optional:!0});_injector=d(X);_overlayRef;_templatePortal;_backdropSubscription=ke.EMPTY;_attachSubscription=ke.EMPTY;_detachSubscription=ke.EMPTY;_positionSubscription=ke.EMPTY;_offsetX;_offsetY;_position;_scrollStrategyFactory=d(Qv);_ngZone=d(U);origin;positions;positionStrategy;get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}width;height;minWidth;minHeight;backdropClass;panelClass;viewportMargin=0;scrollStrategy;open=!1;disableClose=!1;transformOriginSelector;hasBackdrop=!1;lockPosition=!1;flexibleDimensions=!1;growAfterOpen=!1;push=!1;disposeOnNavigation=!1;usePopover;matchWidth=!1;set _config(e){typeof e!="string"&&this._assignConfig(e)}backdropClick=new K;positionChange=new K;attach=new K;detach=new K;overlayKeydown=new K;overlayOutsideClick=new K;constructor(){let e=d(Ze),t=d(Qe),n=d(Xh,{optional:!0}),a=d(Na,{optional:!0});this.usePopover=a?.usePopover===!1?null:"global",this._templatePortal=new It(e,t),this.scrollStrategy=this._scrollStrategyFactory(),n&&this._assignConfig(n)}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef?.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef?.updateSize({width:this._getWidth(),minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this.attachOverlay():this.detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=Zv);let e=this._overlayRef=Xt(this._injector,this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(t=>{this.overlayKeydown.next(t),t.keyCode===27&&!this.disableClose&&!Ge(t)&&(t.preventDefault(),this.detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(t=>{let n=this._getOriginElement(),a=rt(t);(!n||n!==a&&!n.contains(a))&&this.overlayOutsideClick.next(t)})}_buildConfig(){let e=this._position=this.positionStrategy||this._createPositionStrategy(),t=new Yt({direction:this._dir||"ltr",positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation,usePopover:!!this.usePopover});return(this.height||this.height===0)&&(t.height=this.height),(this.minWidth||this.minWidth===0)&&(t.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(t.minHeight=this.minHeight),this.backdropClass&&(t.backdropClass=this.backdropClass),this.panelClass&&(t.panelClass=this.panelClass),t}_updatePositionStrategy(e){let t=this.positions.map(n=>({originX:n.originX,originY:n.originY,overlayX:n.overlayX,overlayY:n.overlayY,offsetX:n.offsetX||this.offsetX,offsetY:n.offsetY||this.offsetY,panelClass:n.panelClass||void 0}));return e.setOrigin(this._getOrigin()).withPositions(t).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector).withPopoverLocation(this.usePopover===null?"global":this.usePopover)}_createPositionStrategy(){let e=qi(this._injector,this._getOrigin());return this._updatePositionStrategy(e),e}_getOrigin(){return this.origin instanceof Ao?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof Ao?this.origin.elementRef.nativeElement:this.origin instanceof N?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}_getWidth(){return this.width?this.width:this.matchWidth?this._getOriginElement()?.getBoundingClientRect?.().width:void 0}attachOverlay(){this._overlayRef||this._createOverlay();let e=this._overlayRef;e.getConfig().hasBackdrop=this.hasBackdrop,e.updateSize({width:this._getWidth()}),e.hasAttached()||e.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=e.backdropClick().subscribe(t=>this.backdropClick.emit(t)):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(Jc(()=>this.positionChange.observers.length>0)).subscribe(t=>{this._ngZone.run(()=>this.positionChange.emit(t)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()})),this.open=!0}detachOverlay(){this._overlayRef?.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.open=!1}_assignConfig(e){this.origin=e.origin??this.origin,this.positions=e.positions??this.positions,this.positionStrategy=e.positionStrategy??this.positionStrategy,this.offsetX=e.offsetX??this.offsetX,this.offsetY=e.offsetY??this.offsetY,this.width=e.width??this.width,this.height=e.height??this.height,this.minWidth=e.minWidth??this.minWidth,this.minHeight=e.minHeight??this.minHeight,this.backdropClass=e.backdropClass??this.backdropClass,this.panelClass=e.panelClass??this.panelClass,this.viewportMargin=e.viewportMargin??this.viewportMargin,this.scrollStrategy=e.scrollStrategy??this.scrollStrategy,this.disableClose=e.disableClose??this.disableClose,this.transformOriginSelector=e.transformOriginSelector??this.transformOriginSelector,this.hasBackdrop=e.hasBackdrop??this.hasBackdrop,this.lockPosition=e.lockPosition??this.lockPosition,this.flexibleDimensions=e.flexibleDimensions??this.flexibleDimensions,this.growAfterOpen=e.growAfterOpen??this.growAfterOpen,this.push=e.push??this.push,this.disposeOnNavigation=e.disposeOnNavigation??this.disposeOnNavigation,this.usePopover=e.usePopover??this.usePopover,this.matchWidth=e.matchWidth??this.matchWidth}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",L],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",L],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",L],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",L],push:[2,"cdkConnectedOverlayPush","push",L],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",L],usePopover:[0,"cdkConnectedOverlayUsePopover","usePopover"],matchWidth:[2,"cdkConnectedOverlayMatchWidth","matchWidth",L],_config:[0,"cdkConnectedOverlay","_config"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[Ee]})}return i})(),Vt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({providers:[Yh],imports:[te,Ni,ka,ka]})}return i})();function Jv(i,o){}var Cn=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;bindings};var Tc=(()=>{class i extends bn{_elementRef=d(N);_focusTrapFactory=d(Hl);_config;_interactivityChecker=d(jl);_ngZone=d(U);_focusMonitor=d(Nt);_renderer=d(Ce);_changeDetectorRef=d(ie);_injector=d(X);_platform=d(ce);_document=d(q);_portalOutlet;_focusTrapped=new R;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=d(Cn,{optional:!0})||new Cn,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let t=this._ariaLabelledByQueue.indexOf(e);t>-1&&(this._ariaLabelledByQueue.splice(t,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 t=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),t}attachTemplatePortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),t}attachDomPortal=e=>{this._portalOutlet.hasAttached();let t=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),t};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,t){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let n=()=>{a(),r(),e.removeAttribute("tabindex")},a=this._renderer.listen(e,"blur",n),r=this._renderer.listen(e,"mousedown",n)})),e.focus(t)}_focusByCssSelector(e,t){let n=this._elementRef.nativeElement.querySelector(e);n&&this._forceFocus(n,t)}_trapFocus(e){this._isDestroyed||je(()=>{let t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||t.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,t=null;if(typeof e=="string"?t=this._document.querySelector(e):typeof e=="boolean"?t=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(t=e),this._config.restoreFocus&&t&&typeof t.focus=="function"){let n=rn(),a=this._elementRef.nativeElement;(!n||n===this._document.body||n===a||a.contains(n))&&(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e)}_containsFocus(){let e=this._elementRef.nativeElement,t=rn();return e===t||e.contains(t)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=rn()))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(t,n){if(t&1&&Ae(Fi,7),t&2){let a;P(a=F())&&(n._portalOutlet=a.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(t,n){t&2&&Z("id",n._config.id||null)("role",n._config.role)("aria-modal",n._config.ariaModal)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null)},features:[Q],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,n){t&1&&He(0,Jv,0,0,"ng-template",0)},dependencies:[Fi],styles:[`.cdk-dialog-container {
3159
3159
  display: block;
3160
3160
  width: 100%;
3161
3161
  height: 100%;
3162
3162
  min-height: inherit;
3163
3163
  max-height: inherit;
3164
3164
  }
3165
- `],encapsulation:2,changeDetection:1})}return i})(),Na=class{overlayRef;config;componentInstance=null;componentRef=null;containerInstance;disableClose;closed=new R;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(o,e){this.overlayRef=o,this.config=e,this.disableClose=e.disableClose,this.backdropClick=o.backdropClick(),this.keydownEvents=o.keydownEvents(),this.outsidePointerEvents=o.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(t=>{t.keyCode===27&&!this.disableClose&&!Ge(t)&&(t.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=o.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(o,e){if(this._canClose(o)){let t=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),t.next(o),t.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(o="",e=""){return this.overlayRef.updateSize({width:o,height:e}),this}addPanelClass(o){return this.overlayRef.addPanelClass(o),this}removePanelClass(o){return this.overlayRef.removePanelClass(o),this}_canClose(o){let e=this.config;return!!this.containerInstance&&(!e.closePredicate||e.closePredicate(o,e,this.componentInstance))}},Qv=new x("DialogScrollStrategy",{providedIn:"root",factory:()=>{let i=d(X);return()=>Ao(i)}}),Jv=new x("DialogData"),eb=new x("DefaultDialogConfig");function tb(i){let o=I(i),e=new K;return{valueSignal:o,get value(){return o()},change:e,ngOnDestroy(){e.complete()}}}var Tc=(()=>{class i{_injector=d(X);_defaultOptions=d(eb,{optional:!0});_parentDialog=d(i,{optional:!0,skipSelf:!0});_overlayContainer=d(bs);_idGenerator=d(be);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new R;_afterOpenedAtThisLevel=new R;_ariaHiddenElements=new Map;_scrollStrategy=d(Qv);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=Yi(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Se(void 0)));open(e,t){let n=this._defaultOptions||new bn;t=V(V({},n),t),t.id=t.id||this._idGenerator.getId("cdk-dialog-"),t.id&&this.getDialogById(t.id);let a=this._getOverlayConfig(t),r=qt(this._injector,a),u=new Na(r,t),h=this._attachContainer(r,u,t);if(u.containerInstance=h,!this.openDialogs.length){let g=this._overlayContainer.getContainerElement();h._focusTrapped?h._focusTrapped.pipe(ct(1)).subscribe(()=>{this._hideNonDialogContentFromAssistiveTechnology(g)}):this._hideNonDialogContentFromAssistiveTechnology(g)}return this._attachDialogContent(e,u,h,t),this.openDialogs.push(u),u.closed.subscribe(()=>this._removeOpenDialog(u,!0)),this.afterOpened.next(u),u}closeAll(){Ec(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(t=>t.id===e)}ngOnDestroy(){Ec(this._openDialogsAtThisLevel,e=>{e.config.closeOnDestroy===!1&&this._removeOpenDialog(e,!1)}),Ec(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let t=new Wt({positionStrategy:e.positionStrategy||vn().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&&(t.backdropClass=e.backdropClass),t}_attachContainer(e,t,n){let a=n.injector||n.viewContainerRef?.injector,r=[{provide:bn,useValue:n},{provide:Na,useValue:t},{provide:Mo,useValue:e}],u;n.container?typeof n.container=="function"?u=n.container:(u=n.container.type,r.push(...n.container.providers(n))):u=Ac;let h=new bi(u,n.viewContainerRef,X.create({parent:a||this._injector,providers:r}));return e.attach(h).instance}_attachDialogContent(e,t,n,a){if(e instanceof Ye){let r=this._createInjector(a,t,n,void 0),u={$implicit:a.data,dialogRef:t};a.templateContext&&(u=V(V({},u),typeof a.templateContext=="function"?a.templateContext():a.templateContext)),n.attachTemplatePortal(new Et(e,null,u,r))}else{let r=this._createInjector(a,t,n,this._injector),u=n.attachComponentPortal(new bi(e,a.viewContainerRef,r,null,a.bindings));t.componentRef=u,t.componentInstance=u.instance}}_createInjector(e,t,n,a){let r=e.injector||e.viewContainerRef?.injector,u=[{provide:Jv,useValue:e.data},{provide:Na,useValue:t}];return e.providers&&(typeof e.providers=="function"?u.push(...e.providers(t,e,n)):u.push(...e.providers)),e.direction&&(!r||!r.get(qe,null,{optional:!0}))&&u.push({provide:qe,useValue:tb(e.direction)}),X.create({parent:r||a,providers:u})}_removeOpenDialog(e,t){let n=this.openDialogs.indexOf(e);n>-1&&(this.openDialogs.splice(n,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((a,r)=>{a?r.setAttribute("aria-hidden",a):r.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),t&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(e){if(e.parentElement){let t=e.parentElement.children;for(let n=t.length-1;n>-1;n--){let a=t[n];a!==e&&a.nodeName!=="SCRIPT"&&a.nodeName!=="STYLE"&&!a.hasAttribute("aria-live")&&!a.hasAttribute("popover")&&(this._ariaHiddenElements.set(a,a.getAttribute("aria-hidden")),a.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function Ec(i,o){let e=i.length;for(;e--;)o(i[e])}var Xh=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({providers:[Tc],imports:[Nt,Oi,da,Oi]})}return i})();function ib(i,o){}var xs=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;bindings},Ic="mdc-dialog--open",Zh="mdc-dialog--opening",Qh="mdc-dialog--closing",nb=150,ob=75,ab=(()=>{class i extends Ac{_animationStateChanged=new K;_animationsEnabled=!pe();_actionSectionCount=0;_hostElement=this._elementRef.nativeElement;_enterAnimationDuration=this._animationsEnabled?ep(this._config.enterAnimationDuration)??nb:0;_exitAnimationDuration=this._animationsEnabled?ep(this._config.exitAnimationDuration)??ob:0;_animationTimer=null;_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(Jh,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Zh,Ic)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(Ic),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(Ic),this._animationsEnabled?(this._hostElement.style.setProperty(Jh,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Qh)),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(Zh,Qh)}_waitForAnimationToComplete(e,t){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(t,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 t=super.attachComponentPortal(e);return t.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),t}static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275cmp=T({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(t,n){t&2&&(dt("id",n._config.id),Z("aria-modal",n._config.ariaModal)("role",n._config.role)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null),p("_mat-animation-noopable",!n._animationsEnabled)("mat-mdc-dialog-container-with-actions",n._actionSectionCount>0))},features:[Q],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(t,n){t&1&&(s(0,"div",0)(1,"div",1),He(2,ib,0,0,"ng-template",2),l()())},dependencies:[Ri],styles:[`.mat-mdc-dialog-container {
3165
+ `],encapsulation:2,changeDetection:1})}return i})(),La=class{overlayRef;config;componentInstance=null;componentRef=null;containerInstance;disableClose;closed=new R;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(o,e){this.overlayRef=o,this.config=e,this.disableClose=e.disableClose,this.backdropClick=o.backdropClick(),this.keydownEvents=o.keydownEvents(),this.outsidePointerEvents=o.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(t=>{t.keyCode===27&&!this.disableClose&&!Ge(t)&&(t.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=o.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(o,e){if(this._canClose(o)){let t=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),t.next(o),t.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(o="",e=""){return this.overlayRef.updateSize({width:o,height:e}),this}addPanelClass(o){return this.overlayRef.addPanelClass(o),this}removePanelClass(o){return this.overlayRef.removePanelClass(o),this}_canClose(o){let e=this.config;return!!this.containerInstance&&(!e.closePredicate||e.closePredicate(o,e,this.componentInstance))}},eb=new w("DialogScrollStrategy",{providedIn:"root",factory:()=>{let i=d(X);return()=>To(i)}}),tb=new w("DialogData"),ib=new w("DefaultDialogConfig");function nb(i){let o=T(i),e=new K;return{valueSignal:o,get value(){return o()},change:e,ngOnDestroy(){e.complete()}}}var Ic=(()=>{class i{_injector=d(X);_defaultOptions=d(ib,{optional:!0});_parentDialog=d(i,{optional:!0,skipSelf:!0});_overlayContainer=d(bs);_idGenerator=d(xe);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new R;_afterOpenedAtThisLevel=new R;_ariaHiddenElements=new Map;_scrollStrategy=d(eb);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=Zi(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Me(void 0)));open(e,t){let n=this._defaultOptions||new Cn;t=V(V({},n),t),t.id=t.id||this._idGenerator.getId("cdk-dialog-"),t.id&&this.getDialogById(t.id);let a=this._getOverlayConfig(t),r=Xt(this._injector,a),u=new La(r,t),h=this._attachContainer(r,u,t);if(u.containerInstance=h,!this.openDialogs.length){let g=this._overlayContainer.getContainerElement();h._focusTrapped?h._focusTrapped.pipe(ct(1)).subscribe(()=>{this._hideNonDialogContentFromAssistiveTechnology(g)}):this._hideNonDialogContentFromAssistiveTechnology(g)}return this._attachDialogContent(e,u,h,t),this.openDialogs.push(u),u.closed.subscribe(()=>this._removeOpenDialog(u,!0)),this.afterOpened.next(u),u}closeAll(){Ac(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(t=>t.id===e)}ngOnDestroy(){Ac(this._openDialogsAtThisLevel,e=>{e.config.closeOnDestroy===!1&&this._removeOpenDialog(e,!1)}),Ac(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let t=new Yt({positionStrategy:e.positionStrategy||yn().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&&(t.backdropClass=e.backdropClass),t}_attachContainer(e,t,n){let a=n.injector||n.viewContainerRef?.injector,r=[{provide:Cn,useValue:n},{provide:La,useValue:t},{provide:Eo,useValue:e}],u;n.container?typeof n.container=="function"?u=n.container:(u=n.container.type,r.push(...n.container.providers(n))):u=Tc;let h=new xi(u,n.viewContainerRef,X.create({parent:a||this._injector,providers:r}));return e.attach(h).instance}_attachDialogContent(e,t,n,a){if(e instanceof Ze){let r=this._createInjector(a,t,n,void 0),u={$implicit:a.data,dialogRef:t};a.templateContext&&(u=V(V({},u),typeof a.templateContext=="function"?a.templateContext():a.templateContext)),n.attachTemplatePortal(new It(e,null,u,r))}else{let r=this._createInjector(a,t,n,this._injector),u=n.attachComponentPortal(new xi(e,a.viewContainerRef,r,null,a.bindings));t.componentRef=u,t.componentInstance=u.instance}}_createInjector(e,t,n,a){let r=e.injector||e.viewContainerRef?.injector,u=[{provide:tb,useValue:e.data},{provide:La,useValue:t}];return e.providers&&(typeof e.providers=="function"?u.push(...e.providers(t,e,n)):u.push(...e.providers)),e.direction&&(!r||!r.get(qe,null,{optional:!0}))&&u.push({provide:qe,useValue:nb(e.direction)}),X.create({parent:r||a,providers:u})}_removeOpenDialog(e,t){let n=this.openDialogs.indexOf(e);n>-1&&(this.openDialogs.splice(n,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((a,r)=>{a?r.setAttribute("aria-hidden",a):r.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),t&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(e){if(e.parentElement){let t=e.parentElement.children;for(let n=t.length-1;n>-1;n--){let a=t[n];a!==e&&a.nodeName!=="SCRIPT"&&a.nodeName!=="STYLE"&&!a.hasAttribute("aria-live")&&!a.hasAttribute("popover")&&(this._ariaHiddenElements.set(a,a.getAttribute("aria-hidden")),a.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();function Ac(i,o){let e=i.length;for(;e--;)o(i[e])}var Zh=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({providers:[Ic],imports:[Vt,Ni,ma,Ni]})}return i})();function ob(i,o){}var xs=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;bindings},Rc="mdc-dialog--open",Qh="mdc-dialog--opening",Jh="mdc-dialog--closing",ab=150,rb=75,sb=(()=>{class i extends Tc{_animationStateChanged=new K;_animationsEnabled=!_e();_actionSectionCount=0;_hostElement=this._elementRef.nativeElement;_enterAnimationDuration=this._animationsEnabled?tp(this._config.enterAnimationDuration)??ab:0;_exitAnimationDuration=this._animationsEnabled?tp(this._config.exitAnimationDuration)??rb:0;_animationTimer=null;_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(ep,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Qh,Rc)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(Rc),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(Rc),this._animationsEnabled?(this._hostElement.style.setProperty(ep,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Jh)),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(Qh,Jh)}_waitForAnimationToComplete(e,t){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(t,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 t=super.attachComponentPortal(e);return t.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),t}static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275cmp=I({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(t,n){t&2&&(dt("id",n._config.id),Z("aria-modal",n._config.ariaModal)("role",n._config.role)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null),p("_mat-animation-noopable",!n._animationsEnabled)("mat-mdc-dialog-container-with-actions",n._actionSectionCount>0))},features:[Q],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(t,n){t&1&&(s(0,"div",0)(1,"div",1),He(2,ob,0,0,"ng-template",2),l()())},dependencies:[Fi],styles:[`.mat-mdc-dialog-container {
3166
3166
  width: 100%;
3167
3167
  height: 100%;
3168
3168
  display: block;
@@ -3351,7 +3351,7 @@ input.mat-mdc-chip-input {
3351
3351
  .mat-mdc-dialog-component-host {
3352
3352
  display: contents;
3353
3353
  }
3354
- `],encapsulation:2,changeDetection:1})}return i})(),Jh="--mat-dialog-transition-duration";function ep(i){return i==null?null:typeof i=="number"?i:i.endsWith("ms")?Ht(i.substring(0,i.length-2)):i.endsWith("s")?Ht(i.substring(0,i.length-1))*1e3:i==="0"?0:null}var Cs=(function(i){return i[i.OPEN=0]="OPEN",i[i.CLOSING=1]="CLOSING",i[i.CLOSED=2]="CLOSED",i})(Cs||{}),gt=class{_ref;_config;_containerInstance;componentInstance;componentRef=null;disableClose;id;_afterOpened=new qa(1);_beforeClosed=new qa(1);_result;_closeFallbackTimeout;_state=Cs.OPEN;_closeInteractionType;constructor(o,e,t){this._ref=o,this._config=e,this._containerInstance=t,this.disableClose=e.disableClose,this.id=o.id,o.addPanelClass("mat-mdc-dialog-panel"),t._animationStateChanged.pipe(we(n=>n.state==="opened"),ct(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),t._animationStateChanged.pipe(we(n=>n.state==="closed"),ct(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),o.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),$e(this.backdropClick(),this.keydownEvents().pipe(we(n=>n.keyCode===27&&!this.disableClose&&!Ge(n)))).subscribe(n=>{this.disableClose||(n.preventDefault(),rb(this,n.type==="keydown"?"keyboard":"mouse"))})}close(o){let e=this._config.closePredicate;e&&!e(o,this._config,this.componentInstance)||(this._result=o,this._containerInstance._animationStateChanged.pipe(we(t=>t.state==="closing"),ct(1)).subscribe(t=>{this._beforeClosed.next(o),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=Cs.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(o){let e=this._ref.config.positionStrategy;return o&&(o.left||o.right)?o.left?e.left(o.left):e.right(o.right):e.centerHorizontally(),o&&(o.top||o.bottom)?o.top?e.top(o.top):e.bottom(o.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(o="",e=""){return this._ref.updateSize(o,e),this}addPanelClass(o){return this._ref.addPanelClass(o),this}removePanelClass(o){return this._ref.removePanelClass(o),this}getState(){return this._state}_finishDialogClose(){this._state=Cs.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function rb(i,o,e){return i._closeInteractionType=o,i.close(e)}var Wn=new x("MatMdcDialogData"),sb=new x("mat-mdc-dialog-default-options"),lb=new x("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let i=d(X);return()=>Ao(i)}}),To=(()=>{class i{_defaultOptions=d(sb,{optional:!0});_scrollStrategy=d(lb);_parentDialog=d(i,{optional:!0,skipSelf:!0});_idGenerator=d(be);_injector=d(X);_dialog=d(Tc);_animationsDisabled=pe();_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new R;_afterOpenedAtThisLevel=new R;dialogConfigClass=xs;_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=Yi(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Se(void 0)));constructor(){this._dialogRefConstructor=gt,this._dialogContainerType=ab,this._dialogDataToken=Wn}open(e,t){let n;t=V(V({},this._defaultOptions||new xs),t),t.id=t.id||this._idGenerator.getId("mat-mdc-dialog-"),t.scrollStrategy=t.scrollStrategy||this._scrollStrategy();let a=this._dialog.open(e,Oe(V({},t),{positionStrategy:vn(this._injector).centerHorizontally().centerVertically(),disableClose:!0,closePredicate:void 0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,disableAnimations:this._animationsDisabled||t.enterAnimationDuration?.toLocaleString()==="0"||t.exitAnimationDuration?.toString()==="0",container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:t},{provide:bn,useValue:t}]},templateContext:()=>({dialogRef:n}),providers:(r,u,h)=>(n=new this._dialogRefConstructor(r,t,h),n.updatePosition(t?.position),[{provide:this._dialogContainerType,useValue:h},{provide:this._dialogDataToken,useValue:u.data},{provide:this._dialogRefConstructor,useValue:n}])}));return n.componentRef=a.componentRef,n.componentInstance=a.componentInstance,this.openDialogs.push(n),this.afterOpened.next(n),n.afterClosed().subscribe(()=>{let r=this.openDialogs.indexOf(n);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||this._getAfterAllClosed().next())}),n}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(t=>t.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let t=e.length;for(;t--;)e[t].close()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var tp=(()=>{class i{_dialogRef=d(gt,{optional:!0});_elementRef=d(N);_dialog=d(To);ngOnInit(){this._dialogRef||(this._dialogRef=cb(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i})}return i})(),oi=(()=>{class i extends tp{id=d(be).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(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(t,n){t&2&&dt("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],features:[Q]})}return i})(),ai=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],features:[ud([uc])]})}return i})(),ri=(()=>{class i extends tp{align;_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(t,n){t&2&&p("mat-mdc-dialog-actions-align-start",n.align==="start")("mat-mdc-dialog-actions-align-center",n.align==="center")("mat-mdc-dialog-actions-align-end",n.align==="end")},inputs:{align:"align"},features:[Q]})}return i})();function cb(i,o){let e=i.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?o.find(t=>t.id===e.id):null}var Lt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({providers:[To],imports:[Xh,Nt,Oi,ee]})}return i})();var db=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],mb=["mat-icon, [matMenuItemIcon]","*"];function ub(i,o){i&1&&(wi(),s(0,"svg",2),_(1,"polygon",3),l())}var hb=["*"];function pb(i,o){if(i&1){let e=Ve();Ie(0,"div",0),ar("click",function(){Ce(e);let n=w();return xe(n.closed.emit("click"))})("animationstart",function(n){Ce(e);let a=w();return xe(a._onAnimationStart(n.animationName))})("animationend",function(n){Ce(e);let a=w();return xe(a._onAnimationDone(n.animationName))})("animationcancel",function(n){Ce(e);let a=w();return xe(a._onAnimationDone(n.animationName))}),Ie(1,"div",1),U(2),Ue()()}if(i&2){let e=w();et(e._classList),p("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating()),dt("id",e.panelId),Z("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var Oc=new x("MAT_MENU_PANEL"),qn=(()=>{class i{_elementRef=d(N);_document=d(q);_focusMonitor=d(Rt);_parentMenu=d(Oc,{optional:!0});_changeDetectorRef=d(te);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new R;_focused=new R;_highlighted=!1;_triggersSubmenu=!1;constructor(){d(Le).load(Mt),this._parentMenu?.addItem?.(this)}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,t):this._getHostElement().focus(t),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),t=e.querySelectorAll("mat-icon, .material-icons");for(let n=0;n<t.length;n++)t[n].remove();return e.textContent?.trim()||""}_setHighlighted(e){this._highlighted=e,this._changeDetectorRef.markForCheck()}_setTriggersSubmenu(e){this._triggersSubmenu=e,this._changeDetectorRef.markForCheck()}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-focus-indicator"],hostVars:8,hostBindings:function(t,n){t&1&&A("click",function(r){return n._checkDisabled(r)})("mouseenter",function(){return n._handleMouseEnter()}),t&2&&(Z("role",n.role)("tabindex",n._getTabIndex())("aria-disabled",n.disabled)("disabled",n.disabled||null),p("mat-mdc-menu-item-highlighted",n._highlighted)("mat-mdc-menu-item-submenu-trigger",n._triggersSubmenu))},inputs:{role:"role",disabled:[2,"disabled","disabled",L],disableRipple:[2,"disableRipple","disableRipple",L]},exportAs:["matMenuItem"],ngContentSelectors:mb,decls:5,vars:3,consts:[[1,"mat-mdc-menu-item-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["viewBox","0 0 5 10","focusable","false","aria-hidden","true",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(t,n){t&1&&(ce(db),U(0),s(1,"span",0),U(2,1),l(),_(3,"div",1),M(4,ub,2,0,":svg:svg",2)),t&2&&(c(3),C("matRippleDisabled",n.disableRipple||n.disabled)("matRippleTrigger",n._getHostElement()),c(),E(n._triggersSubmenu?4:-1))},dependencies:[So],encapsulation:2})}return i})();var fb=new x("MatMenuContent");var gb=new x("mat-menu-default-options",{providedIn:"root",factory:()=>({overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"})}),Rc="_mat-menu-enter",ws="_mat-menu-exit",yn=(()=>{class i{_elementRef=d(N);_changeDetectorRef=d(te);_injector=d(X);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=pe();_allItems;_directDescendantItems=new Zi;_classList={};_panelAnimationState="void";_animationDone=new R;_isAnimating=I(!1);parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger=!1;hasBackdrop;get panelClass(){return this._previousPanelClass}set panelClass(e){let t=this._previousPanelClass,n=V({},this._classList);t&&t.length&&t.split(" ").forEach(a=>{n[a]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(a=>{n[a]=!0}),this._elementRef.nativeElement.className=""),this._classList=n}_previousPanelClass="";get classList(){return this.panelClass}set classList(e){this.panelClass=e}closed=new K;close=this.closed;panelId=d(be).getId("mat-menu-panel-");constructor(){let e=d(gb);this.overlayPanelClass=e.overlayPanelClass||"",this._xPosition=e.xPosition,this._yPosition=e.yPosition,this.backdropClass=e.backdropClass,this.overlapTrigger=e.overlapTrigger,this.hasBackdrop=e.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new cn(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Se(this._directDescendantItems),We(e=>$e(...e.map(t=>t._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let t=this._keyManager;if(this._panelAnimationState==="enter"&&t.activeItem?._hasFocus()){let n=e.toArray(),a=Math.max(0,Math.min(n.length-1,t.activeItemIndex||0));n[a]&&!n[a].disabled?t.setActiveItem(a):t.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(Se(this._directDescendantItems),We(t=>$e(...t.map(n=>n._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let t=e.keyCode,n=this._keyManager;switch(t){case 27:Ge(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(t===38||t===40)&&n.setFocusOrigin("keyboard"),n.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=je(()=>{let t=this._resolvePanel();if(!t||!t.contains(document.activeElement)){let n=this._keyManager;n.setFocusOrigin(e).setFirstItemActive(),!n.activeItem&&t&&t.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){}setPositionClasses(e=this.xPosition,t=this.yPosition){this._classList=Oe(V({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":t==="above","mat-menu-below":t==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(e){let t=e===ws;(t||e===Rc)&&(t&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(t?"void":"enter"),this._isAnimating.set(!1))}_onAnimationStart(e){(e===Rc||e===ws)&&this._isAnimating.set(!0)}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let t=this._resolvePanel();t&&(t.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(ws),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?Rc:ws)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(Se(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(t=>t._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let e=null;return this._directDescendantItems.length&&(e=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),e}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["mat-menu"]],contentQueries:function(t,n,a){if(t&1&&at(a,fb,5)(a,qn,5)(a,qn,4),t&2){let r;P(r=F())&&(n.lazyContent=r.first),P(r=F())&&(n._allItems=r),P(r=F())&&(n.items=r)}},viewQuery:function(t,n){if(t&1&&Me(Ye,5),t&2){let a;P(a=F())&&(n.templateRef=a.first)}},hostVars:3,hostBindings:function(t,n){t&2&&Z("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",L],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:L(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[J([{provide:Oc,useExisting:i}])],ngContentSelectors:hb,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(t,n){t&1&&(ce(),or(0,pb,3,12,"ng-template"))},styles:[`mat-menu {
3354
+ `],encapsulation:2,changeDetection:1})}return i})(),ep="--mat-dialog-transition-duration";function tp(i){return i==null?null:typeof i=="number"?i:i.endsWith("ms")?$t(i.substring(0,i.length-2)):i.endsWith("s")?$t(i.substring(0,i.length-1))*1e3:i==="0"?0:null}var Cs=(function(i){return i[i.OPEN=0]="OPEN",i[i.CLOSING=1]="CLOSING",i[i.CLOSED=2]="CLOSED",i})(Cs||{}),ut=class{_ref;_config;_containerInstance;componentInstance;componentRef=null;disableClose;id;_afterOpened=new Ka(1);_beforeClosed=new Ka(1);_result;_closeFallbackTimeout;_state=Cs.OPEN;_closeInteractionType;constructor(o,e,t){this._ref=o,this._config=e,this._containerInstance=t,this.disableClose=e.disableClose,this.id=o.id,o.addPanelClass("mat-mdc-dialog-panel"),t._animationStateChanged.pipe(De(n=>n.state==="opened"),ct(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),t._animationStateChanged.pipe(De(n=>n.state==="closed"),ct(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),o.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),$e(this.backdropClick(),this.keydownEvents().pipe(De(n=>n.keyCode===27&&!this.disableClose&&!Ge(n)))).subscribe(n=>{this.disableClose||(n.preventDefault(),lb(this,n.type==="keydown"?"keyboard":"mouse"))})}close(o){let e=this._config.closePredicate;e&&!e(o,this._config,this.componentInstance)||(this._result=o,this._containerInstance._animationStateChanged.pipe(De(t=>t.state==="closing"),ct(1)).subscribe(t=>{this._beforeClosed.next(o),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=Cs.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(o){let e=this._ref.config.positionStrategy;return o&&(o.left||o.right)?o.left?e.left(o.left):e.right(o.right):e.centerHorizontally(),o&&(o.top||o.bottom)?o.top?e.top(o.top):e.bottom(o.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(o="",e=""){return this._ref.updateSize(o,e),this}addPanelClass(o){return this._ref.addPanelClass(o),this}removePanelClass(o){return this._ref.removePanelClass(o),this}getState(){return this._state}_finishDialogClose(){this._state=Cs.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function lb(i,o,e){return i._closeInteractionType=o,i.close(e)}var Wn=new w("MatMdcDialogData"),cb=new w("mat-mdc-dialog-default-options"),db=new w("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let i=d(X);return()=>To(i)}}),Io=(()=>{class i{_defaultOptions=d(cb,{optional:!0});_scrollStrategy=d(db);_parentDialog=d(i,{optional:!0,skipSelf:!0});_idGenerator=d(xe);_injector=d(X);_dialog=d(Ic);_animationsDisabled=_e();_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new R;_afterOpenedAtThisLevel=new R;dialogConfigClass=xs;_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=Zi(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Me(void 0)));constructor(){this._dialogRefConstructor=ut,this._dialogContainerType=sb,this._dialogDataToken=Wn}open(e,t){let n;t=V(V({},this._defaultOptions||new xs),t),t.id=t.id||this._idGenerator.getId("mat-mdc-dialog-"),t.scrollStrategy=t.scrollStrategy||this._scrollStrategy();let a=this._dialog.open(e,Fe(V({},t),{positionStrategy:yn(this._injector).centerHorizontally().centerVertically(),disableClose:!0,closePredicate:void 0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,disableAnimations:this._animationsDisabled||t.enterAnimationDuration?.toLocaleString()==="0"||t.exitAnimationDuration?.toString()==="0",container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:t},{provide:Cn,useValue:t}]},templateContext:()=>({dialogRef:n}),providers:(r,u,h)=>(n=new this._dialogRefConstructor(r,t,h),n.updatePosition(t?.position),[{provide:this._dialogContainerType,useValue:h},{provide:this._dialogDataToken,useValue:u.data},{provide:this._dialogRefConstructor,useValue:n}])}));return n.componentRef=a.componentRef,n.componentInstance=a.componentInstance,this.openDialogs.push(n),this.afterOpened.next(n),n.afterClosed().subscribe(()=>{let r=this.openDialogs.indexOf(n);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||this._getAfterAllClosed().next())}),n}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(t=>t.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let t=e.length;for(;t--;)e[t].close()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var ip=(()=>{class i{_dialogRef=d(ut,{optional:!0});_elementRef=d(N);_dialog=d(Io);ngOnInit(){this._dialogRef||(this._dialogRef=mb(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i})}return i})(),Bt=(()=>{class i extends ip{id=d(xe).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(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(t,n){t&2&&dt("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],features:[Q]})}return i})(),si=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],features:[hd([hc])]})}return i})(),zt=(()=>{class i extends ip{align;_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(t,n){t&2&&p("mat-mdc-dialog-actions-align-start",n.align==="start")("mat-mdc-dialog-actions-align-center",n.align==="center")("mat-mdc-dialog-actions-align-end",n.align==="end")},inputs:{align:"align"},features:[Q]})}return i})();function mb(i,o){let e=i.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?o.find(t=>t.id===e.id):null}var bt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({providers:[Io],imports:[Zh,Vt,Ni,te]})}return i})();var ub=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],hb=["mat-icon, [matMenuItemIcon]","*"];function pb(i,o){i&1&&(ki(),s(0,"svg",2),_(1,"polygon",3),l())}var fb=["*"];function gb(i,o){if(i&1){let e=Se();Re(0,"div",0),rr("click",function(){de(e);let n=C();return me(n.closed.emit("click"))})("animationstart",function(n){de(e);let a=C();return me(a._onAnimationStart(n.animationName))})("animationend",function(n){de(e);let a=C();return me(a._onAnimationDone(n.animationName))})("animationcancel",function(n){de(e);let a=C();return me(a._onAnimationDone(n.animationName))}),Re(1,"div",1),G(2),Ue()()}if(i&2){let e=C();tt(e._classList),p("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating()),dt("id",e.panelId),Z("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var Pc=new w("MAT_MENU_PANEL"),Kn=(()=>{class i{_elementRef=d(N);_document=d(q);_focusMonitor=d(Nt);_parentMenu=d(Pc,{optional:!0});_changeDetectorRef=d(ie);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new R;_focused=new R;_highlighted=!1;_triggersSubmenu=!1;constructor(){d(Be).load(Tt),this._parentMenu?.addItem?.(this)}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,t):this._getHostElement().focus(t),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),t=e.querySelectorAll("mat-icon, .material-icons");for(let n=0;n<t.length;n++)t[n].remove();return e.textContent?.trim()||""}_setHighlighted(e){this._highlighted=e,this._changeDetectorRef.markForCheck()}_setTriggersSubmenu(e){this._triggersSubmenu=e,this._changeDetectorRef.markForCheck()}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-focus-indicator"],hostVars:8,hostBindings:function(t,n){t&1&&E("click",function(r){return n._checkDisabled(r)})("mouseenter",function(){return n._handleMouseEnter()}),t&2&&(Z("role",n.role)("tabindex",n._getTabIndex())("aria-disabled",n.disabled)("disabled",n.disabled||null),p("mat-mdc-menu-item-highlighted",n._highlighted)("mat-mdc-menu-item-submenu-trigger",n._triggersSubmenu))},inputs:{role:"role",disabled:[2,"disabled","disabled",L],disableRipple:[2,"disableRipple","disableRipple",L]},exportAs:["matMenuItem"],ngContentSelectors:hb,decls:5,vars:3,consts:[[1,"mat-mdc-menu-item-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["viewBox","0 0 5 10","focusable","false","aria-hidden","true",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(t,n){t&1&&(fe(ub),G(0),s(1,"span",0),G(2,1),l(),_(3,"div",1),k(4,pb,2,0,":svg:svg",2)),t&2&&(c(3),x("matRippleDisabled",n.disableRipple||n.disabled)("matRippleTrigger",n._getHostElement()),c(),M(n._triggersSubmenu?4:-1))},dependencies:[ko],encapsulation:2})}return i})();var _b=new w("MatMenuContent");var vb=new w("mat-menu-default-options",{providedIn:"root",factory:()=>({overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"})}),Oc="_mat-menu-enter",ws="_mat-menu-exit",xn=(()=>{class i{_elementRef=d(N);_changeDetectorRef=d(ie);_injector=d(X);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=_e();_allItems;_directDescendantItems=new Ji;_classList={};_panelAnimationState="void";_animationDone=new R;_isAnimating=T(!1);parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger=!1;hasBackdrop;get panelClass(){return this._previousPanelClass}set panelClass(e){let t=this._previousPanelClass,n=V({},this._classList);t&&t.length&&t.split(" ").forEach(a=>{n[a]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(a=>{n[a]=!0}),this._elementRef.nativeElement.className=""),this._classList=n}_previousPanelClass="";get classList(){return this.panelClass}set classList(e){this.panelClass=e}closed=new K;close=this.closed;panelId=d(xe).getId("mat-menu-panel-");constructor(){let e=d(vb);this.overlayPanelClass=e.overlayPanelClass||"",this._xPosition=e.xPosition,this._yPosition=e.yPosition,this.backdropClass=e.backdropClass,this.overlapTrigger=e.overlapTrigger,this.hasBackdrop=e.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new dn(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Me(this._directDescendantItems),We(e=>$e(...e.map(t=>t._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let t=this._keyManager;if(this._panelAnimationState==="enter"&&t.activeItem?._hasFocus()){let n=e.toArray(),a=Math.max(0,Math.min(n.length-1,t.activeItemIndex||0));n[a]&&!n[a].disabled?t.setActiveItem(a):t.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(Me(this._directDescendantItems),We(t=>$e(...t.map(n=>n._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let t=e.keyCode,n=this._keyManager;switch(t){case 27:Ge(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(t===38||t===40)&&n.setFocusOrigin("keyboard"),n.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=je(()=>{let t=this._resolvePanel();if(!t||!t.contains(document.activeElement)){let n=this._keyManager;n.setFocusOrigin(e).setFirstItemActive(),!n.activeItem&&t&&t.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){}setPositionClasses(e=this.xPosition,t=this.yPosition){this._classList=Fe(V({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":t==="above","mat-menu-below":t==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(e){let t=e===ws;(t||e===Oc)&&(t&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(t?"void":"enter"),this._isAnimating.set(!1))}_onAnimationStart(e){(e===Oc||e===ws)&&this._isAnimating.set(!0)}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let t=this._resolvePanel();t&&(t.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(ws),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?Oc:ws)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(Me(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(t=>t._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let e=null;return this._directDescendantItems.length&&(e=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),e}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["mat-menu"]],contentQueries:function(t,n,a){if(t&1&&at(a,_b,5)(a,Kn,5)(a,Kn,4),t&2){let r;P(r=F())&&(n.lazyContent=r.first),P(r=F())&&(n._allItems=r),P(r=F())&&(n.items=r)}},viewQuery:function(t,n){if(t&1&&Ae(Ze,5),t&2){let a;P(a=F())&&(n.templateRef=a.first)}},hostVars:3,hostBindings:function(t,n){t&2&&Z("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",L],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:L(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[ee([{provide:Pc,useExisting:i}])],ngContentSelectors:fb,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(t,n){t&1&&(fe(),ar(0,gb,3,12,"ng-template"))},styles:[`mat-menu {
3355
3355
  display: none;
3356
3356
  }
3357
3357
 
@@ -3543,15 +3543,15 @@ input.mat-mdc-chip-input {
3543
3543
  position: absolute;
3544
3544
  pointer-events: none;
3545
3545
  }
3546
- `],encapsulation:2})}return i})(),_b=new x("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let i=d(X);return()=>yi(i)}});var Ro=new WeakMap,vb=(()=>{class i{_canHaveBackdrop;_element=d(N);_viewContainerRef=d(Xe);_menuItemInstance=d(qn,{optional:!0,self:!0});_dir=d(qe,{optional:!0});_focusMonitor=d(Rt);_ngZone=d(H);_injector=d(X);_scrollStrategy=d(_b);_changeDetectorRef=d(te);_animationsDisabled=pe();_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=De.EMPTY;_menuCloseSubscription=De.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_openedBy=void 0;get _menu(){return this._menuInternal}set _menu(e){e!==this._menuInternal&&(this._menuInternal=e,this._menuCloseSubscription.unsubscribe(),e?(this._parentMaterialMenu,this._menuCloseSubscription=e.close.subscribe(t=>{this._destroyMenu(t),(t==="click"||t==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(t)})):this._destroyMenu(),this._menuItemInstance?._setTriggersSubmenu(this._triggersSubmenu()))}_menuInternal=null;constructor(e){this._canHaveBackdrop=e;let t=d(Oc,{optional:!0});this._parentMaterialMenu=t instanceof yn?t:void 0}ngOnDestroy(){this._menu&&this._ownsMenu(this._menu)&&Ro.delete(this._menu),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this._menu)}_closeMenu(){this._menu?.close.emit()}_openMenu(e){if(this._triggerIsAriaDisabled())return;let t=this._menu;if(this._menuOpen||!t)return;this._pendingRemoval?.unsubscribe();let n=Ro.get(t);Ro.set(t,this),n&&n!==this&&n._closeMenu();let a=this._createOverlay(t),r=a.getConfig(),u=r.positionStrategy;this._setPosition(t,u),this._canHaveBackdrop?r.hasBackdrop=t.hasBackdrop==null?!this._triggersSubmenu():t.hasBackdrop:r.hasBackdrop=t.hasBackdrop??!1,a.hasAttached()||(a.attach(this._getPortal(t)),t.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this._closeMenu()),t.parentMenu=this._triggersSubmenu()?this._parentMaterialMenu:void 0,t.direction=this.dir,e&&t.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),t instanceof yn&&(t._setIsOpen(!0),t._directDescendantItems.changes.pipe(ae(t.close)).subscribe(()=>{u.withLockedPosition(!1).reapplyLastPosition(),u.withLockedPosition(!0)}))}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}_destroyMenu(e){let t=this._overlayRef,n=this._menu;!t||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),n instanceof yn&&this._ownsMenu(n)?(this._pendingRemoval=n._animationDone.pipe(ct(1)).subscribe(()=>{t.detach(),Ro.has(n)||n.lazyContent?.detach()}),n._setIsOpen(!1)):(t.detach(),n?.lazyContent?.detach()),n&&this._ownsMenu(n)&&Ro.delete(n),this.restoreFocus&&(e==="keydown"||!this._openedBy||!this._triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this._triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let t=this._getOverlayConfig(e);this._subscribeToPositions(e,t.positionStrategy),this._overlayRef=qt(this._injector,t),this._overlayRef.keydownEvents().subscribe(n=>{this._menu instanceof yn&&this._menu._handleKeydown(n)})}return this._overlayRef}_getOverlayConfig(e){return new Wt({positionStrategy:$i(this._injector,this._getOverlayOrigin()).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr",disableAnimations:this._animationsDisabled})}_subscribeToPositions(e,t){e.setPositionClasses&&t.positionChanges.subscribe(n=>{this._ngZone.run(()=>{let a=n.connectionPair.overlayX==="start"?"after":"before",r=n.connectionPair.overlayY==="top"?"below":"above";e.setPositionClasses(a,r)})})}_setPosition(e,t){let[n,a]=e.xPosition==="before"?["end","start"]:["start","end"],[r,u]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[h,g]=[r,u],[v,D]=[n,a],B=0;if(this._triggersSubmenu()){if(D=n=e.xPosition==="before"?"start":"end",a=v=n==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let $=this._parentMaterialMenu.items.first;this._parentInnerPadding=$?$._getHostElement().offsetTop:0}B=r==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(h=r==="top"?"bottom":"top",g=u==="top"?"bottom":"top");t.withPositions([{originX:n,originY:h,overlayX:v,overlayY:r,offsetY:B},{originX:a,originY:h,overlayX:D,overlayY:r,offsetY:B},{originX:n,originY:g,overlayX:v,overlayY:u,offsetY:-B},{originX:a,originY:g,overlayX:D,overlayY:u,offsetY:-B}])}_menuClosingActions(){let e=this._getOutsideClickStream(this._overlayRef),t=this._overlayRef.detachments(),n=this._parentMaterialMenu?this._parentMaterialMenu.closed:ge(),a=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(we(r=>this._menuOpen&&r!==this._menuItemInstance)):ge();return $e(e,n,a,t)}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Et(e.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(e){return Ro.get(e)===this}_triggerIsAriaDisabled(){return L(this._element.nativeElement.getAttribute("aria-disabled"))}static \u0275fac=function(t){ir()};static \u0275dir=S({type:i})}return i})(),Ds=(()=>{class i extends vb{_cleanupTouchstart;_hoverSubscription=De.EMPTY;get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){this._menu=e}menuData;restoreFocus=!0;menuOpened=new K;onMenuOpen=this.menuOpened;menuClosed=new K;onMenuClose=this.menuClosed;constructor(){super(!0);let e=d(ve);this._cleanupTouchstart=e.listen(this._element.nativeElement,"touchstart",t=>{Nn(t)||(this._openedBy="touch")},{passive:!0})}triggersSubmenu(){return super._triggersSubmenu()}toggleMenu(){return this.menuOpen?this.closeMenu():this.openMenu()}openMenu(){this._openMenu(!0)}closeMenu(){this._closeMenu()}updatePosition(){this._overlayRef?.updatePosition()}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTouchstart(),this._hoverSubscription.unsubscribe()}_getOverlayOrigin(){return this._element}_getOutsideClickStream(e){return e.backdropClick()}_handleMousedown(e){Fn(e)||(this._openedBy=e.button===0?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let t=e.keyCode;(t===13||t===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(t===39&&this.dir==="ltr"||t===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(e=>{e===this._menuItemInstance&&!e.disabled&&this._parentMaterialMenu?._panelAnimationState!=="void"&&(this._openedBy="mouse",this._openMenu(!1))}))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(t,n){t&1&&A("click",function(r){return n._handleClick(r)})("mousedown",function(r){return n._handleMousedown(r)})("keydown",function(r){return n._handleKeydown(r)}),t&2&&Z("aria-haspopup",n.menu?"menu":null)("aria-expanded",n.menuOpen)("aria-controls",n.menuOpen?n.menu?.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],features:[Q]})}return i})();var Ss=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[Ti,Nt,ee,_i]})}return i})();function bb(i,o){if(i&1){let e=Ve();s(0,"div",1)(1,"button",2),A("click",function(){Ce(e);let n=w();return xe(n.action())}),m(2),l()()}if(i&2){let e=w();c(2),he(" ",e.data.action," ")}}var yb=["label"];function Cb(i,o){}var xb=Math.pow(2,31)-1,La=class{_overlayRef;instance;containerInstance;_afterDismissed=new R;_afterOpened=new R;_onAction=new R;_durationTimeoutId;_dismissedByAction=!1;constructor(o,e){this._overlayRef=e,this.containerInstance=o,o._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(o){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(o,xb))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},np=new x("MatSnackBarData"),Oo=class{politeness="polite";announcementMessage="";viewContainerRef;duration=0;panelClass;direction;data=null;horizontalPosition="center";verticalPosition="bottom"},wb=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]})}return i})(),Db=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]})}return i})(),Sb=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]})}return i})(),kb=(()=>{class i{snackBarRef=d(La);data=d(np);action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["matButton","","matSnackBarAction","",3,"click"]],template:function(t,n){t&1&&(s(0,"div",0),m(1),l(),M(2,bb,3,1,"div",1)),t&2&&(c(),he(" ",n.data.message,`
3547
- `),c(),E(n.hasAction?2:-1))},dependencies:[it,wb,Db,Sb],styles:[`.mat-mdc-simple-snack-bar {
3546
+ `],encapsulation:2})}return i})(),bb=new w("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let i=d(X);return()=>wi(i)}});var Ro=new WeakMap,yb=(()=>{class i{_canHaveBackdrop;_element=d(N);_viewContainerRef=d(Qe);_menuItemInstance=d(Kn,{optional:!0,self:!0});_dir=d(qe,{optional:!0});_focusMonitor=d(Nt);_ngZone=d(U);_injector=d(X);_scrollStrategy=d(bb);_changeDetectorRef=d(ie);_animationsDisabled=_e();_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=ke.EMPTY;_menuCloseSubscription=ke.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_openedBy=void 0;get _menu(){return this._menuInternal}set _menu(e){e!==this._menuInternal&&(this._menuInternal=e,this._menuCloseSubscription.unsubscribe(),e?(this._parentMaterialMenu,this._menuCloseSubscription=e.close.subscribe(t=>{this._destroyMenu(t),(t==="click"||t==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(t)})):this._destroyMenu(),this._menuItemInstance?._setTriggersSubmenu(this._triggersSubmenu()))}_menuInternal=null;constructor(e){this._canHaveBackdrop=e;let t=d(Pc,{optional:!0});this._parentMaterialMenu=t instanceof xn?t:void 0}ngOnDestroy(){this._menu&&this._ownsMenu(this._menu)&&Ro.delete(this._menu),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this._menu)}_closeMenu(){this._menu?.close.emit()}_openMenu(e){if(this._triggerIsAriaDisabled())return;let t=this._menu;if(this._menuOpen||!t)return;this._pendingRemoval?.unsubscribe();let n=Ro.get(t);Ro.set(t,this),n&&n!==this&&n._closeMenu();let a=this._createOverlay(t),r=a.getConfig(),u=r.positionStrategy;this._setPosition(t,u),this._canHaveBackdrop?r.hasBackdrop=t.hasBackdrop==null?!this._triggersSubmenu():t.hasBackdrop:r.hasBackdrop=t.hasBackdrop??!1,a.hasAttached()||(a.attach(this._getPortal(t)),t.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this._closeMenu()),t.parentMenu=this._triggersSubmenu()?this._parentMaterialMenu:void 0,t.direction=this.dir,e&&t.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),t instanceof xn&&(t._setIsOpen(!0),t._directDescendantItems.changes.pipe(re(t.close)).subscribe(()=>{u.withLockedPosition(!1).reapplyLastPosition(),u.withLockedPosition(!0)}))}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}_destroyMenu(e){let t=this._overlayRef,n=this._menu;!t||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),n instanceof xn&&this._ownsMenu(n)?(this._pendingRemoval=n._animationDone.pipe(ct(1)).subscribe(()=>{t.detach(),Ro.has(n)||n.lazyContent?.detach()}),n._setIsOpen(!1)):(t.detach(),n?.lazyContent?.detach()),n&&this._ownsMenu(n)&&Ro.delete(n),this.restoreFocus&&(e==="keydown"||!this._openedBy||!this._triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this._triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let t=this._getOverlayConfig(e);this._subscribeToPositions(e,t.positionStrategy),this._overlayRef=Xt(this._injector,t),this._overlayRef.keydownEvents().subscribe(n=>{this._menu instanceof xn&&this._menu._handleKeydown(n)})}return this._overlayRef}_getOverlayConfig(e){return new Yt({positionStrategy:qi(this._injector,this._getOverlayOrigin()).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr",disableAnimations:this._animationsDisabled})}_subscribeToPositions(e,t){e.setPositionClasses&&t.positionChanges.subscribe(n=>{this._ngZone.run(()=>{let a=n.connectionPair.overlayX==="start"?"after":"before",r=n.connectionPair.overlayY==="top"?"below":"above";e.setPositionClasses(a,r)})})}_setPosition(e,t){let[n,a]=e.xPosition==="before"?["end","start"]:["start","end"],[r,u]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[h,g]=[r,u],[v,D]=[n,a],z=0;if(this._triggersSubmenu()){if(D=n=e.xPosition==="before"?"start":"end",a=v=n==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let W=this._parentMaterialMenu.items.first;this._parentInnerPadding=W?W._getHostElement().offsetTop:0}z=r==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(h=r==="top"?"bottom":"top",g=u==="top"?"bottom":"top");t.withPositions([{originX:n,originY:h,overlayX:v,overlayY:r,offsetY:z},{originX:a,originY:h,overlayX:D,overlayY:r,offsetY:z},{originX:n,originY:g,overlayX:v,overlayY:u,offsetY:-z},{originX:a,originY:g,overlayX:D,overlayY:u,offsetY:-z}])}_menuClosingActions(){let e=this._getOutsideClickStream(this._overlayRef),t=this._overlayRef.detachments(),n=this._parentMaterialMenu?this._parentMaterialMenu.closed:be(),a=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(De(r=>this._menuOpen&&r!==this._menuItemInstance)):be();return $e(e,n,a,t)}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new It(e.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(e){return Ro.get(e)===this}_triggerIsAriaDisabled(){return L(this._element.nativeElement.getAttribute("aria-disabled"))}static \u0275fac=function(t){nr()};static \u0275dir=S({type:i})}return i})(),Ds=(()=>{class i extends yb{_cleanupTouchstart;_hoverSubscription=ke.EMPTY;get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){this._menu=e}menuData;restoreFocus=!0;menuOpened=new K;onMenuOpen=this.menuOpened;menuClosed=new K;onMenuClose=this.menuClosed;constructor(){super(!0);let e=d(Ce);this._cleanupTouchstart=e.listen(this._element.nativeElement,"touchstart",t=>{Ln(t)||(this._openedBy="touch")},{passive:!0})}triggersSubmenu(){return super._triggersSubmenu()}toggleMenu(){return this.menuOpen?this.closeMenu():this.openMenu()}openMenu(){this._openMenu(!0)}closeMenu(){this._closeMenu()}updatePosition(){this._overlayRef?.updatePosition()}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTouchstart(),this._hoverSubscription.unsubscribe()}_getOverlayOrigin(){return this._element}_getOutsideClickStream(e){return e.backdropClick()}_handleMousedown(e){Nn(e)||(this._openedBy=e.button===0?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let t=e.keyCode;(t===13||t===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(t===39&&this.dir==="ltr"||t===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(e=>{e===this._menuItemInstance&&!e.disabled&&this._parentMaterialMenu?._panelAnimationState!=="void"&&(this._openedBy="mouse",this._openMenu(!1))}))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(t,n){t&1&&E("click",function(r){return n._handleClick(r)})("mousedown",function(r){return n._handleMousedown(r)})("keydown",function(r){return n._handleKeydown(r)}),t&2&&Z("aria-haspopup",n.menu?"menu":null)("aria-expanded",n.menuOpen)("aria-controls",n.menuOpen?n.menu?.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],features:[Q]})}return i})();var Ss=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[Pi,Vt,te,yi]})}return i})();function Cb(i,o){if(i&1){let e=Se();s(0,"div",1)(1,"button",2),E("click",function(){de(e);let n=C();return me(n.action())}),m(2),l()()}if(i&2){let e=C();c(2),pe(" ",e.data.action," ")}}var xb=["label"];function wb(i,o){}var Db=Math.pow(2,31)-1,Va=class{_overlayRef;instance;containerInstance;_afterDismissed=new R;_afterOpened=new R;_onAction=new R;_durationTimeoutId;_dismissedByAction=!1;constructor(o,e){this._overlayRef=e,this.containerInstance=o,o._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(o){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(o,Db))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},op=new w("MatSnackBarData"),Oo=class{politeness="polite";announcementMessage="";viewContainerRef;duration=0;panelClass;direction;data=null;horizontalPosition="center";verticalPosition="bottom"},Sb=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]})}return i})(),kb=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]})}return i})(),Mb=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]})}return i})(),Eb=(()=>{class i{snackBarRef=d(Va);data=d(op);action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["matButton","","matSnackBarAction","",3,"click"]],template:function(t,n){t&1&&(s(0,"div",0),m(1),l(),k(2,Cb,3,1,"div",1)),t&2&&(c(),pe(" ",n.data.message,`
3547
+ `),c(),M(n.hasAction?2:-1))},dependencies:[Xe,Sb,kb,Mb],styles:[`.mat-mdc-simple-snack-bar {
3548
3548
  display: flex;
3549
3549
  }
3550
3550
  .mat-mdc-simple-snack-bar .mat-mdc-snack-bar-label {
3551
3551
  max-height: 50vh;
3552
3552
  overflow: auto;
3553
3553
  }
3554
- `],encapsulation:2})}return i})(),Pc="_mat-snack-bar-enter",Fc="_mat-snack-bar-exit",Mb=(()=>{class i extends _n{_ngZone=d(H);_elementRef=d(N);_changeDetectorRef=d(te);_platform=d(le);_animationsDisabled=pe();snackBarConfig=d(Oo);_document=d(q);_trackedModals=new Set;_enterFallback;_exitFallback;_injector=d(X);_announceDelay=150;_announceTimeoutId;_destroyed=!1;_portalOutlet;_onAnnounce=new R;_onExit=new R;_onEnter=new R;_animationState="void";_live;_label;_role;_liveElementId=d(be).getId("mat-snack-bar-container-live-");constructor(){super();let e=this.snackBarConfig;e.politeness==="assertive"&&!e.announcementMessage?this._live="assertive":e.politeness==="off"?this._live="off":this._live="polite",this._platform.FIREFOX&&(this._live==="polite"&&(this._role="status"),this._live==="assertive"&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();let t=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),t}attachTemplatePortal(e){this._assertNotAttached();let t=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),t}attachDomPortal=e=>{this._assertNotAttached();let t=this._portalOutlet.attachDomPortal(e);return this._afterPortalAttached(),t};onAnimationEnd(e){e===Fc?this._completeExit():e===Pc&&(clearTimeout(this._enterFallback),this._ngZone.run(()=>{this._onEnter.next(),this._onEnter.complete()}))}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce(),this._animationsDisabled?je(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd(Pc)))},{injector:this._injector}):(clearTimeout(this._enterFallback),this._enterFallback=setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-snack-bar-fallback-visible"),this.onAnimationEnd(Pc)},200)))}exit(){return this._destroyed?ge(void 0):(this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._animationsDisabled?je(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd(Fc)))},{injector:this._injector}):(clearTimeout(this._exitFallback),this._exitFallback=setTimeout(()=>this.onAnimationEnd(Fc),200))}),this._onExit)}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){clearTimeout(this._exitFallback),queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){let e=this._elementRef.nativeElement,t=this.snackBarConfig.panelClass;t&&(Array.isArray(t)?t.forEach(r=>e.classList.add(r)):e.classList.add(t)),this._exposeToModals();let n=this._label.nativeElement,a="mdc-snackbar__label";n.classList.toggle(a,!n.querySelector(`.${a}`))}_exposeToModals(){let e=this._liveElementId,t=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let n=0;n<t.length;n++){let a=t[n],r=a.getAttribute("aria-owns");this._trackedModals.add(a),r?r.indexOf(e)===-1&&a.setAttribute("aria-owns",r+" "+e):a.setAttribute("aria-owns",e)}}_clearFromModals(){this._trackedModals.forEach(e=>{let t=e.getAttribute("aria-owns");if(t){let n=t.replace(this._liveElementId,"").trim();n.length>0?e.setAttribute("aria-owns",n):e.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{if(this._destroyed)return;let e=this._elementRef.nativeElement,t=e.querySelector("[aria-hidden]"),n=e.querySelector("[aria-live]");if(t&&n){let a=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&(a=document.activeElement),t.removeAttribute("aria-hidden"),n.appendChild(t),a?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(t,n){if(t&1&&Me(Ri,7)(yb,7),t&2){let a;P(a=F())&&(n._portalOutlet=a.first),P(a=F())&&(n._label=a.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:6,hostBindings:function(t,n){t&1&&A("animationend",function(r){return n.onAnimationEnd(r.animationName)})("animationcancel",function(r){return n.onAnimationEnd(r.animationName)}),t&2&&p("mat-snack-bar-container-enter",n._animationState==="visible")("mat-snack-bar-container-exit",n._animationState==="hidden")("mat-snack-bar-container-animations-enabled",!n._animationsDisabled)},features:[Q],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface","mat-mdc-snackbar-surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(t,n){t&1&&(s(0,"div",1)(1,"div",2,0)(3,"div",3),He(4,Cb,0,0,"ng-template",4),l(),_(5,"div"),l()()),t&2&&(c(5),Z("aria-live",n._live)("role",n._role)("id",n._liveElementId))},dependencies:[Ri],styles:[`@keyframes _mat-snack-bar-enter {
3554
+ `],encapsulation:2})}return i})(),Fc="_mat-snack-bar-enter",Nc="_mat-snack-bar-exit",Ab=(()=>{class i extends bn{_ngZone=d(U);_elementRef=d(N);_changeDetectorRef=d(ie);_platform=d(ce);_animationsDisabled=_e();snackBarConfig=d(Oo);_document=d(q);_trackedModals=new Set;_enterFallback;_exitFallback;_injector=d(X);_announceDelay=150;_announceTimeoutId;_destroyed=!1;_portalOutlet;_onAnnounce=new R;_onExit=new R;_onEnter=new R;_animationState="void";_live;_label;_role;_liveElementId=d(xe).getId("mat-snack-bar-container-live-");constructor(){super();let e=this.snackBarConfig;e.politeness==="assertive"&&!e.announcementMessage?this._live="assertive":e.politeness==="off"?this._live="off":this._live="polite",this._platform.FIREFOX&&(this._live==="polite"&&(this._role="status"),this._live==="assertive"&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();let t=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),t}attachTemplatePortal(e){this._assertNotAttached();let t=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),t}attachDomPortal=e=>{this._assertNotAttached();let t=this._portalOutlet.attachDomPortal(e);return this._afterPortalAttached(),t};onAnimationEnd(e){e===Nc?this._completeExit():e===Fc&&(clearTimeout(this._enterFallback),this._ngZone.run(()=>{this._onEnter.next(),this._onEnter.complete()}))}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce(),this._animationsDisabled?je(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd(Fc)))},{injector:this._injector}):(clearTimeout(this._enterFallback),this._enterFallback=setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-snack-bar-fallback-visible"),this.onAnimationEnd(Fc)},200)))}exit(){return this._destroyed?be(void 0):(this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._animationsDisabled?je(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd(Nc)))},{injector:this._injector}):(clearTimeout(this._exitFallback),this._exitFallback=setTimeout(()=>this.onAnimationEnd(Nc),200))}),this._onExit)}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){clearTimeout(this._exitFallback),queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){let e=this._elementRef.nativeElement,t=this.snackBarConfig.panelClass;t&&(Array.isArray(t)?t.forEach(r=>e.classList.add(r)):e.classList.add(t)),this._exposeToModals();let n=this._label.nativeElement,a="mdc-snackbar__label";n.classList.toggle(a,!n.querySelector(`.${a}`))}_exposeToModals(){let e=this._liveElementId,t=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let n=0;n<t.length;n++){let a=t[n],r=a.getAttribute("aria-owns");this._trackedModals.add(a),r?r.indexOf(e)===-1&&a.setAttribute("aria-owns",r+" "+e):a.setAttribute("aria-owns",e)}}_clearFromModals(){this._trackedModals.forEach(e=>{let t=e.getAttribute("aria-owns");if(t){let n=t.replace(this._liveElementId,"").trim();n.length>0?e.setAttribute("aria-owns",n):e.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{if(this._destroyed)return;let e=this._elementRef.nativeElement,t=e.querySelector("[aria-hidden]"),n=e.querySelector("[aria-live]");if(t&&n){let a=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&(a=document.activeElement),t.removeAttribute("aria-hidden"),n.appendChild(t),a?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(t,n){if(t&1&&Ae(Fi,7)(xb,7),t&2){let a;P(a=F())&&(n._portalOutlet=a.first),P(a=F())&&(n._label=a.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:6,hostBindings:function(t,n){t&1&&E("animationend",function(r){return n.onAnimationEnd(r.animationName)})("animationcancel",function(r){return n.onAnimationEnd(r.animationName)}),t&2&&p("mat-snack-bar-container-enter",n._animationState==="visible")("mat-snack-bar-container-exit",n._animationState==="hidden")("mat-snack-bar-container-animations-enabled",!n._animationsDisabled)},features:[Q],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface","mat-mdc-snackbar-surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(t,n){t&1&&(s(0,"div",1)(1,"div",2,0)(3,"div",3),He(4,wb,0,0,"ng-template",4),l(),_(5,"div"),l()()),t&2&&(c(5),Z("aria-live",n._live)("role",n._role)("id",n._liveElementId))},dependencies:[Fi],styles:[`@keyframes _mat-snack-bar-enter {
3555
3555
  from {
3556
3556
  transform: scale(0.8);
3557
3557
  opacity: 0;
@@ -3667,7 +3667,7 @@ input.mat-mdc-chip-input {
3667
3667
  .mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element {
3668
3668
  opacity: 0.1;
3669
3669
  }
3670
- `],encapsulation:2,changeDetection:1})}return i})(),Eb=new x("mat-snack-bar-default-options",{providedIn:"root",factory:()=>new Oo}),ks=(()=>{class i{_live=d(ca);_injector=d(X);_breakpointObserver=d(On);_parentSnackBar=d(i,{optional:!0,skipSelf:!0});_defaultConfig=d(Eb);_animationsDisabled=pe();_snackBarRefAtThisLevel=null;simpleSnackBarComponent=kb;snackBarContainerComponent=Mb;handsetCssClass="mat-mdc-snack-bar-handset";get _openedSnackBarRef(){let e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}openFromComponent(e,t){return this._attach(e,t)}openFromTemplate(e,t){return this._attach(e,t)}open(e,t="",n){let a=V(V({},this._defaultConfig),n);return a.data={message:e,action:t},a.announcementMessage===e&&(a.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,a)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,t){let n=t&&t.viewContainerRef&&t.viewContainerRef.injector,a=X.create({parent:n||this._injector,providers:[{provide:Oo,useValue:t}]}),r=new bi(this.snackBarContainerComponent,t.viewContainerRef,a),u=e.attach(r);return u.instance.snackBarConfig=t,u.instance}_attach(e,t){let n=V(V(V({},new Oo),this._defaultConfig),t),a=this._createOverlay(n),r=this._attachSnackBarContainer(a,n),u=new La(r,a);if(e instanceof Ye){let h=new Et(e,null,{$implicit:n.data,snackBarRef:u});u.instance=r.attachTemplatePortal(h)}else{let h=this._createInjector(n,u),g=new bi(e,void 0,h),v=r.attachComponentPortal(g);u.instance=v.instance}return this._breakpointObserver.observe(Ir.HandsetPortrait).pipe(ae(a.detachments())).subscribe(h=>{a.overlayElement.classList.toggle(this.handsetCssClass,h.matches)}),n.announcementMessage&&r._onAnnounce.subscribe(()=>{this._live.announce(n.announcementMessage,n.politeness)}),this._animateSnackBar(u,n),this._openedSnackBarRef=u,this._openedSnackBarRef}_animateSnackBar(e,t){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),t.announcementMessage&&this._live.clear()}),t.duration&&t.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(t.duration)),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter()}_createOverlay(e){let t=new Wt;t.direction=e.direction;let n=vn(this._injector),a=e.direction==="rtl",r=e.horizontalPosition==="left"||e.horizontalPosition==="start"&&!a||e.horizontalPosition==="end"&&a,u=!r&&e.horizontalPosition!=="center";return r?n.left("0"):u?n.right("0"):n.centerHorizontally(),e.verticalPosition==="top"?n.top("0"):n.bottom("0"),t.positionStrategy=n,t.disableAnimations=this._animationsDisabled,qt(this._injector,t)}_createInjector(e,t){let n=e&&e.viewContainerRef&&e.viewContainerRef.injector;return X.create({parent:n||this._injector,providers:[{provide:La,useValue:t},{provide:np,useValue:e.data}]})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var _t=(()=>{class i{constructor(){this.http=d(Qt),this.url="/api/services"}fetchServices(){return this.http.get(this.url)}control(e,t){return this.http.post(`${this.url}/control`,{name:e,action:t})}fetchConfigs(){return this.http.get(`${this.url}/config`)}getConfig(e){return this.http.get(`${this.url}/config/${e}`)}saveConfig(e){return this.http.post(`${this.url}/config`,e)}deleteConfig(e){return this.http.delete(`${this.url}/config/${e}`)}fetchArchivedConfigs(){return this.http.get(`${this.url}/archive`)}archiveService(e){return this.http.post(`${this.url}/config/${e}/archive`,{})}restoreService(e){return this.http.post(`${this.url}/config/${e}/restore`,{})}listAvailableServices(){return this.http.get(`${this.url}/managed/available`)}listManagedServices(){return this.http.get(`${this.url}/managed`)}addManagedService(e){return this.http.post(`${this.url}/managed`,{name:e})}removeManagedService(e){return this.http.delete(`${this.url}/managed`,{body:{name:e}})}fetchJournal(e,t=100){return this.http.get(`${this.url}/journal/${e}`,{params:{lines:t}})}getLlamaAutocomplete(e,t,n){let a={type:e,query:t};return n&&(a.binary=n),this.http.get(`${this.url}/llama/autocomplete`,{params:a})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ne({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var op="journal-selected-service",Ms=(()=>{class i{constructor(){this.selectedService=I(this.readSaved())}select(e){this.selectedService.set(e),localStorage.setItem(op,JSON.stringify(e))}readSaved(){let e=localStorage.getItem(op);if(e===null)return null;try{return JSON.parse(e)}catch(t){return null}}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ne({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Es=(()=>{class i{constructor(){this.serviceService=d(_t),this.services=I([]),this.loaded=I(!1),this.error=I(null)}refresh(){return ye(this,null,function*(){try{let e=yield Te(this.serviceService.fetchServices());this.services.set(e),this.error.set(null),this.loaded.set(!0)}catch(e){this.error.set(e instanceof Error?e.message:String(e)),console.error("[ServiceListService] refresh error:",e)}})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ne({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var ap=(()=>{class i{_animationsDisabled=pe();state="unchecked";disabled=!1;appearance="full";static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(t,n){t&2&&p("mat-pseudo-checkbox-indeterminate",n.state==="indeterminate")("mat-pseudo-checkbox-checked",n.state==="checked")("mat-pseudo-checkbox-disabled",n.disabled)("mat-pseudo-checkbox-minimal",n.appearance==="minimal")("mat-pseudo-checkbox-full",n.appearance==="full")("_mat-animation-noopable",n._animationsDisabled)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(t,n){},styles:[`.mat-pseudo-checkbox {
3670
+ `],encapsulation:2,changeDetection:1})}return i})(),Tb=new w("mat-snack-bar-default-options",{providedIn:"root",factory:()=>new Oo}),ks=(()=>{class i{_live=d(da);_injector=d(X);_breakpointObserver=d(Pn);_parentSnackBar=d(i,{optional:!0,skipSelf:!0});_defaultConfig=d(Tb);_animationsDisabled=_e();_snackBarRefAtThisLevel=null;simpleSnackBarComponent=Eb;snackBarContainerComponent=Ab;handsetCssClass="mat-mdc-snack-bar-handset";get _openedSnackBarRef(){let e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}openFromComponent(e,t){return this._attach(e,t)}openFromTemplate(e,t){return this._attach(e,t)}open(e,t="",n){let a=V(V({},this._defaultConfig),n);return a.data={message:e,action:t},a.announcementMessage===e&&(a.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,a)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,t){let n=t&&t.viewContainerRef&&t.viewContainerRef.injector,a=X.create({parent:n||this._injector,providers:[{provide:Oo,useValue:t}]}),r=new xi(this.snackBarContainerComponent,t.viewContainerRef,a),u=e.attach(r);return u.instance.snackBarConfig=t,u.instance}_attach(e,t){let n=V(V(V({},new Oo),this._defaultConfig),t),a=this._createOverlay(n),r=this._attachSnackBarContainer(a,n),u=new Va(r,a);if(e instanceof Ze){let h=new It(e,null,{$implicit:n.data,snackBarRef:u});u.instance=r.attachTemplatePortal(h)}else{let h=this._createInjector(n,u),g=new xi(e,void 0,h),v=r.attachComponentPortal(g);u.instance=v.instance}return this._breakpointObserver.observe(Rr.HandsetPortrait).pipe(re(a.detachments())).subscribe(h=>{a.overlayElement.classList.toggle(this.handsetCssClass,h.matches)}),n.announcementMessage&&r._onAnnounce.subscribe(()=>{this._live.announce(n.announcementMessage,n.politeness)}),this._animateSnackBar(u,n),this._openedSnackBarRef=u,this._openedSnackBarRef}_animateSnackBar(e,t){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),t.announcementMessage&&this._live.clear()}),t.duration&&t.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(t.duration)),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter()}_createOverlay(e){let t=new Yt;t.direction=e.direction;let n=yn(this._injector),a=e.direction==="rtl",r=e.horizontalPosition==="left"||e.horizontalPosition==="start"&&!a||e.horizontalPosition==="end"&&a,u=!r&&e.horizontalPosition!=="center";return r?n.left("0"):u?n.right("0"):n.centerHorizontally(),e.verticalPosition==="top"?n.top("0"):n.bottom("0"),t.positionStrategy=n,t.disableAnimations=this._animationsDisabled,Xt(this._injector,t)}_createInjector(e,t){let n=e&&e.viewContainerRef&&e.viewContainerRef.injector;return X.create({parent:n||this._injector,providers:[{provide:Va,useValue:t},{provide:op,useValue:e.data}]})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac})}return i})();var yt=(()=>{class i{constructor(){this.http=d(Ft),this.url="/api/services"}fetchServices(){return this.http.get(this.url)}control(e,t){return this.http.post(`${this.url}/control`,{name:e,action:t})}fetchConfigs(){return this.http.get(`${this.url}/config`)}getConfig(e){return this.http.get(`${this.url}/config/${e}`)}saveConfig(e){return this.http.post(`${this.url}/config`,e)}deleteConfig(e){return this.http.delete(`${this.url}/config/${e}`)}fetchArchivedConfigs(){return this.http.get(`${this.url}/archive`)}archiveService(e){return this.http.post(`${this.url}/config/${e}/archive`,{})}restoreService(e){return this.http.post(`${this.url}/config/${e}/restore`,{})}listAvailableServices(){return this.http.get(`${this.url}/managed/available`)}listManagedServices(){return this.http.get(`${this.url}/managed`)}addManagedService(e){return this.http.post(`${this.url}/managed`,{name:e})}removeManagedService(e){return this.http.delete(`${this.url}/managed`,{body:{name:e}})}fetchJournal(e,t=100){return this.http.get(`${this.url}/journal/${e}`,{params:{lines:t}})}getLlamaAutocomplete(e,t,n){let a={type:e,query:t};return n&&(a.binary=n),this.http.get(`${this.url}/llama/autocomplete`,{params:a})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var ap="journal-selected-service",Ms=(()=>{class i{constructor(){this.selectedService=T(this.readSaved())}select(e){this.selectedService.set(e),localStorage.setItem(ap,JSON.stringify(e))}readSaved(){let e=localStorage.getItem(ap);if(e===null)return null;try{return JSON.parse(e)}catch(t){return null}}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Es=(()=>{class i{constructor(){this.serviceService=d(yt),this.services=T([]),this.loaded=T(!1),this.error=T(null)}refresh(){return oe(this,null,function*(){try{let e=yield we(this.serviceService.fetchServices());this.services.set(e),this.error.set(null),this.loaded.set(!0)}catch(e){this.error.set(e instanceof Error?e.message:String(e)),console.error("[ServiceListService] refresh error:",e)}})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var rp=(()=>{class i{_animationsDisabled=_e();state="unchecked";disabled=!1;appearance="full";static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(t,n){t&2&&p("mat-pseudo-checkbox-indeterminate",n.state==="indeterminate")("mat-pseudo-checkbox-checked",n.state==="checked")("mat-pseudo-checkbox-disabled",n.disabled)("mat-pseudo-checkbox-minimal",n.appearance==="minimal")("mat-pseudo-checkbox-full",n.appearance==="full")("_mat-animation-noopable",n._animationsDisabled)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(t,n){},styles:[`.mat-pseudo-checkbox {
3671
3671
  border-radius: 2px;
3672
3672
  cursor: pointer;
3673
3673
  display: inline-block;
@@ -3773,7 +3773,7 @@ input.mat-mdc-chip-input {
3773
3773
  top: 6px;
3774
3774
  width: 12px;
3775
3775
  }
3776
- `],encapsulation:2})}return i})();var Ab=["text"],Tb=[[["mat-icon"]],"*"],Ib=["mat-icon","*"];function Rb(i,o){if(i&1&&_(0,"mat-pseudo-checkbox",1),i&2){let e=w();C("disabled",e.disabled)("state",e.selected?"checked":"unchecked")}}function Ob(i,o){if(i&1&&_(0,"mat-pseudo-checkbox",3),i&2){let e=w();C("disabled",e.disabled)}}function Pb(i,o){if(i&1&&(s(0,"span",4),m(1),l()),i&2){let e=w();c(),he("(",e.group.label,")")}}var Ba=new x("MAT_OPTION_PARENT_COMPONENT"),za=new x("MatOptgroup");var Va=class{source;isUserInput;constructor(o,e=!1){this.source=o,this.isUserInput=e}},vt=(()=>{class i{_element=d(N);_changeDetectorRef=d(te);_parent=d(Ba,{optional:!0});group=d(za,{optional:!0});_signalDisableRipple=!1;_selected=!1;_active=!1;_mostRecentViewValue="";get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}value;id=d(be).getId("mat-option-");get disabled(){return this.group&&this.group.disabled||this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=I(!1);get disableRipple(){return this._signalDisableRipple?this._parent.disableRipple():!!this._parent?.disableRipple}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}onSelectionChange=new K;_text;_stateChanges=new R;constructor(){let e=d(Le);e.load(Mt),e.load(rn),this._signalDisableRipple=!!this._parent&&Xi(this._parent.disableRipple)}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(e=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}deselect(e=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}focus(e,t){let n=this._getHostElement();typeof n.focus=="function"&&n.focus(t)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!Ge(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=this.multiple?!this._selected:!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=e)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new Va(this,e))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["mat-option"]],viewQuery:function(t,n){if(t&1&&Me(Ab,7),t&2){let a;P(a=F())&&(n._text=a.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(t,n){t&1&&A("click",function(){return n._selectViaInteraction()})("keydown",function(r){return n._handleKeydown(r)}),t&2&&(dt("id",n.id),Z("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),p("mdc-list-item--selected",n.selected)("mat-mdc-option-multiple",n.multiple)("mat-mdc-option-active",n.active)("mdc-list-item--disabled",n.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",L]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],ngContentSelectors:Ib,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,n){t&1&&(ce(Tb),M(0,Rb,1,2,"mat-pseudo-checkbox",1),U(1),s(2,"span",2,0),U(4,1),l(),M(5,Ob,1,1,"mat-pseudo-checkbox",3),M(6,Pb,2,1,"span",4),_(7,"div",5)),t&2&&(E(n.multiple?0:-1),c(5),E(!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator?5:-1),c(),E(n.group&&n.group._inert?6:-1),c(),C("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[ap,So],styles:[`.mat-mdc-option {
3776
+ `],encapsulation:2})}return i})();var Ib=["text"],Rb=[[["mat-icon"]],"*"],Ob=["mat-icon","*"];function Pb(i,o){if(i&1&&_(0,"mat-pseudo-checkbox",1),i&2){let e=C();x("disabled",e.disabled)("state",e.selected?"checked":"unchecked")}}function Fb(i,o){if(i&1&&_(0,"mat-pseudo-checkbox",3),i&2){let e=C();x("disabled",e.disabled)}}function Nb(i,o){if(i&1&&(s(0,"span",4),m(1),l()),i&2){let e=C();c(),pe("(",e.group.label,")")}}var za=new w("MAT_OPTION_PARENT_COMPONENT"),ja=new w("MatOptgroup");var Ba=class{source;isUserInput;constructor(o,e=!1){this.source=o,this.isUserInput=e}},Ct=(()=>{class i{_element=d(N);_changeDetectorRef=d(ie);_parent=d(za,{optional:!0});group=d(ja,{optional:!0});_signalDisableRipple=!1;_selected=!1;_active=!1;_mostRecentViewValue="";get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}value;id=d(xe).getId("mat-option-");get disabled(){return this.group&&this.group.disabled||this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=T(!1);get disableRipple(){return this._signalDisableRipple?this._parent.disableRipple():!!this._parent?.disableRipple}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}onSelectionChange=new K;_text;_stateChanges=new R;constructor(){let e=d(Be);e.load(Tt),e.load(sn),this._signalDisableRipple=!!this._parent&&Qi(this._parent.disableRipple)}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(e=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}deselect(e=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}focus(e,t){let n=this._getHostElement();typeof n.focus=="function"&&n.focus(t)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!Ge(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=this.multiple?!this._selected:!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=e)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new Ba(this,e))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["mat-option"]],viewQuery:function(t,n){if(t&1&&Ae(Ib,7),t&2){let a;P(a=F())&&(n._text=a.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(t,n){t&1&&E("click",function(){return n._selectViaInteraction()})("keydown",function(r){return n._handleKeydown(r)}),t&2&&(dt("id",n.id),Z("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),p("mdc-list-item--selected",n.selected)("mat-mdc-option-multiple",n.multiple)("mat-mdc-option-active",n.active)("mdc-list-item--disabled",n.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",L]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],ngContentSelectors:Ob,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,n){t&1&&(fe(Rb),k(0,Pb,1,2,"mat-pseudo-checkbox",1),G(1),s(2,"span",2,0),G(4,1),l(),k(5,Fb,1,1,"mat-pseudo-checkbox",3),k(6,Nb,2,1,"span",4),_(7,"div",5)),t&2&&(M(n.multiple?0:-1),c(5),M(!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator?5:-1),c(),M(n.group&&n.group._inert?6:-1),c(),x("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[rp,ko],styles:[`.mat-mdc-option {
3777
3777
  -webkit-user-select: none;
3778
3778
  user-select: none;
3779
3779
  -moz-osx-font-smoothing: grayscale;
@@ -3894,7 +3894,7 @@ input.mat-mdc-chip-input {
3894
3894
  .mat-mdc-option-active .mat-focus-indicator::before {
3895
3895
  content: "";
3896
3896
  }
3897
- `],encapsulation:2})}return i})();function As(i,o,e){if(e.length){let t=o.toArray(),n=e.toArray(),a=0;for(let r=0;r<i+1;r++)t[r].group&&t[r].group===n[a]&&a++;return a}return 0}function Ts(i,o,e,t){return i<e?i:i+o>e+t?Math.max(0,i-t+o):e}var Is=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[ee]})}return i})();var Po=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[Ti,Is,vt,ee]})}return i})();var Fb=["panel"],Nb=["*"];function Lb(i,o){if(i&1&&(Ie(0,"div",1,0),U(2),Ue()),i&2){let e=o.id,t=w();et(t._classList),p("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-autocomplete-panel-animations-enabled",!t._animationsDisabled)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),dt("id",t.id),Z("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(e))}}var Nc=class{source;option;constructor(o,e){this.source=o,this.option=e}},rp=new x("mat-autocomplete-default-options",{providedIn:"root",factory:()=>({autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1,hasBackdrop:!1})}),Cn=(()=>{class i{_changeDetectorRef=d(te);_elementRef=d(N);_defaults=d(rp);_animationsDisabled=pe();_activeOptionChanges=De.EMPTY;_keyManager;showPanel=!1;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=!1;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck()}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple=!1;optionSelected=new K;opened=new K;closed=new K;optionActivated=new K;set classList(e){this._classList=e,this._elementRef.nativeElement.className=""}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}id=d(be).getId("mat-autocomplete-");inertGroups;constructor(){let e=d(le);this.inertGroups=e?.SAFARI||!1,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new Bn(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){let t=new Nc(this,e);this.optionSelected.emit(t)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_skipPredicate(){return!1}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["mat-autocomplete"]],contentQueries:function(t,n,a){if(t&1&&at(a,vt,5)(a,za,5),t&2){let r;P(r=F())&&(n.options=r),P(r=F())&&(n.optionGroups=r)}},viewQuery:function(t,n){if(t&1&&Me(Ye,7)(Fb,5),t&2){let a;P(a=F())&&(n.template=a.first),P(a=F())&&(n.panel=a.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",L],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",L],requireSelection:[2,"requireSelection","requireSelection",L],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",L],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",L]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[J([{provide:Ba,useExisting:i}])],ngContentSelectors:Nb,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(t,n){t&1&&(ce(),or(0,Lb,3,17,"ng-template"))},styles:[`div.mat-mdc-autocomplete-panel {
3897
+ `],encapsulation:2})}return i})();function As(i,o,e){if(e.length){let t=o.toArray(),n=e.toArray(),a=0;for(let r=0;r<i+1;r++)t[r].group&&t[r].group===n[a]&&a++;return a}return 0}function Ts(i,o,e,t){return i<e?i:i+o>e+t?Math.max(0,i-t+o):e}var Is=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[te]})}return i})();var Po=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[Pi,Is,Ct,te]})}return i})();var Lb=["panel"],Vb=["*"];function Bb(i,o){if(i&1&&(Re(0,"div",1,0),G(2),Ue()),i&2){let e=o.id,t=C();tt(t._classList),p("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-autocomplete-panel-animations-enabled",!t._animationsDisabled)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),dt("id",t.id),Z("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(e))}}var Lc=class{source;option;constructor(o,e){this.source=o,this.option=e}},sp=new w("mat-autocomplete-default-options",{providedIn:"root",factory:()=>({autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1,hasBackdrop:!1})}),wn=(()=>{class i{_changeDetectorRef=d(ie);_elementRef=d(N);_defaults=d(sp);_animationsDisabled=_e();_activeOptionChanges=ke.EMPTY;_keyManager;showPanel=!1;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=!1;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck()}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple=!1;optionSelected=new K;opened=new K;closed=new K;optionActivated=new K;set classList(e){this._classList=e,this._elementRef.nativeElement.className=""}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}id=d(xe).getId("mat-autocomplete-");inertGroups;constructor(){let e=d(ce);this.inertGroups=e?.SAFARI||!1,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new zn(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){let t=new Lc(this,e);this.optionSelected.emit(t)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_skipPredicate(){return!1}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["mat-autocomplete"]],contentQueries:function(t,n,a){if(t&1&&at(a,Ct,5)(a,ja,5),t&2){let r;P(r=F())&&(n.options=r),P(r=F())&&(n.optionGroups=r)}},viewQuery:function(t,n){if(t&1&&Ae(Ze,7)(Lb,5),t&2){let a;P(a=F())&&(n.template=a.first),P(a=F())&&(n.panel=a.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",L],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",L],requireSelection:[2,"requireSelection","requireSelection",L],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",L],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",L]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[ee([{provide:za,useExisting:i}])],ngContentSelectors:Vb,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(t,n){t&1&&(fe(),ar(0,Bb,3,17,"ng-template"))},styles:[`div.mat-mdc-autocomplete-panel {
3898
3898
  width: 100%;
3899
3899
  max-height: 256px;
3900
3900
  visibility: hidden;
@@ -3948,17 +3948,17 @@ div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden,
3948
3948
  mat-autocomplete {
3949
3949
  display: none;
3950
3950
  }
3951
- `],encapsulation:2})}return i})();var Vb={provide:Mi,useExisting:nt(()=>Wi),multi:!0};var Bb=new x("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let i=d(X);return()=>yi(i)}}),Wi=(()=>{class i{_environmentInjector=d(mi);_element=d(N);_injector=d(X);_viewContainerRef=d(Xe);_zone=d(H);_changeDetectorRef=d(te);_dir=d(qe,{optional:!0});_formField=d(jn,{optional:!0,host:!0});_viewportRuler=d(Gt);_scrollStrategy=d(Bb);_renderer=d(ve);_animationsDisabled=pe();_defaults=d(rp,{optional:!0});_overlayRef=null;_portal;_componentDestroyed=!1;_initialized=new R;_keydownSubscription;_outsideClickSubscription;_cleanupWindowBlur;_previousValue=null;_valueOnAttach=null;_valueOnLastKeydown=null;_positionStrategy;_manuallyFloatingLabel=!1;_closingActionsSubscription;_viewportSubscription=De.EMPTY;_breakpointObserver=d(On);_handsetLandscapeSubscription=De.EMPTY;_canOpenOnNextFocus=!0;_valueBeforeAutoSelection;_pendingAutoselectedOption=null;_closeKeyEventStream=new R;_overlayPanelClass=Vi(this._defaults?.overlayPanelClass||[]);_windowBlurHandler=()=>{this._canOpenOnNextFocus=this.panelOpen||!this._hasFocus()};_onChange=()=>{};_onTouched=()=>{};autocomplete;position="auto";connectedTo;autocompleteAttribute="off";autocompleteDisabled=!1;_aboveClass="mat-mdc-autocomplete-panel-above";ngAfterViewInit(){this._initialized.next(),this._initialized.complete(),this._cleanupWindowBlur=this._renderer.listen("window","blur",this._windowBlurHandler)}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){this._cleanupWindowBlur?.(),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}_overlayAttached=!1;openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges())}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return $e(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(we(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(we(()=>this._overlayAttached)):ge()).pipe(Pe(e=>e instanceof Va?e:null))}optionSelections=Yi(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(Se(e),We(()=>$e(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe(We(()=>this.optionSelections))});get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return new yt(e=>{let t=a=>{let r=rt(a),u=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,h=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;this._overlayAttached&&r!==this._element.nativeElement&&!this._hasFocus()&&(!u||!u.contains(r))&&(!h||!h.contains(r))&&this._overlayRef&&!this._overlayRef.overlayElement.contains(r)&&e.next(a)},n=[this._renderer.listen("document","click",t),this._renderer.listen("document","auxclick",t),this._renderer.listen("document","touchend",t)];return()=>{n.forEach(a=>a())}})}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){let t=e,n=t.keyCode,a=Ge(t);if(n===27&&!a&&t.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&n===13&&this.panelOpen&&!a)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){let r=this.autocomplete._keyManager.activeItem,u=n===38||n===40;n===9||u&&!a&&this.panelOpen?this.autocomplete._keyManager.onKeydown(t):u&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(u||this.autocomplete._keyManager.activeItem!==r)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let t=e.target,n=t.value;if(t.type==="number"&&(n=n==""?null:parseFloat(n)),this._previousValue!==n){if(this._previousValue=n,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(n),!n)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let a=this.autocomplete.options?.find(r=>r.selected);if(a){let r=this._getDisplayValue(a.value);n!==r&&a.deselect(!1)}}if(this._canOpen()&&this._hasFocus()){let a=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(a)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_hasFocus(){return an()===this._element.nativeElement}_floatLabel(e=!1){this._formField&&this._formField.floatLabel==="auto"&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let e=new yt(n=>{je(()=>{n.next()},{injector:this._environmentInjector})}),t=this.autocomplete.options?.changes.pipe(di(()=>this._positionStrategy.reapplyLastPosition()),Xc(0))??ge();return $e(e,t).pipe(We(()=>this._zone.run(()=>{let n=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),n!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),ct(1)).subscribe(n=>this._setValueAndClose(n))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let t=this.autocomplete;return t&&t.displayWith?t.displayWith(e):e}_assignOptionValue(e){let t=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(t??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let t=this.autocomplete,n=e?e.source:this._pendingAutoselectedOption;n?(this._clearPreviousSelectedOption(n),this._assignOptionValue(n.value),this._onChange(n.value),t._emitSelectEvent(n),this._element.nativeElement.focus()):t.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,t){this.autocomplete?.options?.forEach(n=>{n!==e&&n.selected&&n.deselect(t)})}_openPanelInternal(e=this._element.nativeElement.value){this._attachOverlay(e),this._floatLabel()}_attachOverlay(e){if(!this.autocomplete)return;let t=this._overlayRef;t?(this._positionStrategy.setOrigin(this._getConnectedElement()),t.updateSize({width:this._getPanelWidth()})):(this._portal=new Et(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),t=qt(this._injector,this._getOverlayConfig()),this._overlayRef=t,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&t&&t.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(Ir.HandsetLandscape).subscribe(a=>{a.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),t&&!t.hasAttached()&&(t.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let n=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this.panelOpen&&n!==this.panelOpen&&this._emitOpened()}_handlePanelKeydown=e=>{(e.keyCode===27&&!Ge(e)||e.keyCode===38&&Ge(e,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),e.stopPropagation(),e.preventDefault())};_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let e=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=e.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=e.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=void 0}_getOverlayConfig(){return new Wt({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,hasBackdrop:this._defaults?.hasBackdrop,backdropClass:this._defaults?.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this._overlayPanelClass,disableAnimations:this._animationsDisabled})}_getOverlayPosition(){let e=$i(this._injector,this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1).withPopoverLocation("inline");return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let t=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],n=this._aboveClass,a=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:n},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:n}],r;this.position==="above"?r=a:this.position==="below"?r=t:r=[...t,...a],e.withPositions(r)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let e=this.autocomplete;if(e.autoActiveFirstOption){let t=-1;for(let n=0;n<e.options.length;n++)if(!e.options.get(n).disabled){t=n;break}e._keyManager.setActiveItem(t)}else e._keyManager.setActiveItem(-1)}_canOpen(){let e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this.autocompleteDisabled}_scrollToOption(e){let t=this.autocomplete,n=As(e,t.options,t.optionGroups);if(e===0&&n===1)t._setScrollTop(0);else if(t.panel){let a=t.options.toArray()[e];if(a){let r=a._getHostElement(),u=Ts(r.offsetTop,r.offsetHeight,t._getScrollTop(),t.panel.nativeElement.offsetHeight);t._setScrollTop(u)}}}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(t,n){t&1&&A("focusin",function(){return n._handleFocus()})("blur",function(){return n._onTouched()})("input",function(r){return n._handleInput(r)})("keydown",function(r){return n._handleKeydown(r)})("click",function(){return n._handleClick()}),t&2&&Z("autocomplete",n.autocompleteAttribute)("role",n.autocompleteDisabled?null:"combobox")("aria-autocomplete",n.autocompleteDisabled?null:"list")("aria-activedescendant",n.panelOpen&&n.activeOption?n.activeOption.id:null)("aria-expanded",n.autocompleteDisabled?null:n.panelOpen.toString())("aria-controls",n.autocompleteDisabled||!n.panelOpen?null:n.autocomplete?.id)("aria-haspopup",n.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",L]},exportAs:["matAutocompleteTrigger"],features:[J([Vb]),ke]})}return i})(),xn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[Nt,Po,_i,Po,ee]})}return i})();var zb=(i,o)=>o.command;function jb(i,o){i&1&&(s(0,"mat-error"),m(1,"Required"),l())}function Hb(i,o){i&1&&(s(0,"mat-error"),m(1,"Starts with letter, alphanumeric + hyphens/underscores, max 128 chars"),l())}function Ub(i,o){i&1&&(s(0,"mat-error"),m(1,"Required"),l())}function Gb(i,o){if(i&1&&(s(0,"mat-option",6)(1,"span",12),m(2),l(),s(3,"span",13),m(4),l()()),i&2){let e=o.$implicit;C("value",e.command),c(2),W(e.command),c(2),he("(",e.from,")")}}var $b="^[a-zA-Z][a-zA-Z0-9_-]{0,127}$",sp=(()=>{class i{constructor(){this.fb=d(un),this.dialogRef=d(gt),this.data=d(Wn),this.isEdit=this.data.config!==null,this.isClone=this.data.clone===!0,this.form=this.fb.group({name:[this.data.config?.name??"",{validators:[st.required,st.pattern($b)]}],command:[this.data.config?.command??"",st.required],flagsText:[""],envText:[""]}),this.allExistingCommands=G(()=>{let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e)r.name!==t&&(n.has(r.command)||(n.add(r.command),a.push({command:r.command,from:r.name})));return a}),this._commandValue=I(this.data.config?.command??""),this.commandValue=this._commandValue.asReadonly(),this.filteredCommands=G(()=>{let e=this.commandValue()?.toLowerCase()??"";return this.allExistingCommands().filter(t=>t.command.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))})}get nameControl(){return this.form.get("name")}get commandControl(){return this.form.get("command")}ngOnInit(){if(this.commandControl.valueChanges.subscribe(e=>this._commandValue.set(e)),this.data.config?.flags?.length&&this.form.get("flagsText").setValue(this.data.config.flags.join(`
3951
+ `],encapsulation:2})}return i})();var zb={provide:Ii,useExisting:nt(()=>Ki),multi:!0};var jb=new w("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let i=d(X);return()=>wi(i)}}),Ki=(()=>{class i{_environmentInjector=d(ui);_element=d(N);_injector=d(X);_viewContainerRef=d(Qe);_zone=d(U);_changeDetectorRef=d(ie);_dir=d(qe,{optional:!0});_formField=d(Hn,{optional:!0,host:!0});_viewportRuler=d(qt);_scrollStrategy=d(jb);_renderer=d(Ce);_animationsDisabled=_e();_defaults=d(sp,{optional:!0});_overlayRef=null;_portal;_componentDestroyed=!1;_initialized=new R;_keydownSubscription;_outsideClickSubscription;_cleanupWindowBlur;_previousValue=null;_valueOnAttach=null;_valueOnLastKeydown=null;_positionStrategy;_manuallyFloatingLabel=!1;_closingActionsSubscription;_viewportSubscription=ke.EMPTY;_breakpointObserver=d(Pn);_handsetLandscapeSubscription=ke.EMPTY;_canOpenOnNextFocus=!0;_valueBeforeAutoSelection;_pendingAutoselectedOption=null;_closeKeyEventStream=new R;_overlayPanelClass=ji(this._defaults?.overlayPanelClass||[]);_windowBlurHandler=()=>{this._canOpenOnNextFocus=this.panelOpen||!this._hasFocus()};_onChange=()=>{};_onTouched=()=>{};autocomplete;position="auto";connectedTo;autocompleteAttribute="off";autocompleteDisabled=!1;_aboveClass="mat-mdc-autocomplete-panel-above";ngAfterViewInit(){this._initialized.next(),this._initialized.complete(),this._cleanupWindowBlur=this._renderer.listen("window","blur",this._windowBlurHandler)}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){this._cleanupWindowBlur?.(),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}_overlayAttached=!1;openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges())}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return $e(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(De(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(De(()=>this._overlayAttached)):be()).pipe(Ne(e=>e instanceof Ba?e:null))}optionSelections=Zi(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(Me(e),We(()=>$e(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe(We(()=>this.optionSelections))});get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return new wt(e=>{let t=a=>{let r=rt(a),u=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,h=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;this._overlayAttached&&r!==this._element.nativeElement&&!this._hasFocus()&&(!u||!u.contains(r))&&(!h||!h.contains(r))&&this._overlayRef&&!this._overlayRef.overlayElement.contains(r)&&e.next(a)},n=[this._renderer.listen("document","click",t),this._renderer.listen("document","auxclick",t),this._renderer.listen("document","touchend",t)];return()=>{n.forEach(a=>a())}})}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){let t=e,n=t.keyCode,a=Ge(t);if(n===27&&!a&&t.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&n===13&&this.panelOpen&&!a)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){let r=this.autocomplete._keyManager.activeItem,u=n===38||n===40;n===9||u&&!a&&this.panelOpen?this.autocomplete._keyManager.onKeydown(t):u&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(u||this.autocomplete._keyManager.activeItem!==r)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let t=e.target,n=t.value;if(t.type==="number"&&(n=n==""?null:parseFloat(n)),this._previousValue!==n){if(this._previousValue=n,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(n),!n)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let a=this.autocomplete.options?.find(r=>r.selected);if(a){let r=this._getDisplayValue(a.value);n!==r&&a.deselect(!1)}}if(this._canOpen()&&this._hasFocus()){let a=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(a)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_hasFocus(){return rn()===this._element.nativeElement}_floatLabel(e=!1){this._formField&&this._formField.floatLabel==="auto"&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let e=new wt(n=>{je(()=>{n.next()},{injector:this._environmentInjector})}),t=this.autocomplete.options?.changes.pipe(mi(()=>this._positionStrategy.reapplyLastPosition()),Zc(0))??be();return $e(e,t).pipe(We(()=>this._zone.run(()=>{let n=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),n!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),ct(1)).subscribe(n=>this._setValueAndClose(n))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let t=this.autocomplete;return t&&t.displayWith?t.displayWith(e):e}_assignOptionValue(e){let t=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(t??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let t=this.autocomplete,n=e?e.source:this._pendingAutoselectedOption;n?(this._clearPreviousSelectedOption(n),this._assignOptionValue(n.value),this._onChange(n.value),t._emitSelectEvent(n),this._element.nativeElement.focus()):t.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,t){this.autocomplete?.options?.forEach(n=>{n!==e&&n.selected&&n.deselect(t)})}_openPanelInternal(e=this._element.nativeElement.value){this._attachOverlay(e),this._floatLabel()}_attachOverlay(e){if(!this.autocomplete)return;let t=this._overlayRef;t?(this._positionStrategy.setOrigin(this._getConnectedElement()),t.updateSize({width:this._getPanelWidth()})):(this._portal=new It(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),t=Xt(this._injector,this._getOverlayConfig()),this._overlayRef=t,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&t&&t.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(Rr.HandsetLandscape).subscribe(a=>{a.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),t&&!t.hasAttached()&&(t.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let n=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this.panelOpen&&n!==this.panelOpen&&this._emitOpened()}_handlePanelKeydown=e=>{(e.keyCode===27&&!Ge(e)||e.keyCode===38&&Ge(e,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),e.stopPropagation(),e.preventDefault())};_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let e=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=e.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=e.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=void 0}_getOverlayConfig(){return new Yt({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,hasBackdrop:this._defaults?.hasBackdrop,backdropClass:this._defaults?.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this._overlayPanelClass,disableAnimations:this._animationsDisabled})}_getOverlayPosition(){let e=qi(this._injector,this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1).withPopoverLocation("inline");return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let t=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],n=this._aboveClass,a=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:n},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:n}],r;this.position==="above"?r=a:this.position==="below"?r=t:r=[...t,...a],e.withPositions(r)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let e=this.autocomplete;if(e.autoActiveFirstOption){let t=-1;for(let n=0;n<e.options.length;n++)if(!e.options.get(n).disabled){t=n;break}e._keyManager.setActiveItem(t)}else e._keyManager.setActiveItem(-1)}_canOpen(){let e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this.autocompleteDisabled}_scrollToOption(e){let t=this.autocomplete,n=As(e,t.options,t.optionGroups);if(e===0&&n===1)t._setScrollTop(0);else if(t.panel){let a=t.options.toArray()[e];if(a){let r=a._getHostElement(),u=Ts(r.offsetTop,r.offsetHeight,t._getScrollTop(),t.panel.nativeElement.offsetHeight);t._setScrollTop(u)}}}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(t,n){t&1&&E("focusin",function(){return n._handleFocus()})("blur",function(){return n._onTouched()})("input",function(r){return n._handleInput(r)})("keydown",function(r){return n._handleKeydown(r)})("click",function(){return n._handleClick()}),t&2&&Z("autocomplete",n.autocompleteAttribute)("role",n.autocompleteDisabled?null:"combobox")("aria-autocomplete",n.autocompleteDisabled?null:"list")("aria-activedescendant",n.panelOpen&&n.activeOption?n.activeOption.id:null)("aria-expanded",n.autocompleteDisabled?null:n.panelOpen.toString())("aria-controls",n.autocompleteDisabled||!n.panelOpen?null:n.autocomplete?.id)("aria-haspopup",n.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",L]},exportAs:["matAutocompleteTrigger"],features:[ee([zb]),Ee]})}return i})(),Dn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[Vt,Po,yi,Po,te]})}return i})();var Hb=(i,o)=>o.command;function Ub(i,o){i&1&&(s(0,"mat-error"),m(1,"Required"),l())}function Gb(i,o){i&1&&(s(0,"mat-error"),m(1,"Starts with letter, alphanumeric + hyphens/underscores, max 128 chars"),l())}function $b(i,o){i&1&&(s(0,"mat-error"),m(1,"Required"),l())}function Wb(i,o){if(i&1&&(s(0,"mat-option",6)(1,"span",12),m(2),l(),s(3,"span",13),m(4),l()()),i&2){let e=o.$implicit;x("value",e.command),c(2),B(e.command),c(2),pe("(",e.from,")")}}var qb="^[a-zA-Z][a-zA-Z0-9_-]{0,127}$",lp=(()=>{class i{constructor(){this.fb=d(hn),this.dialogRef=d(ut),this.data=d(Wn),this.isEdit=this.data.config!==null,this.isClone=this.data.clone===!0,this.form=this.fb.group({name:[this.data.config?.name??"",{validators:[st.required,st.pattern(qb)]}],command:[this.data.config?.command??"",st.required],flagsText:[""],envText:[""]}),this.allExistingCommands=$(()=>{let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e)r.name!==t&&(n.has(r.command)||(n.add(r.command),a.push({command:r.command,from:r.name})));return a}),this._commandValue=T(this.data.config?.command??""),this.commandValue=this._commandValue.asReadonly(),this.filteredCommands=$(()=>{let e=this.commandValue()?.toLowerCase()??"";return this.allExistingCommands().filter(t=>t.command.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))})}get nameControl(){return this.form.get("name")}get commandControl(){return this.form.get("command")}ngOnInit(){if(this.commandControl.valueChanges.subscribe(e=>this._commandValue.set(e)),this.data.config?.flags?.length&&this.form.get("flagsText").setValue(this.data.config.flags.join(`
3952
3952
  `)+`
3953
3953
  `),this.data.config?.environment){let e=Object.entries(this.data.config.environment).map(([t,n])=>`${t}=${n}`).join(`
3954
3954
  `);e&&this.form.get("envText").setValue(e+`
3955
3955
  `)}}save(){if(this.form.invalid)return;let e=[];for(let a of this.form.get("flagsText").value.split(`
3956
3956
  `)){let r=a.trim();r&&!r.startsWith("#")&&e.push(r)}let t={};for(let a of this.form.get("envText").value.split(`
3957
- `)){let r=a.trim();if(!r||r.startsWith("#"))continue;let u=r.indexOf("=");u<=0||(t[r.slice(0,u).trim()]=r.slice(u+1))}let n={name:this.nameControl.value.trim(),type:"generic",command:this.commandControl.value.trim(),flags:e,environment:t};this.dialogRef.close(n)}cancel(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=T({type:i,selectors:[["app-service-dialog"]],decls:32,vars:8,consts:[["commandAuto","matAutocomplete"],["mat-dialog-title",""],[1,"dialog-form",3,"formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","name","placeholder","e.g. llama-server",3,"disabled"],["matInput","","formControlName","command","placeholder","/path/to/llama-server",3,"matAutocomplete"],[3,"value"],["matInput","","formControlName","flagsText","rows","6","wrap","off","placeholder",`--model /path/to/model.gguf
3957
+ `)){let r=a.trim();if(!r||r.startsWith("#"))continue;let u=r.indexOf("=");u<=0||(t[r.slice(0,u).trim()]=r.slice(u+1))}let n={name:this.nameControl.value.trim(),type:"generic",command:this.commandControl.value.trim(),flags:e,environment:t};this.dialogRef.close(n)}cancel(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=I({type:i,selectors:[["app-service-dialog"]],decls:32,vars:8,consts:[["commandAuto","matAutocomplete"],["mat-dialog-title",""],[1,"dialog-form",3,"formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","name","placeholder","e.g. llama-server",3,"disabled"],["matInput","","formControlName","command","placeholder","/path/to/llama-server",3,"matAutocomplete"],[3,"value"],["matInput","","formControlName","flagsText","rows","6","wrap","off","placeholder",`--model /path/to/model.gguf
3958
3958
  --ctx-size 4096
3959
3959
  --verbose`,1,"flags-textarea"],["matInput","","formControlName","envText","rows","4","wrap","off","placeholder",`HF_HOME=/data/huggingface
3960
3960
  CUDA_VISIBLE_DEVICES=0,1
3961
- MY_API_KEY=secret`,1,"env-textarea"],["align","end"],["mat-stroked-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"auto-path"],[1,"auto-from"]],template:function(t,n){if(t&1&&(s(0,"h2",1),m(1),l(),s(2,"mat-dialog-content")(3,"form",2)(4,"mat-form-field",3),_(5,"input",4),b(),s(6,"mat-label"),m(7,"Service Name"),l(),M(8,jb,2,0,"mat-error")(9,Hb,2,0,"mat-error"),l(),s(10,"mat-form-field",3),_(11,"input",5),b(),s(12,"mat-label"),m(13,"Command (absolute path)"),l(),M(14,Ub,2,0,"mat-error"),l(),s(15,"mat-autocomplete",null,0),me(17,Gb,5,3,"mat-option",6,zb),l(),s(19,"mat-form-field",3),_(20,"textarea",7),b(),s(21,"mat-label"),m(22,"CLI Flags (one per line)"),l()(),s(23,"mat-form-field",3),_(24,"textarea",8),b(),s(25,"mat-label"),m(26,"Environment variables (KEY=VALUE, one per line)"),l()()()(),s(27,"mat-dialog-actions",9)(28,"button",10),A("click",function(){return n.cancel()}),m(29,"Cancel"),l(),s(30,"button",11),A("click",function(){return n.save()}),m(31),l()()),t&2){let a=Fe(16);c(),he("",n.isClone?"Clone":n.isEdit?"Edit":"Add"," custom service"),c(2),C("formGroup",n.form),c(2),C("disabled",n.isEdit&&!n.isClone),y(),c(3),E(n.nameControl.errors?.required?8:n.nameControl.errors?.pattern?9:-1),c(3),C("matAutocomplete",a),y(),c(3),E(n.commandControl.errors?.required?14:-1),c(3),ue(n.filteredCommands()),c(3),y(),c(4),y(),c(6),C("disabled",n.form.invalid),c(),he(" ",n.isEdit&&!n.isClone?"Save":"Create"," ")}},dependencies:[ze,hn,Co,Ei,Ai,mn,pn,Ut,ji,xn,Cn,vt,Wi,Qe,it,ti,ei,St,Ot,fn,Lt,oi,ri,ai],styles:[".dialog-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;min-width:480px}.auto-path[_ngcontent-%COMP%]{font-family:monospace}.auto-from[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}.full-width[_ngcontent-%COMP%]{width:100%}.flags-textarea[_ngcontent-%COMP%], .env-textarea[_ngcontent-%COMP%]{overflow-x:auto}mat-dialog-content[_ngcontent-%COMP%]{padding-top:10px!important}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}"]})}}return i})();var Wb=["*"],lp=(()=>{class i{labelPosition="after";static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(t,n){t&2&&p("mdc-form-field--align-end",n.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},ngContentSelectors:Wb,decls:1,vars:0,template:function(t,n){t&1&&(ce(),U(0))},styles:[`.mat-internal-form-field {
3961
+ MY_API_KEY=secret`,1,"env-textarea"],["align","end"],["mat-stroked-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"auto-path"],[1,"auto-from"]],template:function(t,n){if(t&1&&(s(0,"h2",1),m(1),l(),s(2,"mat-dialog-content")(3,"form",2)(4,"mat-form-field",3),_(5,"input",4),b(),s(6,"mat-label"),m(7,"Service Name"),l(),k(8,Ub,2,0,"mat-error")(9,Gb,2,0,"mat-error"),l(),s(10,"mat-form-field",3),_(11,"input",5),b(),s(12,"mat-label"),m(13,"Command (absolute path)"),l(),k(14,$b,2,0,"mat-error"),l(),s(15,"mat-autocomplete",null,0),ue(17,Wb,5,3,"mat-option",6,Hb),l(),s(19,"mat-form-field",3),_(20,"textarea",7),b(),s(21,"mat-label"),m(22,"CLI Flags (one per line)"),l()(),s(23,"mat-form-field",3),_(24,"textarea",8),b(),s(25,"mat-label"),m(26,"Environment variables (KEY=VALUE, one per line)"),l()()()(),s(27,"mat-dialog-actions",9)(28,"button",10),E("click",function(){return n.cancel()}),m(29,"Cancel"),l(),s(30,"button",11),E("click",function(){return n.save()}),m(31),l()()),t&2){let a=Le(16);c(),pe("",n.isClone?"Clone":n.isEdit?"Edit":"Add"," custom service"),c(2),x("formGroup",n.form),c(2),x("disabled",n.isEdit&&!n.isClone),y(),c(3),M(n.nameControl.errors?.required?8:n.nameControl.errors?.pattern?9:-1),c(3),x("matAutocomplete",a),y(),c(3),M(n.commandControl.errors?.required?14:-1),c(3),he(n.filteredCommands()),c(3),y(),c(4),y(),c(6),x("disabled",n.form.invalid),c(),pe(" ",n.isEdit&&!n.isClone?"Save":"Create"," ")}},dependencies:[Pe,pn,xo,Ri,Oi,un,fn,Wt,Gi,Dn,wn,Ct,Ki,Ke,Xe,oi,ni,Et,Lt,gn,bt,Bt,zt,si],styles:[".dialog-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;min-width:480px}.auto-path[_ngcontent-%COMP%]{font-family:monospace}.auto-from[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}.full-width[_ngcontent-%COMP%]{width:100%}.flags-textarea[_ngcontent-%COMP%], .env-textarea[_ngcontent-%COMP%]{overflow-x:auto}mat-dialog-content[_ngcontent-%COMP%]{padding-top:10px!important}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}"]})}}return i})();var Kb=["*"],cp=(()=>{class i{labelPosition="after";static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(t,n){t&2&&p("mdc-form-field--align-end",n.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},ngContentSelectors:Kb,decls:1,vars:0,template:function(t,n){t&1&&(fe(),G(0))},styles:[`.mat-internal-form-field {
3962
3962
  -moz-osx-font-smoothing: grayscale;
3963
3963
  -webkit-font-smoothing: antialiased;
3964
3964
  display: inline-flex;
@@ -3992,7 +3992,7 @@ MY_API_KEY=secret`,1,"env-textarea"],["align","end"],["mat-stroked-button","",3,
3992
3992
  padding-left: 4px;
3993
3993
  padding-right: 0;
3994
3994
  }
3995
- `],encapsulation:2})}return i})();var qb=["input"],Kb=["label"],Yb=["*"],Lc={color:"accent",clickAction:"check-indeterminate",disabledInteractive:!1},Xb=new x("mat-checkbox-default-options",{providedIn:"root",factory:()=>Lc}),bt=(function(i){return i[i.Init=0]="Init",i[i.Checked=1]="Checked",i[i.Unchecked=2]="Unchecked",i[i.Indeterminate=3]="Indeterminate",i})(bt||{}),Vc=class{source;checked},Bc=(()=>{class i{_elementRef=d(N);_changeDetectorRef=d(te);_ngZone=d(H);_animationsDisabled=pe();_options=d(Xb,{optional:!0});focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){let t=new Vc;return t.source=this,t.checked=e,t}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"};ariaLabel="";ariaLabelledby=null;ariaDescribedby;ariaExpanded;ariaControls;ariaOwns;_uniqueId;id;get inputId(){return`${this.id||this._uniqueId}-input`}required=!1;labelPosition="after";name=null;change=new K;indeterminateChange=new K;value;disableRipple=!1;_inputElement;_labelElement;tabIndex;color;disabledInteractive;_onTouched=()=>{};_currentAnimationClass="";_currentCheckState=bt.Init;_controlValueAccessorChangeFn=()=>{};_validatorChangeFn=()=>{};constructor(){d(Le).load(Mt);let e=d(new Di("tabindex"),{optional:!0});this._options=this._options||Lc,this.color=this._options.color||Lc.color,this.tabIndex=e==null?0:parseInt(e)||0,this.id=this._uniqueId=d(be).getId("mat-mdc-checkbox-"),this.disabledInteractive=this._options?.disabledInteractive??!1}ngOnChanges(e){e.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this.indeterminate)}get checked(){return this._checked}set checked(e){e!=this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())}_checked=!1;get disabled(){return this._disabled}set disabled(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}_disabled=!1;get indeterminate(){return this._indeterminate()}set indeterminate(e){let t=e!=this._indeterminate();this._indeterminate.set(e),t&&(e?this._transitionCheckState(bt.Indeterminate):this._transitionCheckState(this.checked?bt.Checked:bt.Unchecked),this.indeterminateChange.emit(e)),this._syncIndeterminate(e)}_indeterminate=I(!1);_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}validate(e){return this.required&&e.value!==!0?{required:!0}:null}registerOnValidatorChange(e){this._validatorChangeFn=e}_transitionCheckState(e){let t=this._currentCheckState,n=this._getAnimationTargetElement();if(!(t===e||!n)&&(this._currentAnimationClass&&n.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(t,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){n.classList.add(this._currentAnimationClass);let a=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{n.classList.remove(a)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let e=this._options?.clickAction;!this.disabled&&e!=="noop"?(this.indeterminate&&e!=="check"&&Promise.resolve().then(()=>{this._indeterminate.set(!1),this.indeterminateChange.emit(!1)}),this._checked=!this._checked,this._transitionCheckState(this._checked?bt.Checked:bt.Unchecked),this._emitChangeEvent()):(this.disabled&&this.disabledInteractive||!this.disabled&&e==="noop")&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,t){if(this._animationsDisabled)return"";switch(e){case bt.Init:if(t===bt.Checked)return this._animationClasses.uncheckedToChecked;if(t==bt.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case bt.Unchecked:return t===bt.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case bt.Checked:return t===bt.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case bt.Indeterminate:return t===bt.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){let t=this._inputElement;t&&(t.nativeElement.indeterminate=e)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["mat-checkbox"]],viewQuery:function(t,n){if(t&1&&Me(qb,5)(Kb,5),t&2){let a;P(a=F())&&(n._inputElement=a.first),P(a=F())&&(n._labelElement=a.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(t,n){t&2&&(dt("id",n.id),Z("tabindex",null)("aria-label",null)("aria-labelledby",null),et(n.color?"mat-"+n.color:"mat-accent"),p("_mat-animation-noopable",n._animationsDisabled)("mdc-checkbox--disabled",n.disabled)("mat-mdc-checkbox-disabled",n.disabled)("mat-mdc-checkbox-checked",n.checked)("mat-mdc-checkbox-disabled-interactive",n.disabledInteractive))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],ariaExpanded:[2,"aria-expanded","ariaExpanded",L],ariaControls:[0,"aria-controls","ariaControls"],ariaOwns:[0,"aria-owns","ariaOwns"],id:"id",required:[2,"required","required",L],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",L],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?void 0:wt(e)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",L],checked:[2,"checked","checked",L],disabled:[2,"disabled","disabled",L],indeterminate:[2,"indeterminate","indeterminate",L]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[J([{provide:Mi,useExisting:nt(()=>i),multi:!0},{provide:zi,useExisting:i,multi:!0}]),ke],ngContentSelectors:Yb,decls:15,vars:23,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],["aria-hidden","true",1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],["aria-hidden","true",1,"mdc-checkbox__ripple"],["aria-hidden","true",1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","","aria-hidden","true",1,"mat-mdc-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(t,n){if(t&1&&(ce(),s(0,"div",3),A("click",function(r){return n._preventBubblingFromLabel(r)}),s(1,"div",4,0)(3,"div",5),A("click",function(){return n._onTouchTargetClick()}),l(),s(4,"input",6,1),A("blur",function(){return n._onBlur()})("click",function(){return n._onInputClick()})("change",function(r){return n._onInteractionEvent(r)}),l(),_(6,"div",7),s(7,"div",8),wi(),s(8,"svg",9),_(9,"path",10),l(),Gs(),_(10,"div",11),l(),_(11,"div",12),l(),s(12,"label",13,2),U(14),l()()),t&2){let a=Fe(2);C("labelPosition",n.labelPosition),c(4),p("mdc-checkbox--selected",n.checked),C("checked",n.checked)("indeterminate",n.indeterminate)("disabled",n.disabled&&!n.disabledInteractive)("id",n.inputId)("required",n.required)("tabIndex",n.disabled&&!n.disabledInteractive?-1:n.tabIndex),Z("aria-label",n.ariaLabel||null)("aria-labelledby",n.ariaLabelledby)("aria-describedby",n.ariaDescribedby)("aria-checked",n.indeterminate?"mixed":null)("aria-controls",n.ariaControls)("aria-disabled",n.disabled&&n.disabledInteractive?!0:null)("aria-expanded",n.ariaExpanded)("aria-owns",n.ariaOwns)("name",n.name)("value",n.value),c(7),C("matRippleTrigger",a)("matRippleDisabled",n.disableRipple||n.disabled)("matRippleCentered",!0),c(),C("for",n.inputId)}},dependencies:[So,lp],styles:[`.mdc-checkbox {
3995
+ `],encapsulation:2})}return i})();var Yb=["input"],Xb=["label"],Zb=["*"],Vc={color:"accent",clickAction:"check-indeterminate",disabledInteractive:!1},Qb=new w("mat-checkbox-default-options",{providedIn:"root",factory:()=>Vc}),xt=(function(i){return i[i.Init=0]="Init",i[i.Checked=1]="Checked",i[i.Unchecked=2]="Unchecked",i[i.Indeterminate=3]="Indeterminate",i})(xt||{}),Bc=class{source;checked},zc=(()=>{class i{_elementRef=d(N);_changeDetectorRef=d(ie);_ngZone=d(U);_animationsDisabled=_e();_options=d(Qb,{optional:!0});focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){let t=new Bc;return t.source=this,t.checked=e,t}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"};ariaLabel="";ariaLabelledby=null;ariaDescribedby;ariaExpanded;ariaControls;ariaOwns;_uniqueId;id;get inputId(){return`${this.id||this._uniqueId}-input`}required=!1;labelPosition="after";name=null;change=new K;indeterminateChange=new K;value;disableRipple=!1;_inputElement;_labelElement;tabIndex;color;disabledInteractive;_onTouched=()=>{};_currentAnimationClass="";_currentCheckState=xt.Init;_controlValueAccessorChangeFn=()=>{};_validatorChangeFn=()=>{};constructor(){d(Be).load(Tt);let e=d(new Ei("tabindex"),{optional:!0});this._options=this._options||Vc,this.color=this._options.color||Vc.color,this.tabIndex=e==null?0:parseInt(e)||0,this.id=this._uniqueId=d(xe).getId("mat-mdc-checkbox-"),this.disabledInteractive=this._options?.disabledInteractive??!1}ngOnChanges(e){e.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this.indeterminate)}get checked(){return this._checked}set checked(e){e!=this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())}_checked=!1;get disabled(){return this._disabled}set disabled(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}_disabled=!1;get indeterminate(){return this._indeterminate()}set indeterminate(e){let t=e!=this._indeterminate();this._indeterminate.set(e),t&&(e?this._transitionCheckState(xt.Indeterminate):this._transitionCheckState(this.checked?xt.Checked:xt.Unchecked),this.indeterminateChange.emit(e)),this._syncIndeterminate(e)}_indeterminate=T(!1);_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}validate(e){return this.required&&e.value!==!0?{required:!0}:null}registerOnValidatorChange(e){this._validatorChangeFn=e}_transitionCheckState(e){let t=this._currentCheckState,n=this._getAnimationTargetElement();if(!(t===e||!n)&&(this._currentAnimationClass&&n.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(t,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){n.classList.add(this._currentAnimationClass);let a=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{n.classList.remove(a)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let e=this._options?.clickAction;!this.disabled&&e!=="noop"?(this.indeterminate&&e!=="check"&&Promise.resolve().then(()=>{this._indeterminate.set(!1),this.indeterminateChange.emit(!1)}),this._checked=!this._checked,this._transitionCheckState(this._checked?xt.Checked:xt.Unchecked),this._emitChangeEvent()):(this.disabled&&this.disabledInteractive||!this.disabled&&e==="noop")&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,t){if(this._animationsDisabled)return"";switch(e){case xt.Init:if(t===xt.Checked)return this._animationClasses.uncheckedToChecked;if(t==xt.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case xt.Unchecked:return t===xt.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case xt.Checked:return t===xt.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case xt.Indeterminate:return t===xt.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){let t=this._inputElement;t&&(t.nativeElement.indeterminate=e)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["mat-checkbox"]],viewQuery:function(t,n){if(t&1&&Ae(Yb,5)(Xb,5),t&2){let a;P(a=F())&&(n._inputElement=a.first),P(a=F())&&(n._labelElement=a.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(t,n){t&2&&(dt("id",n.id),Z("tabindex",null)("aria-label",null)("aria-labelledby",null),tt(n.color?"mat-"+n.color:"mat-accent"),p("_mat-animation-noopable",n._animationsDisabled)("mdc-checkbox--disabled",n.disabled)("mat-mdc-checkbox-disabled",n.disabled)("mat-mdc-checkbox-checked",n.checked)("mat-mdc-checkbox-disabled-interactive",n.disabledInteractive))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],ariaExpanded:[2,"aria-expanded","ariaExpanded",L],ariaControls:[0,"aria-controls","ariaControls"],ariaOwns:[0,"aria-owns","ariaOwns"],id:"id",required:[2,"required","required",L],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",L],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?void 0:kt(e)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",L],checked:[2,"checked","checked",L],disabled:[2,"disabled","disabled",L],indeterminate:[2,"indeterminate","indeterminate",L]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[ee([{provide:Ii,useExisting:nt(()=>i),multi:!0},{provide:Ui,useExisting:i,multi:!0}]),Ee],ngContentSelectors:Zb,decls:15,vars:23,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],["aria-hidden","true",1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],["aria-hidden","true",1,"mdc-checkbox__ripple"],["aria-hidden","true",1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","","aria-hidden","true",1,"mat-mdc-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(t,n){if(t&1&&(fe(),s(0,"div",3),E("click",function(r){return n._preventBubblingFromLabel(r)}),s(1,"div",4,0)(3,"div",5),E("click",function(){return n._onTouchTargetClick()}),l(),s(4,"input",6,1),E("blur",function(){return n._onBlur()})("click",function(){return n._onInputClick()})("change",function(r){return n._onInteractionEvent(r)}),l(),_(6,"div",7),s(7,"div",8),ki(),s(8,"svg",9),_(9,"path",10),l(),$s(),_(10,"div",11),l(),_(11,"div",12),l(),s(12,"label",13,2),G(14),l()()),t&2){let a=Le(2);x("labelPosition",n.labelPosition),c(4),p("mdc-checkbox--selected",n.checked),x("checked",n.checked)("indeterminate",n.indeterminate)("disabled",n.disabled&&!n.disabledInteractive)("id",n.inputId)("required",n.required)("tabIndex",n.disabled&&!n.disabledInteractive?-1:n.tabIndex),Z("aria-label",n.ariaLabel||null)("aria-labelledby",n.ariaLabelledby)("aria-describedby",n.ariaDescribedby)("aria-checked",n.indeterminate?"mixed":null)("aria-controls",n.ariaControls)("aria-disabled",n.disabled&&n.disabledInteractive?!0:null)("aria-expanded",n.ariaExpanded)("aria-owns",n.ariaOwns)("name",n.name)("value",n.value),c(7),x("matRippleTrigger",a)("matRippleDisabled",n.disableRipple||n.disabled)("matRippleCentered",!0),c(),x("for",n.inputId)}},dependencies:[ko,cp],styles:[`.mdc-checkbox {
3996
3996
  display: inline-block;
3997
3997
  position: relative;
3998
3998
  flex: 0 0 18px;
@@ -4465,7 +4465,7 @@ MY_API_KEY=secret`,1,"env-textarea"],["align","end"],["mat-stroked-button","",3,
4465
4465
  .mdc-checkbox__native-control:focus-visible ~ .mat-focus-indicator::before {
4466
4466
  content: "";
4467
4467
  }
4468
- `],encapsulation:2})}return i})(),Fo=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[Bc,ee]})}return i})();var Ha=(()=>{class i{get vertical(){return this._vertical}set vertical(e){this._vertical=mt(e)}_vertical=!1;get inset(){return this._inset}set inset(e){this._inset=mt(e)}_inset=!1;static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(t,n){t&2&&(Z("aria-orientation",n.vertical?"vertical":"horizontal"),p("mat-divider-vertical",n.vertical)("mat-divider-horizontal",!n.vertical)("mat-divider-inset",n.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(t,n){},styles:[`.mat-divider {
4468
+ `],encapsulation:2})}return i})(),Fo=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[zc,te]})}return i})();var Ua=(()=>{class i{get vertical(){return this._vertical}set vertical(e){this._vertical=mt(e)}_vertical=!1;get inset(){return this._inset}set inset(e){this._inset=mt(e)}_inset=!1;static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(t,n){t&2&&(Z("aria-orientation",n.vertical?"vertical":"horizontal"),p("mat-divider-vertical",n.vertical)("mat-divider-horizontal",!n.vertical)("mat-divider-inset",n.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(t,n){},styles:[`.mat-divider {
4469
4469
  display: block;
4470
4470
  margin: 0;
4471
4471
  border-top-style: solid;
@@ -4485,7 +4485,7 @@ MY_API_KEY=secret`,1,"env-textarea"],["align","end"],["mat-stroked-button","",3,
4485
4485
  margin-left: auto;
4486
4486
  margin-right: 80px;
4487
4487
  }
4488
- `],encapsulation:2})}return i})(),No=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[ee]})}return i})();var Qb=["*"],Jb=`.mdc-list {
4488
+ `],encapsulation:2})}return i})(),No=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[te]})}return i})();var e0=["*"],t0=`.mdc-list {
4489
4489
  margin: 0;
4490
4490
  padding: 8px 0;
4491
4491
  list-style-type: none;
@@ -5029,7 +5029,7 @@ mat-action-list button::-moz-focus-inner {
5029
5029
  .mat-mdc-nav-list .mat-mdc-list-item.mdc-list-item--activated {
5030
5030
  background-color: var(--mat-list-active-indicator-color, var(--mat-sys-secondary-container));
5031
5031
  }
5032
- `,e0=["unscopedContent"],t0=["text"],i0=[[["","matListItemAvatar",""],["","matListItemIcon",""]],[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["","matListItemMeta",""]],[["mat-divider"]]],n0=["[matListItemAvatar],[matListItemIcon]","[matListItemTitle]","[matListItemLine]","*","[matListItemMeta]","mat-divider"];var o0=new x("ListOption"),a0=(()=>{class i{_elementRef=d(N);static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]})}return i})(),r0=(()=>{class i{_elementRef=d(N);static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]})}return i})(),s0=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","matListItemMeta",""]],hostAttrs:[1,"mat-mdc-list-item-meta","mdc-list-item__end"]})}return i})(),cp=(()=>{class i{_listOption=d(o0,{optional:!0});_isAlignedAtStart(){return!this._listOption||this._listOption?._getTogglePosition()==="after"}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,hostVars:4,hostBindings:function(t,n){t&2&&p("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}})}return i})(),l0=(()=>{class i extends cp{static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[Q]})}return i})(),c0=(()=>{class i extends cp{static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[Q]})}return i})(),d0=new x("MAT_LIST_CONFIG"),zc=(()=>{class i{_isNonInteractive=!0;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=mt(e)}_disableRipple=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(mt(e))}_disabled=I(!1);_defaultOptions=d(d0,{optional:!0});static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,hostVars:1,hostBindings:function(t,n){t&2&&Z("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}})}return i})(),m0=(()=>{class i{_elementRef=d(N);_ngZone=d(H);_listBase=d(zc,{optional:!0});_platform=d(le);_hostElement;_isButtonElement;_noopAnimations=pe();_avatars;_icons;set lines(e){this._explicitLines=Ht(e,null),this._updateItemLines(!1)}_explicitLines=null;get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=mt(e)}_disableRipple=!1;get disabled(){return this._disabled()||!!this._listBase?.disabled}set disabled(e){this._disabled.set(mt(e))}_disabled=I(!1);_subscriptions=new De;_rippleRenderer=null;_hasUnscopedTextContent=!1;rippleConfig;get rippleDisabled(){return this.disableRipple||!!this.rippleConfig.disabled}constructor(){d(Le).load(Mt);let e=d(Un,{optional:!0});this.rippleConfig=e||{},this._hostElement=this._elementRef.nativeElement,this._isButtonElement=this._hostElement.nodeName.toLowerCase()==="button",this._listBase&&!this._listBase._isNonInteractive&&this._initInteractiveListItem(),this._isButtonElement&&!this._hostElement.hasAttribute("type")&&this._hostElement.setAttribute("type","button")}ngAfterViewInit(){this._monitorProjectedLinesAndTitle(),this._updateItemLines(!0)}ngOnDestroy(){this._subscriptions.unsubscribe(),this._rippleRenderer!==null&&this._rippleRenderer._removeTriggerEvents()}_hasIconOrAvatar(){return!!(this._avatars.length||this._icons.length)}_initInteractiveListItem(){this._hostElement.classList.add("mat-mdc-list-item-interactive"),this._rippleRenderer=new Hn(this,this._ngZone,this._hostElement,this._platform,d(X)),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add($e(this._lines.changes,this._titles.changes).subscribe(()=>this._updateItemLines(!1)))})}_updateItemLines(e){if(!this._lines||!this._titles||!this._unscopedContent)return;e&&this._checkDomForUnscopedTextContent();let t=this._explicitLines??this._inferLinesFromContent(),n=this._unscopedContent.nativeElement;if(this._hostElement.classList.toggle("mat-mdc-list-item-single-line",t<=1),this._hostElement.classList.toggle("mdc-list-item--with-one-line",t<=1),this._hostElement.classList.toggle("mdc-list-item--with-two-lines",t===2),this._hostElement.classList.toggle("mdc-list-item--with-three-lines",t===3),this._hasUnscopedTextContent){let a=this._titles.length===0&&t===1;n.classList.toggle("mdc-list-item__primary-text",a),n.classList.toggle("mdc-list-item__secondary-text",!a)}else n.classList.remove("mdc-list-item__primary-text"),n.classList.remove("mdc-list-item__secondary-text")}_inferLinesFromContent(){let e=this._titles.length+this._lines.length;return this._hasUnscopedTextContent&&(e+=1),e}_checkDomForUnscopedTextContent(){this._hasUnscopedTextContent=Array.from(this._unscopedContent.nativeElement.childNodes).filter(e=>e.nodeType!==e.COMMENT_NODE).some(e=>!!(e.textContent&&e.textContent.trim()))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,contentQueries:function(t,n,a){if(t&1&&at(a,l0,4)(a,c0,4),t&2){let r;P(r=F())&&(n._avatars=r),P(r=F())&&(n._icons=r)}},hostVars:4,hostBindings:function(t,n){t&2&&(Z("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),p("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}})}return i})();var dp=(()=>{class i extends zc{static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275cmp=T({type:i,selectors:[["mat-list"]],hostAttrs:[1,"mat-mdc-list","mat-mdc-list-base","mdc-list"],exportAs:["matList"],features:[J([{provide:zc,useExisting:i}]),Q],ngContentSelectors:Qb,decls:1,vars:0,template:function(t,n){t&1&&(ce(),U(0))},styles:[Jb],encapsulation:2})}return i})(),mp=(()=>{class i extends m0{_lines;_titles;_meta;_unscopedContent;_itemText;get activated(){return this._activated}set activated(e){this._activated=mt(e)}_activated=!1;_getAriaCurrent(){return this._hostElement.nodeName==="A"&&this._activated?"page":null}_hasBothLeadingAndTrailing(){return this._meta.length!==0&&(this._avatars.length!==0||this._icons.length!==0)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=_e(i)))(n||i)}})();static \u0275cmp=T({type:i,selectors:[["mat-list-item"],["a","mat-list-item",""],["button","mat-list-item",""]],contentQueries:function(t,n,a){if(t&1&&at(a,r0,5)(a,a0,5)(a,s0,5),t&2){let r;P(r=F())&&(n._lines=r),P(r=F())&&(n._titles=r),P(r=F())&&(n._meta=r)}},viewQuery:function(t,n){if(t&1&&Me(e0,5)(t0,5),t&2){let a;P(a=F())&&(n._unscopedContent=a.first),P(a=F())&&(n._itemText=a.first)}},hostAttrs:[1,"mat-mdc-list-item","mdc-list-item"],hostVars:13,hostBindings:function(t,n){t&2&&(Z("aria-current",n._getAriaCurrent()),p("mdc-list-item--activated",n.activated)("mdc-list-item--with-leading-avatar",n._avatars.length!==0)("mdc-list-item--with-leading-icon",n._icons.length!==0)("mdc-list-item--with-trailing-meta",n._meta.length!==0)("mat-mdc-list-item-both-leading-and-trailing",n._hasBothLeadingAndTrailing())("_mat-animation-noopable",n._noopAnimations))},inputs:{activated:"activated"},exportAs:["matListItem"],features:[Q],ngContentSelectors:n0,decls:10,vars:0,consts:[["unscopedContent",""],[1,"mdc-list-item__content"],[1,"mat-mdc-list-item-unscoped-content",3,"cdkObserveContent"],[1,"mat-focus-indicator"]],template:function(t,n){t&1&&(ce(i0),U(0),s(1,"span",1),U(2,1),U(3,2),s(4,"span",2,0),A("cdkObserveContent",function(){return n._updateItemLines(!0)}),U(6,3),l()(),U(7,4),U(8,5),_(9,"div",3))},dependencies:[zm],encapsulation:2})}return i})();var up=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[fo,Ti,Is,ee,No]})}return i})();function u0(i,o){i&1&&_(0,"mat-progress-bar",5)}function h0(i,o){i&1&&(s(0,"span",13),m(1,"(removed)"),l())}function p0(i,o){i&1&&(s(0,"mat-icon"),m(1,"check_box"),l())}function f0(i,o){i&1&&(s(0,"mat-icon"),m(1,"check_box_outline_blank"),l())}function g0(i,o){if(i&1){let e=Ve();s(0,"mat-list-item")(1,"div",11)(2,"span",12),m(3),l(),M(4,h0,2,0,"span",13),s(5,"button",14),A("click",function(){let n=Ce(e).$implicit,a=w(3);return xe(a.toggle(n))}),M(6,p0,2,0,"mat-icon")(7,f0,2,0,"mat-icon"),l()()()}if(i&2){let e=o.$implicit,t=w(3);p("orphaned",t.isOrphaned(e)),c(3),W(e),c(),E(t.isOrphaned(e)?4:-1),c(),Z("aria-label","Toggle "+e),c(),E(t.isManaged(e)?6:7)}}function _0(i,o){if(i&1&&(s(0,"mat-list"),me(1,g0,8,6,"mat-list-item",10,xt),l()),i&2){let e=w(2);c(),ue(e.filteredServices)}}function v0(i,o){if(i&1&&m(0),i&2){let e=w(3);he(' No services match "',e.filter(),'" ')}}function b0(i,o){i&1&&m(0," No installed services found ")}function y0(i,o){if(i&1&&(s(0,"p",9),M(1,v0,1,1)(2,b0,1,0),l()),i&2){let e=w(2);c(),E(e.filter()?1:2)}}function C0(i,o){if(i&1&&(s(0,"div",6),M(1,_0,3,0,"mat-list")(2,y0,3,1,"p",9),l()),i&2){let e=w();c(),E(e.filteredServices.length>0?1:2)}}var hp=(()=>{class i{constructor(){this.serviceService=d(_t),this.dialogRef=d(gt),this.available=I([]),this.managed=I(new Set),this.orphaned=I(new Set),this.loading=I(!0),this.filter=I("")}ngOnInit(){return ye(this,null,function*(){try{let[e,t]=yield Promise.all([Te(this.serviceService.listAvailableServices()),Te(this.serviceService.listManagedServices())]);this.available.set(e),this.managed.set(new Set(t));let n=new Set(e),a=t.filter(r=>!n.has(r));this.orphaned.set(new Set(a))}catch(e){console.error("[ManagedServicesDialog] load error:",e)}finally{this.loading.set(!1)}})}get filteredServices(){let e=this.available(),t=this.orphaned(),n=[...new Set([...e,...t])].sort(),a=this.filter();if(!a)return n;let r=a.toLowerCase();return n.filter(u=>u.toLowerCase().includes(r))}isOrphaned(e){return this.orphaned().has(e)}isManaged(e){return this.managed().has(e)}toggle(e){return ye(this,null,function*(){try{this.isManaged(e)?yield Te(this.serviceService.removeManagedService(e)):yield Te(this.serviceService.addManagedService(e));let t=new Set(this.managed());t.has(e)?t.delete(e):t.add(e),this.managed.set(t)}catch(t){console.error(`[ManagedServicesDialog] toggle error (${e}):`,t)}})}close(){this.dialogRef.close(!0)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=T({type:i,selectors:[["app-managed-services-dialog"]],decls:13,vars:2,consts:[[1,"dialog-container"],["mat-dialog-title",""],[1,"dialog-description"],["appearance","outline",1,"filter-field"],["matInput","","placeholder","Filter services...",3,"input","value"],["mode","indeterminate"],[1,"services-list"],["align","end"],["mat-raised-button","","color","primary",3,"click"],[1,"no-services"],[3,"orphaned"],[1,"service-row"],[1,"service-name"],[1,"orphaned-hint"],["mat-icon-button","",3,"click"]],template:function(t,n){t&1&&(s(0,"div",0)(1,"h2",1),m(2,"Manage services"),l(),s(3,"mat-dialog-content")(4,"p",2),m(5,"Select which system services to control."),l(),s(6,"mat-form-field",3)(7,"input",4),A("input",function(r){return n.filter.set(r.target.value)}),l()(),M(8,u0,1,0,"mat-progress-bar",5)(9,C0,3,1,"div",6),l(),s(10,"mat-dialog-actions",7)(11,"button",8),A("click",function(){return n.close()}),m(12,"Done"),l()()()),t&2&&(c(7),C("value",n.filter()),c(),E(n.loading()?8:9))},dependencies:[ze,Qe,it,Hi,Lt,oi,ri,ai,Fo,up,dp,mp,ki,en,kt,St,ti,ei,Ft,Pt],styles:[".dialog-container[_ngcontent-%COMP%]{min-width:400px;max-width:500px}mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:8px}.dialog-description[_ngcontent-%COMP%]{margin:0 0 12px;color:#666;font-size:.9rem}.filter-field[_ngcontent-%COMP%]{width:100%;margin-bottom:8px}.services-list[_ngcontent-%COMP%]{max-height:400px;overflow-y:auto}.service-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%}.service-row[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-left:auto;flex-shrink:0}.service-name[_ngcontent-%COMP%]{font-family:monospace;font-size:.95rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.no-services[_ngcontent-%COMP%]{text-align:center;color:#999;font-size:.9rem;padding:16px 0}mat-list-item.orphaned[_ngcontent-%COMP%] .service-name[_ngcontent-%COMP%]{color:#999}mat-list-item.orphaned[_ngcontent-%COMP%] .orphaned-hint[_ngcontent-%COMP%]{color:#bbb;font-size:.8rem;font-style:italic;margin-right:8px}"]})}}return i})();var pp=(i,o)=>o.name;function x0(i,o){i&1&&_(0,"mat-progress-bar",7)}function w0(i,o){if(i&1){let e=Ve();s(0,"div",11)(1,"span",12),m(2),l(),s(3,"button",13),A("click",function(){let n=Ce(e).$implicit,a=w(2);return xe(a.archive(n.name))}),s(4,"mat-icon"),m(5,"archive"),l()()()}if(i&2){let e=o.$implicit,t=w(2);c(),C("title",e.name),c(),W(e.name),c(),C("disabled",t.busy()!==null)}}function D0(i,o){if(i&1&&me(0,w0,6,3,"div",11,pp),i&2){let e=w();ue(e.active())}}function S0(i,o){i&1&&(s(0,"p",8),m(1,"No services"),l())}function k0(i,o){i&1&&_(0,"mat-progress-bar",7)}function M0(i,o){if(i&1){let e=Ve();s(0,"div",11)(1,"span",12),m(2),l(),s(3,"button",14),A("click",function(){let n=Ce(e).$implicit,a=w(2);return xe(a.restore(n.name))}),s(4,"mat-icon"),m(5,"unarchive"),l()()()}if(i&2){let e=o.$implicit,t=w(2);c(),C("title",e.name),c(),W(e.name),c(),C("disabled",t.busy()!==null)}}function E0(i,o){if(i&1&&me(0,M0,6,3,"div",11,pp),i&2){let e=w();ue(e.archived())}}function A0(i,o){i&1&&(s(0,"p",8),m(1,"Archive is empty"),l())}var fp=(()=>{class i{constructor(){this.serviceService=d(_t),this.dialogRef=d(gt),this.snackBar=d(ks),this.active=I([]),this.archived=I([]),this.loading=I(!0),this.busy=I(null),this.dirty=!1}ngOnInit(){return ye(this,null,function*(){try{let[e,t]=yield Promise.all([Te(this.serviceService.fetchConfigs()),Te(this.serviceService.fetchArchivedConfigs())]);this.active.set(e),this.archived.set(t)}catch(e){console.error("[ArchiveDialog] load error:",e)}finally{this.loading.set(!1)}})}archive(e){return ye(this,null,function*(){this.busy.set(e);try{yield Te(this.serviceService.archiveService(e)),this.move(e,this.active,this.archived),this.dirty=!0}catch(t){this.showError(`Archive "${e}": ${String(t)}`)}finally{this.busy.set(null)}})}restore(e){return ye(this,null,function*(){this.busy.set(e);try{yield Te(this.serviceService.restoreService(e)),this.move(e,this.archived,this.active),this.dirty=!0}catch(t){this.showError(`Restore "${e}": ${String(t)}`)}finally{this.busy.set(null)}})}move(e,t,n){let a=t().find(r=>r.name===e);a&&(t.set(t().filter(r=>r.name!==e)),n.set([...n(),a].sort((r,u)=>r.name.localeCompare(u.name))))}showError(e){this.snackBar.open(e,"Dismiss",{duration:6e3,horizontalPosition:"center",verticalPosition:"top"})}close(){this.dialogRef.close(this.dirty)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=T({type:i,selectors:[["app-archive-dialog"]],decls:28,vars:2,consts:[[1,"dialog-container"],["mat-dialog-title",""],[1,"dialog-description"],[1,"panels"],[1,"panel"],[1,"panel-header"],[1,"panel-list"],["mode","indeterminate"],[1,"empty-panel"],["align","end"],["mat-raised-button","","color","primary",3,"click"],[1,"panel-item"],[1,"item-name",3,"title"],["mat-icon-button","","title","Move to archive",1,"move-btn",3,"click","disabled"],["mat-icon-button","","title","Restore from archive",1,"move-btn",3,"click","disabled"]],template:function(t,n){t&1&&(s(0,"div",0)(1,"h2",1),m(2,"Archive"),l(),s(3,"mat-dialog-content")(4,"p",2),m(5," Move a service to the archive to stop, uninstall, and shelve its config. Restore it any time from the archive. "),l(),s(6,"div",3)(7,"div",4)(8,"div",5)(9,"mat-icon"),m(10,"apps"),l(),m(11," Services "),l(),s(12,"div",6),M(13,x0,1,0,"mat-progress-bar",7)(14,D0,2,0)(15,S0,2,0,"p",8),l()(),s(16,"div",4)(17,"div",5)(18,"mat-icon"),m(19,"archive"),l(),m(20," Archive "),l(),s(21,"div",6),M(22,k0,1,0,"mat-progress-bar",7)(23,E0,2,0)(24,A0,2,0,"p",8),l()()()(),s(25,"mat-dialog-actions",9)(26,"button",10),A("click",function(){return n.close()}),m(27,"Done"),l()()()),t&2&&(c(13),E(n.loading()?13:n.active().length>0?14:15),c(9),E(n.loading()?22:n.archived().length>0?23:24))},dependencies:[ze,Qe,it,Hi,Lt,oi,ri,ai,ki,en,Ft,Pt],styles:[".dialog-container[_ngcontent-%COMP%]{min-width:840px;max-width:960px}mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:8px}.dialog-description[_ngcontent-%COMP%]{margin:0 0 16px;color:#666;font-size:.9rem}.panels[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:16px}.panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;border:1px solid #e0e0e0;border-radius:8px;overflow:hidden}.panel-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:8px 12px;font-weight:600;font-size:.9rem;background-color:#f5f5f5;border-bottom:1px solid #e0e0e0}.panel-header[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.2rem;width:1.2rem;height:1.2rem}.panel-list[_ngcontent-%COMP%]{padding:4px 0;max-height:360px;overflow-y:auto}.panel-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:4px 12px}.panel-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.item-name[_ngcontent-%COMP%]{flex:1;font-family:monospace;font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.move-btn[_ngcontent-%COMP%]{flex-shrink:0}.empty-panel[_ngcontent-%COMP%]{text-align:center;color:#999;font-size:.9rem;padding:16px 0}"]})}}return i})();var gp=new x("CdkAccordion");var _p=(()=>{class i{accordion=d(gp,{optional:!0,skipSelf:!0});_changeDetectorRef=d(te);_expansionDispatcher=d(Ta);_openCloseAllSubscription=De.EMPTY;closed=new K;opened=new K;destroyed=new K;expandedChange=new K;id=d(be).getId("cdk-accordion-child-");get expanded(){return this._expanded}set expanded(e){if(this._expanded!==e){if(this._expanded=e,this.expandedChange.emit(e),e){this.opened.emit();let t=this.accordion?this.accordion.id:this.id;this._expansionDispatcher.notify(this.id,t)}else this.closed.emit();this._changeDetectorRef.markForCheck()}}_expanded=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=I(!1);_removeUniqueSelectionListener=()=>{};ngOnInit(){this._removeUniqueSelectionListener=this._expansionDispatcher.listen((e,t)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===t&&this.id!==e&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[2,"expanded","expanded",L],disabled:[2,"disabled","disabled",L]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[J([{provide:gp,useValue:void 0}])]})}return i})(),vp=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({})}return i})();var T0=["body"],I0=["bodyWrapper"],R0=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],O0=["mat-expansion-panel-header","*","mat-action-row"];function P0(i,o){}var F0=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],N0=["mat-panel-title","mat-panel-description","*"];function L0(i,o){i&1&&(Ie(0,"span",1),wi(),Ie(1,"svg",2),ht(2,"path",3),Ue()())}var bp=new x("MAT_ACCORDION"),yp=new x("MAT_EXPANSION_PANEL"),V0=(()=>{class i{_template=d(Ye);_expansionPanel=d(yp,{optional:!0});static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]})}return i})(),Cp=new x("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),Ua=(()=>{class i extends _p{_viewContainerRef=d(Xe);_animationsDisabled=pe();_document=d(q);_ngZone=d(H);_elementRef=d(N);_renderer=d(ve);_cleanupTransitionEnd;get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=e}_hideToggle=!1;get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}_togglePosition;afterExpand=new K;afterCollapse=new K;_inputChanges=new R;accordion=d(bp,{optional:!0,skipSelf:!0});_lazyContent;_body;_bodyWrapper;_portal;_headerId=d(be).getId("mat-expansion-panel-header-");constructor(){super();let e=d(Cp,{optional:!0});this._expansionDispatcher=d(Ta),e&&(this.hideToggle=e.hideToggle)}_hasSpacing(){return this.accordion?this.expanded&&this.accordion.displayMode==="default":!1}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(Se(null),we(()=>this.expanded&&!this._portal),ct(1)).subscribe(()=>{this._portal=new Et(this._lazyContent._template,this._viewContainerRef)}),this._setupAnimationEvents()}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTransitionEnd?.(),this._inputChanges.complete()}_containsFocus(){if(this._body){let e=this._document.activeElement,t=this._body.nativeElement;return e===t||t.contains(e)}return!1}_transitionEndListener=({target:e,propertyName:t})=>{e===this._bodyWrapper?.nativeElement&&t==="grid-template-rows"&&this._ngZone.run(()=>{this.expanded?this.afterExpand.emit():this.afterCollapse.emit()})};_setupAnimationEvents(){this._ngZone.runOutsideAngular(()=>{this._animationsDisabled?(this.opened.subscribe(()=>this._ngZone.run(()=>this.afterExpand.emit())),this.closed.subscribe(()=>this._ngZone.run(()=>this.afterCollapse.emit()))):setTimeout(()=>{let e=this._elementRef.nativeElement;this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this._transitionEndListener),e.classList.add("mat-expansion-panel-animations-enabled")},200)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(t,n,a){if(t&1&&at(a,V0,5),t&2){let r;P(r=F())&&(n._lazyContent=r.first)}},viewQuery:function(t,n){if(t&1&&Me(T0,5)(I0,5),t&2){let a;P(a=F())&&(n._body=a.first),P(a=F())&&(n._bodyWrapper=a.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:4,hostBindings:function(t,n){t&2&&p("mat-expanded",n.expanded)("mat-expansion-panel-spacing",n._hasSpacing())},inputs:{hideToggle:[2,"hideToggle","hideToggle",L],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[J([{provide:bp,useValue:void 0},{provide:yp,useExisting:i}]),Q,ke],ngContentSelectors:O0,decls:9,vars:4,consts:[["bodyWrapper",""],["body",""],[1,"mat-expansion-panel-content-wrapper"],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(t,n){t&1&&(ce(R0),U(0),s(1,"div",2,0)(3,"div",3,1)(5,"div",4),U(6,1),He(7,P0,0,0,"ng-template",5),l(),U(8,2),l()()),t&2&&(c(),Z("inert",n.expanded?null:""),c(2),C("id",n.id),Z("aria-labelledby",n._headerId),c(4),C("cdkPortalOutlet",n._portal))},dependencies:[Ri],styles:[`.mat-expansion-panel {
5032
+ `,i0=["unscopedContent"],n0=["text"],o0=[[["","matListItemAvatar",""],["","matListItemIcon",""]],[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["","matListItemMeta",""]],[["mat-divider"]]],a0=["[matListItemAvatar],[matListItemIcon]","[matListItemTitle]","[matListItemLine]","*","[matListItemMeta]","mat-divider"];var r0=new w("ListOption"),s0=(()=>{class i{_elementRef=d(N);static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]})}return i})(),l0=(()=>{class i{_elementRef=d(N);static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]})}return i})(),c0=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","matListItemMeta",""]],hostAttrs:[1,"mat-mdc-list-item-meta","mdc-list-item__end"]})}return i})(),dp=(()=>{class i{_listOption=d(r0,{optional:!0});_isAlignedAtStart(){return!this._listOption||this._listOption?._getTogglePosition()==="after"}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,hostVars:4,hostBindings:function(t,n){t&2&&p("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}})}return i})(),d0=(()=>{class i extends dp{static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[Q]})}return i})(),m0=(()=>{class i extends dp{static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275dir=S({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[Q]})}return i})(),u0=new w("MAT_LIST_CONFIG"),jc=(()=>{class i{_isNonInteractive=!0;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=mt(e)}_disableRipple=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(mt(e))}_disabled=T(!1);_defaultOptions=d(u0,{optional:!0});static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,hostVars:1,hostBindings:function(t,n){t&2&&Z("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}})}return i})(),h0=(()=>{class i{_elementRef=d(N);_ngZone=d(U);_listBase=d(jc,{optional:!0});_platform=d(ce);_hostElement;_isButtonElement;_noopAnimations=_e();_avatars;_icons;set lines(e){this._explicitLines=$t(e,null),this._updateItemLines(!1)}_explicitLines=null;get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=mt(e)}_disableRipple=!1;get disabled(){return this._disabled()||!!this._listBase?.disabled}set disabled(e){this._disabled.set(mt(e))}_disabled=T(!1);_subscriptions=new ke;_rippleRenderer=null;_hasUnscopedTextContent=!1;rippleConfig;get rippleDisabled(){return this.disableRipple||!!this.rippleConfig.disabled}constructor(){d(Be).load(Tt);let e=d(Gn,{optional:!0});this.rippleConfig=e||{},this._hostElement=this._elementRef.nativeElement,this._isButtonElement=this._hostElement.nodeName.toLowerCase()==="button",this._listBase&&!this._listBase._isNonInteractive&&this._initInteractiveListItem(),this._isButtonElement&&!this._hostElement.hasAttribute("type")&&this._hostElement.setAttribute("type","button")}ngAfterViewInit(){this._monitorProjectedLinesAndTitle(),this._updateItemLines(!0)}ngOnDestroy(){this._subscriptions.unsubscribe(),this._rippleRenderer!==null&&this._rippleRenderer._removeTriggerEvents()}_hasIconOrAvatar(){return!!(this._avatars.length||this._icons.length)}_initInteractiveListItem(){this._hostElement.classList.add("mat-mdc-list-item-interactive"),this._rippleRenderer=new Un(this,this._ngZone,this._hostElement,this._platform,d(X)),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add($e(this._lines.changes,this._titles.changes).subscribe(()=>this._updateItemLines(!1)))})}_updateItemLines(e){if(!this._lines||!this._titles||!this._unscopedContent)return;e&&this._checkDomForUnscopedTextContent();let t=this._explicitLines??this._inferLinesFromContent(),n=this._unscopedContent.nativeElement;if(this._hostElement.classList.toggle("mat-mdc-list-item-single-line",t<=1),this._hostElement.classList.toggle("mdc-list-item--with-one-line",t<=1),this._hostElement.classList.toggle("mdc-list-item--with-two-lines",t===2),this._hostElement.classList.toggle("mdc-list-item--with-three-lines",t===3),this._hasUnscopedTextContent){let a=this._titles.length===0&&t===1;n.classList.toggle("mdc-list-item__primary-text",a),n.classList.toggle("mdc-list-item__secondary-text",!a)}else n.classList.remove("mdc-list-item__primary-text"),n.classList.remove("mdc-list-item__secondary-text")}_inferLinesFromContent(){let e=this._titles.length+this._lines.length;return this._hasUnscopedTextContent&&(e+=1),e}_checkDomForUnscopedTextContent(){this._hasUnscopedTextContent=Array.from(this._unscopedContent.nativeElement.childNodes).filter(e=>e.nodeType!==e.COMMENT_NODE).some(e=>!!(e.textContent&&e.textContent.trim()))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,contentQueries:function(t,n,a){if(t&1&&at(a,d0,4)(a,m0,4),t&2){let r;P(r=F())&&(n._avatars=r),P(r=F())&&(n._icons=r)}},hostVars:4,hostBindings:function(t,n){t&2&&(Z("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),p("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}})}return i})();var mp=(()=>{class i extends jc{static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275cmp=I({type:i,selectors:[["mat-list"]],hostAttrs:[1,"mat-mdc-list","mat-mdc-list-base","mdc-list"],exportAs:["matList"],features:[ee([{provide:jc,useExisting:i}]),Q],ngContentSelectors:e0,decls:1,vars:0,template:function(t,n){t&1&&(fe(),G(0))},styles:[t0],encapsulation:2})}return i})(),up=(()=>{class i extends h0{_lines;_titles;_meta;_unscopedContent;_itemText;get activated(){return this._activated}set activated(e){this._activated=mt(e)}_activated=!1;_getAriaCurrent(){return this._hostElement.nodeName==="A"&&this._activated?"page":null}_hasBothLeadingAndTrailing(){return this._meta.length!==0&&(this._avatars.length!==0||this._icons.length!==0)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=ye(i)))(n||i)}})();static \u0275cmp=I({type:i,selectors:[["mat-list-item"],["a","mat-list-item",""],["button","mat-list-item",""]],contentQueries:function(t,n,a){if(t&1&&at(a,l0,5)(a,s0,5)(a,c0,5),t&2){let r;P(r=F())&&(n._lines=r),P(r=F())&&(n._titles=r),P(r=F())&&(n._meta=r)}},viewQuery:function(t,n){if(t&1&&Ae(i0,5)(n0,5),t&2){let a;P(a=F())&&(n._unscopedContent=a.first),P(a=F())&&(n._itemText=a.first)}},hostAttrs:[1,"mat-mdc-list-item","mdc-list-item"],hostVars:13,hostBindings:function(t,n){t&2&&(Z("aria-current",n._getAriaCurrent()),p("mdc-list-item--activated",n.activated)("mdc-list-item--with-leading-avatar",n._avatars.length!==0)("mdc-list-item--with-leading-icon",n._icons.length!==0)("mdc-list-item--with-trailing-meta",n._meta.length!==0)("mat-mdc-list-item-both-leading-and-trailing",n._hasBothLeadingAndTrailing())("_mat-animation-noopable",n._noopAnimations))},inputs:{activated:"activated"},exportAs:["matListItem"],features:[Q],ngContentSelectors:a0,decls:10,vars:0,consts:[["unscopedContent",""],[1,"mdc-list-item__content"],[1,"mat-mdc-list-item-unscoped-content",3,"cdkObserveContent"],[1,"mat-focus-indicator"]],template:function(t,n){t&1&&(fe(o0),G(0),s(1,"span",1),G(2,1),G(3,2),s(4,"span",2,0),E("cdkObserveContent",function(){return n._updateItemLines(!0)}),G(6,3),l()(),G(7,4),G(8,5),_(9,"div",3))},dependencies:[jm],encapsulation:2})}return i})();var hp=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[go,Pi,Is,te,No]})}return i})();function p0(i,o){i&1&&_(0,"mat-progress-bar",5)}function f0(i,o){i&1&&(s(0,"span",13),m(1,"(removed)"),l())}function g0(i,o){i&1&&(s(0,"mat-icon"),m(1,"check_box"),l())}function _0(i,o){i&1&&(s(0,"mat-icon"),m(1,"check_box_outline_blank"),l())}function v0(i,o){if(i&1){let e=Se();s(0,"mat-list-item")(1,"div",11)(2,"span",12),m(3),l(),k(4,f0,2,0,"span",13),s(5,"button",14),E("click",function(){let n=de(e).$implicit,a=C(3);return me(a.toggle(n))}),k(6,g0,2,0,"mat-icon")(7,_0,2,0,"mat-icon"),l()()()}if(i&2){let e=o.$implicit,t=C(3);p("orphaned",t.isOrphaned(e)),c(3),B(e),c(),M(t.isOrphaned(e)?4:-1),c(),Z("aria-label","Toggle "+e),c(),M(t.isManaged(e)?6:7)}}function b0(i,o){if(i&1&&(s(0,"mat-list"),ue(1,v0,8,6,"mat-list-item",10,St),l()),i&2){let e=C(2);c(),he(e.filteredServices)}}function y0(i,o){if(i&1&&m(0),i&2){let e=C(3);pe(' No services match "',e.filter(),'" ')}}function C0(i,o){i&1&&m(0," No installed services found ")}function x0(i,o){if(i&1&&(s(0,"p",9),k(1,y0,1,1)(2,C0,1,0),l()),i&2){let e=C(2);c(),M(e.filter()?1:2)}}function w0(i,o){if(i&1&&(s(0,"div",6),k(1,b0,3,0,"mat-list")(2,x0,3,1,"p",9),l()),i&2){let e=C();c(),M(e.filteredServices.length>0?1:2)}}var pp=(()=>{class i{constructor(){this.serviceService=d(yt),this.dialogRef=d(ut),this.available=T([]),this.managed=T(new Set),this.orphaned=T(new Set),this.loading=T(!0),this.filter=T("")}ngOnInit(){return oe(this,null,function*(){try{let[e,t]=yield Promise.all([we(this.serviceService.listAvailableServices()),we(this.serviceService.listManagedServices())]);this.available.set(e),this.managed.set(new Set(t));let n=new Set(e),a=t.filter(r=>!n.has(r));this.orphaned.set(new Set(a))}catch(e){console.error("[ManagedServicesDialog] load error:",e)}finally{this.loading.set(!1)}})}get filteredServices(){let e=this.available(),t=this.orphaned(),n=[...new Set([...e,...t])].sort(),a=this.filter();if(!a)return n;let r=a.toLowerCase();return n.filter(u=>u.toLowerCase().includes(r))}isOrphaned(e){return this.orphaned().has(e)}isManaged(e){return this.managed().has(e)}toggle(e){return oe(this,null,function*(){try{this.isManaged(e)?yield we(this.serviceService.removeManagedService(e)):yield we(this.serviceService.addManagedService(e));let t=new Set(this.managed());t.has(e)?t.delete(e):t.add(e),this.managed.set(t)}catch(t){console.error(`[ManagedServicesDialog] toggle error (${e}):`,t)}})}close(){this.dialogRef.close(!0)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=I({type:i,selectors:[["app-managed-services-dialog"]],decls:13,vars:2,consts:[[1,"dialog-container"],["mat-dialog-title",""],[1,"dialog-description"],["appearance","outline",1,"filter-field"],["matInput","","placeholder","Filter services...",3,"input","value"],["mode","indeterminate"],[1,"services-list"],["align","end"],["mat-raised-button","","color","primary",3,"click"],[1,"no-services"],[3,"orphaned"],[1,"service-row"],[1,"service-name"],[1,"orphaned-hint"],["mat-icon-button","",3,"click"]],template:function(t,n){t&1&&(s(0,"div",0)(1,"h2",1),m(2,"Manage services"),l(),s(3,"mat-dialog-content")(4,"p",2),m(5,"Select which system services to control."),l(),s(6,"mat-form-field",3)(7,"input",4),E("input",function(r){return n.filter.set(r.target.value)}),l()(),k(8,p0,1,0,"mat-progress-bar",5)(9,w0,3,1,"div",6),l(),s(10,"mat-dialog-actions",7)(11,"button",8),E("click",function(){return n.close()}),m(12,"Done"),l()()()),t&2&&(c(7),x("value",n.filter()),c(),M(n.loading()?8:9))},dependencies:[Pe,Ke,Xe,_i,bt,Bt,zt,si,Fo,hp,mp,up,ti,Ti,At,Et,oi,ni,vt,_t],styles:[".dialog-container[_ngcontent-%COMP%]{min-width:400px;max-width:500px}mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:8px}.dialog-description[_ngcontent-%COMP%]{margin:0 0 12px;color:#666;font-size:.9rem}.filter-field[_ngcontent-%COMP%]{width:100%;margin-bottom:8px}.services-list[_ngcontent-%COMP%]{max-height:400px;overflow-y:auto}.service-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%}.service-row[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-left:auto;flex-shrink:0}.service-name[_ngcontent-%COMP%]{font-family:monospace;font-size:.95rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.no-services[_ngcontent-%COMP%]{text-align:center;color:#999;font-size:.9rem;padding:16px 0}mat-list-item.orphaned[_ngcontent-%COMP%] .service-name[_ngcontent-%COMP%]{color:#999}mat-list-item.orphaned[_ngcontent-%COMP%] .orphaned-hint[_ngcontent-%COMP%]{color:#bbb;font-size:.8rem;font-style:italic;margin-right:8px}"]})}}return i})();var fp=(i,o)=>o.name;function D0(i,o){i&1&&_(0,"mat-progress-bar",7)}function S0(i,o){if(i&1){let e=Se();s(0,"div",11)(1,"span",12),m(2),l(),s(3,"button",13),E("click",function(){let n=de(e).$implicit,a=C(2);return me(a.archive(n.name))}),s(4,"mat-icon"),m(5,"archive"),l()()()}if(i&2){let e=o.$implicit,t=C(2);c(),x("title",e.name),c(),B(e.name),c(),x("disabled",t.busy()!==null)}}function k0(i,o){if(i&1&&ue(0,S0,6,3,"div",11,fp),i&2){let e=C();he(e.active())}}function M0(i,o){i&1&&(s(0,"p",8),m(1,"No services"),l())}function E0(i,o){i&1&&_(0,"mat-progress-bar",7)}function A0(i,o){if(i&1){let e=Se();s(0,"div",11)(1,"span",12),m(2),l(),s(3,"button",14),E("click",function(){let n=de(e).$implicit,a=C(2);return me(a.restore(n.name))}),s(4,"mat-icon"),m(5,"unarchive"),l()()()}if(i&2){let e=o.$implicit,t=C(2);c(),x("title",e.name),c(),B(e.name),c(),x("disabled",t.busy()!==null)}}function T0(i,o){if(i&1&&ue(0,A0,6,3,"div",11,fp),i&2){let e=C();he(e.archived())}}function I0(i,o){i&1&&(s(0,"p",8),m(1,"Archive is empty"),l())}var gp=(()=>{class i{constructor(){this.serviceService=d(yt),this.dialogRef=d(ut),this.snackBar=d(ks),this.active=T([]),this.archived=T([]),this.loading=T(!0),this.busy=T(null),this.dirty=!1}ngOnInit(){return oe(this,null,function*(){try{let[e,t]=yield Promise.all([we(this.serviceService.fetchConfigs()),we(this.serviceService.fetchArchivedConfigs())]);this.active.set(e),this.archived.set(t)}catch(e){console.error("[ArchiveDialog] load error:",e)}finally{this.loading.set(!1)}})}archive(e){return oe(this,null,function*(){this.busy.set(e);try{yield we(this.serviceService.archiveService(e)),this.move(e,this.active,this.archived),this.dirty=!0}catch(t){this.showError(`Archive "${e}": ${String(t)}`)}finally{this.busy.set(null)}})}restore(e){return oe(this,null,function*(){this.busy.set(e);try{yield we(this.serviceService.restoreService(e)),this.move(e,this.archived,this.active),this.dirty=!0}catch(t){this.showError(`Restore "${e}": ${String(t)}`)}finally{this.busy.set(null)}})}move(e,t,n){let a=t().find(r=>r.name===e);a&&(t.set(t().filter(r=>r.name!==e)),n.set([...n(),a].sort((r,u)=>r.name.localeCompare(u.name))))}showError(e){this.snackBar.open(e,"Dismiss",{duration:6e3,horizontalPosition:"center",verticalPosition:"top"})}close(){this.dialogRef.close(this.dirty)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=I({type:i,selectors:[["app-archive-dialog"]],decls:28,vars:2,consts:[[1,"dialog-container"],["mat-dialog-title",""],[1,"dialog-description"],[1,"panels"],[1,"panel"],[1,"panel-header"],[1,"panel-list"],["mode","indeterminate"],[1,"empty-panel"],["align","end"],["mat-raised-button","","color","primary",3,"click"],[1,"panel-item"],[1,"item-name",3,"title"],["mat-icon-button","","title","Move to archive",1,"move-btn",3,"click","disabled"],["mat-icon-button","","title","Restore from archive",1,"move-btn",3,"click","disabled"]],template:function(t,n){t&1&&(s(0,"div",0)(1,"h2",1),m(2,"Archive"),l(),s(3,"mat-dialog-content")(4,"p",2),m(5," Move a service to the archive to stop, uninstall, and shelve its config. Restore it any time from the archive. "),l(),s(6,"div",3)(7,"div",4)(8,"div",5)(9,"mat-icon"),m(10,"apps"),l(),m(11," Services "),l(),s(12,"div",6),k(13,D0,1,0,"mat-progress-bar",7)(14,k0,2,0)(15,M0,2,0,"p",8),l()(),s(16,"div",4)(17,"div",5)(18,"mat-icon"),m(19,"archive"),l(),m(20," Archive "),l(),s(21,"div",6),k(22,E0,1,0,"mat-progress-bar",7)(23,T0,2,0)(24,I0,2,0,"p",8),l()()()(),s(25,"mat-dialog-actions",9)(26,"button",10),E("click",function(){return n.close()}),m(27,"Done"),l()()()),t&2&&(c(13),M(n.loading()?13:n.active().length>0?14:15),c(9),M(n.loading()?22:n.archived().length>0?23:24))},dependencies:[Pe,Ke,Xe,_i,bt,Bt,zt,si,ti,Ti,vt,_t],styles:[".dialog-container[_ngcontent-%COMP%]{min-width:840px;max-width:960px}mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:8px}.dialog-description[_ngcontent-%COMP%]{margin:0 0 16px;color:#666;font-size:.9rem}.panels[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:16px}.panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;border:1px solid #e0e0e0;border-radius:8px;overflow:hidden}.panel-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:8px 12px;font-weight:600;font-size:.9rem;background-color:#f5f5f5;border-bottom:1px solid #e0e0e0}.panel-header[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.2rem;width:1.2rem;height:1.2rem}.panel-list[_ngcontent-%COMP%]{padding:4px 0;max-height:360px;overflow-y:auto}.panel-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:4px 12px}.panel-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.item-name[_ngcontent-%COMP%]{flex:1;font-family:monospace;font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.move-btn[_ngcontent-%COMP%]{flex-shrink:0}.empty-panel[_ngcontent-%COMP%]{text-align:center;color:#999;font-size:.9rem;padding:16px 0}"]})}}return i})();var _p=new w("CdkAccordion");var vp=(()=>{class i{accordion=d(_p,{optional:!0,skipSelf:!0});_changeDetectorRef=d(ie);_expansionDispatcher=d(Ia);_openCloseAllSubscription=ke.EMPTY;closed=new K;opened=new K;destroyed=new K;expandedChange=new K;id=d(xe).getId("cdk-accordion-child-");get expanded(){return this._expanded}set expanded(e){if(this._expanded!==e){if(this._expanded=e,this.expandedChange.emit(e),e){this.opened.emit();let t=this.accordion?this.accordion.id:this.id;this._expansionDispatcher.notify(this.id,t)}else this.closed.emit();this._changeDetectorRef.markForCheck()}}_expanded=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=T(!1);_removeUniqueSelectionListener=()=>{};ngOnInit(){this._removeUniqueSelectionListener=this._expansionDispatcher.listen((e,t)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===t&&this.id!==e&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[2,"expanded","expanded",L],disabled:[2,"disabled","disabled",L]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[ee([{provide:_p,useValue:void 0}])]})}return i})(),bp=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({})}return i})();var R0=["body"],O0=["bodyWrapper"],P0=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],F0=["mat-expansion-panel-header","*","mat-action-row"];function N0(i,o){}var L0=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],V0=["mat-panel-title","mat-panel-description","*"];function B0(i,o){i&1&&(Re(0,"span",1),ki(),Re(1,"svg",2),pt(2,"path",3),Ue()())}var yp=new w("MAT_ACCORDION"),Cp=new w("MAT_EXPANSION_PANEL"),z0=(()=>{class i{_template=d(Ze);_expansionPanel=d(Cp,{optional:!0});static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]})}return i})(),xp=new w("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),Ga=(()=>{class i extends vp{_viewContainerRef=d(Qe);_animationsDisabled=_e();_document=d(q);_ngZone=d(U);_elementRef=d(N);_renderer=d(Ce);_cleanupTransitionEnd;get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=e}_hideToggle=!1;get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}_togglePosition;afterExpand=new K;afterCollapse=new K;_inputChanges=new R;accordion=d(yp,{optional:!0,skipSelf:!0});_lazyContent;_body;_bodyWrapper;_portal;_headerId=d(xe).getId("mat-expansion-panel-header-");constructor(){super();let e=d(xp,{optional:!0});this._expansionDispatcher=d(Ia),e&&(this.hideToggle=e.hideToggle)}_hasSpacing(){return this.accordion?this.expanded&&this.accordion.displayMode==="default":!1}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(Me(null),De(()=>this.expanded&&!this._portal),ct(1)).subscribe(()=>{this._portal=new It(this._lazyContent._template,this._viewContainerRef)}),this._setupAnimationEvents()}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTransitionEnd?.(),this._inputChanges.complete()}_containsFocus(){if(this._body){let e=this._document.activeElement,t=this._body.nativeElement;return e===t||t.contains(e)}return!1}_transitionEndListener=({target:e,propertyName:t})=>{e===this._bodyWrapper?.nativeElement&&t==="grid-template-rows"&&this._ngZone.run(()=>{this.expanded?this.afterExpand.emit():this.afterCollapse.emit()})};_setupAnimationEvents(){this._ngZone.runOutsideAngular(()=>{this._animationsDisabled?(this.opened.subscribe(()=>this._ngZone.run(()=>this.afterExpand.emit())),this.closed.subscribe(()=>this._ngZone.run(()=>this.afterCollapse.emit()))):setTimeout(()=>{let e=this._elementRef.nativeElement;this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this._transitionEndListener),e.classList.add("mat-expansion-panel-animations-enabled")},200)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(t,n,a){if(t&1&&at(a,z0,5),t&2){let r;P(r=F())&&(n._lazyContent=r.first)}},viewQuery:function(t,n){if(t&1&&Ae(R0,5)(O0,5),t&2){let a;P(a=F())&&(n._body=a.first),P(a=F())&&(n._bodyWrapper=a.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:4,hostBindings:function(t,n){t&2&&p("mat-expanded",n.expanded)("mat-expansion-panel-spacing",n._hasSpacing())},inputs:{hideToggle:[2,"hideToggle","hideToggle",L],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[ee([{provide:yp,useValue:void 0},{provide:Cp,useExisting:i}]),Q,Ee],ngContentSelectors:F0,decls:9,vars:4,consts:[["bodyWrapper",""],["body",""],[1,"mat-expansion-panel-content-wrapper"],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(t,n){t&1&&(fe(P0),G(0),s(1,"div",2,0)(3,"div",3,1)(5,"div",4),G(6,1),He(7,N0,0,0,"ng-template",5),l(),G(8,2),l()()),t&2&&(c(),Z("inert",n.expanded?null:""),c(2),x("id",n.id),Z("aria-labelledby",n._headerId),c(4),x("cdkPortalOutlet",n._portal))},dependencies:[Fi],styles:[`.mat-expansion-panel {
5033
5033
  box-sizing: content-box;
5034
5034
  display: block;
5035
5035
  margin: 0;
@@ -5145,7 +5145,7 @@ mat-action-list button::-moz-focus-inner {
5145
5145
  margin-left: 0;
5146
5146
  margin-right: 8px;
5147
5147
  }
5148
- `],encapsulation:2})}return i})();var Rs=(()=>{class i{panel=d(Ua,{host:!0});_element=d(N);_focusMonitor=d(Rt);_changeDetectorRef=d(te);_parentChangeSubscription=De.EMPTY;constructor(){d(Le).load(Mt);let e=this.panel,t=d(Cp,{optional:!0}),n=d(new Di("tabindex"),{optional:!0}),a=e.accordion?e.accordion._stateChanges.pipe(we(r=>!!(r.hideToggle||r.togglePosition))):Ka;this.tabIndex=parseInt(n||"")||0,this._parentChangeSubscription=$e(e.opened,e.closed,a,e._inputChanges.pipe(we(r=>!!(r.hideToggle||r.disabled||r.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(we(()=>e._containsFocus())).subscribe(()=>this._focusMonitor.focusVia(this._element,"program")),t&&(this.expandedHeight=t.expandedHeight,this.collapsedHeight=t.collapsedHeight)}expandedHeight;collapsedHeight;tabIndex=0;get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){let e=this._isExpanded();return e&&this.expandedHeight?this.expandedHeight:!e&&this.collapsedHeight?this.collapsedHeight:null}_keydown(e){switch(e.keyCode){case 32:case 13:Ge(e)||(e.preventDefault(),this._toggle());break;default:this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e);return}}focus(e,t){e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(e=>{e&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:13,hostBindings:function(t,n){t&1&&A("click",function(){return n._toggle()})("keydown",function(r){return n._keydown(r)}),t&2&&(Z("id",n.panel._headerId)("tabindex",n.disabled?-1:n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),Ne("height",n._getHeaderHeight()),p("mat-expanded",n._isExpanded())("mat-expansion-toggle-indicator-after",n._getTogglePosition()==="after")("mat-expansion-toggle-indicator-before",n._getTogglePosition()==="before"))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:wt(e)]},ngContentSelectors:N0,decls:5,vars:3,consts:[[1,"mat-content"],[1,"mat-expansion-indicator"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 -960 960 960","aria-hidden","true","focusable","false"],["d","M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"]],template:function(t,n){t&1&&(ce(F0),Ie(0,"span",0),U(1),U(2,1),U(3,2),Ue(),M(4,L0,3,0,"span",1)),t&2&&(p("mat-content-hide-toggle",!n._showToggle()),c(4),E(n._showToggle()?4:-1))},styles:[`.mat-expansion-panel-header {
5148
+ `],encapsulation:2})}return i})();var Rs=(()=>{class i{panel=d(Ga,{host:!0});_element=d(N);_focusMonitor=d(Nt);_changeDetectorRef=d(ie);_parentChangeSubscription=ke.EMPTY;constructor(){d(Be).load(Tt);let e=this.panel,t=d(xp,{optional:!0}),n=d(new Ei("tabindex"),{optional:!0}),a=e.accordion?e.accordion._stateChanges.pipe(De(r=>!!(r.hideToggle||r.togglePosition))):Ya;this.tabIndex=parseInt(n||"")||0,this._parentChangeSubscription=$e(e.opened,e.closed,a,e._inputChanges.pipe(De(r=>!!(r.hideToggle||r.disabled||r.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(De(()=>e._containsFocus())).subscribe(()=>this._focusMonitor.focusVia(this._element,"program")),t&&(this.expandedHeight=t.expandedHeight,this.collapsedHeight=t.collapsedHeight)}expandedHeight;collapsedHeight;tabIndex=0;get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){let e=this._isExpanded();return e&&this.expandedHeight?this.expandedHeight:!e&&this.collapsedHeight?this.collapsedHeight:null}_keydown(e){switch(e.keyCode){case 32:case 13:Ge(e)||(e.preventDefault(),this._toggle());break;default:this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e);return}}focus(e,t){e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(e=>{e&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:13,hostBindings:function(t,n){t&1&&E("click",function(){return n._toggle()})("keydown",function(r){return n._keydown(r)}),t&2&&(Z("id",n.panel._headerId)("tabindex",n.disabled?-1:n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),Ve("height",n._getHeaderHeight()),p("mat-expanded",n._isExpanded())("mat-expansion-toggle-indicator-after",n._getTogglePosition()==="after")("mat-expansion-toggle-indicator-before",n._getTogglePosition()==="before"))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:kt(e)]},ngContentSelectors:V0,decls:5,vars:3,consts:[[1,"mat-content"],[1,"mat-expansion-indicator"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 -960 960 960","aria-hidden","true","focusable","false"],["d","M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"]],template:function(t,n){t&1&&(fe(L0),Re(0,"span",0),G(1),G(2,1),G(3,2),Ue(),k(4,B0,3,0,"span",1)),t&2&&(p("mat-content-hide-toggle",!n._showToggle()),c(4),M(n._showToggle()?4:-1))},styles:[`.mat-expansion-panel-header {
5149
5149
  display: flex;
5150
5150
  flex-direction: row;
5151
5151
  align-items: center;
@@ -5286,7 +5286,7 @@ mat-action-list button::-moz-focus-inner {
5286
5286
  border-top-right-radius: 0;
5287
5287
  }
5288
5288
  }
5289
- `],encapsulation:2})}return i})(),Os=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]})}return i})(),Ps=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]})}return i})();var Fs=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[vp,Oi,ee]})}return i})();var B0=["trigger"],z0=["panel"],j0=[[["mat-select-trigger"]],"*"],H0=["mat-select-trigger","*"];function U0(i,o){if(i&1&&(s(0,"span",4),m(1),l()),i&2){let e=w();c(),W(e.placeholder)}}function G0(i,o){i&1&&U(0)}function $0(i,o){if(i&1&&(s(0,"span",11),m(1),l()),i&2){let e=w(2);c(),W(e.triggerValue)}}function W0(i,o){if(i&1&&(s(0,"span",5),M(1,G0,1,0)(2,$0,2,1,"span",11),l()),i&2){let e=w();c(),E(e.customTrigger?1:2)}}function q0(i,o){if(i&1){let e=Ve();s(0,"div",12,1),A("keydown",function(n){Ce(e);let a=w();return xe(a._handleKeydown(n))}),U(2,1),l()}if(i&2){let e=w();et(e.panelClass),p("mat-select-panel-animations-enabled",!e._animationsDisabled)("mat-primary",e._parentFormField?.color==="primary")("mat-accent",e._parentFormField?.color==="accent")("mat-warn",e._parentFormField?.color==="warn")("mat-undefined",!e._parentFormField?.color),Z("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var K0=new x("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let i=d(X);return()=>yi(i)}}),Y0=new x("MAT_SELECT_CONFIG"),X0=new x("MatSelectTrigger"),Hc=class{source;value;constructor(o,e){this.source=o,this.value=e}},Lo=(()=>{class i{_viewportRuler=d(Gt);_changeDetectorRef=d(te);_elementRef=d(N);_dir=d(qe,{optional:!0});_idGenerator=d(be);_renderer=d(ve);_parentFormField=d(jn,{optional:!0});ngControl=d(Jt,{self:!0,optional:!0});_liveAnnouncer=d(ca);_defaultOptions=d(Y0,{optional:!0});_animationsDisabled=pe();_popoverLocation;_initialized=new R;_cleanupDetach;options;optionGroups;customTrigger;_positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}];_scrollOptionIntoView(e){let t=this.options.toArray()[e];if(t){let n=this.panel.nativeElement,a=As(e,this.options,this.optionGroups),r=t._getHostElement();e===0&&a===1?n.scrollTop=0:n.scrollTop=Ts(r.offsetTop,r.offsetHeight,n.scrollTop,n.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new Hc(this,e)}_scrollStrategyFactory=d(K0);_panelOpen=!1;_compareWith=(e,t)=>e===t;_uid=this._idGenerator.getId("mat-select-");_triggerAriaLabelledBy=null;_previousControl;_destroy=new R;_errorStateTracker;stateChanges=new R;disableAutomaticLabeling=!0;userAriaDescribedBy;_selectionModel;_keyManager;_preferredOverlayOrigin;_overlayWidth;_onChange=()=>{};_onTouched=()=>{};_valueId=this._idGenerator.getId("mat-select-value-");_scrollStrategy;_overlayPanelClass=this._defaultOptions?.overlayPanelClass||"";get focused(){return this._focused||this._panelOpen}_focused=!1;controlType="mat-select";trigger;panel;_overlayDir;panelClass;disabled=!1;get disableRipple(){return this._disableRipple()}set disableRipple(e){this._disableRipple.set(e)}_disableRipple=I(!1);tabIndex=0;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1;get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}_placeholder;get required(){return this._required??this.ngControl?.control?.hasValidator(st.required)??!1}set required(e){this._required=e,this.stateChanges.next()}_required;get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=e}_multiple=!1;disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1;get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}_value;ariaLabel="";ariaLabelledby;get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}typeaheadDebounceInterval;sortComparator;get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}_id;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto";canSelectNullableOptions=this._defaultOptions?.canSelectNullableOptions??!1;optionSelectionChanges=Yi(()=>{let e=this.options;return e?e.changes.pipe(Se(e),We(()=>$e(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe(We(()=>this.optionSelectionChanges))});openedChange=new K;_openedStream=this.openedChange.pipe(we(e=>e),Pe(()=>{}));_closedStream=this.openedChange.pipe(we(e=>!e),Pe(()=>{}));selectionChange=new K;valueChange=new K;constructor(){let e=d(xo),t=d(ya,{optional:!0}),n=d(Ut,{optional:!0}),a=d(new Di("tabindex"),{optional:!0}),r=d(Fa,{optional:!0});this.ngControl&&(this.ngControl.valueAccessor=this),this._defaultOptions?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new wo(e,this.ngControl,n,t,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=a==null?0:parseInt(a)||0,this._popoverLocation=r?.usePopover===!1?null:"inline",this.id=this.id}ngOnInit(){this._selectionModel=new Aa(this.multiple),this.stateChanges.next(),this._viewportRuler.change().pipe(ae(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(ae(this._destroy)).subscribe(e=>{e.added.forEach(t=>t.select()),e.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(Se(null),ae(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),t=this.ngControl;if(e!==this._triggerAriaLabelledBy){let n=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?n.setAttribute("aria-labelledby",e):n.removeAttribute("aria-labelledby")}t&&(this._previousControl!==t.control&&(this._previousControl!==void 0&&t.disabled!==null&&t.disabled!==this.disabled&&(this.disabled=t.disabled),this._previousControl=t.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval),e.panelClass&&this.panelClass instanceof Set&&(this.panelClass=Array.from(this.panelClass))}ngOnDestroy(){this._cleanupDetach?.(),this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._cleanupDetach?.(),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._panelOpen=!0,this._overlayDir.positionChange.pipe(ct(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()}),this._overlayDir.attachOverlay(),this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!0)))}close(){this._panelOpen&&(this._panelOpen=!1,this._exitAndDetach(),this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!1)))}_exitAndDetach(){if(this._animationsDisabled||!this.panel){this._detachOverlay();return}this._cleanupDetach?.(),this._cleanupDetach=()=>{t(),clearTimeout(n),this._cleanupDetach=void 0};let e=this.panel.nativeElement,t=this._renderer.listen(e,"animationend",a=>{a.animationName==="_mat-select-exit"&&(this._cleanupDetach?.(),this._detachOverlay())}),n=setTimeout(()=>{this._cleanupDetach?.(),this._detachOverlay()},200);e.classList.add("mat-select-panel-exit")}_detachOverlay(){this._overlayDir.detachOverlay(),this._changeDetectorRef.markForCheck()}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let t=e.keyCode,n=t===40||t===38||t===37||t===39,a=t===13||t===32,r=this._keyManager;if(!r.isTyping()&&a&&!Ge(e)||(this.multiple||e.altKey)&&n)e.preventDefault(),this.open();else if(!this.multiple){let u=this.selected;r.onKeydown(e);let h=this.selected;h&&u!==h&&this._liveAnnouncer.announce(h.viewValue,1e4)}}_handleOpenKeydown(e){let t=this._keyManager,n=e.keyCode,a=n===40||n===38,r=t.isTyping();if(a&&e.altKey)e.preventDefault(),this.close();else if(!r&&(n===13||n===32)&&t.activeItem&&!Ge(e))e.preventDefault(),t.activeItem._selectViaInteraction();else if(!r&&this._multiple&&n===65&&e.ctrlKey){e.preventDefault();let u=this.options.some(h=>!h.disabled&&!h.selected);this.options.forEach(h=>{h.disabled||(u?h.select():h.deselect())})}else{let u=t.activeItemIndex;t.onKeydown(e),this._multiple&&a&&e.shiftKey&&t.activeItem&&t.activeItemIndex!==u&&t.activeItem._selectViaInteraction()}}_handleOverlayKeydown(e){e.keyCode===27&&!Ge(e)&&(e.preventDefault(),this.close())}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(t=>t.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(t=>this._selectOptionByValue(t)),this._sortValues();else{let t=this._selectOptionByValue(e);t?this._keyManager.updateActiveItem(t):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let t=this.options.find(n=>{if(this._selectionModel.isSelected(n))return!1;try{return(n.value!=null||this.canSelectNullableOptions)&&this._compareWith(n.value,e)}catch(a){return!1}});return t&&this._selectionModel.select(t),t}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_skipPredicate=e=>this.panelOpen?!1:e.disabled;_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof Eo?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new Bn(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=$e(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(ae(e)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),$e(...this.options.map(t=>t._stateChanges)).pipe(ae(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,t){let n=this._selectionModel.isSelected(e);!this.canSelectNullableOptions&&e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(n!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),t&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),t&&this.focus())),n!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((t,n)=>this.sortComparator?this.sortComparator(t,n,e):e.indexOf(t)-e.indexOf(n)),this.stateChanges.next()}}_propagateChanges(e){let t;this.multiple?t=this.selected.map(n=>n.value):t=this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this._onChange(t),this.selectionChange.emit(this._getChangeEvent(t)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let t=0;t<this.options.length;t++)if(!this.options.get(t).disabled){e=t;break}this._keyManager.setActiveItem(e)}else this._keyManager.setActiveItem(this._selectionModel.selected[0])}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0&&!!this._overlayDir}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||null,t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||"";return this.ariaLabelledby&&(e+=" "+this.ariaLabelledby),e||(e=this._valueId),e}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby")}onContainerClick(e){let t=rt(e);t&&(t.tagName==="MAT-OPTION"||t.classList.contains("cdk-overlay-backdrop")||t.closest(".mat-mdc-select-panel"))||(this.focus(),this.open())}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["mat-select"]],contentQueries:function(t,n,a){if(t&1&&at(a,X0,5)(a,vt,5)(a,za,5),t&2){let r;P(r=F())&&(n.customTrigger=r.first),P(r=F())&&(n.options=r),P(r=F())&&(n.optionGroups=r)}},viewQuery:function(t,n){if(t&1&&Me(B0,5)(z0,5)(ys,5),t&2){let a;P(a=F())&&(n.trigger=a.first),P(a=F())&&(n.panel=a.first),P(a=F())&&(n._overlayDir=a.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:21,hostBindings:function(t,n){t&1&&A("keydown",function(r){return n._handleKeydown(r)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),t&2&&(Z("id",n.id)("tabindex",n.disabled?-1:n.tabIndex)("aria-controls",n.panelOpen?n.id+"-panel":null)("aria-expanded",n.panelOpen)("aria-label",n.ariaLabel||null)("aria-required",n.required.toString())("aria-disabled",n.disabled.toString())("aria-invalid",n.errorState)("aria-activedescendant",n._getAriaActiveDescendant()),p("mat-mdc-select-disabled",n.disabled)("mat-mdc-select-invalid",n.errorState)("mat-mdc-select-required",n.required)("mat-mdc-select-empty",n.empty)("mat-mdc-select-multiple",n.multiple)("mat-select-open",n.panelOpen))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",L],disableRipple:[2,"disableRipple","disableRipple",L],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:wt(e)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",L],placeholder:"placeholder",required:[2,"required","required",L],multiple:[2,"multiple","multiple",L],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",L],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",wt],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth",canSelectNullableOptions:[2,"canSelectNullableOptions","canSelectNullableOptions",L]},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[J([{provide:wa,useExisting:i},{provide:Ba,useExisting:i}]),ke],ngContentSelectors:H0,decls:11,vars:10,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"detach","backdropClick","overlayKeydown","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","cdkConnectedOverlayFlexibleDimensions","cdkConnectedOverlayUsePopover"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",1,"mat-mdc-select-panel","mdc-menu-surface","mdc-menu-surface--open",3,"keydown"]],template:function(t,n){if(t&1&&(ce(j0),s(0,"div",2,0),A("click",function(){return n.open()}),s(3,"div",3),M(4,U0,2,1,"span",4)(5,W0,3,1,"span",5),l(),s(6,"div",6)(7,"div",7),wi(),s(8,"svg",8),_(9,"path",9),l()()()(),He(10,q0,3,16,"ng-template",10),A("detach",function(){return n.close()})("backdropClick",function(){return n.close()})("overlayKeydown",function(r){return n._handleOverlayKeydown(r)})),t&2){let a=Fe(1);c(3),Z("id",n._valueId),c(),E(n.empty?4:5),c(6),C("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||a)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)("cdkConnectedOverlayFlexibleDimensions",!0)("cdkConnectedOverlayUsePopover",n._popoverLocation)}},dependencies:[Eo,ys],styles:[`@keyframes _mat-select-enter {
5289
+ `],encapsulation:2})}return i})(),Os=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]})}return i})(),Ps=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]})}return i})();var Fs=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[bp,Ni,te]})}return i})();var j0=["trigger"],H0=["panel"],U0=[[["mat-select-trigger"]],"*"],G0=["mat-select-trigger","*"];function $0(i,o){if(i&1&&(s(0,"span",4),m(1),l()),i&2){let e=C();c(),B(e.placeholder)}}function W0(i,o){i&1&&G(0)}function q0(i,o){if(i&1&&(s(0,"span",11),m(1),l()),i&2){let e=C(2);c(),B(e.triggerValue)}}function K0(i,o){if(i&1&&(s(0,"span",5),k(1,W0,1,0)(2,q0,2,1,"span",11),l()),i&2){let e=C();c(),M(e.customTrigger?1:2)}}function Y0(i,o){if(i&1){let e=Se();s(0,"div",12,1),E("keydown",function(n){de(e);let a=C();return me(a._handleKeydown(n))}),G(2,1),l()}if(i&2){let e=C();tt(e.panelClass),p("mat-select-panel-animations-enabled",!e._animationsDisabled)("mat-primary",e._parentFormField?.color==="primary")("mat-accent",e._parentFormField?.color==="accent")("mat-warn",e._parentFormField?.color==="warn")("mat-undefined",!e._parentFormField?.color),Z("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var X0=new w("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let i=d(X);return()=>wi(i)}}),Z0=new w("MAT_SELECT_CONFIG"),Q0=new w("MatSelectTrigger"),Uc=class{source;value;constructor(o,e){this.source=o,this.value=e}},Lo=(()=>{class i{_viewportRuler=d(qt);_changeDetectorRef=d(ie);_elementRef=d(N);_dir=d(qe,{optional:!0});_idGenerator=d(xe);_renderer=d(Ce);_parentFormField=d(Hn,{optional:!0});ngControl=d(ii,{self:!0,optional:!0});_liveAnnouncer=d(da);_defaultOptions=d(Z0,{optional:!0});_animationsDisabled=_e();_popoverLocation;_initialized=new R;_cleanupDetach;options;optionGroups;customTrigger;_positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}];_scrollOptionIntoView(e){let t=this.options.toArray()[e];if(t){let n=this.panel.nativeElement,a=As(e,this.options,this.optionGroups),r=t._getHostElement();e===0&&a===1?n.scrollTop=0:n.scrollTop=Ts(r.offsetTop,r.offsetHeight,n.scrollTop,n.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new Uc(this,e)}_scrollStrategyFactory=d(X0);_panelOpen=!1;_compareWith=(e,t)=>e===t;_uid=this._idGenerator.getId("mat-select-");_triggerAriaLabelledBy=null;_previousControl;_destroy=new R;_errorStateTracker;stateChanges=new R;disableAutomaticLabeling=!0;userAriaDescribedBy;_selectionModel;_keyManager;_preferredOverlayOrigin;_overlayWidth;_onChange=()=>{};_onTouched=()=>{};_valueId=this._idGenerator.getId("mat-select-value-");_scrollStrategy;_overlayPanelClass=this._defaultOptions?.overlayPanelClass||"";get focused(){return this._focused||this._panelOpen}_focused=!1;controlType="mat-select";trigger;panel;_overlayDir;panelClass;disabled=!1;get disableRipple(){return this._disableRipple()}set disableRipple(e){this._disableRipple.set(e)}_disableRipple=T(!1);tabIndex=0;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1;get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}_placeholder;get required(){return this._required??this.ngControl?.control?.hasValidator(st.required)??!1}set required(e){this._required=e,this.stateChanges.next()}_required;get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=e}_multiple=!1;disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1;get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}_value;ariaLabel="";ariaLabelledby;get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}typeaheadDebounceInterval;sortComparator;get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}_id;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto";canSelectNullableOptions=this._defaultOptions?.canSelectNullableOptions??!1;optionSelectionChanges=Zi(()=>{let e=this.options;return e?e.changes.pipe(Me(e),We(()=>$e(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe(We(()=>this.optionSelectionChanges))});openedChange=new K;_openedStream=this.openedChange.pipe(De(e=>e),Ne(()=>{}));_closedStream=this.openedChange.pipe(De(e=>!e),Ne(()=>{}));selectionChange=new K;valueChange=new K;constructor(){let e=d(wo),t=d(Ca,{optional:!0}),n=d(Wt,{optional:!0}),a=d(new Ei("tabindex"),{optional:!0}),r=d(Na,{optional:!0});this.ngControl&&(this.ngControl.valueAccessor=this),this._defaultOptions?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new Do(e,this.ngControl,n,t,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=a==null?0:parseInt(a)||0,this._popoverLocation=r?.usePopover===!1?null:"inline",this.id=this.id}ngOnInit(){this._selectionModel=new Ta(this.multiple),this.stateChanges.next(),this._viewportRuler.change().pipe(re(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(re(this._destroy)).subscribe(e=>{e.added.forEach(t=>t.select()),e.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(Me(null),re(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),t=this.ngControl;if(e!==this._triggerAriaLabelledBy){let n=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?n.setAttribute("aria-labelledby",e):n.removeAttribute("aria-labelledby")}t&&(this._previousControl!==t.control&&(this._previousControl!==void 0&&t.disabled!==null&&t.disabled!==this.disabled&&(this.disabled=t.disabled),this._previousControl=t.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval),e.panelClass&&this.panelClass instanceof Set&&(this.panelClass=Array.from(this.panelClass))}ngOnDestroy(){this._cleanupDetach?.(),this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._cleanupDetach?.(),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._panelOpen=!0,this._overlayDir.positionChange.pipe(ct(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()}),this._overlayDir.attachOverlay(),this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!0)))}close(){this._panelOpen&&(this._panelOpen=!1,this._exitAndDetach(),this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!1)))}_exitAndDetach(){if(this._animationsDisabled||!this.panel){this._detachOverlay();return}this._cleanupDetach?.(),this._cleanupDetach=()=>{t(),clearTimeout(n),this._cleanupDetach=void 0};let e=this.panel.nativeElement,t=this._renderer.listen(e,"animationend",a=>{a.animationName==="_mat-select-exit"&&(this._cleanupDetach?.(),this._detachOverlay())}),n=setTimeout(()=>{this._cleanupDetach?.(),this._detachOverlay()},200);e.classList.add("mat-select-panel-exit")}_detachOverlay(){this._overlayDir.detachOverlay(),this._changeDetectorRef.markForCheck()}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let t=e.keyCode,n=t===40||t===38||t===37||t===39,a=t===13||t===32,r=this._keyManager;if(!r.isTyping()&&a&&!Ge(e)||(this.multiple||e.altKey)&&n)e.preventDefault(),this.open();else if(!this.multiple){let u=this.selected;r.onKeydown(e);let h=this.selected;h&&u!==h&&this._liveAnnouncer.announce(h.viewValue,1e4)}}_handleOpenKeydown(e){let t=this._keyManager,n=e.keyCode,a=n===40||n===38,r=t.isTyping();if(a&&e.altKey)e.preventDefault(),this.close();else if(!r&&(n===13||n===32)&&t.activeItem&&!Ge(e))e.preventDefault(),t.activeItem._selectViaInteraction();else if(!r&&this._multiple&&n===65&&e.ctrlKey){e.preventDefault();let u=this.options.some(h=>!h.disabled&&!h.selected);this.options.forEach(h=>{h.disabled||(u?h.select():h.deselect())})}else{let u=t.activeItemIndex;t.onKeydown(e),this._multiple&&a&&e.shiftKey&&t.activeItem&&t.activeItemIndex!==u&&t.activeItem._selectViaInteraction()}}_handleOverlayKeydown(e){e.keyCode===27&&!Ge(e)&&(e.preventDefault(),this.close())}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(t=>t.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(t=>this._selectOptionByValue(t)),this._sortValues();else{let t=this._selectOptionByValue(e);t?this._keyManager.updateActiveItem(t):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let t=this.options.find(n=>{if(this._selectionModel.isSelected(n))return!1;try{return(n.value!=null||this.canSelectNullableOptions)&&this._compareWith(n.value,e)}catch(a){return!1}});return t&&this._selectionModel.select(t),t}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_skipPredicate=e=>this.panelOpen?!1:e.disabled;_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof Ao?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new zn(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=$e(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(re(e)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),$e(...this.options.map(t=>t._stateChanges)).pipe(re(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,t){let n=this._selectionModel.isSelected(e);!this.canSelectNullableOptions&&e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(n!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),t&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),t&&this.focus())),n!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((t,n)=>this.sortComparator?this.sortComparator(t,n,e):e.indexOf(t)-e.indexOf(n)),this.stateChanges.next()}}_propagateChanges(e){let t;this.multiple?t=this.selected.map(n=>n.value):t=this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this._onChange(t),this.selectionChange.emit(this._getChangeEvent(t)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let t=0;t<this.options.length;t++)if(!this.options.get(t).disabled){e=t;break}this._keyManager.setActiveItem(e)}else this._keyManager.setActiveItem(this._selectionModel.selected[0])}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0&&!!this._overlayDir}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||null,t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||"";return this.ariaLabelledby&&(e+=" "+this.ariaLabelledby),e||(e=this._valueId),e}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby")}onContainerClick(e){let t=rt(e);t&&(t.tagName==="MAT-OPTION"||t.classList.contains("cdk-overlay-backdrop")||t.closest(".mat-mdc-select-panel"))||(this.focus(),this.open())}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["mat-select"]],contentQueries:function(t,n,a){if(t&1&&at(a,Q0,5)(a,Ct,5)(a,ja,5),t&2){let r;P(r=F())&&(n.customTrigger=r.first),P(r=F())&&(n.options=r),P(r=F())&&(n.optionGroups=r)}},viewQuery:function(t,n){if(t&1&&Ae(j0,5)(H0,5)(ys,5),t&2){let a;P(a=F())&&(n.trigger=a.first),P(a=F())&&(n.panel=a.first),P(a=F())&&(n._overlayDir=a.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:21,hostBindings:function(t,n){t&1&&E("keydown",function(r){return n._handleKeydown(r)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),t&2&&(Z("id",n.id)("tabindex",n.disabled?-1:n.tabIndex)("aria-controls",n.panelOpen?n.id+"-panel":null)("aria-expanded",n.panelOpen)("aria-label",n.ariaLabel||null)("aria-required",n.required.toString())("aria-disabled",n.disabled.toString())("aria-invalid",n.errorState)("aria-activedescendant",n._getAriaActiveDescendant()),p("mat-mdc-select-disabled",n.disabled)("mat-mdc-select-invalid",n.errorState)("mat-mdc-select-required",n.required)("mat-mdc-select-empty",n.empty)("mat-mdc-select-multiple",n.multiple)("mat-select-open",n.panelOpen))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",L],disableRipple:[2,"disableRipple","disableRipple",L],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:kt(e)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",L],placeholder:"placeholder",required:[2,"required","required",L],multiple:[2,"multiple","multiple",L],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",L],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",kt],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth",canSelectNullableOptions:[2,"canSelectNullableOptions","canSelectNullableOptions",L]},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[ee([{provide:Da,useExisting:i},{provide:za,useExisting:i}]),Ee],ngContentSelectors:G0,decls:11,vars:10,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"detach","backdropClick","overlayKeydown","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","cdkConnectedOverlayFlexibleDimensions","cdkConnectedOverlayUsePopover"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",1,"mat-mdc-select-panel","mdc-menu-surface","mdc-menu-surface--open",3,"keydown"]],template:function(t,n){if(t&1&&(fe(U0),s(0,"div",2,0),E("click",function(){return n.open()}),s(3,"div",3),k(4,$0,2,1,"span",4)(5,K0,3,1,"span",5),l(),s(6,"div",6)(7,"div",7),ki(),s(8,"svg",8),_(9,"path",9),l()()()(),He(10,Y0,3,16,"ng-template",10),E("detach",function(){return n.close()})("backdropClick",function(){return n.close()})("overlayKeydown",function(r){return n._handleOverlayKeydown(r)})),t&2){let a=Le(1);c(3),Z("id",n._valueId),c(),M(n.empty?4:5),c(6),x("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||a)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)("cdkConnectedOverlayFlexibleDimensions",!0)("cdkConnectedOverlayUsePopover",n._popoverLocation)}},dependencies:[Ao,ys],styles:[`@keyframes _mat-select-enter {
5290
5290
  from {
5291
5291
  opacity: 0;
5292
5292
  transform: scaleY(0.8);
@@ -5475,7 +5475,7 @@ div.mat-mdc-select-panel {
5475
5475
  .mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper {
5476
5476
  transform: var(--mat-select-arrow-transform, translateY(-8px));
5477
5477
  }
5478
- `],encapsulation:2})}return i})();var Vo=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[Nt,Po,ee,_i,kt,Po]})}return i})();var Z0=["tooltip"],Q0=20;var J0=new x("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let i=d(X);return()=>yi(i,{scrollThrottle:Q0})}}),ey=new x("mat-tooltip-default-options",{providedIn:"root",factory:()=>({showDelay:0,hideDelay:0,touchendHideDelay:1500})});var wp="tooltip-panel",ty={passive:!0},iy=8,ny=8,oy=24,ay=200,Ga=(()=>{class i{_elementRef=d(N);_ngZone=d(H);_platform=d(le);_ariaDescriber=d(eu);_focusMonitor=d(Rt);_dir=d(qe);_injector=d(X);_viewContainerRef=d(Xe);_mediaMatcher=d(mo);_document=d(q);_renderer=d(ve);_animationsDisabled=pe();_defaultOptions=d(ey,{optional:!0});_overlayRef=null;_tooltipInstance=null;_overlayPanelClass;_portal;_position="below";_positionAtOrigin=!1;_disabled=!1;_tooltipClass;_viewInitialized=!1;_pointerExitEventsInitialized=!1;_tooltipComponent=Dp;_viewportMargin=8;_currentPosition;_cssClassPrefix="mat-mdc";_ariaDescriptionPending=!1;_dirSubscribed=!1;get position(){return this._position}set position(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(e){this._positionAtOrigin=mt(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){let t=mt(e);this._disabled!==t&&(this._disabled=t,t?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message))}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=Ht(e)}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=Ht(e),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}_hideDelay;touchGestures="auto";get message(){return this._message}set message(e){let t=this._message;this._message=e!=null?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(t)}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}_eventCleanups=[];_touchstartTimeout=null;_destroyed=new R;_isDestroyed=!1;constructor(){let e=this._defaultOptions;e&&(this._showDelay=e.showDelay,this._hideDelay=e.hideDelay,e.position&&(this.position=e.position),e.positionAtOrigin&&(this.positionAtOrigin=e.positionAtOrigin),e.touchGestures&&(this.touchGestures=e.touchGestures),e.tooltipClass&&(this.tooltipClass=e.tooltipClass)),this._viewportMargin=iy}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(ae(this._destroyed)).subscribe(e=>{e?e==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let e=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._eventCleanups.forEach(t=>t()),this._eventCleanups.length=0,this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0,this._ariaDescriber.removeDescription(e,this.message,"tooltip"),this._focusMonitor.stopMonitoring(e)}show(e=this.showDelay,t){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let n=this._createOverlay(t);this._detach(),this._portal=this._portal||new bi(this._tooltipComponent,this._viewContainerRef);let a=this._tooltipInstance=n.attach(this._portal).instance;a._triggerElement=this._elementRef.nativeElement,a._mouseLeaveHideDelay=this._hideDelay,a.afterHidden().pipe(ae(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),a.show(e)}hide(e=this.hideDelay){let t=this._tooltipInstance;t&&(t.isVisible()?t.hide(e):(t._cancelPendingAnimations(),this._detach()))}toggle(e){this._isTooltipVisible()?this.hide():this.show(void 0,e)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(e){if(this._overlayRef){let r=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!e)&&r._origin instanceof N)return this._overlayRef;this._detach()}let t=this._injector.get(gn).getAncestorScrollContainers(this._elementRef),n=`${this._cssClassPrefix}-${wp}`,a=$i(this._injector,this.positionAtOrigin?e||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(t).withPopoverLocation("global");return a.positionChanges.pipe(ae(this._destroyed)).subscribe(r=>{this._updateCurrentPositionClass(r.connectionPair),this._tooltipInstance&&r.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=qt(this._injector,{direction:this._dir,positionStrategy:a,panelClass:this._overlayPanelClass?[...this._overlayPanelClass,n]:n,scrollStrategy:this._injector.get(J0)(),disableAnimations:this._animationsDisabled,eventPredicate:this._overlayEventPredicate}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(ae(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(ae(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(ae(this._destroyed)).subscribe(r=>{r.preventDefault(),r.stopPropagation(),this._ngZone.run(()=>this.hide(0))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._dirSubscribed||(this._dirSubscribed=!0,this._dir.change.pipe(ae(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(e){let t=e.getConfig().positionStrategy,n=this._getOrigin(),a=this._getOverlayPosition();t.withPositions([this._addOffset(V(V({},n.main),a.main)),this._addOffset(V(V({},n.fallback),a.fallback))])}_addOffset(e){let t=ny,n=!this._dir||this._dir.value=="ltr";return e.originY==="top"?e.offsetY=-t:e.originY==="bottom"?e.offsetY=t:e.originX==="start"?e.offsetX=n?-t:t:e.originX==="end"&&(e.offsetX=n?t:-t),e}_getOrigin(){let e=!this._dir||this._dir.value=="ltr",t=this.position,n;t=="above"||t=="below"?n={originX:"center",originY:t=="above"?"top":"bottom"}:t=="before"||t=="left"&&e||t=="right"&&!e?n={originX:"start",originY:"center"}:(t=="after"||t=="right"&&e||t=="left"&&!e)&&(n={originX:"end",originY:"center"});let{x:a,y:r}=this._invertPosition(n.originX,n.originY);return{main:n,fallback:{originX:a,originY:r}}}_getOverlayPosition(){let e=!this._dir||this._dir.value=="ltr",t=this.position,n;t=="above"?n={overlayX:"center",overlayY:"bottom"}:t=="below"?n={overlayX:"center",overlayY:"top"}:t=="before"||t=="left"&&e||t=="right"&&!e?n={overlayX:"end",overlayY:"center"}:(t=="after"||t=="right"&&e||t=="left"&&!e)&&(n={overlayX:"start",overlayY:"center"});let{x:a,y:r}=this._invertPosition(n.overlayX,n.overlayY);return{main:n,fallback:{overlayX:a,overlayY:r}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),je(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e instanceof Set?Array.from(e):e,this._tooltipInstance._markForCheck())}_invertPosition(e,t){return this.position==="above"||this.position==="below"?t==="top"?t="bottom":t==="bottom"&&(t="top"):e==="end"?e="start":e==="start"&&(e="end"),{x:e,y:t}}_updateCurrentPositionClass(e){let{overlayY:t,originX:n,originY:a}=e,r;if(t==="center"?this._dir&&this._dir.value==="rtl"?r=n==="end"?"left":"right":r=n==="start"?"left":"right":r=t==="bottom"&&a==="top"?"above":"below",r!==this._currentPosition){let u=this._overlayRef;if(u){let h=`${this._cssClassPrefix}-${wp}-`;u.removePanelClass(h+this._currentPosition),u.addPanelClass(h+r)}this._currentPosition=r}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._eventCleanups.length||(this._isTouchPlatform()?this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._addListener("touchstart",e=>{let t=e.targetTouches?.[0],n=t?{x:t.clientX,y:t.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let a=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,n)},this._defaultOptions?.touchLongPressShowDelay??a)})):this._addListener("mouseenter",e=>{this._setupPointerExitEventsIfNeeded();let t;e.x!==void 0&&e.y!==void 0&&(t=e),this.show(void 0,t)}))}_setupPointerExitEventsIfNeeded(){if(!this._pointerExitEventsInitialized){if(this._pointerExitEventsInitialized=!0,!this._isTouchPlatform())this._addListener("mouseleave",e=>{let t=e.relatedTarget;(!t||!this._overlayRef?.overlayElement.contains(t))&&this.hide()}),this._addListener("wheel",e=>{if(this._isTooltipVisible()){let t=this._document.elementFromPoint(e.clientX,e.clientY),n=this._elementRef.nativeElement;t!==n&&!n.contains(t)&&this.hide()}});else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let e=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay)};this._addListener("touchend",e),this._addListener("touchcancel",e)}}}_addListener(e,t){this._eventCleanups.push(this._renderer.listen(this._elementRef.nativeElement,e,t,ty))}_isTouchPlatform(){let e=this._defaultOptions?.detectHoverCapability;return typeof e=="function"?!e():this._platform.IOS||this._platform.ANDROID?!0:this._platform.isBrowser?!!e&&this._mediaMatcher.matchMedia("(any-hover: none)").matches:!1}_disableNativeGesturesIfNecessary(){let e=this.touchGestures;if(e!=="off"){let t=this._elementRef.nativeElement,n=t.style;(e==="on"||t.nodeName!=="INPUT"&&t.nodeName!=="TEXTAREA")&&(n.userSelect=n.msUserSelect=n.webkitUserSelect=n.MozUserSelect="none"),(e==="on"||!t.draggable)&&(n.webkitUserDrag="none"),n.touchAction="none",n.webkitTapHighlightColor="transparent"}}_syncAriaDescription(e){this._ariaDescriptionPending||(this._ariaDescriptionPending=!0,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,e,"tooltip"),this._isDestroyed||je({write:()=>{this._ariaDescriptionPending=!1,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")}},{injector:this._injector}))}_overlayEventPredicate=e=>e.type==="keydown"?this._isTooltipVisible()&&e.keyCode===27&&!Ge(e):!0;static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(t,n){t&2&&p("mat-mdc-tooltip-disabled",n.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]})}return i})(),Dp=(()=>{class i{_changeDetectorRef=d(te);_elementRef=d(N);_isMultiline=!1;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled=pe();_tooltip;_closeOnInteraction=!1;_isVisible=!1;_onHide=new R;_showAnimation="mat-mdc-tooltip-show";_hideAnimation="mat-mdc-tooltip-hide";show(e){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},e)}hide(e){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},e)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:e}){(!e||!this._triggerElement.contains(e))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let e=this._elementRef.nativeElement.getBoundingClientRect();return e.height>oy&&e.width>=ay}_handleAnimationEnd({animationName:e}){(e===this._showAnimation||e===this._hideAnimation)&&this._finalizeAnimation(e===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(e){e?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(e){let t=this._tooltip.nativeElement,n=this._showAnimation,a=this._hideAnimation;if(t.classList.remove(e?a:n),t.classList.add(e?n:a),this._isVisible!==e&&(this._isVisible=e,this._changeDetectorRef.markForCheck()),e&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let r=getComputedStyle(t);(r.getPropertyValue("animation-duration")==="0s"||r.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(t.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(t,n){if(t&1&&Me(Z0,7),t&2){let a;P(a=F())&&(n._tooltip=a.first)}},hostAttrs:["aria-hidden","true"],hostBindings:function(t,n){t&1&&A("mouseleave",function(r){return n._handleMouseLeave(r)})},decls:4,vars:5,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(t,n){t&1&&(Ie(0,"div",1,0),ar("animationend",function(r){return n._handleAnimationEnd(r)}),Ie(2,"div",2),m(3),Ue()()),t&2&&(et(n.tooltipClass),p("mdc-tooltip--multiline",n._isMultiline),c(3),W(n.message))},styles:[`.mat-mdc-tooltip {
5478
+ `],encapsulation:2})}return i})();var Vo=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[Vt,Po,te,yi,At,Po]})}return i})();var J0=["tooltip"],ey=20;var ty=new w("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let i=d(X);return()=>wi(i,{scrollThrottle:ey})}}),iy=new w("mat-tooltip-default-options",{providedIn:"root",factory:()=>({showDelay:0,hideDelay:0,touchendHideDelay:1500})});var Dp="tooltip-panel",ny={passive:!0},oy=8,ay=8,ry=24,sy=200,$a=(()=>{class i{_elementRef=d(N);_ngZone=d(U);_platform=d(ce);_ariaDescriber=d(tu);_focusMonitor=d(Nt);_dir=d(qe);_injector=d(X);_viewContainerRef=d(Qe);_mediaMatcher=d(uo);_document=d(q);_renderer=d(Ce);_animationsDisabled=_e();_defaultOptions=d(iy,{optional:!0});_overlayRef=null;_tooltipInstance=null;_overlayPanelClass;_portal;_position="below";_positionAtOrigin=!1;_disabled=!1;_tooltipClass;_viewInitialized=!1;_pointerExitEventsInitialized=!1;_tooltipComponent=Sp;_viewportMargin=8;_currentPosition;_cssClassPrefix="mat-mdc";_ariaDescriptionPending=!1;_dirSubscribed=!1;get position(){return this._position}set position(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(e){this._positionAtOrigin=mt(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){let t=mt(e);this._disabled!==t&&(this._disabled=t,t?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message))}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=$t(e)}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=$t(e),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}_hideDelay;touchGestures="auto";get message(){return this._message}set message(e){let t=this._message;this._message=e!=null?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(t)}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}_eventCleanups=[];_touchstartTimeout=null;_destroyed=new R;_isDestroyed=!1;constructor(){let e=this._defaultOptions;e&&(this._showDelay=e.showDelay,this._hideDelay=e.hideDelay,e.position&&(this.position=e.position),e.positionAtOrigin&&(this.positionAtOrigin=e.positionAtOrigin),e.touchGestures&&(this.touchGestures=e.touchGestures),e.tooltipClass&&(this.tooltipClass=e.tooltipClass)),this._viewportMargin=oy}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(re(this._destroyed)).subscribe(e=>{e?e==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let e=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._eventCleanups.forEach(t=>t()),this._eventCleanups.length=0,this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0,this._ariaDescriber.removeDescription(e,this.message,"tooltip"),this._focusMonitor.stopMonitoring(e)}show(e=this.showDelay,t){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let n=this._createOverlay(t);this._detach(),this._portal=this._portal||new xi(this._tooltipComponent,this._viewContainerRef);let a=this._tooltipInstance=n.attach(this._portal).instance;a._triggerElement=this._elementRef.nativeElement,a._mouseLeaveHideDelay=this._hideDelay,a.afterHidden().pipe(re(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),a.show(e)}hide(e=this.hideDelay){let t=this._tooltipInstance;t&&(t.isVisible()?t.hide(e):(t._cancelPendingAnimations(),this._detach()))}toggle(e){this._isTooltipVisible()?this.hide():this.show(void 0,e)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(e){if(this._overlayRef){let r=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!e)&&r._origin instanceof N)return this._overlayRef;this._detach()}let t=this._injector.get(vn).getAncestorScrollContainers(this._elementRef),n=`${this._cssClassPrefix}-${Dp}`,a=qi(this._injector,this.positionAtOrigin?e||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(t).withPopoverLocation("global");return a.positionChanges.pipe(re(this._destroyed)).subscribe(r=>{this._updateCurrentPositionClass(r.connectionPair),this._tooltipInstance&&r.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=Xt(this._injector,{direction:this._dir,positionStrategy:a,panelClass:this._overlayPanelClass?[...this._overlayPanelClass,n]:n,scrollStrategy:this._injector.get(ty)(),disableAnimations:this._animationsDisabled,eventPredicate:this._overlayEventPredicate}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(re(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(re(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(re(this._destroyed)).subscribe(r=>{r.preventDefault(),r.stopPropagation(),this._ngZone.run(()=>this.hide(0))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._dirSubscribed||(this._dirSubscribed=!0,this._dir.change.pipe(re(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(e){let t=e.getConfig().positionStrategy,n=this._getOrigin(),a=this._getOverlayPosition();t.withPositions([this._addOffset(V(V({},n.main),a.main)),this._addOffset(V(V({},n.fallback),a.fallback))])}_addOffset(e){let t=ay,n=!this._dir||this._dir.value=="ltr";return e.originY==="top"?e.offsetY=-t:e.originY==="bottom"?e.offsetY=t:e.originX==="start"?e.offsetX=n?-t:t:e.originX==="end"&&(e.offsetX=n?t:-t),e}_getOrigin(){let e=!this._dir||this._dir.value=="ltr",t=this.position,n;t=="above"||t=="below"?n={originX:"center",originY:t=="above"?"top":"bottom"}:t=="before"||t=="left"&&e||t=="right"&&!e?n={originX:"start",originY:"center"}:(t=="after"||t=="right"&&e||t=="left"&&!e)&&(n={originX:"end",originY:"center"});let{x:a,y:r}=this._invertPosition(n.originX,n.originY);return{main:n,fallback:{originX:a,originY:r}}}_getOverlayPosition(){let e=!this._dir||this._dir.value=="ltr",t=this.position,n;t=="above"?n={overlayX:"center",overlayY:"bottom"}:t=="below"?n={overlayX:"center",overlayY:"top"}:t=="before"||t=="left"&&e||t=="right"&&!e?n={overlayX:"end",overlayY:"center"}:(t=="after"||t=="right"&&e||t=="left"&&!e)&&(n={overlayX:"start",overlayY:"center"});let{x:a,y:r}=this._invertPosition(n.overlayX,n.overlayY);return{main:n,fallback:{overlayX:a,overlayY:r}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),je(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e instanceof Set?Array.from(e):e,this._tooltipInstance._markForCheck())}_invertPosition(e,t){return this.position==="above"||this.position==="below"?t==="top"?t="bottom":t==="bottom"&&(t="top"):e==="end"?e="start":e==="start"&&(e="end"),{x:e,y:t}}_updateCurrentPositionClass(e){let{overlayY:t,originX:n,originY:a}=e,r;if(t==="center"?this._dir&&this._dir.value==="rtl"?r=n==="end"?"left":"right":r=n==="start"?"left":"right":r=t==="bottom"&&a==="top"?"above":"below",r!==this._currentPosition){let u=this._overlayRef;if(u){let h=`${this._cssClassPrefix}-${Dp}-`;u.removePanelClass(h+this._currentPosition),u.addPanelClass(h+r)}this._currentPosition=r}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._eventCleanups.length||(this._isTouchPlatform()?this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._addListener("touchstart",e=>{let t=e.targetTouches?.[0],n=t?{x:t.clientX,y:t.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let a=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,n)},this._defaultOptions?.touchLongPressShowDelay??a)})):this._addListener("mouseenter",e=>{this._setupPointerExitEventsIfNeeded();let t;e.x!==void 0&&e.y!==void 0&&(t=e),this.show(void 0,t)}))}_setupPointerExitEventsIfNeeded(){if(!this._pointerExitEventsInitialized){if(this._pointerExitEventsInitialized=!0,!this._isTouchPlatform())this._addListener("mouseleave",e=>{let t=e.relatedTarget;(!t||!this._overlayRef?.overlayElement.contains(t))&&this.hide()}),this._addListener("wheel",e=>{if(this._isTooltipVisible()){let t=this._document.elementFromPoint(e.clientX,e.clientY),n=this._elementRef.nativeElement;t!==n&&!n.contains(t)&&this.hide()}});else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let e=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay)};this._addListener("touchend",e),this._addListener("touchcancel",e)}}}_addListener(e,t){this._eventCleanups.push(this._renderer.listen(this._elementRef.nativeElement,e,t,ny))}_isTouchPlatform(){let e=this._defaultOptions?.detectHoverCapability;return typeof e=="function"?!e():this._platform.IOS||this._platform.ANDROID?!0:this._platform.isBrowser?!!e&&this._mediaMatcher.matchMedia("(any-hover: none)").matches:!1}_disableNativeGesturesIfNecessary(){let e=this.touchGestures;if(e!=="off"){let t=this._elementRef.nativeElement,n=t.style;(e==="on"||t.nodeName!=="INPUT"&&t.nodeName!=="TEXTAREA")&&(n.userSelect=n.msUserSelect=n.webkitUserSelect=n.MozUserSelect="none"),(e==="on"||!t.draggable)&&(n.webkitUserDrag="none"),n.touchAction="none",n.webkitTapHighlightColor="transparent"}}_syncAriaDescription(e){this._ariaDescriptionPending||(this._ariaDescriptionPending=!0,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,e,"tooltip"),this._isDestroyed||je({write:()=>{this._ariaDescriptionPending=!1,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")}},{injector:this._injector}))}_overlayEventPredicate=e=>e.type==="keydown"?this._isTooltipVisible()&&e.keyCode===27&&!Ge(e):!0;static \u0275fac=function(t){return new(t||i)};static \u0275dir=S({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(t,n){t&2&&p("mat-mdc-tooltip-disabled",n.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]})}return i})(),Sp=(()=>{class i{_changeDetectorRef=d(ie);_elementRef=d(N);_isMultiline=!1;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled=_e();_tooltip;_closeOnInteraction=!1;_isVisible=!1;_onHide=new R;_showAnimation="mat-mdc-tooltip-show";_hideAnimation="mat-mdc-tooltip-hide";show(e){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},e)}hide(e){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},e)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:e}){(!e||!this._triggerElement.contains(e))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let e=this._elementRef.nativeElement.getBoundingClientRect();return e.height>ry&&e.width>=sy}_handleAnimationEnd({animationName:e}){(e===this._showAnimation||e===this._hideAnimation)&&this._finalizeAnimation(e===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(e){e?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(e){let t=this._tooltip.nativeElement,n=this._showAnimation,a=this._hideAnimation;if(t.classList.remove(e?a:n),t.classList.add(e?n:a),this._isVisible!==e&&(this._isVisible=e,this._changeDetectorRef.markForCheck()),e&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let r=getComputedStyle(t);(r.getPropertyValue("animation-duration")==="0s"||r.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(t.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(t,n){if(t&1&&Ae(J0,7),t&2){let a;P(a=F())&&(n._tooltip=a.first)}},hostAttrs:["aria-hidden","true"],hostBindings:function(t,n){t&1&&E("mouseleave",function(r){return n._handleMouseLeave(r)})},decls:4,vars:5,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(t,n){t&1&&(Re(0,"div",1,0),rr("animationend",function(r){return n._handleAnimationEnd(r)}),Re(2,"div",2),m(3),Ue()()),t&2&&(tt(n.tooltipClass),p("mdc-tooltip--multiline",n._isMultiline),c(3),B(n.message))},styles:[`.mat-mdc-tooltip {
5479
5479
  position: relative;
5480
5480
  transform: scale(0);
5481
5481
  display: inline-flex;
@@ -5580,19 +5580,19 @@ div.mat-mdc-select-panel {
5580
5580
  .mat-mdc-tooltip-hide {
5581
5581
  animation: mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards;
5582
5582
  }
5583
- `],encapsulation:2})}return i})();var Ns=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=z({imports:[da,Nt,ee,_i]})}return i})();function wn(i,o){for(let e of i){let t=e.indexOf("=");if(t>0&&e.slice(0,t)===o)return e.slice(t+1);let n=e.indexOf(" ");if(n>0&&e.slice(0,n)===o)return e.slice(n+1).trim()}for(let e=0;e<i.length;e++)if(i[e]===o&&e+1<i.length)return i[e+1];return null}function Kn(i,o,e,t){for(let n of i){let a=n.split(/\s|=/)[0];if(a===o)return!0;if(a===e)return!1}return t}function Ke(i,o,e){let t=wn(i,o);return t!==null?t:e}function Ee(i,o,e){let t=wn(i,o);if(t!==null){let n=parseInt(t,10);return isNaN(n)?e:n}return e}function ut(i,o,e){let t=wn(i,o);if(t!==null){let n=parseFloat(t);return isNaN(n)?e:n}return e}var ry=(i,o)=>o.path;function sy(i,o){i&1&&(s(0,"span",7),m(1,"(dir)"),l())}function ly(i,o){if(i&1&&(s(0,"mat-option",5)(1,"span",6),m(2),l(),M(3,sy,2,0,"span",7),l()),i&2){let e=o.$implicit;C("value",e.path),c(2),W(e.path),c(),E(e.isDir?3:-1)}}var kp=(()=>{class i{constructor(){this.fb=d(un),this.service=d(_t),this.label="Path",this.placeholder="/path/to/file",this.required=!1,this.fieldClass="",this.existingPaths=[],this.onChange=e=>{},this.onTouched=()=>{},this._subscription=null,this.suggestions=I([]),this.innerForm=this.fb.group({value:[""]})}writeValue(e){let t=(e??"").toString();this.innerForm.patchValue({value:t},{emitEvent:!1})}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){e?this.innerForm.disable():this.innerForm.enable()}ngOnInit(){this._subscription=this.innerForm.get("value").valueChanges.subscribe(e=>{this.onChange(e)}),this._subscription.add(this.innerForm.get("value").valueChanges.pipe(Vt(200),xi(),We(e=>{let t=(e??"").trim();return t?this.service.getLlamaAutocomplete("path",t).pipe(Kt(()=>ge([]))):ge(this.emptySuggestions)})).subscribe(e=>{this.suggestions.set(e)}))}get emptySuggestions(){return this.existingPaths.filter(Boolean).map(e=>({path:e,source:"existing config"}))}ngOnDestroy(){this._subscription?.unsubscribe()}onSelect(e){this.innerForm.patchValue({value:e},{emitEvent:!1}),this.onChange(e)}onBlur(){this.onTouched()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=T({type:i,selectors:[["app-file-autocomplete"]],inputs:{label:"label",placeholder:"placeholder",required:"required",fieldClass:"fieldClass",existingPaths:"existingPaths"},features:[J([{provide:Mi,useExisting:nt(()=>i),multi:!0}])],decls:9,vars:7,consts:[["auto","matAutocomplete"],[3,"formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","value",3,"blur","placeholder","required","matAutocomplete"],[3,"optionSelected"],[3,"value"],[1,"file-path"],[1,"file-dir"]],template:function(t,n){if(t&1&&(ui(0,1),s(1,"mat-form-field",2)(2,"input",3),A("blur",function(){return n.onBlur()}),l(),b(),s(3,"mat-label"),m(4),l()(),s(5,"mat-autocomplete",4,0),A("optionSelected",function(r){return n.onSelect(r.option.value)}),me(7,ly,4,3,"mat-option",5,ry),l(),hi()),t&2){let a=Fe(6);C("formGroup",n.innerForm),c(),et(n.fieldClass),c(),C("placeholder",n.placeholder)("required",n.required)("matAutocomplete",a),y(),c(2),W(n.label),c(3),ue(n.suggestions())}},dependencies:[ze,pn,Ei,Ai,mn,Jr,Ut,ji,kt,St,Ot,ti,ei,xn,Cn,vt,Wi],styles:[".full-width[_ngcontent-%COMP%]{width:100%}.file-path[_ngcontent-%COMP%]{font-family:monospace}.file-dir[_ngcontent-%COMP%]{margin-left:4px;color:#1976d2;font-size:11px;font-weight:500}.file-source[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}"]})}}return i})();function qi(i){i||(i=d(Bt));let o=new yt(e=>{if(i.destroyed){e.next();return}return i.onDestroy(e.next.bind(e))});return e=>e.pipe(ae(o))}function Yn(i,o){let t=!o?.manualCleanup?o?.injector?.get(Bt)??d(Bt):null,n=cy(o?.equal),a;o?.requireSync?a=I({kind:0},{equal:n}):a=I({kind:1,value:o?.initialValue},{equal:n});let r,u=i.subscribe({next:h=>a.set({kind:1,value:h}),error:h=>{a.set({kind:2,error:h}),r?.()},complete:()=>{r?.()}});if(o?.requireSync&&a().kind===0)throw new re(601,!1);return r=t?.onDestroy(u.unsubscribe.bind(u)),G(()=>{let h=a();switch(h.kind){case 1:return h.value;case 2:throw h.error;case 0:throw new re(601,!1)}},{equal:o?.equal})}function cy(i=Object.is){return(o,e)=>o.kind===1&&e.kind===1&&i(o.value,e.value)}function Dn(i){if(typeof i=="number")return i;let o=i.trim();if(!o)return 0;let e=o.split(/\s*x\s*/i),t=1,n;if(e.length>=2){let h=e[0].trim();h&&(t=parseInt(h,10),(isNaN(t)||t<1)&&(t=1)),n=e.slice(1).join("").trim()}else n=o;let a=n.match(/^(\d+)\s*([kKmM])?$/);if(!a)return 0;let r=parseInt(a[1],10),u=a[2];return u&&(u.toLowerCase()==="k"?r*=1024:u.toLowerCase()==="m"&&(r*=1024*1024)),t*r}var $a=[8192,16384,32768,65536,98304,131072,196608,262144,524288,1048576];function Mp(i){if(i<=0)return"0";if(i>=1048576){let o=i/1048576;return`${o%1===0?o:o.toFixed(1)}M`}if(i>=1024){let o=i/1024;return`${o%1===0?o:o.toFixed(1)}K`}return`${i}`}function Sn(i,o){if(i<=0)return"";if(o>1&&i%o===0){let e=i/o;if($a.includes(e))return`${o} x ${Mp(e)}`}return Mp(i)}var dy=(i,o)=>o.command,Gc=(i,o)=>o.path,my=(i,o)=>o.label;function uy(i,o){i&1&&(s(0,"mat-error"),m(1,"Required"),l())}function hy(i,o){i&1&&(s(0,"mat-error"),m(1,"Starts with letter, alphanumeric + hyphens/underscores, max 128 chars"),l())}function py(i,o){i&1&&(s(0,"mat-error"),m(1,"Required"),l())}function fy(i,o){if(i&1&&(s(0,"mat-option",8)(1,"span",100),m(2),l(),s(3,"span",101),m(4),l()()),i&2){let e=o.$implicit;C("value",e.command),c(2),W(e.command),c(2),he("(",e.from,")")}}function gy(i,o){if(i&1&&(s(0,"mat-option",8),m(1),l()),i&2){let e=o.$implicit;C("value",e.path),c(),W(e.path)}}function _y(i,o){if(i&1&&(s(0,"mat-option",8),m(1),l()),i&2){let e=o.$implicit;C("value",e.label),c(),W(e.label)}}function vy(i,o){if(i&1&&(s(0,"mat-option",8),m(1),l()),i&2){let e=o.$implicit;C("value",e),c(),W(e)}}function by(i,o){if(i&1&&(s(0,"mat-option",8),m(1),l()),i&2){let e=o.$implicit;C("value",e),c(),W(e)}}function yy(i,o){if(i&1&&(s(0,"div",26),m(1,"YaRN Parameters"),l(),s(2,"div",13)(3,"mat-form-field",18),_(4,"input",102),b(),s(5,"mat-label"),m(6,"YaRN Orig Ctx"),l()(),s(7,"mat-form-field",18),_(8,"input",103),b(),s(9,"mat-label"),m(10,"Extrapolation Mix"),l()(),s(11,"mat-form-field",18),_(12,"input",104),b(),s(13,"mat-label"),m(14,"Attn Factor"),l()(),s(15,"mat-form-field",18),_(16,"input",105),b(),s(17,"mat-label"),m(18,"Beta Slow"),l()(),s(19,"mat-form-field",18),_(20,"input",106),b(),s(21,"mat-label"),m(22,"Beta Fast"),l()()()),i&2){let e=w();c(3),p("changed",e.isControlChanged("yarnOrigCtx")),c(),y(),c(3),p("changed",e.isControlChanged("yarnExtFactor")),c(),y(),c(3),p("changed",e.isControlChanged("yarnAttnFactor")),c(),y(),c(3),p("changed",e.isControlChanged("yarnBetaSlow")),c(),y(),c(3),p("changed",e.isControlChanged("yarnBetaFast")),c(),y()}}function Cy(i,o){if(i&1&&(s(0,"mat-option",8),m(1),l()),i&2){let e=o.$implicit;C("value",e.path),c(),W(e.path)}}function xy(i,o){if(i&1&&(s(0,"mat-option",8),m(1),l()),i&2){let e=o.$implicit;C("value",e),c(),W(e)}}function wy(i,o){if(i&1&&(s(0,"mat-option",8),m(1),l()),i&2){let e=o.$implicit;C("value",e),c(),W(e)}}function Dy(i,o){if(i&1&&(s(0,"div",26),m(1,"Draft Model"),l(),_(2,"app-file-autocomplete",107),b(),s(3,"div",13)(4,"mat-form-field",18)(5,"mat-select",108),me(6,Cy,2,2,"mat-option",8,Gc),l(),b(),s(8,"mat-label"),m(9,"Draft Device (multi-select)"),l()()(),s(10,"div",13)(11,"mat-form-field",18),_(12,"input",109),b(),s(13,"mat-label"),m(14,"Draft N Max"),l()(),s(15,"mat-form-field",18),_(16,"input",110),b(),s(17,"mat-label"),m(18,"Draft GPU Layers"),l()()(),s(19,"div",13)(20,"mat-form-field",18)(21,"mat-select",111),me(22,xy,2,2,"mat-option",8,xt),l(),b(),s(24,"mat-label"),m(25,"Draft Cache Type K"),l()(),s(26,"mat-form-field",18)(27,"mat-select",112),me(28,wy,2,2,"mat-option",8,xt),l(),b(),s(30,"mat-label"),m(31,"Draft Cache Type V"),l()()()),i&2){let e=w();c(2),C("existingPaths",e.existingDraftModelPaths())("fieldClass",e.isControlChanged("modelDraft")?"changed":""),y(),c(2),p("changed",e.isControlChanged("specDraftDevice")),c(),y(),c(),ue(e.availableDevices()),c(5),p("changed",e.isControlChanged("specDraftNMax")),c(),y(),c(3),p("changed",e.isControlChanged("nGpuLayersDraft")),c(),y(),c(4),p("changed",e.isControlChanged("specDraftCacheTypeK")),c(),y(),c(),ue(e.kvCacheTypes),c(4),p("changed",e.isControlChanged("specDraftCacheTypeV")),c(),y(),c(),ue(e.kvCacheTypes)}}function Sy(i,o){if(i&1&&(s(0,"div",26),m(1,"Ngram Mod Parameters"),l(),s(2,"div",13)(3,"mat-form-field",18),_(4,"input",113),b(),s(5,"mat-label"),m(6,"Ngram Mod N Min"),l()(),s(7,"mat-form-field",18),_(8,"input",114),b(),s(9,"mat-label"),m(10,"Ngram Mod N Max"),l()(),s(11,"mat-form-field",18),_(12,"input",115),b(),s(13,"mat-label"),m(14,"Ngram Mod Match"),l()()()),i&2){let e=w();c(3),p("changed",e.isControlChanged("specNgramModNMin")),c(),y(),c(3),p("changed",e.isControlChanged("specNgramModNMax")),c(),y(),c(3),p("changed",e.isControlChanged("specNgramModNMatch")),c(),y()}}function ky(i,o){if(i&1&&(s(0,"div",26),m(1,"Ngram Simple Parameters"),l(),s(2,"div",13)(3,"mat-form-field",18),_(4,"input",116),b(),s(5,"mat-label"),m(6,"Simple Size N"),l()(),s(7,"mat-form-field",18),_(8,"input",117),b(),s(9,"mat-label"),m(10,"Simple Size M"),l()(),s(11,"mat-form-field",18),_(12,"input",118),b(),s(13,"mat-label"),m(14,"Simple Min Hits"),l()()()),i&2){let e=w();c(3),p("changed",e.isControlChanged("specNgramSimpleSizeN")),c(),y(),c(3),p("changed",e.isControlChanged("specNgramSimpleSizeM")),c(),y(),c(3),p("changed",e.isControlChanged("specNgramSimpleMinHits")),c(),y()}}function My(i,o){if(i&1&&(s(0,"mat-option",8)(1,"span",100),m(2),l(),s(3,"span",101),m(4),l()()),i&2){let e=o.$implicit;C("value",e.path),c(2),W(e.path),c(2),he("(",e.source,")")}}var f={host:"127.0.0.1",port:8080,threads:-1,flashAttn:"auto",fit:"on",parallel:-1,alias:"",nPredict:-1,contextShift:"off",contBatching:"on",model:"",mmproj:"",nGpuLayers:"auto",device:[],tensorSplit:"",splitMode:"layer",mainGpu:0,fitTarget:1024,fitCtx:4096,mlock:"off",mmap:"on",cpuMoe:"off",nCpuMoe:0,ctxSize:0,batchSize:2048,ubatchSize:512,cacheTypeK:"f16",cacheTypeV:"f16",kvOffload:"on",cacheRam:8192,swaFull:"off",ropeScaling:"none",ropeScale:1,ropeFreqBase:0,ropeFreqScale:0,yarnOrigCtx:0,yarnExtFactor:-1,yarnAttnFactor:-1,yarnBetaSlow:-1,yarnBetaFast:-1,temperature:.8,seed:-1,topK:40,topP:.95,minP:.05,typicalP:1,repeatLastN:64,repeatPenalty:1,presencePenalty:0,frequencyPenalty:0,dryMultiplier:0,dryBase:1.75,mirostat:0,dynatempRange:0,modelDraft:"",specDraftDevice:[],specDraftNMax:3,nGpuLayersDraft:"auto",specDraftCacheTypeK:"f16",specDraftCacheTypeV:"f16",specType:"none",specNgramModNMin:48,specNgramModNMax:64,specNgramModNMatch:24,specNgramSimpleSizeN:12,specNgramSimpleSizeM:48,specNgramSimpleMinHits:1,lora:"",loraScaled:"",timeout:3600,threadsHttp:-1,metrics:"off",slots:"on",cachePrompt:"on",cacheReuse:0,reasoning:"auto",reasoningBudget:-1,reasoningFormat:"auto",apiKeyFile:""};function Ey(i,o){let e=f[i];if(e===void 0)return!1;if(Array.isArray(o)||Array.isArray(e)){let t=Array.isArray(o)?o:[],n=Array.isArray(e)?e:[];return t.length!==n.length||t.some((a,r)=>a!==n[r])}return String(o)!==String(e)}var Ay="^[a-zA-Z][a-zA-Z0-9_-]{0,127}$",Ty=["f32","f16","bf16","q8_0","q4_0","q4_1","iq4_nl","q5_0","q5_1"],Iy=new Set(["--host","--port","--threads","--flash-attn","--fit","--parallel","--alias","--n-predict","--context-shift","--no-context-shift","--cont-batching","--no-cont-batching","--device","--tensor-split","--model","--mmproj","--n-gpu-layers","--split-mode","--main-gpu","--fit-target","--fit-ctx","--mlock","--mmap","--no-mmap","--cpu-moe","--n-cpu-moe","--ctx-size","--batch-size","--ubatch-size","--cache-type-k","--cache-type-v","--kv-offload","--no-kv-offload","--cache-ram","--swa-full","--rope-scaling","--rope-scale","--rope-freq-base","--rope-freq-scale","--yarn-orig-ctx","--yarn-ext-factor","--yarn-attn-factor","--yarn-beta-slow","--yarn-beta-fast","--temperature","--seed","--top-k","--top-p","--min-p","--typical","--repeat-last-n","--repeat-penalty","--presence-penalty","--frequency-penalty","--dry-multiplier","--dry-base","--mirostat","--dynatemp-range","--spec-type","--spec-draft-n-max","--model-draft","--spec-draft-device","--device-draft","--n-gpu-layers-draft","--cache-type-k-draft","--cache-type-v-draft","--spec-ngram-mod-n-min","--spec-ngram-mod-n-max","--spec-ngram-mod-n-match","--spec-ngram-simple-size-n","--spec-ngram-simple-size-m","--spec-ngram-simple-min-hits","--lora","--lora-scaled","--timeout","--threads-http","--metrics","--slots","--no-slots","--cache-prompt","--no-cache-prompt","--cache-reuse","--reasoning","--reasoning-budget","--reasoning-format","--api-key-file"]),Ep=(()=>{class i{constructor(){this.fb=d(un),this.dialogRef=d(gt),this.data=d(Wn),this.serviceService=d(_t),this.cdr=d(te),this.destroyRef=d(Bt),this.isEdit=this.data.config!==null,this.isClone=this.data.clone===!0,this.kvCacheTypes=Ty,this.allExistingCommands=G(()=>{let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e)r.name!==t&&(n.has(r.command)||(n.add(r.command),a.push({command:r.command,from:r.name})));return a}),this._commandValue=I(this.data.config?.command??""),this.commandValue=this._commandValue.asReadonly(),this.filteredCommands=G(()=>{let e=this.commandValue()?.toLowerCase()??"";return this.allExistingCommands().filter(t=>t.command.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))}),this.form=this.fb.group({name:[this.data.config?.name??"",{validators:[st.required,st.pattern(Ay)]}],command:[this.data.config?.command??"",st.required],host:[f.host],port:[f.port],threads:[f.threads],flashAttn:[f.flashAttn],fit:[f.fit],parallel:[f.parallel],alias:[f.alias],nPredict:[f.nPredict],contextShift:[f.contextShift],contBatching:[f.contBatching],model:[""],mmproj:[""],nGpuLayers:[f.nGpuLayers],device:[[]],tensorSplit:[""],splitMode:[f.splitMode],mainGpu:[f.mainGpu],fitTarget:[f.fitTarget],fitCtx:[f.fitCtx],mlock:[f.mlock],mmap:[f.mmap],cpuMoe:[f.cpuMoe],nCpuMoe:[f.nCpuMoe],ctxSize:[""],batchSize:[f.batchSize],ubatchSize:[f.ubatchSize],cacheTypeK:[f.cacheTypeK],cacheTypeV:[f.cacheTypeV],kvOffload:[f.kvOffload],cacheRam:[f.cacheRam],swaFull:[f.swaFull],ropeScaling:[f.ropeScaling],ropeScale:[f.ropeScale],ropeFreqBase:[f.ropeFreqBase],ropeFreqScale:[f.ropeFreqScale],yarnOrigCtx:[f.yarnOrigCtx],yarnExtFactor:[f.yarnExtFactor],yarnAttnFactor:[f.yarnAttnFactor],yarnBetaSlow:[f.yarnBetaSlow],yarnBetaFast:[f.yarnBetaFast],temperature:[f.temperature],seed:[f.seed],topK:[f.topK],topP:[f.topP],minP:[f.minP],typicalP:[f.typicalP],repeatLastN:[f.repeatLastN],repeatPenalty:[f.repeatPenalty],presencePenalty:[f.presencePenalty],frequencyPenalty:[f.frequencyPenalty],dryMultiplier:[f.dryMultiplier],dryBase:[f.dryBase],mirostat:[f.mirostat],dynatempRange:[f.dynatempRange],modelDraft:[""],specDraftDevice:[[]],specDraftNMax:[f.specDraftNMax],nGpuLayersDraft:[f.nGpuLayersDraft],specDraftCacheTypeK:[f.specDraftCacheTypeK],specDraftCacheTypeV:[f.specDraftCacheTypeV],specType:[f.specType],specNgramModNMin:[f.specNgramModNMin],specNgramModNMax:[f.specNgramModNMax],specNgramModNMatch:[f.specNgramModNMatch],specNgramSimpleSizeN:[f.specNgramSimpleSizeN],specNgramSimpleSizeM:[f.specNgramSimpleSizeM],specNgramSimpleMinHits:[f.specNgramSimpleMinHits],lora:[""],loraScaled:[""],timeout:[f.timeout],threadsHttp:[f.threadsHttp],metrics:[f.metrics],slots:[f.slots],cachePrompt:[f.cachePrompt],cacheReuse:[f.cacheReuse],reasoning:[f.reasoning],reasoningBudget:[f.reasoningBudget],reasoningFormat:[f.reasoningFormat],apiKeyFile:[""],extraFlags:[""],envText:[""]}),this.availableDevices=G(()=>this.availableDevicesRaw()),this.availableDevicesRaw=Yn(this.form.controls.command.valueChanges.pipe(qi(),Se(this.form.controls.command.value),Vt(300),xi(),We(e=>{let t=(e??"").trim();return t?this.serviceService.getLlamaAutocomplete("device","",t).pipe(Kt(()=>ge([]))):this.serviceService.getLlamaAutocomplete("device","").pipe(Kt(()=>ge([])))})),{initialValue:[]}),this.filteredHosts=Yn(this.form.controls.host.valueChanges.pipe(qi(),Se(this.form.controls.host.value),Vt(250),xi(),We(e=>{let t=(e??"").trim();return t?this.serviceService.getLlamaAutocomplete("host",t).pipe(Kt(()=>ge([]))):ge([])})),{initialValue:[]}),this.existingModelPaths=G(()=>this.extractConfigPaths("--model")),this.existingMmprojPaths=G(()=>this.extractConfigPaths("--mmproj")),this.existingApiKeyPaths=G(()=>this.extractConfigPaths("--api-key-file")),this.existingDraftModelPaths=G(()=>this.extractConfigPaths("--model-draft")),this.existingLoraPaths=G(()=>this.extractConfigPaths("--lora")),this.formValue=Yn(this.form.valueChanges,{initialValue:this.form.value}),this.fitValue=G(()=>this.formValue()?.fit),this.splitModeValue=G(()=>this.formValue()?.splitMode),this.specTypeValue=G(()=>this.formValue()?.specType),this.ropeScalingValue=G(()=>this.formValue()?.ropeScaling),this.cpuMoeValue=G(()=>this.formValue()?.cpuMoe),this.cachePromptValue=G(()=>this.formValue()?.cachePrompt),this.reasoningValue=G(()=>this.formValue()?.reasoning),this.mirostatValue=G(()=>this.formValue()?.mirostat),this.hostValue=G(()=>this.formValue()?.host),this.isTensorSplitDisabled=G(()=>this.splitModeValue()==="none"),this.isFitTargetDisabled=G(()=>this.fitValue()==="off"),this.isCpuMoeLayersDisabled=G(()=>this.cpuMoeValue()==="on"),this.isCacheReuseDisabled=G(()=>this.cachePromptValue()==="off"),this.isReasoningParamsDisabled=G(()=>this.reasoningValue()==="off"),this.isMirostatEnabled=G(()=>(this.mirostatValue()??0)!==0),this.isRopeParamsDisabled=G(()=>this.ropeScalingValue()==="none"),this.isPortDisabled=G(()=>(this.hostValue()??"").trim().toLowerCase().endsWith(".sock")),this.showDraftParams=G(()=>(this.specTypeValue()??"").includes("draft")),this.showNgramModParams=G(()=>(this.specTypeValue()??"").includes("ngram-mod")),this.showNgramSimpleParams=G(()=>(this.specTypeValue()??"").includes("ngram-simple")),this.showYarnParams=G(()=>this.ropeScalingValue()==="yarn"),this.parallelSlots=G(()=>{let e=this.formValue()?.parallel;return typeof e=="number"&&e>0?e:1}),this.ctxPresets=G(()=>{let e=this.parallelSlots();return $a.map(t=>({label:Sn(e*t,e)}))}),this._flags=null}extractConfigPaths(e){let t=this.data.allConfigs??[],n=this.data.config?.name??null,a=new Set,r=[];for(let u of t){if(u.name===n||!u.flags)continue;let h=wn(u.flags,e);h&&!a.has(h)&&(a.add(h),r.push(h))}return r}isControlChanged(e){let t=this.form.get(e)?.value;return e==="ctxSize"?+Dn(t)!==f.ctxSize:t!==void 0&&Ey(e,t)}isSectionChanged(...e){return e.some(t=>this.isControlChanged(t))}onCtxSizeInput(e){let t=e.target.value,n=Dn(t),a=Sn(n,this.parallelSlots());this.form.get("ctxSize")?.setValue(a,{emitEvent:!1})}ngOnInit(){this.form.controls.command.valueChanges.pipe(qi(this.destroyRef)).subscribe(e=>this._commandValue.set(e)),this.data.config&&this.populateFormFromFlags(this.data.config.flags,this.data.config.environment),this.form.valueChanges.pipe(qi(this.destroyRef)).subscribe(()=>{this.cdr.markForCheck()})}populateFormFromFlags(e,t){let n=this.form.controls;n.host.setValue(Ke(e,"--host",f.host)),n.port.setValue(Ee(e,"--port",f.port)),n.threads.setValue(Ee(e,"--threads",f.threads)),n.flashAttn.setValue(Ke(e,"--flash-attn",f.flashAttn)),n.fit.setValue(Ke(e,"--fit",f.fit)),n.parallel.setValue(Ee(e,"--parallel",f.parallel)),n.alias.setValue(Ke(e,"--alias","")),n.nPredict.setValue(Ee(e,"--n-predict",f.nPredict)),n.contextShift.setValue(Kn(e,"--context-shift","--no-context-shift",!1)?"on":"off"),n.contBatching.setValue(Kn(e,"--cont-batching","--no-cont-batching",!0)?"on":"off");let a=wn(e,"--device");n.device.setValue(a?a.split(",").map(g=>g.trim()).filter(Boolean):[]),n.tensorSplit.setValue(Ke(e,"--tensor-split","")),n.model.setValue(Ke(e,"--model","")),n.mmproj.setValue(Ke(e,"--mmproj","")),n.nGpuLayers.setValue(Ke(e,"--n-gpu-layers",f.nGpuLayers)),n.splitMode.setValue(Ke(e,"--split-mode",f.splitMode)),n.mainGpu.setValue(Ee(e,"--main-gpu",f.mainGpu)),n.fitTarget.setValue(Ee(e,"--fit-target",f.fitTarget)),n.fitCtx.setValue(Ee(e,"--fit-ctx",f.fitCtx)),n.mlock.setValue(e.includes("--mlock")?"on":"off"),n.mmap.setValue(Kn(e,"--mmap","--no-mmap",!0)?"on":"off"),n.cpuMoe.setValue(e.includes("--cpu-moe")?"on":"off"),n.nCpuMoe.setValue(Ee(e,"--n-cpu-moe",0));let r=Ee(e,"--ctx-size",f.ctxSize),u=typeof n.parallel.value=="number"&&n.parallel.value>0?n.parallel.value:1;n.ctxSize.setValue(Sn(r,u)),n.batchSize.setValue(Ee(e,"--batch-size",f.batchSize)),n.ubatchSize.setValue(Ee(e,"--ubatch-size",f.ubatchSize)),n.cacheTypeK.setValue(Ke(e,"--cache-type-k",f.cacheTypeK)),n.cacheTypeV.setValue(Ke(e,"--cache-type-v",f.cacheTypeV)),n.kvOffload.setValue(Kn(e,"--kv-offload","--no-kv-offload",!0)?"on":"off"),n.cacheRam.setValue(Ee(e,"--cache-ram",f.cacheRam)),n.swaFull.setValue(e.includes("--swa-full")?"on":"off"),n.ropeScaling.setValue(Ke(e,"--rope-scaling",f.ropeScaling)),n.ropeScale.setValue(ut(e,"--rope-scale",f.ropeScale)),n.ropeFreqBase.setValue(ut(e,"--rope-freq-base",f.ropeFreqBase)),n.ropeFreqScale.setValue(ut(e,"--rope-freq-scale",f.ropeFreqScale)),n.yarnOrigCtx.setValue(Ee(e,"--yarn-orig-ctx",f.yarnOrigCtx)),n.yarnExtFactor.setValue(ut(e,"--yarn-ext-factor",f.yarnExtFactor)),n.yarnAttnFactor.setValue(ut(e,"--yarn-attn-factor",f.yarnAttnFactor)),n.yarnBetaSlow.setValue(ut(e,"--yarn-beta-slow",f.yarnBetaSlow)),n.yarnBetaFast.setValue(ut(e,"--yarn-beta-fast",f.yarnBetaFast)),n.temperature.setValue(ut(e,"--temperature",f.temperature)),n.seed.setValue(Ee(e,"--seed",f.seed)),n.topK.setValue(Ee(e,"--top-k",f.topK)),n.topP.setValue(ut(e,"--top-p",f.topP)),n.minP.setValue(ut(e,"--min-p",f.minP)),n.typicalP.setValue(ut(e,"--typical",f.typicalP)),n.repeatLastN.setValue(Ee(e,"--repeat-last-n",f.repeatLastN)),n.repeatPenalty.setValue(ut(e,"--repeat-penalty",f.repeatPenalty)),n.presencePenalty.setValue(ut(e,"--presence-penalty",f.presencePenalty)),n.frequencyPenalty.setValue(ut(e,"--frequency-penalty",f.frequencyPenalty)),n.dryMultiplier.setValue(ut(e,"--dry-multiplier",f.dryMultiplier)),n.dryBase.setValue(ut(e,"--dry-base",f.dryBase)),n.mirostat.setValue(Ee(e,"--mirostat",f.mirostat)),n.dynatempRange.setValue(ut(e,"--dynatemp-range",f.dynatempRange)),n.modelDraft.setValue(Ke(e,"--model-draft",""));let h=wn(e,"--spec-draft-device")??wn(e,"--device-draft");if(n.specDraftDevice.setValue(h?h.split(",").map(g=>g.trim()).filter(Boolean):[]),n.specDraftNMax.setValue(Ee(e,"--spec-draft-n-max",f.specDraftNMax)),n.nGpuLayersDraft.setValue(Ke(e,"--n-gpu-layers-draft",f.nGpuLayersDraft)),n.specDraftCacheTypeK.setValue(Ke(e,"--cache-type-k-draft",f.specDraftCacheTypeK)),n.specDraftCacheTypeV.setValue(Ke(e,"--cache-type-v-draft",f.specDraftCacheTypeV)),n.specType.setValue(Ke(e,"--spec-type",f.specType)),n.specNgramModNMin.setValue(Ee(e,"--spec-ngram-mod-n-min",f.specNgramModNMin)),n.specNgramModNMax.setValue(Ee(e,"--spec-ngram-mod-n-max",f.specNgramModNMax)),n.specNgramModNMatch.setValue(Ee(e,"--spec-ngram-mod-n-match",f.specNgramModNMatch)),n.specNgramSimpleSizeN.setValue(Ee(e,"--spec-ngram-simple-size-n",f.specNgramSimpleSizeN)),n.specNgramSimpleSizeM.setValue(Ee(e,"--spec-ngram-simple-size-m",f.specNgramSimpleSizeM)),n.specNgramSimpleMinHits.setValue(Ee(e,"--spec-ngram-simple-min-hits",f.specNgramSimpleMinHits)),n.lora.setValue(Ke(e,"--lora","")),n.loraScaled.setValue(Ke(e,"--lora-scaled","")),n.timeout.setValue(Ee(e,"--timeout",f.timeout)),n.threadsHttp.setValue(Ee(e,"--threads-http",f.threadsHttp)),n.metrics.setValue(e.includes("--metrics")?"on":"off"),n.slots.setValue(Kn(e,"--slots","--no-slots",!0)?"on":"off"),n.cachePrompt.setValue(Kn(e,"--cache-prompt","--no-cache-prompt",!0)?"on":"off"),n.cacheReuse.setValue(Ee(e,"--cache-reuse",f.cacheReuse)),n.reasoning.setValue(Ke(e,"--reasoning",f.reasoning)),n.reasoningBudget.setValue(Ee(e,"--reasoning-budget",f.reasoningBudget)),n.reasoningFormat.setValue(Ke(e,"--reasoning-format",f.reasoningFormat)),n.apiKeyFile.setValue(Ke(e,"--api-key-file","")),n.extraFlags.setValue(this.extractExtraFlags(e).join(`
5583
+ `],encapsulation:2})}return i})();var Ns=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=H({type:i});static \u0275inj=j({imports:[ma,Vt,te,yi]})}return i})();function Sn(i,o){for(let e of i){let t=e.indexOf("=");if(t>0&&e.slice(0,t)===o)return e.slice(t+1);let n=e.indexOf(" ");if(n>0&&e.slice(0,n)===o)return e.slice(n+1).trim()}for(let e=0;e<i.length;e++)if(i[e]===o&&e+1<i.length)return i[e+1];return null}function Yn(i,o,e,t){for(let n of i){let a=n.split(/\s|=/)[0];if(a===o)return!0;if(a===e)return!1}return t}function Ye(i,o,e){let t=Sn(i,o);return t!==null?t:e}function Te(i,o,e){let t=Sn(i,o);if(t!==null){let n=parseInt(t,10);return isNaN(n)?e:n}return e}function ht(i,o,e){let t=Sn(i,o);if(t!==null){let n=parseFloat(t);return isNaN(n)?e:n}return e}var ly=(i,o)=>o.path;function cy(i,o){i&1&&(s(0,"span",7),m(1,"(dir)"),l())}function dy(i,o){if(i&1&&(s(0,"mat-option",5)(1,"span",6),m(2),l(),k(3,cy,2,0,"span",7),l()),i&2){let e=o.$implicit;x("value",e.path),c(2),B(e.path),c(),M(e.isDir?3:-1)}}var Mp=(()=>{class i{constructor(){this.fb=d(hn),this.service=d(yt),this.label="Path",this.placeholder="/path/to/file",this.required=!1,this.fieldClass="",this.existingPaths=[],this.onChange=e=>{},this.onTouched=()=>{},this._subscription=null,this.suggestions=T([]),this.innerForm=this.fb.group({value:[""]})}writeValue(e){let t=(e??"").toString();this.innerForm.patchValue({value:t},{emitEvent:!1})}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){e?this.innerForm.disable():this.innerForm.enable()}ngOnInit(){this._subscription=this.innerForm.get("value").valueChanges.subscribe(e=>{this.onChange(e)}),this._subscription.add(this.innerForm.get("value").valueChanges.pipe(jt(200),Si(),We(e=>{let t=(e??"").trim();return t?this.service.getLlamaAutocomplete("path",t).pipe(Zt(()=>be([]))):be(this.emptySuggestions)})).subscribe(e=>{this.suggestions.set(e)}))}get emptySuggestions(){return this.existingPaths.filter(Boolean).map(e=>({path:e,source:"existing config"}))}ngOnDestroy(){this._subscription?.unsubscribe()}onSelect(e){this.innerForm.patchValue({value:e},{emitEvent:!1}),this.onChange(e)}onBlur(){this.onTouched()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=I({type:i,selectors:[["app-file-autocomplete"]],inputs:{label:"label",placeholder:"placeholder",required:"required",fieldClass:"fieldClass",existingPaths:"existingPaths"},features:[ee([{provide:Ii,useExisting:nt(()=>i),multi:!0}])],decls:9,vars:7,consts:[["auto","matAutocomplete"],[3,"formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","value",3,"blur","placeholder","required","matAutocomplete"],[3,"optionSelected"],[3,"value"],[1,"file-path"],[1,"file-dir"]],template:function(t,n){if(t&1&&(hi(0,1),s(1,"mat-form-field",2)(2,"input",3),E("blur",function(){return n.onBlur()}),l(),b(),s(3,"mat-label"),m(4),l()(),s(5,"mat-autocomplete",4,0),E("optionSelected",function(r){return n.onSelect(r.option.value)}),ue(7,dy,4,3,"mat-option",5,ly),l(),pi()),t&2){let a=Le(6);x("formGroup",n.innerForm),c(),tt(n.fieldClass),c(),x("placeholder",n.placeholder)("required",n.required)("matAutocomplete",a),y(),c(2),B(n.label),c(3),he(n.suggestions())}},dependencies:[Pe,fn,Ri,Oi,un,Jr,Wt,Gi,At,Et,Lt,oi,ni,Dn,wn,Ct,Ki],styles:[".full-width[_ngcontent-%COMP%]{width:100%}.file-path[_ngcontent-%COMP%]{font-family:monospace}.file-dir[_ngcontent-%COMP%]{margin-left:4px;color:#1976d2;font-size:11px;font-weight:500}.file-source[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}"]})}}return i})();function Yi(i){i||(i=d(Ht));let o=new wt(e=>{if(i.destroyed){e.next();return}return i.onDestroy(e.next.bind(e))});return e=>e.pipe(re(o))}function Xn(i,o){let t=!o?.manualCleanup?o?.injector?.get(Ht)??d(Ht):null,n=my(o?.equal),a;o?.requireSync?a=T({kind:0},{equal:n}):a=T({kind:1,value:o?.initialValue},{equal:n});let r,u=i.subscribe({next:h=>a.set({kind:1,value:h}),error:h=>{a.set({kind:2,error:h}),r?.()},complete:()=>{r?.()}});if(o?.requireSync&&a().kind===0)throw new se(601,!1);return r=t?.onDestroy(u.unsubscribe.bind(u)),$(()=>{let h=a();switch(h.kind){case 1:return h.value;case 2:throw h.error;case 0:throw new se(601,!1)}},{equal:o?.equal})}function my(i=Object.is){return(o,e)=>o.kind===1&&e.kind===1&&i(o.value,e.value)}function kn(i){if(typeof i=="number")return i;let o=i.trim();if(!o)return 0;let e=o.split(/\s*x\s*/i),t=1,n;if(e.length>=2){let h=e[0].trim();h&&(t=parseInt(h,10),(isNaN(t)||t<1)&&(t=1)),n=e.slice(1).join("").trim()}else n=o;let a=n.match(/^(\d+)\s*([kKmM])?$/);if(!a)return 0;let r=parseInt(a[1],10),u=a[2];return u&&(u.toLowerCase()==="k"?r*=1024:u.toLowerCase()==="m"&&(r*=1024*1024)),t*r}var Wa=[8192,16384,32768,65536,98304,131072,196608,262144,524288,1048576];function Ep(i){if(i<=0)return"0";if(i>=1048576){let o=i/1048576;return`${o%1===0?o:o.toFixed(1)}M`}if(i>=1024){let o=i/1024;return`${o%1===0?o:o.toFixed(1)}K`}return`${i}`}function Mn(i,o){if(i<=0)return"";if(o>1&&i%o===0){let e=i/o;if(Wa.includes(e))return`${o} x ${Ep(e)}`}return Ep(i)}var uy=(i,o)=>o.command,$c=(i,o)=>o.path,hy=(i,o)=>o.label;function py(i,o){i&1&&(s(0,"mat-error"),m(1,"Required"),l())}function fy(i,o){i&1&&(s(0,"mat-error"),m(1,"Starts with letter, alphanumeric + hyphens/underscores, max 128 chars"),l())}function gy(i,o){i&1&&(s(0,"mat-error"),m(1,"Required"),l())}function _y(i,o){if(i&1&&(s(0,"mat-option",8)(1,"span",100),m(2),l(),s(3,"span",101),m(4),l()()),i&2){let e=o.$implicit;x("value",e.command),c(2),B(e.command),c(2),pe("(",e.from,")")}}function vy(i,o){if(i&1&&(s(0,"mat-option",8),m(1),l()),i&2){let e=o.$implicit;x("value",e.path),c(),B(e.path)}}function by(i,o){if(i&1&&(s(0,"mat-option",8),m(1),l()),i&2){let e=o.$implicit;x("value",e.label),c(),B(e.label)}}function yy(i,o){if(i&1&&(s(0,"mat-option",8),m(1),l()),i&2){let e=o.$implicit;x("value",e),c(),B(e)}}function Cy(i,o){if(i&1&&(s(0,"mat-option",8),m(1),l()),i&2){let e=o.$implicit;x("value",e),c(),B(e)}}function xy(i,o){if(i&1&&(s(0,"div",26),m(1,"YaRN Parameters"),l(),s(2,"div",13)(3,"mat-form-field",18),_(4,"input",102),b(),s(5,"mat-label"),m(6,"YaRN Orig Ctx"),l()(),s(7,"mat-form-field",18),_(8,"input",103),b(),s(9,"mat-label"),m(10,"Extrapolation Mix"),l()(),s(11,"mat-form-field",18),_(12,"input",104),b(),s(13,"mat-label"),m(14,"Attn Factor"),l()(),s(15,"mat-form-field",18),_(16,"input",105),b(),s(17,"mat-label"),m(18,"Beta Slow"),l()(),s(19,"mat-form-field",18),_(20,"input",106),b(),s(21,"mat-label"),m(22,"Beta Fast"),l()()()),i&2){let e=C();c(3),p("changed",e.isControlChanged("yarnOrigCtx")),c(),y(),c(3),p("changed",e.isControlChanged("yarnExtFactor")),c(),y(),c(3),p("changed",e.isControlChanged("yarnAttnFactor")),c(),y(),c(3),p("changed",e.isControlChanged("yarnBetaSlow")),c(),y(),c(3),p("changed",e.isControlChanged("yarnBetaFast")),c(),y()}}function wy(i,o){if(i&1&&(s(0,"mat-option",8),m(1),l()),i&2){let e=o.$implicit;x("value",e.path),c(),B(e.path)}}function Dy(i,o){if(i&1&&(s(0,"mat-option",8),m(1),l()),i&2){let e=o.$implicit;x("value",e),c(),B(e)}}function Sy(i,o){if(i&1&&(s(0,"mat-option",8),m(1),l()),i&2){let e=o.$implicit;x("value",e),c(),B(e)}}function ky(i,o){if(i&1&&(s(0,"div",26),m(1,"Draft Model"),l(),_(2,"app-file-autocomplete",107),b(),s(3,"div",13)(4,"mat-form-field",18)(5,"mat-select",108),ue(6,wy,2,2,"mat-option",8,$c),l(),b(),s(8,"mat-label"),m(9,"Draft Device (multi-select)"),l()()(),s(10,"div",13)(11,"mat-form-field",18),_(12,"input",109),b(),s(13,"mat-label"),m(14,"Draft N Max"),l()(),s(15,"mat-form-field",18),_(16,"input",110),b(),s(17,"mat-label"),m(18,"Draft GPU Layers"),l()()(),s(19,"div",13)(20,"mat-form-field",18)(21,"mat-select",111),ue(22,Dy,2,2,"mat-option",8,St),l(),b(),s(24,"mat-label"),m(25,"Draft Cache Type K"),l()(),s(26,"mat-form-field",18)(27,"mat-select",112),ue(28,Sy,2,2,"mat-option",8,St),l(),b(),s(30,"mat-label"),m(31,"Draft Cache Type V"),l()()()),i&2){let e=C();c(2),x("existingPaths",e.existingDraftModelPaths())("fieldClass",e.isControlChanged("modelDraft")?"changed":""),y(),c(2),p("changed",e.isControlChanged("specDraftDevice")),c(),y(),c(),he(e.availableDevices()),c(5),p("changed",e.isControlChanged("specDraftNMax")),c(),y(),c(3),p("changed",e.isControlChanged("nGpuLayersDraft")),c(),y(),c(4),p("changed",e.isControlChanged("specDraftCacheTypeK")),c(),y(),c(),he(e.kvCacheTypes),c(4),p("changed",e.isControlChanged("specDraftCacheTypeV")),c(),y(),c(),he(e.kvCacheTypes)}}function My(i,o){if(i&1&&(s(0,"div",26),m(1,"Ngram Mod Parameters"),l(),s(2,"div",13)(3,"mat-form-field",18),_(4,"input",113),b(),s(5,"mat-label"),m(6,"Ngram Mod N Min"),l()(),s(7,"mat-form-field",18),_(8,"input",114),b(),s(9,"mat-label"),m(10,"Ngram Mod N Max"),l()(),s(11,"mat-form-field",18),_(12,"input",115),b(),s(13,"mat-label"),m(14,"Ngram Mod Match"),l()()()),i&2){let e=C();c(3),p("changed",e.isControlChanged("specNgramModNMin")),c(),y(),c(3),p("changed",e.isControlChanged("specNgramModNMax")),c(),y(),c(3),p("changed",e.isControlChanged("specNgramModNMatch")),c(),y()}}function Ey(i,o){if(i&1&&(s(0,"div",26),m(1,"Ngram Simple Parameters"),l(),s(2,"div",13)(3,"mat-form-field",18),_(4,"input",116),b(),s(5,"mat-label"),m(6,"Simple Size N"),l()(),s(7,"mat-form-field",18),_(8,"input",117),b(),s(9,"mat-label"),m(10,"Simple Size M"),l()(),s(11,"mat-form-field",18),_(12,"input",118),b(),s(13,"mat-label"),m(14,"Simple Min Hits"),l()()()),i&2){let e=C();c(3),p("changed",e.isControlChanged("specNgramSimpleSizeN")),c(),y(),c(3),p("changed",e.isControlChanged("specNgramSimpleSizeM")),c(),y(),c(3),p("changed",e.isControlChanged("specNgramSimpleMinHits")),c(),y()}}function Ay(i,o){if(i&1&&(s(0,"mat-option",8)(1,"span",100),m(2),l(),s(3,"span",101),m(4),l()()),i&2){let e=o.$implicit;x("value",e.path),c(2),B(e.path),c(2),pe("(",e.source,")")}}var f={host:"127.0.0.1",port:8080,threads:-1,flashAttn:"auto",fit:"on",parallel:-1,alias:"",nPredict:-1,contextShift:"off",contBatching:"on",model:"",mmproj:"",nGpuLayers:"auto",device:[],tensorSplit:"",splitMode:"layer",mainGpu:0,fitTarget:1024,fitCtx:4096,mlock:"off",mmap:"on",cpuMoe:"off",nCpuMoe:0,ctxSize:0,batchSize:2048,ubatchSize:512,cacheTypeK:"f16",cacheTypeV:"f16",kvOffload:"on",cacheRam:8192,swaFull:"off",ropeScaling:"none",ropeScale:1,ropeFreqBase:0,ropeFreqScale:0,yarnOrigCtx:0,yarnExtFactor:-1,yarnAttnFactor:-1,yarnBetaSlow:-1,yarnBetaFast:-1,temperature:.8,seed:-1,topK:40,topP:.95,minP:.05,typicalP:1,repeatLastN:64,repeatPenalty:1,presencePenalty:0,frequencyPenalty:0,dryMultiplier:0,dryBase:1.75,mirostat:0,dynatempRange:0,modelDraft:"",specDraftDevice:[],specDraftNMax:3,nGpuLayersDraft:"auto",specDraftCacheTypeK:"f16",specDraftCacheTypeV:"f16",specType:"none",specNgramModNMin:48,specNgramModNMax:64,specNgramModNMatch:24,specNgramSimpleSizeN:12,specNgramSimpleSizeM:48,specNgramSimpleMinHits:1,lora:"",loraScaled:"",timeout:3600,threadsHttp:-1,metrics:"off",slots:"on",cachePrompt:"on",cacheReuse:0,reasoning:"auto",reasoningBudget:-1,reasoningFormat:"auto",apiKeyFile:""};function Ty(i,o){let e=f[i];if(e===void 0)return!1;if(Array.isArray(o)||Array.isArray(e)){let t=Array.isArray(o)?o:[],n=Array.isArray(e)?e:[];return t.length!==n.length||t.some((a,r)=>a!==n[r])}return String(o)!==String(e)}var Iy="^[a-zA-Z][a-zA-Z0-9_-]{0,127}$",Ry=["f32","f16","bf16","q8_0","q4_0","q4_1","iq4_nl","q5_0","q5_1"],Oy=new Set(["--host","--port","--threads","--flash-attn","--fit","--parallel","--alias","--n-predict","--context-shift","--no-context-shift","--cont-batching","--no-cont-batching","--device","--tensor-split","--model","--mmproj","--n-gpu-layers","--split-mode","--main-gpu","--fit-target","--fit-ctx","--mlock","--mmap","--no-mmap","--cpu-moe","--n-cpu-moe","--ctx-size","--batch-size","--ubatch-size","--cache-type-k","--cache-type-v","--kv-offload","--no-kv-offload","--cache-ram","--swa-full","--rope-scaling","--rope-scale","--rope-freq-base","--rope-freq-scale","--yarn-orig-ctx","--yarn-ext-factor","--yarn-attn-factor","--yarn-beta-slow","--yarn-beta-fast","--temperature","--seed","--top-k","--top-p","--min-p","--typical","--repeat-last-n","--repeat-penalty","--presence-penalty","--frequency-penalty","--dry-multiplier","--dry-base","--mirostat","--dynatemp-range","--spec-type","--spec-draft-n-max","--model-draft","--spec-draft-device","--device-draft","--n-gpu-layers-draft","--cache-type-k-draft","--cache-type-v-draft","--spec-ngram-mod-n-min","--spec-ngram-mod-n-max","--spec-ngram-mod-n-match","--spec-ngram-simple-size-n","--spec-ngram-simple-size-m","--spec-ngram-simple-min-hits","--lora","--lora-scaled","--timeout","--threads-http","--metrics","--slots","--no-slots","--cache-prompt","--no-cache-prompt","--cache-reuse","--reasoning","--reasoning-budget","--reasoning-format","--api-key-file"]),Ap=(()=>{class i{constructor(){this.fb=d(hn),this.dialogRef=d(ut),this.data=d(Wn),this.serviceService=d(yt),this.cdr=d(ie),this.destroyRef=d(Ht),this.isEdit=this.data.config!==null,this.isClone=this.data.clone===!0,this.kvCacheTypes=Ry,this.allExistingCommands=$(()=>{let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e)r.name!==t&&(n.has(r.command)||(n.add(r.command),a.push({command:r.command,from:r.name})));return a}),this._commandValue=T(this.data.config?.command??""),this.commandValue=this._commandValue.asReadonly(),this.filteredCommands=$(()=>{let e=this.commandValue()?.toLowerCase()??"";return this.allExistingCommands().filter(t=>t.command.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))}),this.form=this.fb.group({name:[this.data.config?.name??"",{validators:[st.required,st.pattern(Iy)]}],command:[this.data.config?.command??"",st.required],host:[f.host],port:[f.port],threads:[f.threads],flashAttn:[f.flashAttn],fit:[f.fit],parallel:[f.parallel],alias:[f.alias],nPredict:[f.nPredict],contextShift:[f.contextShift],contBatching:[f.contBatching],model:[""],mmproj:[""],nGpuLayers:[f.nGpuLayers],device:[[]],tensorSplit:[""],splitMode:[f.splitMode],mainGpu:[f.mainGpu],fitTarget:[f.fitTarget],fitCtx:[f.fitCtx],mlock:[f.mlock],mmap:[f.mmap],cpuMoe:[f.cpuMoe],nCpuMoe:[f.nCpuMoe],ctxSize:[""],batchSize:[f.batchSize],ubatchSize:[f.ubatchSize],cacheTypeK:[f.cacheTypeK],cacheTypeV:[f.cacheTypeV],kvOffload:[f.kvOffload],cacheRam:[f.cacheRam],swaFull:[f.swaFull],ropeScaling:[f.ropeScaling],ropeScale:[f.ropeScale],ropeFreqBase:[f.ropeFreqBase],ropeFreqScale:[f.ropeFreqScale],yarnOrigCtx:[f.yarnOrigCtx],yarnExtFactor:[f.yarnExtFactor],yarnAttnFactor:[f.yarnAttnFactor],yarnBetaSlow:[f.yarnBetaSlow],yarnBetaFast:[f.yarnBetaFast],temperature:[f.temperature],seed:[f.seed],topK:[f.topK],topP:[f.topP],minP:[f.minP],typicalP:[f.typicalP],repeatLastN:[f.repeatLastN],repeatPenalty:[f.repeatPenalty],presencePenalty:[f.presencePenalty],frequencyPenalty:[f.frequencyPenalty],dryMultiplier:[f.dryMultiplier],dryBase:[f.dryBase],mirostat:[f.mirostat],dynatempRange:[f.dynatempRange],modelDraft:[""],specDraftDevice:[[]],specDraftNMax:[f.specDraftNMax],nGpuLayersDraft:[f.nGpuLayersDraft],specDraftCacheTypeK:[f.specDraftCacheTypeK],specDraftCacheTypeV:[f.specDraftCacheTypeV],specType:[f.specType],specNgramModNMin:[f.specNgramModNMin],specNgramModNMax:[f.specNgramModNMax],specNgramModNMatch:[f.specNgramModNMatch],specNgramSimpleSizeN:[f.specNgramSimpleSizeN],specNgramSimpleSizeM:[f.specNgramSimpleSizeM],specNgramSimpleMinHits:[f.specNgramSimpleMinHits],lora:[""],loraScaled:[""],timeout:[f.timeout],threadsHttp:[f.threadsHttp],metrics:[f.metrics],slots:[f.slots],cachePrompt:[f.cachePrompt],cacheReuse:[f.cacheReuse],reasoning:[f.reasoning],reasoningBudget:[f.reasoningBudget],reasoningFormat:[f.reasoningFormat],apiKeyFile:[""],extraFlags:[""],envText:[""]}),this.availableDevices=$(()=>this.availableDevicesRaw()),this.availableDevicesRaw=Xn(this.form.controls.command.valueChanges.pipe(Yi(),Me(this.form.controls.command.value),jt(300),Si(),We(e=>{let t=(e??"").trim();return t?this.serviceService.getLlamaAutocomplete("device","",t).pipe(Zt(()=>be([]))):this.serviceService.getLlamaAutocomplete("device","").pipe(Zt(()=>be([])))})),{initialValue:[]}),this.filteredHosts=Xn(this.form.controls.host.valueChanges.pipe(Yi(),Me(this.form.controls.host.value),jt(250),Si(),We(e=>{let t=(e??"").trim();return t?this.serviceService.getLlamaAutocomplete("host",t).pipe(Zt(()=>be([]))):be([])})),{initialValue:[]}),this.existingModelPaths=$(()=>this.extractConfigPaths("--model")),this.existingMmprojPaths=$(()=>this.extractConfigPaths("--mmproj")),this.existingApiKeyPaths=$(()=>this.extractConfigPaths("--api-key-file")),this.existingDraftModelPaths=$(()=>this.extractConfigPaths("--model-draft")),this.existingLoraPaths=$(()=>this.extractConfigPaths("--lora")),this.formValue=Xn(this.form.valueChanges,{initialValue:this.form.value}),this.fitValue=$(()=>this.formValue()?.fit),this.splitModeValue=$(()=>this.formValue()?.splitMode),this.specTypeValue=$(()=>this.formValue()?.specType),this.ropeScalingValue=$(()=>this.formValue()?.ropeScaling),this.cpuMoeValue=$(()=>this.formValue()?.cpuMoe),this.cachePromptValue=$(()=>this.formValue()?.cachePrompt),this.reasoningValue=$(()=>this.formValue()?.reasoning),this.mirostatValue=$(()=>this.formValue()?.mirostat),this.hostValue=$(()=>this.formValue()?.host),this.isTensorSplitDisabled=$(()=>this.splitModeValue()==="none"),this.isFitTargetDisabled=$(()=>this.fitValue()==="off"),this.isCpuMoeLayersDisabled=$(()=>this.cpuMoeValue()==="on"),this.isCacheReuseDisabled=$(()=>this.cachePromptValue()==="off"),this.isReasoningParamsDisabled=$(()=>this.reasoningValue()==="off"),this.isMirostatEnabled=$(()=>(this.mirostatValue()??0)!==0),this.isRopeParamsDisabled=$(()=>this.ropeScalingValue()==="none"),this.isPortDisabled=$(()=>(this.hostValue()??"").trim().toLowerCase().endsWith(".sock")),this.showDraftParams=$(()=>(this.specTypeValue()??"").includes("draft")),this.showNgramModParams=$(()=>(this.specTypeValue()??"").includes("ngram-mod")),this.showNgramSimpleParams=$(()=>(this.specTypeValue()??"").includes("ngram-simple")),this.showYarnParams=$(()=>this.ropeScalingValue()==="yarn"),this.parallelSlots=$(()=>{let e=this.formValue()?.parallel;return typeof e=="number"&&e>0?e:1}),this.ctxPresets=$(()=>{let e=this.parallelSlots();return Wa.map(t=>({label:Mn(e*t,e)}))}),this._flags=null}extractConfigPaths(e){let t=this.data.allConfigs??[],n=this.data.config?.name??null,a=new Set,r=[];for(let u of t){if(u.name===n||!u.flags)continue;let h=Sn(u.flags,e);h&&!a.has(h)&&(a.add(h),r.push(h))}return r}isControlChanged(e){let t=this.form.get(e)?.value;return e==="ctxSize"?+kn(t)!==f.ctxSize:t!==void 0&&Ty(e,t)}isSectionChanged(...e){return e.some(t=>this.isControlChanged(t))}onCtxSizeInput(e){let t=e.target.value,n=kn(t),a=Mn(n,this.parallelSlots());this.form.get("ctxSize")?.setValue(a,{emitEvent:!1})}ngOnInit(){this.form.controls.command.valueChanges.pipe(Yi(this.destroyRef)).subscribe(e=>this._commandValue.set(e)),this.data.config&&this.populateFormFromFlags(this.data.config.flags,this.data.config.environment),this.form.valueChanges.pipe(Yi(this.destroyRef)).subscribe(()=>{this.cdr.markForCheck()})}populateFormFromFlags(e,t){let n=this.form.controls;n.host.setValue(Ye(e,"--host",f.host)),n.port.setValue(Te(e,"--port",f.port)),n.threads.setValue(Te(e,"--threads",f.threads)),n.flashAttn.setValue(Ye(e,"--flash-attn",f.flashAttn)),n.fit.setValue(Ye(e,"--fit",f.fit)),n.parallel.setValue(Te(e,"--parallel",f.parallel)),n.alias.setValue(Ye(e,"--alias","")),n.nPredict.setValue(Te(e,"--n-predict",f.nPredict)),n.contextShift.setValue(Yn(e,"--context-shift","--no-context-shift",!1)?"on":"off"),n.contBatching.setValue(Yn(e,"--cont-batching","--no-cont-batching",!0)?"on":"off");let a=Sn(e,"--device");n.device.setValue(a?a.split(",").map(g=>g.trim()).filter(Boolean):[]),n.tensorSplit.setValue(Ye(e,"--tensor-split","")),n.model.setValue(Ye(e,"--model","")),n.mmproj.setValue(Ye(e,"--mmproj","")),n.nGpuLayers.setValue(Ye(e,"--n-gpu-layers",f.nGpuLayers)),n.splitMode.setValue(Ye(e,"--split-mode",f.splitMode)),n.mainGpu.setValue(Te(e,"--main-gpu",f.mainGpu)),n.fitTarget.setValue(Te(e,"--fit-target",f.fitTarget)),n.fitCtx.setValue(Te(e,"--fit-ctx",f.fitCtx)),n.mlock.setValue(e.includes("--mlock")?"on":"off"),n.mmap.setValue(Yn(e,"--mmap","--no-mmap",!0)?"on":"off"),n.cpuMoe.setValue(e.includes("--cpu-moe")?"on":"off"),n.nCpuMoe.setValue(Te(e,"--n-cpu-moe",0));let r=Te(e,"--ctx-size",f.ctxSize),u=typeof n.parallel.value=="number"&&n.parallel.value>0?n.parallel.value:1;n.ctxSize.setValue(Mn(r,u)),n.batchSize.setValue(Te(e,"--batch-size",f.batchSize)),n.ubatchSize.setValue(Te(e,"--ubatch-size",f.ubatchSize)),n.cacheTypeK.setValue(Ye(e,"--cache-type-k",f.cacheTypeK)),n.cacheTypeV.setValue(Ye(e,"--cache-type-v",f.cacheTypeV)),n.kvOffload.setValue(Yn(e,"--kv-offload","--no-kv-offload",!0)?"on":"off"),n.cacheRam.setValue(Te(e,"--cache-ram",f.cacheRam)),n.swaFull.setValue(e.includes("--swa-full")?"on":"off"),n.ropeScaling.setValue(Ye(e,"--rope-scaling",f.ropeScaling)),n.ropeScale.setValue(ht(e,"--rope-scale",f.ropeScale)),n.ropeFreqBase.setValue(ht(e,"--rope-freq-base",f.ropeFreqBase)),n.ropeFreqScale.setValue(ht(e,"--rope-freq-scale",f.ropeFreqScale)),n.yarnOrigCtx.setValue(Te(e,"--yarn-orig-ctx",f.yarnOrigCtx)),n.yarnExtFactor.setValue(ht(e,"--yarn-ext-factor",f.yarnExtFactor)),n.yarnAttnFactor.setValue(ht(e,"--yarn-attn-factor",f.yarnAttnFactor)),n.yarnBetaSlow.setValue(ht(e,"--yarn-beta-slow",f.yarnBetaSlow)),n.yarnBetaFast.setValue(ht(e,"--yarn-beta-fast",f.yarnBetaFast)),n.temperature.setValue(ht(e,"--temperature",f.temperature)),n.seed.setValue(Te(e,"--seed",f.seed)),n.topK.setValue(Te(e,"--top-k",f.topK)),n.topP.setValue(ht(e,"--top-p",f.topP)),n.minP.setValue(ht(e,"--min-p",f.minP)),n.typicalP.setValue(ht(e,"--typical",f.typicalP)),n.repeatLastN.setValue(Te(e,"--repeat-last-n",f.repeatLastN)),n.repeatPenalty.setValue(ht(e,"--repeat-penalty",f.repeatPenalty)),n.presencePenalty.setValue(ht(e,"--presence-penalty",f.presencePenalty)),n.frequencyPenalty.setValue(ht(e,"--frequency-penalty",f.frequencyPenalty)),n.dryMultiplier.setValue(ht(e,"--dry-multiplier",f.dryMultiplier)),n.dryBase.setValue(ht(e,"--dry-base",f.dryBase)),n.mirostat.setValue(Te(e,"--mirostat",f.mirostat)),n.dynatempRange.setValue(ht(e,"--dynatemp-range",f.dynatempRange)),n.modelDraft.setValue(Ye(e,"--model-draft",""));let h=Sn(e,"--spec-draft-device")??Sn(e,"--device-draft");if(n.specDraftDevice.setValue(h?h.split(",").map(g=>g.trim()).filter(Boolean):[]),n.specDraftNMax.setValue(Te(e,"--spec-draft-n-max",f.specDraftNMax)),n.nGpuLayersDraft.setValue(Ye(e,"--n-gpu-layers-draft",f.nGpuLayersDraft)),n.specDraftCacheTypeK.setValue(Ye(e,"--cache-type-k-draft",f.specDraftCacheTypeK)),n.specDraftCacheTypeV.setValue(Ye(e,"--cache-type-v-draft",f.specDraftCacheTypeV)),n.specType.setValue(Ye(e,"--spec-type",f.specType)),n.specNgramModNMin.setValue(Te(e,"--spec-ngram-mod-n-min",f.specNgramModNMin)),n.specNgramModNMax.setValue(Te(e,"--spec-ngram-mod-n-max",f.specNgramModNMax)),n.specNgramModNMatch.setValue(Te(e,"--spec-ngram-mod-n-match",f.specNgramModNMatch)),n.specNgramSimpleSizeN.setValue(Te(e,"--spec-ngram-simple-size-n",f.specNgramSimpleSizeN)),n.specNgramSimpleSizeM.setValue(Te(e,"--spec-ngram-simple-size-m",f.specNgramSimpleSizeM)),n.specNgramSimpleMinHits.setValue(Te(e,"--spec-ngram-simple-min-hits",f.specNgramSimpleMinHits)),n.lora.setValue(Ye(e,"--lora","")),n.loraScaled.setValue(Ye(e,"--lora-scaled","")),n.timeout.setValue(Te(e,"--timeout",f.timeout)),n.threadsHttp.setValue(Te(e,"--threads-http",f.threadsHttp)),n.metrics.setValue(e.includes("--metrics")?"on":"off"),n.slots.setValue(Yn(e,"--slots","--no-slots",!0)?"on":"off"),n.cachePrompt.setValue(Yn(e,"--cache-prompt","--no-cache-prompt",!0)?"on":"off"),n.cacheReuse.setValue(Te(e,"--cache-reuse",f.cacheReuse)),n.reasoning.setValue(Ye(e,"--reasoning",f.reasoning)),n.reasoningBudget.setValue(Te(e,"--reasoning-budget",f.reasoningBudget)),n.reasoningFormat.setValue(Ye(e,"--reasoning-format",f.reasoningFormat)),n.apiKeyFile.setValue(Ye(e,"--api-key-file","")),n.extraFlags.setValue(this.extractExtraFlags(e).join(`
5584
5584
  `)),t){let g=Object.entries(t).map(([v,D])=>`${v}=${D}`).join(`
5585
5585
  `);g&&n.envText.setValue(g+`
5586
- `)}}extractExtraFlags(e){let t=[];for(let n of e){let a=n.split(/\s|=/)[0];n.startsWith("--")&&!Iy.has(a)&&t.push(n)}return t}parseEnvironment(){let e={};for(let t of this.form.controls.envText.value.split(`
5587
- `)){let n=t.trim();if(!n||n.startsWith("#"))continue;let a=n.indexOf("=");a<=0||(e[n.slice(0,a).trim()]=n.slice(a+1))}return e}addIf(e,t,n){String(t)!==String(n)&&this._flags.push(`${e} ${t}`)}addToggle(e,t,n,a){let r=e==="on";r!==a&&this._flags.push(r?t:n)}buildFlags(){this._flags=[];let e=this.form.controls;this.addIf("--host",e.host.value,f.host),this.addIf("--port",e.port.value,f.port),this.addIf("--threads",e.threads.value,f.threads),this.addIf("--flash-attn",e.flashAttn.value,f.flashAttn),this.addIf("--fit",e.fit.value,f.fit),this.addIf("--parallel",e.parallel.value,f.parallel),this.addIf("--alias",e.alias.value,f.alias),this.addIf("--n-predict",e.nPredict.value,f.nPredict),this.addToggle(e.contextShift.value,"--context-shift","--no-context-shift",!1),this.addToggle(e.contBatching.value,"--cont-batching","--no-cont-batching",!0);let t=e.device.value;t&&t.length>0&&this._flags.push(`--device ${t.join(",")}`),e.splitMode.value!=="none"&&this.addIf("--tensor-split",e.tensorSplit.value,f.tensorSplit),this.addIf("--model",e.model.value,f.model),this.addIf("--mmproj",e.mmproj.value,f.mmproj),this.addIf("--n-gpu-layers",e.nGpuLayers.value,f.nGpuLayers),this.addIf("--split-mode",e.splitMode.value,f.splitMode),this.addIf("--main-gpu",e.mainGpu.value,f.mainGpu),e.fit.value==="on"&&(this.addIf("--fit-target",e.fitTarget.value,f.fitTarget),this.addIf("--fit-ctx",e.fitCtx.value,f.fitCtx)),e.mlock.value==="on"&&this._flags.push("--mlock"),this.addToggle(e.mmap.value,"--mmap","--no-mmap",!0),e.cpuMoe.value==="on"&&this._flags.push("--cpu-moe"),e.cpuMoe.value!=="on"&&this.addIf("--n-cpu-moe",e.nCpuMoe.value,f.nCpuMoe),this.addIf("--ctx-size",+Dn(e.ctxSize.value??""),f.ctxSize),this.addIf("--batch-size",e.batchSize.value,f.batchSize),this.addIf("--ubatch-size",e.ubatchSize.value,f.ubatchSize),this.addIf("--cache-type-k",e.cacheTypeK.value,f.cacheTypeK),this.addIf("--cache-type-v",e.cacheTypeV.value,f.cacheTypeV),this.addToggle(e.kvOffload.value,"--kv-offload","--no-kv-offload",!0),this.addIf("--cache-ram",e.cacheRam.value,f.cacheRam),e.swaFull.value==="on"&&this._flags.push("--swa-full");let n=e.ropeScaling.value;n&&n!==f.ropeScaling&&(this._flags.push(`--rope-scaling ${n}`),this.addIf("--rope-scale",e.ropeScale.value,f.ropeScale),this.addIf("--rope-freq-base",e.ropeFreqBase.value,f.ropeFreqBase),this.addIf("--rope-freq-scale",e.ropeFreqScale.value,f.ropeFreqScale),n==="yarn"&&(this.addIf("--yarn-orig-ctx",e.yarnOrigCtx.value,f.yarnOrigCtx),this.addIf("--yarn-ext-factor",e.yarnExtFactor.value,f.yarnExtFactor),this.addIf("--yarn-attn-factor",e.yarnAttnFactor.value,f.yarnAttnFactor),this.addIf("--yarn-beta-slow",e.yarnBetaSlow.value,f.yarnBetaSlow),this.addIf("--yarn-beta-fast",e.yarnBetaFast.value,f.yarnBetaFast))),this.addIf("--temperature",e.temperature.value,f.temperature),this.addIf("--seed",e.seed.value,f.seed),this.addIf("--top-k",e.topK.value,f.topK),this.addIf("--top-p",e.topP.value,f.topP),this.addIf("--min-p",e.minP.value,f.minP),this.addIf("--typical",e.typicalP.value,f.typicalP),this.addIf("--repeat-last-n",e.repeatLastN.value,f.repeatLastN),this.addIf("--repeat-penalty",e.repeatPenalty.value,f.repeatPenalty),this.addIf("--presence-penalty",e.presencePenalty.value,f.presencePenalty),this.addIf("--frequency-penalty",e.frequencyPenalty.value,f.frequencyPenalty),this.addIf("--dry-multiplier",e.dryMultiplier.value,f.dryMultiplier),this.addIf("--dry-base",e.dryBase.value,f.dryBase),this.addIf("--mirostat",e.mirostat.value,f.mirostat),this.addIf("--dynatemp-range",e.dynatempRange.value,f.dynatempRange);let a=e.specType.value;if(this.addIf("--spec-type",a,f.specType),a?.includes("draft")){this.addIf("--spec-draft-n-max",e.specDraftNMax.value,f.specDraftNMax),this.addIf("--model-draft",e.modelDraft.value,f.modelDraft);let u=e.specDraftDevice.value;u&&u.length>0&&this._flags.push(`--spec-draft-device ${u.join(",")}`),this.addIf("--n-gpu-layers-draft",e.nGpuLayersDraft.value,f.nGpuLayersDraft),this.addIf("--cache-type-k-draft",e.specDraftCacheTypeK.value,f.specDraftCacheTypeK),this.addIf("--cache-type-v-draft",e.specDraftCacheTypeV.value,f.specDraftCacheTypeV)}a?.includes("ngram")&&(this.addIf("--spec-ngram-mod-n-min",e.specNgramModNMin.value,f.specNgramModNMin),this.addIf("--spec-ngram-mod-n-max",e.specNgramModNMax.value,f.specNgramModNMax),this.addIf("--spec-ngram-mod-n-match",e.specNgramModNMatch.value,f.specNgramModNMatch),this.addIf("--spec-ngram-simple-size-n",e.specNgramSimpleSizeN.value,f.specNgramSimpleSizeN),this.addIf("--spec-ngram-simple-size-m",e.specNgramSimpleSizeM.value,f.specNgramSimpleSizeM),this.addIf("--spec-ngram-simple-min-hits",e.specNgramSimpleMinHits.value,f.specNgramSimpleMinHits)),this.addIf("--lora",e.lora.value,f.lora),this.addIf("--lora-scaled",e.loraScaled.value,f.loraScaled),this.addIf("--timeout",e.timeout.value,f.timeout),this.addIf("--threads-http",e.threadsHttp.value,f.threadsHttp),e.metrics.value==="on"&&this._flags.push("--metrics"),this.addToggle(e.slots.value,"--slots","--no-slots",!0),this.addToggle(e.cachePrompt.value,"--cache-prompt","--no-cache-prompt",!0),e.cachePrompt.value==="on"&&this.addIf("--cache-reuse",e.cacheReuse.value,f.cacheReuse),this.addIf("--reasoning",e.reasoning.value,f.reasoning),this.addIf("--reasoning-budget",e.reasoningBudget.value,f.reasoningBudget),this.addIf("--reasoning-format",e.reasoningFormat.value,f.reasoningFormat),this.addIf("--api-key-file",e.apiKeyFile.value,f.apiKeyFile);for(let u of e.extraFlags.value.split(`
5588
- `)){let h=u.trim();h&&h.startsWith("--")&&this._flags.push(h)}let r=this._flags;return this._flags=null,r}save(){if(this.form.invalid)return;let e=this.parseEnvironment(),t=V({name:this.form.controls.name.value.trim(),type:"llama-server",command:this.form.controls.command.value.trim(),flags:this.buildFlags()},Object.keys(e).length?{environment:e}:{});this.dialogRef.close(t)}cancel(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=T({type:i,selectors:[["app-llama-server-dialog"]],decls:463,vars:185,consts:[["commandAuto","matAutocomplete"],["ctxSizeAuto","matAutocomplete"],["hostAuto","matAutocomplete"],["mat-dialog-title",""],[1,"llama-form",3,"formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","name","placeholder","e.g. llama-qwen3_6-27b-q8",3,"disabled"],["matInput","","formControlName","command","placeholder","/path/to/llama-server",3,"matAutocomplete"],[3,"value"],["expanded",""],["formControlName","model","label","Model Path","placeholder","/path/to/model.gguf",3,"existingPaths","fieldClass"],["formControlName","mmproj","label","MMProj Path","placeholder","/path/to/mmproj.gguf (optional)",3,"existingPaths","fieldClass"],["matInput","","formControlName","alias","type","text","matTooltip","Set model name aliases (comma-separated). Used by API for model identification"],[1,"form-row"],["appearance","outline",1,"form-col-40"],["matInput","","formControlName","nGpuLayers","type","number","matTooltip","Max number of layers to store in VRAM. 999 = all layers. Can use 'auto' or 'all'"],["appearance","outline",1,"form-col-60"],["formControlName","device","multiple","","placeholder","Select GPU devices","matTooltip","Comma-separated list of devices for offloading. Use --list-devices to see available"],["appearance","outline",1,"form-col"],["formControlName","splitMode","matTooltip","How to split model across multiple GPUs. layer=pipelined, row=parallelized, tensor=experimental"],["value","layer"],["value","row"],["value","tensor"],["value","none"],["matInput","","formControlName","tensorSplit","placeholder","10,10,10","matTooltip","Fraction of model to offload to each GPU (comma-separated proportions, e.g. 3,1)",3,"disabled"],["matInput","","formControlName","mainGpu","type","number","matTooltip","GPU index for model (with split-mode=none) or for intermediate results and KV (with split-mode=row)"],[1,"subsection-label"],["formControlName","fit","matTooltip","Adjust unset arguments to fit in device memory. Helps prevent OOM errors"],["value","on"],["value","off"],["matInput","","formControlName","fitTarget","type","number","matTooltip","Target margin per device in MiB for --fit option. Default: 1024",3,"disabled"],["matInput","","formControlName","fitCtx","type","number","matTooltip","Minimum context size that can be set by --fit option. Default: 4096",3,"disabled"],["formControlName","mlock","matTooltip","Force system to keep model in RAM rather than swapping or compressing"],["formControlName","mmap","matTooltip","Memory-map model. If disabled: slower load but may reduce pageouts if not using mlock"],["formControlName","cpuMoe","matTooltip","Keep all Mixture of Experts (MoE) weights in CPU memory"],["matInput","","formControlName","nCpuMoe","type","number","matTooltip","Keep MoE weights of first N layers in CPU. 0 = disabled",3,"disabled"],["matInput","","formControlName","ctxSize","type","text","placeholder","e.g. 8K, 3x16K, 20000","matTooltip","Context size. Supports: 20000, 20K, 3x20K. 0 = from model metadata",3,"blur","keyup.enter","matAutocomplete"],["matInput","","formControlName","batchSize","type","number","matTooltip","Logical maximum batch size for processing. Default: 2048"],["matInput","","formControlName","ubatchSize","type","number","matTooltip","Physical maximum batch size. Default: 512"],["formControlName","cacheTypeK","matTooltip","KV cache data type for K. Options: f32, f16, bf16, q8_0, q4_0, q4_1, iq4_nl, q5_0, q5_1"],["formControlName","cacheTypeV","matTooltip","KV cache data type for V. Options: f32, f16, bf16, q8_0, q4_0, q4_1, iq4_nl, q5_0, q5_1"],["formControlName","kvOffload","matTooltip","Enable KV cache offloading to GPU. Reduces CPU memory usage"],["matInput","","formControlName","cacheRam","type","number","matTooltip","Maximum prompt cache size in MiB. -1 = no limit, 0 = disable. Default: 8192"],["formControlName","swaFull","matTooltip","Use full-size SWA (Sliding Window Attention) cache instead of compressed"],["formControlName","ropeScaling","matTooltip","RoPE frequency scaling method. linear or yarn for extended context"],["value","linear"],["value","yarn"],["matInput","","formControlName","ropeScale","type","number","matTooltip","RoPE context scaling factor. Expands context by factor of N",3,"disabled"],["matInput","","formControlName","ropeFreqBase","type","number","matTooltip","RoPE base frequency for NTK-aware scaling. 0 = loaded from model",3,"disabled"],["matInput","","formControlName","ropeFreqScale","type","number","matTooltip","RoPE frequency scaling factor. Expands context by factor of 1/N. 0 = from model",3,"disabled"],["matInput","","formControlName","threads","type","number","matTooltip","Number of CPU threads to use during generation. -1 = auto-detect"],["matInput","","formControlName","parallel","type","number","matTooltip","Number of server slots for parallel requests. -1 = auto"],["matInput","","formControlName","nPredict","type","number","matTooltip","Maximum number of tokens to predict. -1 = infinity (unlimited generation)"],["formControlName","flashAttn","matTooltip","Enable Flash Attention for faster inference with lower VRAM usage"],["value","auto"],["formControlName","contBatching","matTooltip","Enable continuous (dynamic) batching for better throughput with multiple requests"],["formControlName","contextShift","matTooltip","Enable context shift on infinite text generation. Shifts context window when full"],["matInput","","formControlName","temperature","type","number","matTooltip","Temperature for sampling. Higher = more random, lower = more deterministic. Default: 0.8"],["matInput","","formControlName","seed","type","number","matTooltip","RNG seed for reproducibility. -1 = random seed"],["matInput","","formControlName","topK","type","number","matTooltip","Top-K sampling: limit to K most likely tokens. 0 = disabled. Default: 40",3,"disabled"],["matInput","","formControlName","topP","type","number","matTooltip","Top-P (nucleus) sampling: cumulative probability threshold. 1.0 = disabled. Default: 0.95",3,"disabled"],["matInput","","formControlName","minP","type","number","matTooltip","Min-P sampling: minimum probability threshold. 0.0 = disabled. Default: 0.05"],["matInput","","formControlName","typicalP","type","number","matTooltip","Locally typical sampling parameter p. 1.0 = disabled",3,"disabled"],["formControlName","mirostat","matTooltip","Mirostat sampling mode. 0=disabled, 1=Mirostat, 2=Mirostat 2.0. Top-K/Nucleus ignored when enabled"],["matInput","","formControlName","dynatempRange","type","number","matTooltip","Dynamic temperature range. 0.0 = disabled"],["matInput","","formControlName","repeatLastN","type","number","matTooltip","Last N tokens to consider for penalty. 0 = disabled, -1 = ctx_size. Default: 64"],["matInput","","formControlName","repeatPenalty","type","number","matTooltip","Penalize repeat sequence of tokens. 1.0 = disabled"],["matInput","","formControlName","presencePenalty","type","number","matTooltip","Alpha presence penalty: penalize tokens that appeared. 0.0 = disabled"],["matInput","","formControlName","frequencyPenalty","type","number","matTooltip","Alpha frequency penalty: penalize by token frequency. 0.0 = disabled"],["matInput","","formControlName","dryMultiplier","type","number","matTooltip","DRY sampling multiplier: prevents repetition by penalizing recent tokens. 0.0 = disabled"],["matInput","","formControlName","dryBase","type","number","matTooltip","DRY sampling base value. Default: 1.75"],["appearance","outline","subscriptSizing","dynamic",1,"full-width"],["formControlName","specType","matTooltip","Type of speculative decoding. draft-* uses draft model, ngram-* uses n-gram lookup; draft-mtp,ngram-mod runs both (recent llama.cpp builds)"],["value","draft-simple"],["value","draft-eagle3"],["value","draft-mtp"],["value","ngram-simple"],["value","ngram-mod"],["value","draft-mtp,ngram-mod"],["formControlName","lora","label","LoRA Adapter Path","placeholder","/path/to/lora.gguf (comma-separated for multiple)",3,"existingPaths","fieldClass"],["matInput","","formControlName","loraScaled","type","text","matTooltip","LoRA adapter with user-defined scaling. Format: path:scale,... (e.g. lora.gguf:0.5)"],["matInput","","formControlName","host","type","text","matTooltip","IP address to listen (default: 127.0.0.1). Can bind to UNIX socket if ends with .sock",3,"matAutocomplete"],["matInput","","formControlName","port","type","number","matTooltip","Port to listen (default: 8080). Ignored when host is a UNIX socket",3,"disabled"],["matInput","","formControlName","timeout","type","number","matTooltip","Server read/write timeout in seconds. Default: 3600"],["matInput","","formControlName","threadsHttp","type","number","matTooltip","Number of threads for HTTP requests. -1 = auto"],["formControlName","apiKeyFile","label","API Key File","placeholder","/path/to/keys.ini",3,"existingPaths","fieldClass"],["formControlName","metrics","matTooltip","Enable Prometheus-compatible metrics endpoint at /metrics"],["formControlName","slots","matTooltip","Expose slots monitoring endpoint at /slots"],["formControlName","cachePrompt","matTooltip","Enable prompt caching to speed up repeated prompts"],["matInput","","formControlName","cacheReuse","type","number","matTooltip","Min chunk size to attempt reusing from cache via KV shifting. Requires prompt caching",3,"disabled"],["formControlName","reasoning","matTooltip","Use reasoning/thinking in chat. auto = detect from template"],["matInput","","formControlName","reasoningBudget","type","number","matTooltip","Token budget for thinking. -1 = unlimited, 0 = immediate end, N>0 = token limit",3,"disabled"],["formControlName","reasoningFormat","matTooltip","Format for reasoning output. none=raw, deepseek=reasoning_content field, deepseek-legacy=keep think tags",3,"disabled"],["value","deepseek"],["value","deepseek-legacy"],["matInput","","formControlName","extraFlags","rows","4","wrap","off","placeholder",`--custom-flag value
5586
+ `)}}extractExtraFlags(e){let t=[];for(let n of e){let a=n.split(/\s|=/)[0];n.startsWith("--")&&!Oy.has(a)&&t.push(n)}return t}parseEnvironment(){let e={};for(let t of this.form.controls.envText.value.split(`
5587
+ `)){let n=t.trim();if(!n||n.startsWith("#"))continue;let a=n.indexOf("=");a<=0||(e[n.slice(0,a).trim()]=n.slice(a+1))}return e}addIf(e,t,n){String(t)!==String(n)&&this._flags.push(`${e} ${t}`)}addToggle(e,t,n,a){let r=e==="on";r!==a&&this._flags.push(r?t:n)}buildFlags(){this._flags=[];let e=this.form.controls;this.addIf("--host",e.host.value,f.host),this.addIf("--port",e.port.value,f.port),this.addIf("--threads",e.threads.value,f.threads),this.addIf("--flash-attn",e.flashAttn.value,f.flashAttn),this.addIf("--fit",e.fit.value,f.fit),this.addIf("--parallel",e.parallel.value,f.parallel),this.addIf("--alias",e.alias.value,f.alias),this.addIf("--n-predict",e.nPredict.value,f.nPredict),this.addToggle(e.contextShift.value,"--context-shift","--no-context-shift",!1),this.addToggle(e.contBatching.value,"--cont-batching","--no-cont-batching",!0);let t=e.device.value;t&&t.length>0&&this._flags.push(`--device ${t.join(",")}`),e.splitMode.value!=="none"&&this.addIf("--tensor-split",e.tensorSplit.value,f.tensorSplit),this.addIf("--model",e.model.value,f.model),this.addIf("--mmproj",e.mmproj.value,f.mmproj),this.addIf("--n-gpu-layers",e.nGpuLayers.value,f.nGpuLayers),this.addIf("--split-mode",e.splitMode.value,f.splitMode),this.addIf("--main-gpu",e.mainGpu.value,f.mainGpu),e.fit.value==="on"&&(this.addIf("--fit-target",e.fitTarget.value,f.fitTarget),this.addIf("--fit-ctx",e.fitCtx.value,f.fitCtx)),e.mlock.value==="on"&&this._flags.push("--mlock"),this.addToggle(e.mmap.value,"--mmap","--no-mmap",!0),e.cpuMoe.value==="on"&&this._flags.push("--cpu-moe"),e.cpuMoe.value!=="on"&&this.addIf("--n-cpu-moe",e.nCpuMoe.value,f.nCpuMoe),this.addIf("--ctx-size",+kn(e.ctxSize.value??""),f.ctxSize),this.addIf("--batch-size",e.batchSize.value,f.batchSize),this.addIf("--ubatch-size",e.ubatchSize.value,f.ubatchSize),this.addIf("--cache-type-k",e.cacheTypeK.value,f.cacheTypeK),this.addIf("--cache-type-v",e.cacheTypeV.value,f.cacheTypeV),this.addToggle(e.kvOffload.value,"--kv-offload","--no-kv-offload",!0),this.addIf("--cache-ram",e.cacheRam.value,f.cacheRam),e.swaFull.value==="on"&&this._flags.push("--swa-full");let n=e.ropeScaling.value;n&&n!==f.ropeScaling&&(this._flags.push(`--rope-scaling ${n}`),this.addIf("--rope-scale",e.ropeScale.value,f.ropeScale),this.addIf("--rope-freq-base",e.ropeFreqBase.value,f.ropeFreqBase),this.addIf("--rope-freq-scale",e.ropeFreqScale.value,f.ropeFreqScale),n==="yarn"&&(this.addIf("--yarn-orig-ctx",e.yarnOrigCtx.value,f.yarnOrigCtx),this.addIf("--yarn-ext-factor",e.yarnExtFactor.value,f.yarnExtFactor),this.addIf("--yarn-attn-factor",e.yarnAttnFactor.value,f.yarnAttnFactor),this.addIf("--yarn-beta-slow",e.yarnBetaSlow.value,f.yarnBetaSlow),this.addIf("--yarn-beta-fast",e.yarnBetaFast.value,f.yarnBetaFast))),this.addIf("--temperature",e.temperature.value,f.temperature),this.addIf("--seed",e.seed.value,f.seed),this.addIf("--top-k",e.topK.value,f.topK),this.addIf("--top-p",e.topP.value,f.topP),this.addIf("--min-p",e.minP.value,f.minP),this.addIf("--typical",e.typicalP.value,f.typicalP),this.addIf("--repeat-last-n",e.repeatLastN.value,f.repeatLastN),this.addIf("--repeat-penalty",e.repeatPenalty.value,f.repeatPenalty),this.addIf("--presence-penalty",e.presencePenalty.value,f.presencePenalty),this.addIf("--frequency-penalty",e.frequencyPenalty.value,f.frequencyPenalty),this.addIf("--dry-multiplier",e.dryMultiplier.value,f.dryMultiplier),this.addIf("--dry-base",e.dryBase.value,f.dryBase),this.addIf("--mirostat",e.mirostat.value,f.mirostat),this.addIf("--dynatemp-range",e.dynatempRange.value,f.dynatempRange);let a=e.specType.value;if(this.addIf("--spec-type",a,f.specType),a?.includes("draft")){this.addIf("--spec-draft-n-max",e.specDraftNMax.value,f.specDraftNMax),this.addIf("--model-draft",e.modelDraft.value,f.modelDraft);let u=e.specDraftDevice.value;u&&u.length>0&&this._flags.push(`--spec-draft-device ${u.join(",")}`),this.addIf("--n-gpu-layers-draft",e.nGpuLayersDraft.value,f.nGpuLayersDraft),this.addIf("--cache-type-k-draft",e.specDraftCacheTypeK.value,f.specDraftCacheTypeK),this.addIf("--cache-type-v-draft",e.specDraftCacheTypeV.value,f.specDraftCacheTypeV)}a?.includes("ngram")&&(this.addIf("--spec-ngram-mod-n-min",e.specNgramModNMin.value,f.specNgramModNMin),this.addIf("--spec-ngram-mod-n-max",e.specNgramModNMax.value,f.specNgramModNMax),this.addIf("--spec-ngram-mod-n-match",e.specNgramModNMatch.value,f.specNgramModNMatch),this.addIf("--spec-ngram-simple-size-n",e.specNgramSimpleSizeN.value,f.specNgramSimpleSizeN),this.addIf("--spec-ngram-simple-size-m",e.specNgramSimpleSizeM.value,f.specNgramSimpleSizeM),this.addIf("--spec-ngram-simple-min-hits",e.specNgramSimpleMinHits.value,f.specNgramSimpleMinHits)),this.addIf("--lora",e.lora.value,f.lora),this.addIf("--lora-scaled",e.loraScaled.value,f.loraScaled),this.addIf("--timeout",e.timeout.value,f.timeout),this.addIf("--threads-http",e.threadsHttp.value,f.threadsHttp),e.metrics.value==="on"&&this._flags.push("--metrics"),this.addToggle(e.slots.value,"--slots","--no-slots",!0),this.addToggle(e.cachePrompt.value,"--cache-prompt","--no-cache-prompt",!0),e.cachePrompt.value==="on"&&this.addIf("--cache-reuse",e.cacheReuse.value,f.cacheReuse),this.addIf("--reasoning",e.reasoning.value,f.reasoning),this.addIf("--reasoning-budget",e.reasoningBudget.value,f.reasoningBudget),this.addIf("--reasoning-format",e.reasoningFormat.value,f.reasoningFormat),this.addIf("--api-key-file",e.apiKeyFile.value,f.apiKeyFile);for(let u of e.extraFlags.value.split(`
5588
+ `)){let h=u.trim();h&&h.startsWith("--")&&this._flags.push(h)}let r=this._flags;return this._flags=null,r}save(){if(this.form.invalid)return;let e=this.parseEnvironment(),t=V({name:this.form.controls.name.value.trim(),type:"llama-server",command:this.form.controls.command.value.trim(),flags:this.buildFlags()},Object.keys(e).length?{environment:e}:{});this.dialogRef.close(t)}cancel(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=I({type:i,selectors:[["app-llama-server-dialog"]],decls:463,vars:185,consts:[["commandAuto","matAutocomplete"],["ctxSizeAuto","matAutocomplete"],["hostAuto","matAutocomplete"],["mat-dialog-title",""],[1,"llama-form",3,"formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","name","placeholder","e.g. llama-qwen3_6-27b-q8",3,"disabled"],["matInput","","formControlName","command","placeholder","/path/to/llama-server",3,"matAutocomplete"],[3,"value"],["expanded",""],["formControlName","model","label","Model Path","placeholder","/path/to/model.gguf",3,"existingPaths","fieldClass"],["formControlName","mmproj","label","MMProj Path","placeholder","/path/to/mmproj.gguf (optional)",3,"existingPaths","fieldClass"],["matInput","","formControlName","alias","type","text","matTooltip","Set model name aliases (comma-separated). Used by API for model identification"],[1,"form-row"],["appearance","outline",1,"form-col-40"],["matInput","","formControlName","nGpuLayers","type","number","matTooltip","Max number of layers to store in VRAM. 999 = all layers. Can use 'auto' or 'all'"],["appearance","outline",1,"form-col-60"],["formControlName","device","multiple","","placeholder","Select GPU devices","matTooltip","Comma-separated list of devices for offloading. Use --list-devices to see available"],["appearance","outline",1,"form-col"],["formControlName","splitMode","matTooltip","How to split model across multiple GPUs. layer=pipelined, row=parallelized, tensor=experimental"],["value","layer"],["value","row"],["value","tensor"],["value","none"],["matInput","","formControlName","tensorSplit","placeholder","10,10,10","matTooltip","Fraction of model to offload to each GPU (comma-separated proportions, e.g. 3,1)",3,"disabled"],["matInput","","formControlName","mainGpu","type","number","matTooltip","GPU index for model (with split-mode=none) or for intermediate results and KV (with split-mode=row)"],[1,"subsection-label"],["formControlName","fit","matTooltip","Adjust unset arguments to fit in device memory. Helps prevent OOM errors"],["value","on"],["value","off"],["matInput","","formControlName","fitTarget","type","number","matTooltip","Target margin per device in MiB for --fit option. Default: 1024",3,"disabled"],["matInput","","formControlName","fitCtx","type","number","matTooltip","Minimum context size that can be set by --fit option. Default: 4096",3,"disabled"],["formControlName","mlock","matTooltip","Force system to keep model in RAM rather than swapping or compressing"],["formControlName","mmap","matTooltip","Memory-map model. If disabled: slower load but may reduce pageouts if not using mlock"],["formControlName","cpuMoe","matTooltip","Keep all Mixture of Experts (MoE) weights in CPU memory"],["matInput","","formControlName","nCpuMoe","type","number","matTooltip","Keep MoE weights of first N layers in CPU. 0 = disabled",3,"disabled"],["matInput","","formControlName","ctxSize","type","text","placeholder","e.g. 8K, 3x16K, 20000","matTooltip","Context size. Supports: 20000, 20K, 3x20K. 0 = from model metadata",3,"blur","keyup.enter","matAutocomplete"],["matInput","","formControlName","batchSize","type","number","matTooltip","Logical maximum batch size for processing. Default: 2048"],["matInput","","formControlName","ubatchSize","type","number","matTooltip","Physical maximum batch size. Default: 512"],["formControlName","cacheTypeK","matTooltip","KV cache data type for K. Options: f32, f16, bf16, q8_0, q4_0, q4_1, iq4_nl, q5_0, q5_1"],["formControlName","cacheTypeV","matTooltip","KV cache data type for V. Options: f32, f16, bf16, q8_0, q4_0, q4_1, iq4_nl, q5_0, q5_1"],["formControlName","kvOffload","matTooltip","Enable KV cache offloading to GPU. Reduces CPU memory usage"],["matInput","","formControlName","cacheRam","type","number","matTooltip","Maximum prompt cache size in MiB. -1 = no limit, 0 = disable. Default: 8192"],["formControlName","swaFull","matTooltip","Use full-size SWA (Sliding Window Attention) cache instead of compressed"],["formControlName","ropeScaling","matTooltip","RoPE frequency scaling method. linear or yarn for extended context"],["value","linear"],["value","yarn"],["matInput","","formControlName","ropeScale","type","number","matTooltip","RoPE context scaling factor. Expands context by factor of N",3,"disabled"],["matInput","","formControlName","ropeFreqBase","type","number","matTooltip","RoPE base frequency for NTK-aware scaling. 0 = loaded from model",3,"disabled"],["matInput","","formControlName","ropeFreqScale","type","number","matTooltip","RoPE frequency scaling factor. Expands context by factor of 1/N. 0 = from model",3,"disabled"],["matInput","","formControlName","threads","type","number","matTooltip","Number of CPU threads to use during generation. -1 = auto-detect"],["matInput","","formControlName","parallel","type","number","matTooltip","Number of server slots for parallel requests. -1 = auto"],["matInput","","formControlName","nPredict","type","number","matTooltip","Maximum number of tokens to predict. -1 = infinity (unlimited generation)"],["formControlName","flashAttn","matTooltip","Enable Flash Attention for faster inference with lower VRAM usage"],["value","auto"],["formControlName","contBatching","matTooltip","Enable continuous (dynamic) batching for better throughput with multiple requests"],["formControlName","contextShift","matTooltip","Enable context shift on infinite text generation. Shifts context window when full"],["matInput","","formControlName","temperature","type","number","matTooltip","Temperature for sampling. Higher = more random, lower = more deterministic. Default: 0.8"],["matInput","","formControlName","seed","type","number","matTooltip","RNG seed for reproducibility. -1 = random seed"],["matInput","","formControlName","topK","type","number","matTooltip","Top-K sampling: limit to K most likely tokens. 0 = disabled. Default: 40",3,"disabled"],["matInput","","formControlName","topP","type","number","matTooltip","Top-P (nucleus) sampling: cumulative probability threshold. 1.0 = disabled. Default: 0.95",3,"disabled"],["matInput","","formControlName","minP","type","number","matTooltip","Min-P sampling: minimum probability threshold. 0.0 = disabled. Default: 0.05"],["matInput","","formControlName","typicalP","type","number","matTooltip","Locally typical sampling parameter p. 1.0 = disabled",3,"disabled"],["formControlName","mirostat","matTooltip","Mirostat sampling mode. 0=disabled, 1=Mirostat, 2=Mirostat 2.0. Top-K/Nucleus ignored when enabled"],["matInput","","formControlName","dynatempRange","type","number","matTooltip","Dynamic temperature range. 0.0 = disabled"],["matInput","","formControlName","repeatLastN","type","number","matTooltip","Last N tokens to consider for penalty. 0 = disabled, -1 = ctx_size. Default: 64"],["matInput","","formControlName","repeatPenalty","type","number","matTooltip","Penalize repeat sequence of tokens. 1.0 = disabled"],["matInput","","formControlName","presencePenalty","type","number","matTooltip","Alpha presence penalty: penalize tokens that appeared. 0.0 = disabled"],["matInput","","formControlName","frequencyPenalty","type","number","matTooltip","Alpha frequency penalty: penalize by token frequency. 0.0 = disabled"],["matInput","","formControlName","dryMultiplier","type","number","matTooltip","DRY sampling multiplier: prevents repetition by penalizing recent tokens. 0.0 = disabled"],["matInput","","formControlName","dryBase","type","number","matTooltip","DRY sampling base value. Default: 1.75"],["appearance","outline","subscriptSizing","dynamic",1,"full-width"],["formControlName","specType","matTooltip","Type of speculative decoding. draft-* uses draft model, ngram-* uses n-gram lookup; draft-mtp,ngram-mod runs both (recent llama.cpp builds)"],["value","draft-simple"],["value","draft-eagle3"],["value","draft-mtp"],["value","ngram-simple"],["value","ngram-mod"],["value","draft-mtp,ngram-mod"],["formControlName","lora","label","LoRA Adapter Path","placeholder","/path/to/lora.gguf (comma-separated for multiple)",3,"existingPaths","fieldClass"],["matInput","","formControlName","loraScaled","type","text","matTooltip","LoRA adapter with user-defined scaling. Format: path:scale,... (e.g. lora.gguf:0.5)"],["matInput","","formControlName","host","type","text","matTooltip","IP address to listen (default: 127.0.0.1). Can bind to UNIX socket if ends with .sock",3,"matAutocomplete"],["matInput","","formControlName","port","type","number","matTooltip","Port to listen (default: 8080). Ignored when host is a UNIX socket",3,"disabled"],["matInput","","formControlName","timeout","type","number","matTooltip","Server read/write timeout in seconds. Default: 3600"],["matInput","","formControlName","threadsHttp","type","number","matTooltip","Number of threads for HTTP requests. -1 = auto"],["formControlName","apiKeyFile","label","API Key File","placeholder","/path/to/keys.ini",3,"existingPaths","fieldClass"],["formControlName","metrics","matTooltip","Enable Prometheus-compatible metrics endpoint at /metrics"],["formControlName","slots","matTooltip","Expose slots monitoring endpoint at /slots"],["formControlName","cachePrompt","matTooltip","Enable prompt caching to speed up repeated prompts"],["matInput","","formControlName","cacheReuse","type","number","matTooltip","Min chunk size to attempt reusing from cache via KV shifting. Requires prompt caching",3,"disabled"],["formControlName","reasoning","matTooltip","Use reasoning/thinking in chat. auto = detect from template"],["matInput","","formControlName","reasoningBudget","type","number","matTooltip","Token budget for thinking. -1 = unlimited, 0 = immediate end, N>0 = token limit",3,"disabled"],["formControlName","reasoningFormat","matTooltip","Format for reasoning output. none=raw, deepseek=reasoning_content field, deepseek-legacy=keep think tags",3,"disabled"],["value","deepseek"],["value","deepseek-legacy"],["matInput","","formControlName","extraFlags","rows","4","wrap","off","placeholder",`--custom-flag value
5589
5589
  --flash-attn on`,"matTooltip","Any llama-server flags not covered by the fields above (one per line). Pass-through \u2014 not validated",1,"flags-textarea"],["matInput","","formControlName","envText","rows","4","wrap","off","placeholder",`HF_HOME=/data/huggingface
5590
- HSA_OVERRIDE_GFX_VERSION=11.0.0`,"matTooltip","Environment variables for the service process (KEY=VALUE, one per line)",1,"env-textarea"],["align","end"],["mat-stroked-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"auto-path"],[1,"auto-from"],["matInput","","formControlName","yarnOrigCtx","type","number","matTooltip","YaRN: original context size of model. 0 = model training context size"],["matInput","","formControlName","yarnExtFactor","type","number","matTooltip","YaRN: extrapolation mix factor. -1 = default, 0.0 = full interpolation"],["matInput","","formControlName","yarnAttnFactor","type","number","matTooltip","YaRN: scale sqrt(t) or attention magnitude. -1 = default"],["matInput","","formControlName","yarnBetaSlow","type","number","matTooltip","YaRN: high correction dim (alpha). -1 = default"],["matInput","","formControlName","yarnBetaFast","type","number","matTooltip","YaRN: low correction dim (beta). -1 = default"],["formControlName","modelDraft","label","Draft Model Path","placeholder","/path/to/draft-model.gguf",3,"existingPaths","fieldClass"],["formControlName","specDraftDevice","multiple","","placeholder","Select GPU devices for draft model","matTooltip","Devices for offloading the draft model. Same options as main --device"],["matInput","","formControlName","specDraftNMax","type","number","matTooltip","Max number of tokens to draft for speculative decoding. Default: 3"],["matInput","","formControlName","nGpuLayersDraft","type","number","matTooltip","Max draft model layers to store in VRAM. 999 = all layers"],["formControlName","specDraftCacheTypeK","matTooltip","KV cache data type for K for the draft model"],["formControlName","specDraftCacheTypeV","matTooltip","KV cache data type for V for the draft model"],["matInput","","formControlName","specNgramModNMin","type","number","matTooltip","Min number of ngram tokens for ngram-mod speculative decoding. Default: 48"],["matInput","","formControlName","specNgramModNMax","type","number","matTooltip","Max number of ngram tokens for ngram-mod speculative decoding. Default: 64"],["matInput","","formControlName","specNgramModNMatch","type","number","matTooltip","Ngram-mod lookup length. Default: 24"],["matInput","","formControlName","specNgramSimpleSizeN","type","number","matTooltip","Ngram size N for ngram-simple: length of lookup n-gram. Default: 12"],["matInput","","formControlName","specNgramSimpleSizeM","type","number","matTooltip","Ngram size M for ngram-simple: length of draft m-gram. Default: 48"],["matInput","","formControlName","specNgramSimpleMinHits","type","number","matTooltip","Minimum hits for ngram-simple speculative decoding. Default: 1"]],template:function(t,n){if(t&1&&(s(0,"h2",3),m(1),l(),s(2,"mat-dialog-content")(3,"form",4)(4,"mat-form-field",5),_(5,"input",6),b(),s(6,"mat-label"),m(7,"Service Name"),l(),M(8,uy,2,0,"mat-error")(9,hy,2,0,"mat-error"),l(),s(10,"mat-form-field",5),_(11,"input",7),b(),s(12,"mat-label"),m(13,"Binary Path"),l(),M(14,py,2,0,"mat-error"),l(),s(15,"mat-autocomplete",null,0),me(17,fy,5,3,"mat-option",8,dy),l(),s(19,"mat-expansion-panel",9)(20,"mat-expansion-panel-header")(21,"mat-panel-title"),m(22,"Model"),l()(),_(23,"app-file-autocomplete",10),b(),_(24,"app-file-autocomplete",11),b(),s(25,"mat-form-field",5),_(26,"input",12),b(),s(27,"mat-label"),m(28,"Model Alias"),l()()(),s(29,"mat-expansion-panel",9)(30,"mat-expansion-panel-header")(31,"mat-panel-title"),m(32,"GPU & Memory"),l()(),s(33,"div",13)(34,"mat-form-field",14),_(35,"input",15),b(),s(36,"mat-label"),m(37,"GPU Layers"),l()(),s(38,"mat-form-field",16)(39,"mat-select",17),me(40,gy,2,2,"mat-option",8,Gc),l(),b(),s(42,"mat-label"),m(43,"Device (multi-select)"),l()()(),s(44,"div",13)(45,"mat-form-field",18)(46,"mat-select",19)(47,"mat-option",20),m(48,"layer (pipelined)"),l(),s(49,"mat-option",21),m(50,"row (parallelized)"),l(),s(51,"mat-option",22),m(52,"tensor (experimental)"),l(),s(53,"mat-option",23),m(54,"none (single GPU)"),l()(),b(),s(55,"mat-label"),m(56,"Split Mode"),l()(),s(57,"mat-form-field",18),_(58,"input",24),b(),s(59,"mat-label"),m(60,"Tensor Split"),l()(),s(61,"mat-form-field",18),_(62,"input",25),b(),s(63,"mat-label"),m(64,"Main GPU"),l()()(),s(65,"div",26),m(66,"Memory"),l(),s(67,"div",13)(68,"mat-form-field",18)(69,"mat-select",27)(70,"mat-option",28),m(71,"on"),l(),s(72,"mat-option",29),m(73,"off"),l()(),b(),s(74,"mat-label"),m(75,"Fit to VRAM"),l()(),s(76,"mat-form-field",18),_(77,"input",30),b(),s(78,"mat-label"),m(79,"Fit Target (MiB)"),l()(),s(80,"mat-form-field",18),_(81,"input",31),b(),s(82,"mat-label"),m(83,"Fit Min Ctx"),l()()(),s(84,"div",13)(85,"mat-form-field",18)(86,"mat-select",32)(87,"mat-option",28),m(88,"on"),l(),s(89,"mat-option",29),m(90,"off"),l()(),b(),s(91,"mat-label"),m(92,"mlock (pin RAM)"),l()(),s(93,"mat-form-field",18)(94,"mat-select",33)(95,"mat-option",28),m(96,"on"),l(),s(97,"mat-option",29),m(98,"off"),l()(),b(),s(99,"mat-label"),m(100,"mmap"),l()(),s(101,"mat-form-field",18)(102,"mat-select",34)(103,"mat-option",28),m(104,"on"),l(),s(105,"mat-option",29),m(106,"off"),l()(),b(),s(107,"mat-label"),m(108,"CPU MoE"),l()(),s(109,"mat-form-field",18),_(110,"input",35),b(),s(111,"mat-label"),m(112,"N CPU MoE Layers"),l()()()(),s(113,"mat-expansion-panel")(114,"mat-expansion-panel-header")(115,"mat-panel-title"),m(116,"Context & KV Cache"),l()(),s(117,"div",13)(118,"mat-form-field",18)(119,"input",36),A("blur",function(r){return n.onCtxSizeInput(r)})("keyup.enter",function(r){return n.onCtxSizeInput(r)}),l(),b(),s(120,"mat-label"),m(121,"Context Size"),l()(),s(122,"mat-autocomplete",null,1),me(124,_y,2,2,"mat-option",8,my),l(),s(126,"mat-form-field",18),_(127,"input",37),b(),s(128,"mat-label"),m(129,"Batch Size"),l()(),s(130,"mat-form-field",18),_(131,"input",38),b(),s(132,"mat-label"),m(133,"Ubatch Size"),l()()(),s(134,"div",13)(135,"mat-form-field",18)(136,"mat-select",39),me(137,vy,2,2,"mat-option",8,xt),l(),b(),s(139,"mat-label"),m(140,"KV Cache Type K"),l()(),s(141,"mat-form-field",18)(142,"mat-select",40),me(143,by,2,2,"mat-option",8,xt),l(),b(),s(145,"mat-label"),m(146,"KV Cache Type V"),l()(),s(147,"mat-form-field",18)(148,"mat-select",41)(149,"mat-option",28),m(150,"on"),l(),s(151,"mat-option",29),m(152,"off"),l()(),b(),s(153,"mat-label"),m(154,"KV Offload"),l()()(),s(155,"div",13)(156,"mat-form-field",18),_(157,"input",42),b(),s(158,"mat-label"),m(159,"Cache RAM (MiB)"),l()(),s(160,"mat-form-field",18)(161,"mat-select",43)(162,"mat-option",28),m(163,"on"),l(),s(164,"mat-option",29),m(165,"off"),l()(),b(),s(166,"mat-label"),m(167,"Full SWA Cache"),l()()()(),s(168,"mat-expansion-panel")(169,"mat-expansion-panel-header")(170,"mat-panel-title"),m(171,"RoPE Scaling"),l()(),s(172,"div",13)(173,"mat-form-field",18)(174,"mat-select",44)(175,"mat-option",23),m(176,"none"),l(),s(177,"mat-option",45),m(178,"linear"),l(),s(179,"mat-option",46),m(180,"yarn"),l()(),b(),s(181,"mat-label"),m(182,"Scaling Method"),l()(),s(183,"mat-form-field",18),_(184,"input",47),b(),s(185,"mat-label"),m(186,"Scale Factor"),l()(),s(187,"mat-form-field",18),_(188,"input",48),b(),s(189,"mat-label"),m(190,"Freq Base"),l()(),s(191,"mat-form-field",18),_(192,"input",49),b(),s(193,"mat-label"),m(194,"Freq Scale"),l()()(),M(195,yy,23,10),l(),s(196,"mat-expansion-panel")(197,"mat-expansion-panel-header")(198,"mat-panel-title"),m(199,"Generation"),l(),s(200,"mat-panel-description"),m(201,"Runtime and batching defaults"),l()(),s(202,"div",13)(203,"mat-form-field",18),_(204,"input",50),b(),s(205,"mat-label"),m(206,"Threads"),l()(),s(207,"mat-form-field",18),_(208,"input",51),b(),s(209,"mat-label"),m(210,"Parallel Slots"),l()(),s(211,"mat-form-field",18),_(212,"input",52),b(),s(213,"mat-label"),m(214,"Max Tokens (n-predict)"),l()()(),s(215,"div",13)(216,"mat-form-field",18)(217,"mat-select",53)(218,"mat-option",28),m(219,"on"),l(),s(220,"mat-option",29),m(221,"off"),l(),s(222,"mat-option",54),m(223,"auto"),l()(),b(),s(224,"mat-label"),m(225,"Flash Attention"),l()(),s(226,"mat-form-field",18)(227,"mat-select",55)(228,"mat-option",28),m(229,"on"),l(),s(230,"mat-option",29),m(231,"off"),l()(),b(),s(232,"mat-label"),m(233,"Cont. Batching"),l()(),s(234,"mat-form-field",18)(235,"mat-select",56)(236,"mat-option",28),m(237,"on"),l(),s(238,"mat-option",29),m(239,"off"),l()(),b(),s(240,"mat-label"),m(241,"Context Shift"),l()()()(),s(242,"mat-expansion-panel")(243,"mat-expansion-panel-header")(244,"mat-panel-title"),m(245,"Sampling Defaults"),l(),s(246,"mat-panel-description"),m(247,"Default sampling parameters for generation"),l()(),s(248,"div",26),m(249,"Core"),l(),s(250,"div",13)(251,"mat-form-field",18),_(252,"input",57),b(),s(253,"mat-label"),m(254,"Temperature"),l()(),s(255,"mat-form-field",18),_(256,"input",58),b(),s(257,"mat-label"),m(258,"Seed"),l()(),s(259,"mat-form-field",18),_(260,"input",59),b(),s(261,"mat-label"),m(262,"Top-K"),l()(),s(263,"mat-form-field",18),_(264,"input",60),b(),s(265,"mat-label"),m(266,"Top-P"),l()()(),s(267,"div",13)(268,"mat-form-field",18),_(269,"input",61),b(),s(270,"mat-label"),m(271,"Min-P"),l()(),s(272,"mat-form-field",18),_(273,"input",62),b(),s(274,"mat-label"),m(275,"Typical-P"),l()(),s(276,"mat-form-field",18)(277,"mat-select",63)(278,"mat-option",8),m(279,"disabled"),l(),s(280,"mat-option",8),m(281,"Mirostat"),l(),s(282,"mat-option",8),m(283,"Mirostat 2.0"),l()(),b(),s(284,"mat-label"),m(285,"Mirostat"),l()(),s(286,"mat-form-field",18),_(287,"input",64),b(),s(288,"mat-label"),m(289,"Dyn. Temp Range"),l()()(),s(290,"div",26),m(291,"Penalties"),l(),s(292,"div",13)(293,"mat-form-field",18),_(294,"input",65),b(),s(295,"mat-label"),m(296,"Repeat Last N"),l()(),s(297,"mat-form-field",18),_(298,"input",66),b(),s(299,"mat-label"),m(300,"Repeat Penalty"),l()(),s(301,"mat-form-field",18),_(302,"input",67),b(),s(303,"mat-label"),m(304,"Presence Penalty"),l()(),s(305,"mat-form-field",18),_(306,"input",68),b(),s(307,"mat-label"),m(308,"Frequency Penalty"),l()()(),s(309,"div",26),m(310,"DRY Sampling"),l(),s(311,"div",13)(312,"mat-form-field",18),_(313,"input",69),b(),s(314,"mat-label"),m(315,"DRY Multiplier"),l()(),s(316,"mat-form-field",18),_(317,"input",70),b(),s(318,"mat-label"),m(319,"DRY Base"),l()()()(),s(320,"mat-expansion-panel")(321,"mat-expansion-panel-header")(322,"mat-panel-title"),m(323,"Speculative Decoding"),l(),s(324,"mat-panel-description"),m(325,"Draft model and speculative decoding options"),l()(),s(326,"mat-form-field",71)(327,"mat-select",72)(328,"mat-option",23),m(329,"none"),l(),s(330,"mat-option",73),m(331,"draft-simple"),l(),s(332,"mat-option",74),m(333,"draft-eagle3"),l(),s(334,"mat-option",75),m(335,"draft-mtp"),l(),s(336,"mat-option",76),m(337,"ngram-simple"),l(),s(338,"mat-option",77),m(339,"ngram-mod"),l(),s(340,"mat-option",78),m(341,"draft-mtp,ngram-mod"),l()(),b(),s(342,"mat-label"),m(343,"Spec Type"),l()(),M(344,Dy,32,12),M(345,Sy,15,6),M(346,ky,15,6),l(),s(347,"mat-expansion-panel")(348,"mat-expansion-panel-header")(349,"mat-panel-title"),m(350,"LoRA & Adapters"),l()(),_(351,"app-file-autocomplete",79),b(),s(352,"mat-form-field",5),_(353,"input",80),b(),s(354,"mat-label"),m(355,"LoRA Scaled"),l()()(),s(356,"mat-expansion-panel")(357,"mat-expansion-panel-header")(358,"mat-panel-title"),m(359,"Server & Network"),l()(),s(360,"div",13)(361,"mat-form-field",18),_(362,"input",81),b(),s(363,"mat-label"),m(364,"Host"),l()(),s(365,"mat-autocomplete",null,2),me(367,My,5,3,"mat-option",8,Gc),l(),s(369,"mat-form-field",18),_(370,"input",82),b(),s(371,"mat-label"),m(372,"Port"),l()(),s(373,"mat-form-field",18),_(374,"input",83),b(),s(375,"mat-label"),m(376,"Timeout (s)"),l()(),s(377,"mat-form-field",18),_(378,"input",84),b(),s(379,"mat-label"),m(380,"HTTP Threads"),l()()(),_(381,"app-file-autocomplete",85),b(),s(382,"div",13)(383,"mat-form-field",18)(384,"mat-select",86)(385,"mat-option",28),m(386,"on"),l(),s(387,"mat-option",29),m(388,"off"),l()(),b(),s(389,"mat-label"),m(390,"Prometheus Metrics"),l()(),s(391,"mat-form-field",18)(392,"mat-select",87)(393,"mat-option",28),m(394,"on"),l(),s(395,"mat-option",29),m(396,"off"),l()(),b(),s(397,"mat-label"),m(398,"Slots Endpoint"),l()(),s(399,"mat-form-field",18)(400,"mat-select",88)(401,"mat-option",28),m(402,"on"),l(),s(403,"mat-option",29),m(404,"off"),l()(),b(),s(405,"mat-label"),m(406,"Prompt Cache"),l()(),s(407,"mat-form-field",18),_(408,"input",89),b(),s(409,"mat-label"),m(410,"Cache Reuse"),l()()()(),s(411,"mat-expansion-panel")(412,"mat-expansion-panel-header")(413,"mat-panel-title"),m(414,"Reasoning"),l(),s(415,"mat-panel-description"),m(416,"Thinking/reasoning mode settings"),l()(),s(417,"div",13)(418,"mat-form-field",18)(419,"mat-select",90)(420,"mat-option",28),m(421,"on"),l(),s(422,"mat-option",29),m(423,"off"),l(),s(424,"mat-option",54),m(425,"auto"),l()(),b(),s(426,"mat-label"),m(427,"Reasoning"),l()(),s(428,"mat-form-field",18),_(429,"input",91),b(),s(430,"mat-label"),m(431,"Reasoning Budget"),l()(),s(432,"mat-form-field",18)(433,"mat-select",92)(434,"mat-option",54),m(435,"auto"),l(),s(436,"mat-option",23),m(437,"none (raw)"),l(),s(438,"mat-option",93),m(439,"deepseek"),l(),s(440,"mat-option",94),m(441,"deepseek-legacy"),l()(),b(),s(442,"mat-label"),m(443,"Reasoning Format"),l()()()(),s(444,"mat-expansion-panel")(445,"mat-expansion-panel-header")(446,"mat-panel-title"),m(447,"Additional"),l(),s(448,"mat-panel-description"),m(449,"Extra CLI flags and environment variables"),l()(),s(450,"mat-form-field",5),_(451,"textarea",95),b(),s(452,"mat-label"),m(453,"Extra CLI Flags (one per line)"),l()(),s(454,"mat-form-field",5),_(455,"textarea",96),b(),s(456,"mat-label"),m(457,"Environment variables (KEY=VALUE, one per line)"),l()()()()(),s(458,"mat-dialog-actions",97)(459,"button",98),A("click",function(){return n.cancel()}),m(460,"Cancel"),l(),s(461,"button",99),A("click",function(){return n.save()}),m(462),l()()),t&2){let a=Fe(16),r=Fe(123),u=Fe(366);c(),he("",n.isClone?"Clone":n.isEdit?"Edit":"Add"," llama-server service"),c(2),C("formGroup",n.form),c(),p("changed",n.isControlChanged("name")),c(),C("disabled",n.isEdit&&!n.isClone),y(),c(3),E(n.form.controls.name.errors?.required?8:n.form.controls.name.errors?.pattern?9:-1),c(2),p("changed",n.isControlChanged("command")),c(),C("matAutocomplete",a),y(),c(3),E(n.form.controls.command.errors?.required?14:-1),c(3),ue(n.filteredCommands()),c(2),p("has-changed",n.isSectionChanged("model","mmproj","alias")),c(4),C("existingPaths",n.existingModelPaths())("fieldClass",n.isControlChanged("model")?"changed":""),y(),c(),C("existingPaths",n.existingMmprojPaths())("fieldClass",n.isControlChanged("mmproj")?"changed":""),y(),c(),p("changed",n.isControlChanged("alias")),c(),y(),c(3),p("has-changed",n.isSectionChanged("nGpuLayers","device","tensorSplit","splitMode","mainGpu","fit","fitTarget","fitCtx","mlock","mmap","cpuMoe","nCpuMoe")),c(5),p("changed",n.isControlChanged("nGpuLayers")),c(),y(),c(3),p("changed",n.isControlChanged("device")),c(),y(),c(),ue(n.availableDevices()),c(5),p("changed",n.isControlChanged("splitMode")),c(),y(),c(11),p("changed",n.isControlChanged("tensorSplit")&&!n.isTensorSplitDisabled()),c(),C("disabled",n.isTensorSplitDisabled()),y(),c(3),p("changed",n.isControlChanged("mainGpu")),c(),y(),c(6),p("changed",n.isControlChanged("fit")),c(),y(),c(7),p("changed",n.isControlChanged("fitTarget")&&!n.isFitTargetDisabled()),c(),C("disabled",n.isFitTargetDisabled()),y(),c(3),p("changed",n.isControlChanged("fitCtx")&&!n.isFitTargetDisabled()),c(),C("disabled",n.isFitTargetDisabled()),y(),c(4),p("changed",n.isControlChanged("mlock")),c(),y(),c(7),p("changed",n.isControlChanged("mmap")),c(),y(),c(7),p("changed",n.isControlChanged("cpuMoe")),c(),y(),c(7),p("changed",n.isControlChanged("nCpuMoe")&&!n.isCpuMoeLayersDisabled()),c(),C("disabled",n.isCpuMoeLayersDisabled()),y(),c(3),p("has-changed",n.isSectionChanged("ctxSize","batchSize","ubatchSize","cacheTypeK","cacheTypeV","kvOffload","cacheRam","swaFull")),c(5),p("changed",n.isControlChanged("ctxSize")),c(),C("matAutocomplete",r),y(),c(5),ue(n.ctxPresets()),c(2),p("changed",n.isControlChanged("batchSize")),c(),y(),c(3),p("changed",n.isControlChanged("ubatchSize")),c(),y(),c(4),p("changed",n.isControlChanged("cacheTypeK")),c(),y(),c(),ue(n.kvCacheTypes),c(4),p("changed",n.isControlChanged("cacheTypeV")),c(),y(),c(),ue(n.kvCacheTypes),c(4),p("changed",n.isControlChanged("kvOffload")),c(),y(),c(8),p("changed",n.isControlChanged("cacheRam")),c(),y(),c(3),p("changed",n.isControlChanged("swaFull")),c(),y(),c(7),p("has-changed",n.isSectionChanged("ropeScaling","ropeScale","ropeFreqBase","ropeFreqScale","yarnOrigCtx","yarnExtFactor","yarnAttnFactor","yarnBetaSlow","yarnBetaFast")),c(5),p("changed",n.isControlChanged("ropeScaling")),c(),y(),c(9),p("changed",n.isControlChanged("ropeScale")&&!n.isRopeParamsDisabled()),c(),C("disabled",n.isRopeParamsDisabled()),y(),c(3),p("changed",n.isControlChanged("ropeFreqBase")&&!n.isRopeParamsDisabled()),c(),C("disabled",n.isRopeParamsDisabled()),y(),c(3),p("changed",n.isControlChanged("ropeFreqScale")&&!n.isRopeParamsDisabled()),c(),C("disabled",n.isRopeParamsDisabled()),y(),c(3),E(n.showYarnParams()?195:-1),c(),p("has-changed",n.isSectionChanged("threads","parallel","flashAttn","contBatching","contextShift","nPredict")),c(7),p("changed",n.isControlChanged("threads")),c(),y(),c(3),p("changed",n.isControlChanged("parallel")),c(),y(),c(3),p("changed",n.isControlChanged("nPredict")),c(),y(),c(4),p("changed",n.isControlChanged("flashAttn")),c(),y(),c(9),p("changed",n.isControlChanged("contBatching")),c(),y(),c(7),p("changed",n.isControlChanged("contextShift")),c(),y(),c(7),p("has-changed",n.isSectionChanged("temperature","seed","topK","topP","minP","typicalP","mirostat","dynatempRange","repeatLastN","repeatPenalty","presencePenalty","frequencyPenalty","dryMultiplier","dryBase")),c(9),p("changed",n.isControlChanged("temperature")),c(),y(),c(3),p("changed",n.isControlChanged("seed")),c(),y(),c(3),p("changed",n.isControlChanged("topK")&&!n.isMirostatEnabled()),c(),C("disabled",n.isMirostatEnabled()),y(),c(3),p("changed",n.isControlChanged("topP")&&!n.isMirostatEnabled()),c(),C("disabled",n.isMirostatEnabled()),y(),c(4),p("changed",n.isControlChanged("minP")),c(),y(),c(3),p("changed",n.isControlChanged("typicalP")&&!n.isMirostatEnabled()),c(),C("disabled",n.isMirostatEnabled()),y(),c(3),p("changed",n.isControlChanged("mirostat")),c(),y(),c(),C("value",0),c(2),C("value",1),c(2),C("value",2),c(4),p("changed",n.isControlChanged("dynatempRange")),c(),y(),c(6),p("changed",n.isControlChanged("repeatLastN")),c(),y(),c(3),p("changed",n.isControlChanged("repeatPenalty")),c(),y(),c(3),p("changed",n.isControlChanged("presencePenalty")),c(),y(),c(3),p("changed",n.isControlChanged("frequencyPenalty")),c(),y(),c(6),p("changed",n.isControlChanged("dryMultiplier")),c(),y(),c(3),p("changed",n.isControlChanged("dryBase")),c(),y(),c(3),p("has-changed",n.isSectionChanged("modelDraft","specDraftDevice","specDraftNMax","nGpuLayersDraft","specDraftCacheTypeK","specDraftCacheTypeV","specType","specNgramModNMin","specNgramModNMax","specNgramModNMatch","specNgramSimpleSizeN","specNgramSimpleSizeM","specNgramSimpleMinHits")),c(6),p("changed",n.isControlChanged("specType")),c(),y(),c(17),E(n.showDraftParams()?344:-1),c(),E(n.showNgramModParams()?345:-1),c(),E(n.showNgramSimpleParams()?346:-1),c(),p("has-changed",n.isSectionChanged("lora","loraScaled")),c(4),C("existingPaths",n.existingLoraPaths())("fieldClass",n.isControlChanged("lora")?"changed":""),y(),c(),p("changed",n.isControlChanged("loraScaled")),c(),y(),c(3),p("has-changed",n.isSectionChanged("host","port","timeout","threadsHttp","apiKeyFile","metrics","slots","cachePrompt","cacheReuse")),c(5),p("changed",n.isControlChanged("host")),c(),C("matAutocomplete",u),y(),c(5),ue(n.filteredHosts()),c(2),p("changed",n.isControlChanged("port")&&!n.isPortDisabled()),c(),C("disabled",n.isPortDisabled()),y(),c(3),p("changed",n.isControlChanged("timeout")),c(),y(),c(3),p("changed",n.isControlChanged("threadsHttp")),c(),y(),c(3),C("existingPaths",n.existingApiKeyPaths())("fieldClass",n.isControlChanged("apiKeyFile")?"changed":""),y(),c(2),p("changed",n.isControlChanged("metrics")),c(),y(),c(7),p("changed",n.isControlChanged("slots")),c(),y(),c(7),p("changed",n.isControlChanged("cachePrompt")),c(),y(),c(7),p("changed",n.isControlChanged("cacheReuse")&&!n.isCacheReuseDisabled()),c(),C("disabled",n.isCacheReuseDisabled()),y(),c(3),p("has-changed",n.isSectionChanged("reasoning","reasoningBudget","reasoningFormat")),c(7),p("changed",n.isControlChanged("reasoning")),c(),y(),c(9),p("changed",n.isControlChanged("reasoningBudget")&&!n.isReasoningParamsDisabled()),c(),C("disabled",n.isReasoningParamsDisabled()),y(),c(3),p("changed",n.isControlChanged("reasoningFormat")&&!n.isReasoningParamsDisabled()),c(),C("disabled",n.isReasoningParamsDisabled()),y(),c(11),p("has-changed",n.isSectionChanged("extraFlags","envText")),c(6),p("changed",n.isControlChanged("extraFlags")),c(),y(),c(3),p("changed",n.isControlChanged("envText")),c(),y(),c(6),C("disabled",n.form.invalid),c(),he(" ",n.isEdit&&!n.isClone?"Save":"Create"," ")}},dependencies:[ze,hn,Co,Ei,Ca,Ai,mn,pn,Ut,ji,xn,Cn,vt,Wi,Qe,it,Fo,Fs,Ua,Rs,Ps,Os,kt,St,Ot,fn,ti,ei,Lt,oi,ri,ai,Vo,Lo,Ns,Ga,kp],styles:['@charset "UTF-8";.llama-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;min-width:640px}.form-row[_ngcontent-%COMP%]{display:flex;gap:12px;margin-bottom:4px}.form-col[_ngcontent-%COMP%]{flex:1}.form-col-60[_ngcontent-%COMP%]{flex:3}.form-col-40[_ngcontent-%COMP%]{flex:2}.full-width[_ngcontent-%COMP%]{width:100%}.auto-path[_ngcontent-%COMP%]{font-family:monospace}.auto-from[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}.flags-textarea[_ngcontent-%COMP%], .env-textarea[_ngcontent-%COMP%]{overflow-x:auto}mat-dialog-content[_ngcontent-%COMP%]{padding-top:10px!important;max-height:80vh}mat-expansion-panel[_ngcontent-%COMP%]{margin-bottom:0}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}.subsection-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:#0009;margin:4px 0 14px;text-transform:uppercase;letter-spacing:.5px}.sub-section-hint[_ngcontent-%COMP%]{font-size:11px;color:#0006;margin-bottom:4px}mat-expansion-panel.has-changed[_ngcontent-%COMP%] mat-panel-title[_ngcontent-%COMP%]{font-weight:700}mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix input, mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix .mat-mdc-select{font-weight:700}']})}}return i})();function Bo(i,o){for(let e of i){let t=e.indexOf("=");if(t>0&&e.slice(0,t)===o)return e.slice(t+1);let n=e.indexOf(" ");if(n>0&&e.slice(0,n)===o)return e.slice(n+1).trim()}for(let e=0;e<i.length;e++)if(i[e]===o&&e+1<i.length)return i[e+1];return null}var Ry=(i,o)=>o.command,Oy=(i,o)=>o.label,Py=(i,o)=>o.value,Fy=(i,o)=>o.path;function Ny(i,o){i&1&&(s(0,"mat-error"),m(1,"Required"),l())}function Ly(i,o){i&1&&(s(0,"mat-error"),m(1,"Starts with letter, alphanumeric + hyphens/underscores, max 128 chars"),l())}function Vy(i,o){i&1&&(s(0,"mat-error"),m(1,"Required"),l())}function By(i,o){if(i&1&&(s(0,"mat-option",9)(1,"span",56),m(2),l(),s(3,"span",57),m(4),l()()),i&2){let e=o.$implicit;C("value",e.command),c(2),W(e.command),c(2),he("(",e.from,")")}}function zy(i,o){i&1&&(s(0,"mat-error"),m(1,"Required"),l())}function jy(i,o){if(i&1&&(s(0,"mat-option",9)(1,"span",56),m(2),l(),s(3,"span",57),m(4,"(existing config)"),l()()),i&2){let e=o.$implicit;C("value",e),c(2),W(e)}}function Hy(i,o){if(i&1&&(s(0,"mat-option",9),m(1),l()),i&2){let e=o.$implicit;C("value",e),c(),W(e)}}function Uy(i,o){if(i&1&&(s(0,"mat-option",9),m(1),l()),i&2){let e=o.$implicit;C("value",e),c(),W(e)}}function Gy(i,o){if(i&1&&(s(0,"mat-option",9),m(1),l()),i&2){let e=o.$implicit;C("value",e.label),c(),W(e.label)}}function $y(i,o){if(i&1&&(s(0,"mat-option",9),m(1),l()),i&2){let e=o.$implicit;C("value",e.value),c(),W(e.label)}}function Wy(i,o){if(i&1&&(s(0,"div",58),m(1,"Draft Model"),l(),s(2,"div",12)(3,"mat-form-field",59),_(4,"input",60),b(),s(5,"mat-label"),m(6,"Draft Model"),l()(),s(7,"mat-form-field",13),_(8,"input",61),b(),s(9,"mat-label"),m(10,"Draft TP Size"),l()(),s(11,"mat-form-field",13),_(12,"input",62),b(),s(13,"mat-label"),m(14,"Num Spec Tokens"),l()()()),i&2){let e=w();c(3),p("changed",e.isControlChanged("specDraftModel")),c(),y(),c(3),p("changed",e.isControlChanged("specDraftTensorParallelSize")),c(),y(),c(3),p("changed",e.isControlChanged("specNumDraftTokens")),c(),y()}}function qy(i,o){if(i&1&&(s(0,"mat-option",9),m(1),l()),i&2){let e=o.$implicit;C("value",e),c(),W(e||"(none)")}}function Ky(i,o){if(i&1&&(s(0,"mat-option",9),m(1),l()),i&2){let e=o.$implicit;C("value",e),c(),W(e||"(none)")}}function Yy(i,o){if(i&1&&(s(0,"mat-option",9)(1,"span",56),m(2),l(),s(3,"span",57),m(4),l()()),i&2){let e=o.$implicit;C("value",e.path),c(2),W(e.path),c(2),he("(",e.source,")")}}var k={host:"127.0.0.1",port:8e3,servedModelName:"",model:"",tokenizer:"",dtype:"auto",tensorParallelSize:1,pipelineParallelSize:1,maxParallelLoadingWorkers:0,gpuMemoryUtilization:.9,swapSpace:4,cpuOffloadGb:0,kvCacheMemory:0,device:"",attentionBackend:"",maxModelLen:0,maxNumSeqs:256,maxNumBatchedTokens:0,blockSize:0,enableChunkedPrefill:"auto",specMethod:"none",specTokens:0,specDraftModel:"",specDraftTensorParallelSize:0,specNumDraftTokens:0,temperature:1,topP:1,topK:-1,minP:0,seed:-1,repetitionPenalty:1,maxNumSeq:0,trustRemoteCode:!1,enableAutoToolChoice:!1,toolCallParser:"",reasoningParser:"",enablePrefixCaching:"auto",apiKey:"",extraFlags:"",envText:""};function Xy(i,o){let e=k[i];return e===void 0?!1:String(o)!==String(e)}var Zy="^[a-zA-Z][a-zA-Z0-9_-]{0,127}$",Qy=["auto","half","bfloat16","float","float16","float32"],Jy=["TRITON_ATTN","ROCM_ATTN","ROCM_SEGMENTED_ATTN","FLASH_ATTN","FLASHINFER","TRITON_MLA","FLASHMLA","FLEX_ATTENTION","TORCH_SDPA","TREE_ATTN","XFORMERS"],eC=[{value:"none",label:"none"},{value:"ngram",label:"ngram"},{value:"eagle",label:"eagle"},{value:"eagle3",label:"eagle3"},{value:"medusa",label:"medusa"},{value:"mlp_speculator",label:"mlp_speculator"},{value:"draft_model",label:"draft_model"},{value:"mtp",label:"mtp"},{value:"qwen3_5_mtp",label:"qwen3_5_mtp"},{value:"qwen3_next_mtp",label:"qwen3_next_mtp"},{value:"deepseek_mtp",label:"deepseek_mtp"}],tC=["","hermes","mistral","llama3_json","qwen3_xml","qwen25_tool_call","phi4_mini_json","pythonic","internlm","glm45","step3","minimax_m2"],iC=["","deepseek_r1","qwen3","granite","phi4_reasoning","glm45","step3","minimax_m2"],Ap=(()=>{class i{constructor(){this.fb=d(un),this.dialogRef=d(gt),this.data=d(Wn),this.serviceService=d(_t),this.cdr=d(te),this.destroyRef=d(Bt),this.isEdit=this.data.config!==null,this.isClone=this.data.clone===!0,this.dtypeOptions=Qy,this.attentionBackends=Jy,this.specMethods=eC,this.toolCallParsers=tC,this.reasoningParsers=iC,this.allExistingCommands=G(()=>{let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e)r.name!==t&&(n.has(r.command)||(n.add(r.command),a.push({command:r.command,from:r.name})));return a}),this._commandValue=I(this.data.config?.command??""),this.commandValue=this._commandValue.asReadonly(),this.filteredCommands=G(()=>{let e=this.commandValue()?.toLowerCase()??"";return this.allExistingCommands().filter(t=>t.command.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))}),this.form=this.fb.group({name:[this.data.config?.name??"",{validators:[st.required,st.pattern(Zy)]}],command:[this.data.config?.command??"",st.required],host:[k.host],port:[k.port],servedModelName:[k.servedModelName],model:[k.model],tokenizer:[k.tokenizer],dtype:[k.dtype],tensorParallelSize:[k.tensorParallelSize],pipelineParallelSize:[k.pipelineParallelSize],maxParallelLoadingWorkers:[k.maxParallelLoadingWorkers],gpuMemoryUtilization:[k.gpuMemoryUtilization],swapSpace:[k.swapSpace],cpuOffloadGb:[k.cpuOffloadGb],kvCacheMemory:[k.kvCacheMemory],device:[k.device],attentionBackend:[k.attentionBackend],maxModelLen:[""],maxNumSeqs:[k.maxNumSeqs],maxNumBatchedTokens:[k.maxNumBatchedTokens],blockSize:[k.blockSize],enableChunkedPrefill:[k.enableChunkedPrefill],specMethod:[k.specMethod],specTokens:[k.specTokens],specDraftModel:[k.specDraftModel],specDraftTensorParallelSize:[k.specDraftTensorParallelSize],specNumDraftTokens:[k.specNumDraftTokens],temperature:[k.temperature],topP:[k.topP],topK:[k.topK],minP:[k.minP],seed:[k.seed],repetitionPenalty:[k.repetitionPenalty],maxNumSeq:[k.maxNumSeq],trustRemoteCode:[k.trustRemoteCode],enableAutoToolChoice:[k.enableAutoToolChoice],toolCallParser:[k.toolCallParser],reasoningParser:[k.reasoningParser],enablePrefixCaching:[k.enablePrefixCaching],apiKey:[k.apiKey],extraFlags:[k.extraFlags],envText:[k.envText]}),this.filteredHosts=Yn(this.form.controls.host.valueChanges.pipe(qi(),Se(this.form.controls.host.value),Vt(250),xi(),We(e=>{let t=(e??"").trim();return t?this.serviceService.getLlamaAutocomplete("host",t).pipe(Kt(()=>ge([]))):ge([])})),{initialValue:[]}),this.existingModelPaths=G(()=>this.extractConfigModelPaths()),this.maxLenPresets=G(()=>$a.map(e=>({label:Sn(e,1)}))),this.formValue=Yn(this.form.valueChanges,{initialValue:this.form.value}),this.specMethodValue=G(()=>this.formValue()?.specMethod),this.showSpecDraftParams=G(()=>{let e=this.specMethodValue();return e!=="none"&&e!=="ngram"}),this.isToolCallParserDisabled=G(()=>!this.formValue()?.enableAutoToolChoice)}extractConfigModelPaths(){let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e){if(r.name===t||!r.flags)continue;let u=Bo(r.flags,"serve");u&&!n.has(u)&&(n.add(u),a.push(u))}return a}onMaxLenInput(){let e=Dn(this.form.get("maxModelLen")?.value??"");this.form.get("maxModelLen")?.setValue(Sn(e,1),{emitEvent:!1})}isControlChanged(e){let t=this.form.get(e)?.value;return e==="maxModelLen"?+Dn(t)!==k.maxModelLen:t!=null&&Xy(e,t)}isSectionChanged(...e){return e.some(t=>this.isControlChanged(t))}ngOnInit(){this.form.controls.command.valueChanges.pipe(qi(this.destroyRef)).subscribe(e=>this._commandValue.set(e)),this.data.config&&this.populateForm(this.data.config),this.form.valueChanges.pipe(qi(this.destroyRef)).subscribe(()=>{this.cdr.markForCheck()})}populateForm(e){let t=this.form.controls,n=e.flags,a=Bo(n,"serve")??"";if(t.model.setValue(a),t.host.setValue(si(n,"--host",k.host)),t.port.setValue(At(n,"--port",k.port)),t.servedModelName.setValue(si(n,"--served-model-name","")),t.tokenizer.setValue(si(n,"--tokenizer","")),t.dtype.setValue(si(n,"--dtype",k.dtype)),t.tensorParallelSize.setValue(At(n,"--tensor-parallel-size",k.tensorParallelSize)),t.pipelineParallelSize.setValue(At(n,"--pipeline-parallel-size",k.pipelineParallelSize)),t.maxParallelLoadingWorkers.setValue(At(n,"--max-parallel-loading-workers",k.maxParallelLoadingWorkers)),t.gpuMemoryUtilization.setValue(Xn(n,"--gpu-memory-utilization",k.gpuMemoryUtilization)),t.swapSpace.setValue(Xn(n,"--swap-space",k.swapSpace)),t.cpuOffloadGb.setValue(Xn(n,"--cpu-offload-gb",k.cpuOffloadGb)),t.kvCacheMemory.setValue(At(n,"--kv-cache-memory-bytes",k.kvCacheMemory)),t.device.setValue(si(n,"--device","")),t.attentionBackend.setValue(si(n,"--attention-backend",k.attentionBackend)),t.maxModelLen.setValue(Sn(At(n,"--max-model-len",k.maxModelLen),1)),t.maxNumSeqs.setValue(At(n,"--max-num-seqs",k.maxNumSeqs)),t.maxNumBatchedTokens.setValue(At(n,"--max-num-batched-tokens",k.maxNumBatchedTokens)),t.blockSize.setValue(At(n,"--block-size",k.blockSize)),t.enableChunkedPrefill.setValue(nC(n,"--enable-chunked-prefill","--no-enable-chunked-prefill",k.enableChunkedPrefill)),t.specMethod.setValue(si(n,"--spec-method",k.specMethod)),t.specTokens.setValue(At(n,"--spec-tokens",k.specTokens)),t.specDraftModel.setValue(si(n,"--spec-draft-model","")),t.specDraftTensorParallelSize.setValue(At(n,"--spec-draft-tensor-parallel-size",k.specDraftTensorParallelSize)),t.specNumDraftTokens.setValue(At(n,"--num-spec-tokens",k.specNumDraftTokens)),t.temperature.setValue(Xn(n,"--temperature",k.temperature)),t.topP.setValue(Xn(n,"--top-p",k.topP)),t.topK.setValue(At(n,"--top-k",k.topK)),t.minP.setValue(Xn(n,"--min-p",k.minP)),t.seed.setValue(At(n,"--seed",k.seed)),t.repetitionPenalty.setValue(Xn(n,"--repetition-penalty",k.repetitionPenalty)),t.maxNumSeq.setValue(At(n,"--max-num-seq",k.maxNumSeq)),t.trustRemoteCode.setValue(n.some(r=>r.split(/\s|=/)[0]==="--trust-remote-code")),t.enableAutoToolChoice.setValue(n.some(r=>r.split(/\s|=/)[0]==="--enable-auto-tool-choice")),t.toolCallParser.setValue(si(n,"--tool-call-parser","")),t.reasoningParser.setValue(si(n,"--reasoning-parser","")),t.enablePrefixCaching.setValue(si(n,"--enable-prefix-caching",k.enablePrefixCaching)),t.apiKey.setValue(si(n,"--api-key","")),t.extraFlags.setValue(this.extractExtraFlags(n).join(`
5590
+ HSA_OVERRIDE_GFX_VERSION=11.0.0`,"matTooltip","Environment variables for the service process (KEY=VALUE, one per line)",1,"env-textarea"],["align","end"],["mat-stroked-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"auto-path"],[1,"auto-from"],["matInput","","formControlName","yarnOrigCtx","type","number","matTooltip","YaRN: original context size of model. 0 = model training context size"],["matInput","","formControlName","yarnExtFactor","type","number","matTooltip","YaRN: extrapolation mix factor. -1 = default, 0.0 = full interpolation"],["matInput","","formControlName","yarnAttnFactor","type","number","matTooltip","YaRN: scale sqrt(t) or attention magnitude. -1 = default"],["matInput","","formControlName","yarnBetaSlow","type","number","matTooltip","YaRN: high correction dim (alpha). -1 = default"],["matInput","","formControlName","yarnBetaFast","type","number","matTooltip","YaRN: low correction dim (beta). -1 = default"],["formControlName","modelDraft","label","Draft Model Path","placeholder","/path/to/draft-model.gguf",3,"existingPaths","fieldClass"],["formControlName","specDraftDevice","multiple","","placeholder","Select GPU devices for draft model","matTooltip","Devices for offloading the draft model. Same options as main --device"],["matInput","","formControlName","specDraftNMax","type","number","matTooltip","Max number of tokens to draft for speculative decoding. Default: 3"],["matInput","","formControlName","nGpuLayersDraft","type","number","matTooltip","Max draft model layers to store in VRAM. 999 = all layers"],["formControlName","specDraftCacheTypeK","matTooltip","KV cache data type for K for the draft model"],["formControlName","specDraftCacheTypeV","matTooltip","KV cache data type for V for the draft model"],["matInput","","formControlName","specNgramModNMin","type","number","matTooltip","Min number of ngram tokens for ngram-mod speculative decoding. Default: 48"],["matInput","","formControlName","specNgramModNMax","type","number","matTooltip","Max number of ngram tokens for ngram-mod speculative decoding. Default: 64"],["matInput","","formControlName","specNgramModNMatch","type","number","matTooltip","Ngram-mod lookup length. Default: 24"],["matInput","","formControlName","specNgramSimpleSizeN","type","number","matTooltip","Ngram size N for ngram-simple: length of lookup n-gram. Default: 12"],["matInput","","formControlName","specNgramSimpleSizeM","type","number","matTooltip","Ngram size M for ngram-simple: length of draft m-gram. Default: 48"],["matInput","","formControlName","specNgramSimpleMinHits","type","number","matTooltip","Minimum hits for ngram-simple speculative decoding. Default: 1"]],template:function(t,n){if(t&1&&(s(0,"h2",3),m(1),l(),s(2,"mat-dialog-content")(3,"form",4)(4,"mat-form-field",5),_(5,"input",6),b(),s(6,"mat-label"),m(7,"Service Name"),l(),k(8,py,2,0,"mat-error")(9,fy,2,0,"mat-error"),l(),s(10,"mat-form-field",5),_(11,"input",7),b(),s(12,"mat-label"),m(13,"Binary Path"),l(),k(14,gy,2,0,"mat-error"),l(),s(15,"mat-autocomplete",null,0),ue(17,_y,5,3,"mat-option",8,uy),l(),s(19,"mat-expansion-panel",9)(20,"mat-expansion-panel-header")(21,"mat-panel-title"),m(22,"Model"),l()(),_(23,"app-file-autocomplete",10),b(),_(24,"app-file-autocomplete",11),b(),s(25,"mat-form-field",5),_(26,"input",12),b(),s(27,"mat-label"),m(28,"Model Alias"),l()()(),s(29,"mat-expansion-panel",9)(30,"mat-expansion-panel-header")(31,"mat-panel-title"),m(32,"GPU & Memory"),l()(),s(33,"div",13)(34,"mat-form-field",14),_(35,"input",15),b(),s(36,"mat-label"),m(37,"GPU Layers"),l()(),s(38,"mat-form-field",16)(39,"mat-select",17),ue(40,vy,2,2,"mat-option",8,$c),l(),b(),s(42,"mat-label"),m(43,"Device (multi-select)"),l()()(),s(44,"div",13)(45,"mat-form-field",18)(46,"mat-select",19)(47,"mat-option",20),m(48,"layer (pipelined)"),l(),s(49,"mat-option",21),m(50,"row (parallelized)"),l(),s(51,"mat-option",22),m(52,"tensor (experimental)"),l(),s(53,"mat-option",23),m(54,"none (single GPU)"),l()(),b(),s(55,"mat-label"),m(56,"Split Mode"),l()(),s(57,"mat-form-field",18),_(58,"input",24),b(),s(59,"mat-label"),m(60,"Tensor Split"),l()(),s(61,"mat-form-field",18),_(62,"input",25),b(),s(63,"mat-label"),m(64,"Main GPU"),l()()(),s(65,"div",26),m(66,"Memory"),l(),s(67,"div",13)(68,"mat-form-field",18)(69,"mat-select",27)(70,"mat-option",28),m(71,"on"),l(),s(72,"mat-option",29),m(73,"off"),l()(),b(),s(74,"mat-label"),m(75,"Fit to VRAM"),l()(),s(76,"mat-form-field",18),_(77,"input",30),b(),s(78,"mat-label"),m(79,"Fit Target (MiB)"),l()(),s(80,"mat-form-field",18),_(81,"input",31),b(),s(82,"mat-label"),m(83,"Fit Min Ctx"),l()()(),s(84,"div",13)(85,"mat-form-field",18)(86,"mat-select",32)(87,"mat-option",28),m(88,"on"),l(),s(89,"mat-option",29),m(90,"off"),l()(),b(),s(91,"mat-label"),m(92,"mlock (pin RAM)"),l()(),s(93,"mat-form-field",18)(94,"mat-select",33)(95,"mat-option",28),m(96,"on"),l(),s(97,"mat-option",29),m(98,"off"),l()(),b(),s(99,"mat-label"),m(100,"mmap"),l()(),s(101,"mat-form-field",18)(102,"mat-select",34)(103,"mat-option",28),m(104,"on"),l(),s(105,"mat-option",29),m(106,"off"),l()(),b(),s(107,"mat-label"),m(108,"CPU MoE"),l()(),s(109,"mat-form-field",18),_(110,"input",35),b(),s(111,"mat-label"),m(112,"N CPU MoE Layers"),l()()()(),s(113,"mat-expansion-panel")(114,"mat-expansion-panel-header")(115,"mat-panel-title"),m(116,"Context & KV Cache"),l()(),s(117,"div",13)(118,"mat-form-field",18)(119,"input",36),E("blur",function(r){return n.onCtxSizeInput(r)})("keyup.enter",function(r){return n.onCtxSizeInput(r)}),l(),b(),s(120,"mat-label"),m(121,"Context Size"),l()(),s(122,"mat-autocomplete",null,1),ue(124,by,2,2,"mat-option",8,hy),l(),s(126,"mat-form-field",18),_(127,"input",37),b(),s(128,"mat-label"),m(129,"Batch Size"),l()(),s(130,"mat-form-field",18),_(131,"input",38),b(),s(132,"mat-label"),m(133,"Ubatch Size"),l()()(),s(134,"div",13)(135,"mat-form-field",18)(136,"mat-select",39),ue(137,yy,2,2,"mat-option",8,St),l(),b(),s(139,"mat-label"),m(140,"KV Cache Type K"),l()(),s(141,"mat-form-field",18)(142,"mat-select",40),ue(143,Cy,2,2,"mat-option",8,St),l(),b(),s(145,"mat-label"),m(146,"KV Cache Type V"),l()(),s(147,"mat-form-field",18)(148,"mat-select",41)(149,"mat-option",28),m(150,"on"),l(),s(151,"mat-option",29),m(152,"off"),l()(),b(),s(153,"mat-label"),m(154,"KV Offload"),l()()(),s(155,"div",13)(156,"mat-form-field",18),_(157,"input",42),b(),s(158,"mat-label"),m(159,"Cache RAM (MiB)"),l()(),s(160,"mat-form-field",18)(161,"mat-select",43)(162,"mat-option",28),m(163,"on"),l(),s(164,"mat-option",29),m(165,"off"),l()(),b(),s(166,"mat-label"),m(167,"Full SWA Cache"),l()()()(),s(168,"mat-expansion-panel")(169,"mat-expansion-panel-header")(170,"mat-panel-title"),m(171,"RoPE Scaling"),l()(),s(172,"div",13)(173,"mat-form-field",18)(174,"mat-select",44)(175,"mat-option",23),m(176,"none"),l(),s(177,"mat-option",45),m(178,"linear"),l(),s(179,"mat-option",46),m(180,"yarn"),l()(),b(),s(181,"mat-label"),m(182,"Scaling Method"),l()(),s(183,"mat-form-field",18),_(184,"input",47),b(),s(185,"mat-label"),m(186,"Scale Factor"),l()(),s(187,"mat-form-field",18),_(188,"input",48),b(),s(189,"mat-label"),m(190,"Freq Base"),l()(),s(191,"mat-form-field",18),_(192,"input",49),b(),s(193,"mat-label"),m(194,"Freq Scale"),l()()(),k(195,xy,23,10),l(),s(196,"mat-expansion-panel")(197,"mat-expansion-panel-header")(198,"mat-panel-title"),m(199,"Generation"),l(),s(200,"mat-panel-description"),m(201,"Runtime and batching defaults"),l()(),s(202,"div",13)(203,"mat-form-field",18),_(204,"input",50),b(),s(205,"mat-label"),m(206,"Threads"),l()(),s(207,"mat-form-field",18),_(208,"input",51),b(),s(209,"mat-label"),m(210,"Parallel Slots"),l()(),s(211,"mat-form-field",18),_(212,"input",52),b(),s(213,"mat-label"),m(214,"Max Tokens (n-predict)"),l()()(),s(215,"div",13)(216,"mat-form-field",18)(217,"mat-select",53)(218,"mat-option",28),m(219,"on"),l(),s(220,"mat-option",29),m(221,"off"),l(),s(222,"mat-option",54),m(223,"auto"),l()(),b(),s(224,"mat-label"),m(225,"Flash Attention"),l()(),s(226,"mat-form-field",18)(227,"mat-select",55)(228,"mat-option",28),m(229,"on"),l(),s(230,"mat-option",29),m(231,"off"),l()(),b(),s(232,"mat-label"),m(233,"Cont. Batching"),l()(),s(234,"mat-form-field",18)(235,"mat-select",56)(236,"mat-option",28),m(237,"on"),l(),s(238,"mat-option",29),m(239,"off"),l()(),b(),s(240,"mat-label"),m(241,"Context Shift"),l()()()(),s(242,"mat-expansion-panel")(243,"mat-expansion-panel-header")(244,"mat-panel-title"),m(245,"Sampling Defaults"),l(),s(246,"mat-panel-description"),m(247,"Default sampling parameters for generation"),l()(),s(248,"div",26),m(249,"Core"),l(),s(250,"div",13)(251,"mat-form-field",18),_(252,"input",57),b(),s(253,"mat-label"),m(254,"Temperature"),l()(),s(255,"mat-form-field",18),_(256,"input",58),b(),s(257,"mat-label"),m(258,"Seed"),l()(),s(259,"mat-form-field",18),_(260,"input",59),b(),s(261,"mat-label"),m(262,"Top-K"),l()(),s(263,"mat-form-field",18),_(264,"input",60),b(),s(265,"mat-label"),m(266,"Top-P"),l()()(),s(267,"div",13)(268,"mat-form-field",18),_(269,"input",61),b(),s(270,"mat-label"),m(271,"Min-P"),l()(),s(272,"mat-form-field",18),_(273,"input",62),b(),s(274,"mat-label"),m(275,"Typical-P"),l()(),s(276,"mat-form-field",18)(277,"mat-select",63)(278,"mat-option",8),m(279,"disabled"),l(),s(280,"mat-option",8),m(281,"Mirostat"),l(),s(282,"mat-option",8),m(283,"Mirostat 2.0"),l()(),b(),s(284,"mat-label"),m(285,"Mirostat"),l()(),s(286,"mat-form-field",18),_(287,"input",64),b(),s(288,"mat-label"),m(289,"Dyn. Temp Range"),l()()(),s(290,"div",26),m(291,"Penalties"),l(),s(292,"div",13)(293,"mat-form-field",18),_(294,"input",65),b(),s(295,"mat-label"),m(296,"Repeat Last N"),l()(),s(297,"mat-form-field",18),_(298,"input",66),b(),s(299,"mat-label"),m(300,"Repeat Penalty"),l()(),s(301,"mat-form-field",18),_(302,"input",67),b(),s(303,"mat-label"),m(304,"Presence Penalty"),l()(),s(305,"mat-form-field",18),_(306,"input",68),b(),s(307,"mat-label"),m(308,"Frequency Penalty"),l()()(),s(309,"div",26),m(310,"DRY Sampling"),l(),s(311,"div",13)(312,"mat-form-field",18),_(313,"input",69),b(),s(314,"mat-label"),m(315,"DRY Multiplier"),l()(),s(316,"mat-form-field",18),_(317,"input",70),b(),s(318,"mat-label"),m(319,"DRY Base"),l()()()(),s(320,"mat-expansion-panel")(321,"mat-expansion-panel-header")(322,"mat-panel-title"),m(323,"Speculative Decoding"),l(),s(324,"mat-panel-description"),m(325,"Draft model and speculative decoding options"),l()(),s(326,"mat-form-field",71)(327,"mat-select",72)(328,"mat-option",23),m(329,"none"),l(),s(330,"mat-option",73),m(331,"draft-simple"),l(),s(332,"mat-option",74),m(333,"draft-eagle3"),l(),s(334,"mat-option",75),m(335,"draft-mtp"),l(),s(336,"mat-option",76),m(337,"ngram-simple"),l(),s(338,"mat-option",77),m(339,"ngram-mod"),l(),s(340,"mat-option",78),m(341,"draft-mtp,ngram-mod"),l()(),b(),s(342,"mat-label"),m(343,"Spec Type"),l()(),k(344,ky,32,12),k(345,My,15,6),k(346,Ey,15,6),l(),s(347,"mat-expansion-panel")(348,"mat-expansion-panel-header")(349,"mat-panel-title"),m(350,"LoRA & Adapters"),l()(),_(351,"app-file-autocomplete",79),b(),s(352,"mat-form-field",5),_(353,"input",80),b(),s(354,"mat-label"),m(355,"LoRA Scaled"),l()()(),s(356,"mat-expansion-panel")(357,"mat-expansion-panel-header")(358,"mat-panel-title"),m(359,"Server & Network"),l()(),s(360,"div",13)(361,"mat-form-field",18),_(362,"input",81),b(),s(363,"mat-label"),m(364,"Host"),l()(),s(365,"mat-autocomplete",null,2),ue(367,Ay,5,3,"mat-option",8,$c),l(),s(369,"mat-form-field",18),_(370,"input",82),b(),s(371,"mat-label"),m(372,"Port"),l()(),s(373,"mat-form-field",18),_(374,"input",83),b(),s(375,"mat-label"),m(376,"Timeout (s)"),l()(),s(377,"mat-form-field",18),_(378,"input",84),b(),s(379,"mat-label"),m(380,"HTTP Threads"),l()()(),_(381,"app-file-autocomplete",85),b(),s(382,"div",13)(383,"mat-form-field",18)(384,"mat-select",86)(385,"mat-option",28),m(386,"on"),l(),s(387,"mat-option",29),m(388,"off"),l()(),b(),s(389,"mat-label"),m(390,"Prometheus Metrics"),l()(),s(391,"mat-form-field",18)(392,"mat-select",87)(393,"mat-option",28),m(394,"on"),l(),s(395,"mat-option",29),m(396,"off"),l()(),b(),s(397,"mat-label"),m(398,"Slots Endpoint"),l()(),s(399,"mat-form-field",18)(400,"mat-select",88)(401,"mat-option",28),m(402,"on"),l(),s(403,"mat-option",29),m(404,"off"),l()(),b(),s(405,"mat-label"),m(406,"Prompt Cache"),l()(),s(407,"mat-form-field",18),_(408,"input",89),b(),s(409,"mat-label"),m(410,"Cache Reuse"),l()()()(),s(411,"mat-expansion-panel")(412,"mat-expansion-panel-header")(413,"mat-panel-title"),m(414,"Reasoning"),l(),s(415,"mat-panel-description"),m(416,"Thinking/reasoning mode settings"),l()(),s(417,"div",13)(418,"mat-form-field",18)(419,"mat-select",90)(420,"mat-option",28),m(421,"on"),l(),s(422,"mat-option",29),m(423,"off"),l(),s(424,"mat-option",54),m(425,"auto"),l()(),b(),s(426,"mat-label"),m(427,"Reasoning"),l()(),s(428,"mat-form-field",18),_(429,"input",91),b(),s(430,"mat-label"),m(431,"Reasoning Budget"),l()(),s(432,"mat-form-field",18)(433,"mat-select",92)(434,"mat-option",54),m(435,"auto"),l(),s(436,"mat-option",23),m(437,"none (raw)"),l(),s(438,"mat-option",93),m(439,"deepseek"),l(),s(440,"mat-option",94),m(441,"deepseek-legacy"),l()(),b(),s(442,"mat-label"),m(443,"Reasoning Format"),l()()()(),s(444,"mat-expansion-panel")(445,"mat-expansion-panel-header")(446,"mat-panel-title"),m(447,"Additional"),l(),s(448,"mat-panel-description"),m(449,"Extra CLI flags and environment variables"),l()(),s(450,"mat-form-field",5),_(451,"textarea",95),b(),s(452,"mat-label"),m(453,"Extra CLI Flags (one per line)"),l()(),s(454,"mat-form-field",5),_(455,"textarea",96),b(),s(456,"mat-label"),m(457,"Environment variables (KEY=VALUE, one per line)"),l()()()()(),s(458,"mat-dialog-actions",97)(459,"button",98),E("click",function(){return n.cancel()}),m(460,"Cancel"),l(),s(461,"button",99),E("click",function(){return n.save()}),m(462),l()()),t&2){let a=Le(16),r=Le(123),u=Le(366);c(),pe("",n.isClone?"Clone":n.isEdit?"Edit":"Add"," llama-server service"),c(2),x("formGroup",n.form),c(),p("changed",n.isControlChanged("name")),c(),x("disabled",n.isEdit&&!n.isClone),y(),c(3),M(n.form.controls.name.errors?.required?8:n.form.controls.name.errors?.pattern?9:-1),c(2),p("changed",n.isControlChanged("command")),c(),x("matAutocomplete",a),y(),c(3),M(n.form.controls.command.errors?.required?14:-1),c(3),he(n.filteredCommands()),c(2),p("has-changed",n.isSectionChanged("model","mmproj","alias")),c(4),x("existingPaths",n.existingModelPaths())("fieldClass",n.isControlChanged("model")?"changed":""),y(),c(),x("existingPaths",n.existingMmprojPaths())("fieldClass",n.isControlChanged("mmproj")?"changed":""),y(),c(),p("changed",n.isControlChanged("alias")),c(),y(),c(3),p("has-changed",n.isSectionChanged("nGpuLayers","device","tensorSplit","splitMode","mainGpu","fit","fitTarget","fitCtx","mlock","mmap","cpuMoe","nCpuMoe")),c(5),p("changed",n.isControlChanged("nGpuLayers")),c(),y(),c(3),p("changed",n.isControlChanged("device")),c(),y(),c(),he(n.availableDevices()),c(5),p("changed",n.isControlChanged("splitMode")),c(),y(),c(11),p("changed",n.isControlChanged("tensorSplit")&&!n.isTensorSplitDisabled()),c(),x("disabled",n.isTensorSplitDisabled()),y(),c(3),p("changed",n.isControlChanged("mainGpu")),c(),y(),c(6),p("changed",n.isControlChanged("fit")),c(),y(),c(7),p("changed",n.isControlChanged("fitTarget")&&!n.isFitTargetDisabled()),c(),x("disabled",n.isFitTargetDisabled()),y(),c(3),p("changed",n.isControlChanged("fitCtx")&&!n.isFitTargetDisabled()),c(),x("disabled",n.isFitTargetDisabled()),y(),c(4),p("changed",n.isControlChanged("mlock")),c(),y(),c(7),p("changed",n.isControlChanged("mmap")),c(),y(),c(7),p("changed",n.isControlChanged("cpuMoe")),c(),y(),c(7),p("changed",n.isControlChanged("nCpuMoe")&&!n.isCpuMoeLayersDisabled()),c(),x("disabled",n.isCpuMoeLayersDisabled()),y(),c(3),p("has-changed",n.isSectionChanged("ctxSize","batchSize","ubatchSize","cacheTypeK","cacheTypeV","kvOffload","cacheRam","swaFull")),c(5),p("changed",n.isControlChanged("ctxSize")),c(),x("matAutocomplete",r),y(),c(5),he(n.ctxPresets()),c(2),p("changed",n.isControlChanged("batchSize")),c(),y(),c(3),p("changed",n.isControlChanged("ubatchSize")),c(),y(),c(4),p("changed",n.isControlChanged("cacheTypeK")),c(),y(),c(),he(n.kvCacheTypes),c(4),p("changed",n.isControlChanged("cacheTypeV")),c(),y(),c(),he(n.kvCacheTypes),c(4),p("changed",n.isControlChanged("kvOffload")),c(),y(),c(8),p("changed",n.isControlChanged("cacheRam")),c(),y(),c(3),p("changed",n.isControlChanged("swaFull")),c(),y(),c(7),p("has-changed",n.isSectionChanged("ropeScaling","ropeScale","ropeFreqBase","ropeFreqScale","yarnOrigCtx","yarnExtFactor","yarnAttnFactor","yarnBetaSlow","yarnBetaFast")),c(5),p("changed",n.isControlChanged("ropeScaling")),c(),y(),c(9),p("changed",n.isControlChanged("ropeScale")&&!n.isRopeParamsDisabled()),c(),x("disabled",n.isRopeParamsDisabled()),y(),c(3),p("changed",n.isControlChanged("ropeFreqBase")&&!n.isRopeParamsDisabled()),c(),x("disabled",n.isRopeParamsDisabled()),y(),c(3),p("changed",n.isControlChanged("ropeFreqScale")&&!n.isRopeParamsDisabled()),c(),x("disabled",n.isRopeParamsDisabled()),y(),c(3),M(n.showYarnParams()?195:-1),c(),p("has-changed",n.isSectionChanged("threads","parallel","flashAttn","contBatching","contextShift","nPredict")),c(7),p("changed",n.isControlChanged("threads")),c(),y(),c(3),p("changed",n.isControlChanged("parallel")),c(),y(),c(3),p("changed",n.isControlChanged("nPredict")),c(),y(),c(4),p("changed",n.isControlChanged("flashAttn")),c(),y(),c(9),p("changed",n.isControlChanged("contBatching")),c(),y(),c(7),p("changed",n.isControlChanged("contextShift")),c(),y(),c(7),p("has-changed",n.isSectionChanged("temperature","seed","topK","topP","minP","typicalP","mirostat","dynatempRange","repeatLastN","repeatPenalty","presencePenalty","frequencyPenalty","dryMultiplier","dryBase")),c(9),p("changed",n.isControlChanged("temperature")),c(),y(),c(3),p("changed",n.isControlChanged("seed")),c(),y(),c(3),p("changed",n.isControlChanged("topK")&&!n.isMirostatEnabled()),c(),x("disabled",n.isMirostatEnabled()),y(),c(3),p("changed",n.isControlChanged("topP")&&!n.isMirostatEnabled()),c(),x("disabled",n.isMirostatEnabled()),y(),c(4),p("changed",n.isControlChanged("minP")),c(),y(),c(3),p("changed",n.isControlChanged("typicalP")&&!n.isMirostatEnabled()),c(),x("disabled",n.isMirostatEnabled()),y(),c(3),p("changed",n.isControlChanged("mirostat")),c(),y(),c(),x("value",0),c(2),x("value",1),c(2),x("value",2),c(4),p("changed",n.isControlChanged("dynatempRange")),c(),y(),c(6),p("changed",n.isControlChanged("repeatLastN")),c(),y(),c(3),p("changed",n.isControlChanged("repeatPenalty")),c(),y(),c(3),p("changed",n.isControlChanged("presencePenalty")),c(),y(),c(3),p("changed",n.isControlChanged("frequencyPenalty")),c(),y(),c(6),p("changed",n.isControlChanged("dryMultiplier")),c(),y(),c(3),p("changed",n.isControlChanged("dryBase")),c(),y(),c(3),p("has-changed",n.isSectionChanged("modelDraft","specDraftDevice","specDraftNMax","nGpuLayersDraft","specDraftCacheTypeK","specDraftCacheTypeV","specType","specNgramModNMin","specNgramModNMax","specNgramModNMatch","specNgramSimpleSizeN","specNgramSimpleSizeM","specNgramSimpleMinHits")),c(6),p("changed",n.isControlChanged("specType")),c(),y(),c(17),M(n.showDraftParams()?344:-1),c(),M(n.showNgramModParams()?345:-1),c(),M(n.showNgramSimpleParams()?346:-1),c(),p("has-changed",n.isSectionChanged("lora","loraScaled")),c(4),x("existingPaths",n.existingLoraPaths())("fieldClass",n.isControlChanged("lora")?"changed":""),y(),c(),p("changed",n.isControlChanged("loraScaled")),c(),y(),c(3),p("has-changed",n.isSectionChanged("host","port","timeout","threadsHttp","apiKeyFile","metrics","slots","cachePrompt","cacheReuse")),c(5),p("changed",n.isControlChanged("host")),c(),x("matAutocomplete",u),y(),c(5),he(n.filteredHosts()),c(2),p("changed",n.isControlChanged("port")&&!n.isPortDisabled()),c(),x("disabled",n.isPortDisabled()),y(),c(3),p("changed",n.isControlChanged("timeout")),c(),y(),c(3),p("changed",n.isControlChanged("threadsHttp")),c(),y(),c(3),x("existingPaths",n.existingApiKeyPaths())("fieldClass",n.isControlChanged("apiKeyFile")?"changed":""),y(),c(2),p("changed",n.isControlChanged("metrics")),c(),y(),c(7),p("changed",n.isControlChanged("slots")),c(),y(),c(7),p("changed",n.isControlChanged("cachePrompt")),c(),y(),c(7),p("changed",n.isControlChanged("cacheReuse")&&!n.isCacheReuseDisabled()),c(),x("disabled",n.isCacheReuseDisabled()),y(),c(3),p("has-changed",n.isSectionChanged("reasoning","reasoningBudget","reasoningFormat")),c(7),p("changed",n.isControlChanged("reasoning")),c(),y(),c(9),p("changed",n.isControlChanged("reasoningBudget")&&!n.isReasoningParamsDisabled()),c(),x("disabled",n.isReasoningParamsDisabled()),y(),c(3),p("changed",n.isControlChanged("reasoningFormat")&&!n.isReasoningParamsDisabled()),c(),x("disabled",n.isReasoningParamsDisabled()),y(),c(11),p("has-changed",n.isSectionChanged("extraFlags","envText")),c(6),p("changed",n.isControlChanged("extraFlags")),c(),y(),c(3),p("changed",n.isControlChanged("envText")),c(),y(),c(6),x("disabled",n.form.invalid),c(),pe(" ",n.isEdit&&!n.isClone?"Save":"Create"," ")}},dependencies:[Pe,pn,xo,Ri,xa,Oi,un,fn,Wt,Gi,Dn,wn,Ct,Ki,Ke,Xe,Fo,Fs,Ga,Rs,Ps,Os,At,Et,Lt,gn,oi,ni,bt,Bt,zt,si,Vo,Lo,Ns,$a,Mp],styles:['@charset "UTF-8";.llama-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;min-width:640px}.form-row[_ngcontent-%COMP%]{display:flex;gap:12px;margin-bottom:4px}.form-col[_ngcontent-%COMP%]{flex:1}.form-col-60[_ngcontent-%COMP%]{flex:3}.form-col-40[_ngcontent-%COMP%]{flex:2}.full-width[_ngcontent-%COMP%]{width:100%}.auto-path[_ngcontent-%COMP%]{font-family:monospace}.auto-from[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}.flags-textarea[_ngcontent-%COMP%], .env-textarea[_ngcontent-%COMP%]{overflow-x:auto}mat-dialog-content[_ngcontent-%COMP%]{padding-top:10px!important;max-height:80vh}mat-expansion-panel[_ngcontent-%COMP%]{margin-bottom:0}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}.subsection-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:#0009;margin:4px 0 14px;text-transform:uppercase;letter-spacing:.5px}.sub-section-hint[_ngcontent-%COMP%]{font-size:11px;color:#0006;margin-bottom:4px}mat-expansion-panel.has-changed[_ngcontent-%COMP%] mat-panel-title[_ngcontent-%COMP%]{font-weight:700}mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix input, mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix .mat-mdc-select{font-weight:700}']})}}return i})();function Bo(i,o){for(let e of i){let t=e.indexOf("=");if(t>0&&e.slice(0,t)===o)return e.slice(t+1);let n=e.indexOf(" ");if(n>0&&e.slice(0,n)===o)return e.slice(n+1).trim()}for(let e=0;e<i.length;e++)if(i[e]===o&&e+1<i.length)return i[e+1];return null}var Py=(i,o)=>o.command,Fy=(i,o)=>o.label,Ny=(i,o)=>o.value,Ly=(i,o)=>o.path;function Vy(i,o){i&1&&(s(0,"mat-error"),m(1,"Required"),l())}function By(i,o){i&1&&(s(0,"mat-error"),m(1,"Starts with letter, alphanumeric + hyphens/underscores, max 128 chars"),l())}function zy(i,o){i&1&&(s(0,"mat-error"),m(1,"Required"),l())}function jy(i,o){if(i&1&&(s(0,"mat-option",9)(1,"span",56),m(2),l(),s(3,"span",57),m(4),l()()),i&2){let e=o.$implicit;x("value",e.command),c(2),B(e.command),c(2),pe("(",e.from,")")}}function Hy(i,o){i&1&&(s(0,"mat-error"),m(1,"Required"),l())}function Uy(i,o){if(i&1&&(s(0,"mat-option",9)(1,"span",56),m(2),l(),s(3,"span",57),m(4,"(existing config)"),l()()),i&2){let e=o.$implicit;x("value",e),c(2),B(e)}}function Gy(i,o){if(i&1&&(s(0,"mat-option",9),m(1),l()),i&2){let e=o.$implicit;x("value",e),c(),B(e)}}function $y(i,o){if(i&1&&(s(0,"mat-option",9),m(1),l()),i&2){let e=o.$implicit;x("value",e),c(),B(e)}}function Wy(i,o){if(i&1&&(s(0,"mat-option",9),m(1),l()),i&2){let e=o.$implicit;x("value",e.label),c(),B(e.label)}}function qy(i,o){if(i&1&&(s(0,"mat-option",9),m(1),l()),i&2){let e=o.$implicit;x("value",e.value),c(),B(e.label)}}function Ky(i,o){if(i&1&&(s(0,"div",58),m(1,"Draft Model"),l(),s(2,"div",12)(3,"mat-form-field",59),_(4,"input",60),b(),s(5,"mat-label"),m(6,"Draft Model"),l()(),s(7,"mat-form-field",13),_(8,"input",61),b(),s(9,"mat-label"),m(10,"Draft TP Size"),l()(),s(11,"mat-form-field",13),_(12,"input",62),b(),s(13,"mat-label"),m(14,"Num Spec Tokens"),l()()()),i&2){let e=C();c(3),p("changed",e.isControlChanged("specDraftModel")),c(),y(),c(3),p("changed",e.isControlChanged("specDraftTensorParallelSize")),c(),y(),c(3),p("changed",e.isControlChanged("specNumDraftTokens")),c(),y()}}function Yy(i,o){if(i&1&&(s(0,"mat-option",9),m(1),l()),i&2){let e=o.$implicit;x("value",e),c(),B(e||"(none)")}}function Xy(i,o){if(i&1&&(s(0,"mat-option",9),m(1),l()),i&2){let e=o.$implicit;x("value",e),c(),B(e||"(none)")}}function Zy(i,o){if(i&1&&(s(0,"mat-option",9)(1,"span",56),m(2),l(),s(3,"span",57),m(4),l()()),i&2){let e=o.$implicit;x("value",e.path),c(2),B(e.path),c(2),pe("(",e.source,")")}}var A={host:"127.0.0.1",port:8e3,servedModelName:"",model:"",tokenizer:"",dtype:"auto",tensorParallelSize:1,pipelineParallelSize:1,maxParallelLoadingWorkers:0,gpuMemoryUtilization:.9,swapSpace:4,cpuOffloadGb:0,kvCacheMemory:0,device:"",attentionBackend:"",maxModelLen:0,maxNumSeqs:256,maxNumBatchedTokens:0,blockSize:0,enableChunkedPrefill:"auto",specMethod:"none",specTokens:0,specDraftModel:"",specDraftTensorParallelSize:0,specNumDraftTokens:0,temperature:1,topP:1,topK:-1,minP:0,seed:-1,repetitionPenalty:1,maxNumSeq:0,trustRemoteCode:!1,enableAutoToolChoice:!1,toolCallParser:"",reasoningParser:"",enablePrefixCaching:"auto",apiKey:"",extraFlags:"",envText:""};function Qy(i,o){let e=A[i];return e===void 0?!1:String(o)!==String(e)}var Jy="^[a-zA-Z][a-zA-Z0-9_-]{0,127}$",eC=["auto","half","bfloat16","float","float16","float32"],tC=["TRITON_ATTN","ROCM_ATTN","ROCM_SEGMENTED_ATTN","FLASH_ATTN","FLASHINFER","TRITON_MLA","FLASHMLA","FLEX_ATTENTION","TORCH_SDPA","TREE_ATTN","XFORMERS"],iC=[{value:"none",label:"none"},{value:"ngram",label:"ngram"},{value:"eagle",label:"eagle"},{value:"eagle3",label:"eagle3"},{value:"medusa",label:"medusa"},{value:"mlp_speculator",label:"mlp_speculator"},{value:"draft_model",label:"draft_model"},{value:"mtp",label:"mtp"},{value:"qwen3_5_mtp",label:"qwen3_5_mtp"},{value:"qwen3_next_mtp",label:"qwen3_next_mtp"},{value:"deepseek_mtp",label:"deepseek_mtp"}],nC=["","hermes","mistral","llama3_json","qwen3_xml","qwen25_tool_call","phi4_mini_json","pythonic","internlm","glm45","step3","minimax_m2"],oC=["","deepseek_r1","qwen3","granite","phi4_reasoning","glm45","step3","minimax_m2"],Tp=(()=>{class i{constructor(){this.fb=d(hn),this.dialogRef=d(ut),this.data=d(Wn),this.serviceService=d(yt),this.cdr=d(ie),this.destroyRef=d(Ht),this.isEdit=this.data.config!==null,this.isClone=this.data.clone===!0,this.dtypeOptions=eC,this.attentionBackends=tC,this.specMethods=iC,this.toolCallParsers=nC,this.reasoningParsers=oC,this.allExistingCommands=$(()=>{let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e)r.name!==t&&(n.has(r.command)||(n.add(r.command),a.push({command:r.command,from:r.name})));return a}),this._commandValue=T(this.data.config?.command??""),this.commandValue=this._commandValue.asReadonly(),this.filteredCommands=$(()=>{let e=this.commandValue()?.toLowerCase()??"";return this.allExistingCommands().filter(t=>t.command.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))}),this.form=this.fb.group({name:[this.data.config?.name??"",{validators:[st.required,st.pattern(Jy)]}],command:[this.data.config?.command??"",st.required],host:[A.host],port:[A.port],servedModelName:[A.servedModelName],model:[A.model],tokenizer:[A.tokenizer],dtype:[A.dtype],tensorParallelSize:[A.tensorParallelSize],pipelineParallelSize:[A.pipelineParallelSize],maxParallelLoadingWorkers:[A.maxParallelLoadingWorkers],gpuMemoryUtilization:[A.gpuMemoryUtilization],swapSpace:[A.swapSpace],cpuOffloadGb:[A.cpuOffloadGb],kvCacheMemory:[A.kvCacheMemory],device:[A.device],attentionBackend:[A.attentionBackend],maxModelLen:[""],maxNumSeqs:[A.maxNumSeqs],maxNumBatchedTokens:[A.maxNumBatchedTokens],blockSize:[A.blockSize],enableChunkedPrefill:[A.enableChunkedPrefill],specMethod:[A.specMethod],specTokens:[A.specTokens],specDraftModel:[A.specDraftModel],specDraftTensorParallelSize:[A.specDraftTensorParallelSize],specNumDraftTokens:[A.specNumDraftTokens],temperature:[A.temperature],topP:[A.topP],topK:[A.topK],minP:[A.minP],seed:[A.seed],repetitionPenalty:[A.repetitionPenalty],maxNumSeq:[A.maxNumSeq],trustRemoteCode:[A.trustRemoteCode],enableAutoToolChoice:[A.enableAutoToolChoice],toolCallParser:[A.toolCallParser],reasoningParser:[A.reasoningParser],enablePrefixCaching:[A.enablePrefixCaching],apiKey:[A.apiKey],extraFlags:[A.extraFlags],envText:[A.envText]}),this.filteredHosts=Xn(this.form.controls.host.valueChanges.pipe(Yi(),Me(this.form.controls.host.value),jt(250),Si(),We(e=>{let t=(e??"").trim();return t?this.serviceService.getLlamaAutocomplete("host",t).pipe(Zt(()=>be([]))):be([])})),{initialValue:[]}),this.existingModelPaths=$(()=>this.extractConfigModelPaths()),this.maxLenPresets=$(()=>Wa.map(e=>({label:Mn(e,1)}))),this.formValue=Xn(this.form.valueChanges,{initialValue:this.form.value}),this.specMethodValue=$(()=>this.formValue()?.specMethod),this.showSpecDraftParams=$(()=>{let e=this.specMethodValue();return e!=="none"&&e!=="ngram"}),this.isToolCallParserDisabled=$(()=>!this.formValue()?.enableAutoToolChoice)}extractConfigModelPaths(){let e=this.data.allConfigs??[],t=this.data.config?.name??null,n=new Set,a=[];for(let r of e){if(r.name===t||!r.flags)continue;let u=Bo(r.flags,"serve");u&&!n.has(u)&&(n.add(u),a.push(u))}return a}onMaxLenInput(){let e=kn(this.form.get("maxModelLen")?.value??"");this.form.get("maxModelLen")?.setValue(Mn(e,1),{emitEvent:!1})}isControlChanged(e){let t=this.form.get(e)?.value;return e==="maxModelLen"?+kn(t)!==A.maxModelLen:t!=null&&Qy(e,t)}isSectionChanged(...e){return e.some(t=>this.isControlChanged(t))}ngOnInit(){this.form.controls.command.valueChanges.pipe(Yi(this.destroyRef)).subscribe(e=>this._commandValue.set(e)),this.data.config&&this.populateForm(this.data.config),this.form.valueChanges.pipe(Yi(this.destroyRef)).subscribe(()=>{this.cdr.markForCheck()})}populateForm(e){let t=this.form.controls,n=e.flags,a=Bo(n,"serve")??"";if(t.model.setValue(a),t.host.setValue(li(n,"--host",A.host)),t.port.setValue(Rt(n,"--port",A.port)),t.servedModelName.setValue(li(n,"--served-model-name","")),t.tokenizer.setValue(li(n,"--tokenizer","")),t.dtype.setValue(li(n,"--dtype",A.dtype)),t.tensorParallelSize.setValue(Rt(n,"--tensor-parallel-size",A.tensorParallelSize)),t.pipelineParallelSize.setValue(Rt(n,"--pipeline-parallel-size",A.pipelineParallelSize)),t.maxParallelLoadingWorkers.setValue(Rt(n,"--max-parallel-loading-workers",A.maxParallelLoadingWorkers)),t.gpuMemoryUtilization.setValue(Zn(n,"--gpu-memory-utilization",A.gpuMemoryUtilization)),t.swapSpace.setValue(Zn(n,"--swap-space",A.swapSpace)),t.cpuOffloadGb.setValue(Zn(n,"--cpu-offload-gb",A.cpuOffloadGb)),t.kvCacheMemory.setValue(Rt(n,"--kv-cache-memory-bytes",A.kvCacheMemory)),t.device.setValue(li(n,"--device","")),t.attentionBackend.setValue(li(n,"--attention-backend",A.attentionBackend)),t.maxModelLen.setValue(Mn(Rt(n,"--max-model-len",A.maxModelLen),1)),t.maxNumSeqs.setValue(Rt(n,"--max-num-seqs",A.maxNumSeqs)),t.maxNumBatchedTokens.setValue(Rt(n,"--max-num-batched-tokens",A.maxNumBatchedTokens)),t.blockSize.setValue(Rt(n,"--block-size",A.blockSize)),t.enableChunkedPrefill.setValue(aC(n,"--enable-chunked-prefill","--no-enable-chunked-prefill",A.enableChunkedPrefill)),t.specMethod.setValue(li(n,"--spec-method",A.specMethod)),t.specTokens.setValue(Rt(n,"--spec-tokens",A.specTokens)),t.specDraftModel.setValue(li(n,"--spec-draft-model","")),t.specDraftTensorParallelSize.setValue(Rt(n,"--spec-draft-tensor-parallel-size",A.specDraftTensorParallelSize)),t.specNumDraftTokens.setValue(Rt(n,"--num-spec-tokens",A.specNumDraftTokens)),t.temperature.setValue(Zn(n,"--temperature",A.temperature)),t.topP.setValue(Zn(n,"--top-p",A.topP)),t.topK.setValue(Rt(n,"--top-k",A.topK)),t.minP.setValue(Zn(n,"--min-p",A.minP)),t.seed.setValue(Rt(n,"--seed",A.seed)),t.repetitionPenalty.setValue(Zn(n,"--repetition-penalty",A.repetitionPenalty)),t.maxNumSeq.setValue(Rt(n,"--max-num-seq",A.maxNumSeq)),t.trustRemoteCode.setValue(n.some(r=>r.split(/\s|=/)[0]==="--trust-remote-code")),t.enableAutoToolChoice.setValue(n.some(r=>r.split(/\s|=/)[0]==="--enable-auto-tool-choice")),t.toolCallParser.setValue(li(n,"--tool-call-parser","")),t.reasoningParser.setValue(li(n,"--reasoning-parser","")),t.enablePrefixCaching.setValue(li(n,"--enable-prefix-caching",A.enablePrefixCaching)),t.apiKey.setValue(li(n,"--api-key","")),t.extraFlags.setValue(this.extractExtraFlags(n).join(`
5591
5591
  `)),e.environment){let r=Object.entries(e.environment).map(([u,h])=>`${u}=${h}`).join(`
5592
5592
  `);r&&t.envText.setValue(r+`
5593
- `)}}extractExtraFlags(e){let t=new Set(["--host","--port","--served-model-name","--tokenizer","--dtype","--tensor-parallel-size","--pipeline-parallel-size","--max-parallel-loading-workers","--gpu-memory-utilization","--swap-space","--cpu-offload-gb","--kv-cache-memory-bytes","--device","--attention-backend","--max-model-len","--max-num-seqs","--max-num-batched-tokens","--block-size","--enable-chunked-prefill","--no-enable-chunked-prefill","--spec-method","--spec-tokens","--spec-draft-model","--spec-draft-tensor-parallel-size","--num-spec-tokens","--temperature","--top-p","--top-k","--min-p","--seed","--repetition-penalty","--max-num-seq","--trust-remote-code","--enable-auto-tool-choice","--tool-call-parser","--reasoning-parser","--enable-prefix-caching","--api-key"]),n=[];for(let a of e){let r=a.split(/\s|=/)[0];a.startsWith("--")&&!t.has(r)&&n.push(a)}return n}addIf(e,t,n,a){String(n)!==String(a)&&e.push(`${t} ${n}`)}addTri(e,t,n){t==="on"?e.push(n):t==="off"&&e.push(`--no-${n.slice(2)}`)}buildFlags(){let e=[],t=this.form.controls,n=(t.model.value??"").trim();n&&e.push(`serve ${n}`),this.addIf(e,"--served-model-name",(t.servedModelName.value??"").trim(),k.servedModelName),this.addIf(e,"--host",t.host.value,k.host),this.addIf(e,"--port",t.port.value,k.port),this.addIf(e,"--tokenizer",(t.tokenizer.value??"").trim(),k.tokenizer),this.addIf(e,"--dtype",t.dtype.value,k.dtype),this.addIf(e,"--tensor-parallel-size",t.tensorParallelSize.value,k.tensorParallelSize),this.addIf(e,"--pipeline-parallel-size",t.pipelineParallelSize.value,k.pipelineParallelSize),this.addIf(e,"--max-parallel-loading-workers",t.maxParallelLoadingWorkers.value,k.maxParallelLoadingWorkers),this.addIf(e,"--swap-space",t.swapSpace.value,k.swapSpace),this.addIf(e,"--cpu-offload-gb",t.cpuOffloadGb.value,k.cpuOffloadGb),this.addIf(e,"--device",(t.device.value??"").trim(),k.device),this.addIf(e,"--max-model-len",+Dn(t.maxModelLen.value??""),k.maxModelLen),this.addIf(e,"--max-num-seqs",t.maxNumSeqs.value,k.maxNumSeqs),this.addIf(e,"--block-size",t.blockSize.value,k.blockSize);let a=t.specMethod.value;a&&a!==k.specMethod&&(e.push(`--spec-method ${a}`),this.addIf(e,"--spec-tokens",t.specTokens.value,k.specTokens),this.showSpecDraftParams()&&(this.addIf(e,"--spec-draft-model",(t.specDraftModel.value??"").trim(),k.specDraftModel),this.addIf(e,"--spec-draft-tensor-parallel-size",t.specDraftTensorParallelSize.value,k.specDraftTensorParallelSize),this.addIf(e,"--num-spec-tokens",t.specNumDraftTokens.value,k.specNumDraftTokens))),this.addIf(e,"--gpu-memory-utilization",t.gpuMemoryUtilization.value,k.gpuMemoryUtilization),t.trustRemoteCode.value&&e.push("--trust-remote-code"),t.enableAutoToolChoice.value&&e.push("--enable-auto-tool-choice"),this.addIf(e,"--tool-call-parser",t.toolCallParser.value,k.toolCallParser),this.addIf(e,"--reasoning-parser",t.reasoningParser.value,k.reasoningParser),this.addTri(e,t.enableChunkedPrefill.value,"--enable-chunked-prefill"),this.addIf(e,"--attention-backend",t.attentionBackend.value,k.attentionBackend),this.addIf(e,"--max-num-batched-tokens",t.maxNumBatchedTokens.value,k.maxNumBatchedTokens),String(t.kvCacheMemory.value)!==String(k.kvCacheMemory)&&e.push(`--kv-cache-memory-bytes=${t.kvCacheMemory.value}`),this.addIf(e,"--temperature",t.temperature.value,k.temperature),this.addIf(e,"--top-p",t.topP.value,k.topP),this.addIf(e,"--top-k",t.topK.value,k.topK),this.addIf(e,"--min-p",t.minP.value,k.minP),this.addIf(e,"--seed",t.seed.value,k.seed),this.addIf(e,"--repetition-penalty",t.repetitionPenalty.value,k.repetitionPenalty),this.addIf(e,"--max-num-seq",t.maxNumSeq.value,k.maxNumSeq),this.addIf(e,"--enable-prefix-caching",t.enablePrefixCaching.value,k.enablePrefixCaching),this.addIf(e,"--api-key",(t.apiKey.value??"").trim(),k.apiKey);for(let r of t.extraFlags.value.split(`
5593
+ `)}}extractExtraFlags(e){let t=new Set(["--host","--port","--served-model-name","--tokenizer","--dtype","--tensor-parallel-size","--pipeline-parallel-size","--max-parallel-loading-workers","--gpu-memory-utilization","--swap-space","--cpu-offload-gb","--kv-cache-memory-bytes","--device","--attention-backend","--max-model-len","--max-num-seqs","--max-num-batched-tokens","--block-size","--enable-chunked-prefill","--no-enable-chunked-prefill","--spec-method","--spec-tokens","--spec-draft-model","--spec-draft-tensor-parallel-size","--num-spec-tokens","--temperature","--top-p","--top-k","--min-p","--seed","--repetition-penalty","--max-num-seq","--trust-remote-code","--enable-auto-tool-choice","--tool-call-parser","--reasoning-parser","--enable-prefix-caching","--api-key"]),n=[];for(let a of e){let r=a.split(/\s|=/)[0];a.startsWith("--")&&!t.has(r)&&n.push(a)}return n}addIf(e,t,n,a){String(n)!==String(a)&&e.push(`${t} ${n}`)}addTri(e,t,n){t==="on"?e.push(n):t==="off"&&e.push(`--no-${n.slice(2)}`)}buildFlags(){let e=[],t=this.form.controls,n=(t.model.value??"").trim();n&&e.push(`serve ${n}`),this.addIf(e,"--served-model-name",(t.servedModelName.value??"").trim(),A.servedModelName),this.addIf(e,"--host",t.host.value,A.host),this.addIf(e,"--port",t.port.value,A.port),this.addIf(e,"--tokenizer",(t.tokenizer.value??"").trim(),A.tokenizer),this.addIf(e,"--dtype",t.dtype.value,A.dtype),this.addIf(e,"--tensor-parallel-size",t.tensorParallelSize.value,A.tensorParallelSize),this.addIf(e,"--pipeline-parallel-size",t.pipelineParallelSize.value,A.pipelineParallelSize),this.addIf(e,"--max-parallel-loading-workers",t.maxParallelLoadingWorkers.value,A.maxParallelLoadingWorkers),this.addIf(e,"--swap-space",t.swapSpace.value,A.swapSpace),this.addIf(e,"--cpu-offload-gb",t.cpuOffloadGb.value,A.cpuOffloadGb),this.addIf(e,"--device",(t.device.value??"").trim(),A.device),this.addIf(e,"--max-model-len",+kn(t.maxModelLen.value??""),A.maxModelLen),this.addIf(e,"--max-num-seqs",t.maxNumSeqs.value,A.maxNumSeqs),this.addIf(e,"--block-size",t.blockSize.value,A.blockSize);let a=t.specMethod.value;a&&a!==A.specMethod&&(e.push(`--spec-method ${a}`),this.addIf(e,"--spec-tokens",t.specTokens.value,A.specTokens),this.showSpecDraftParams()&&(this.addIf(e,"--spec-draft-model",(t.specDraftModel.value??"").trim(),A.specDraftModel),this.addIf(e,"--spec-draft-tensor-parallel-size",t.specDraftTensorParallelSize.value,A.specDraftTensorParallelSize),this.addIf(e,"--num-spec-tokens",t.specNumDraftTokens.value,A.specNumDraftTokens))),this.addIf(e,"--gpu-memory-utilization",t.gpuMemoryUtilization.value,A.gpuMemoryUtilization),t.trustRemoteCode.value&&e.push("--trust-remote-code"),t.enableAutoToolChoice.value&&e.push("--enable-auto-tool-choice"),this.addIf(e,"--tool-call-parser",t.toolCallParser.value,A.toolCallParser),this.addIf(e,"--reasoning-parser",t.reasoningParser.value,A.reasoningParser),this.addTri(e,t.enableChunkedPrefill.value,"--enable-chunked-prefill"),this.addIf(e,"--attention-backend",t.attentionBackend.value,A.attentionBackend),this.addIf(e,"--max-num-batched-tokens",t.maxNumBatchedTokens.value,A.maxNumBatchedTokens),String(t.kvCacheMemory.value)!==String(A.kvCacheMemory)&&e.push(`--kv-cache-memory-bytes=${t.kvCacheMemory.value}`),this.addIf(e,"--temperature",t.temperature.value,A.temperature),this.addIf(e,"--top-p",t.topP.value,A.topP),this.addIf(e,"--top-k",t.topK.value,A.topK),this.addIf(e,"--min-p",t.minP.value,A.minP),this.addIf(e,"--seed",t.seed.value,A.seed),this.addIf(e,"--repetition-penalty",t.repetitionPenalty.value,A.repetitionPenalty),this.addIf(e,"--max-num-seq",t.maxNumSeq.value,A.maxNumSeq),this.addIf(e,"--enable-prefix-caching",t.enablePrefixCaching.value,A.enablePrefixCaching),this.addIf(e,"--api-key",(t.apiKey.value??"").trim(),A.apiKey);for(let r of t.extraFlags.value.split(`
5594
5594
  `)){let u=r.trim();u&&u.startsWith("--")&&e.push(u)}return e}parseEnvironment(){let e={};for(let t of this.form.controls.envText.value.split(`
5595
- `)){let n=t.trim();if(!n||n.startsWith("#"))continue;let a=n.indexOf("=");a<=0||(e[n.slice(0,a).trim()]=n.slice(a+1))}return e}save(){if(this.form.invalid)return;let e=this.parseEnvironment(),t=V({name:this.form.controls.name.value.trim(),type:"vllm",command:this.form.controls.command.value.trim(),flags:this.buildFlags()},Object.keys(e).length?{environment:e}:{});this.dialogRef.close(t)}cancel(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=T({type:i,selectors:[["app-vllm-dialog"]],decls:254,vars:106,consts:[["commandAuto","matAutocomplete"],["modelAuto","matAutocomplete"],["maxLenAuto","matAutocomplete"],["hostAuto","matAutocomplete"],["mat-dialog-title",""],[1,"vllm-form",3,"formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","name","placeholder","e.g. vllm-qwen-bf16-4gpu",3,"disabled"],["matInput","","formControlName","command","placeholder","/path/to/vllm/run.sh",3,"matAutocomplete"],[3,"value"],["expanded",""],["matInput","","formControlName","model","placeholder","unsloth/Qwen3.8-27B or /path/to/model","matTooltip","Model to serve. HF repo id or local path. Passed as the positional argument to 'vllm serve'",3,"matAutocomplete"],[1,"form-row"],["appearance","outline",1,"form-col"],["matInput","","formControlName","tokenizer","type","text","matTooltip","Tokenizer path (HF repo id or local). Defaults to the model path"],["formControlName","dtype","matTooltip","Data type for model weights and activations"],["matInput","","formControlName","tensorParallelSize","type","number","matTooltip","Number of tensor-parallel replicas (GPUs sharding each model copy). 1 = single GPU"],["matInput","","formControlName","pipelineParallelSize","type","number","matTooltip","Number of pipeline-parallel replicas (model split in stages across GPU groups)"],["matInput","","formControlName","maxParallelLoadingWorkers","type","number","matTooltip","Max number of parallel workers for safetensors loading. 0 = default"],["matInput","","formControlName","gpuMemoryUtilization","type","number","step","0.05","min","0","max","1","matTooltip","Fraction of GPU memory to reserve for the model and KV cache (0.0\u20131.0)"],["matInput","","formControlName","swapSpace","type","number","matTooltip","CPU offload space per GPU (GiB)"],["matInput","","formControlName","cpuOffloadGb","type","number","matTooltip","Space to offload model weights to CPU (GiB). 0 = disabled"],["matInput","","formControlName","device","type","text","placeholder","auto","matTooltip","Device(s) for vLLM execution, e.g. 'auto', 'cuda:0,1' or 'rocm'"],["formControlName","attentionBackend","matTooltip","Attention kernel backend override. TRITON_ATTN is the tested choice on ROCm (4x RX 7900 XTX). Empty = auto"],["value",""],["matInput","","formControlName","kvCacheMemory","type","number","matTooltip","Explicit KV cache size in bytes. 0 = auto (derived from GPU memory utilization)"],["matInput","","formControlName","maxModelLen","type","text","placeholder","e.g. 24K, 262144","matTooltip","Model context length. Supports: 20000, 20K. Empty = model's max. Large values need more KV cache",3,"blur","keyup.enter","matAutocomplete"],["matInput","","formControlName","maxNumSeqs","type","number","matTooltip","Maximum number of sequences per iteration (concurrent requests)"],["formControlName","enableChunkedPrefill","matTooltip","Split long prompts into chunks for continuous batching. auto = decided by vLLM"],["value","auto"],["value","on"],["value","off"],["matInput","","formControlName","maxNumBatchedTokens","type","number","matTooltip","Max number of tokens per batch (prefill+decode budget). 0 = default"],["matInput","","formControlName","blockSize","type","number","matTooltip","Token block size for the paged KV cache. 0 = default (platform-specific)"],["formControlName","specMethod","matTooltip","Speculative decoding method. draft-model variants use a separate draft model"],["matInput","","formControlName","specTokens","type","number","matTooltip","Number of speculative tokens (proposal length). 0 = method default"],["matInput","","formControlName","temperature","type","number","matTooltip","Default temperature. 1.0 = default"],["matInput","","formControlName","topP","type","number","step","0.05","matTooltip","Nucleus sampling. 1.0 = default"],["matInput","","formControlName","topK","type","number","matTooltip","Top-K sampling. -1 = disabled (default)"],["matInput","","formControlName","minP","type","number","step","0.05","matTooltip","Min-P sampling threshold. 0.0 = disabled (default)"],["matInput","","formControlName","seed","type","number","matTooltip","RNG seed. -1 = random (default)"],["matInput","","formControlName","repetitionPenalty","type","number","step","0.05","matTooltip","Penalty for repeating tokens. 1.0 = disabled (default)"],["matInput","","formControlName","maxNumSeq","type","number","matTooltip","Maximum number of tokens per sequence. 0 = model default"],["formControlName","trustRemoteCode"],["formControlName","enableAutoToolChoice"],["formControlName","toolCallParser","matTooltip","Parser for tool calls. Requires --enable-auto-tool-choice",3,"disabled"],["formControlName","reasoningParser","matTooltip","Parser separating reasoning content from final content in chat completions"],["formControlName","enablePrefixCaching","matTooltip","Cache prefixes of prompts to speed up repeated requests. auto = decided by vLLM"],["matInput","","formControlName","host","type","text","matTooltip","IP address to listen (default: 127.0.0.1)",3,"matAutocomplete"],["matInput","","formControlName","port","type","number","matTooltip","Port to listen (default: 8000)"],["matInput","","formControlName","apiKey","type","text","matTooltip","API key for authentication. Leave empty if the launcher adds it itself (e.g. run.sh reads keys.ini)"],["matInput","","formControlName","extraFlags","rows","4","wrap","off","placeholder",`--enforce-eager
5595
+ `)){let n=t.trim();if(!n||n.startsWith("#"))continue;let a=n.indexOf("=");a<=0||(e[n.slice(0,a).trim()]=n.slice(a+1))}return e}save(){if(this.form.invalid)return;let e=this.parseEnvironment(),t=V({name:this.form.controls.name.value.trim(),type:"vllm",command:this.form.controls.command.value.trim(),flags:this.buildFlags()},Object.keys(e).length?{environment:e}:{});this.dialogRef.close(t)}cancel(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=I({type:i,selectors:[["app-vllm-dialog"]],decls:254,vars:106,consts:[["commandAuto","matAutocomplete"],["modelAuto","matAutocomplete"],["maxLenAuto","matAutocomplete"],["hostAuto","matAutocomplete"],["mat-dialog-title",""],[1,"vllm-form",3,"formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","name","placeholder","e.g. vllm-qwen-bf16-4gpu",3,"disabled"],["matInput","","formControlName","command","placeholder","/path/to/vllm/run.sh",3,"matAutocomplete"],[3,"value"],["expanded",""],["matInput","","formControlName","model","placeholder","unsloth/Qwen3.8-27B or /path/to/model","matTooltip","Model to serve. HF repo id or local path. Passed as the positional argument to 'vllm serve'",3,"matAutocomplete"],[1,"form-row"],["appearance","outline",1,"form-col"],["matInput","","formControlName","tokenizer","type","text","matTooltip","Tokenizer path (HF repo id or local). Defaults to the model path"],["formControlName","dtype","matTooltip","Data type for model weights and activations"],["matInput","","formControlName","tensorParallelSize","type","number","matTooltip","Number of tensor-parallel replicas (GPUs sharding each model copy). 1 = single GPU"],["matInput","","formControlName","pipelineParallelSize","type","number","matTooltip","Number of pipeline-parallel replicas (model split in stages across GPU groups)"],["matInput","","formControlName","maxParallelLoadingWorkers","type","number","matTooltip","Max number of parallel workers for safetensors loading. 0 = default"],["matInput","","formControlName","gpuMemoryUtilization","type","number","step","0.05","min","0","max","1","matTooltip","Fraction of GPU memory to reserve for the model and KV cache (0.0\u20131.0)"],["matInput","","formControlName","swapSpace","type","number","matTooltip","CPU offload space per GPU (GiB)"],["matInput","","formControlName","cpuOffloadGb","type","number","matTooltip","Space to offload model weights to CPU (GiB). 0 = disabled"],["matInput","","formControlName","device","type","text","placeholder","auto","matTooltip","Device(s) for vLLM execution, e.g. 'auto', 'cuda:0,1' or 'rocm'"],["formControlName","attentionBackend","matTooltip","Attention kernel backend override. TRITON_ATTN is the tested choice on ROCm (4x RX 7900 XTX). Empty = auto"],["value",""],["matInput","","formControlName","kvCacheMemory","type","number","matTooltip","Explicit KV cache size in bytes. 0 = auto (derived from GPU memory utilization)"],["matInput","","formControlName","maxModelLen","type","text","placeholder","e.g. 24K, 262144","matTooltip","Model context length. Supports: 20000, 20K. Empty = model's max. Large values need more KV cache",3,"blur","keyup.enter","matAutocomplete"],["matInput","","formControlName","maxNumSeqs","type","number","matTooltip","Maximum number of sequences per iteration (concurrent requests)"],["formControlName","enableChunkedPrefill","matTooltip","Split long prompts into chunks for continuous batching. auto = decided by vLLM"],["value","auto"],["value","on"],["value","off"],["matInput","","formControlName","maxNumBatchedTokens","type","number","matTooltip","Max number of tokens per batch (prefill+decode budget). 0 = default"],["matInput","","formControlName","blockSize","type","number","matTooltip","Token block size for the paged KV cache. 0 = default (platform-specific)"],["formControlName","specMethod","matTooltip","Speculative decoding method. draft-model variants use a separate draft model"],["matInput","","formControlName","specTokens","type","number","matTooltip","Number of speculative tokens (proposal length). 0 = method default"],["matInput","","formControlName","temperature","type","number","matTooltip","Default temperature. 1.0 = default"],["matInput","","formControlName","topP","type","number","step","0.05","matTooltip","Nucleus sampling. 1.0 = default"],["matInput","","formControlName","topK","type","number","matTooltip","Top-K sampling. -1 = disabled (default)"],["matInput","","formControlName","minP","type","number","step","0.05","matTooltip","Min-P sampling threshold. 0.0 = disabled (default)"],["matInput","","formControlName","seed","type","number","matTooltip","RNG seed. -1 = random (default)"],["matInput","","formControlName","repetitionPenalty","type","number","step","0.05","matTooltip","Penalty for repeating tokens. 1.0 = disabled (default)"],["matInput","","formControlName","maxNumSeq","type","number","matTooltip","Maximum number of tokens per sequence. 0 = model default"],["formControlName","trustRemoteCode"],["formControlName","enableAutoToolChoice"],["formControlName","toolCallParser","matTooltip","Parser for tool calls. Requires --enable-auto-tool-choice",3,"disabled"],["formControlName","reasoningParser","matTooltip","Parser separating reasoning content from final content in chat completions"],["formControlName","enablePrefixCaching","matTooltip","Cache prefixes of prompts to speed up repeated requests. auto = decided by vLLM"],["matInput","","formControlName","host","type","text","matTooltip","IP address to listen (default: 127.0.0.1)",3,"matAutocomplete"],["matInput","","formControlName","port","type","number","matTooltip","Port to listen (default: 8000)"],["matInput","","formControlName","apiKey","type","text","matTooltip","API key for authentication. Leave empty if the launcher adds it itself (e.g. run.sh reads keys.ini)"],["matInput","","formControlName","extraFlags","rows","4","wrap","off","placeholder",`--enforce-eager
5596
5596
  --disable-log-requests`,"matTooltip","Any vLLM flags not covered by the fields above (one per line). Pass-through \u2014 not validated",1,"flags-textarea"],["matInput","","formControlName","envText","rows","4","wrap","off","placeholder",`HF_TOKEN=hf_xxx
5597
- HIP_VISIBLE_DEVICES=0,1,2,3`,"matTooltip","Environment variables for the service process (KEY=VALUE, one per line)",1,"env-textarea"],["align","end"],["mat-stroked-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"auto-path"],[1,"auto-from"],[1,"subsection-label"],["appearance","outline",1,"form-col-60"],["matInput","","formControlName","specDraftModel","type","text","placeholder","/path/to/draft-model or HF repo id","matTooltip","Draft model for speculative decoding (draft-model methods)"],["matInput","","formControlName","specDraftTensorParallelSize","type","number","matTooltip","Tensor parallel size of the draft model. 0 = same as main model"],["matInput","","formControlName","specNumDraftTokens","type","number","matTooltip","Number of tokens the draft model proposes in one step. 0 = default"]],template:function(t,n){if(t&1&&(s(0,"h2",4),m(1),l(),s(2,"mat-dialog-content")(3,"form",5)(4,"mat-form-field",6),_(5,"input",7),b(),s(6,"mat-label"),m(7,"Service Name"),l(),M(8,Ny,2,0,"mat-error")(9,Ly,2,0,"mat-error"),l(),s(10,"mat-form-field",6),_(11,"input",8),b(),s(12,"mat-label"),m(13,"Command (launcher or binary)"),l(),M(14,Vy,2,0,"mat-error"),l(),s(15,"mat-autocomplete",null,0),me(17,By,5,3,"mat-option",9,Ry),l(),s(19,"mat-expansion-panel",10)(20,"mat-expansion-panel-header")(21,"mat-panel-title"),m(22,"Model"),l()(),s(23,"mat-form-field",6),_(24,"input",11),b(),s(25,"mat-label"),m(26,"Model (serve)"),l(),M(27,zy,2,0,"mat-error"),l(),s(28,"mat-autocomplete",null,1),me(30,jy,5,2,"mat-option",9,xt),l(),s(32,"div",12)(33,"mat-form-field",13),_(34,"input",14),b(),s(35,"mat-label"),m(36,"Tokenizer"),l()(),s(37,"mat-form-field",13)(38,"mat-select",15),me(39,Hy,2,2,"mat-option",9,xt),l(),b(),s(41,"mat-label"),m(42,"Dtype"),l()()()(),s(43,"mat-expansion-panel")(44,"mat-expansion-panel-header")(45,"mat-panel-title"),m(46,"Parallelism & Memory"),l()(),s(47,"div",12)(48,"mat-form-field",13),_(49,"input",16),b(),s(50,"mat-label"),m(51,"Tensor Parallel Size"),l()(),s(52,"mat-form-field",13),_(53,"input",17),b(),s(54,"mat-label"),m(55,"Pipeline Parallel Size"),l()(),s(56,"mat-form-field",13),_(57,"input",18),b(),s(58,"mat-label"),m(59,"Loading Workers"),l()()(),s(60,"div",12)(61,"mat-form-field",13),_(62,"input",19),b(),s(63,"mat-label"),m(64,"GPU Memory Utilization"),l()(),s(65,"mat-form-field",13),_(66,"input",20),b(),s(67,"mat-label"),m(68,"Swap Space (GiB)"),l()(),s(69,"mat-form-field",13),_(70,"input",21),b(),s(71,"mat-label"),m(72,"CPU Offload (GiB)"),l()(),s(73,"mat-form-field",13),_(74,"input",22),b(),s(75,"mat-label"),m(76,"Device"),l()()(),s(77,"div",12)(78,"mat-form-field",13)(79,"mat-select",23)(80,"mat-option",24),m(81,"(auto)"),l(),me(82,Uy,2,2,"mat-option",9,xt),l(),b(),s(84,"mat-label"),m(85,"Attention Backend"),l()(),s(86,"mat-form-field",13),_(87,"input",25),b(),s(88,"mat-label"),m(89,"KV Cache Memory (bytes)"),l()()()(),s(90,"mat-expansion-panel")(91,"mat-expansion-panel-header")(92,"mat-panel-title"),m(93,"Context & Scheduling"),l()(),s(94,"div",12)(95,"mat-form-field",13)(96,"input",26),A("blur",function(){return n.onMaxLenInput()})("keyup.enter",function(){return n.onMaxLenInput()}),l(),b(),s(97,"mat-label"),m(98,"Max Model Len"),l()(),s(99,"mat-autocomplete",null,2),me(101,Gy,2,2,"mat-option",9,Oy),l(),s(103,"mat-form-field",13),_(104,"input",27),b(),s(105,"mat-label"),m(106,"Max Num Seqs"),l()(),s(107,"mat-form-field",13)(108,"mat-select",28)(109,"mat-option",29),m(110,"auto"),l(),s(111,"mat-option",30),m(112,"on"),l(),s(113,"mat-option",31),m(114,"off"),l()(),b(),s(115,"mat-label"),m(116,"Chunked Prefill"),l()()(),s(117,"div",12)(118,"mat-form-field",13),_(119,"input",32),b(),s(120,"mat-label"),m(121,"Max Batched Tokens"),l()(),s(122,"mat-form-field",13),_(123,"input",33),b(),s(124,"mat-label"),m(125,"Block Size"),l()()()(),s(126,"mat-expansion-panel")(127,"mat-expansion-panel-header")(128,"mat-panel-title"),m(129,"Speculative Decoding"),l(),s(130,"mat-panel-description"),m(131,"Draft method and speculative options"),l()(),s(132,"div",12)(133,"mat-form-field",13)(134,"mat-select",34),me(135,$y,2,2,"mat-option",9,Py),l(),b(),s(137,"mat-label"),m(138,"Spec Method"),l()(),s(139,"mat-form-field",13),_(140,"input",35),b(),s(141,"mat-label"),m(142,"Spec Tokens"),l()()(),M(143,Wy,15,6),l(),s(144,"mat-expansion-panel")(145,"mat-expansion-panel-header")(146,"mat-panel-title"),m(147,"Sampling Defaults"),l(),s(148,"mat-panel-description"),m(149,"Default sampling parameters for generation"),l()(),s(150,"div",12)(151,"mat-form-field",13),_(152,"input",36),b(),s(153,"mat-label"),m(154,"Temperature"),l()(),s(155,"mat-form-field",13),_(156,"input",37),b(),s(157,"mat-label"),m(158,"Top-P"),l()(),s(159,"mat-form-field",13),_(160,"input",38),b(),s(161,"mat-label"),m(162,"Top-K"),l()(),s(163,"mat-form-field",13),_(164,"input",39),b(),s(165,"mat-label"),m(166,"Min-P"),l()()(),s(167,"div",12)(168,"mat-form-field",13),_(169,"input",40),b(),s(170,"mat-label"),m(171,"Seed"),l()(),s(172,"mat-form-field",13),_(173,"input",41),b(),s(174,"mat-label"),m(175,"Repetition Penalty"),l()(),s(176,"mat-form-field",13),_(177,"input",42),b(),s(178,"mat-label"),m(179,"Max Tokens (seq)"),l()()()(),s(180,"mat-expansion-panel")(181,"mat-expansion-panel-header")(182,"mat-panel-title"),m(183,"Tools & Chat"),l(),s(184,"mat-panel-description"),m(185,"Tool calling, reasoning and cache options"),l()(),s(186,"div",12)(187,"mat-checkbox",43),m(188," Trust Remote Code "),l(),b(),s(189,"mat-checkbox",44),m(190," Enable Auto Tool Choice "),l(),b(),l(),s(191,"div",12)(192,"mat-form-field",13)(193,"mat-select",45),me(194,qy,2,2,"mat-option",9,xt),l(),b(),s(196,"mat-label"),m(197,"Tool Call Parser"),l()(),s(198,"mat-form-field",13)(199,"mat-select",46),me(200,Ky,2,2,"mat-option",9,xt),l(),b(),s(202,"mat-label"),m(203,"Reasoning Parser"),l()(),s(204,"mat-form-field",13)(205,"mat-select",47)(206,"mat-option",29),m(207,"auto"),l(),s(208,"mat-option",30),m(209,"on"),l(),s(210,"mat-option",31),m(211,"off"),l()(),b(),s(212,"mat-label"),m(213,"Prefix Caching"),l()()()(),s(214,"mat-expansion-panel")(215,"mat-expansion-panel-header")(216,"mat-panel-title"),m(217,"Server & Network"),l()(),s(218,"div",12)(219,"mat-form-field",13),_(220,"input",48),b(),s(221,"mat-label"),m(222,"Host"),l()(),s(223,"mat-autocomplete",null,3),me(225,Yy,5,3,"mat-option",9,Fy),l(),s(227,"mat-form-field",13),_(228,"input",49),b(),s(229,"mat-label"),m(230,"Port"),l()(),s(231,"mat-form-field",13),_(232,"input",50),b(),s(233,"mat-label"),m(234,"API Key"),l()()()(),s(235,"mat-expansion-panel")(236,"mat-expansion-panel-header")(237,"mat-panel-title"),m(238,"Additional"),l(),s(239,"mat-panel-description"),m(240,"Extra CLI flags and environment variables"),l()(),s(241,"mat-form-field",6),_(242,"textarea",51),b(),s(243,"mat-label"),m(244,"Extra CLI Flags (one per line)"),l()(),s(245,"mat-form-field",6),_(246,"textarea",52),b(),s(247,"mat-label"),m(248,"Environment variables (KEY=VALUE, one per line)"),l()()()()(),s(249,"mat-dialog-actions",53)(250,"button",54),A("click",function(){return n.cancel()}),m(251,"Cancel"),l(),s(252,"button",55),A("click",function(){return n.save()}),m(253),l()()),t&2){let a=Fe(16),r=Fe(29),u=Fe(100),h=Fe(224);c(),he("",n.isClone?"Clone":n.isEdit?"Edit":"Add"," vllm service"),c(2),C("formGroup",n.form),c(),p("changed",n.isControlChanged("name")),c(),C("disabled",n.isEdit&&!n.isClone),y(),c(3),E(n.form.controls.name.errors?.required?8:n.form.controls.name.errors?.pattern?9:-1),c(2),p("changed",n.isControlChanged("command")),c(),C("matAutocomplete",a),y(),c(3),E(n.form.controls.command.errors?.required?14:-1),c(3),ue(n.filteredCommands()),c(2),p("has-changed",n.isSectionChanged("model","tokenizer","dtype")),c(4),p("changed",n.isControlChanged("model")),c(),C("matAutocomplete",r),y(),c(3),E(n.form.controls.model.errors?.required?27:-1),c(3),ue(n.existingModelPaths()),c(3),p("changed",n.isControlChanged("tokenizer")),c(),y(),c(3),p("changed",n.isControlChanged("dtype")),c(),y(),c(),ue(n.dtypeOptions),c(4),p("has-changed",n.isSectionChanged("tensorParallelSize","pipelineParallelSize","maxParallelLoadingWorkers","gpuMemoryUtilization","swapSpace","cpuOffloadGb","kvCacheMemory","device","attentionBackend")),c(5),p("changed",n.isControlChanged("tensorParallelSize")),c(),y(),c(3),p("changed",n.isControlChanged("pipelineParallelSize")),c(),y(),c(3),p("changed",n.isControlChanged("maxParallelLoadingWorkers")),c(),y(),c(4),p("changed",n.isControlChanged("gpuMemoryUtilization")),c(),y(),c(3),p("changed",n.isControlChanged("swapSpace")),c(),y(),c(3),p("changed",n.isControlChanged("cpuOffloadGb")),c(),y(),c(3),p("changed",n.isControlChanged("device")),c(),y(),c(4),p("changed",n.isControlChanged("attentionBackend")),c(),y(),c(3),ue(n.attentionBackends),c(4),p("changed",n.isControlChanged("kvCacheMemory")),c(),y(),c(3),p("has-changed",n.isSectionChanged("maxModelLen","maxNumSeqs","maxNumBatchedTokens","blockSize","enableChunkedPrefill")),c(5),p("changed",n.isControlChanged("maxModelLen")),c(),C("matAutocomplete",u),y(),c(5),ue(n.maxLenPresets()),c(2),p("changed",n.isControlChanged("maxNumSeqs")),c(),y(),c(3),p("changed",n.isControlChanged("enableChunkedPrefill")),c(),y(),c(10),p("changed",n.isControlChanged("maxNumBatchedTokens")),c(),y(),c(3),p("changed",n.isControlChanged("blockSize")),c(),y(),c(3),p("has-changed",n.isSectionChanged("specMethod","specTokens","specDraftModel","specDraftTensorParallelSize","specNumDraftTokens")),c(7),p("changed",n.isControlChanged("specMethod")),c(),y(),c(),ue(n.specMethods),c(4),p("changed",n.isControlChanged("specTokens")),c(),y(),c(3),E(n.showSpecDraftParams()?143:-1),c(),p("has-changed",n.isSectionChanged("temperature","topP","topK","minP","seed","repetitionPenalty","maxNumSeq")),c(7),p("changed",n.isControlChanged("temperature")),c(),y(),c(3),p("changed",n.isControlChanged("topP")),c(),y(),c(3),p("changed",n.isControlChanged("topK")),c(),y(),c(3),p("changed",n.isControlChanged("minP")),c(),y(),c(4),p("changed",n.isControlChanged("seed")),c(),y(),c(3),p("changed",n.isControlChanged("repetitionPenalty")),c(),y(),c(3),p("changed",n.isControlChanged("maxNumSeq")),c(),y(),c(3),p("has-changed",n.isSectionChanged("trustRemoteCode","enableAutoToolChoice","toolCallParser","reasoningParser","enablePrefixCaching")),c(7),p("changed",n.isControlChanged("trustRemoteCode")),y(),c(2),p("changed",n.isControlChanged("enableAutoToolChoice")),y(),c(3),p("changed",n.isControlChanged("toolCallParser")),c(),C("disabled",n.isToolCallParserDisabled()),y(),c(),ue(n.toolCallParsers),c(4),p("changed",n.isControlChanged("reasoningParser")),c(),y(),c(),ue(n.reasoningParsers),c(4),p("changed",n.isControlChanged("enablePrefixCaching")),c(),y(),c(9),p("has-changed",n.isSectionChanged("host","port","apiKey")),c(5),p("changed",n.isControlChanged("host")),c(),C("matAutocomplete",h),y(),c(5),ue(n.filteredHosts()),c(2),p("changed",n.isControlChanged("port")),c(),y(),c(3),p("changed",n.isControlChanged("apiKey")),c(),y(),c(3),p("has-changed",n.isSectionChanged("extraFlags","envText")),c(6),p("changed",n.isControlChanged("extraFlags")),c(),y(),c(3),p("changed",n.isControlChanged("envText")),c(),y(),c(6),C("disabled",n.form.invalid),c(),he(" ",n.isEdit&&!n.isClone?"Save":"Create"," ")}},dependencies:[ze,hn,Co,Ei,Ca,Ai,mn,nc,ic,pn,Ut,ji,xn,Cn,vt,Wi,Qe,it,Fo,Bc,Fs,Ua,Rs,Ps,Os,kt,St,Ot,fn,ti,ei,Lt,oi,ri,ai,Vo,Lo,Ns,Ga],styles:['@charset "UTF-8";.vllm-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;min-width:640px}.form-row[_ngcontent-%COMP%]{display:flex;gap:12px;margin-bottom:4px;align-items:center}.form-col[_ngcontent-%COMP%]{flex:1}.form-col-60[_ngcontent-%COMP%]{flex:3}.full-width[_ngcontent-%COMP%]{width:100%}.auto-path[_ngcontent-%COMP%]{font-family:monospace}.auto-from[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}.flags-textarea[_ngcontent-%COMP%], .env-textarea[_ngcontent-%COMP%]{overflow-x:auto}mat-dialog-content[_ngcontent-%COMP%]{padding-top:10px!important;max-height:80vh}mat-expansion-panel[_ngcontent-%COMP%]{margin-bottom:0}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}.subsection-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:#0009;margin:4px 0 14px;text-transform:uppercase;letter-spacing:.5px}mat-expansion-panel.has-changed[_ngcontent-%COMP%] mat-panel-title[_ngcontent-%COMP%]{font-weight:700}mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix input, mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix .mat-mdc-select{font-weight:700}mat-checkbox.changed[_ngcontent-%COMP%] label{font-weight:700}']})}}return i})();function si(i,o,e){let t=Bo(i,o);return t!==null?t:e}function At(i,o,e){let t=Bo(i,o);if(t!==null){let n=parseInt(t,10);return isNaN(n)?e:n}return e}function Xn(i,o,e){let t=Bo(i,o);if(t!==null){let n=parseFloat(t);return isNaN(n)?e:n}return e}function nC(i,o,e,t){let n=null;for(let a of i){let[r,...u]=a.split(/\s+/);r===o?u.join(" ").trim()==="false"?n="off":n="on":r===e&&(n="off")}return n??t}var oC=(i,o)=>o.name;function aC(i,o){if(i&1){let e=Ve();s(0,"button",23),A("click",function(n){Ce(e);let a=w(2).$implicit;return w(2).control(a.name,"start"),xe(n.stopPropagation())}),s(1,"mat-icon"),m(2,"play_arrow"),l(),m(3," Start "),l()}if(i&2){let e=w(2).$implicit,t=w(2);C("disabled",t.busy()?.name===e.name)}}function rC(i,o){if(i&1){let e=Ve();s(0,"button",24),A("click",function(n){Ce(e);let a=w(2).$implicit;return w(2).control(a.name,"stop"),xe(n.stopPropagation())}),s(1,"mat-icon"),m(2,"stop"),l(),m(3," Stop "),l()}if(i&2){let e=w(2).$implicit,t=w(2);C("disabled",t.busy()?.name===e.name)}}function sC(i,o){if(i&1){let e=Ve();s(0,"button",25),A("click",function(n){Ce(e);let a=w(2).$implicit;return w(2).control(a.name,"disable"),xe(n.stopPropagation())}),s(1,"mat-icon"),m(2,"lock"),l(),m(3," Disable "),l()}if(i&2){let e=w(2).$implicit,t=w(2);C("disabled",t.busy()?.name===e.name)}}function lC(i,o){if(i&1){let e=Ve();s(0,"button",25),A("click",function(n){Ce(e);let a=w(2).$implicit;return w(2).control(a.name,"enable"),xe(n.stopPropagation())}),s(1,"mat-icon"),m(2,"lock_open"),l(),m(3," Enable "),l()}if(i&2){let e=w(2).$implicit,t=w(2);C("disabled",e.enabled||t.busy()?.name===e.name)}}function cC(i,o){if(i&1&&(M(0,aC,4,1,"button",20)(1,rC,4,1,"button",21),M(2,sC,4,1,"button",22)(3,lC,4,1,"button",22)),i&2){let e=w().$implicit;E(e.running?1:0),c(2),E(e.enabled?2:3)}}function dC(i,o){if(i&1){let e=Ve();s(0,"tr",13),A("click",function(){let n=Ce(e).$implicit,a=w(2);return xe(a.selectedServiceService.select(n.name))}),s(1,"td")(2,"div",14),_(3,"span",15),s(4,"span",16),m(5),l()()(),s(6,"td",17),M(7,cC,4,2),l(),s(8,"td",17)(9,"div")(10,"button",18)(11,"mat-icon"),m(12,"more_vert"),l()(),s(13,"mat-menu",19,2)(15,"button",8),A("click",function(){let n=Ce(e).$implicit,a=w(2);return xe(a.editService(n))}),s(16,"mat-icon"),m(17,"edit"),l(),s(18,"span"),m(19,"Edit"),l()(),s(20,"button",8),A("click",function(){let n=Ce(e).$implicit,a=w(2);return xe(a.cloneService(n))}),s(21,"mat-icon"),m(22,"content_copy"),l(),s(23,"span"),m(24,"Clone"),l()(),s(25,"button",8),A("click",function(){let n=Ce(e).$implicit,a=w(2);return xe(a.deleteService(n.name))}),s(26,"mat-icon"),m(27,"delete"),l(),s(28,"span"),m(29,"Delete"),l()()()()()()}if(i&2){let e=o.$implicit,t=Fe(14);p("custom",e.hasConfig),c(3),p("running",e.running),c(),p("disabled",!e.enabled),c(),W(e.name),c(2),E(e.installed?7:-1),c(2),Ne("visibility",e.hasConfig?"visible":"hidden"),c(),C("matMenuTriggerFor",t)}}function mC(i,o){if(i&1&&(s(0,"table",10)(1,"tbody"),me(2,dC,30,11,"tr",12,oC),l()()),i&2){let e=w();c(2),ue(e.filtered())}}function uC(i,o){if(i&1&&(s(0,"p"),m(1),l()),i&2){let e=w(2);c(),he('No services match "',e.filter().trim(),'".')}}function hC(i,o){i&1&&(s(0,"p"),m(1,'No services configured. Click "Managed services" to select system services or "Custom service" to create one.'),l())}function pC(i,o){if(i&1&&(s(0,"div",11),M(1,uC,2,1,"p")(2,hC,2,0,"p"),l()),i&2){let e=w();c(),E(e.filter().trim()?1:2)}}var Tp=(()=>{class i{constructor(){this.serviceService=d(_t),this.serviceList=d(Es),this.selectedServiceService=d(Ms),this.dialog=d(To),this.snackBar=d(ks),this.services=this.serviceList.services,this.configs=I([]),this.loading=I(!0),this.busy=I(null),this.unified=G(()=>{let e=this.services(),t=this.configs(),n=new Map;for(let u of t)n.set(u.name,u);let a=e.filter(u=>n.has(u.name)).map(u=>{let h=n.get(u.name)??null;return{name:u.name,running:u.running,enabled:u.enabled,installed:u.installed,pid:u.pid,error:u.error,config:h,hasConfig:!0}}),r=e.filter(u=>!n.has(u.name)).map(u=>Oe(V({},u),{config:null,hasConfig:!1}));return[...a,...r]}),this.filter=I(""),this.filtered=G(()=>{let e=this.filter().trim().toLowerCase(),t=this.unified();return e?t.filter(n=>n.name.toLowerCase().includes(e)):t})}onFilterInput(e){this.filter.set(e.target.value)}ngOnInit(){this.load()}load(){return ye(this,null,function*(){this.loading.set(!0);try{yield this.serviceList.refresh(),this.configs.set(yield Te(this.serviceService.fetchConfigs()))}catch(e){console.error("[ServicesComponent] load error:",e)}finally{this.loading.set(!1)}})}control(e,t){return ye(this,null,function*(){let n=this.busy();if(!(n&&n.name===e&&n.action===t)){this.selectedServiceService.select(e),this.busy.set({name:e,action:t});try{let a=yield Te(this.serviceService.control(e,t));a.error&&this.showError(`${e}: ${a.error}`),yield this.load()}catch(a){this.showError(`${e}: ${String(a.error||a)}`)}finally{this.busy.set(null)}}})}showError(e){this.snackBar.open(e,"Dismiss",{duration:8e3,horizontalPosition:"center",verticalPosition:"top"})}manageServices(){this.dialog.open(hp,{maxWidth:"600px"}).afterClosed().subscribe(t=>{t&&this.load()})}archiveServices(){this.dialog.open(fp,{minWidth:"840px"}).afterClosed().subscribe(t=>{t&&this.load()})}addService(e){this.openDialog(null,e)}editService(e){this.selectedServiceService.select(e.name),this.openDialog(e.config,e.config?.type)}cloneService(e){if(!e.config)return;let t=Oe(V({},e.config),{name:this.uniqueCloneName(e.name)});this.openDialog(t,t.type,!0)}uniqueCloneName(e){let t=new Set(this.configs().map(a=>a.name));if(!t.has(`${e}-copy`))return`${e}-copy`;let n=2;for(;t.has(`${e}-copy-${n}`);)n++;return`${e}-copy-${n}`}deleteService(e){return ye(this,null,function*(){this.selectedServiceService.select(e);try{yield Te(this.serviceService.deleteConfig(e)),yield this.load()}catch(t){this.showError(`Delete "${e}": ${String(t)}`)}})}hasFlags(e){return e.flags.length>0}openDialog(e,t,n=!1){let a=t??e?.type??"generic";if(a==="llama-server"){let r={config:e,allConfigs:this.configs(),clone:n},u=this.dialog.open(Ep,{data:r,minWidth:"800px"});this.handleDialogResult(u,e,n)}else if(a==="vllm"){let r={config:e,allConfigs:this.configs(),clone:n},u=this.dialog.open(Ap,{data:r,minWidth:"800px"});this.handleDialogResult(u,e,n)}else{let r={config:e,allConfigs:this.configs(),clone:n},u=this.dialog.open(sp,{data:r,minWidth:"1000px"});this.handleDialogResult(u,e,n)}}handleDialogResult(e,t,n=!1){e.afterClosed().subscribe(a=>ye(this,null,function*(){if(a)try{if(n)yield Te(this.serviceService.saveConfig(a));else{let r=t?.name??null;if(r!==null&&r!==a.name){let h=this.unified().find(D=>D.name===r),g=h?.running??!1,v=h?.enabled??!1;yield Te(this.serviceService.deleteConfig(r)),yield Te(this.serviceService.saveConfig(a)),v&&(yield Te(this.serviceService.control(a.name,"enable"))),g&&(yield Te(this.serviceService.control(a.name,"start")))}else yield Te(this.serviceService.saveConfig(a))}}catch(r){this.showError(`Save: ${String(r)}`)}finally{yield this.load()}}))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=T({type:i,selectors:[["app-services"]],decls:44,vars:4,consts:[["servicesMenu","matMenu"],["addMenu",""],["serviceMenu","matMenu"],[1,"services-card"],[1,"section-header"],["type","text","placeholder","Filter by name\u2026",1,"service-filter",3,"input","value"],["mat-icon-button","","title","Services actions",1,"header-menu-btn",3,"matMenuTriggerFor"],["xPosition","before"],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"matMenuTriggerFor"],[1,"services-list"],[1,"empty"],[3,"custom"],[3,"click"],[1,"service-name"],[1,"status-dot"],[1,"name-text"],[1,"service-actions-cell"],["mat-icon-button","","title","Service actions",3,"matMenuTriggerFor"],["yPosition","below"],["mat-raised-button","","color","primary",3,"disabled"],["mat-raised-button","","color","warn",3,"disabled"],["mat-stroked-button","",3,"disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["mat-raised-button","","color","warn",3,"click","disabled"],["mat-stroked-button","",3,"click","disabled"]],template:function(t,n){if(t&1&&(s(0,"div",3)(1,"div",4)(2,"h2"),m(3,"Services"),l(),s(4,"input",5),A("input",function(r){return n.onFilterInput(r)}),l(),s(5,"button",6)(6,"mat-icon"),m(7,"more_vert"),l()(),s(8,"mat-menu",7,0)(10,"button",8),A("click",function(){return n.manageServices()}),s(11,"mat-icon"),m(12,"tune"),l(),s(13,"span"),m(14,"Managed services"),l()(),s(15,"button",8),A("click",function(){return n.archiveServices()}),s(16,"mat-icon"),m(17,"archive"),l(),s(18,"span"),m(19,"Archive"),l()(),s(20,"button",9)(21,"mat-icon"),m(22,"add"),l(),s(23,"span"),m(24,"Custom service"),l()()(),s(25,"mat-menu",null,1)(27,"button",8),A("click",function(){return n.addService("generic")}),s(28,"mat-icon"),m(29,"settings"),l(),s(30,"span"),m(31,"Generic service"),l()(),s(32,"button",8),A("click",function(){return n.addService("llama-server")}),s(33,"mat-icon"),m(34,"smart_toy"),l(),s(35,"span"),m(36,"llama-server"),l()(),s(37,"button",8),A("click",function(){return n.addService("vllm")}),s(38,"mat-icon"),m(39,"bolt"),l(),s(40,"span"),m(41,"vllm"),l()()()(),M(42,mC,4,0,"table",10)(43,pC,3,1,"div",11),l()),t&2){let a=Fe(9),r=Fe(26);c(4),C("value",n.filter()),c(),C("matMenuTriggerFor",a),c(15),C("matMenuTriggerFor",r),c(22),E(n.filtered().length>0?42:n.loading()?-1:43)}},dependencies:[ze,Qe,it,Hi,ko,Ss,yn,qn,Ds,Ft,Pt],styles:[".section-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;margin-top:8px}.section-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;color:#333}.section-header[_ngcontent-%COMP%] .header-menu-btn[_ngcontent-%COMP%]{color:#666}.section-header[_ngcontent-%COMP%] .service-filter[_ngcontent-%COMP%]{flex:1 1 240px;max-width:320px;min-width:140px;margin:0 16px;padding:6px 12px;font-size:.9rem;border:1px solid #cfcfcf;border-radius:16px;outline:none;background:#fff;transition:border-color .15s ease,box-shadow .15s ease}.section-header[_ngcontent-%COMP%] .service-filter[_ngcontent-%COMP%]::placeholder{color:#9e9e9e}.section-header[_ngcontent-%COMP%] .service-filter[_ngcontent-%COMP%]:focus{border-color:#7c4dff;box-shadow:0 0 0 2px #7c4dff26}.services-list[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.services-list[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid #e0e0e0;transition:background-color .2s ease}.services-list[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#fff}.services-list[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child{border-bottom:none}.services-list[_ngcontent-%COMP%] tr.custom[_ngcontent-%COMP%], .services-list[_ngcontent-%COMP%] tr.custom[_ngcontent-%COMP%]:first-child td[_ngcontent-%COMP%]:first-child{border-left:3px solid #7c4dff}.services-list[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:4px 12px;vertical-align:middle}.service-name[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;white-space:nowrap;display:flex;align-items:center;gap:8px}.service-name[_ngcontent-%COMP%] .status-dot[_ngcontent-%COMP%]{display:inline-block;width:10px;height:10px;border-radius:50%;background-color:#bdbdbd}.service-name[_ngcontent-%COMP%] .status-dot.running[_ngcontent-%COMP%]{background-color:#4caf50}.service-name[_ngcontent-%COMP%] .name-text[_ngcontent-%COMP%]{color:#212121}.service-name[_ngcontent-%COMP%] .name-text.disabled[_ngcontent-%COMP%]{color:#9e9e9e}.service-actions-cell[_ngcontent-%COMP%]{white-space:nowrap}.service-actions-cell[_ngcontent-%COMP%] button[_ngcontent-%COMP%] + button[_ngcontent-%COMP%]{margin-left:8px}.status-chip[_ngcontent-%COMP%], .enabled-chip[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500}.status-chip.running[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #a5d6a7}.status-chip.stopped[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #ef9a9a}.enabled-chip.enabled[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #90caf9}.enabled-chip.disabled[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #bdbdbd}.empty[_ngcontent-%COMP%]{text-align:center;padding:24px;color:#999;font-size:.9rem}.empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}"]})}}return i})();var fC=["journalBody"],gC=(i,o)=>o.name;function _C(i,o){if(i&1&&(s(0,"mat-option",7),m(1),l()),i&2){let e=o.$implicit;C("value",e.name),c(),W(e.name)}}function vC(i,o){if(i&1){let e=Ve();s(0,"button",10),A("click",function(){Ce(e);let n=w(2);return xe(n.toggleWordWrap())}),s(1,"mat-icon"),m(2,"wrap_text"),l()()}}function bC(i,o){if(i&1){let e=Ve();s(0,"button",11),A("click",function(){Ce(e);let n=w(2);return xe(n.toggleWordWrap())}),s(1,"mat-icon"),m(2,"wrap_text"),l()()}}function yC(i,o){if(i&1){let e=Ve();s(0,"mat-select",6),A("ngModelChange",function(n){Ce(e);let a=w();return xe(a.onServiceChange(n))}),s(1,"mat-option",7),m(2,"\u2014 None \u2014"),l(),me(3,_C,2,2,"mat-option",7,gC),l(),b(),M(5,vC,3,0,"button",8)(6,bC,3,0,"button",9)}if(i&2){let e=w();C("ngModel",e.selectedService()),y(),c(),C("value",null),c(2),ue(e.services()),c(2),E(e.wordWrap()?5:6)}}function CC(i,o){if(i&1&&(s(0,"div",3),m(1),l()),i&2){let e=w();c(),W(e.error())}}function xC(i,o){if(i&1&&(s(0,"div",4,0)(2,"pre"),m(3),l()()),i&2){let e=w();c(2),p("wrap-on",e.wordWrap()),c(),W(e.journalText())}}function wC(i,o){i&1&&(s(0,"div",5)(1,"p"),m(2,"No service selected"),l()())}var DC=40,Ip=(()=>{class i{toggleWordWrap(){this.wordWrap.update(e=>!e)}constructor(){this.serviceService=d(_t),this.selectedServiceService=d(Ms),this.serviceList=d(Es),this.cdr=d(te),this.services=this.serviceList.services,this.servicesLoaded=this.serviceList.loaded,this.journalLines=I([]),this.journalLoading=I(!1),this.journalError=I(null),this.error=G(()=>this.serviceList.error()??this.journalError()),this.selectedService=G(()=>this.selectedServiceService.selectedService()),this.wordWrap=I(!0),this.journalText=G(()=>{let e=this.journalLines();return e.length===0?"":e.map(t=>t.timestamp?`${t.timestamp} ${t.message}`:t.message).join(`
5598
- `)}),zt(()=>{if(!this.servicesLoaded())return;let e=this.selectedService();e!==null&&!this.services().some(t=>t.name===e)&&this.selectedServiceService.select(null)}),zt(()=>{if(!this.servicesLoaded())return;this.selectedService()?(this.journalLines.set([]),this.journalError.set(null),this.restartPolling()):(this.stopPolling(),this.journalLines.set([]))}),this.serviceList.refresh()}ngAfterViewInit(){this.scrollToBottom()}ngOnDestroy(){this.stopPolling()}onServiceChange(e){this.selectedServiceService.select(e)}restartPolling(){this.stopPolling(),this.fetchJournal(),this.journalSub=Za(0,1e3).subscribe(()=>this.fetchJournal())}stopPolling(){this.journalSub&&(this.journalSub.unsubscribe(),this.journalSub=void 0)}fetchJournal(){let e=this.selectedService();e&&(this.isTextSelected()||(this.journalLoading.set(!0),this.serviceService.fetchJournal(e,100).subscribe({next:t=>{let n=this.isScrolledToBottom();this.journalLines.set(t),this.journalError.set(null),this.journalLoading.set(!1),this.cdr.markForCheck(),requestAnimationFrame(()=>{n&&this.scrollToBottom()})},error:t=>{this.journalError.set(t.message),this.journalLoading.set(!1),this.cdr.markForCheck()}})))}get scrollContainer(){return this.journalBody?.nativeElement??null}isTextSelected(){let e=typeof window<"u"?window:null;if(!e)return!1;let t=e.getSelection();if(!t||t.isCollapsed||!t.rangeCount)return!1;let n=this.scrollContainer;return n?n.contains(t.anchorNode):!1}isScrolledToBottom(){let e=this.scrollContainer;return e?e.scrollHeight-e.scrollTop-e.clientHeight<=DC:!0}scrollToBottom(){let e=this.scrollContainer;e&&(e.scrollTop=e.scrollHeight)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=T({type:i,selectors:[["app-journal-panel"]],viewQuery:function(t,n){if(t&1&&Me(fC,5),t&2){let a;P(a=F())&&(n.journalBody=a.first)}},decls:9,vars:3,consts:[["journalBody",""],[1,"journal-card"],[1,"journal-header"],[1,"journal-error"],[1,"journal-body"],[1,"journal-body","journal-empty"],["disableOptionCentering","",1,"service-select",3,"ngModelChange","ngModel"],[3,"value"],["mat-flat-button","","color","primary","aria-label","Disable word wrap"],["mat-stroked-button","","aria-label","Enable word wrap"],["mat-flat-button","","color","primary","aria-label","Disable word wrap",3,"click"],["mat-stroked-button","","aria-label","Enable word wrap",3,"click"]],template:function(t,n){t&1&&(s(0,"mat-card",1)(1,"mat-card-content")(2,"div",2)(3,"h2"),m(4,"Journal"),l(),M(5,yC,7,3),l(),M(6,CC,2,1,"div",3),M(7,xC,4,3,"div",4)(8,wC,3,0,"div",5),l()()),t&2&&(c(5),E(n.servicesLoaded()&&n.services().length>0?5:-1),c(),E(n.error()?6:-1),c(),E(n.selectedService()?7:8))},dependencies:[ze,on,tn,nn,Vo,Lo,vt,Qe,it,Ft,Pt,ki,hn,Ai,ac],styles:[".journal-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;overflow:hidden}.journal-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;overflow:hidden;padding-bottom:8px}.journal-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;margin-bottom:12px;flex-shrink:0}.journal-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:20px;font-weight:500}.service-select[_ngcontent-%COMP%]{flex:1;min-width:150px}.journal-error[_ngcontent-%COMP%]{color:#f44336;font-size:13px;margin-bottom:8px;flex-shrink:0}.journal-body[_ngcontent-%COMP%]{flex:1;overflow-y:auto;background:#1e1e1e;border-radius:4px;padding:8px;min-height:0}.journal-body[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px}.journal-body[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#2d2d2d;border-radius:4px}.journal-body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#555;border-radius:4px}.journal-body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#777}.journal-body[_ngcontent-%COMP%]{scrollbar-width:thin;scrollbar-color:#555 #2d2d2d}.journal-body[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0;font-family:Courier New,Courier,monospace;font-size:12px;line-height:1.6;color:#d4d4d4;white-space:pre}.journal-body[_ngcontent-%COMP%] pre.wrap-on[_ngcontent-%COMP%]{white-space:pre-wrap}.journal-empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.journal-empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:#888;font-size:14px}[_nghost-%COMP%] .mdc-button{min-width:32px}[_nghost-%COMP%] .mat-mdc-unelevated-button>.mat-icon, [_nghost-%COMP%] .mat-mdc-outlined-button>.mat-icon{margin-right:0}"]})}}return i})();var Ls=(()=>{class i{constructor(){this.http=d(Qt),this.baseUrl="/api/system"}reboot(){return ye(this,null,function*(){yield Te(this.http.post(`${this.baseUrl}/reboot`,null))})}shutdown(){return ye(this,null,function*(){yield Te(this.http.post(`${this.baseUrl}/shutdown`,null))})}getSystemInfo(){return ye(this,null,function*(){return Te(this.http.get(`${this.baseUrl}/info`))})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ne({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var SC=(i,o)=>o.device,kC=(i,o)=>o.path;function MC(i,o){i&1&&_(0,"mat-progress-bar",2)}function EC(i,o){if(i&1&&(s(0,"p",3),m(1),l()),i&2){let e=w();c(),W(e.error())}}function AC(i,o){if(i&1&&(s(0,"span",11),m(1),l()),i&2){let e=w(2);c(),W(e.info().uptime)}}function TC(i,o){if(i&1&&(s(0,"div",12)(1,"span",13),m(2,"Version"),l(),s(3,"span",14),m(4),l()()),i&2){let e=w(2);c(4),W(e.info().os.version)}}function IC(i,o){if(i&1&&(s(0,"div",16)(1,"div",18)(2,"span",19),m(3),l(),s(4,"span",20),m(5),l()(),s(6,"div",21),_(7,"div",22),l(),s(8,"div",23)(9,"span"),m(10),l(),s(11,"span"),m(12),l()()()),i&2){let e=o.$implicit,t=w(2);c(3),W(e.device),c(2),W(e.mountPoint),c(2),Ne("width",e.usePercent,"%")("background",e.usePercent>90?"#f44336":e.usePercent>75?"#ff9800":"#4caf50"),c(3),An("",t.formatBytes(e.available)," free of ",t.formatBytes(e.total)),c(2),he("",e.usePercent,"% used")}}function RC(i,o){if(i&1&&(s(0,"div",27)(1,"span",31),m(2,"Last"),l(),s(3,"span",32),m(4),Go(5,"date"),l()()),i&2){let e=w(3);c(4),W($o(5,1,e.info().timeshift.lastSnapshot,"medium"))}}function OC(i,o){if(i&1&&(s(0,"mat-chip",33),m(1),l()),i&2){let e=o.$implicit;c(),W(e)}}function PC(i,o){if(i&1&&(s(0,"mat-chip-set"),me(1,OC,2,1,"mat-chip",33,xt),l()),i&2){let e=w(3);c(),ue(e.info().timeshift.schedules)}}function FC(i,o){if(i&1&&(s(0,"div",6)(1,"h3"),m(2,"Timeshift Backup"),l(),s(3,"div",7)(4,"div",8)(5,"mat-chip-set")(6,"mat-chip",24),m(7),l(),s(8,"mat-chip",25),m(9),l()(),s(10,"span",26),m(11),l()(),M(12,RC,6,4,"div",27),s(13,"div",28),_(14,"div",29),l(),s(15,"div",30)(16,"span"),m(17),l(),M(18,PC,3,0,"mat-chip-set"),l()()(),_(19,"mat-divider",15)),i&2){let e=w(2);c(7),W(e.info().timeshift.mode),c(2),W(e.info().timeshift.device),c(2),he("",e.info().timeshift.snapshots," snapshots"),c(),E(e.info().timeshift.lastSnapshot?12:-1),c(2),Ne("width",e.info().timeshift.totalSpace>0?(e.info().timeshift.totalSpace-e.info().timeshift.freeSpace)/e.info().timeshift.totalSpace*100:0,"%")("background",e.info().timeshift.totalSpace>0&&(e.info().timeshift.totalSpace-e.info().timeshift.freeSpace)/e.info().timeshift.totalSpace>.9?"#f44336":e.info().timeshift.totalSpace>0&&(e.info().timeshift.totalSpace-e.info().timeshift.freeSpace)/e.info().timeshift.totalSpace>.75?"#ff9800":"#4caf50"),c(3),An("",e.formatBytes(e.info().timeshift.freeSpace)," free of ",e.formatBytes(e.info().timeshift.totalSpace)),c(),E(e.info().timeshift.schedules.length>0?18:-1)}}function NC(i,o){if(i&1&&m(0),i&2){let e=w().$implicit,t=w(2);he(" ",t.formatBytes(e.size)," ")}}function LC(i,o){i&1&&m(0," \u2014 ")}function VC(i,o){if(i&1&&(s(0,"div",17)(1,"span",34),m(2),l(),s(3,"span",35),M(4,NC,1,1)(5,LC,1,0),l()()),i&2){let e=o.$implicit;c(2),W(e.path),c(2),E(e.exists?4:5)}}function BC(i,o){if(i&1&&(s(0,"div",6)(1,"h3"),m(2,"Operating System"),l(),s(3,"div",7)(4,"div",8)(5,"mat-chip-set")(6,"mat-chip",9),m(7),l(),s(8,"mat-chip",10),m(9),l()(),M(10,AC,2,1,"span",11),l(),M(11,TC,5,1,"div",12),s(12,"div",12)(13,"span",13),m(14,"Kernel"),l(),s(15,"span",14),m(16),l()()()(),_(17,"mat-divider",15),s(18,"div",6)(19,"h3"),m(20,"Disks"),l(),me(21,IC,13,9,"div",16,SC),l(),_(23,"mat-divider",15),M(24,FC,20,11),s(25,"div",6)(26,"h3"),m(27,"System Logs"),l(),me(28,VC,6,2,"div",17,kC),l()),i&2){let e=w();c(7),W(e.info().hostname),c(2),W(e.info().os.name),c(),E(e.info().uptime?10:-1),c(),E(e.info().os.version?11:-1),c(5),W(e.info().kernel),c(5),ue(e.info().disks),c(3),E(e.info().timeshift?24:-1),c(4),ue(e.info().logs)}}var Rp=(()=>{class i{constructor(){this.systemService=d(Ls),this.dialogRef=d(gt),this.loading=I(!0),this.info=I(null),this.error=I(null)}ngOnInit(){return ye(this,null,function*(){try{let e=yield this.systemService.getSystemInfo();this.info.set(e)}catch(e){this.error.set(e instanceof Error?e.message:"Failed to load system info")}finally{this.loading.set(!1)}})}formatBytes(e){return e===0?"0 B":`${(e/(1024*1024*1024)).toFixed(1)} GB`}close(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=T({type:i,selectors:[["app-system-info-dialog"]],decls:12,vars:1,consts:[[1,"dialog-container"],["mat-dialog-title",""],["mode","indeterminate"],[1,"dialog-error"],["align","end"],["mat-raised-button","","color","primary",3,"click"],[1,"info-section"],[1,"info-card"],[1,"info-card-header"],[1,"hostname-chip"],[1,"distro-chip"],[1,"os-uptime"],[1,"info-row"],[1,"info-label"],[1,"info-value"],[1,"section-divider"],[1,"disk-row"],[1,"log-row"],[1,"disk-header"],[1,"disk-device"],[1,"disk-mount"],[1,"disk-bar-bg"],[1,"disk-bar-fill"],[1,"disk-details"],[1,"mode-chip"],[1,"device-chip"],[1,"timeshift-snapshots"],[1,"timeshift-row"],[1,"timeshift-disk-bar-bg"],[1,"timeshift-disk-bar-fill"],[1,"timeshift-disk-details"],[1,"timeshift-label"],[1,"timeshift-value"],[1,"schedule-chip"],[1,"log-path"],[1,"log-size"]],template:function(t,n){t&1&&(s(0,"div",0)(1,"h2",1)(2,"mat-icon"),m(3,"info"),l(),m(4," System Info "),l(),s(5,"mat-dialog-content"),M(6,MC,1,0,"mat-progress-bar",2)(7,EC,2,1,"p",3)(8,BC,30,6),l(),s(9,"mat-dialog-actions",4)(10,"button",5),A("click",function(){return n.close()}),m(11,"OK"),l()()()),t&2&&(c(6),E(n.loading()?6:n.error()?7:n.info()?8:-1))},dependencies:[ze,Qe,it,Lt,oi,ri,ai,ki,en,No,Ha,Ft,Pt,ko,Ia,Ih,dl],styles:[".dialog-container[_ngcontent-%COMP%]{min-width:480px}.dialog-error[_ngcontent-%COMP%]{color:#f44336;padding:8px 0}.info-section[_ngcontent-%COMP%]{margin-bottom:8px}.info-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 8px;font-size:14px;font-weight:600;color:#666;text-transform:uppercase;letter-spacing:.5px}.info-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:4px 0}.info-row[_ngcontent-%COMP%] .info-label[_ngcontent-%COMP%]{color:#666;font-size:14px}.info-row[_ngcontent-%COMP%] .info-value[_ngcontent-%COMP%]{font-family:monospace;font-size:13px;color:#333}.section-divider[_ngcontent-%COMP%]{margin:12px 0}.disk-row[_ngcontent-%COMP%]{margin-bottom:12px}.disk-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:4px}.disk-header[_ngcontent-%COMP%] .disk-device[_ngcontent-%COMP%]{font-family:monospace;font-size:13px}.disk-header[_ngcontent-%COMP%] .disk-mount[_ngcontent-%COMP%]{font-size:13px;color:#666}.disk-bar-bg[_ngcontent-%COMP%]{height:6px;background:#e0e0e0;border-radius:3px;overflow:hidden;margin-bottom:2px}.disk-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:3px}.disk-details[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:12px;color:#666}.info-card[_ngcontent-%COMP%]{background:#f5f5f5;border-radius:8px;padding:12px}.info-card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.info-card-header[_ngcontent-%COMP%] .hostname-chip[_ngcontent-%COMP%]{font-family:monospace;background:#e8eaf6!important;color:#303f9f!important}.info-card-header[_ngcontent-%COMP%] .distro-chip[_ngcontent-%COMP%], .info-card-header[_ngcontent-%COMP%] .mode-chip[_ngcontent-%COMP%]{font-weight:600;background:#e3f2fd!important;color:#1976d2!important}.info-card-header[_ngcontent-%COMP%] .device-chip[_ngcontent-%COMP%]{font-family:monospace;background:#e8eaf6!important;color:#303f9f!important}.os-uptime[_ngcontent-%COMP%], .timeshift-snapshots[_ngcontent-%COMP%]{font-size:13px;color:#666;white-space:nowrap}.timeshift-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:4px 0;margin-bottom:6px}.timeshift-row[_ngcontent-%COMP%] .timeshift-label[_ngcontent-%COMP%]{color:#666;font-size:13px}.timeshift-row[_ngcontent-%COMP%] .timeshift-value[_ngcontent-%COMP%]{font-size:13px;color:#333}.timeshift-disk-bar-bg[_ngcontent-%COMP%]{height:6px;background:#e0e0e0;border-radius:3px;overflow:hidden;margin-bottom:4px}.timeshift-disk-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:3px}.timeshift-disk-details[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#666}.timeshift-disk-details[_ngcontent-%COMP%] .schedule-chip[_ngcontent-%COMP%]{font-size:11px;background:#fff3e0!important;color:#e65100!important}.log-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:4px 0}.log-row[_ngcontent-%COMP%] .log-path[_ngcontent-%COMP%]{font-family:monospace;font-size:13px}.log-row[_ngcontent-%COMP%] .log-size[_ngcontent-%COMP%]{font-family:monospace;font-size:13px;color:#333}"]})}}return i})();var Op=(()=>{class i{constructor(){this.systemInfo=ao.required(),this.systemService=d(Ls),this.dialog=d(To),this.layoutService=d(rs),this.layout=G(()=>this.layoutService.layout())}setLayout(e){this.layoutService.setLayout(e)}openSystemInfo(){this.dialog.open(Rp,{disableClose:!1})}reboot(){return ye(this,null,function*(){confirm("Reboot the server?")&&(yield this.systemService.reboot())})}shutdown(){return ye(this,null,function*(){confirm("Shutdown the server?")&&(yield this.systemService.shutdown())})}formatBytes(e){let t=e/1073741824;return`${Math.ceil(t)} GB`}ceilCpu(e){return Math.ceil(e)}colorForUsage(e){return e<40?"#4caf50":e<75?"#ff9800":"#f44336"}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=T({type:i,selectors:[["app-system-bar"]],inputs:{systemInfo:[1,"systemInfo"]},decls:59,vars:18,consts:[["menu","matMenu"],[1,"system-bar"],[1,"system-panel"],[1,"panel-body"],[1,"panel-icon"],[1,"panel-content"],[1,"panel-header"],[1,"panel-label"],[1,"panel-value"],[1,"bar-bg"],[1,"bar-fill"],[1,"server-controls"],["mat-icon-button","","color","warn","title","Server actions",3,"matMenuTriggerFor"],["yPosition","below"],["mat-menu-item","",3,"click"]],template:function(t,n){if(t&1&&(s(0,"div",1)(1,"mat-card",2)(2,"mat-card-content")(3,"div",3)(4,"mat-icon",4),m(5,"dynamic_feed"),l(),s(6,"div",5)(7,"div",6)(8,"span",7),m(9,"CPU"),l(),s(10,"span",8),m(11),l()(),s(12,"div",9),_(13,"div",10),l()()()()(),s(14,"mat-card",2)(15,"mat-card-content")(16,"div",3)(17,"mat-icon",4),m(18,"memory"),l(),s(19,"div",5)(20,"div",6)(21,"span",7),m(22,"RAM"),l(),s(23,"span",8),m(24),l()(),s(25,"div",9),_(26,"div",10),l()()()()(),s(27,"div",11)(28,"button",12)(29,"mat-icon"),m(30,"more_vert"),l()(),s(31,"mat-menu",13,0)(33,"button",14),A("click",function(){return n.openSystemInfo()}),s(34,"mat-icon"),m(35,"info"),l(),s(36,"span"),m(37,"System info"),l()(),s(38,"button",14),A("click",function(){return n.reboot()}),s(39,"mat-icon"),m(40,"restart_alt"),l(),s(41,"span"),m(42,"Reboot server"),l()(),s(43,"button",14),A("click",function(){return n.shutdown()}),s(44,"mat-icon"),m(45,"power_settings_new"),l(),s(46,"span"),m(47,"Shutdown server"),l()(),_(48,"mat-divider"),s(49,"button",14),A("click",function(){return n.setLayout("vertical")}),s(50,"mat-icon"),m(51),l(),s(52,"span"),m(53,"Layout: vertical"),l()(),s(54,"button",14),A("click",function(){return n.setLayout("horizontal")}),s(55,"mat-icon"),m(56),l(),s(57,"span"),m(58,"Layout: horizontal"),l()()()()()),t&2){let a=Fe(32);c(10),Ne("color",n.colorForUsage(n.systemInfo().cpuUsage)),c(),he(" ",n.ceilCpu(n.systemInfo().cpuUsage),"% "),c(2),Ne("width",n.systemInfo().cpuUsage,"%")("background",n.colorForUsage(n.systemInfo().cpuUsage)),c(10),Ne("color",n.colorForUsage(n.systemInfo().memoryPercent)),c(),An(" ",n.formatBytes(n.systemInfo().memoryUsed)," / ",n.formatBytes(n.systemInfo().memoryTotal)," "),c(2),Ne("width",n.systemInfo().memoryPercent,"%")("background",n.colorForUsage(n.systemInfo().memoryPercent)),c(2),C("matMenuTriggerFor",a),c(23),W(n.layout()==="vertical"?"check":"radio_button_unchecked"),c(5),W(n.layout()==="horizontal"?"check":"radio_button_unchecked")}},dependencies:[ze,on,tn,nn,Ft,Pt,Qe,Hi,Ss,yn,qn,Ds,No,Ha,Lt],styles:[".system-bar[_ngcontent-%COMP%]{display:flex;gap:16px;margin-bottom:16px;align-items:stretch}.system-panel[_ngcontent-%COMP%]{flex:1}.server-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.panel-body[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.panel-icon[_ngcontent-%COMP%]{color:#757575;font-size:24px;width:24px;height:24px}.panel-content[_ngcontent-%COMP%]{flex:1;min-width:0}.panel-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px}.panel-label[_ngcontent-%COMP%]{font-weight:500;font-size:.85rem;color:#555;text-transform:uppercase;letter-spacing:.5px}.panel-value[_ngcontent-%COMP%]{font-weight:500;font-size:.9rem;white-space:nowrap}.bar-bg[_ngcontent-%COMP%]{height:6px;background:#e0e0e0;border-radius:3px;overflow:hidden}.bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:3px;transition:width .4s ease,background .4s ease}"]})}}return i})();function zC(i,o){if(i&1&&(s(0,"div",8)(1,"mat-icon",10),m(2,"warning"),l(),m(3),l()),i&2){let e=w(2);c(3),he(" ",e.loginError()," ")}}function jC(i,o){if(i&1){let e=Ve();s(0,"div",0)(1,"mat-card",1)(2,"mat-card-content")(3,"div",2)(4,"mat-icon",3),m(5,"lock"),l(),s(6,"h2"),m(7,"Authentication Required"),l(),s(8,"p",4),m(9,"Enter your system password to continue"),l()(),s(10,"form",5),A("submit",function(n){return Ce(e),w().onLogin(),xe(n.preventDefault())}),s(11,"mat-form-field",6)(12,"mat-label"),m(13,"Password"),l(),s(14,"input",7),A("input",function(n){Ce(e);let a=w();return xe(a.loginPassword.set(n.target.value))}),l()(),M(15,zC,4,1,"div",8),s(16,"button",9),m(17,"Sign In"),l()()()()()}if(i&2){let e=w();c(14),C("value",e.loginPassword()),c(),E(e.loginError()?15:-1)}}function HC(i,o){i&1&&_(0,"mat-progress-bar",11)}function UC(i,o){if(i&1&&(s(0,"mat-card",14)(1,"mat-card-content")(2,"mat-icon",15),m(3," error_outline "),l(),s(4,"p"),m(5),l(),s(6,"p",4),m(7,"Make sure the backend is running on port 4242."),l()()()),i&2){let e=w(2);c(5),W(e.error())}}function GC(i,o){if(i&1&&_(0,"app-system-bar",16),i&2){let e=w(3);C("systemInfo",e.systemInfo())}}function $C(i,o){i&1&&(s(0,"mat-card",19)(1,"mat-card-content")(2,"p"),m(3,"No GPUs detected."),l(),s(4,"p",4),m(5," Ensure nvidia-smi or rocm-smi is available on this system. "),l()()())}function WC(i,o){if(i&1&&_(0,"app-gpu-table",20),i&2){let e=w(3);C("gpus",e.gpus())}}function qC(i,o){if(i&1){let e=Ve();s(0,"div",23),A("mousedown",function(n){Ce(e);let a=w(3);return xe(a.startGpuColDrag(n))}),_(1,"span",24),l()}}function KC(i,o){if(i&1&&(M(0,GC,1,1,"app-system-bar",16),s(1,"div",17)(2,"div",18),M(3,$C,6,0,"mat-card",19)(4,WC,1,1,"app-gpu-table",20),l(),M(5,qC,2,0,"div",21),s(6,"div",22),_(7,"app-services"),l()()),i&2){let e=w(2);E(e.hasGpus()?0:-1),c(2),Ne("width",e.layout()==="horizontal"?e.gpuColWidth():null,"px"),c(),E(e.hasGpus()?4:3),c(2),E(e.layout()==="horizontal"?5:-1)}}function YC(i,o){if(i&1){let e=Ve();s(0,"div",23),A("mousedown",function(n){Ce(e);let a=w(2);return xe(a.startJournalWidthDrag(n))}),_(1,"span",24),l(),s(2,"div",25),_(3,"app-journal-panel"),l()}if(i&2){let e=w(2);c(2),Ne("width",e.sidebarWidth(),"px")}}function XC(i,o){if(i&1){let e=Ve();s(0,"div",26),A("mousedown",function(n){Ce(e);let a=w(2);return xe(a.startJournalHeightDrag(n))}),_(1,"span",24),l(),s(2,"div",27),_(3,"app-journal-panel"),l()}if(i&2){let e=w(2);c(2),Ne("height",e.journalHeight(),"px")}}function ZC(i,o){if(i&1&&(M(0,HC,1,0,"mat-progress-bar",11),s(1,"div",12)(2,"div",13),M(3,UC,8,1,"mat-card",14)(4,KC,8,5),l(),M(5,YC,4,2)(6,XC,4,2),l()),i&2){let e=w();E(e.loading()?0:-1),c(),p("horizontal",e.layout()==="horizontal")("dragging",e.isDragging()),c(2),E(e.error()?3:4),c(2),E(e.layout()==="vertical"?5:6)}}var Pp=100,Fp=1600,Np=160,Lp=800,QC=320,Vp=360,Bp=1400,JC=560,zp=(()=>{class i{ngOnInit(){this.authService.authState.subscribe(a=>{this.isAuthenticated.set(a),a&&(this.loginError.set(null),this.loginPassword.set(""))});let e=localStorage.getItem("journal-sidebar-width");if(e){let a=parseInt(e,10);a>=Pp&&a<=Fp&&this.sidebarWidth.set(a)}let t=localStorage.getItem("journal-bottom-height");if(t){let a=parseInt(t,10);a>=Np&&a<=Lp&&this.journalHeight.set(a)}let n=localStorage.getItem("gpu-col-width");if(n){let a=parseInt(n,10);a>=Vp&&a<=Bp&&this.gpuColWidth.set(a)}}ngOnDestroy(){}onLogin(){return ye(this,null,function*(){this.loginError.set(null),(yield this.authService.login(this.loginPassword()))?(this.loading.set(!0),this.initGpus()):this.loginError.set("Invalid password")})}startJournalWidthDrag(e){this.beginDrag("journalWidth",e.clientX,this.sidebarWidth())}startJournalHeightDrag(e){this.beginDrag("journalHeight",e.clientY,this.journalHeight())}startGpuColDrag(e){this.beginDrag("gpuColWidth",e.clientX,this.gpuColWidth())}beginDrag(e,t,n){this.dragTarget=e,this.dragStartCoord=t,this.dragStartValue=n,this.isDragging.set(!0)}onDrag(e){if(!(!this.isDragging()||!this.dragTarget)){if(this.dragTarget==="journalWidth"){let t=this.dragStartCoord-e.clientX;this.sidebarWidth.set(this.clamp(this.dragStartValue+t,Pp,Fp))}else if(this.dragTarget==="journalHeight"){let t=this.dragStartCoord-e.clientY;this.journalHeight.set(this.clamp(this.dragStartValue+t,Np,Lp))}else if(this.dragTarget==="gpuColWidth"){let t=e.clientX-this.dragStartCoord;this.gpuColWidth.set(this.clamp(this.dragStartValue+t,Vp,Bp))}}}onDragEnd(){!this.isDragging()||!this.dragTarget||(this.dragTarget==="journalWidth"?localStorage.setItem("journal-sidebar-width",String(this.sidebarWidth())):this.dragTarget==="journalHeight"?localStorage.setItem("journal-bottom-height",String(this.journalHeight())):this.dragTarget==="gpuColWidth"&&localStorage.setItem("gpu-col-width",String(this.gpuColWidth())),this.dragTarget=null,this.isDragging.set(!1))}clamp(e,t,n){return Math.max(t,Math.min(n,e))}constructor(){this.gpuService=d(lh),this.authService=d(Tr),this.layoutService=d(rs),this.gpus=I([]),this.systemInfo=I({cpuUsage:0,memoryTotal:0,memoryUsed:0,memoryPercent:0}),this.loading=I(!0),this.error=I(null),this.hasGpus=G(()=>this.gpus().length>0),this.layout=this.layoutService.layout,this.isAuthenticated=I(this.authService.isAuthenticated()),this.loginPassword=I(""),this.loginError=I(null),this.sidebarWidth=I(420),this.journalHeight=I(QC),this.gpuColWidth=I(JC),this.isDragging=I(!1),this.dragTarget=null,this.dragStartCoord=0,this.dragStartValue=0,this.isAuthenticated()&&this.initGpus()}initGpus(e=0){this.gpuService.fetchGpus().subscribe({next:t=>{if(t.length===0){e<3?setTimeout(()=>this.initGpus(e+1),5e3):this.loading.set(!1);return}let n=t.map(a=>Oe(V({},a),{key:a.pciBusId,usage:0,temperature:0,vramUsed:0}));this.gpus.set(n),this.loading.set(!1),this.error.set(null),this.gpuService.watchStatus(3e3).subscribe({next:a=>{this.systemInfo.set(a.system),this.mergeUsage(a.gpus)},error:a=>{console.error("[AppComponent] status poll error:",a)}})},error:t=>{console.error("[AppComponent] static fetch error:",t),this.error.set(`Failed to fetch GPU data: ${t.message}`),this.loading.set(!1)}})}mergeUsage(e){let t=new Map;for(let n of e)t.set(n.key,n);this.gpus.update(n=>n.map(a=>{let r=t.get(a.pciBusId);return Oe(V({},a),{key:a.pciBusId,usage:r?.usage??0,temperature:r?.temperature??0,vramUsed:r?.vramUsed??0})}))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=T({type:i,selectors:[["app-root"]],hostBindings:function(t,n){t&1&&A("mousemove",function(r){return n.onDrag(r)},Ws)("mouseup",function(){return n.onDragEnd()},Ws)},decls:2,vars:1,consts:[[1,"login-container"],[1,"login-card"],[1,"login-header"],[1,"login-icon"],[1,"mat-body-2",2,"color","#999"],[1,"login-form",3,"submit"],["appearance","outline",1,"full-width"],["matInput","","type","password","autofocus","",3,"input","value"],[1,"login-error"],["mat-raised-button","","color","primary","type","submit",1,"login-btn"],[2,"font-size","20px","vertical-align","middle"],["mode","query","color","primary"],[1,"layout"],[1,"main-content"],[1,"error-card"],[2,"color","#f44336","font-size","48px","float","left","margin-right","16px"],[3,"systemInfo"],[1,"top-row"],[1,"gpu-col"],[1,"empty-card"],[3,"gpus"],[1,"splitter"],[1,"services-col"],[1,"splitter",3,"mousedown"],[1,"splitter-line"],[1,"journal-sidebar"],[1,"splitter","splitter-h",3,"mousedown"],[1,"journal-bottom"]],template:function(t,n){t&1&&M(0,jC,18,2,"div",0)(1,ZC,7,7),t&2&&E(n.isAuthenticated()?1:0)},dependencies:[ze,ki,en,on,tn,nn,ti,ei,St,Ot,kt,Qe,it,Ft,Pt,Oh,Tp,Ip,Op],styles:[".spacer[_ngcontent-%COMP%]{flex:1 1 auto}.login-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:calc(100vh - 56px);padding:24px;background:#f5f5f5}.login-card[_ngcontent-%COMP%]{width:100%;max-width:400px}.login-header[_ngcontent-%COMP%]{text-align:center;margin-bottom:24px}.login-header[_ngcontent-%COMP%] .login-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;line-height:48px;background:#e3f2fd;border-radius:50%;padding:8px;color:#1976d2}.login-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:16px 0 4px;font-size:22px;font-weight:500}.login-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.login-error[_ngcontent-%COMP%]{color:#d32f2f;font-size:14px;text-align:center;padding:8px;background:#ffebee;border-radius:4px}.login-btn[_ngcontent-%COMP%]{width:100%;margin-top:8px}.full-width[_ngcontent-%COMP%]{width:100%}.layout[_ngcontent-%COMP%]{display:flex;flex-direction:row;height:100%;overflow:hidden}.layout.dragging[_ngcontent-%COMP%]{user-select:none;-webkit-user-select:none}.main-content[_ngcontent-%COMP%]{flex:1;min-width:0;overflow-y:auto;padding:24px 8px 24px 24px;max-width:100%}.top-row[_ngcontent-%COMP%]{display:block}.gpu-col[_ngcontent-%COMP%], .services-col[_ngcontent-%COMP%]{min-width:0}.splitter[_ngcontent-%COMP%]{width:8px;flex-shrink:0;cursor:col-resize;display:flex;align-items:center;justify-content:center;background:transparent;transition:background .15s}.splitter[_ngcontent-%COMP%]:hover{background:#0000000a}.splitter[_ngcontent-%COMP%] .splitter-line[_ngcontent-%COMP%]{width:2px;height:32px;border-radius:1px;background:#bdbdbd;transition:background .15s,width .15s}.splitter[_ngcontent-%COMP%]:hover .splitter-line[_ngcontent-%COMP%]{background:#757575;width:3px}.splitter-h[_ngcontent-%COMP%]{width:100%;height:8px;flex-shrink:0;cursor:row-resize;display:flex;align-items:center;justify-content:center;background:transparent;transition:background .15s}.splitter-h[_ngcontent-%COMP%]:hover{background:#0000000a}.splitter-h[_ngcontent-%COMP%] .splitter-line[_ngcontent-%COMP%]{width:32px;height:2px;border-radius:1px;background:#bdbdbd;transition:background .15s,height .15s}.splitter-h[_ngcontent-%COMP%]:hover .splitter-line[_ngcontent-%COMP%]{background:#757575;height:3px}.journal-sidebar[_ngcontent-%COMP%]{flex-shrink:0;overflow:hidden;padding:24px 24px 24px 8px}.journal-bottom[_ngcontent-%COMP%]{flex-shrink:0;overflow:hidden;padding:8px 24px 24px}.layout.horizontal[_ngcontent-%COMP%]{flex-direction:column}.layout.horizontal[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%]{overflow:hidden;display:flex;flex-direction:column;padding:24px 24px 8px}.layout.horizontal[_ngcontent-%COMP%] .top-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex:1;min-height:0}.layout.horizontal[_ngcontent-%COMP%] .gpu-col[_ngcontent-%COMP%]{flex-shrink:0;overflow-y:auto}.layout.horizontal[_ngcontent-%COMP%] .splitter[_ngcontent-%COMP%]{margin:0 8px}.layout.horizontal[_ngcontent-%COMP%] .services-col[_ngcontent-%COMP%]{flex:1;min-width:0;overflow-y:auto}.layout.horizontal[_ngcontent-%COMP%] .services-col[_ngcontent-%COMP%] app-services[_ngcontent-%COMP%]{margin-top:0}.error-card[_ngcontent-%COMP%], .empty-card[_ngcontent-%COMP%]{margin-top:32px;max-width:600px;margin-left:auto;margin-right:auto}[_nghost-%COMP%] mat-card-content{padding-top:10px!important;padding-bottom:10px!important}app-services[_ngcontent-%COMP%]{display:block;margin-top:24px}"]})}}return i})();bl(zp,ym).catch(i=>console.error(i));
5597
+ HIP_VISIBLE_DEVICES=0,1,2,3`,"matTooltip","Environment variables for the service process (KEY=VALUE, one per line)",1,"env-textarea"],["align","end"],["mat-stroked-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"auto-path"],[1,"auto-from"],[1,"subsection-label"],["appearance","outline",1,"form-col-60"],["matInput","","formControlName","specDraftModel","type","text","placeholder","/path/to/draft-model or HF repo id","matTooltip","Draft model for speculative decoding (draft-model methods)"],["matInput","","formControlName","specDraftTensorParallelSize","type","number","matTooltip","Tensor parallel size of the draft model. 0 = same as main model"],["matInput","","formControlName","specNumDraftTokens","type","number","matTooltip","Number of tokens the draft model proposes in one step. 0 = default"]],template:function(t,n){if(t&1&&(s(0,"h2",4),m(1),l(),s(2,"mat-dialog-content")(3,"form",5)(4,"mat-form-field",6),_(5,"input",7),b(),s(6,"mat-label"),m(7,"Service Name"),l(),k(8,Vy,2,0,"mat-error")(9,By,2,0,"mat-error"),l(),s(10,"mat-form-field",6),_(11,"input",8),b(),s(12,"mat-label"),m(13,"Command (launcher or binary)"),l(),k(14,zy,2,0,"mat-error"),l(),s(15,"mat-autocomplete",null,0),ue(17,jy,5,3,"mat-option",9,Py),l(),s(19,"mat-expansion-panel",10)(20,"mat-expansion-panel-header")(21,"mat-panel-title"),m(22,"Model"),l()(),s(23,"mat-form-field",6),_(24,"input",11),b(),s(25,"mat-label"),m(26,"Model (serve)"),l(),k(27,Hy,2,0,"mat-error"),l(),s(28,"mat-autocomplete",null,1),ue(30,Uy,5,2,"mat-option",9,St),l(),s(32,"div",12)(33,"mat-form-field",13),_(34,"input",14),b(),s(35,"mat-label"),m(36,"Tokenizer"),l()(),s(37,"mat-form-field",13)(38,"mat-select",15),ue(39,Gy,2,2,"mat-option",9,St),l(),b(),s(41,"mat-label"),m(42,"Dtype"),l()()()(),s(43,"mat-expansion-panel")(44,"mat-expansion-panel-header")(45,"mat-panel-title"),m(46,"Parallelism & Memory"),l()(),s(47,"div",12)(48,"mat-form-field",13),_(49,"input",16),b(),s(50,"mat-label"),m(51,"Tensor Parallel Size"),l()(),s(52,"mat-form-field",13),_(53,"input",17),b(),s(54,"mat-label"),m(55,"Pipeline Parallel Size"),l()(),s(56,"mat-form-field",13),_(57,"input",18),b(),s(58,"mat-label"),m(59,"Loading Workers"),l()()(),s(60,"div",12)(61,"mat-form-field",13),_(62,"input",19),b(),s(63,"mat-label"),m(64,"GPU Memory Utilization"),l()(),s(65,"mat-form-field",13),_(66,"input",20),b(),s(67,"mat-label"),m(68,"Swap Space (GiB)"),l()(),s(69,"mat-form-field",13),_(70,"input",21),b(),s(71,"mat-label"),m(72,"CPU Offload (GiB)"),l()(),s(73,"mat-form-field",13),_(74,"input",22),b(),s(75,"mat-label"),m(76,"Device"),l()()(),s(77,"div",12)(78,"mat-form-field",13)(79,"mat-select",23)(80,"mat-option",24),m(81,"(auto)"),l(),ue(82,$y,2,2,"mat-option",9,St),l(),b(),s(84,"mat-label"),m(85,"Attention Backend"),l()(),s(86,"mat-form-field",13),_(87,"input",25),b(),s(88,"mat-label"),m(89,"KV Cache Memory (bytes)"),l()()()(),s(90,"mat-expansion-panel")(91,"mat-expansion-panel-header")(92,"mat-panel-title"),m(93,"Context & Scheduling"),l()(),s(94,"div",12)(95,"mat-form-field",13)(96,"input",26),E("blur",function(){return n.onMaxLenInput()})("keyup.enter",function(){return n.onMaxLenInput()}),l(),b(),s(97,"mat-label"),m(98,"Max Model Len"),l()(),s(99,"mat-autocomplete",null,2),ue(101,Wy,2,2,"mat-option",9,Fy),l(),s(103,"mat-form-field",13),_(104,"input",27),b(),s(105,"mat-label"),m(106,"Max Num Seqs"),l()(),s(107,"mat-form-field",13)(108,"mat-select",28)(109,"mat-option",29),m(110,"auto"),l(),s(111,"mat-option",30),m(112,"on"),l(),s(113,"mat-option",31),m(114,"off"),l()(),b(),s(115,"mat-label"),m(116,"Chunked Prefill"),l()()(),s(117,"div",12)(118,"mat-form-field",13),_(119,"input",32),b(),s(120,"mat-label"),m(121,"Max Batched Tokens"),l()(),s(122,"mat-form-field",13),_(123,"input",33),b(),s(124,"mat-label"),m(125,"Block Size"),l()()()(),s(126,"mat-expansion-panel")(127,"mat-expansion-panel-header")(128,"mat-panel-title"),m(129,"Speculative Decoding"),l(),s(130,"mat-panel-description"),m(131,"Draft method and speculative options"),l()(),s(132,"div",12)(133,"mat-form-field",13)(134,"mat-select",34),ue(135,qy,2,2,"mat-option",9,Ny),l(),b(),s(137,"mat-label"),m(138,"Spec Method"),l()(),s(139,"mat-form-field",13),_(140,"input",35),b(),s(141,"mat-label"),m(142,"Spec Tokens"),l()()(),k(143,Ky,15,6),l(),s(144,"mat-expansion-panel")(145,"mat-expansion-panel-header")(146,"mat-panel-title"),m(147,"Sampling Defaults"),l(),s(148,"mat-panel-description"),m(149,"Default sampling parameters for generation"),l()(),s(150,"div",12)(151,"mat-form-field",13),_(152,"input",36),b(),s(153,"mat-label"),m(154,"Temperature"),l()(),s(155,"mat-form-field",13),_(156,"input",37),b(),s(157,"mat-label"),m(158,"Top-P"),l()(),s(159,"mat-form-field",13),_(160,"input",38),b(),s(161,"mat-label"),m(162,"Top-K"),l()(),s(163,"mat-form-field",13),_(164,"input",39),b(),s(165,"mat-label"),m(166,"Min-P"),l()()(),s(167,"div",12)(168,"mat-form-field",13),_(169,"input",40),b(),s(170,"mat-label"),m(171,"Seed"),l()(),s(172,"mat-form-field",13),_(173,"input",41),b(),s(174,"mat-label"),m(175,"Repetition Penalty"),l()(),s(176,"mat-form-field",13),_(177,"input",42),b(),s(178,"mat-label"),m(179,"Max Tokens (seq)"),l()()()(),s(180,"mat-expansion-panel")(181,"mat-expansion-panel-header")(182,"mat-panel-title"),m(183,"Tools & Chat"),l(),s(184,"mat-panel-description"),m(185,"Tool calling, reasoning and cache options"),l()(),s(186,"div",12)(187,"mat-checkbox",43),m(188," Trust Remote Code "),l(),b(),s(189,"mat-checkbox",44),m(190," Enable Auto Tool Choice "),l(),b(),l(),s(191,"div",12)(192,"mat-form-field",13)(193,"mat-select",45),ue(194,Yy,2,2,"mat-option",9,St),l(),b(),s(196,"mat-label"),m(197,"Tool Call Parser"),l()(),s(198,"mat-form-field",13)(199,"mat-select",46),ue(200,Xy,2,2,"mat-option",9,St),l(),b(),s(202,"mat-label"),m(203,"Reasoning Parser"),l()(),s(204,"mat-form-field",13)(205,"mat-select",47)(206,"mat-option",29),m(207,"auto"),l(),s(208,"mat-option",30),m(209,"on"),l(),s(210,"mat-option",31),m(211,"off"),l()(),b(),s(212,"mat-label"),m(213,"Prefix Caching"),l()()()(),s(214,"mat-expansion-panel")(215,"mat-expansion-panel-header")(216,"mat-panel-title"),m(217,"Server & Network"),l()(),s(218,"div",12)(219,"mat-form-field",13),_(220,"input",48),b(),s(221,"mat-label"),m(222,"Host"),l()(),s(223,"mat-autocomplete",null,3),ue(225,Zy,5,3,"mat-option",9,Ly),l(),s(227,"mat-form-field",13),_(228,"input",49),b(),s(229,"mat-label"),m(230,"Port"),l()(),s(231,"mat-form-field",13),_(232,"input",50),b(),s(233,"mat-label"),m(234,"API Key"),l()()()(),s(235,"mat-expansion-panel")(236,"mat-expansion-panel-header")(237,"mat-panel-title"),m(238,"Additional"),l(),s(239,"mat-panel-description"),m(240,"Extra CLI flags and environment variables"),l()(),s(241,"mat-form-field",6),_(242,"textarea",51),b(),s(243,"mat-label"),m(244,"Extra CLI Flags (one per line)"),l()(),s(245,"mat-form-field",6),_(246,"textarea",52),b(),s(247,"mat-label"),m(248,"Environment variables (KEY=VALUE, one per line)"),l()()()()(),s(249,"mat-dialog-actions",53)(250,"button",54),E("click",function(){return n.cancel()}),m(251,"Cancel"),l(),s(252,"button",55),E("click",function(){return n.save()}),m(253),l()()),t&2){let a=Le(16),r=Le(29),u=Le(100),h=Le(224);c(),pe("",n.isClone?"Clone":n.isEdit?"Edit":"Add"," vllm service"),c(2),x("formGroup",n.form),c(),p("changed",n.isControlChanged("name")),c(),x("disabled",n.isEdit&&!n.isClone),y(),c(3),M(n.form.controls.name.errors?.required?8:n.form.controls.name.errors?.pattern?9:-1),c(2),p("changed",n.isControlChanged("command")),c(),x("matAutocomplete",a),y(),c(3),M(n.form.controls.command.errors?.required?14:-1),c(3),he(n.filteredCommands()),c(2),p("has-changed",n.isSectionChanged("model","tokenizer","dtype")),c(4),p("changed",n.isControlChanged("model")),c(),x("matAutocomplete",r),y(),c(3),M(n.form.controls.model.errors?.required?27:-1),c(3),he(n.existingModelPaths()),c(3),p("changed",n.isControlChanged("tokenizer")),c(),y(),c(3),p("changed",n.isControlChanged("dtype")),c(),y(),c(),he(n.dtypeOptions),c(4),p("has-changed",n.isSectionChanged("tensorParallelSize","pipelineParallelSize","maxParallelLoadingWorkers","gpuMemoryUtilization","swapSpace","cpuOffloadGb","kvCacheMemory","device","attentionBackend")),c(5),p("changed",n.isControlChanged("tensorParallelSize")),c(),y(),c(3),p("changed",n.isControlChanged("pipelineParallelSize")),c(),y(),c(3),p("changed",n.isControlChanged("maxParallelLoadingWorkers")),c(),y(),c(4),p("changed",n.isControlChanged("gpuMemoryUtilization")),c(),y(),c(3),p("changed",n.isControlChanged("swapSpace")),c(),y(),c(3),p("changed",n.isControlChanged("cpuOffloadGb")),c(),y(),c(3),p("changed",n.isControlChanged("device")),c(),y(),c(4),p("changed",n.isControlChanged("attentionBackend")),c(),y(),c(3),he(n.attentionBackends),c(4),p("changed",n.isControlChanged("kvCacheMemory")),c(),y(),c(3),p("has-changed",n.isSectionChanged("maxModelLen","maxNumSeqs","maxNumBatchedTokens","blockSize","enableChunkedPrefill")),c(5),p("changed",n.isControlChanged("maxModelLen")),c(),x("matAutocomplete",u),y(),c(5),he(n.maxLenPresets()),c(2),p("changed",n.isControlChanged("maxNumSeqs")),c(),y(),c(3),p("changed",n.isControlChanged("enableChunkedPrefill")),c(),y(),c(10),p("changed",n.isControlChanged("maxNumBatchedTokens")),c(),y(),c(3),p("changed",n.isControlChanged("blockSize")),c(),y(),c(3),p("has-changed",n.isSectionChanged("specMethod","specTokens","specDraftModel","specDraftTensorParallelSize","specNumDraftTokens")),c(7),p("changed",n.isControlChanged("specMethod")),c(),y(),c(),he(n.specMethods),c(4),p("changed",n.isControlChanged("specTokens")),c(),y(),c(3),M(n.showSpecDraftParams()?143:-1),c(),p("has-changed",n.isSectionChanged("temperature","topP","topK","minP","seed","repetitionPenalty","maxNumSeq")),c(7),p("changed",n.isControlChanged("temperature")),c(),y(),c(3),p("changed",n.isControlChanged("topP")),c(),y(),c(3),p("changed",n.isControlChanged("topK")),c(),y(),c(3),p("changed",n.isControlChanged("minP")),c(),y(),c(4),p("changed",n.isControlChanged("seed")),c(),y(),c(3),p("changed",n.isControlChanged("repetitionPenalty")),c(),y(),c(3),p("changed",n.isControlChanged("maxNumSeq")),c(),y(),c(3),p("has-changed",n.isSectionChanged("trustRemoteCode","enableAutoToolChoice","toolCallParser","reasoningParser","enablePrefixCaching")),c(7),p("changed",n.isControlChanged("trustRemoteCode")),y(),c(2),p("changed",n.isControlChanged("enableAutoToolChoice")),y(),c(3),p("changed",n.isControlChanged("toolCallParser")),c(),x("disabled",n.isToolCallParserDisabled()),y(),c(),he(n.toolCallParsers),c(4),p("changed",n.isControlChanged("reasoningParser")),c(),y(),c(),he(n.reasoningParsers),c(4),p("changed",n.isControlChanged("enablePrefixCaching")),c(),y(),c(9),p("has-changed",n.isSectionChanged("host","port","apiKey")),c(5),p("changed",n.isControlChanged("host")),c(),x("matAutocomplete",h),y(),c(5),he(n.filteredHosts()),c(2),p("changed",n.isControlChanged("port")),c(),y(),c(3),p("changed",n.isControlChanged("apiKey")),c(),y(),c(3),p("has-changed",n.isSectionChanged("extraFlags","envText")),c(6),p("changed",n.isControlChanged("extraFlags")),c(),y(),c(3),p("changed",n.isControlChanged("envText")),c(),y(),c(6),x("disabled",n.form.invalid),c(),pe(" ",n.isEdit&&!n.isClone?"Save":"Create"," ")}},dependencies:[Pe,pn,xo,Ri,xa,Oi,un,oc,nc,fn,Wt,Gi,Dn,wn,Ct,Ki,Ke,Xe,Fo,zc,Fs,Ga,Rs,Ps,Os,At,Et,Lt,gn,oi,ni,bt,Bt,zt,si,Vo,Lo,Ns,$a],styles:['@charset "UTF-8";.vllm-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;min-width:640px}.form-row[_ngcontent-%COMP%]{display:flex;gap:12px;margin-bottom:4px;align-items:center}.form-col[_ngcontent-%COMP%]{flex:1}.form-col-60[_ngcontent-%COMP%]{flex:3}.full-width[_ngcontent-%COMP%]{width:100%}.auto-path[_ngcontent-%COMP%]{font-family:monospace}.auto-from[_ngcontent-%COMP%]{margin-left:8px;opacity:.6;font-size:12px}.flags-textarea[_ngcontent-%COMP%], .env-textarea[_ngcontent-%COMP%]{overflow-x:auto}mat-dialog-content[_ngcontent-%COMP%]{padding-top:10px!important;max-height:80vh}mat-expansion-panel[_ngcontent-%COMP%]{margin-bottom:0}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}.subsection-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:#0009;margin:4px 0 14px;text-transform:uppercase;letter-spacing:.5px}mat-expansion-panel.has-changed[_ngcontent-%COMP%] mat-panel-title[_ngcontent-%COMP%]{font-weight:700}mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix input, mat-form-field.changed[_ngcontent-%COMP%] .mat-mdc-form-field-infix .mat-mdc-select{font-weight:700}mat-checkbox.changed[_ngcontent-%COMP%] label{font-weight:700}']})}}return i})();function li(i,o,e){let t=Bo(i,o);return t!==null?t:e}function Rt(i,o,e){let t=Bo(i,o);if(t!==null){let n=parseInt(t,10);return isNaN(n)?e:n}return e}function Zn(i,o,e){let t=Bo(i,o);if(t!==null){let n=parseFloat(t);return isNaN(n)?e:n}return e}function aC(i,o,e,t){let n=null;for(let a of i){let[r,...u]=a.split(/\s+/);r===o?u.join(" ").trim()==="false"?n="off":n="on":r===e&&(n="off")}return n??t}var rC=(i,o)=>o.name;function sC(i,o){if(i&1){let e=Se();s(0,"button",23),E("click",function(n){de(e);let a=C(2).$implicit;return C(2).control(a.name,"start"),me(n.stopPropagation())}),s(1,"mat-icon"),m(2,"play_arrow"),l(),m(3," Start "),l()}if(i&2){let e=C(2).$implicit,t=C(2);x("disabled",t.busy()?.name===e.name)}}function lC(i,o){if(i&1){let e=Se();s(0,"button",24),E("click",function(n){de(e);let a=C(2).$implicit;return C(2).control(a.name,"stop"),me(n.stopPropagation())}),s(1,"mat-icon"),m(2,"stop"),l(),m(3," Stop "),l()}if(i&2){let e=C(2).$implicit,t=C(2);x("disabled",t.busy()?.name===e.name)}}function cC(i,o){if(i&1){let e=Se();s(0,"button",25),E("click",function(n){de(e);let a=C(2).$implicit;return C(2).control(a.name,"disable"),me(n.stopPropagation())}),s(1,"mat-icon"),m(2,"lock"),l(),m(3," Disable "),l()}if(i&2){let e=C(2).$implicit,t=C(2);x("disabled",t.busy()?.name===e.name)}}function dC(i,o){if(i&1){let e=Se();s(0,"button",25),E("click",function(n){de(e);let a=C(2).$implicit;return C(2).control(a.name,"enable"),me(n.stopPropagation())}),s(1,"mat-icon"),m(2,"lock_open"),l(),m(3," Enable "),l()}if(i&2){let e=C(2).$implicit,t=C(2);x("disabled",e.enabled||t.busy()?.name===e.name)}}function mC(i,o){if(i&1&&(k(0,sC,4,1,"button",20)(1,lC,4,1,"button",21),k(2,cC,4,1,"button",22)(3,dC,4,1,"button",22)),i&2){let e=C().$implicit;M(e.running?1:0),c(2),M(e.enabled?2:3)}}function uC(i,o){if(i&1){let e=Se();s(0,"tr",13),E("click",function(){let n=de(e).$implicit,a=C(2);return me(a.selectedServiceService.select(n.name))}),s(1,"td")(2,"div",14),_(3,"span",15),s(4,"span",16),m(5),l()()(),s(6,"td",17),k(7,mC,4,2),l(),s(8,"td",17)(9,"div")(10,"button",18)(11,"mat-icon"),m(12,"more_vert"),l()(),s(13,"mat-menu",19,2)(15,"button",8),E("click",function(){let n=de(e).$implicit,a=C(2);return me(a.editService(n))}),s(16,"mat-icon"),m(17,"edit"),l(),s(18,"span"),m(19,"Edit"),l()(),s(20,"button",8),E("click",function(){let n=de(e).$implicit,a=C(2);return me(a.cloneService(n))}),s(21,"mat-icon"),m(22,"content_copy"),l(),s(23,"span"),m(24,"Clone"),l()(),s(25,"button",8),E("click",function(){let n=de(e).$implicit,a=C(2);return me(a.deleteService(n.name))}),s(26,"mat-icon"),m(27,"delete"),l(),s(28,"span"),m(29,"Delete"),l()()()()()()}if(i&2){let e=o.$implicit,t=Le(14);p("custom",e.hasConfig),c(3),p("running",e.running),c(),p("disabled",!e.enabled),c(),B(e.name),c(2),M(e.installed?7:-1),c(2),Ve("visibility",e.hasConfig?"visible":"hidden"),c(),x("matMenuTriggerFor",t)}}function hC(i,o){if(i&1&&(s(0,"table",10)(1,"tbody"),ue(2,uC,30,11,"tr",12,rC),l()()),i&2){let e=C();c(2),he(e.filtered())}}function pC(i,o){if(i&1&&(s(0,"p"),m(1),l()),i&2){let e=C(2);c(),pe('No services match "',e.filter().trim(),'".')}}function fC(i,o){i&1&&(s(0,"p"),m(1,'No services configured. Click "Managed services" to select system services or "Custom service" to create one.'),l())}function gC(i,o){if(i&1&&(s(0,"div",11),k(1,pC,2,1,"p")(2,fC,2,0,"p"),l()),i&2){let e=C();c(),M(e.filter().trim()?1:2)}}var Ip=(()=>{class i{constructor(){this.serviceService=d(yt),this.serviceList=d(Es),this.selectedServiceService=d(Ms),this.dialog=d(Io),this.snackBar=d(ks),this.services=this.serviceList.services,this.configs=T([]),this.loading=T(!0),this.busy=T(null),this.unified=$(()=>{let e=this.services(),t=this.configs(),n=new Map;for(let u of t)n.set(u.name,u);let a=e.filter(u=>n.has(u.name)).map(u=>{let h=n.get(u.name)??null;return{name:u.name,running:u.running,enabled:u.enabled,installed:u.installed,pid:u.pid,error:u.error,config:h,hasConfig:!0}}),r=e.filter(u=>!n.has(u.name)).map(u=>Fe(V({},u),{config:null,hasConfig:!1}));return[...a,...r]}),this.filter=T(""),this.filtered=$(()=>{let e=this.filter().trim().toLowerCase(),t=this.unified();return e?t.filter(n=>n.name.toLowerCase().includes(e)):t})}onFilterInput(e){this.filter.set(e.target.value)}ngOnInit(){this.load()}load(){return oe(this,null,function*(){this.loading.set(!0);try{yield this.serviceList.refresh(),this.configs.set(yield we(this.serviceService.fetchConfigs()))}catch(e){console.error("[ServicesComponent] load error:",e)}finally{this.loading.set(!1)}})}control(e,t){return oe(this,null,function*(){let n=this.busy();if(!(n&&n.name===e&&n.action===t)){this.selectedServiceService.select(e),this.busy.set({name:e,action:t});try{let a=yield we(this.serviceService.control(e,t));a.error&&this.showError(`${e}: ${a.error}`),yield this.load()}catch(a){this.showError(`${e}: ${String(a.error||a)}`)}finally{this.busy.set(null)}}})}showError(e){this.snackBar.open(e,"Dismiss",{duration:8e3,horizontalPosition:"center",verticalPosition:"top"})}manageServices(){this.dialog.open(pp,{maxWidth:"600px"}).afterClosed().subscribe(t=>{t&&this.load()})}archiveServices(){this.dialog.open(gp,{minWidth:"840px"}).afterClosed().subscribe(t=>{t&&this.load()})}addService(e){this.openDialog(null,e)}editService(e){this.selectedServiceService.select(e.name),this.openDialog(e.config,e.config?.type)}cloneService(e){if(!e.config)return;let t=Fe(V({},e.config),{name:this.uniqueCloneName(e.name)});this.openDialog(t,t.type,!0)}uniqueCloneName(e){let t=new Set(this.configs().map(a=>a.name));if(!t.has(`${e}-copy`))return`${e}-copy`;let n=2;for(;t.has(`${e}-copy-${n}`);)n++;return`${e}-copy-${n}`}deleteService(e){return oe(this,null,function*(){this.selectedServiceService.select(e);try{yield we(this.serviceService.deleteConfig(e)),yield this.load()}catch(t){this.showError(`Delete "${e}": ${String(t)}`)}})}hasFlags(e){return e.flags.length>0}openDialog(e,t,n=!1){let a=t??e?.type??"generic";if(a==="llama-server"){let r={config:e,allConfigs:this.configs(),clone:n},u=this.dialog.open(Ap,{data:r,minWidth:"800px"});this.handleDialogResult(u,e,n)}else if(a==="vllm"){let r={config:e,allConfigs:this.configs(),clone:n},u=this.dialog.open(Tp,{data:r,minWidth:"800px"});this.handleDialogResult(u,e,n)}else{let r={config:e,allConfigs:this.configs(),clone:n},u=this.dialog.open(lp,{data:r,minWidth:"1000px"});this.handleDialogResult(u,e,n)}}handleDialogResult(e,t,n=!1){e.afterClosed().subscribe(a=>oe(this,null,function*(){if(a)try{if(n)yield we(this.serviceService.saveConfig(a));else{let r=t?.name??null;if(r!==null&&r!==a.name){let h=this.unified().find(D=>D.name===r),g=h?.running??!1,v=h?.enabled??!1;yield we(this.serviceService.deleteConfig(r)),yield we(this.serviceService.saveConfig(a)),v&&(yield we(this.serviceService.control(a.name,"enable"))),g&&(yield we(this.serviceService.control(a.name,"start")))}else yield we(this.serviceService.saveConfig(a))}}catch(r){this.showError(`Save: ${String(r)}`)}finally{yield this.load()}}))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=I({type:i,selectors:[["app-services"]],decls:44,vars:4,consts:[["servicesMenu","matMenu"],["addMenu",""],["serviceMenu","matMenu"],[1,"services-card"],[1,"section-header"],["type","text","placeholder","Filter by name\u2026",1,"service-filter",3,"input","value"],["mat-icon-button","","title","Services actions",1,"header-menu-btn",3,"matMenuTriggerFor"],["xPosition","before"],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"matMenuTriggerFor"],[1,"services-list"],[1,"empty"],[3,"custom"],[3,"click"],[1,"service-name"],[1,"status-dot"],[1,"name-text"],[1,"service-actions-cell"],["mat-icon-button","","title","Service actions",3,"matMenuTriggerFor"],["yPosition","below"],["mat-raised-button","","color","primary",3,"disabled"],["mat-raised-button","","color","warn",3,"disabled"],["mat-stroked-button","",3,"disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["mat-raised-button","","color","warn",3,"click","disabled"],["mat-stroked-button","",3,"click","disabled"]],template:function(t,n){if(t&1&&(s(0,"div",3)(1,"div",4)(2,"h2"),m(3,"Services"),l(),s(4,"input",5),E("input",function(r){return n.onFilterInput(r)}),l(),s(5,"button",6)(6,"mat-icon"),m(7,"more_vert"),l()(),s(8,"mat-menu",7,0)(10,"button",8),E("click",function(){return n.manageServices()}),s(11,"mat-icon"),m(12,"tune"),l(),s(13,"span"),m(14,"Managed services"),l()(),s(15,"button",8),E("click",function(){return n.archiveServices()}),s(16,"mat-icon"),m(17,"archive"),l(),s(18,"span"),m(19,"Archive"),l()(),s(20,"button",9)(21,"mat-icon"),m(22,"add"),l(),s(23,"span"),m(24,"Custom service"),l()()(),s(25,"mat-menu",null,1)(27,"button",8),E("click",function(){return n.addService("generic")}),s(28,"mat-icon"),m(29,"settings"),l(),s(30,"span"),m(31,"Generic service"),l()(),s(32,"button",8),E("click",function(){return n.addService("llama-server")}),s(33,"mat-icon"),m(34,"smart_toy"),l(),s(35,"span"),m(36,"llama-server"),l()(),s(37,"button",8),E("click",function(){return n.addService("vllm")}),s(38,"mat-icon"),m(39,"bolt"),l(),s(40,"span"),m(41,"vllm"),l()()()(),k(42,hC,4,0,"table",10)(43,gC,3,1,"div",11),l()),t&2){let a=Le(9),r=Le(26);c(4),x("value",n.filter()),c(),x("matMenuTriggerFor",a),c(15),x("matMenuTriggerFor",r),c(22),M(n.filtered().length>0?42:n.loading()?-1:43)}},dependencies:[Pe,Ke,Xe,_i,Mo,Ss,xn,Kn,Ds,vt,_t],styles:[".section-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;margin-top:8px}.section-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;color:#333}.section-header[_ngcontent-%COMP%] .header-menu-btn[_ngcontent-%COMP%]{color:#666}.section-header[_ngcontent-%COMP%] .service-filter[_ngcontent-%COMP%]{flex:1 1 240px;max-width:320px;min-width:140px;margin:0 16px;padding:6px 12px;font-size:.9rem;border:1px solid #cfcfcf;border-radius:16px;outline:none;background:#fff;transition:border-color .15s ease,box-shadow .15s ease}.section-header[_ngcontent-%COMP%] .service-filter[_ngcontent-%COMP%]::placeholder{color:#9e9e9e}.section-header[_ngcontent-%COMP%] .service-filter[_ngcontent-%COMP%]:focus{border-color:#7c4dff;box-shadow:0 0 0 2px #7c4dff26}.services-list[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.services-list[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid #e0e0e0;transition:background-color .2s ease}.services-list[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#fff}.services-list[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child{border-bottom:none}.services-list[_ngcontent-%COMP%] tr.custom[_ngcontent-%COMP%], .services-list[_ngcontent-%COMP%] tr.custom[_ngcontent-%COMP%]:first-child td[_ngcontent-%COMP%]:first-child{border-left:3px solid #7c4dff}.services-list[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:4px 12px;vertical-align:middle}.service-name[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;white-space:nowrap;display:flex;align-items:center;gap:8px}.service-name[_ngcontent-%COMP%] .status-dot[_ngcontent-%COMP%]{display:inline-block;width:10px;height:10px;border-radius:50%;background-color:#bdbdbd}.service-name[_ngcontent-%COMP%] .status-dot.running[_ngcontent-%COMP%]{background-color:#4caf50}.service-name[_ngcontent-%COMP%] .name-text[_ngcontent-%COMP%]{color:#212121}.service-name[_ngcontent-%COMP%] .name-text.disabled[_ngcontent-%COMP%]{color:#9e9e9e}.service-actions-cell[_ngcontent-%COMP%]{white-space:nowrap}.service-actions-cell[_ngcontent-%COMP%] button[_ngcontent-%COMP%] + button[_ngcontent-%COMP%]{margin-left:8px}.status-chip[_ngcontent-%COMP%], .enabled-chip[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500}.status-chip.running[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #a5d6a7}.status-chip.stopped[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #ef9a9a}.enabled-chip.enabled[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #90caf9}.enabled-chip.disabled[_ngcontent-%COMP%]{--mat-chip-elevated-container-color: #bdbdbd}.empty[_ngcontent-%COMP%]{text-align:center;padding:24px;color:#999;font-size:.9rem}.empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}"]})}}return i})();var _C=["journalBody"],vC=(i,o)=>o.name;function bC(i,o){if(i&1&&(s(0,"mat-option",7),m(1),l()),i&2){let e=o.$implicit;x("value",e.name),c(),B(e.name)}}function yC(i,o){if(i&1){let e=Se();s(0,"button",10),E("click",function(){de(e);let n=C(2);return me(n.toggleWordWrap())}),s(1,"mat-icon"),m(2,"wrap_text"),l()()}}function CC(i,o){if(i&1){let e=Se();s(0,"button",11),E("click",function(){de(e);let n=C(2);return me(n.toggleWordWrap())}),s(1,"mat-icon"),m(2,"wrap_text"),l()()}}function xC(i,o){if(i&1){let e=Se();s(0,"mat-select",6),E("ngModelChange",function(n){de(e);let a=C();return me(a.onServiceChange(n))}),s(1,"mat-option",7),m(2,"\u2014 None \u2014"),l(),ue(3,bC,2,2,"mat-option",7,vC),l(),b(),k(5,yC,3,0,"button",8)(6,CC,3,0,"button",9)}if(i&2){let e=C();x("ngModel",e.selectedService()),y(),c(),x("value",null),c(2),he(e.services()),c(2),M(e.wordWrap()?5:6)}}function wC(i,o){if(i&1&&(s(0,"div",3),m(1),l()),i&2){let e=C();c(),B(e.error())}}function DC(i,o){if(i&1&&(s(0,"div",4,0)(2,"pre"),m(3),l()()),i&2){let e=C();c(2),p("wrap-on",e.wordWrap()),c(),B(e.journalText())}}function SC(i,o){i&1&&(s(0,"div",5)(1,"p"),m(2,"No service selected"),l()())}var kC=40,Rp=(()=>{class i{toggleWordWrap(){this.wordWrap.update(e=>!e)}constructor(){this.serviceService=d(yt),this.selectedServiceService=d(Ms),this.serviceList=d(Es),this.cdr=d(ie),this.services=this.serviceList.services,this.servicesLoaded=this.serviceList.loaded,this.journalLines=T([]),this.journalLoading=T(!1),this.journalError=T(null),this.error=$(()=>this.serviceList.error()??this.journalError()),this.selectedService=$(()=>this.selectedServiceService.selectedService()),this.wordWrap=T(!0),this.journalText=$(()=>{let e=this.journalLines();return e.length===0?"":e.map(t=>t.timestamp?`${t.timestamp} ${t.message}`:t.message).join(`
5598
+ `)}),Ut(()=>{if(!this.servicesLoaded())return;let e=this.selectedService();e!==null&&!this.services().some(t=>t.name===e)&&this.selectedServiceService.select(null)}),Ut(()=>{if(!this.servicesLoaded())return;this.selectedService()?(this.journalLines.set([]),this.journalError.set(null),this.restartPolling()):(this.stopPolling(),this.journalLines.set([]))}),this.serviceList.refresh()}ngAfterViewInit(){this.scrollToBottom()}ngOnDestroy(){this.stopPolling()}onServiceChange(e){this.selectedServiceService.select(e)}restartPolling(){this.stopPolling(),this.fetchJournal(),this.journalSub=Qa(0,1e3).subscribe(()=>this.fetchJournal())}stopPolling(){this.journalSub&&(this.journalSub.unsubscribe(),this.journalSub=void 0)}fetchJournal(){let e=this.selectedService();e&&(this.isTextSelected()||(this.journalLoading.set(!0),this.serviceService.fetchJournal(e,100).subscribe({next:t=>{let n=this.isScrolledToBottom();this.journalLines.set(t),this.journalError.set(null),this.journalLoading.set(!1),this.cdr.markForCheck(),requestAnimationFrame(()=>{n&&this.scrollToBottom()})},error:t=>{this.journalError.set(t.message),this.journalLoading.set(!1),this.cdr.markForCheck()}})))}get scrollContainer(){return this.journalBody?.nativeElement??null}isTextSelected(){let e=typeof window<"u"?window:null;if(!e)return!1;let t=e.getSelection();if(!t||t.isCollapsed||!t.rangeCount)return!1;let n=this.scrollContainer;return n?n.contains(t.anchorNode):!1}isScrolledToBottom(){let e=this.scrollContainer;return e?e.scrollHeight-e.scrollTop-e.clientHeight<=kC:!0}scrollToBottom(){let e=this.scrollContainer;e&&(e.scrollTop=e.scrollHeight)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=I({type:i,selectors:[["app-journal-panel"]],viewQuery:function(t,n){if(t&1&&Ae(_C,5),t&2){let a;P(a=F())&&(n.journalBody=a.first)}},decls:9,vars:3,consts:[["journalBody",""],[1,"journal-card"],[1,"journal-header"],[1,"journal-error"],[1,"journal-body"],[1,"journal-body","journal-empty"],["disableOptionCentering","",1,"service-select",3,"ngModelChange","ngModel"],[3,"value"],["mat-flat-button","","color","primary","aria-label","Disable word wrap"],["mat-stroked-button","","aria-label","Enable word wrap"],["mat-flat-button","","color","primary","aria-label","Disable word wrap",3,"click"],["mat-stroked-button","","aria-label","Enable word wrap",3,"click"]],template:function(t,n){t&1&&(s(0,"mat-card",1)(1,"mat-card-content")(2,"div",2)(3,"h2"),m(4,"Journal"),l(),k(5,xC,7,3),l(),k(6,wC,2,1,"div",3),k(7,DC,4,3,"div",4)(8,SC,3,0,"div",5),l()()),t&2&&(c(5),M(n.servicesLoaded()&&n.services().length>0?5:-1),c(),M(n.error()?6:-1),c(),M(n.selectedService()?7:8))},dependencies:[Pe,an,nn,on,Vo,Lo,Ct,Ke,Xe,vt,_t,ti,pn,Oi,rc],styles:[".journal-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;overflow:hidden}.journal-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;overflow:hidden;padding-bottom:8px}.journal-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;margin-bottom:12px;flex-shrink:0}.journal-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:20px;font-weight:500}.service-select[_ngcontent-%COMP%]{flex:1;min-width:150px}.journal-error[_ngcontent-%COMP%]{color:#f44336;font-size:13px;margin-bottom:8px;flex-shrink:0}.journal-body[_ngcontent-%COMP%]{flex:1;overflow-y:auto;background:#1e1e1e;border-radius:4px;padding:8px;min-height:0}.journal-body[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px}.journal-body[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#2d2d2d;border-radius:4px}.journal-body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#555;border-radius:4px}.journal-body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#777}.journal-body[_ngcontent-%COMP%]{scrollbar-width:thin;scrollbar-color:#555 #2d2d2d}.journal-body[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0;font-family:Courier New,Courier,monospace;font-size:12px;line-height:1.6;color:#d4d4d4;white-space:pre}.journal-body[_ngcontent-%COMP%] pre.wrap-on[_ngcontent-%COMP%]{white-space:pre-wrap}.journal-empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.journal-empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:#888;font-size:14px}[_nghost-%COMP%] .mdc-button{min-width:32px}[_nghost-%COMP%] .mat-mdc-unelevated-button>.mat-icon, [_nghost-%COMP%] .mat-mdc-outlined-button>.mat-icon{margin-right:0}"]})}}return i})();var Ls=(()=>{class i{constructor(){this.http=d(Ft),this.baseUrl="/api/system"}reboot(){return oe(this,null,function*(){yield we(this.http.post(`${this.baseUrl}/reboot`,null))})}shutdown(){return oe(this,null,function*(){yield we(this.http.post(`${this.baseUrl}/shutdown`,null))})}getSystemInfo(){return oe(this,null,function*(){return we(this.http.get(`${this.baseUrl}/info`))})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Vs=(()=>{class i{constructor(){this.http=d(Ft),this.baseUrl="/api/hf"}getStatus(){return oe(this,null,function*(){return we(this.http.get(`${this.baseUrl}/status`))})}getDownloads(){return oe(this,null,function*(){return we(this.http.get(`${this.baseUrl}/downloads`))})}action(e,t){return oe(this,null,function*(){yield we(this.http.post(`${this.baseUrl}/downloads/action`,{action:e,repoId:t.repoId,dest:t.dest}))})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var MC=(i,o)=>o.device,EC=(i,o)=>o.path;function AC(i,o){i&1&&_(0,"mat-progress-bar",2)}function TC(i,o){if(i&1&&(s(0,"p",3),m(1),l()),i&2){let e=C();c(),B(e.error())}}function IC(i,o){if(i&1&&(s(0,"span",11),m(1),l()),i&2){let e=C(2);c(),B(e.info().uptime)}}function RC(i,o){if(i&1&&(s(0,"div",12)(1,"span",13),m(2,"Version"),l(),s(3,"span",14),m(4),l()()),i&2){let e=C(2);c(4),B(e.info().os.version)}}function OC(i,o){if(i&1&&(s(0,"div",16)(1,"div",18)(2,"span",19),m(3),l(),s(4,"span",20),m(5),l()(),s(6,"div",21),_(7,"div",22),l(),s(8,"div",23)(9,"span"),m(10),l(),s(11,"span"),m(12),l()()()),i&2){let e=o.$implicit,t=C(2);c(3),B(e.device),c(2),B(e.mountPoint),c(2),Ve("width",e.usePercent,"%")("background",e.usePercent>90?"#f44336":e.usePercent>75?"#ff9800":"#4caf50"),c(3),Mi("",t.formatBytes(e.available)," free of ",t.formatBytes(e.total)),c(2),pe("",e.usePercent,"% used")}}function PC(i,o){if(i&1&&(s(0,"div",27)(1,"span",31),m(2,"Last"),l(),s(3,"span",32),m(4),Go(5,"date"),l()()),i&2){let e=C(3);c(4),B($o(5,1,e.info().timeshift.lastSnapshot,"medium"))}}function FC(i,o){if(i&1&&(s(0,"mat-chip",33),m(1),l()),i&2){let e=o.$implicit;c(),B(e)}}function NC(i,o){if(i&1&&(s(0,"mat-chip-set"),ue(1,FC,2,1,"mat-chip",33,St),l()),i&2){let e=C(3);c(),he(e.info().timeshift.schedules)}}function LC(i,o){if(i&1&&(s(0,"div",6)(1,"h3"),m(2,"Timeshift Backup"),l(),s(3,"div",7)(4,"div",8)(5,"mat-chip-set")(6,"mat-chip",24),m(7),l(),s(8,"mat-chip",25),m(9),l()(),s(10,"span",26),m(11),l()(),k(12,PC,6,4,"div",27),s(13,"div",28),_(14,"div",29),l(),s(15,"div",30)(16,"span"),m(17),l(),k(18,NC,3,0,"mat-chip-set"),l()()(),_(19,"mat-divider",15)),i&2){let e=C(2);c(7),B(e.info().timeshift.mode),c(2),B(e.info().timeshift.device),c(2),pe("",e.info().timeshift.snapshots," snapshots"),c(),M(e.info().timeshift.lastSnapshot?12:-1),c(2),Ve("width",e.info().timeshift.totalSpace>0?(e.info().timeshift.totalSpace-e.info().timeshift.freeSpace)/e.info().timeshift.totalSpace*100:0,"%")("background",e.info().timeshift.totalSpace>0&&(e.info().timeshift.totalSpace-e.info().timeshift.freeSpace)/e.info().timeshift.totalSpace>.9?"#f44336":e.info().timeshift.totalSpace>0&&(e.info().timeshift.totalSpace-e.info().timeshift.freeSpace)/e.info().timeshift.totalSpace>.75?"#ff9800":"#4caf50"),c(3),Mi("",e.formatBytes(e.info().timeshift.freeSpace)," free of ",e.formatBytes(e.info().timeshift.totalSpace)),c(),M(e.info().timeshift.schedules.length>0?18:-1)}}function VC(i,o){if(i&1&&m(0),i&2){let e=C().$implicit,t=C(2);pe(" ",t.formatBytes(e.size)," ")}}function BC(i,o){i&1&&m(0," \u2014 ")}function zC(i,o){if(i&1&&(s(0,"div",17)(1,"span",34),m(2),l(),s(3,"span",35),k(4,VC,1,1)(5,BC,1,0),l()()),i&2){let e=o.$implicit;c(2),B(e.path),c(2),M(e.exists?4:5)}}function jC(i,o){if(i&1&&(s(0,"div",6)(1,"h3"),m(2,"Operating System"),l(),s(3,"div",7)(4,"div",8)(5,"mat-chip-set")(6,"mat-chip",9),m(7),l(),s(8,"mat-chip",10),m(9),l()(),k(10,IC,2,1,"span",11),l(),k(11,RC,5,1,"div",12),s(12,"div",12)(13,"span",13),m(14,"Kernel"),l(),s(15,"span",14),m(16),l()()()(),_(17,"mat-divider",15),s(18,"div",6)(19,"h3"),m(20,"Disks"),l(),ue(21,OC,13,9,"div",16,MC),l(),_(23,"mat-divider",15),k(24,LC,20,11),s(25,"div",6)(26,"h3"),m(27,"System Logs"),l(),ue(28,zC,6,2,"div",17,EC),l()),i&2){let e=C();c(7),B(e.info().hostname),c(2),B(e.info().os.name),c(),M(e.info().uptime?10:-1),c(),M(e.info().os.version?11:-1),c(5),B(e.info().kernel),c(5),he(e.info().disks),c(3),M(e.info().timeshift?24:-1),c(4),he(e.info().logs)}}var Op=(()=>{class i{constructor(){this.systemService=d(Ls),this.dialogRef=d(ut),this.loading=T(!0),this.info=T(null),this.error=T(null)}ngOnInit(){return oe(this,null,function*(){try{let e=yield this.systemService.getSystemInfo();this.info.set(e)}catch(e){this.error.set(e instanceof Error?e.message:"Failed to load system info")}finally{this.loading.set(!1)}})}formatBytes(e){return e===0?"0 B":`${(e/(1024*1024*1024)).toFixed(1)} GB`}close(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=I({type:i,selectors:[["app-system-info-dialog"]],decls:12,vars:1,consts:[[1,"dialog-container"],["mat-dialog-title",""],["mode","indeterminate"],[1,"dialog-error"],["align","end"],["mat-raised-button","","color","primary",3,"click"],[1,"info-section"],[1,"info-card"],[1,"info-card-header"],[1,"hostname-chip"],[1,"distro-chip"],[1,"os-uptime"],[1,"info-row"],[1,"info-label"],[1,"info-value"],[1,"section-divider"],[1,"disk-row"],[1,"log-row"],[1,"disk-header"],[1,"disk-device"],[1,"disk-mount"],[1,"disk-bar-bg"],[1,"disk-bar-fill"],[1,"disk-details"],[1,"mode-chip"],[1,"device-chip"],[1,"timeshift-snapshots"],[1,"timeshift-row"],[1,"timeshift-disk-bar-bg"],[1,"timeshift-disk-bar-fill"],[1,"timeshift-disk-details"],[1,"timeshift-label"],[1,"timeshift-value"],[1,"schedule-chip"],[1,"log-path"],[1,"log-size"]],template:function(t,n){t&1&&(s(0,"div",0)(1,"h2",1)(2,"mat-icon"),m(3,"info"),l(),m(4," System Info "),l(),s(5,"mat-dialog-content"),k(6,AC,1,0,"mat-progress-bar",2)(7,TC,2,1,"p",3)(8,jC,30,6),l(),s(9,"mat-dialog-actions",4)(10,"button",5),E("click",function(){return n.close()}),m(11,"OK"),l()()()),t&2&&(c(6),M(n.loading()?6:n.error()?7:n.info()?8:-1))},dependencies:[Pe,Ke,Xe,bt,Bt,zt,si,ti,Ti,No,Ua,vt,_t,Mo,Ra,Rh,ml],styles:[".dialog-container[_ngcontent-%COMP%]{min-width:480px}.dialog-error[_ngcontent-%COMP%]{color:#f44336;padding:8px 0}.info-section[_ngcontent-%COMP%]{margin-bottom:8px}.info-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 8px;font-size:14px;font-weight:600;color:#666;text-transform:uppercase;letter-spacing:.5px}.info-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:4px 0}.info-row[_ngcontent-%COMP%] .info-label[_ngcontent-%COMP%]{color:#666;font-size:14px}.info-row[_ngcontent-%COMP%] .info-value[_ngcontent-%COMP%]{font-family:monospace;font-size:13px;color:#333}.section-divider[_ngcontent-%COMP%]{margin:12px 0}.disk-row[_ngcontent-%COMP%]{margin-bottom:12px}.disk-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:4px}.disk-header[_ngcontent-%COMP%] .disk-device[_ngcontent-%COMP%]{font-family:monospace;font-size:13px}.disk-header[_ngcontent-%COMP%] .disk-mount[_ngcontent-%COMP%]{font-size:13px;color:#666}.disk-bar-bg[_ngcontent-%COMP%]{height:6px;background:#e0e0e0;border-radius:3px;overflow:hidden;margin-bottom:2px}.disk-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:3px}.disk-details[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:12px;color:#666}.info-card[_ngcontent-%COMP%]{background:#f5f5f5;border-radius:8px;padding:12px}.info-card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.info-card-header[_ngcontent-%COMP%] .hostname-chip[_ngcontent-%COMP%]{font-family:monospace;background:#e8eaf6!important;color:#303f9f!important}.info-card-header[_ngcontent-%COMP%] .distro-chip[_ngcontent-%COMP%], .info-card-header[_ngcontent-%COMP%] .mode-chip[_ngcontent-%COMP%]{font-weight:600;background:#e3f2fd!important;color:#1976d2!important}.info-card-header[_ngcontent-%COMP%] .device-chip[_ngcontent-%COMP%]{font-family:monospace;background:#e8eaf6!important;color:#303f9f!important}.os-uptime[_ngcontent-%COMP%], .timeshift-snapshots[_ngcontent-%COMP%]{font-size:13px;color:#666;white-space:nowrap}.timeshift-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:4px 0;margin-bottom:6px}.timeshift-row[_ngcontent-%COMP%] .timeshift-label[_ngcontent-%COMP%]{color:#666;font-size:13px}.timeshift-row[_ngcontent-%COMP%] .timeshift-value[_ngcontent-%COMP%]{font-size:13px;color:#333}.timeshift-disk-bar-bg[_ngcontent-%COMP%]{height:6px;background:#e0e0e0;border-radius:3px;overflow:hidden;margin-bottom:4px}.timeshift-disk-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:3px}.timeshift-disk-details[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#666}.timeshift-disk-details[_ngcontent-%COMP%] .schedule-chip[_ngcontent-%COMP%]{font-size:11px;background:#fff3e0!important;color:#e65100!important}.log-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:4px 0}.log-row[_ngcontent-%COMP%] .log-path[_ngcontent-%COMP%]{font-family:monospace;font-size:13px}.log-row[_ngcontent-%COMP%] .log-size[_ngcontent-%COMP%]{font-family:monospace;font-size:13px;color:#333}"]})}}return i})();var HC=(i,o)=>o.repoId+o.dest;function UC(i,o){i&1&&(s(0,"div",6),m(1),l()),i&2&&(c(),B(o))}function GC(i,o){i&1&&(s(0,"div",7),m(1,"Loading\u2026"),l())}function $C(i,o){i&1&&(s(0,"div",7)(1,"mat-icon"),m(2,"cloud_off"),l(),s(3,"div"),m(4,"No active downloads"),l()())}function WC(i,o){if(i&1&&(s(0,"span",16),m(1),l()),i&2){let e=C().$implicit;c(),pe("pid ",e.pids.join(", "))}}function qC(i,o){if(i&1){let e=Se();s(0,"button",28),E("click",function(){de(e);let n=C().$implicit,a=C(2);return me(a.resume(n))}),s(1,"mat-icon"),m(2,"play_arrow"),l()()}}function KC(i,o){if(i&1){let e=Se();s(0,"button",29),E("click",function(){de(e);let n=C().$implicit,a=C(2);return me(a.pause(n))}),s(1,"mat-icon"),m(2,"pause"),l()()}}function YC(i,o){if(i&1){let e=Se();s(0,"div",11)(1,"div",12)(2,"div",13)(3,"span",14),m(4),l(),s(5,"span",15),m(6),l(),k(7,WC,2,1,"span",16),l(),s(8,"div",17),m(9),l(),_(10,"mat-progress-bar",18),s(11,"div",19)(12,"span",20),m(13),l(),s(14,"span",21),m(15),l(),s(16,"span",22),m(17),l(),s(18,"span",23),m(19),l()()(),s(20,"div",24),k(21,qC,3,0,"button",25)(22,KC,3,0,"button",26),s(23,"button",27),E("click",function(){let n=de(e).$implicit,a=C(2);return me(a.cancel(n))}),s(24,"mat-icon"),m(25,"cancel"),l()()()()}if(i&2){let e=o.$implicit,t=C(2);c(4),B(e.repoId),c(),p("paused",e.status==="paused"),c(),B(e.status),c(),M(e.pids.length>0?7:-1),c(),x("title",e.dest),c(),B(e.dest),c(),x("mode",t.progressMode(e))("value",t.percent(e)??0),c(3),Mi(" ",t.formatBytes(e.doneBytes)," / ",e.totalBytes>0?t.formatBytes(e.totalBytes):"\u2026"," "),c(2),Mi("",e.filesDone," / ",e.filesTotal," files"),c(2),B(t.formatSpeed(e.speedBps)),c(2),B(e.status==="paused"?"paused":"\u2248 "+t.formatEta(e.etaSeconds)),c(2),M(e.status==="paused"?21:22)}}function XC(i,o){if(i&1&&(s(0,"div",8),ue(1,YC,26,16,"div",11,HC),l()),i&2){let e=C();c(),he(e.downloads())}}var ZC=2e3,Pp=(()=>{class i{constructor(){this.hfService=d(Vs),this.dialogRef=d(ut),this.downloads=T([]),this.loading=T(!0),this.error=T(null),this.timer=null,this.busy=!1}ngOnInit(){this.refresh(),this.timer=setInterval(()=>{this.refresh()},ZC)}ngOnDestroy(){this.timer&&clearInterval(this.timer)}refresh(){return oe(this,null,function*(){try{this.downloads.set(yield this.hfService.getDownloads()),this.error.set(null)}catch(e){this.error.set(e instanceof Error?e.message:"Failed to load HF downloads")}finally{this.loading.set(!1)}})}pause(e){return oe(this,null,function*(){yield this.act("pause",e)})}resume(e){return oe(this,null,function*(){yield this.act("resume",e)})}cancel(e){return oe(this,null,function*(){confirm(`Cancel download of ${e.repoId}? Partial files will be kept for resume.`)&&(yield this.act("cancel",e))})}act(e,t){return oe(this,null,function*(){if(!this.busy){this.busy=!0;try{yield this.hfService.action(e,t),yield this.refresh()}catch(n){this.error.set(n instanceof Error?n.message:`Failed to ${e} download`)}finally{this.busy=!1}}})}percent(e){return e.totalBytes<=0?null:Math.min(100,e.doneBytes/e.totalBytes*100)}progressMode(e){return e.totalBytes>0?"determinate":"indeterminate"}formatBytes(e){if(e<=0)return"0 B";let t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}formatSpeed(e){return e<=0?"\u2014":`${(e/(1024*1024)).toFixed(1)} MB/s`}formatEta(e){if(e===null)return"\u2014";if(e<60)return`${e} s`;let t=Math.floor(e/3600),n=Math.round(e%3600/60);return t>0?`${t} h ${n} m`:`${n} m`}close(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=I({type:i,selectors:[["app-hf-downloads-dialog"]],decls:19,vars:2,consts:[[1,"hf-dialog"],[1,"dialog-header"],[1,"header-icon"],["mat-dialog-title",""],[1,"header-sub"],["mat-icon-button","","aria-label","Close",3,"click"],[1,"error"],[1,"state"],[1,"download-list"],["align","end"],["mat-button","",3,"click"],[1,"download-row"],[1,"row-main"],[1,"row-title"],[1,"repo"],[1,"status-chip"],[1,"pids"],[1,"row-dest",3,"title"],[3,"mode","value"],[1,"row-meta"],[1,"progress-text"],[1,"files"],[1,"speed"],[1,"eta"],[1,"row-actions"],["mat-icon-button","","color","primary","title","Resume"],["mat-icon-button","","title","Pause"],["mat-icon-button","","color","warn","title","Cancel",3,"click"],["mat-icon-button","","color","primary","title","Resume",3,"click"],["mat-icon-button","","title","Pause",3,"click"]],template:function(t,n){if(t&1&&(s(0,"div",0)(1,"div",1)(2,"mat-icon",2),m(3,"download"),l(),s(4,"div")(5,"h2",3),m(6,"HF Downloads"),l(),s(7,"div",4),m(8,"Active `hf download` processes on this server"),l()(),s(9,"button",5),E("click",function(){return n.close()}),s(10,"mat-icon"),m(11,"close"),l()()(),k(12,UC,2,1,"div",6),k(13,GC,2,0,"div",7)(14,$C,5,0,"div",7)(15,XC,3,0,"div",8),s(16,"mat-dialog-actions",9)(17,"button",10),E("click",function(){return n.close()}),m(18,"Close"),l()()()),t&2){let a;c(12),M((a=n.error())?12:-1,a),c(),M(n.loading()?13:n.downloads().length===0?14:15)}},dependencies:[Pe,Ke,Xe,_i,bt,Bt,zt,ti,Ti,vt,_t],styles:[".hf-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:220px;padding:8px 0 0}.dialog-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:0 8px 12px 0}.dialog-header[_ngcontent-%COMP%] .header-icon[_ngcontent-%COMP%]{font-size:28px;width:28px;height:28px;color:#1976d2}.dialog-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:500;color:#333}.dialog-header[_ngcontent-%COMP%] .header-sub[_ngcontent-%COMP%]{font-size:12px;color:#666}.dialog-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-left:auto}.error[_ngcontent-%COMP%]{margin:0 8px 12px;padding:8px 12px;border-radius:6px;background:#f443361a;color:#d32f2f;font-size:13px}.state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:8px;padding:40px 0;color:#999;font-size:14px}.state[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:36px;width:36px;height:36px}.download-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding:0 8px;max-height:55vh;overflow-y:auto}.download-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:12px;border-radius:8px;border:1px solid #e0e0e0;background:#fafafa}.download-row[_ngcontent-%COMP%] .row-main[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.download-row[_ngcontent-%COMP%] .row-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.download-row[_ngcontent-%COMP%] .row-title[_ngcontent-%COMP%] .repo[_ngcontent-%COMP%]{font-weight:500;font-size:14px;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.download-row[_ngcontent-%COMP%] .row-title[_ngcontent-%COMP%] .pids[_ngcontent-%COMP%]{font-size:11px;color:#999}.download-row[_ngcontent-%COMP%] .status-chip[_ngcontent-%COMP%]{font-size:10px;text-transform:uppercase;letter-spacing:.4px;padding:2px 8px;border-radius:10px;background:#e8f5e9;color:#2e7d32}.download-row[_ngcontent-%COMP%] .status-chip.paused[_ngcontent-%COMP%]{background:#fff3e0;color:#e65100}.download-row[_ngcontent-%COMP%] .row-dest[_ngcontent-%COMP%]{font-family:monospace;font-size:11px;color:#999;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.download-row[_ngcontent-%COMP%] mat-progress-bar[_ngcontent-%COMP%]{margin:4px 0}.download-row[_ngcontent-%COMP%] .row-meta[_ngcontent-%COMP%]{display:flex;gap:16px;font-size:12px;color:#333}.download-row[_ngcontent-%COMP%] .row-meta[_ngcontent-%COMP%] .files[_ngcontent-%COMP%], .download-row[_ngcontent-%COMP%] .row-meta[_ngcontent-%COMP%] .speed[_ngcontent-%COMP%], .download-row[_ngcontent-%COMP%] .row-meta[_ngcontent-%COMP%] .eta[_ngcontent-%COMP%]{color:#666}.download-row[_ngcontent-%COMP%] .row-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}mat-dialog-actions[_ngcontent-%COMP%]{padding:12px 8px 4px}"]})}}return i})();function QC(i,o){if(i&1){let e=Se();s(0,"button",14),E("click",function(){de(e);let n=C();return me(n.openHfDownloads())}),s(1,"mat-icon"),m(2,"download"),l(),s(3,"span"),m(4,"HF Downloads"),l()()}}var Fp=(()=>{class i{constructor(){this.systemInfo=ro.required(),this.systemService=d(Ls),this.hfService=d(Vs),this.dialog=d(Io),this.layoutService=d(rs),this.layout=$(()=>this.layoutService.layout()),this.hfInstalled=T(!1)}ngOnInit(){this.hfService.getStatus().then(e=>this.hfInstalled.set(e.installed)).catch(()=>this.hfInstalled.set(!1))}setLayout(e){this.layoutService.setLayout(e)}openSystemInfo(){this.dialog.open(Op,{disableClose:!1})}openHfDownloads(){this.dialog.open(Pp,{width:"760px",maxWidth:"95vw",disableClose:!1})}reboot(){return oe(this,null,function*(){confirm("Reboot the server?")&&(yield this.systemService.reboot())})}shutdown(){return oe(this,null,function*(){confirm("Shutdown the server?")&&(yield this.systemService.shutdown())})}formatBytes(e){let t=e/1073741824;return`${Math.ceil(t)} GB`}ceilCpu(e){return Math.ceil(e)}colorForUsage(e){return e<40?"#4caf50":e<75?"#ff9800":"#f44336"}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=I({type:i,selectors:[["app-system-bar"]],inputs:{systemInfo:[1,"systemInfo"]},decls:61,vars:19,consts:[["menu","matMenu"],[1,"system-bar"],[1,"system-panel"],[1,"panel-body"],[1,"panel-icon"],[1,"panel-content"],[1,"panel-header"],[1,"panel-label"],[1,"panel-value"],[1,"bar-bg"],[1,"bar-fill"],[1,"server-controls"],["mat-icon-button","","color","warn","title","Server actions",3,"matMenuTriggerFor"],["yPosition","below"],["mat-menu-item","",3,"click"],["mat-menu-item",""]],template:function(t,n){if(t&1&&(s(0,"div",1)(1,"mat-card",2)(2,"mat-card-content")(3,"div",3)(4,"mat-icon",4),m(5,"dynamic_feed"),l(),s(6,"div",5)(7,"div",6)(8,"span",7),m(9,"CPU"),l(),s(10,"span",8),m(11),l()(),s(12,"div",9),_(13,"div",10),l()()()()(),s(14,"mat-card",2)(15,"mat-card-content")(16,"div",3)(17,"mat-icon",4),m(18,"memory"),l(),s(19,"div",5)(20,"div",6)(21,"span",7),m(22,"RAM"),l(),s(23,"span",8),m(24),l()(),s(25,"div",9),_(26,"div",10),l()()()()(),s(27,"div",11)(28,"button",12)(29,"mat-icon"),m(30,"more_vert"),l()(),s(31,"mat-menu",13,0)(33,"button",14),E("click",function(){return n.reboot()}),s(34,"mat-icon"),m(35,"restart_alt"),l(),s(36,"span"),m(37,"Reboot server"),l()(),s(38,"button",14),E("click",function(){return n.shutdown()}),s(39,"mat-icon"),m(40,"power_settings_new"),l(),s(41,"span"),m(42,"Shutdown server"),l()(),_(43,"mat-divider"),s(44,"button",14),E("click",function(){return n.setLayout("vertical")}),s(45,"mat-icon"),m(46),l(),s(47,"span"),m(48,"Layout: vertical"),l()(),s(49,"button",14),E("click",function(){return n.setLayout("horizontal")}),s(50,"mat-icon"),m(51),l(),s(52,"span"),m(53,"Layout: horizontal"),l()(),_(54,"mat-divider"),s(55,"button",14),E("click",function(){return n.openSystemInfo()}),s(56,"mat-icon"),m(57,"info"),l(),s(58,"span"),m(59,"System info"),l()(),k(60,QC,5,0,"button",15),l()()()),t&2){let a=Le(32);c(10),Ve("color",n.colorForUsage(n.systemInfo().cpuUsage)),c(),pe(" ",n.ceilCpu(n.systemInfo().cpuUsage),"% "),c(2),Ve("width",n.systemInfo().cpuUsage,"%")("background",n.colorForUsage(n.systemInfo().cpuUsage)),c(10),Ve("color",n.colorForUsage(n.systemInfo().memoryPercent)),c(),Mi(" ",n.formatBytes(n.systemInfo().memoryUsed)," / ",n.formatBytes(n.systemInfo().memoryTotal)," "),c(2),Ve("width",n.systemInfo().memoryPercent,"%")("background",n.colorForUsage(n.systemInfo().memoryPercent)),c(2),x("matMenuTriggerFor",a),c(18),B(n.layout()==="vertical"?"check":"radio_button_unchecked"),c(5),B(n.layout()==="horizontal"?"check":"radio_button_unchecked"),c(9),M(n.hfInstalled()?60:-1)}},dependencies:[Pe,an,nn,on,vt,_t,Ke,_i,Ss,xn,Kn,Ds,No,Ua,bt],styles:[".system-bar[_ngcontent-%COMP%]{display:flex;gap:16px;margin-bottom:16px;align-items:stretch}.system-panel[_ngcontent-%COMP%]{flex:1}.server-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.panel-body[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.panel-icon[_ngcontent-%COMP%]{color:#757575;font-size:24px;width:24px;height:24px}.panel-content[_ngcontent-%COMP%]{flex:1;min-width:0}.panel-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px}.panel-label[_ngcontent-%COMP%]{font-weight:500;font-size:.85rem;color:#555;text-transform:uppercase;letter-spacing:.5px}.panel-value[_ngcontent-%COMP%]{font-weight:500;font-size:.9rem;white-space:nowrap}.bar-bg[_ngcontent-%COMP%]{height:6px;background:#e0e0e0;border-radius:3px;overflow:hidden}.bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:3px;transition:width .4s ease,background .4s ease}"]})}}return i})();function JC(i,o){if(i&1&&(s(0,"div",8)(1,"mat-icon",10),m(2,"warning"),l(),m(3),l()),i&2){let e=C(2);c(3),pe(" ",e.loginError()," ")}}function ex(i,o){if(i&1){let e=Se();s(0,"div",0)(1,"mat-card",1)(2,"mat-card-content")(3,"div",2)(4,"mat-icon",3),m(5,"lock"),l(),s(6,"h2"),m(7,"Authentication Required"),l(),s(8,"p",4),m(9,"Enter your system password to continue"),l()(),s(10,"form",5),E("submit",function(n){return de(e),C().onLogin(),me(n.preventDefault())}),s(11,"mat-form-field",6)(12,"mat-label"),m(13,"Password"),l(),s(14,"input",7),E("input",function(n){de(e);let a=C();return me(a.loginPassword.set(n.target.value))}),l()(),k(15,JC,4,1,"div",8),s(16,"button",9),m(17,"Sign In"),l()()()()()}if(i&2){let e=C();c(14),x("value",e.loginPassword()),c(),M(e.loginError()?15:-1)}}function tx(i,o){i&1&&_(0,"mat-progress-bar",11)}function ix(i,o){if(i&1&&(s(0,"mat-card",14)(1,"mat-card-content")(2,"mat-icon",15),m(3," error_outline "),l(),s(4,"p"),m(5),l(),s(6,"p",4),m(7,"Make sure the backend is running on port 4242."),l()()()),i&2){let e=C(2);c(5),B(e.error())}}function nx(i,o){if(i&1&&_(0,"app-system-bar",16),i&2){let e=C(3);x("systemInfo",e.systemInfo())}}function ox(i,o){i&1&&(s(0,"mat-card",19)(1,"mat-card-content")(2,"p"),m(3,"No GPUs detected."),l(),s(4,"p",4),m(5," Ensure nvidia-smi or rocm-smi is available on this system. "),l()()())}function ax(i,o){if(i&1&&_(0,"app-gpu-table",20),i&2){let e=C(3);x("gpus",e.gpus())}}function rx(i,o){if(i&1){let e=Se();s(0,"div",23),E("mousedown",function(n){de(e);let a=C(3);return me(a.startGpuColDrag(n))}),_(1,"span",24),l()}}function sx(i,o){if(i&1&&(k(0,nx,1,1,"app-system-bar",16),s(1,"div",17)(2,"div",18),k(3,ox,6,0,"mat-card",19)(4,ax,1,1,"app-gpu-table",20),l(),k(5,rx,2,0,"div",21),s(6,"div",22),_(7,"app-services"),l()()),i&2){let e=C(2);M(e.hasGpus()?0:-1),c(2),Ve("width",e.layout()==="horizontal"?e.gpuColWidth():null,"px"),c(),M(e.hasGpus()?4:3),c(2),M(e.layout()==="horizontal"?5:-1)}}function lx(i,o){if(i&1){let e=Se();s(0,"div",23),E("mousedown",function(n){de(e);let a=C(2);return me(a.startJournalWidthDrag(n))}),_(1,"span",24),l(),s(2,"div",25),_(3,"app-journal-panel"),l()}if(i&2){let e=C(2);c(2),Ve("width",e.sidebarWidth(),"px")}}function cx(i,o){if(i&1){let e=Se();s(0,"div",26),E("mousedown",function(n){de(e);let a=C(2);return me(a.startJournalHeightDrag(n))}),_(1,"span",24),l(),s(2,"div",27),_(3,"app-journal-panel"),l()}if(i&2){let e=C(2);c(2),Ve("height",e.journalHeight(),"px")}}function dx(i,o){if(i&1&&(k(0,tx,1,0,"mat-progress-bar",11),s(1,"div",12)(2,"div",13),k(3,ix,8,1,"mat-card",14)(4,sx,8,5),l(),k(5,lx,4,2)(6,cx,4,2),l()),i&2){let e=C();M(e.loading()?0:-1),c(),p("horizontal",e.layout()==="horizontal")("dragging",e.isDragging()),c(2),M(e.error()?3:4),c(2),M(e.layout()==="vertical"?5:6)}}var Np=100,Lp=1600,Vp=160,Bp=800,mx=320,zp=360,jp=1400,ux=560,Hp=(()=>{class i{ngOnInit(){this.authService.authState.subscribe(a=>{this.isAuthenticated.set(a),a&&(this.loginError.set(null),this.loginPassword.set(""))});let e=localStorage.getItem("journal-sidebar-width");if(e){let a=parseInt(e,10);a>=Np&&a<=Lp&&this.sidebarWidth.set(a)}let t=localStorage.getItem("journal-bottom-height");if(t){let a=parseInt(t,10);a>=Vp&&a<=Bp&&this.journalHeight.set(a)}let n=localStorage.getItem("gpu-col-width");if(n){let a=parseInt(n,10);a>=zp&&a<=jp&&this.gpuColWidth.set(a)}}ngOnDestroy(){}onLogin(){return oe(this,null,function*(){this.loginError.set(null),(yield this.authService.login(this.loginPassword()))?(this.loading.set(!0),this.initGpus()):this.loginError.set("Invalid password")})}startJournalWidthDrag(e){this.beginDrag("journalWidth",e.clientX,this.sidebarWidth())}startJournalHeightDrag(e){this.beginDrag("journalHeight",e.clientY,this.journalHeight())}startGpuColDrag(e){this.beginDrag("gpuColWidth",e.clientX,this.gpuColWidth())}beginDrag(e,t,n){this.dragTarget=e,this.dragStartCoord=t,this.dragStartValue=n,this.isDragging.set(!0)}onDrag(e){if(!(!this.isDragging()||!this.dragTarget)){if(this.dragTarget==="journalWidth"){let t=this.dragStartCoord-e.clientX;this.sidebarWidth.set(this.clamp(this.dragStartValue+t,Np,Lp))}else if(this.dragTarget==="journalHeight"){let t=this.dragStartCoord-e.clientY;this.journalHeight.set(this.clamp(this.dragStartValue+t,Vp,Bp))}else if(this.dragTarget==="gpuColWidth"){let t=e.clientX-this.dragStartCoord;this.gpuColWidth.set(this.clamp(this.dragStartValue+t,zp,jp))}}}onDragEnd(){!this.isDragging()||!this.dragTarget||(this.dragTarget==="journalWidth"?localStorage.setItem("journal-sidebar-width",String(this.sidebarWidth())):this.dragTarget==="journalHeight"?localStorage.setItem("journal-bottom-height",String(this.journalHeight())):this.dragTarget==="gpuColWidth"&&localStorage.setItem("gpu-col-width",String(this.gpuColWidth())),this.dragTarget=null,this.isDragging.set(!1))}clamp(e,t,n){return Math.max(t,Math.min(n,e))}constructor(){this.gpuService=d(ch),this.authService=d(Ir),this.layoutService=d(rs),this.gpus=T([]),this.systemInfo=T({cpuUsage:0,memoryTotal:0,memoryUsed:0,memoryPercent:0}),this.loading=T(!0),this.error=T(null),this.hasGpus=$(()=>this.gpus().length>0),this.layout=this.layoutService.layout,this.isAuthenticated=T(this.authService.isAuthenticated()),this.loginPassword=T(""),this.loginError=T(null),this.sidebarWidth=T(420),this.journalHeight=T(mx),this.gpuColWidth=T(ux),this.isDragging=T(!1),this.dragTarget=null,this.dragStartCoord=0,this.dragStartValue=0,this.isAuthenticated()&&this.initGpus()}initGpus(e=0){this.gpuService.fetchGpus().subscribe({next:t=>{if(t.length===0){e<3?setTimeout(()=>this.initGpus(e+1),5e3):this.loading.set(!1);return}let n=t.map(a=>Fe(V({},a),{key:a.pciBusId,usage:0,temperature:0,vramUsed:0}));this.gpus.set(n),this.loading.set(!1),this.error.set(null),this.gpuService.watchStatus(3e3).subscribe({next:a=>{this.systemInfo.set(a.system),this.mergeUsage(a.gpus)},error:a=>{console.error("[AppComponent] status poll error:",a)}})},error:t=>{console.error("[AppComponent] static fetch error:",t),this.error.set(`Failed to fetch GPU data: ${t.message}`),this.loading.set(!1)}})}mergeUsage(e){let t=new Map;for(let n of e)t.set(n.key,n);this.gpus.update(n=>n.map(a=>{let r=t.get(a.pciBusId);return Fe(V({},a),{key:a.pciBusId,usage:r?.usage??0,temperature:r?.temperature??0,vramUsed:r?.vramUsed??0})}))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=I({type:i,selectors:[["app-root"]],hostBindings:function(t,n){t&1&&E("mousemove",function(r){return n.onDrag(r)},qs)("mouseup",function(){return n.onDragEnd()},qs)},decls:2,vars:1,consts:[[1,"login-container"],[1,"login-card"],[1,"login-header"],[1,"login-icon"],[1,"mat-body-2",2,"color","#999"],[1,"login-form",3,"submit"],["appearance","outline",1,"full-width"],["matInput","","type","password","autofocus","",3,"input","value"],[1,"login-error"],["mat-raised-button","","color","primary","type","submit",1,"login-btn"],[2,"font-size","20px","vertical-align","middle"],["mode","query","color","primary"],[1,"layout"],[1,"main-content"],[1,"error-card"],[2,"color","#f44336","font-size","48px","float","left","margin-right","16px"],[3,"systemInfo"],[1,"top-row"],[1,"gpu-col"],[1,"empty-card"],[3,"gpus"],[1,"splitter"],[1,"services-col"],[1,"splitter",3,"mousedown"],[1,"splitter-line"],[1,"journal-sidebar"],[1,"splitter","splitter-h",3,"mousedown"],[1,"journal-bottom"]],template:function(t,n){t&1&&k(0,ex,18,2,"div",0)(1,dx,7,7),t&2&&M(n.isAuthenticated()?1:0)},dependencies:[Pe,ti,Ti,an,nn,on,oi,ni,Et,Lt,At,Ke,Xe,vt,_t,Ph,Ip,Rp,Fp],styles:[".spacer[_ngcontent-%COMP%]{flex:1 1 auto}.login-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:calc(100vh - 56px);padding:24px;background:#f5f5f5}.login-card[_ngcontent-%COMP%]{width:100%;max-width:400px}.login-header[_ngcontent-%COMP%]{text-align:center;margin-bottom:24px}.login-header[_ngcontent-%COMP%] .login-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;line-height:48px;background:#e3f2fd;border-radius:50%;padding:8px;color:#1976d2}.login-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:16px 0 4px;font-size:22px;font-weight:500}.login-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.login-error[_ngcontent-%COMP%]{color:#d32f2f;font-size:14px;text-align:center;padding:8px;background:#ffebee;border-radius:4px}.login-btn[_ngcontent-%COMP%]{width:100%;margin-top:8px}.full-width[_ngcontent-%COMP%]{width:100%}.layout[_ngcontent-%COMP%]{display:flex;flex-direction:row;height:100%;overflow:hidden}.layout.dragging[_ngcontent-%COMP%]{user-select:none;-webkit-user-select:none}.main-content[_ngcontent-%COMP%]{flex:1;min-width:0;overflow-y:auto;padding:24px 8px 24px 24px;max-width:100%}.top-row[_ngcontent-%COMP%]{display:block}.gpu-col[_ngcontent-%COMP%], .services-col[_ngcontent-%COMP%]{min-width:0}.splitter[_ngcontent-%COMP%]{width:8px;flex-shrink:0;cursor:col-resize;display:flex;align-items:center;justify-content:center;background:transparent;transition:background .15s}.splitter[_ngcontent-%COMP%]:hover{background:#0000000a}.splitter[_ngcontent-%COMP%] .splitter-line[_ngcontent-%COMP%]{width:2px;height:32px;border-radius:1px;background:#bdbdbd;transition:background .15s,width .15s}.splitter[_ngcontent-%COMP%]:hover .splitter-line[_ngcontent-%COMP%]{background:#757575;width:3px}.splitter-h[_ngcontent-%COMP%]{width:100%;height:8px;flex-shrink:0;cursor:row-resize;display:flex;align-items:center;justify-content:center;background:transparent;transition:background .15s}.splitter-h[_ngcontent-%COMP%]:hover{background:#0000000a}.splitter-h[_ngcontent-%COMP%] .splitter-line[_ngcontent-%COMP%]{width:32px;height:2px;border-radius:1px;background:#bdbdbd;transition:background .15s,height .15s}.splitter-h[_ngcontent-%COMP%]:hover .splitter-line[_ngcontent-%COMP%]{background:#757575;height:3px}.journal-sidebar[_ngcontent-%COMP%]{flex-shrink:0;overflow:hidden;padding:24px 24px 24px 8px}.journal-bottom[_ngcontent-%COMP%]{flex-shrink:0;overflow:hidden;padding:8px 24px 24px}.layout.horizontal[_ngcontent-%COMP%]{flex-direction:column}.layout.horizontal[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%]{overflow:hidden;display:flex;flex-direction:column;padding:24px 24px 8px}.layout.horizontal[_ngcontent-%COMP%] .top-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex:1;min-height:0}.layout.horizontal[_ngcontent-%COMP%] .gpu-col[_ngcontent-%COMP%]{flex-shrink:0;overflow-y:auto}.layout.horizontal[_ngcontent-%COMP%] .splitter[_ngcontent-%COMP%]{margin:0 8px}.layout.horizontal[_ngcontent-%COMP%] .services-col[_ngcontent-%COMP%]{flex:1;min-width:0;overflow-y:auto}.layout.horizontal[_ngcontent-%COMP%] .services-col[_ngcontent-%COMP%] app-services[_ngcontent-%COMP%]{margin-top:0}.error-card[_ngcontent-%COMP%], .empty-card[_ngcontent-%COMP%]{margin-top:32px;max-width:600px;margin-left:auto;margin-right:auto}[_nghost-%COMP%] mat-card-content{padding-top:10px!important;padding-bottom:10px!important}app-services[_ngcontent-%COMP%]{display:block;margin-top:24px}"]})}}return i})();yl(Hp,Cm).catch(i=>console.error(i));