1import{a as gn}from"./chunk-VRVBV4OK.js";import{a as Fn}from"./chunk-B3M4IK5N.js";import{a as Ln}from"./chunk-BUTJXNYO.js";import{a as Dt}from"./chunk-KDMNE4RS.js";import{a as In,c as Z,d as Pe,e as X,f as ze}from"./chunk-WI3E3UHS.js";import"./chunk-AFTDV3YN.js";import"./chunk-UDZK2K4X.js";import{a as Dn}from"./chunk-QGP2CSIB.js";import{e as si}from"./chunk-4P3N6FMT.js";import{a as kn}from"./chunk-MQG7XYSN.js";import{a as wt}from"./chunk-TFHNV3GG.js";import{a as Me}from"./chunk-7C3SSFPU.js";import{a as yn}from"./chunk-WALG7VLL.js";import{d as pn}from"./chunk-PDJBEQOU.js";import"./chunk-3HELFU5K.js";import{a as Pn}from"./chunk-FMI55CNJ.js";import{a as wn}from"./chunk-7FODHA74.js";import{a as En}from"./chunk-GXVJQFLH.js";import{c as Pt,f as Et,h as we,l as Ot,m as Tt,n as On,o as Tn}from"./chunk-HICQSI54.js";import{a as Mt}from"./chunk-GR62I3DE.js";import{b as bn}from"./chunk-4Z2TGT2L.js";import{a as xn,b as Cn}from"./chunk-67LDRNM6.js";import"./chunk-VADWFC3U.js";import{c as qe}from"./chunk-RFFGAWRR.js";import{g as Mn}from"./chunk-56XENPRK.js";import{a as Sn}from"./chunk-6K6XALKO.js";import{a as fn}from"./chunk-6KXDF4HN.js";import{a as St}from"./chunk-DJBB7TOO.js";import"./chunk-B46HAPJU.js";import{a as Ae,c as be,e as Ne}from"./chunk-PJWJXMZM.js";import"./chunk-45RJ2NJW.js";import{p as bt}from"./chunk-32WNDC77.js";import{d as vn}from"./chunk-OZUF2DA3.js";import"./chunk-Z7SJGQQ6.js";import{a as _n}from"./chunk-IXGKWOAV.js";import"./chunk-ZNIAHJPJ.js";import{a as un}from"./chunk-C3ZBQYK6.js";import{A as yt,r as dn,u as mn,x as Ct}from"./chunk-JDKZG5EX.js";import"./chunk-AIVQ5WOW.js";import{g as rt,h as Ki,i as Ve,j as st}from"./chunk-NU4FUAG2.js";import{b as hn}from"./chunk-JNT7XX7N.js";import"./chunk-KVYJPEZN.js";import{a as at,b as lt}from"./chunk-FR35XJAY.js";import{$c as d,A as bi,Aa as De,Ab as _,Ai as sn,Ba as Ti,Bg as q,Bi as an,Cd as nt,Cf as Xi,Cg as M,Ci as ln,Da as ae,Dg as w,Di as cn,E as et,Eb as Ii,Fg as E,Gc as Vi,Gi as te,Hb as Fi,Hc as ji,Ia as Re,Ib as Li,Ic as Ai,Jc as p,Jd as ot,Kc as v,L as Le,Lc as C,Mb as Be,Mc as Ni,Mh as ye,Mi as vt,Na as ve,Pb as y,Pc as ti,Ph as ct,Qc as ii,Qh as pt,R as Mi,Rc as ni,Rg as Yi,Ri as K,Ud as qi,Ug as ri,Vc as Ui,Vg as Qi,Vi as ie,Wb as S,Wc as le,Wg as Zi,Xa as j,Xc as R,Xh as dt,Y as Xe,Ya as A,Yc as tt,_ as wi,_h as mt,_i as xt,a as se,ac as Ri,ad as m,b as Te,bc as f,bd as V,bi as ut,cc as xe,cj as Ue,da as Pi,dc as U,di as ft,ff as G,gd as it,gf as zi,hb as Di,hf as Hi,hi as ht,ia as Ei,ib as O,ic as x,jf as $i,jg as je,kc as Bi,kd as b,lc as $,ld as Ce,li as gt,mc as J,na as Oi,nc as a,oc as l,pc as g,pf as Ji,pi as en,qi as tn,ri as nn,sb as ki,sh as Se,si as on,tc as N,ti as rn,ua as ei,vf as Gi,wc as T,wf as Wi,xi as _t,yc as h,yh as z,zb as s,zf as oi,zh as H,zi as B}from"./chunk-CPOZEFYP.js";var Mo=function(e,t,i,n){var o=arguments.length,r=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,i,n);else for(var u=e.length-1;u>=0;u--)(c=e[u])&&(r=(o<3?c(r):o>3?c(t,i,r):c(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};function wo(e,t){if(e&1&&(a(0,"button",8),p(1),d(2,"translate"),l()),e&2){let i=h();f("disabled",i.form.invalid||i.isFormLoading),s(),C(" ",m(2,2,"Save")," ")}}var ce,kt=(ce=class{get isNew(){return!this.editingJbof}get title(){return this.isNew?this.translate.instant("Add Expansion Shelf"):this.translate.instant("Edit Expansion Shelf")}constructor(t,i,n,o,r,c){this.api=t,this.errorHandler=i,this.cdr=n,this.fb=o,this.translate=r,this.slideInRef=c,this.requiredRoles=[Ue.JbofWrite],this.isFormLoading=!1,this.form=this.fb.group({description:["",[ye.required]],mgmt_ip1:["",[ye.required,si()]],mgmt_ip2:["",[si()]],mgmt_username:["",[ye.required]],mgmt_password:["",[ye.required]]}),this.slideInRef.requireConfirmationWhen(()=>et(this.form.dirty)),this.editingJbof=this.slideInRef.getData()}ngOnInit(){this.editingJbof&&this.form.patchValue(this.editingJbof)}onSubmit(){let t=this.form.value;this.isFormLoading=!0;let i;this.isNew?i=this.api.call("jbof.create",[t]):i=this.api.call("jbof.update",[this.editingJbof.id,t]),i.pipe(H(this)).subscribe({next:()=>{this.isFormLoading=!1,this.cdr.markForCheck(),this.slideInRef.close({response:!0,error:null})},error:n=>{this.isFormLoading=!1,this.errorHandler.handleValidationErrors(n,this.form),this.cdr.markForCheck()}})}},ce.\u0275fac=function(i){return new(i||ce)(_(K),_(un),_(it),_(ht),_(q),_(Cn))},ce.\u0275cmp=y({type:ce,selectors:[["ix-jbof-form"]],decls:21,vars:36,consts:[[3,"requiredRoles","title","loading"],[1,"ix-form-container",3,"submit","formGroup"],["formControlName","description",3,"label","required"],["formControlName","mgmt_ip1",3,"label","required","tooltip"],["formControlName","mgmt_ip2",3,"label","tooltip"],["formControlName","mgmt_username",3,"label","required","tooltip"],["formControlName","mgmt_password","type","password",3,"label","required","tooltip"],["mat-button","","type","submit","color","primary","ixTest","save",3,"disabled",4,"ixRequiresRoles"],["mat-button","","type","submit","color","primary","ixTest","save",3,"disabled"]],template:function(i,n){i&1&&(g(0,"ix-modal-header",0),a(1,"mat-card")(2,"mat-card-content")(3,"form",1),T("submit",function(){return n.onSubmit()}),a(4,"ix-fieldset"),g(5,"ix-input",2),d(6,"translate"),g(7,"ix-input",3),d(8,"translate"),d(9,"translate"),g(10,"ix-input",4),d(11,"translate"),d(12,"translate"),g(13,"ix-input",5),d(14,"translate"),d(15,"translate"),g(16,"ix-input",6),d(17,"translate"),d(18,"translate"),l(),a(19,"ix-form-actions"),S(20,wo,3,4,"button",7),l()()()()),i&2&&(f("requiredRoles",n.requiredRoles)("title",n.title)("loading",n.isFormLoading),s(3),f("formGroup",n.form),s(2),f("label",m(6,18,"Description"))("required",!0),s(2),f("label",m(8,20,"IP"))("required",!0)("tooltip",m(9,22,"IP of 1st Redfish management interface.")),s(3),f("label",m(11,24,"Optional IP"))("tooltip",m(12,26,"Optional IP of 2nd Redfish management interface.")),s(3),f("label",m(14,28,"Username"))("required",!0)("tooltip",m(15,30,"Redfish administrative username.")),s(3),f("label",m(17,32,"Password"))("required",!0)("tooltip",m(18,34,"Redfish administrative password.")),s(4),f("ixRequiresRoles",n.requiredRoles))},dependencies:[bn,Ae,be,gt,dt,ct,pt,ft,mt,ut,mn,Ct,_t,qe,G,B,w,M],encapsulation:2,changeDetection:0}),ce);kt=Mo([z()],kt);var Oo=function(e,t,i,n){var o=arguments.length,r=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,i,n);else for(var u=e.length-1;u>=0;u--)(c=e[u])&&(r=(o<3?c(r):o>3?c(t,i,r):c(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};function To(e,t){if(e&1){let i=N();a(0,"button",7),d(1,"translate"),T("click",function(){j(i);let o=h();return A(o.openForm())}),p(2),d(3,"translate"),l()}if(e&2){let i=h();f("disabled",!i.canAddJbof)("matTooltip",m(1,4,"No available licensed Expansion Shelves "))("matTooltipDisabled",i.canAddJbof),s(2),C(" ",m(3,6,"Add")," ")}}var pe,It=(pe=class{get emptyConfigService(){return this.emptyService}constructor(t,i,n,o,r,c,u,I){this.api=t,this.slideIn=i,this.dialogService=n,this.errorHandler=o,this.translate=r,this.emptyService=c,this.loader=u,this.cdr=I,this.requiredRoles=[Ue.JbofWrite],this.searchableElements=gn,this.filterString="",this.jbofs=[],this.canAddJbof=!1,this.columns=Pt([we({title:this.translate.instant("Description"),propertyName:"description"}),we({title:this.translate.instant("IPs"),getValue:L=>
1[L.mgmt_ip1,L.mgmt_ip2].filter(Boolean).join(", ")}),we({title:this.translate.instant("Username"),propertyName:"mgmt_username"}),En({actions:[{iconName:"edit",tooltip:this.translate.instant("Edit"),onClick:L=>this.openForm(L)},{iconName:"mdi-delete",tooltip:this.translate.instant("Delete"),requiredRoles:this.requiredRoles,onClick:L=>this.doDelete(L)}]})],{uniqueRowTag:L=>"jbof-"+L.mgmt_username,ariaLabels:L=>[L.mgmt_username,this.translate.instant("JBOF")]})}ngOnInit(){let t=this.api.call("jbof.query").pipe(ae(i=>this.jbofs=i),H(this));this.dataProvider=new Dn(t),this.getJbofs(),this.dataProvider.emptyType$.pipe(H(this)).subscribe(()=>{this.onListFiltered(this.filterString)})}openForm(t){this.slideIn.open(kt,{data:t}).pipe(Xe(i=>!!i.response),H(this)).subscribe(()=>this.getJbofs())}doDelete(t){this.dialogService.confirm({title:this.translate.instant("Delete"),message:this.translate.instant("Are you sure you want to delete this item?"),hideCheckbox:!0,secondaryCheckbox:!0,secondaryCheckboxText:this.translate.instant("Force"),buttonText:this.translate.instant("Delete"),buttonColor:"warn"}).pipe(Xe(i=>i.confirmed),De(i=>{let n=i.secondaryCheckbox;return this.api.call("jbof.delete",[t.id,n]).pipe(this.loader.withLoader())}),H(this)).subscribe({next:()=>this.getJbofs(),error:i=>{this.dialogService.error(this.errorHandler.parseError(i))}})}getJbofs(){this.dataProvider.load(),this.updateAvailableJbof()}updateAvailableJbof(){Mi([this.api.call("jbof.query").pipe(Le(t=>t.length)),this.api.call("jbof.licensed")]).pipe(H(this)).subscribe(([t,i])=>{this.canAddJbof=i>t,this.cdr.markForCheck()})}onListFiltered(t){this.filterString=t,this.dataProvider.setFilter({query:t,columnKeys:["mgmt_username","description"]})}},pe.\u0275fac=function(i){return new(i||pe)(_(K),_(xn),_(xt),_(ie),_(q),_(Tn),_(St),_(it))},pe.\u0275cmp=y({type:pe,selectors:[["ix-jbof-list"]],decls:11,vars:17,consts:[[3,"search","value"],["mat-button","","ixTest","add-jbof","color","primary",3,"disabled","matTooltip","matTooltipDisabled","click",4,"ixRequiresRoles"],[1,"table-container",3,"ixUiSearch"],[3,"ix-table-empty","emptyConfig"],["ix-table-head","",3,"columns","dataProvider"],["ix-table-body","",3,"columns","dataProvider","isLoading"],[3,"dataProvider"],["mat-button","","ixTest","add-jbof","color","primary",3,"click","disabled","matTooltip","matTooltipDisabled"]],template:function(i,n){i&1&&(a(0,"ix-page-header")(1,"ix-search-input1",0),T("search",function(r){return n.onListFiltered(r)}),l(),S(2,To,4,8,"button",1),l(),a(3,"div",2)(4,"ix-table",3),d(5,"async"),d(6,"async"),g(7,"thead",4)(8,"tbody",5),d(9,"async"),l(),g(10,"ix-table-pager",6),l()),i&2&&(s(),f("value",n.filterString),s(),f("ixRequiresRoles",n.requiredRoles),s(),f("ixUiSearch",n.searchableElements.elements.jbof),s(),f("ix-table-empty",!m(5,11,n.dataProvider.currentPageCount$))("emptyConfig",n.emptyConfigService.defaultEmptyConfig(m(6,13,n.dataProvider.emptyType$))),s(3),f("columns",n.columns)("dataProvider",n.dataProvider),s(),f("columns",n.columns)("dataProvider",n.dataProvider)("isLoading",!!m(9,15,n.dataProvider.isLoading$)),s(2),f("dataProvider",n.dataProvider))},dependencies:[bt,wn,qe,G,B,cn,hn,Et,On,Tt,Ot,kn,w,M,nt],encapsulation:2,changeDetection:0}),pe);It=Oo([z()],It);var ko=function(e,t,i,n){var o=arguments.length,r=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,i,n);else for(var u=e.length-1;u>=0;u--)(c=e[u])&&(r=(o<3?c(r):o>3?c(t,i,r):c(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},de,Lt=(de=class{constructor(t,i,n,o,r,c,u,I,L){this.formBuilder=t,this.api=i,this.loader=n,this.dialogRef=o,this.errorHandler=r,this.dialogService=c,this.validatorsService=u,this.translate=I,this.data=L,this.enclosureLabel="Enclosure Label",this.form=this.formBuilder.nonNullable.group({label:["",[ye.required,this.validatorsService.withMessage(ye.pattern("^(?!\\s*$).+"),this.translate.instant("".concat(this.enclosureLabel," cannot contain only whitespace characters.")))]],resetToDefault:[!1]})}ngOnInit(){this.form.patchValue({label:this.data.currentLabel}),this.setFormRelationship()}onSubmit(){let t=this.form.getRawValue(),i=t.resetToDefault?this.data.defaultLabel:t.label;this.api.call("enclosure.label.set",[this.data.enclosureId,i]).pipe(this.loader.withLoader(),H(this)).subscribe({next:()=>{this.dialogRef.close(i)},error:n=>{this.dialogService.error(this.errorHandler.parseError(n)),this.dialogRef.close()}})}setFormRelationship(){this.form.controls.resetToDefault.valueChanges.pipe(H(this)).subscribe(t=>{t?this.form.controls.label.disable():this.form.controls.label.enable()})}},de.\u0275fac=function(i){return new(i||de)(_(ht),_(K),_(St),_(en),_(ie),_(xt),_(vn),_(q),_(tn))},de.\u0275cmp=y({type:de,selectors:[["ix-set-enclosure-label-dialog"]],decls:15,vars:18,consts:[["matDialogTitle",""],[3,"submit","formGroup"],["formControlName","label",3,"label","required"],["formControlName","resetToDefault",3,"label"],["mat-button","","type","button","ixTest","cancel","matDialogClose",""],["mat-button","","type","submit","color","primary","ixTest","save",3,"disabled"]],template:function(i,n){i&1&&(a(0,"h1",0),p(1),d(2,"translate"),l(),a(3,"form",1),T("submit",function(){return n.onSubmit()}),g(4,"ix-input",2),d(5,"translate"),g(6,"ix-checkbox",3),d(7,"translate"),a(8,"ix-form-actions")(9,"button",4),p(10),d(11,"translate"),l(),a(12,"button",5),p(13),d(14,"translate"),l()()()),i&2&&(s(),v(m(2,8,"Change Enclosure Label")),s(2),f("formGroup",n.form),s(),f("label",m(5,10,n.enclosureLabel))("required",!n.form.value.resetToDefault),s(2),f("label",m(7,12,"Re
1set to default")),s(4),C(" ",m(11,14,"Cancel")," "),s(2),f("disabled",n.form.invalid),s(),C(" ",m(14,16,"Save")," "))},dependencies:[rn,gt,dt,ct,pt,ft,mt,ut,Ct,_n,_t,G,B,on,w,M],styles:["[_nghost-%COMP%]{display:block;width:350px}\n/*# sourceMappingURL=set-enclosure-label-dialog.component-2MHULMD7.css.map */"],changeDetection:0}),de);Lt=ko([z()],Lt);var Nn=Symbol.for("immer-nothing"),Rn=Symbol.for("immer-draftable"),Y=Symbol.for("immer-state");function ee(e,...t){throw new Error("[Immer] minified error nr: ".concat(e,". Full error at: https://bit.ly/3cXEKWf"))}var $e=Object.getPrototypeOf;function Je(e){return!!e&&!!e[Y]}function Ie(e){var t;return e?Un(e)||Array.isArray(e)||!!e[Rn]||!!((t=e.constructor)!=null&&t[Rn])||At(e)||Nt(e):!1}var Io=Object.prototype.constructor.toString();function Un(e){if(!e||typeof e!="object")return!1;let t=$e(e);if(t===null)return!0;let i=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return i===Object?!0:typeof i=="function"&&Function.toString.call(i)===Io}function Rt(e,t){jt(e)===0?Reflect.ownKeys(e).forEach(i=>{t(i,e[i],e)}):e.forEach((i,n)=>t(n,i,e))}function jt(e){let t=e[Y];return t?t.type_:Array.isArray(e)?1:At(e)?2:Nt(e)?3:0}function ci(e,t){return jt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function qn(e,t,i){let n=jt(e);n===2?e.set(t,i):n===3?e.add(i):e[t]=i}function Fo(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function At(e){return e instanceof Map}function Nt(e){return e instanceof Set}function ke(e){return e.copy_||e.base_}function pi(e,t){if(At(e))return new Map(e);if(Nt(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let i=Un(e);if(t===!0||t==="class_only"&&!i){let n=Object.getOwnPropertyDescriptors(e);delete n[Y];let o=Reflect.ownKeys(n);for(let r=0;r<o.length;r++){let c=o[r],u=n[c];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[c]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[c]})}return Object.create($e(e),n)}else{let n=$e(e);if(n!==null&&i)return se({},e);let o=Object.create(n);return Object.assign(o,e)}}function hi(e,t=!1){return Ut(e)||Je(e)||!Ie(e)||(jt(e)>1&&(e.set=e.add=e.clear=e.delete=Lo),Object.freeze(e),t&&Object.entries(e).forEach(([i,n])=>hi(n,!0))),e}function Lo(){ee(2)}function Ut(e){return Object.isFrozen(e)}var Ro={};function Fe(e){let t=Ro[e];return t||ee(0,e),t}var Ke;function zn(){return Ke}function Bo(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Bn(e,t){t&&(Fe("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function di(e){mi(e),e.drafts_.forEach(Vo),e.drafts_=null}function mi(e){e===Ke&&(Ke=e.parent_)}function Vn(e){return Ke=Bo(Ke,e)}function Vo(e){let t=e[Y];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function jn(e,t){t.unfinalizedDrafts_=t.drafts_.length;let i=t.drafts_[0];return e!==void 0&&e!==i?(i[Y].modified_&&(di(t),ee(4)),Ie(e)&&(e=Bt(t,e),t.parent_||Vt(t,e)),t.patches_&&Fe("Patches").generateReplacementPatches_(i[Y].base_,e,t.patches_,t.inversePatches_)):e=Bt(t,i,[]),di(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Nn?e:void 0}function Bt(e,t,i){if(Ut(t))return t;let n=t[Y];if(!n)return Rt(t,(o,r)=>An(e,n,t,o,r,i)),t;if(n.scope_!==e)return t;if(!n.modified_)return Vt(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,r=o,c=!1;n.type_===3&&(r=new Set(o),o.clear(),c=!0),Rt(r,(u,I)=>An(e,n,o,u,I,i,c)),Vt(e,o,!1),i&&e.patches_&&Fe("Patches").generatePatches_(n,i,e.patches_,e.inversePatches_)}return n.copy_}function An(e,t,i,n,o,r,c){if(Je(o)){let u=r&&t&&t.type_!==3&&!ci(t.assigned_,n)?r.concat(n):void 0,I=Bt(e,o,u);if(qn(i,n,I),Je(I))e.canAutoFreeze_=!1;else return}else c&&i.add(o);if(Ie(o)&&!Ut(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Bt(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(i,n)&&Vt(e,o)}}function Vt(e,t,i=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&hi(t,i)}function jo(e,t){let i=Array.isArray(e),n={type_:i?1:0,scope_:t?t.scope_:zn(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,r=gi;i&&(o=[n],r=Ye);let{revoke:c,proxy:u}=Proxy.revocable(o,r);return n.draft_=u,n.revoke_=c,u}var gi={get(e,t){if(t===Y)return e;let i=ke(e);if(!ci(i,t))return Ao(e,i,t);let n=i[t];return e.finalized_||!Ie(n)?n:n===ai(e.base_,t)?(li(e),e.copy_[t]=fi(n,e)):n},has(e,t){return t in ke(e)},ownKeys(e){return Reflect.ownKeys(ke(e))},set(e,t,i){let n=Hn(ke(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,i),!0;if(!e.modified_){let o=ai(ke(e),t),r=o==null?void 0:o[Y];if(r&&r.base_===i)return e.copy_[t]=i,e.assigned_[t]=!1,!0;if(Fo(i,o)&&(i!==void 0||ci(e.base_,t)))return!0;li(e),ui(e)}return e.copy_[t]===i&&(i!==void 0||t in e.copy_)||Number.isNaN(i)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=i,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ai(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,li(e),ui(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let i=ke(e),n=Reflect.getOwnPropertyDescriptor(i,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:i[t]}},defineProperty(){ee(11)},getPrototypeOf(e){return $e(e.base_)},setPrototypeOf(){ee(12)}},Ye={};Rt(gi,(e,t)=>{Ye[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ye.deleteProperty=function(e,t){return Ye.set.call(this,e,t,void 0)};Ye.set=function(e,t,i){return gi.set.call(this,e[0],t,i,e[0])};function ai(e,t){let i=e[Y];return(i?ke(i):e)[t]}function Ao(e,t,i){var o;let n=Hn(t,i);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Hn(e,t){if(!(t in e))return;let i=$e(e);for(;i;){let n=Object.getOwnPropertyDescriptor(i,t);if(n)return n;i=$e(i)}}function ui(e){e.modified_||(e.modified_=!0,e.parent_&&ui(e.parent_))}function li(e){e.copy_||(e.copy_=pi(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var No=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,i,n)=>{if(typeof t=="function"&&typeof i!="function"){let r=i;i=t;let c=this;return function(I=r,...L){return c.produce(I,re=>i.call(this,re,...L))}}typeof i!="function"&&ee(6),n!==void 0&&typeof n!="function"&&ee(7);let o;if(Ie(t)){let r=Vn(this),c=fi(t,void 0),u=!0;try{o=i(c),u=!1}finally{u?di(r):mi(r)}return Bn(r,n),jn(o,r)}else if(!t||typeof t!="object"){if(o=i(t),o===void 0&&(o=t),o===Nn&&(o=void 0),this.autoFreeze_&&hi(o,!0),n){let r=[],c=[];Fe("Patches").generateReplacementPatches_(t,o,r,c),n(r,c)}return o}else ee(1,t)},this.produceWithPatches=(t,i)=>{if(typeof t=="function")return(c,...u)=>this.produceWithPatches(c,I=>t(I,...u));let n,o;return[this.produce(t,i,(c,u)=>{n=c,o=u}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Ie(e)||ee(8),Je(e)&&(e=Uo(e));let t=Vn(this),i=fi(e,void 0);return i[Y].isManual_=!0,mi(t),i}finishDraft(e,t){let i=e&&e[Y];(!i||!i.isManual_)&&ee(9);let{scope_:n}=i;return Bn(n,t),jn(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let i;for(i=t.length-1;i>=0;i--){let o=t[i];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}i>
1-1&&(t=t.slice(i+1));let n=Fe("Patches").applyPatches_;return Je(e)?n(e,t):this.produce(e,o=>n(o,t))}};function fi(e,t){let i=At(e)?Fe("MapSet").proxyMap_(e,t):Nt(e)?Fe("MapSet").proxySet_(e,t):jo(e,t);return(t?t.scope_:zn()).drafts_.push(i),i}function Uo(e){return Je(e)||ee(10,e),$n(e)}function $n(e){if(!Ie(e)||Ut(e))return e;let t=e[Y],i;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,i=pi(e,t.scope_.immer_.useStrictShallowCopy_)}else i=pi(e,!0);return Rt(i,(n,o)=>{qn(i,n,$n(o))}),t&&(t.finalized_=!1),i}var Q=new No,Jn=Q.produce,Ll=Q.produceWithPatches.bind(Q),Rl=Q.setAutoFreeze.bind(Q),Bl=Q.setUseStrictShallowCopy.bind(Q),Vl=Q.applyPatches.bind(Q),jl=Q.createDraft.bind(Q),Al=Q.finishDraft.bind(Q);var Ee=function(e){return e.Pools="pools",e.DiskStatus="disk-status",e.Expanders="expanders",e}(Ee||{});var P=function(e){return e.Front="front",e.Rear="rear",e.Top="top",e.Internal="internal",e}(P||{}),_i={[P.Front]:"assets/images/new-hardware/f-series/f-series-front.svg"},qt={[P.Front]:"assets/images/new-hardware/m-series/m-series-front.svg",[P.Rear]:"assets/images/new-hardware/m-series/m-series-rear.svg"},qo={[P.Front]:"assets/images/new-hardware/es24f/es24f-front.svg"},zo={[P.Front]:"assets/images/new-hardware/es24n/es24n-front.svg"},Ho={[P.Top]:"assets/images/new-hardware/es60g2/es60g2-top.svg"},$o={[P.Top]:"assets/images/new-hardware/es60g3/es60g3-top.svg"},Jo={[P.Top]:"assets/images/new-hardware/es102g2/es102g2-top.svg"},vi={[P.Front]:"assets/images/new-hardware/h-series/h-series-front.svg"},Go={[P.Front]:"assets/images/new-hardware/es12/es12-front.svg"},Wo={[P.Front]:"assets/images/new-hardware/es24/es24-front.svg"},Xo={[P.Top]:"assets/images/new-hardware/es60/es60-top.svg"},Ko={[P.Front]:"assets/images/new-hardware/r10/r10-front.svg"},Yo={[P.Top]:"assets/images/new-hardware/es102/es102-top.svg"},Gn={[P.Front]:"assets/images/new-hardware/minis/mini-3e-front.svg"},Wn={[P.Front]:"assets/images/new-hardware/minis/mini-3x-front.svg"},Qo={[P.Front]:"assets/images/new-hardware/minis/mini-3xl-plus-front.svg"},Zo={[P.Front]:"assets/images/new-hardware/minis/mini-r-front.svg"},er={[P.Front]:"assets/images/new-hardware/r20/r20-front.svg",[P.Rear]:"assets/images/new-hardware/r20/r20-rear.svg"},tr={[P.Front]:"assets/images/new-hardware/r20a/r20a-front.svg",[P.Rear]:"assets/images/new-hardware/r20a/r20a-rear.svg"},ir={[P.Front]:"assets/images/new-hardware/r20b/r20b-front.svg",[P.Rear]:"assets/images/new-hardware/r20/r20-rear.svg"},nr={[P.Front]:"assets/images/new-hardware/r30/r30-front.svg"},or={[P.Front]:"assets/images/new-hardware/r40/r40-front.svg"},rr={[P.Top]:"assets/images/new-hardware/r50/r50-top.svg",[P.Rear]:"assets/images/new-hardware/r50/r50-rear.svg"},sr={[P.Top]:"assets/images/new-hardware/r50b/r50b-top.svg",[P.Rear]:"assets/images/new-hardware/r50b/r50b-rear.svg"},ar={[P.Rear]:"assets/images/new-hardware/r50bm/r50bm-rear.svg",[P.Top]:"assets/images/new-hardware/r50bm/r50bm-top.svg"},Xn={[P.Front]:"assets/images/new-hardware/x-series/x-series-front.svg"},Kn={[E.M30]:qt,[E.M40]:qt,[E.M50]:qt,[E.M60]:qt,[E.Es24F]:qo,[E.Es24N]:zo,[E.Es60G2]:Ho,[E.Es60G3]:$o,[E.Es102G2]:Jo,[E.F60]:_i,[E.F100]:_i,[E.F130]:_i,[E.H10]:vi,[E.H20]:vi,[E.H30]:vi,[E.Mini3E]:Gn,[E.Mini3EPlus]:Gn,[E.Mini3X]:Wn,[E.Mini3XPlus]:Wn,[E.Mini3XlPlus]:Qo,[E.MiniR]:Zo,[E.Es12]:Go,[E.Es24]:Wo,[E.Es60]:Xo,[E.Es102]:Yo,[E.R10]:Ko,[E.R20]:er,[E.R20A]:tr,[E.R20B]:ir,[E.R30]:nr,[E.R40]:or,[E.R50]:rr,[E.R50B]:sr,[E.R50BM]:ar,[E.X10]:Xn,[E.X20]:Xn};function Qe(e){return e!=null&&e.top_loaded?P.Top:P.Front}function Yn(e){return e.label===e.name?e.model:e.label}var lr=function(e,t,i,n){var o=arguments.length,r=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,i,n);else for(var u=e.length-1;u>=0;u--)(c=e[u])&&(r=(o<3?c(r):o>3?c(t,i,r):c(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},xi={isLoading:!0,enclosures:[],selectedEnclosureIndex:0,selectedSlotNumber:null,selectedView:Ee.Pools,selectedSide:void 0},ne,D=(ne=class extends fn{constructor(t,i,n){super(xi),this.api=t,this.errorHandler=i,this.theme=n,this.stateAsSignal=je(this.state$,{initialValue:xi}),this.isLoading=b(()=>this.stateAsSignal().isLoading),this.selectedSlot=b(()=>{let o=this.stateAsSignal().selectedSlotNumber,r=this.selectedEnclosure();return o===null||!r?null:r.elements[X.ArrayDeviceSlot][o]}),this.selectedEnclosure=b(()=>{let o=this.stateAsSignal();return o.enclosures[o.selectedEnclosureIndex]}),this.selectedEnclosureSlots=b(()=>{var r,c;let o=((c=(r=this.selectedEnclosure())==null?void 0:r.elements)==null?void 0:c[X.ArrayDeviceSlot])||{};return Object.values(o)}),this.selectedView=b(()=>this.stateAsSignal().selectedView),this.selectedSide=b(()=>this.stateAsSignal().selectedSide),this.enclosures=b(()=>this.stateAsSignal().enclosures),this.poolColors=b(()=>{let o=this.enclosures(),r=Qi(o,re=>Object.values(re.elements[X.ArrayDeviceSlot])),c=Yi(r,re=>{var Ze;return!!((Ze=re.pool_info)!=null&&Ze.pool_name)}),u=ri(c,re=>re.pool_info.pool_name),I=Se(u),L=ri(I,(re,Ze)=>
1[re,this.theme.getRgbBackgroundColorByIndex(Ze)]);return Zi(L)}),this.enclosureLabel=b(()=>Yn(this.selectedEnclosure())),this.hasMoreThanOneSide=b(()=>{var o,r,c,u;return[(o=this.selectedEnclosure())==null?void 0:o.front_loaded,(r=this.selectedEnclosure())==null?void 0:r.top_loaded,Number((c=this.selectedEnclosure())==null?void 0:c.rear_slots)>0,Number((u=this.selectedEnclosure())==null?void 0:u.internal_slots)>0].filter(Boolean).length>1}),this.initiate=this.effect(o=>o.pipe(ae(()=>this.setState(xi)),De(()=>this.api.call("webui.enclosure.dashboard").pipe(ae(r=>{this.patchState(c=>({enclosures:r,selectedSide:Qe(r[c.selectedEnclosureIndex])}))}),this.errorHandler.catchError(),Oi(()=>{this.patchState({isLoading:!1})}))))),this.update=this.effect(o=>o.pipe(De(()=>this.api.call("webui.enclosure.dashboard").pipe(ae(r=>{this.patchState({enclosures:r})}),this.errorHandler.catchError())))),this.selectEnclosure=this.updater((o,r)=>{let c=o.enclosures.findIndex(u=>u.id===r);return c===-1&&(c=0),c===o.selectedEnclosureIndex?o:Te(se({},o),{selectedEnclosureIndex:c,selectedSlotNumber:null,selectedSide:Qe(o.enclosures[c]),selectedView:Ee.Pools})}),this.renameSelectedEnclosure=this.updater((o,r)=>{let c=[...o.enclosures];return c[o.selectedEnclosureIndex]=Te(se({},c[o.selectedEnclosureIndex]),{label:r}),Te(se({},o),{enclosures:c})}),this.selectSlot=this.updater((o,r)=>Te(se({},o),{selectedSlotNumber:r})),this.selectView=this.updater((o,r)=>Te(se({},o),{selectedView:r})),this.selectSide=this.updater((o,r)=>r===o.selectedSide?o:Te(se({},o),{selectedSide:r,selectedSlotNumber:null})),this.changeLightStatus=this.updater((o,r)=>Jn(o,c=>{let u=c.enclosures.find(L=>L.id===r.enclosureId);if(!u)return;let I=u.elements[X.ArrayDeviceSlot][r.driveBayNumber];I.drive_bay_light_status=r.status}))}listenForDiskUpdates(){return this.api.subscribe("disk.query").pipe(Pi(1*1e3),ae(()=>this.update()))}selectSlotByVdevDisk(t){this.selectEnclosure(t.enclosure_id),this.selectSlot(t.slot)}},ne.\u0275fac=function(i){return new(i||ne)(ve(K),ve(ie),ve(pn))},ne.\u0275prov=Re({token:ne,factory:ne.\u0275fac}),ne);D=lr([z()],D);var cr=function(e,t,i,n){var o=arguments.length,r=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,i,n);else for(var u=e.length-1;u>=0;u--)(c=e[u])&&(r=(o<3?c(r):o>3?c(t,i,r):c(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};function pr(e,t){if(e&1){let i=N();a(0,"button",2),T("click",function(){j(i);let o=h();return A(o.onEditLabel())}),p(1),d(2,"translate"),l()}e&2&&(s(),C(" ",m(2,1,"Edit Label")," "))}var me,Ge=(me=class{constructor(t,i){this.enclosureStore=t,this.matDialog=i,this.title=O.required(),this.requiredRoles=[Ue.EnclosureWrite]}onEditLabel(){let t=this.enclosureStore.selectedEnclosure();if(!t)return;let i={currentLabel:this.enclosureStore.enclosureLabel(),defaultLabel:t.name,enclosureId:t.id};this.matDialog.open(Lt,{data:i}).afterClosed().pipe(H(this)).subscribe(n=>{n&&this.enclosureStore.renameSelectedEnclosure(n)})}},me.\u0275fac=function(i){return new(i||me)(_(D),_(nn))},me.\u0275cmp=y({type:me,selectors:[["ix-enclosure-header"]],inputs:{title:[1,"title"]},decls:5,vars:2,consts:[[1,"title"],["mat-button","","color","default","ixTest","edit-label",3,"click",4,"ixRequiresRoles"],["mat-button","","color","default","ixTest","edit-label",3,"click"]],template:function(i,n){i&1&&(a(0,"div")(1,"h3",0),p(2),l()(),a(3,"div"),S(4,pr,3,3,"button",1),l()),i&2&&(s(2),v(n.title()),s(2),f("ixRequiresRoles",n.requiredRoles))},dependencies:[qe,G,B,w,M],styles:["[_nghost-%COMP%]{align-items:center;display:flex;flex-direction:row;justify-content:space-between;margin-bottom:16px;width:100%}.title[_ngcontent-%COMP%]{color:var(--fg2);font-size:23px}\n/*# sourceMappingURL=enclosure-header.component-YGPIGJM7.css.map */"],changeDetection:0}),me);Ge=cr([z()],Ge);function dr(e,t){if(e&1&&g(0,"ix-empty",1),e&2){let i=h();f("conf",i.noView)}}function mr(e,t){if(e&1&&(a(0,"ix-table"),g(1,"thead",2)(2,"tbody",3),l()),e&2){let i=h();s(),f("columns",i.columns)("dataProvider",i.dataProvider()),s(),f("columns",i.columns)("dataProvider",i.dataProvider())}}var Qn=(()=>{let t=class t{constructor(n,o,r){this.route=n,this.translate=o,this.store=r,this.currentView=je(this.route.paramMap.pipe(Le(c=>c.get("view"))),{initialValue:void 0}),this.title=b(()=>{let c=ze.has(this.currentView())?ze.get(this.currentView()):this.currentView();return this.translate.instant("{view} on {enclosure}",{view:c,enclosure:this.store.enclosureLabel()})}),this.noView={title:this.translate.instant("N/A"),message:this.translate.instant("This view is not available for this enclosure."),large:!0,type:Mt.Errors},this.viewElements=b(()=>this.store.selectedEnclosure().elements[this.currentView()]),this.columns=Pt([we({title:this.translate.instant("Descriptor"),propertyName:"descriptor"}),we({title:this.translate.instant("Status"),propertyName:"status"}),we({title:this.translate.instant("Value"),propertyName:"value"})],{uniqueRowTag:c=>c.descriptor,ariaLabels:c=>[c.descriptor,this.translate.instant("Element")]}),this.dataProvider=b(()=>{let c=new Pn,u=Object.values(this.viewElements());return c.setRows(u),c})}};t.\u0275fac=function(o){return new(o||t)(_(rt),_(q),_(D))},t.\u0275cmp=y({type:t,selectors:[["ix-elements-page"]],decls:5,vars:2,consts:[[3,"title"],[3,"conf"],["ix-table-head","",3,"columns","dataProvider"],["ix-table-body","",3,"columns","dataProvider"]],template:function(o,r){o&1&&(a(0,"mat-card-header"),g(1,"ix-enclosure-header",0),l(),a(2,"mat-card-content"),S(3,dr,1,1,"ix-empty",1)(4,mr,3,4,"ix-table"),l()),o&2&&(s(),f("title",r.title()),s(2),x(r.viewElements()?4:3))},dependencies:[Ne,Ge,be,wt,Et,Tt,Ot],encapsulation:2,changeDetection:0});let e=t;return e})();function Ht(e){return[E.Mini3E,E.Mini3EPlus,E.Mini3X,E.Mini3XPlus,E.Mini3XlPlus].includes(e.model)}
1var ur=function(e,t,i,n){var o=arguments.length,r=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,i,n);else for(var u=e.length-1;u>=0;u--)(c=e[u])&&(r=(o<3?c(r):o>3?c(t,i,r):c(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};function fr(e,t){e&1&&(g(0,"ix-icon",4),p(1),d(2,"translate")),e&2&&(s(),C(" ",m(2,1,"Identify light is on.")," "))}function hr(e,t){e&1&&(g(0,"ix-icon",5),p(1),d(2,"translate")),e&2&&(s(),C(" ",m(2,1,"Identify light is off.")," "))}function gr(e,t){e&1&&(g(0,"ix-icon",5),p(1),d(2,"translate")),e&2&&(s(),C(" ",m(2,1,"Identify light is off.")," "))}function _r(e,t){if(e&1&&S(0,fr,3,3)(1,hr,3,3)(2,gr,3,3),e&2){let i,n=h();x((i=n.status())===n.DriveBayLightStatus.On?0:i===n.DriveBayLightStatus.Clear?1:i===n.DriveBayLightStatus.Off?2:-1)}}function vr(e,t){e&1&&(g(0,"ix-icon",6),p(1),d(2,"translate")),e&2&&(s(),C(" ",m(2,1,"Light status is unknown.")," "))}function xr(e,t){if(e&1){let i=N();a(0,"button",7),T("click",function(){j(i);let o=h();return A(o.changeLightStatus(o.DriveBayLightStatus.On))}),p(1),d(2,"translate"),l()}e&2&&(s(),v(m(2,1,"Identify")))}function Cr(e,t){if(e&1){let i=N();a(0,"button",8),T("click",function(){j(i);let o=h();return A(o.changeLightStatus(o.DriveBayLightStatus.Off))}),p(1),d(2,"translate"),l()}e&2&&(s(),v(m(2,1,"Turn Off")))}var ue,We=(ue=class{constructor(t,i,n){this.api=t,this.errorHandler=i,this.store=n,this.isStatusKnown=b(()=>!!this.status()),this.status=b(()=>this.store.selectedSlot().drive_bay_light_status),this.DriveBayLightStatus=In}changeLightStatus(t){let i=this.store.selectedSlot(),n=this.store.selectedEnclosure(),o=this.status();this.store.changeLightStatus({status:t,enclosureId:n.id,driveBayNumber:i.drive_bay_number}),this.api.call("enclosure2.set_slot_status",[{status:t,enclosure_id:n.id,slot:i.drive_bay_number}]).pipe(wi(r=>(this.errorHandler.showErrorModal(r),this.store.changeLightStatus({status:o,enclosureId:n.id,driveBayNumber:i.drive_bay_number}),bi)),H(this)).subscribe()}},ue.\u0275fac=function(i){return new(i||ue)(_(K),_(ie),_(D))},ue.\u0275cmp=y({type:ue,selectors:[["ix-identify-light"]],decls:6,vars:3,consts:[[1,"status-line"],[1,"controls"],["mat-button","","ixTest","identify"],["mat-button","","ixTest","turn-off"],["name","mdi-lightbulb-on"],["name","mdi-lightbulb-off-outline"],["name","mdi-lightbulb-question-outline"],["mat-button","","ixTest","identify",3,"click"],["mat-button","","ixTest","turn-off",3,"click"]],template:function(i,n){i&1&&(a(0,"div",0),S(1,_r,3,1)(2,vr,3,3),l(),a(3,"div",1),S(4,xr,3,3,"button",2)(5,Cr,3,3,"button",3),l()),i&2&&(s(),x(n.isStatusKnown()?1:2),s(3),x(n.status()===n.DriveBayLightStatus.Off||n.status()===n.DriveBayLightStatus.Clear||!n.isStatusKnown()?4:-1),s(),x(n.status()!==n.DriveBayLightStatus.Off&&n.status()!==n.DriveBayLightStatus.Clear||!n.isStatusKnown()?5:-1))},dependencies:[te,G,B,w,M],styles:["[_nghost-%COMP%]{display:block;margin:0 10px;padding-bottom:12px}.status-line[_ngcontent-%COMP%]{align-items:center;display:flex;gap:10px;margin-bottom:5px}.controls[_ngcontent-%COMP%]{display:flex;gap:10px;justify-content:center}\n/*# sourceMappingURL=identify-light.component-LK7U6USM.css.map */"],changeDetection:0}),ue);We=ur([z()],We);var Sr=e=>({n:e});function yr(e,t){if(e&1&&(a(0,"div",2)(1,"div",3),p(2),d(3,"translate"),l(),a(4,"div",4),p(5),d(6,"translate"),l()()),e&2){let i=h();s(2),v(m(3,2,"Rotation Rate")),s(3),C(" ",V(6,4,"{n} RPM",R(7,Sr,i.selectedSlot().rotationrate))," ")}}function br(e,t){if(e&1&&(a(0,"div",2)(1,"div",3),p(2),d(3,"translate"),l(),a(4,"div",4),p(5),d(6,"mapValue"),d(7,"translate"),l()(),a(8,"div",2)(9,"div",3),p(10),d(11,"translate"),l(),a(12,"div",4),p(13),d(14,"number"),l()(),a(15,"div",2)(16,"div",3),p(17),d(18,"translate"),l(),a(19,"div",4),p(20),d(21,"number"),l()(),a(22,"div",2)(23,"div",3),p(24),d(25,"translate"),l(),a(26,"div",4),p(27),d(28,"number"),l()()),e&2){let i,n=h();s(2),v(m(3,8,"Status")),s(3),C(" ",m(7,13,V(6,10,(i=n.selectedSlot().pool_info)==null?null:i.disk_status,n.enclosureDiskStatusLabels))," "),s(5),v(m(11,15,"Read Errors")),s(3),v(m(14,17,n.selectedSlot().pool_info.disk_read_errors)),s(4),v(m(18,19,"Write Errors")),s(3),v(m(21,21,n.selectedSlot().pool_info.disk_write_errors)),s(4),v(m(25,23,"Checksum Errors")),s(3),v(m(28,25,n.selectedSlot().pool_info.disk_checksum_errors))}}var Zn=(()=>{let t=class t{constructor(){this.selectedSlot=O.required(),this.enclosureDiskStatusLabels=Pe}};t.\u0275fac=function(o){return new(o||t)}
1,t.\u0275cmp=y({type:t,selectors:[["ix-disk-details"]],inputs:{selectedSlot:[1,"selectedSlot"]},decls:25,vars:20,consts:[[1,"details"],[1,"details-grid"],[1,"item"],[1,"label"],[1,"value"]],template:function(o,r){if(o&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),p(4),d(5,"translate"),l(),a(6,"div",4),p(7),d(8,"translate"),l()(),a(9,"div",2)(10,"div",3),p(11),d(12,"translate"),l(),a(13,"div",4),p(14),d(15,"translate"),l()(),a(16,"div",2)(17,"div",3),p(18),d(19,"translate"),l(),a(20,"div",4),p(21),d(22,"translate"),l()(),S(23,yr,7,9,"div",2)(24,br,29,27),l()()),o&2){let c;s(4),v(m(5,8,"Pool")),s(3),C(" ",((c=r.selectedSlot().pool_info)==null?null:c.pool_name)||m(8,10,"Disk not attached to any pools.")," "),s(4),v(m(12,12,"Model")),s(3),v(r.selectedSlot().model||m(15,14,"N/A")),s(4),v(m(19,16,"Serial")),s(3),v(r.selectedSlot().serial||m(22,18,"N/A")),s(2),x(r.selectedSlot().rotationrate?23:-1),s(),x(r.selectedSlot().pool_info?24:-1)}},dependencies:[w,M,Me,ot],styles:[".details-grid[_ngcontent-%COMP%]{display:grid;gap:5px;grid-template-columns:1fr 1fr 1fr 1fr}.details-grid[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{margin:8px 0;text-align:left}.details-grid[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:100%;font-weight:500}.details-grid[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:120%;font-weight:300;line-height:85%;text-align:left;word-break:break-word}\n/*# sourceMappingURL=disk-details.component-MZCK7J4O.css.map */"],changeDetection:0});let e=t;return e})();var Mr=function(e,t,i,n){var o=arguments.length,r=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,i,n);else for(var u=e.length-1;u>=0;u--)(c=e[u])&&(r=(o<3?c(r):o>3?c(t,i,r):c(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},wr=e=>({disk:e}),Pr=e=>({number:e});function Er(e,t){e&1&&g(0,"ix-identify-light")}function Or(e,t){if(e&1&&(a(0,"div",4)(1,"div",6),g(2,"ix-disk-icon",7),a(3,"div",8),p(4),d(5,"ixFileSize"),l(),a(6,"div",9),S(7,Er,1,0,"ix-identify-light"),l()(),g(8,"ix-disk-details",10),l()),e&2){let i=h();s(2),f("type",i.selectedSlot().type)("size",i.selectedSlot().size)("name",i.selectedSlot().dev),s(2),v(m(5,6,i.selectedSlot().size)),s(3),x(i.selectedSlot().supports_identify_light?7:-1),s(),f("selectedSlot",i.selectedSlot())}}function Tr(e,t){if(e&1&&(a(0,"div",5),p(1),d(2,"translate"),l()),e&2){let i=h();s(),C(" ",V(2,1,"Slot {number} is empty.",R(4,Pr,i.selectedSlot().drive_bay_number))," ")}}var fe,$t=(fe=class{constructor(t,i){this.store=t,this.translate=i,this.selectedSlot=O(),this.diskName=b(()=>this.selectedSlot().dev||this.translate.instant("Slot: {slot}",{slot:this.selectedSlot().drive_bay_number}))}closeDetails(){this.store.selectSlot(null)}},fe.\u0275fac=function(i){return new(i||fe)(_(D),_(q))},fe.\u0275cmp=y({type:fe,selectors:[["ix-disk-details-overview"]],inputs:{selectedSlot:[1,"selectedSlot"]}
1,decls:9,vars:7,consts:[[1,"container"],[1,"disk-details-header"],["mat-mini-fab","","color","primary","ixTest","close-details",3,"click"],["name","chevron_left"],[1,"disk-details-container"],[1,"slot-empty"],[1,"drive"],[3,"type","size","name"],[1,"capacity"],[1,"disk-actions"],[1,"details",3,"selectedSlot"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"div",1)(2,"button",2),T("click",function(){return n.closeDetails()}),g(3,"ix-icon",3),l(),a(4,"span"),p(5),d(6,"translate"),l()(),S(7,Or,9,8,"div",4)(8,Tr,3,6,"div",5),l()),i&2&&(s(5),C(" ",V(6,2,"Disk Details for {disk}",R(5,wr,n.diskName()))," "),s(2),x(n.selectedSlot().dev?7:8))},dependencies:[Hi,B,te,Dt,We,Zn,w,M,yn],styles:[".container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}@media (min-width: 1280px){.container[_ngcontent-%COMP%]{height:300px}}.disk-details-header[_ngcontent-%COMP%]{align-items:center;border-bottom:solid 1px var(--lines);display:flex;font-size:1.15rem;gap:15px;height:50px;padding:12px 16px}.disk-details-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{height:30px;width:30px}.disk-details-container[_ngcontent-%COMP%]{display:flex;height:100%}
1@media (max-width: 960px){.disk-details-container[_ngcontent-%COMP%]{flex-wrap:wrap}}.disk-details-container[_ngcontent-%COMP%] .drive[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;gap:2px;justify-content:center;width:25%}@media (max-width: 1280px){.disk-details-container[_ngcontent-%COMP%] .drive[_ngcontent-%COMP%]{margin-top:10px;width:100%}}.disk-details-container[_ngcontent-%COMP%] .drive[_ngcontent-%COMP%] .capacity[_ngcontent-%COMP%]{font-size:120%;font-weight:500}.disk-details-container[_ngcontent-%COMP%] .details[_ngcontent-%COMP%]{border-left:solid 1px var(--lines);overflow:auto;padding:0 12px;width:75%}@media (max-width: 1280px){.disk-details-container[_ngcontent-%COMP%] .details[_ngcontent-%COMP%]{margin-top:20px;width:100%}}.slot-empty[_ngcontent-%COMP%]{align-items:center;display:flex;font-size:20px;height:100%;justify-content:center;min-height:200px;padding-bottom:5px}\n/*# sourceMappingURL=disk-details-overview.component-UKKXD5GM.css.map */"],changeDetection:0}),fe);$t=Mr([z()],$t);var Ci=e=>({n:e}),Si=e=>["show",e],Dr=(e,t)=>({name:e,status:t}),eo=(e,t)=>({name:e,n:t}),kr=e=>({name:e});function Ir(e,t){e&1&&(p(0),d(1,"translate")),e&2&&C(" ",m(1,1,"All pools are online.")," ")}function Fr(e,t){if(e&1&&(p(0),d(1,"translate")),e&2){let i=h();C(" ",V(1,1,"Pool {name} is {status}.",tt(4,Dr,i.unhealthyPoolsInfo()[0].pool_name,i.unhealthyPoolsInfo()[0].disk_status))," ")}}function Lr(e,t){if(e&1&&(p(0),d(1,"translate")),e&2){let i=h();C(" ",V(1,1,"{name} and {n, plural, one {# other pool} other {# other pools}} are not healthy.",tt(4,eo,i.unhealthyPoolsInfo()[0].pool_name,i.unhealthyPoolsInfo().length-1))," ")}}function Rr(e,t){e&1&&(p(0),d(1,"translate")),e&2&&C(" ",m(1,1,"All disks healthy.")," ")}function Br(e,t){if(e&1&&(p(0),d(1,"translate")),e&2){let i=h();C(" ",V(1,1,"Check {name}.",R(4,kr,i.failedDisks()[0].dev))," ")}}function Vr(e,t){if(e&1&&(p(0),d(1,"translate")),e&2){let i=h();C(" ",V(1,1,"Check {name} and {n, plural, one {# other disk} other {# other disks}}.",tt(4,eo,i.failedDisks()[0].dev,i.failedDisks().length-1))," ")}}function jr(e,t){if(e&1){let i=N();a(0,"div",3)(1,"div",4),p(2),l(),a(3,"div",5),p(4),d(5,"translate"),l(),a(6,"div",6),p(7),d(8,"translate"),l(),a(9,"button",7),T("click",function(){j(i);let o=h();return A(o.setCurrentView(o.EnclosureView.Expanders))}),p(10),d(11,"translate"),l()()}if(e&2){let i=h();U("active",i.selectedView()===i.EnclosureView.Expanders),s(2),v(i.expanders().length),s(2),v(V(5,7,"{n, plural, one {SAS Expander} other {SAS Expanders} }",R(14,Ci,i.expanders().length))),s(3),C(" ",m(8,10,"on this enclosure.")," "),s(2),f("ixTest",R(16,Si,i.EnclosureView.Expanders)),s(),C(" ",m(11,12,"Show Expander Status")," ")}}var to=(()=>{let t=class t{constructor(n){this.enclosureStore=n,this.selectedView=this.enclosureStore.selectedView,this.selectedEnclosure=this.enclosureStore.selectedEnclosure,this.selectedEnclosureSlots=this.enclosureStore.selectedEnclosureSlots,this.EnclosureView=Ee,this.poolsInfo=b(()=>{let o=this.selectedEnclosureSlots();return[...new Map(o.filter(r=>r.pool_info).map(r=>[r.pool_info.pool_name,r.pool_info])).values()]}),this.expanders=b(()=>{var o;return[...Object.values(((o=this.selectedEnclosure().elements)==null?void 0:o[X.SasExpander])||{})]}),this.unhealthyPoolsInfo=b(()=>this.poolsInfo().filter(o=>o.disk_status!==Z.Online)),this.failedDisks=b(()=>this.selectedEnclosureSlots().filter(r=>{var c;return((c=r.pool_info)==null?void 0:c.disk_status)===Z.Faulted}))}setCurrentView(n){this.enclosureStore.selectView(n)}};t.\u0275fac=function(o){return new(o||t)(_(D))},t.\u0275cmp=y({type:t,selectors:[["ix-disks-overview"]],decls:33,vars:36,consts:[[1,"container"],[1,"disk-detail
1s-header"],[1,"disk-overview"],[1,"tile"],[1,"primary-number"],[1,"title"],[1,"subtitle"],["mat-button","","color","default",3,"click","ixTest"],[1,"tile",3,"active"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"div",1)(2,"span"),p(3),d(4,"translate"),l()(),a(5,"div",2)(6,"div",3)(7,"div",4),p(8),l(),a(9,"div",5),p(10),d(11,"translate"),l(),a(12,"div",6),S(13,Ir,2,3)(14,Fr,2,7)(15,Lr,2,7),l(),a(16,"button",7),T("click",function(){return r.setCurrentView(r.EnclosureView.Pools)}),p(17),d(18,"translate"),l()(),a(19,"div",3)(20,"div",4),p(21),l(),a(22,"div",5),p(23),d(24,"translate"),l(),a(25,"div",6),S(26,Rr,2,3)(27,Br,2,6)(28,Vr,2,7),l(),a(29,"button",7),T("click",function(){return r.setCurrentView(r.EnclosureView.DiskStatus)}),p(30),d(31,"translate"),l()(),S(32,jr,12,18,"div",8),l()()),o&2&&(s(3),v(m(4,16,"Disks Overview")),s(3),U("active",r.selectedView()===r.EnclosureView.Pools),s(2),v(r.poolsInfo().length),s(2),v(V(11,18,"{n, plural, one {Pool in Enclosure} other {Pools in Enclosure} }",R(28,Ci,r.poolsInfo().length))),s(3),x(r.unhealthyPoolsInfo().length===0?13:r.unhealthyPoolsInfo().length===1?14:r.unhealthyPoolsInfo().length>1?15:-1),s(3),f("ixTest",R(30,Si,r.EnclosureView.Pools)),s(),C(" ",m(18,21,"Show Pools")," "),s(2),U("active",r.selectedView()===r.EnclosureView.DiskStatus),s(2),v(r.failedDisks().length),s(2),v(V(24,23,"{n, plural, one {Failed Disk} other {Failed Disks} }",R(32,Ci,r.failedDisks().length))),s(3),x(r.failedDisks().length===0?26:r.failedDisks().length===1?27:r.failedDisks().length>1?28:-1),s(3),f("ixTest",R(34,Si,r.EnclosureView.DiskStatus)),s(),C(" ",m(31,26,"Show Status")," "),s(2),x(r.expanders().length?32:-1))},dependencies:[G,B,w,M],styles:[".container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}@media (min-width: 1280px){.container[_ngcontent-%COMP%]{height:300px}}.disk-details-header[_ngcontent-%COMP%]{align-items:center;border-bottom:solid 1px var(--lines);display:flex;font-size:1.15rem;gap:15px;height:50px;padding:12px 16px}.disk-overview[_ngcontent-%COMP%]{display:flex;height:100%}@media (max-width: 600px){.disk-overview[_ngcontent-%COMP%]{flex-wrap:wrap}}
1.disk-overview[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;justify-content:center;width:100%}.disk-overview[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]:not(:last-child){border-right:1px solid var(--lines)}.disk-overview[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] .primary-number[_ngcontent-%COMP%]{font-size:3.25rem;font-weight:100}.disk-overview[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem}.disk-overview[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{font-size:.65rem;opacity:.85}.disk-overview[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:16px}.disk-overview[_ngcontent-%COMP%] .tile.active[_ngcontent-%COMP%]{background-color:var(--contrast-darker)}\n/*# sourceMappingURL=disks-overview.component-WJVH4GXW.css.map */"],changeDetection:0});let e=t;return e})();function oe(e,t){return Object.values(e.elements[X.ArrayDeviceSlot]).filter(i=>{switch(t){case P.Front:return i.is_front;case P.Rear:return i.is_rear;case P.Top:return i.is_top;case P.Internal:return i.is_internal;default:return Sn(t),!1}})}var io=(()=>{let t=class t{constructor(n){this.http=n,this.cache=new Map}loadSvg(n){let o=this.cache.get(n);return o?et(o):this.http.get(n,{responseType:"text"}).pipe(ae(r=>this.cache.set(n,r)))}};t.\u0275fac=function(o){return new(o||t)(ve(qi))},t.\u0275prov=Re({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Ur=function(e,t,i,n){var o=arguments.length,r=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,i,n);else for(var u=e.length-1;u>=0;u--)(c=e[u])&&(r=(o<3?c(r):o>3?c(t,i,r):c(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},qr=["svgContainer"],zr=e=>({height:e,marginBottom:0,background:"var(--alt-bg2)",opacity:.25});function Hr(e,t){if(e&1&&g(0,"div",3,0),e&2){let i=h();U("static",!i.enableMouseEvents()),f("innerHTML",i.svg(),ki)("@svgTransition",void 0)}}function $r(e,t){if(e&1&&g(0,"ngx-skeleton-loader",2),e&2){let i=h();f("animation",!1)("theme",R(4,zr,i.enableMouseEvents()?"66px":"10px"))("count",3)("@svgTransition",void 0)}}var he,Jt=(he=class{constructor(t,i,n,o,r){this.renderer=t,this.svgLoader=i,this.errorHandler=n,this.sanitizer=o,this.translate=r,this.emptyOpacity=.15,this.unselectedOpacity=.3,this.svgUrl=O.required(),this.slots=O.required(),this.enableMouseEvents=O(!0),this.slotTintFn=O(),this.selectedSlot=Be(null),this.svg=Fi(void 0),this.svgContainer=Li("svgContainer"),this.overlayRects={},this.slotElements={},this.loadSvg=Ce(()=>{this.svg.set(void 0),this.svgLoader.loadSvg(this.svgUrl()).pipe(this.errorHandler.catchError(),Ei(0),H(this)).subscribe(c=>{this.svg.set(this.sanitizer.bypassSecurityTrustHtml(c))})}),this.processSvg=Ce(()=>{let c=this.svgContainer();if(!c||!this.svg())return;let u=c.nativeElement.querySelectorAll('svg [id^="DRIVE_CAGE_"]');this.clearOverlays(),u.forEach(I=>{let L=this.getSlotForTray(I);L&&(this.slotElements[L.drive_bay_number]=I,this.addOverlay(L,I),this.enableMouseEvents()&&this.addInteractionListeners(L),this.slotTintFn()&&this.addTint(L))})}),this.highlightSelectedSlot=Ce(()=>{let c=this.selectedSlot(),u=this.slots(),I=this.svg();this.clearSelectionStylesFromAllSlots(),!(!c||!I)&&(this.addSelectedStyles(c),this.addSelectedVdevDisksStyles(c,u))}),this.slotSelected=c=>{let u=this.selectedSlot();c.dev&&u&&c.dev===u.dev||this.selectedSlot.set(c)}}ngOnDestroy(){this.keyDownListener&&this.keyDownListener(),this.clickListener&&this.clickListener()}clearSelectionStylesFromAllSlots(){this.resetDimValues(),Object.values(this.overlayRects).forEach(t=>{t.classList.remove("selected"),t.classList.remove("selected-vdev-disk"),t.classList.remove("not-selected-vdev-disk")})}addSelectedStyles(t){let i=this.overlayRects[t.drive_bay_number];this.renderer.addClass(i,"selected")}addSelectedVdevDisksStyles(t,i){var o;let n=(o=t.pool_info)==null?void 0:o.vdev_disks.map(r=>r.dev).filter(r=>r!==t.dev);if(n!=null&&n.length)for(let r of i)n.includes(r.dev)?(this.renderer.addClass(this.overlayRects[r.drive_bay_number],"selected-vdev-disk"),r.type&&this.dimSlot(r.drive_bay_number,1)):r.drive_bay_number!==t.drive_bay_number&&this.dimSlot(r.drive_bay_number,this.unselectedOpacity)}
1clearOverlays(){Object.values(this.overlayRects).forEach(t=>t.remove()),this.overlayRects={}}addOverlay(t,i){let n=this.renderer.createElement("rect","http://www.w3.org/2000/svg");this.renderer.appendChild(i.parentNode,n);let o=i.getBBox();this.renderer.addClass(n,"overlay-rect"),this.renderer.setAttribute(n,"width","".concat(o.width)),this.renderer.setAttribute(n,"height","".concat(o.height)),this.renderer.setAttribute(n,"x","".concat(o.x)),this.renderer.setAttribute(n,"y","".concat(o.y)),this.overlayRects[t.drive_bay_number]=n}handleOverlayKeyNavigation(t,i){switch(t.key){case"Enter":this.slotSelected(i);break;case"ArrowUp":case"ArrowLeft":this.moveFocusToNeighboringOverlay(i,0,-1);break;case"ArrowRight":case"ArrowDown":this.moveFocusToNeighboringOverlay(i,0,1);break}}moveFocusToNeighboringOverlay(t,i,n){let r=t.drive_bay_number+n+i,c=this.overlayRects[r];c&&c.focus()}addInteractionListeners(t){let i=this.overlayRects[t.drive_bay_number];this.clickListener=this.renderer.listen(i,"click",this.slotSelected.bind(this,t)),this.keyDownListener=this.renderer.listen(i,"keydown",n=>this.handleOverlayKeyNavigation(n,t)),this.renderer.setAttribute(i,"tabindex","0"),this.renderer.setAttribute(i,"aria-label",this.translate.instant("Disk Details for {disk} ({descriptor})",{disk:t.dev||this.translate.instant("Empty drive cage"),descriptor:this.translate.instant("Slot: {slot}",{slot:t.drive_bay_number})}))}addTint(t){let i=this.getTintTargets(t.drive_bay_number),n=this.slotTintFn()(t);n?(i.forEach(o=>{this.renderer.addClass(o,"tinted"),this.renderer.setStyle(o,"fill",n),this.renderer.setStyle(o,"filter","brightness(1.25)")}),this.dimSlot(t.drive_bay_number,1)):(i.forEach(o=>{this.renderer.removeClass(o,"tinted"),this.renderer.setStyle(o,"fill",null),this.renderer.setStyle(o,"filter","brightness(1)")}),this.dimSlot(t.drive_bay_number,this.emptyOpacity))}dimSlot(t,i){this.renderer.setStyle(this.slotElements[t],"opacity",i.toString())}resetDimValues(){if(!this.svgContainer()||!this.svg())return;this.svgContainer().nativeElement.querySelectorAll('svg [id^="DRIVE_CAGE_"]').forEach(n=>{let o=this.getSlotForTray(n);o&&(o.dev?this.dimSlot(o.drive_bay_number,1):this.dimSlot(o.drive_bay_number,this.emptyOpacity))})}getTintTargets(t){let i="DRIVE_CAGE_"+t.toString();return this.slotElements[t].querySelectorAll("svg [id^=".concat(i,"] .tint-target"))}getSlotForTray(t){let i=Number(t.id.split("_").pop()),n=this.slots().find(o=>o.drive_bay_number===i);if(!n){console.error("Slot ".concat(i," not found in slots list"));return}return n}},he.\u0275fac=function(i){return new(i||he)(_(Ii),_(io),_(ie),_(Ji),_(q))},he.\u0275cmp=y({type:he,selectors:[["ix-enclosure-svg"]],viewQuery:function(i,n){i&1&&Vi(n.svgContainer,qr,5),i&2&&ji()},inputs:{svgUrl:[1,"svgUrl"],slots:[1,"slots"],enableMouseEvents:[1,"enableMouseEvents"],slotTintFn:[1,"slotTintFn"],selectedSlot:[1,"selectedSlot"]},outputs:{selectedSlot:"selectedSlotChange"},decls:2,vars:1,consts:[["svgContainer",""],[1,"svg-container",3,"static","innerHTML"],[3,"animation","theme","count"],[1,"svg-container",3,"innerHTML"]],template:function(i,n){i&1&&S(0,Hr,2,4,"div",1)(1,$r,1,6,"ngx-skeleton-loader",2),i&2&&x(n.svg()?0:1)},dependencies:[lt,at],styles:["[_nghost-%COMP%]{display:block;max-height:inherit}@media (max-width: 1280px){[_nghost-%COMP%]{margin:0 auto;max-width:600px}}.svg-container[_ngcontent-%COMP%]{max-height:inherit;text-align:center}.svg-container.static[_ngcontent-%COMP%]{pointer-events:none}.svg-container[_ngcontent-%COMP%] svg{max-height:inherit}.svg-container[_ngcontent-%COMP%] .overlay-rect{cursor:pointer;fill:var(--black);fill-opacity:.3;transition:fill-opacity .2s ease-in-out,filter .2s ease-in-out}.svg-container[_ngcontent-%COMP%] .overlay-rect:hover{fill:var(--primary)!important;stroke:var(--primary);stroke-width:4px}.svg-container[_ngcontent-%COMP%] .overlay-rect.selected{fill-opacity:0;stroke:var(--primary);stroke-dasharray:none;stroke-width:3px}.svg-container[_ngcontent-%COMP%] .overlay-rect.selected-vdev-disk{fill:#000;opacity:.25}\n/*# sourceMappingURL=enclosure-svg.component-KTZQNHH3.css.map */"],data:{animation:[Gi("svgTransition",[Xi(":enter",[oi({opacity:0,height:"*"}),Wi("300ms ease-in",oi({opacity:1,height:"*"}))])])]},changeDetection:0}),he);Jt=Ur([z()],Jt);var Jr=(e,t)=>t.drive_bay_number,Gr=e=>["enclosure-slot",e],Wr=e=>({n:e});function Xr(e,t){if(e&1){let i=N();a(0,"a",2),d(1,"translate"),T("click",function(){let o=j(i).$implicit,r=h();return A(r.selectedSlot.set(o))}),g(2,"span",3),a(3,"span",4),p(4),l()()}
1if(e&2){let i,n=t.$implicit,o=h();U("selected",n.drive_bay_number===((i=o.selectedSlot())==null?null:i.drive_bay_number))("static",!o.enableMouseEvents()),f("ixTest",R(12,Gr,n.drive_bay_number)),Ri("aria-label",V(1,9,"Drive Bay {n}",R(14,Wr,n.drive_bay_number))),s(2),xe("background-color",o.slotTintFn()(n)),s(2),v(n.drive_bay_number)}}var no=(()=>{let t=class t{constructor(){this.model=O.required(),this.slots=O.required(),this.enableMouseEvents=O(!0),this.slotTintFn=O.required(),this.selectedSlot=Be(null),this.highCountThreshold=60}ngOnInit(){console.error("Unsupported enclosure model: ".concat(this.model()))}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=y({type:t,selectors:[["ix-not-supported-model"]],inputs:{model:[1,"model"],slots:[1,"slots"],enableMouseEvents:[1,"enableMouseEvents"],slotTintFn:[1,"slotTintFn"],selectedSlot:[1,"selectedSlot"]},outputs:{selectedSlot:"selectedSlotChange"},decls:3,vars:2,consts:[[1,"slots"],[1,"slot","tint-target",3,"selected","static","ixTest"],[1,"slot","tint-target",3,"click","ixTest"],[1,"background"],[1,"number"]],template:function(o,r){o&1&&(a(0,"div",0),$(1,Xr,5,16,"a",1,Jr),l()),o&2&&(U("high-count",r.slots().length>r.highCountThreshold),s(),J(r.slots()))},dependencies:[B,w,M],styles:["[_nghost-%COMP%]{align-items:center;display:flex;justify-content:center}.slots[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,100px));padding:20px 10px}.slots.high-count[_ngcontent-%COMP%]{grid-template-columns:repeat(6,minmax(0,60px))}.slot[_ngcontent-%COMP%]{aspect-ratio:16/9;border:1px solid transparent;border-radius:2px;box-sizing:border-box;cursor:pointer;overflow:hidden;position:relative;transition:border .2s ease-in-out}.slot.static[_ngcontent-%COMP%]{cursor:default;pointer-events:none}.slot[_ngcontent-%COMP%]:hover{border:solid 2px var(--primary)}.slot[_ngcontent-%COMP%]:hover .background[_ngcontent-%COMP%], .slot[_ngcontent-%COMP%]:hover .number[_ngcontent-%COMP%]{filter:brightness(1)}.slot.selected[_ngcontent-%COMP%]{border:solid 2px var(--primary);outline:1px solid var(--fg1)}.slot.selected[_ngcontent-%COMP%] .background[_ngcontent-%COMP%], .slot.selected[_ngcontent-%COMP%] .number[_ngcontent-%COMP%]{filter:brightness(1.1)}.slot[_ngcontent-%COMP%] .background[_ngcontent-%COMP%], .slot[_ngcontent-%COMP%] .number[_ngcontent-%COMP%]{align-items:center;bottom:0;display:flex;font-weight:500;justify-content:center;left:0;position:absolute;right:0;top:0;transition:filter .2s ease-in-out}.slot[_ngcontent-%COMP%] .background[_ngcontent-%COMP%]{background-color:var(--bg2);filter:brightness(.8)}\n/*# sourceMappingURL=not-supported-model.component-4J6KP5MA.css.map */"],changeDetection:0});let e=t;return e})();function Kr(e,t){if(e&1){let i=N();a(0,"ix-enclosure-svg",2),ni("selectedSlotChange",function(o){j(i);let r=h();return ii(r.selectedSlot,o)||(r.selectedSlot=o),A(o)}),l()}if(e&2){let i=h();f("svgUrl",i.svgUrl())("slotTintFn",i.slotTintFn())("enableMouseEvents",i.enableMouseEvents())("slots",i.sideSlots()),ti("selectedSlot",i.selectedSlot)}}function Yr(e,t){if(e&1){let i=N();a(0,"ix-not-supported-model",3),ni("selectedSlotChange",function(o){j(i);let r=h();return ii(r.selectedSlot,o)||(r.selectedSlot=o),A(o)}),l()}if(e&2){let i=h();f("model",i.enclosure().model)("slots",i.sideSlots())("slotTintFn",i.slotTintFn())("enableMouseEvents",i.enableMouseEvents()),ti("selectedSlot",i.selectedSlot)}}var Oe=(()=>{let t=class t{constructor(){this.enclosure=O.required(),this.enableMouseEvents=O(!0),this.slotTintFn=O(),this.selectedSlot=Be(null),this.side=O(void 0),this.sideSlots=b(()=>oe(this.enclosure(),this.shownSide())),this.shownSide=b(()=>{let n=this.side();return n!==void 0?n:Qe(this.enclosure())}),this.svgUrl=b(()=>{var n,o;return(o=(n=Kn)==null?void 0:n[this.enclosure().model])==null?void 0:o[this.shownSide()]})}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=y({type:t,selectors:[["ix-enclosure-side"]],inputs:{enclosure:[1,"enclosure"],enableMouseEvents:[1,"enableMouseEvents"],slotTintFn:[1,"slotTintFn"],selectedSlot:[1,"selectedSlot"],side:[1,"side"]},outputs:{selectedSlot:"selectedSlotChange"},decls:2,vars:1,consts:[[3,"svgUrl","slotTintFn","enableMouseEvents","slots","selectedSlot"],[3,"model","slots","slotTintFn","enableMouseEvents","selectedSlot"],[3,"selectedSlotChange","svgUrl","slotTintFn","enableMouseEvents","slots","selectedSlot"],[3,"selectedSlotChange","model","slots","slotTintFn","enableMouseEvents","selectedSlot"]],template:function(o,r){o&1&&S(0,Kr,1,5,"ix-enclosure-svg",0)(1,Yr,1,5,"ix-not-supported-model",1),o&2&&x(r.svgUrl()?0:1)},dependencies:[Jt,no],styles:["[_nghost-%COMP%]{display:block}\n/*# sourceMappingURL=enclosure-side.component-YXHAF556.css.map */"],changeDetection:0});let e=t;return e})();var Gt=e=>e.pool_info?yi(e.pool_info.disk_status):null;function yi(e){switch(e){case Z.Online:return"var(--green)";case Z.Degraded:return"var(--orange)";case Z.Faulted:return"var(--red)";case Z.Unknown:return"var(--yellow)";default:return"var(--grey)"}}var Qr=(e,t)=>
1t.id,Zr=e=>["select-enclosure",e],es=e=>["/system","viewenclosure",e];function ts(e,t){if(e&1&&(a(0,"a",1),g(1,"ix-enclosure-side",2),a(2,"div",3),p(3),l()()),e&2){let i=t.$implicit,n=t.$index,o=h();U("active",i.id===o.selectedEnclosure()),f("ixTest",R(9,Zr,i.model))("routerLink",R(11,es,i.id)),s(),f("enclosure",i)("enableMouseEvents",!1)("slotTintFn",o.diskStatusTint),s(2),Ni(" ",i.label||i.model," (",n+1,") ")}}var oo=(()=>{let t=class t{constructor(n){this.store=n,this.enclosures=this.store.enclosures,this.selectedEnclosure=b(()=>this.store.selectedEnclosure().id),this.diskStatusTint=Gt}};t.\u0275fac=function(o){return new(o||t)(_(D))},t.\u0275cmp=y({type:t,selectors:[["ix-enclosure-selector"]],decls:2,vars:0,consts:[[1,"enclosure",3,"active","ixTest","routerLink"],[1,"enclosure",3,"ixTest","routerLink"],[1,"enclosure-image",3,"enclosure","enableMouseEvents","slotTintFn"],[1,"enclosure-label"]],template:function(o,r){o&1&&$(0,ts,4,13,"a",0,Qr),o&2&&J(r.enclosures())},dependencies:[B,st,Oe],styles:["[_nghost-%COMP%]{color:var(--fg2);display:block;height:100%;overflow:auto;position:relative;width:240px}@media (max-width: 1280px){[_nghost-%COMP%]{display:flex;flex-wrap:nowrap;gap:5px;overflow:auto;width:100%}[_nghost-%COMP%] ix-enclosure-side[_ngcontent-%COMP%]{max-width:200px;width:40vw}}.enclosure[_ngcontent-%COMP%]{align-items:flex-end;background-color:var(--bg2);border:1px solid var(--lines);border-bottom-width:0;border-left:solid 4px transparent;cursor:pointer;display:grid;padding:12px 0 16px;text-align:center}.enclosure[_ngcontent-%COMP%]:hover{background-color:var(--alt-bg1)}.enclosure[_ngcontent-%COMP%]:last-child{border-bottom-width:1px}.enclosure.active[_ngcontent-%COMP%]{border-left:solid 4px var(--primary)}.enclosure[_ngcontent-%COMP%] .enclosure-image[_ngcontent-%COMP%]{margin:10px 16px;max-height:85px}\n/*# sourceMappingURL=enclosure-selector.component-ZA7FVDAF.css.map */"],changeDetection:0});let e=t;return e})();var is=()=>["front","side"],ns=()=>["top","side"],os=()=>["rear","side"],rs=()=>["internal","side"];function ss(e,t){if(e&1){let i=N();a(0,"button",1),T("click",function(){j(i);let o=h(2);return A(o.onSideChange(o.EnclosureSide.Front))}),p(1),d(2,"translate"),l()}e&2&&(f("ixTest",le(4,is)),s(),v(m(2,2,"Front")))}function as(e,t){if(e&1){let i=N();a(0,"button",1),T("click",function(){j(i);let o=h(2);return A(o.onSideChange(o.EnclosureSide.Top))}),p(1),d(2,"translate"),l()}e&2&&(f("ixTest",le(4,ns)),s(),v(m(2,2,"Top")))}function ls(e,t){if(e&1){let i=N();a(0,"button",1),T("click",function(){j(i);let o=h(2);return A(o.onSideChange(o.EnclosureSide.Rear))}),p(1),d(2,"translate"),l()}e&2&&(f("ixTest",le(4,os)),s(),v(m(2,2,"Rear")))}function cs(e,t){if(e&1){let i=N();a(0,"button",1),T("click",function(){j(i);let o=h(2);return A(o.onSideChange(o.EnclosureSide.Internal))}),p(1),d(2,"translate"),l()}e&2&&(f("ixTest",le(4,rs)),s(),v(m(2,2,"Internal")))}function ps(e,t){if(e&1&&S(0,ss,3,5,"button",0)(1,as,3,5,"button",0)(2,ls,3,5,"button",0)(3,cs,3,5,"button",0),e&2){let i=h();x(i.enclosure().front_loaded?0:-1),s(),x(i.enclosure().top_loaded?1:-1),s(),x(i.enclosure().rear_slots?2:-1),s(),x(i.enclosure().internal_slots?3:-1)}}var Wt=(()=>{let t=class t{constructor(n){this.store=n,this.enclosure=O.required(),this.hasMoreThanOneSide=this.store.hasMoreThanOneSide,this.EnclosureSide=P}onSideChange(n){this.store.selectSide(n)}};t.\u0275fac=function(o){return new(o||t)(_(D))},t.\u0275cmp=y({type:t,selectors:[["ix-enclosure-side-switch"]],inputs:{enclosure:[1,"enclosure"]},decls:1,vars:1,consts:[["mat-button","",3,"ixTest"],["mat-button","",3,"click","ixTest"]],template:function(o,r){o&1&&S(0,ps,4,4),o&2&&x(r.hasMoreThanOneSide()?0:-1)},dependencies:[G,B,w,M],styles:["[_nghost-%COMP%]{display:flex;flex-direction:row;gap:5px;justify-content:center;margin-bottom:12px;width:100%}\n/*# sourceMappingURL=enclosure-side-switch.component-LXV5WPSH.css.map */"],changeDetection:0});let e=t;return e})();var Xt="var(--grey)";var ds=(e,t)=>t[0];function ms(e,t){if(e&1&&(a(0,"div",0),g(1,"div",1),a(2,"span",2),p(3),l()()),e&2){let i=t.$implicit;s(),xe("background",i[1]),s(2),v(i[0])}}var Kt=(()=>{let t=class t{constructor(n){this.translate=n,this.enclosure=O.required(),this.side=O.required(),this.poolColors=O.required(),this.slots=b(()=>oe(this.enclosure(),this.side())),this.legend=b(()=>{let o=this.poolColors(),c=this.slots().map(I=>{var L;return((L=I.pool_info)==null?void 0:L.pool_name)||null});return Se(c).map(I=>I===null?[this.translate.instant("Unassigned"),Xt]:[I,o[I]])})}};t.\u0275fac=function(o){return new(o||t)(_(q))},t.\u0275cmp=y({type:t,selectors:[["ix-pools-legend"]],inputs:{enclosure:[1,"enclosure"],side:[1,"side"],poolColors:[1,"poolColors"]},decls:2,vars:0,consts:[[1,"line"],[1,"disk-circle"],[1,"label"]],template:function(o,r){o&1&&$(0,ms,4,3,"div",0,ds),o&2&&J(r.legend())},styles:[".line[_ngcontent-%COMP%]{align-items:center;display:flex;margin-bottom:2px;min-width:55px}.line[_ngcontent-%COMP%]:last-of-type{margin-bottom:0}
1.line[_ngcontent-%COMP%] .disk-circle[_ngcontent-%COMP%]{border-radius:50%;display:inline-block;height:10px;margin-right:5px;width:10px}.line[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:inline-block}\n/*# sourceMappingURL=pools-legend.component-BOSZKSPP.css.map */"],changeDetection:0});let e=t;return e})();function Yt(e){return t=>{var i;return t.dev?t.pool_info?e[(i=t.pool_info)==null?void 0:i.pool_name]:Xt:null}}function us(e,t){if(e&1&&(a(0,"h1"),p(1),l()),e&2){let i=h();s(),v(i.selectedSlot().dev)}}function fs(e,t){if(e&1&&(a(0,"div")(1,"span",0),p(2),d(3,"translate"),l(),a(4,"span",1),p(5),l()()),e&2){let i=h();s(2),C("",m(3,2,"Topology"),":"),s(3),v(i.selectedSlot().pool_info.vdev_name)}}function hs(e,t){if(e&1&&(a(0,"div")(1,"span",0),p(2),d(3,"translate"),l(),a(4,"span",1),p(5),d(6,"mapValue"),d(7,"translate"),l()()),e&2){let i=h();s(2),C("",m(3,2,"Category"),":"),s(3),C(" ",m(7,7,V(6,4,i.selectedSlot().pool_info.vdev_type,i.vdevTypeLabels))," ")}}var ro=(()=>{let t=class t{constructor(){this.selectedSlot=O.required(),this.vdevTypeLabels=Mn}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=y({type:t,selectors:[["ix-disk-topology-description"]],inputs:{selectedSlot:[1,"selectedSlot"]},decls:9,vars:7,consts:[[1,"title"],[1,"value"]],template:function(o,r){o&1&&(S(0,us,2,1,"h1")(1,fs,6,4,"div")(2,hs,8,9,"div"),a(3,"div")(4,"span",0),p(5),d(6,"translate"),l(),a(7,"span",1),p(8),l()()),o&2&&(x(r.selectedSlot().dev?0:-1),s(),x(r.selectedSlot().pool_info?1:-1),s(),x(r.selectedSlot().pool_info?2:-1),s(3),C("",m(6,5,"Slot"),":"),s(3),v(r.selectedSlot().drive_bay_number))},dependencies:[w,M,Me],styles:["[_nghost-%COMP%]{text-align:center}h1[_ngcontent-%COMP%]{font-weight:600;margin-bottom:5px}span[_ngcontent-%COMP%]{font-size:1rem}.title[_ngcontent-%COMP%]{font-weight:500}.value[_ngcontent-%COMP%]{font-weight:400;margin-left:5px}\n/*# sourceMappingURL=disk-topology-description.component-OJKNOU3Y.css.map */"],changeDetection:0});let e=t;return e})();var gs=(e,t)=>t.dev,_s=e=>["select-disk",e];function vs(e,t){e&1&&(a(0,"div"),p(1),d(2,"translate"),l()),e&2&&(s(),v(m(2,1,"Empty drive cage")))}function xs(e,t){e&1&&(a(0,"div"),p(1),d(2,"translate"),l()),e&2&&(s(),v(m(2,1,"No vdev info for this disk")))}function Cs(e,t){if(e&1){let i=N();a(0,"a",1),T("click",function(){let o=j(i).$implicit,r=h(2);return A(r.diskClick.emit(o))}),g(1,"div",2),a(2,"span",3),p(3),l()()}if(e&2){let i=t.$implicit,n=h(2);f("ixTest",R(6,_s,i.dev)),s(),xe("background",n.isSelectedSlot(i)?void 0:n.poolColor()),U("selected",n.isSelectedSlot(i)),s(2),v(i.dev)}}function Ss(e,t){if(e&1&&$(0,Cs,4,8,"a",0,gs),e&2){let i=h();J(i.selectedSlot().pool_info.vdev_disks)}}var so=(()=>{let t=class t{constructor(){this.selectedSlot=O.required(),this.poolColor=O.required(),this.diskClick=Di()}isSelectedSlot(n){return this.selectedSlot().dev===n.dev}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=y({type:t,selectors:[["ix-vdev-disks-legend"]],inputs:{selectedSlot:[1,"selectedSlot"],poolColor:[1,"poolColor"]},outputs:{diskClick:"diskClick"},decls:3,vars:3,consts:[[1,"disk-name",3,"ixTest"],[1,"disk-name",3,"click","ixTest"],[1,"disk-circle"],[1,"devname"]],template:function(o,r){if(o&1&&S(0,vs,3,3,"div")(1,xs,3,3,"div")(2,Ss,2,0),o&2){let c;x(r.selectedSlot().dev?-1:0),s(),x(r.selectedSlot().dev&&!r.selectedSlot().pool_info?1:-1),s(),x(!((c=r.selectedSlot().pool_info)==null||c.vdev_disks==null)&&c.vdev_disks.length?2:-1)}},dependencies:[B,w,M],styles:[".disk-name[_ngcontent-%COMP%]{align-items:center;cursor:pointer;display:flex;margin-bottom:5px;min-width:55px}.disk-name[_ngcontent-%COMP%]:last-of-type{margin-bottom:0}.disk-name[_ngcontent-%COMP%] .disk-circle[_ngcontent-%COMP%]{border-radius:50%;display:inline-block;height:10px;margin-right:5px;width:10px}.disk-name[_ngcontent-%COMP%] .disk-circle.selected[_ngcontent-%COMP%]{background:var(--fg2)}.disk-name[_ngcontent-%COMP%] .devname[_ngcontent-%COMP%]{border-bottom:1px solid var(--alt-fg1);display:inline-block;line-height:18px}\n/*# sourceMappingURL=vdev-disks-legend.component-A7KKAV3J.css.map */"],changeDetection:0});let e=t;return e})();function ys(e,t){if(e&1&&g(0,"ix-disk-topology-description",1),e&2){let i=h();f("selectedSlot",i.selectedSlot())}}function bs(e,t){e&1&&(a(0,"h2"),p(1),d(2,"translate"),l()),e&2&&(s(),v(m(2,1,"Pools")))}function Ms(e,t){if(e&1&&g(0,"ix-enclosure-side-switch",5),e&2){let i=h();f("enclosure",i.enclosure())}}function ws(e,t){if(e&1){let i=N();a(0,"ix-vdev-disks-legend",9),T("diskClick",function(o){j(i);let r=h();return A(r.onVdevDiskClicked(o))}),l()}if(e&2){let i=h();f("selectedSlot",i.selectedSlot())("poolColor",i.poolColor())}}function Ps(e,t){if(e&1&&g(0,"ix-pools-legend",8),e&2){let i=h();f("enclosure",i.enclosure())("side",i.selectedSide())("poolColors",i.poolColors())}}var ao=(()=>{let t=class t{constructor(n){this.store=n,this.enclosure=this.store.selectedEnclosure,this.selectedSlot=this.store.selectedSlot,this.selectedSide=this.store.selectedSide,this.poolColors=this.store.poolColors,this.hasMoreThanOneSide=this.store.hasMoreThanOneSide,this.slotTintFn=b(()=>Yt(this.poolColors())),this.poolColor=b(()=>{var c,u;let o=(u=(c=this.selectedSlot())==null?void 0:c.pool_info)==null?void 0:u.pool_name;return o?this.poolColors()[o]:null})}onSlotSelected(n){this.store.selectSlot((n==null?void 0:n.drive_bay_number)||null)}onVdevDiskClicked(n){this.store.selectSlotByVdevDisk(n)}};t.\u0275fac=function(o){return new(o||t)(_(D))},t.\u0275cmp=y({type:t,selectors:[["ix-pools-view"]],decls:10,vars:9,consts:[[1,"left-column"],[3,"selectedSlot"],[1,"enclosure-container"],[1,"image-container"],[1,"enclosure-image",3,"selectedSlotChange","enclosure","side","slotTintFn","selectedSlot"],[1,"side-switch",3,"enclosure"],[1,"right-column"],[3,"selectedSlot","poolColor"],[3,"enclosure","side","poolColors"],[3,"diskClick","selectedSlot","poolColor"]],template:function(o,r){o&1&&(a(0,"div",0),S(1,ys,1,1,"ix-disk-topology-description",1)(2,bs,3,3,"h2"),l(),a(3,"div",2)(4,"div",3)(5,"ix-enclosure-side",4),T("selectedSlotChange",function(u){return r.onSlotSelected(u)}),l()(),S(6,Ms,1,1,"ix-enclosure-side-switch",5),l(),a(7,"div",6),S(8,ws,1,2,"ix-vdev-disks-legend",7)(9,Ps,1,3,"ix-pools-legend",8),l()),o&2&&(s(),x(r.selectedSlot()?1:2),s(4),U("has-side-switch",r.hasMoreThanOneSide()),f("enclosure",r.enclosure())("side",r.selectedSide())("slotTintFn",r.slotTintFn())("selectedSlot",r.selectedSlot()),s(),x(r.hasMoreThanOneSide()?6:-1),s(2),x(r.selectedSlot()?8:9))},dependencies:[ro,Oe,Wt,so,Kt,w,M],styles:["[_nghost-%COMP%]{box-sizing:border-box;column-gap:5px;
1display:flex;overflow:hidden;padding:0 5px;position:relative;width:100%}@media (max-width: 1280px){[_nghost-%COMP%]{display:grid;max-width:100vw;width:100%}}.left-column[_ngcontent-%COMP%], .right-column[_ngcontent-%COMP%]{align-items:center;display:flex;flex:1 1 25%;flex-direction:column;justify-content:center;max-width:200px;min-height:100%;min-width:105px;overflow:auto;position:relative}.left-column[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .right-column[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{max-height:100%;position:absolute}@media (max-width: 1280px){.left-column[_ngcontent-%COMP%], .right-column[_ngcontent-%COMP%]{max-width:100%}}@media (max-width: 1280px){.left-column[_ngcontent-%COMP%]{margin-top:10px}.left-column[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{position:unset}}@media (max-width: 1280px){.right-column[_ngcontent-%COMP%]{margin-bottom:10px;min-height:100px}}.enclosure-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-grow:1;row-gap:12px}@media (max-width: 1280px){.enclosure-container[_ngcontent-%COMP%]{margin-bottom:0;margin-top:10px}}.enclosure-container[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%]{align-items:center;display:flex;flex:1;overflow:hidden}@media (max-width: 1280px){.enclosure-container[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%]{margin-top:0}}.enclosure-container[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .enclosure-image[_ngcontent-%COMP%]{flex:1}@media (max-width: 1280px){.enclosure-container[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .enclosure-image[_ngcontent-%COMP%]{padding:10px}}.enclosure-container[_ngcontent-%COMP%] .side-switch[_ngcontent-%COMP%]{flex-shrink:0}\n/*# sourceMappingURL=_enclosure-view-2KQ6HBSA.css.map */"],changeDetection:0});let e=t;return e})();function Es(e,t){if(e&1&&(a(0,"div",3),p(1),l()),e&2){let i=h().$implicit;s(),v(i.descriptor)}}function Os(e,t){e&1&&(a(0,"div",3),p(1),d(2,"translate"),l()),e&2&&(s(),v(m(2,1,"No descriptor provided")))}function Ts(e,t){if(e&1&&(a(0,"div",0)(1,"div",1),p(2),l(),a(3,"div",2),p(4),d(5,"translate"),l(),S(6,Es,2,1,"div",3)(7,Os,3,3,"div",3),l()),e&2){let i=t.$implicit;s(2),v(i.status),s(2),v(m(5,3,"Expander Status")),s(2),x(i.descriptor?6:7)}}var lo=(()=>{let t=class t{constructor(){this.enclosure=O.required(),this.expanders=b(()=>{let n=this.enclosure().elements[X.SasExpander];return Object.values(n)})}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=y({type:t,selectors:[["ix-sas-expander-status-view"]],inputs:{enclosure:[1,"enclosure"]},decls:2,vars:0,consts:[[1,"expander"],[1,"status-value"],[1,"title"],[1,"descriptor"]],template:function(o,r){o&1&&$(0,Ts,8,5,"div",0,Bi),o&2&&J(r.expanders())},dependencies:[w,M],styles:["[_nghost-%COMP%]{align-items:center;display:flex;gap:10px;justify-content:space-evenly;margin:0 20px}.expander[_ngcontent-%COMP%]{padding:15px 0 30px;text-align:center}.content[_ngcontent-%COMP%]{padding:3px;text-align:center;width:100%}.status-value[_ngcontent-%COMP%]{font-size:4.25rem;font-weight:100}.title[_ngcontent-%COMP%]{font-size:1rem}.descriptor[_ngcontent-%COMP%]{font-size:.75rem;opacity:.85}\n/*# sourceMappingURL=sas-expander-status-view.component-5P7DV3WB.css.map */"],changeDetection:0});let e=t;return e})();var Ds=(e,t)=>t[0];function ks(e,t){if(e&1&&(a(0,"div",0),g(1,"div",1),a(2,"span",2),p(3),l()()),e&2){let i=t.$implicit;s(),xe("background",i[1]),s(2),v(i[0])}}var co=(()=>{let t=class t{constructor(n){this.translate=n,this.slots=O.required(),this.legend=b(()=>{let r=this.slots().filter(u=>!!u.pool_info);return Se(r.map(u=>u.pool_info.disk_status)).map(u=>{let I=Pe.get(u)||u;return[this.translate.instant(I),yi(u)]})})}};t.\u0275fac=function(o){return new(o||t)(_(q))},t.\u0275cmp=y({type:t,selectors:[["ix-statuses-legend"]],inputs:{slots:[1,"slots"]},decls:2,vars:0,consts:[[1,"line"],[1,"disk-circle"],[1,"label"]],template:function(o,r){o&1&&$(0,ks,4,3,"div",0,Ds),o&2&&J(r.legend())},styles:[".line[_ngcontent-%COMP%]{align-items:center;display:flex;margin-bottom:2px;min-width:55px}.line[_ngcontent-%COMP%]:last-of-type{margin-bottom:0}
1.line[_ngcontent-%COMP%] .disk-circle[_ngcontent-%COMP%]{border-radius:50%;display:inline-block;height:10px;margin-right:5px;width:10px}.line[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:inline-block}\n/*# sourceMappingURL=statuses-legend.component-ZMJLUGGL.css.map */"],changeDetection:0});let e=t;return e})();function Is(e,t){if(e&1&&g(0,"ix-enclosure-side-switch",4),e&2){let i=h();f("enclosure",i.enclosure())}}var po=(()=>{let t=class t{constructor(n){this.store=n,this.enclosure=this.store.selectedEnclosure,this.selectedSlot=this.store.selectedSlot,this.selectedEnclosureSlots=this.store.selectedEnclosureSlots,this.selectedSide=this.store.selectedSide,this.hasMoreThanOneSide=this.store.hasMoreThanOneSide,this.diskStatusTint=Gt}onSlotSelected(n){this.store.selectSlot(n.drive_bay_number)}};t.\u0275fac=function(o){return new(o||t)(_(D))},t.\u0275cmp=y({type:t,selectors:[["ix-status-view"]],decls:10,vars:11,consts:[[1,"left-column"],[1,"enclosure-container"],[1,"image-container"],[1,"enclosure-image",3,"selectedSlotChange","enclosure","side","slotTintFn","selectedSlot"],[1,"side-switch",3,"enclosure"],[1,"right-column"],[3,"slots"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"h2"),p(2),d(3,"translate"),l()(),a(4,"div",1)(5,"div",2)(6,"ix-enclosure-side",3),T("selectedSlotChange",function(u){return r.onSlotSelected(u)}),l()(),S(7,Is,1,1,"ix-enclosure-side-switch",4),l(),a(8,"div",5),g(9,"ix-statuses-legend",6),l()),o&2&&(s(2),v(m(3,9,"Status")),s(4),U("has-side-switch",r.hasMoreThanOneSide()),f("enclosure",r.enclosure())("side",r.selectedSide())("slotTintFn",r.diskStatusTint)("selectedSlot",r.selectedSlot()),s(),x(r.hasMoreThanOneSide()?7:-1),s(2),f("slots",r.selectedEnclosureSlots()))},dependencies:[Oe,Wt,co,w,M],styles:["[_nghost-%COMP%]{box-sizing:border-box;column-gap:5px;display:flex;overflow:hidden;padding:0 5px;position:relative;width:100%}@media (max-width: 1280px){[_nghost-%COMP%]{display:grid;max-width:100vw;width:100%}}.left-column[_ngcontent-%COMP%], .right-column[_ngcontent-%COMP%]{align-items:center;display:flex;flex:1 1 25%;flex-direction:column;justify-content:center;max-width:200px;min-height:100%;min-width:105px;overflow:auto;position:relative}.left-column[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .right-column[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{max-height:100%;position:absolute}@media (max-width: 1280px){.left-column[_ngcontent-%COMP%], .right-column[_ngcontent-%COMP%]{max-width:100%}}@media (max-width: 1280px){.left-column[_ngcontent-%COMP%]{margin-top:10px}.left-column[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{position:unset}}@media (max-width: 1280px){.right-column[_ngcontent-%COMP%]{margin-bottom:10px;min-height:100px}}.enclosure-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-grow:1;row-gap:12px}@media (max-width: 1280px){.enclosure-container[_ngcontent-%COMP%]{margin-bottom:0;margin-top:10px}}.enclosure-container[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%]{align-items:center;display:flex;flex:1;overflow:hidden}@media (max-width: 1280px){.enclosure-container[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%]{margin-top:0}}.enclosure-container[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .enclosure-image[_ngcontent-%COMP%]{flex:1}@media (max-width: 1280px){.enclosure-container[_ngcontent-%COMP%] .image-container[_ngcontent-%COMP%] .enclosure-image[_ngcontent-%COMP%]{padding:10px}}.enclosure-container[_ngcontent-%COMP%] .side-switch[_ngcontent-%COMP%]{flex-shrink:0}\n/*# sourceMappingURL=_enclosure-view-2KQ6HBSA.css.map */"],changeDetection:0});let e=t;return e})();var Fs=function(e,t,i,n){var o=arguments.length,r=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,i,n);else for(var u=e.length-1;u>=0;u--)(c=e[u])&&(r=(o<3?c(r):o>3?c(t,i,r):c(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};function Ls(e,t){e&1&&g(0,"ix-fake-progress-bar",2),e&2&&f("loading",t)}function Rs(e,t){e&1&&g(0,"ix-pools-view")}function Bs(e,t){e&1&&g(0,"ix-status-view")}function Vs(e,t){if(e&1&&g(0,"ix-sas-expander-status-view",4),e&2){let i=h();f("enclosure",i.enclosure())}}
1function js(e,t){if(e&1&&g(0,"ix-disk-details-overview",5),e&2){let i=h();f("selectedSlot",i.selectedSlot())}}function As(e,t){e&1&&g(0,"ix-disks-overview")}function Ns(e,t){e&1&&(a(0,"div",6),g(1,"ix-enclosure-selector"),l())}var ge,Qt=(ge=class{constructor(t,i,n){this.store=t,this.translate=i,this.router=n,this.enclosure=this.store.selectedEnclosure,this.enclosures=this.store.enclosures,this.selectedView=this.store.selectedView,this.selectedSlot=this.store.selectedSlot,this.isLoading=this.store.isLoading,this.EnclosureView=Ee,this.title=b(()=>this.translate.instant("Disks on {enclosure}",{enclosure:this.store.enclosureLabel()})),this.redirectOnMinis=Ce(()=>{let o=this.store.selectedEnclosure();o&&Ht(o)&&this.router.navigate(["/system","viewenclosure",o.id,"mini"])})}},ge.\u0275fac=function(i){return new(i||ge)(_(D),_(q),_(Ve))},ge.\u0275cmp=y({type:ge,selectors:[["ix-enclosure-page"]],decls:13,vars:5,consts:[[1,"view-container"],[3,"title"],[3,"loading"],[1,"container"],[3,"enclosure"],[3,"selectedSlot"],[1,"selector-container"]],template:function(i,n){if(i&1&&(a(0,"div",0)(1,"mat-card")(2,"mat-card-header"),g(3,"ix-enclosure-header",1),l(),a(4,"mat-card-content"),S(5,Ls,1,1,"ix-fake-progress-bar",2),a(6,"div",3),S(7,Rs,1,0,"ix-pools-view")(8,Bs,1,0,"ix-status-view")(9,Vs,1,1,"ix-sas-expander-status-view",4),l(),S(10,js,1,1,"ix-disk-details-overview",5)(11,As,1,0,"ix-disks-overview"),l()()(),S(12,Ns,2,0,"div",6)),i&2){let o,r;s(3),f("title",n.title()),s(2),x((o=n.isLoading())?5:-1,o),s(2),x((r=n.selectedView())===n.EnclosureView.Pools?7:r===n.EnclosureView.DiskStatus?8:r===n.EnclosureView.Expanders?9:-1),s(3),x(n.selectedSlot()?10:11),s(2),x(n.enclosures().length>1?12:-1)}},dependencies:[Ae,Ne,Ge,be,yt,ao,po,lo,$t,to,oo],styles:["mat-card-content[_ngcontent-%COMP%]{position:relative}ix-fake-progress-bar[_ngcontent-%COMP%]{height:2px;position:absolute;top:0}[_nghost-%COMP%]{display:flex;gap:5px;height:calc(100% - 150px)}@media (max-width: 1280px){[_nghost-%COMP%]{flex-direction:column-reverse;flex-wrap:wrap}[_nghost-%COMP%] .selector-container{display:grid;overflow:auto}}[_nghost-%COMP%] .mat-mdc-card[_ngcontent-%COMP%]{height:100%;margin:0}[_nghost-%COMP%] .mat-mdc-card-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:auto}[_nghost-%COMP%] .container[_ngcontent-%COMP%]{align-items:stretch;background-color:var(--contrast-darkest);display:flex;height:100%;justify-content:center;min-height:330px;padding:0}@media (max-width: 1280px){[_nghost-%COMP%] .container[_ngcontent-%COMP%]{height:auto;min-height:auto}}[_nghost-%COMP%] .container[_ngcontent-%COMP%] .enclosure-image{max-height:350px}[_nghost-%COMP%] .container[_ngcontent-%COMP%] .enclosure-image.has-side-switch{max-height:300px}.view-container[_ngcontent-%COMP%]{flex-grow:1;height:100%}@media (max-width: 1280px){.view-container[_ngcontent-%COMP%]{height:0}}\n/*# sourceMappingURL=enclosure-page.component-GSSOZFJQ.css.map */"],changeDetection:0}),ge);Qt=Fs([z()],Qt);var mo=(()=>{let t=class t{constructor(){this.slots=O.required(),this.totalPools=b(()=>{let r=this.slots().map(c=>{var u;return(u=c.pool_info)==null?void 0:u.pool_name}).filter(c=>c!==void 0);return Se(r).length}),this.totalDisks=b(()=>this.slots().filter(n=>n.dev).length),this.failedDisks=b(()=>this.slots().filter(n=>{var o;return((o=n.pool_info)==null?void 0:o.disk_status)===Z.Faulted}).length)}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=y({type:t,selectors:[["ix-mini-disks-overview"]],inputs:{slots:[1,"slots"]},decls:22,vars:15,consts:[[1,"overview"],[1,"item"],[1,"label"],[1,"value"]],template:function(o,r){o&1&&(a(0,"h3"),p(1),d(2,"translate"),l(),a(3,"ul",0)(4,"li",1)(5,"div",2),p(6),d(7,"translate"),l(),a(8,"div",3),p(9),l()(),a(10,"li",1)(11,"div",2),p(12),d(13,"translate"),l(),a(14,"div",3),p(15),l()(),a(16,"li",1)(17,"div",2),p(18),d(19,"translate"),l(),a(20,"div",3),p(21),l()()()),o&2&&(s(),v(m(2,7,"Disks Overview")),s(5),v(m(7,9,"Pools:")),s(3),v(r.totalPools()),s(3),v(m(13,11,"Total Disks:")),s(3),v(r.totalDisks()),s(3),v(m(19,13,"Failed Disks:")),s(3),v(r.failedDisks()))},dependencies:[w,M],styles:["[_nghost-%COMP%]{display:block;margin-bottom:30px}h3[_ngcontent-%COMP%]{border-bottom:1px solid var(--lines);font-weight:500;margin-bottom:12px;padding-bottom:7px}.overview[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:5px}.overview[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{margin-bottom:0}.overview[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:inline;font-weight:700;margin-right:5px}.overview[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{display:inline;font-weight:400}\n/*# sourceMappingURL=mini-disks-overview.component-PTFP4P7A.css.map */"],changeDetection:0});let e=t;return e})();var Us=e=>({disk:e}),qs=e=>({rate:e});function zs(e,t){if(e&1&&(p(0),d(1,"translate")),e&2){let i=h();C(" ",V(1,1,"Drive Details {disk}",R(4,Us,i.slot().dev))," ")}}function Hs(e,t){e&1&&(p(0),d(1,"translate")),e&2&&C(" ",m(1,1,"Drive Details")," ")}function $s(e,t){if(e&1&&(a(0,"li",3)(1,"div",4),p(2),d(3,"translate"),l(),a(4,"div",5),p(5),d(6,"mapValue"),d(7,"translate"),l()()),e&2){let i=h();s(2),C("",m(3,2,"Status"),":"),s(3),C(" ",m(7,7,V(6,4,i.slot().pool_info.disk_status,i.enclosureDiskStatusLabels))," ")}}function Js(e,t){if(e&1&&(a(0,"li",3)(1,"div",4),p(2),d(3,"translate"),l(),a(4,"div",5),p(5),l()()),e&2){let i=h();s(2),C("",m(3,2,"Model"),":"),s(3),v(i.slot().model)}}function Gs(e,t){if(e&1&&(a(0,"li",3)(1,"div",4),p(2),d(3,"translate"),l(),a(4,"div",5),p(5),l()()),e&2){let i=h();s(2),C("",m(3,2,"Serial"),":"),s(3),v(i.slot().serial)}}function Ws(e,t){if(e&1&&(a(0,"li",3)(1,"div",4),p(2),d(3,"translate"),l(),a(4,"div",5),p(5),d(6,"translate"),l()()),e&2){let i=h();s(2),C("",m(3,2,"Rotation Rate"),":"),s(3),C(" ",V(6,4,"{rate} RPM",R(7,qs,i.slot().rotationrate))," ")}}function Xs(e,t){e&1&&(a(0,"h3"),p(1),d(2,"translate"),l(),g(3,"ix-identify-light")),e&2&&(s(),v(m(2,1,"Identify Light")))}var uo=(()=>{let t=class t{constructor(n){this.store=n,this.slot=O.required(),this.enclosureDiskStatusLabels=Pe}onClosePressed(){this.store.selectSlot(null)}};t.\u0275fac=function(o){return new(o||t)(_(D))},t.\u0275cmp=y({type:t,selectors:[["ix-mini-drive-details"]],inputs:{slot:[1,"slot"]},decls:25,vars:18,consts:[["mat-icon-button","","ixTest","close-details",1,"close",3,"click"],["name","mdi-close"],[1,"overview"],[1,"item"],[1,"label"],[1,"value"]],template:function(o,r){if(o&1&&(a(0,"h3"),S(1,zs,2,6)(2,Hs,2,3),a(3,"a",0),T("click",function(){return r.onClosePressed()}),g(4,"ix-icon",1),l()(),a(5,"ul",2)(6,"li",3)(7,"div",4),p(8),d(9,"translate"),l(),a(10,"div",5),p(11),d(12,"translate"),l()(),a(13,"li",3)(14,"div",4),p(15),d(16,"translate"),l(),a(17,"div",5),p(18),d(19,"translate"),l()(),S(20,$s,8,9,"li",3)(21,Js,6,4,"li",3)(22,Gs,6,4,"li",3)(23,Ws,7,9,"li",3),l(),S(24,Xs,4,3)),o&2){let c,u;s(),x(r.slot().dev?1:2),s(7),C("",m(9,10,"Pool"),":"),s(3),C(" ",((c=r.slot().pool_info)==null?null:c.pool_name)||m(12,12,"Disk not attached to any pools.")," "),s(4),C("",m(16,14,"Vdev"),":"),s(3),C(" ",((u=r.slot(
1).pool_info)==null?null:u.vdev_name)||m(19,16,"Unassigned")," "),s(2),x(r.slot().pool_info?20:-1),s(),x(r.slot().model?21:-1),s(),x(r.slot().serial?22:-1),s(),x(r.slot().rotationrate?23:-1),s(),x(r.slot().supports_identify_light?24:-1)}},dependencies:[$i,B,te,We,w,M,Me],styles:["[_nghost-%COMP%]{display:block;margin-bottom:26px}h3[_ngcontent-%COMP%]{border-bottom:1px solid var(--lines);font-weight:500;margin-bottom:12px;padding-bottom:7px;display:flex;justify-content:space-between}.overview[_ngcontent-%COMP%]{margin-bottom:26px}.overview[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:5px}.overview[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{margin-bottom:0}.overview[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:inline;font-weight:700;margin-right:5px}.overview[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{display:inline;font-weight:400}\n/*# sourceMappingURL=mini-drive-details.component-TUNC67PY.css.map */"],changeDetection:0});let e=t;return e})();function Ks(e,t){if(e&1&&(a(0,"div",1),g(1,"ix-disk-icon",4),l()),e&2){let i=h();s(),f("name",i.slot().dev)("type",i.slot().type)("size",i.slot().size)}}function Ys(e,t){e&1&&(a(0,"div",3),p(1),d(2,"translate"),l()),e&2&&(s(),C(" ",m(2,1,"Must be part of the pool to check errors.")," "))}function Qs(e,t){if(e&1&&(a(0,"ul")(1,"li",5)(2,"div",6),p(3),d(4,"translate"),l(),a(5,"div",7),p(6),d(7,"number"),l()(),a(8,"li",5)(9,"div",6),p(10),d(11,"translate"),l(),a(12,"div",7),p(13),d(14,"number"),l()(),a(15,"li",5)(16,"div",6),p(17),d(18,"translate"),l(),a(19,"div",7),p(20),d(21,"number"),l()()()),e&2){let i=h();s(3),C("",m(4,6,"Read Errors"),":"),s(3),v(m(7,8,i.slot().pool_info.disk_read_errors)),s(4),C("",m(11,10,"Write Errors"),":"),s(3),v(m(14,12,i.slot().pool_info.disk_write_errors)),s(4),C("",m(18,14,"Checksum Errors"),":"),s(3),v(m(21,16,i.slot().pool_info.disk_checksum_errors))}}var fo=(()=>{let t=class t{constructor(){this.slot=O.required()}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=y({type:t,selectors:[["ix-mini-drive-stats"]],inputs:{slot:[1,"slot"]},decls:8,vars:5,consts:[[1,"columns"],[1,"disk-icon"],[1,"stats"],[1,"no-pool"],[3,"name","type","size"],[1,"item"],[1,"label"],[1,"value"]],template:function(o,r){o&1&&(a(0,"h3"),p(1),d(2,"translate"),l(),a(3,"div",0),S(4,Ks,2,3,"div",1),a(5,"div",2),S(6,Ys,3,3,"div",3)(7,Qs,22,18,"ul"),l()()),o&2&&(s(),v(m(2,3,"Stats")),s(3),x(r.slot().dev?4:-1),s(2),x(r.slot().pool_info?7:6))},dependencies:[Dt,w,M,ot],styles:["h3[_ngcontent-%COMP%]{border-bottom:1px solid var(--lines);font-weight:500;margin-bottom:12px;padding-bottom:7px}ul[_ngcontent-%COMP%]{padding-left:28px}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:5px}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{margin-bottom:0}ul[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:inline;font-weight:700;margin-right:5px}ul[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{display:inline;font-weight:400}.columns[_ngcontent-%COMP%]{align-items:center;display:flex;gap:14px}.columns[_ngcontent-%COMP%] .disk-icon[_ngcontent-%COMP%]{margin-top:8px}\n/*# sourceMappingURL=mini-drive-stats.component-IHO2LSXW.css.map */"],changeDetection:0});let e=t;return e})();var ho=(()=>{let t=class t{constructor(n){this.api=n,this.disksChanged$=this.api.subscribe("disk.query").pipe(Xe(o=>[vt.Added,vt.Changed,vt.Removed].includes(o.msg)))}getTemperature(){return this.api.call("webui.enclosure.dashboard").pipe(ei({delay:()=>this.disksChanged$}),Le(n=>n.map(o=>Object.values(o.elements[X.ArrayDeviceSlot]).map(r=>r.dev).filter(r=>!!r)).flat()),De(n=>this.api.call("disk.temperatures",[n]).pipe(ei({delay:1e4}),Ti(this.disksChanged$))))}};t.\u0275fac=function(o){return new(o||t)(ve(K))},t.\u0275prov=Re({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var ea=(e,t)=>t.dev,ta=()=>({margin:0,background:"var(--alt-bg2)"});function ia(e,t){e&1&&g(0,"ngx-skeleton-loader",2),e&2&&f("theme",le(1,ta))}function na(e,t){e&1&&(g(0,"ix-tooltip",4),d(1,"translate"),d(2,"translate")),e&2&&f("header",m(1,2,"Temperature data missing."))("message",m(2,4,"No temperature data was reported by the system. There can be a number of reasons why this might occur."))}function oa(e,t){if(e&1&&(a(0,"span",3),p(1),d(2,"orNotAvailable"),l(),S(3,na,3,6,"ix-tooltip",4)),e&2){let i=h().$implicit;s(),v(m(2,2,i.temperature)),s(2),x(i.temperature?-1:3)}}
1function ra(e,t){if(e&1&&(a(0,"li",0)(1,"strong",1),p(2),l(),S(3,ia,1,2,"ngx-skeleton-loader",2)(4,oa,4,4),l()),e&2){let i=t.$implicit,n=h(2);s(2),C("",i.dev,":"),s(),x(n.isLoading()?3:4)}}function sa(e,t){if(e&1&&(a(0,"ul"),$(1,ra,5,2,"li",0,ea),l()),e&2){let i=h();s(),J(i.disks())}}var go=(()=>{let t=class t{constructor(n,o){this.store=n,this.diskTemperatureService=o,this.temperature=je(this.diskTemperatureService.getTemperature()),this.celsius=Fn.Celsius,this.slots=b(()=>oe(this.store.selectedEnclosure(),P.Front)),this.isLoading=b(()=>!this.temperature()),this.disks=b(()=>this.slots().filter(r=>r.dev).map(({dev:r})=>{let c=this.temperature();return{dev:r,temperature:c!=null&&c[r]?"".concat(c[r]," ").concat(this.celsius):null}}))}};t.\u0275fac=function(o){return new(o||t)(_(D),_(ho))},t.\u0275cmp=y({type:t,selectors:[["ix-mini-drive-temperatures"]],decls:4,vars:4,consts:[[1,"disk"],[1,"dev"],[3,"theme"],[1,"temperature"],[1,"tooltip-icon",3,"header","message"]],template:function(o,r){o&1&&(a(0,"h3"),p(1),d(2,"translate"),l(),S(3,sa,3,0,"ul")),o&2&&(s(),v(m(2,2,"Drive Temperatures")),s(2),x(r.disks()?3:-1))},dependencies:[lt,at,dn,w,M,Ln],styles:["h3[_ngcontent-%COMP%]{border-bottom:1px solid var(--lines);font-weight:500;margin-bottom:12px;padding-bottom:7px}.disk[_ngcontent-%COMP%]{align-items:center;display:flex;gap:6px;margin:8px 0 6px}.disk[_ngcontent-%COMP%] .dev[_ngcontent-%COMP%]{min-width:32px}.disk[_ngcontent-%COMP%] ngx-skeleton-loader[_ngcontent-%COMP%]{display:inline-flex;width:32px}.disk[_ngcontent-%COMP%] .temperature[_ngcontent-%COMP%]{margin-right:3px}.disk[_ngcontent-%COMP%] .tooltip-icon[_ngcontent-%COMP%]{vertical-align:-2px}\n/*# sourceMappingURL=mini-drive-temperatures.component-BUPGMPLL.css.map */"],changeDetection:0});let e=t;return e})();function aa(e,t){if(e&1&&(g(0,"ix-icon",0),p(1),d(2,"translate"),d(3,"translate")),e&2){let i=h();s(),C(" ",i.slot().dev?m(2,1,"Unassigned"):m(3,3,"Empty"),"\n")}}function la(e,t){e&1&&g(0,"ix-icon",1)}function ca(e,t){e&1&&g(0,"ix-icon",2)}function pa(e,t){e&1&&g(0,"ix-icon",3)}function da(e,t){e&1&&g(0,"ix-icon",4)}function ma(e,t){e&1&&g(0,"ix-icon",5)}function ua(e,t){e&1&&g(0,"ix-icon",6)}function fa(e,t){e&1&&g(0,"ix-icon",7)}function ha(e,t){e&1&&g(0,"ix-icon",8)}function ga(e,t){if(e&1&&(S(0,la,1,0,"ix-icon",1)(1,ca,1,0,"ix-icon",2)(2,pa,1,0,"ix-icon",3)(3,da,1,0,"ix-icon",4)(4,ma,1,0,"ix-icon",5)(5,ua,1,0,"ix-icon",6)(6,fa,1,0,"ix-icon",7)(7,ha,1,0,"ix-icon",8),p(8),d(9,"mapValue"),d(10,"translate")),e&2){let i,n=h();x((i=n.slot().pool_info.disk_status)===n.EnclosureDiskStatus.Online?0:i===n.EnclosureDiskStatus.Faulted?1:i===n.EnclosureDiskStatus.Degraded?2:i===n.EnclosureDiskStatus.Unknown?3:i===n.EnclosureDiskStatus.Offline?4:i===n.EnclosureDiskStatus.Unavail?5:i===n.EnclosureDiskStatus.Removed?6:7),s(8),C(" ",m(10,5,V(9,2,n.slot().pool_info.disk_status,n.enclosureDiskStatusLabels)),"\n")}}var _o=(()=>{let t=class t{constructor(){this.slot=O.required(),this.EnclosureDiskStatus=Z,this.enclosureDiskStatusLabels=Pe}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=y({type:t,selectors:[["ix-mini-slot-status"]],inputs:{slot:[1,"slot"]},decls:2,vars:1,consts:[["name","mdi-circle-outline",1,"status-icon","status-empty"],["name","check_circle",1,"status-icon","status-online"],["name","error",1,"status-icon","status-faulted"],["name","error",1,"status-icon","status-degraded"],["name","mdi-help-circle",1,"status-icon","status-unknown"],["name","mdi-minus-circle",1,"status-icon","status-offline"],["name","mdi-minus-circle",1,"status-icon","status-unavailable"],["name","mdi-minus-circle",1,"status-icon","status-removed"],["name","check_circle",1,"status-icon"]],template:function(o,r){o&1&&S(0,aa,4,5)(1,ga,11,7),o&2&&x(r.slot().pool_info?1:0)},dependencies:[te,w,M,Me],styles:[".status-icon[_ngcontent-%COMP%]{display:inline-block;line-height:normal;margin-bottom:4px;margin-right:2px;vertical-align:middle}.status-icon.status-offline[_ngcontent-%COMP%], .status-icon.status-unavailable[_ngcontent-%COMP%], .status-icon.status-removed[_ngcontent-%COMP%]{color:var(--grey)}.status-icon.status-online[_ngcontent-%COMP%]{color:var(--green)}.status-icon.status-degraded[_ngcontent-%COMP%]{color:var(--orange)}.status-icon.status-faulted[_ngcontent-%COMP%]{color:var(--red)}.status-icon.status-unknown[_ngcontent-%COMP%]{color:var(--yellow)}\n/*# sourceMappingURL=mini-slot-status.component-4DBLKSY3.css.map */"],changeDetection:0});let e=t;return e})();var vo=(e,t)=>t.drive_bay_number;
1function _a(e,t){if(e&1&&(a(0,"div",1)(1,"span",5),p(2),l(),a(3,"span",6),p(4),d(5,"translate"),l()()),e&2){let i=t.$implicit,n=t.$index;s(2),v(n+1),s(2),C(" ",i.dev||m(5,2,"Empty")," ")}}function va(e,t){if(e&1&&(a(0,"div",1)(1,"div",7),g(2,"ix-mini-slot-status",8),l()()),e&2){let i=t.$implicit;s(2),f("slot",i)}}var xo=(()=>{let t=class t{constructor(n){this.store=n,this.enclosure=this.store.selectedEnclosure,this.selectedSlot=this.store.selectedSlot,this.poolTint=b(()=>Yt(this.store.poolColors())),this.slots=b(()=>oe(this.store.selectedEnclosure(),P.Front)),this.isMini3E=b(()=>[E.Mini3E,E.Mini3EPlus].includes(this.enclosure().model)),this.isMini3X=b(()=>[E.Mini3X,E.Mini3XPlus].includes(this.enclosure().model)),this.isMini3Xl=b(()=>[E.Mini3XlPlus].includes(this.enclosure().model))}onSlotSelected(n){this.store.selectSlot(n?n.drive_bay_number:null)}};t.\u0275fac=function(o){return new(o||t)(_(D))},t.\u0275cmp=y({type:t,selectors:[["ix-mini-enclosure"]],decls:8,vars:15,consts:[[1,"slots-and-numbers"],[1,"slot"],[1,"enclosure"],[3,"selectedSlotChange","enclosure","slotTintFn","selectedSlot"],[1,"disk-status"],[1,"slot-number"],[1,"slot-contents"],[1,"slot-status"],[3,"slot"]],template:function(o,r){o&1&&(a(0,"div",0),$(1,_a,6,4,"div",1,vo),l(),a(3,"div",2)(4,"ix-enclosure-side",3),T("selectedSlotChange",function(u){return r.onSlotSelected(u)}),l()(),a(5,"div",4),$(6,va,3,1,"div",1,vo),l()),o&2&&(U("mini-3e",r.isMini3E())("mini-3x",r.isMini3X())("mini-3xl",r.isMini3Xl()),s(),J(r.slots()),s(3),f("enclosure",r.enclosure())("slotTintFn",r.poolTint())("selectedSlot",r.selectedSlot()),s(),U("mini-3e",r.isMini3E())("mini-3x",r.isMini3X())("mini-3xl",r.isMini3Xl()),s(),J(r.slots()))},dependencies:[Oe,_o,w,M],styles:["[_nghost-%COMP%]{display:flex;flex-wrap:wrap;gap:12px;justify-content:space-evenly}.slots-and-numbers[_ngcontent-%COMP%]{padding-top:20px;position:relative}@media (max-width: 600px){.slots-and-numbers[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:16px;padding-bottom:15px;padding-top:0}}.slots-and-numbers[_ngcontent-%COMP%] .slot-number[_ngcontent-%COMP%]{background-color:var(--primary);border-radius:50%;color:var(--fg1);font-size:11px;margin-right:3px;padding:4px 7px;vertical-align:1px}.slots-and-numbers[_ngcontent-%COMP%] .slot[_ngcontent-%COMP%]{white-space:nowrap}@media (min-width: 600px){.slots-and-numbers[_ngcontent-%COMP%] .slot[_ngcontent-%COMP%]{margin-bottom:16px}}@media (min-width: 600px){.slots-and-numbers.mini-3e[_ngcontent-%COMP%]{padding-top:55px}}@media (min-width: 600px){.slots-and-numbers.mini-3x[_ngcontent-%COMP%]{padding-top:28px}.slots-and-numbers.mini-3x[_ngcontent-%COMP%] .slot[_ngcontent-%COMP%]:nth-last-child(2){margin-bottom:5px}}@media (min-width: 600px){.slots-and-numbers.mini-3xl[_ngcontent-%COMP%]{padding-top:50px}.slots-and-numbers.mini-3xl[_ngcontent-%COMP%] .slot[_ngcontent-%COMP%]:nth-child(4){margin-bottom:44px}.slots-and-numbers.mini-3xl[_ngcontent-%COMP%] .slot[_ngcontent-%COMP%]:last-child{position:absolute;top:5px}}@media (max-width: 600px){.slots-and-numbers.mini-3xl[_ngcontent-%COMP%]{order:0}.slots-and-numbers.mini-3xl[_ngcontent-%COMP%] .slot[_ngcontent-%COMP%]:last-child{order:-1}}.disk-status[_ngcontent-%COMP%]{padding-top:20px;position:relative}@media (max-width: 600px){.disk-status[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:16px;padding-top:15px}}@media (min-width: 600px){.disk-status[_ngcontent-%COMP%] .slot[_ngcontent-%COMP%]{margin-bottom:11.5px}}@media (min-width: 600px){.disk-status.mini-3e[_ngcontent-%COMP%]{padding-top:55px}}@media (min-width: 600px){.disk-status.mini-3x[_ngcontent-%COMP%]{padding-top:28px}.disk-status.mini-3x[_ngcontent-%COMP%] .slot[_ngcontent-%COMP%]:nth-last-child(2){margin-bottom:0}}@media (min-width: 600px){.disk-status.mini-3xl[_ngcontent-%COMP%]{padding-top:50px}.disk-status.mini-3xl[_ngcontent-%COMP%] .slot[_ngcontent-%COMP%]:nth-child(4){margin-bottom:38px}.disk-status.mini-3xl[_ngcontent-%COMP%] .slot[_ngcontent-%COMP%]:last-child{position:absolute;top:5px}}@media (max-width: 600px){.disk-status.mini-3xl[_ngcontent-%COMP%]{order:0}.disk-status.mini-3xl[_ngcontent-%COMP%] .slot[_ngcontent-%COMP%]:last-child{order:-1}}
1.enclosure[_ngcontent-%COMP%]{min-width:300px}@media (max-width: 600px){.enclosure[_ngcontent-%COMP%]{min-width:75vw}}\n/*# sourceMappingURL=mini-enclosure.component-YOK4NPM4.css.map */"],changeDetection:0});let e=t;return e})();var Co=(()=>{let t=class t{constructor(n){this.store=n,this.enclosure=this.store.selectedEnclosure,this.selectedSide=this.store.selectedSide,this.poolColors=this.store.poolColors}};t.\u0275fac=function(o){return new(o||t)(_(D))},t.\u0275cmp=y({type:t,selectors:[["ix-mini-pools"]],decls:4,vars:6,consts:[[3,"enclosure","side","poolColors"]],template:function(o,r){o&1&&(a(0,"h3"),p(1),d(2,"translate"),l(),g(3,"ix-pools-legend",0)),o&2&&(s(),v(m(2,4,"Pools")),s(2),f("enclosure",r.enclosure())("side",r.selectedSide())("poolColors",r.poolColors()))},dependencies:[Kt,w,M],styles:["[_nghost-%COMP%]{display:block;margin-bottom:26px}h3[_ngcontent-%COMP%]{border-bottom:1px solid var(--lines);font-weight:500;margin-bottom:12px;padding-bottom:7px}\n/*# sourceMappingURL=mini-pools.component-35XFIWM7.css.map */"],changeDetection:0});let e=t;return e})();var xa=e=>({enclosure:e});function Ca(e,t){e&1&&g(0,"ix-fake-progress-bar",2),e&2&&f("loading",t)}function Sa(e,t){if(e&1&&g(0,"ix-mini-drive-details",6)(1,"ix-mini-drive-stats",6),e&2){let i=h();f("slot",i.selectedSlot()),s(),f("slot",i.selectedSlot())}}function ya(e,t){if(e&1&&g(0,"ix-mini-disks-overview",7)(1,"ix-mini-drive-temperatures"),e&2){let i=h();f("slots",i.slots())}}var So=(()=>{let t=class t{constructor(n,o){this.store=n,this.router=o,this.enclosureLabel=this.store.enclosureLabel,this.selectedSlot=this.store.selectedSlot,this.isLoading=this.store.isLoading,this.slots=b(()=>{let r=this.store.selectedEnclosure();return r?oe(r,P.Front):[]}),this.redirectOnNonMinis=Ce(()=>{let r=this.store.selectedEnclosure();r&&(Ht(r)||this.router.navigate(["/system","viewenclosure",r.id]))})}};t.\u0275fac=function(o){return new(o||t)(_(D),_(Ve))},t.\u0275cmp=y({type:t,selectors:[["ix-mini-page"]],decls:14,vars:8,consts:[[1,"card"],[1,"header"],[3,"loading"],[1,"container"],[1,"enclosure-column"],[1,"details-column"],[3,"slot"],[3,"slots"]],template:function(o,r){if(o&1&&(a(0,"mat-card",0)(1,"mat-card-header")(2,"h3",1),p(3),d(4,"translate"),l()(),a(5,"mat-card-content"),S(6,Ca,1,1,"ix-fake-progress-bar",2),a(7,"div",3)(8,"div",4),g(9,"ix-mini-pools")(10,"ix-mini-enclosure"),l(),a(11,"div",5),S(12,Sa,2,2)(13,ya,2,1),l()()()()),o&2){let c;s(3),C(" ",V(4,3,"Disks on {enclosure}",R(6,xa,r.enclosureLabel()))," "),s(3),x((c=r.isLoading())?6:-1,c),s(6),x(r.selectedSlot()?12:13)}},dependencies:[Ae,Ne,be,yt,Co,xo,uo,fo,mo,go,w,M],styles:["[_nghost-%COMP%]{display:block;margin-left:auto;margin-right:auto;max-width:1300px}[_nghost-%COMP%] .card[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{background-color:var(--contrast-darker);display:flex;flex-wrap:wrap;gap:26px;padding:24px 28px 56px}[_nghost-%COMP%] .card[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .enclosure-column[_ngcontent-%COMP%]{flex:1 1 60%}[_nghost-%COMP%] .card[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .details-column[_ngcontent-%COMP%]{flex:1 1 40%}[_nghost-%COMP%] .header[_ngcontent-%COMP%]{font-size:26px;font-weight:500;margin-bottom:16px;margin-left:10px}ix-fake-progress-bar[_ngcontent-%COMP%]{height:2px}\n/*# sourceMappingURL=mini-page.component-UGZRYWO3.css.map */"],changeDetection:0});let e=t;return e})();var ba=(e,t)=>t.label;function Ma(e,t){if(e&1){let i=N();a(0,"button",4),T("click",function(){let o=j(i).$implicit,r=h(2);return A(r.changeView(o))}),p(1),l()}if(e&2){let i=t.$implicit;f("ixTest",i.label),s(),C(" ",i.label," ")}}function wa(e,t){if(e&1&&(a(0,"button",1),p(1),d(2,"translate"),g(3,"ix-icon",2),l(),a(4,"mat-menu",null,0),$(6,Ma,2,2,"button",3,ba),l()),e&2){let i=Ai(5),n=h();f("matMenuTriggerFor",i),s(),C(" ",m(2,2,"Elements")," "),s(5),J(n.views())}}var yo=(()=>{let t=class t{constructor(n){this.router=n,this.enclosure=O.required(),this.views=b(()=>{let o=this.enclosure();return Object.keys(o.elements).map(r=>{let c=["/system/viewenclosure",String(o.id)];return r!==X.ArrayDeviceSlot&&(c=[...c,r]),{url:c,label:ze.has(r)?ze.get(r):r}})})}changeView(n){this.router.navigate(n.url)}};t.\u0275fac=function(o){return new(o||t)(_(Ve))},t.\u0275cmp=y({type:t,selectors:[["ix-view-elements-menu"]],inputs:{enclosure:[1,"enclosure"]},decls:1,vars:1,consts:[["elementsMenu","matMenu"],["mat-button","","ixTest","elements-menu",3,"matMenuTriggerFor"],["name","mdi-menu-down",1,"menu-caret"],["mat-menu-item","",3,"ixTest"],["mat-menu-item","",3,"click","ixTest"]],template:function(o,r){o&1&&S(0,wa,8,4),o&2&&x(r.views().length>1?0:-1)},dependencies:[G,B,ln,te,an,sn,w,M],encapsulation:2,changeDetection:0});let e=t;return e})();var Pa=function(e,t,i,n){var o=arguments.length,r=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,i,n);else for(var u=e.length-1;u>=0;u--)(c=e[u])&&(r=(o<3?c(r):o>3?c(t,i,r):c(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Ea=()=>["/","system","viewenclosure","jbof"];function Oa(e,t){e&1&&(a(0,"a",0),p(1),d(2,"translate"),l()),e&2&&(f("routerLink",le(4,Ea)),s(),C(" ",m(2,2,"NVMe-oF Expansion Shelves")," "))}function Ta(e,t){if(e&1&&g(0,"ix-view-elements-menu",1),e&2){let i=h();f("enclosure",i.selectedEnclosure())}}function Da(e,t){e&1&&g(0,"router-outlet")}function ka(e,t){if(e&1&&g(0,"ix-empty",2),e&2){let i=h();f("conf",i.emptyDashboardConf)}}var _e,Zt=(_e=class{constructor(t,i,n,o){this.enclosureStore=t,this.route=i,this.api=n,this.translate=o,this.isJbofLicensed$=this.api.call("jbof.licensed"),this.selectedEnclosure=this.enclosureStore.selectedEnclosure,this.empty
1DashboardConf={type:Mt.NoPageData,large:!0,title:this.translate.instant("Enclosure Unavailable"),message:this.translate.instant("We\u2019re unable to access the enclosure at the moment. Please ensure it\u2019s connected properly and reload the page.")},this.enclosureStore.initiate(),this.enclosureStore.listenForDiskUpdates().pipe(H(this)).subscribe(),this.route.paramMap.pipe(H(this)).subscribe(r=>{let c=r.get("enclosure");c&&this.enclosureStore.selectEnclosure(c)})}},_e.\u0275fac=function(i){return new(i||_e)(_(D),_(rt),_(K),_(q))},_e.\u0275cmp=y({type:_e,selectors:[["ix-enclosure-dashboard"]],features:[Ui([D])],decls:6,vars:5,consts:[["mat-button","","ixTest","manage-expansion",3,"routerLink"],[3,"enclosure"],[3,"conf"]],template:function(i,n){i&1&&(a(0,"ix-page-header"),S(1,Oa,3,5,"a",0),d(2,"async"),S(3,Ta,1,1,"ix-view-elements-menu",1),l(),S(4,Da,1,0,"router-outlet")(5,ka,1,1,"ix-empty",2)),i&2&&(s(),x(m(2,3,n.isJbofLicensed$)?1:-1),s(2),x(n.selectedEnclosure()?3:-1),s(),x(n.selectedEnclosure()?4:5))},dependencies:[bt,zi,B,st,yo,Ki,wt,w,M,nt],styles:["ix-empty[_ngcontent-%COMP%]{height:inherit}\n/*# sourceMappingURL=enclosure-dashboard.component-HGSHTNTX.css.map */"],changeDetection:0}),_e);Zt=Pa([z()],Zt);var R0=[{path:"jbof",component:It,data:{title:"NVMe-oF Expansion Shelves",breadcrumb:null}},{path:"",pathMatch:"full",data:{title:"View Enclosure",breadcrumb:null},redirectTo:"/system/viewenclosure/"},{path:":enclosure",component:Zt,data:{title:"View Enclosure",breadcrumb:null},children:[{path:"",component:Qt,data:{title:"View Enclosure",breadcrumb:null}},{path:"mini",component:So,data:{title:"View Enclosure",breadcrumb:null}},{path:":view",component:Qn,data:{title:"View Enclosure",breadcrumb:null}}]}];export{R0 as enclosureRoutes}; 2//# sourceMappingURL=chunk-6VMOO6XI.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.