@whoz-oss/coday-factory-cockpit 0.0.0-workstream-forge.307 → 0.0.0-workstream-forge.310

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import {L as he,R as ce,P as Pt,T as no,h,bg as ue,c6 as De,cl as V,aX as j,cm as Ee,cn as ai,b6 as mf,X as y,b1 as Z,co as nW,ad as ve,cp as z3,cq as nn,al as fn,bR as Vt,cr as zt,cs as Zn,ct as me,$ as $s,ba as rt,br as ya,bb as wt,aq as Ey,cu as Fe,e as ey,bx as Xg,s as ir,G as It,cv as tt,bj as Ht,a_ as wn,cw as mn,cx as F,x as xe}from'./main-YM5YA3UI.js';var J=(()=>{class s{static \u0275fac=function(t){return new(t||s)};static \u0275cmp=xe({type:s,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(t,i){},styles:[`textarea.cdk-textarea-autosize {
1
+ import {L as he,R as ce,P as Pt,T as no,h,bg as ue,c6 as De,cl as V,aX as j,cm as Ee,cn as ai,b6 as mf,X as y,b1 as Z,co as nW,ad as ve,cp as z3,cq as nn,al as fn,bR as Vt,cr as zt,cs as Zn,ct as me,$ as $s,ba as rt,br as ya,bb as wt,aq as Ey,cu as Fe,e as ey,bx as Xg,s as ir,G as It,cv as tt,bj as Ht,a_ as wn,cw as mn,cx as F,x as xe}from'./main-T4S6RIJZ.js';var J=(()=>{class s{static \u0275fac=function(t){return new(t||s)};static \u0275cmp=xe({type:s,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(t,i){},styles:[`textarea.cdk-textarea-autosize {
2
2
  resize: none;
3
3
  }
4
4
 
@@ -1 +1 @@
1
- import {B as Be,P as Pe$1}from'./chunk-CnKPyIQK.js';import {h,l as ln,aa as ce,ab as Ue,Q as Qe,q as lT,ac as Hn,ad as ve,y as yb,$ as $s,ae as I,x as xe,af as Wn,ag as Bn,ah as Xe,ai as kn,aj as Tn,ak as qt,al as fn,am as cn,N as Nt,H as HW,U as UW,P as Pt,I as It,M as Me,S as Se$1,an as _i,Y as Y8,Z as Z8,W as Wr,a as Hr,c as ce$1,m as ma,V as VC,b as Id,f as ci,e as ey,d as eC,ao as UI,g as Yg,r as ri,u as ui,j as Zg,ap as $I,t as tC,k as hy,a8 as Sd,aq as Ey,ar as vb,as as Cc,at as ke$1,au as qe$1,av as yr,aw as XW,ax as ao,ay as zt,az as M,A as pC,aA as gy}from'./main-YM5YA3UI.js';import {T,U}from'./chunk-GflAHPXN.js';import {g}from'./chunk-CC-LFx8S.js';var _=class t{api=h(vb);definitions=Qe([]);namespaces=Qe([]);loading=Qe(false);definitionsError=Qe(null);namespacesError=Qe(null);submitting=Qe(false);submissionError=Qe(null);loadOptions(){this.loading.set(true),this.definitionsError.set(null),this.namespacesError.set(null),Cc({definitions:this.api.getWorkflowDefinitions().pipe(ke$1(e=>(this.definitionsError.set(e),qe$1([])))),namespaces:this.api.getNamespaces().pipe(ke$1(e=>(this.namespacesError.set(e),qe$1([]))))}).pipe(yr(()=>this.loading.set(false))).subscribe(({definitions:e,namespaces:o})=>{this.definitions.set(g(e).filter(n=>!!n.workflowType&&!!n.version&&/^[0-9a-f]{64}$/.test(n.definitionHash??""))),this.namespaces.set(XW(o));});}launch(e){return this.submitting.set(true),this.submissionError.set(null),this.api.createWorkflowRun(e,ao()).pipe(zt({error:o=>this.submissionError.set(o)}),yr(()=>this.submitting.set(false)))}static \u0275fac=function(o){return new(o||t)};static \u0275prov=M({token:t,factory:t.\u0275fac})};function we(t,e){return this.definitionKey(e)}var ke=(t,e)=>e.id;function Ne(t,e){t&1&&(ma(0,"div",4)(1,"mat-icon",23),VC(2,"check_circle"),Id(),ma(3,"span"),VC(4),Id()()),t&2&&(ri(4),hy(e));}function Le(t,e){t&1&&(ma(0,"div",5)(1,"mat-icon",23),VC(2,"error"),Id(),ma(3,"span"),VC(4),Id()()),t&2&&(ri(4),hy(e));}function Te(t,e){t&1&&(ma(0,"div",6)(1,"mat-icon",23),VC(2,"warning"),Id(),ma(3,"span"),VC(4),Id()()),t&2&&(ri(4),hy(e));}function Ie(t,e){t&1&&(ma(0,"div",7)(1,"mat-icon",23),VC(2,"error"),Id(),ma(3,"span"),VC(4),Id()()),t&2&&(ri(4),hy(e));}function Pe(t,e){if(t&1&&(ma(0,"mat-option",11),VC(1),Id()),t&2){let o=e.$implicit,n=pC();Zg("value",n.definitionKey(o)),ri(),gy("",o.workflowType,"@",o.version," \xB7 ",o.definitionHash?.slice(0,12));}}function Fe(t,e){t&1&&(ma(0,"mat-error"),VC(1,"Workflow definition is required."),Id());}function Re(t,e){if(t&1&&(ma(0,"mat-option",11),VC(1),Id()),t&2){let o=e.$implicit;Zg("value",o.id),ri(),hy(o.name);}}function De(t,e){t&1&&(ma(0,"mat-error"),VC(1,"An accessible namespace is required."),Id());}function Oe(t,e){t&1&&(ma(0,"mat-hint"),VC(1),Id()),t&2&&(ri(),Sd("Namespace id: ",e.id));}function qe(t,e){t&1&&(ma(0,"mat-hint",13),VC(1,"Loading namespaces\u2026"),Id());}function Ae(t,e){t&1&&(ma(0,"mat-hint",14),VC(1,"No AgentOS namespace is available."),Id());}function We(t,e){t&1&&(ma(0,"mat-error"),VC(1,"The objective must not exceed 4,000 characters."),Id());}function Ke(t){let e=t?.code??"UNKNOWN_ERROR",o=t?.message?.trim();return o?`${o} (${e})`:`Launch failed (${e}).`}var Se=class t{launchState=h(_);store=h(ln);router=h(ce);destroyRef=h(Ue);definitions=this.launchState.definitions;namespaces=this.launchState.namespaces;submitting=this.launchState.submitting;successMessage=Qe(null);errorMessage=Qe(null);definitionsLoading=this.launchState.loading;definitionsError=lT(()=>this.launchState.definitionsError()?.message??null);launchTargetsLoading=this.launchState.loading;launchTargetsError=lT(()=>this.launchState.namespacesError()?.message??null);form=h(Hn).group({definitionKey:["",ve.required],namespaceId:["",ve.required],title:["",ve.maxLength(200)],ticket:["",ve.maxLength(64)],initialRequest:["",ve.maxLength(4e3)]});selectedNamespaceId=T(this.form.controls.namespaceId.valueChanges,{initialValue:this.form.controls.namespaceId.value});selectedNamespace=lT(()=>this.namespaces().find(e=>e.id===this.selectedNamespaceId())??null);constructor(){h(yb).crumbs.set([{label:"Workstreams",link:"/workstreams"},{label:"Launch a run"}]),this.launchState.loadOptions(),$s(()=>{let e=this.definitions();e.length===1&&!this.form.controls.definitionKey.value&&this.form.controls.definitionKey.setValue(this.definitionKey(e[0]));let o=this.namespaces();o.length===1&&!this.form.controls.namespaceId.value&&this.form.controls.namespaceId.setValue(o[0]?.id??"");});}definitionKey(e){return JSON.stringify([e?.workflowType,e?.version,e?.definitionHash])}onSubmit(){if(this.submitting())return;if(this.form.invalid){this.form.markAllAsTouched();return}let{definitionKey:e,namespaceId:o,title:n,ticket:b,initialRequest:x}=this.form.getRawValue(),f=this.definitions().find(u=>this.definitionKey(u)===e);if(this.definitionsLoading()||this.definitionsError()||!f){this.errorMessage.set("Select an available workflow version before launching.");return}if(this.launchTargetsLoading()||this.launchTargetsError()||!this.namespaces().some(u=>u.id===o)){this.errorMessage.set("Select an available namespace before launching.");return}let v=n.trim(),C=b.trim(),F=x.trim();this.submitting.set(true),this.successMessage.set(null),this.errorMessage.set(null),this.launchState.launch(I(I(I({namespaceId:o,workflowType:f.workflowType,definitionVersion:f.version,definitionHash:f.definitionHash},v?{title:v}:{}),F?{initialRequest:F}:{}),C?{parameters:{ticket:C}}:{})).pipe(U(this.destroyRef)).subscribe({next:u=>{let R=u?.submissionId;this.successMessage.set(R?`Launch accepted (id: ${R})`:"Launch accepted."),this.store.selectNamespace(o),this.store.refresh(),this.router.navigate(["/sessions",u.workflowId],{queryParams:{namespaceId:o}});},error:u=>{this.errorMessage.set(Ke(u));}});}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=xe({type:t,selectors:[["sf-launch-page"]],features:[Ey([_])],decls:55,vars:13,consts:[[1,"page"],[1,"page-head"],[1,"titles"],[1,"sf-muted"],["role","status","data-launch-success","true",1,"banner","banner--success"],["role","alert","data-launch-error","true",1,"banner","banner--error"],["role","alert","data-launch-definitions-error","true",1,"banner","banner--warn"],["role","alert","data-launch-targets-error","true",1,"banner","banner--error"],["novalidate","",1,"sf-panel","launch-form",3,"ngSubmit","formGroup"],["appearance","outline",1,"field"],["formControlName","definitionKey","data-launch-workflow-type","true"],[3,"value"],["formControlName","namespaceId","data-launch-namespace","true"],["data-launch-targets-loading","true"],["data-launch-targets-empty","true"],["appearance","outline",1,"field","field--wide"],["matInput","","formControlName","title","maxlength","200","placeholder","Readable run title","data-launch-title","true"],["matInput","","formControlName","ticket","placeholder","ABC-123 or #123","data-launch-ticket","true",1,"sf-mono"],["matInput","","id","launch-initial-request","formControlName","initialRequest","aria-describedby","launch-initial-request-help","rows","5","maxlength","4000","data-launch-initial-request","true"],["id","launch-initial-request-help"],[1,"form-actions"],["mat-flat-button","","type","submit","data-launch-submit","true",1,"sf-primary",3,"disabled"],["mat-stroked-button","","routerLink","/workstreams",1,"sf-secondary"],["aria-hidden","true"]],template:function(o,n){if(o&1&&(ma(0,"div",0)(1,"header",1)(2,"div",2)(3,"h1"),VC(4,"Launch a run"),Id(),ma(5,"p",3),VC(6," Creates and durably submits a real workflow. Factory assigns identity and execution context. "),Id()()(),ci(7,Ne,5,1,"div",4),ci(8,Le,5,1,"div",5),ci(9,Te,5,1,"div",6),ci(10,Ie,5,1,"div",7),ma(11,"form",8),ey("ngSubmit",function(){return n.onSubmit()}),ma(12,"mat-form-field",9)(13,"mat-label"),VC(14,"Workflow definition"),Id(),ma(15,"mat-select",10),eC(16,Pe,2,4,"mat-option",11,we,true),Id(),UI(),ci(18,Fe,2,0,"mat-error"),ma(19,"mat-hint"),VC(20),Id()(),ma(21,"mat-form-field",9)(22,"mat-label"),VC(23,"AgentOS namespace"),Id(),ma(24,"mat-select",12),eC(25,Re,2,2,"mat-option",11,ke),Id(),UI(),ci(27,De,2,0,"mat-error"),ci(28,Oe,2,1,"mat-hint")(29,qe,2,0,"mat-hint",13)(30,Ae,2,0,"mat-hint",14),Id(),ma(31,"mat-form-field",15)(32,"mat-label"),VC(33,"Title (optional)"),Id(),Yg(34,"input",16),UI(),ma(35,"mat-hint"),VC(36,"Factory generates a readable title if omitted."),Id()(),ma(37,"mat-form-field",9)(38,"mat-label"),VC(39,"Ticket / Issue (optional)"),Id(),Yg(40,"input",17),UI(),Id(),ma(41,"mat-form-field",15)(42,"mat-label"),VC(43,"What would you like to do? (optional)"),Id(),Yg(44,"textarea",18),UI(),ci(45,We,2,0,"mat-error"),ma(46,"mat-hint",19),VC(47," Describe your objective, even briefly. The agent will ask for any clarifications needed. "),Id()(),ma(48,"div",20)(49,"button",21)(50,"mat-icon"),VC(51),Id(),VC(52),Id(),ma(53,"a",22),VC(54,"Cancel"),Id()()()()),o&2){let b,x,f,v,C;ri(7),ui((b=n.successMessage())?7:-1,b),ri(),ui((x=n.errorMessage())?8:-1,x),ri(),ui((f=n.definitionsError())?9:-1,f),ri(),ui((v=n.launchTargetsError())?10:-1,v),ri(),Zg("formGroup",n.form),ri(4),$I(),ri(),tC(n.definitions()),ri(2),ui(n.form.controls.definitionKey.hasError("required")?18:-1),ri(2),hy(n.definitionsLoading()?"Loading definitions\u2026":n.definitions().length?"Choose an exact version. No automatic latest selection.":"No workflow version is available."),ri(4),$I(),ri(),tC(n.namespaces()),ri(2),ui(n.form.controls.namespaceId.hasError("required")?27:-1),ri(),ui((C=n.selectedNamespace())?28:n.launchTargetsLoading()?29:!n.launchTargetsError()&&n.namespaces().length===0?30:-1,C),ri(6),$I(),ri(6),$I(),ri(4),$I(),ri(),ui(n.form.controls.initialRequest.hasError("maxlength")?45:-1),ri(4),Zg("disabled",n.submitting()||n.definitionsLoading()||!!n.definitionsError()||n.definitions().length===0||n.form.invalid||n.launchTargetsLoading()||!!n.launchTargetsError()||n.namespaces().length===0),ri(2),hy(n.submitting()?"hourglass_top":"play_arrow"),ri(),Sd(" ",n.submitting()?"Launching\u2026":"Launch run"," ");}},dependencies:[Wn,Bn,Xe,kn,Tn,qt,fn,cn,Nt,HW,UW,Pt,It,Me,Se$1,_i,Y8,Z8,Be,Pe$1,Wr,Hr,ce$1],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px;max-width:900px}.page-head[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:12px}.titles[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px}h1[_ngcontent-%COMP%]{margin:0;font-family:var(--font-heading);font-size:28px;font-weight:600;letter-spacing:-.01em}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.launch-form[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px;padding:24px}.field[_ngcontent-%COMP%]{width:100%}.field--wide[_ngcontent-%COMP%]{grid-column:1/-1}.form-actions[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;gap:10px;padding-top:8px}@media(max-width:720px){.launch-form[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}"]})};export{Se as LaunchPageComponent,Ke as formatLaunchError};
1
+ import {B as Be,P as Pe$1}from'./chunk-C4tkfNSW.js';import {h,p as pn,aa as ce,ab as Ue,Q as Qe,q as lT,ac as Hn,ad as ve,y as yb,$ as $s,ae as I,x as xe,af as Wn,ag as Bn,ah as Xe,ai as kn,aj as Tn,ak as qt,al as fn,am as cn,N as Nt,H as HW,U as UW,P as Pt,I as It,M as Me,S as Se$1,an as _i,Y as Y8,Z as Z8,W as Wr,a as Hr,c as ce$1,m as ma,V as VC,b as Id,f as ci,e as ey,d as eC,ao as UI,g as Yg,r as ri,u as ui,j as Zg,ap as $I,t as tC,k as hy,a8 as Sd,aq as Ey,ar as vb,as as Cc,at as ke$1,au as qe$1,av as yr,aw as XW,ax as ao,ay as zt,az as M,A as pC,aA as gy}from'./main-T4S6RIJZ.js';import {T,U}from'./chunk-CYwplJeI.js';import {g}from'./chunk-CPCXJtgc.js';var _=class t{api=h(vb);definitions=Qe([]);namespaces=Qe([]);loading=Qe(false);definitionsError=Qe(null);namespacesError=Qe(null);submitting=Qe(false);submissionError=Qe(null);loadOptions(){this.loading.set(true),this.definitionsError.set(null),this.namespacesError.set(null),Cc({definitions:this.api.getWorkflowDefinitions().pipe(ke$1(e=>(this.definitionsError.set(e),qe$1([])))),namespaces:this.api.getNamespaces().pipe(ke$1(e=>(this.namespacesError.set(e),qe$1([]))))}).pipe(yr(()=>this.loading.set(false))).subscribe(({definitions:e,namespaces:o})=>{this.definitions.set(g(e).filter(n=>!!n.workflowType&&!!n.version&&/^[0-9a-f]{64}$/.test(n.definitionHash??""))),this.namespaces.set(XW(o));});}launch(e){return this.submitting.set(true),this.submissionError.set(null),this.api.createWorkflowRun(e,ao()).pipe(zt({error:o=>this.submissionError.set(o)}),yr(()=>this.submitting.set(false)))}static \u0275fac=function(o){return new(o||t)};static \u0275prov=M({token:t,factory:t.\u0275fac})};function we(t,e){return this.definitionKey(e)}var ke=(t,e)=>e.id;function Ne(t,e){t&1&&(ma(0,"div",4)(1,"mat-icon",23),VC(2,"check_circle"),Id(),ma(3,"span"),VC(4),Id()()),t&2&&(ri(4),hy(e));}function Le(t,e){t&1&&(ma(0,"div",5)(1,"mat-icon",23),VC(2,"error"),Id(),ma(3,"span"),VC(4),Id()()),t&2&&(ri(4),hy(e));}function Te(t,e){t&1&&(ma(0,"div",6)(1,"mat-icon",23),VC(2,"warning"),Id(),ma(3,"span"),VC(4),Id()()),t&2&&(ri(4),hy(e));}function Ie(t,e){t&1&&(ma(0,"div",7)(1,"mat-icon",23),VC(2,"error"),Id(),ma(3,"span"),VC(4),Id()()),t&2&&(ri(4),hy(e));}function Pe(t,e){if(t&1&&(ma(0,"mat-option",11),VC(1),Id()),t&2){let o=e.$implicit,n=pC();Zg("value",n.definitionKey(o)),ri(),gy("",o.workflowType,"@",o.version," \xB7 ",o.definitionHash?.slice(0,12));}}function Fe(t,e){t&1&&(ma(0,"mat-error"),VC(1,"Workflow definition is required."),Id());}function Re(t,e){if(t&1&&(ma(0,"mat-option",11),VC(1),Id()),t&2){let o=e.$implicit;Zg("value",o.id),ri(),hy(o.name);}}function De(t,e){t&1&&(ma(0,"mat-error"),VC(1,"An accessible namespace is required."),Id());}function Oe(t,e){t&1&&(ma(0,"mat-hint"),VC(1),Id()),t&2&&(ri(),Sd("Namespace id: ",e.id));}function qe(t,e){t&1&&(ma(0,"mat-hint",13),VC(1,"Loading namespaces\u2026"),Id());}function Ae(t,e){t&1&&(ma(0,"mat-hint",14),VC(1,"No AgentOS namespace is available."),Id());}function We(t,e){t&1&&(ma(0,"mat-error"),VC(1,"The objective must not exceed 4,000 characters."),Id());}function Ke(t){let e=t?.code??"UNKNOWN_ERROR",o=t?.message?.trim();return o?`${o} (${e})`:`Launch failed (${e}).`}var Se=class t{launchState=h(_);store=h(pn);router=h(ce);destroyRef=h(Ue);definitions=this.launchState.definitions;namespaces=this.launchState.namespaces;submitting=this.launchState.submitting;successMessage=Qe(null);errorMessage=Qe(null);definitionsLoading=this.launchState.loading;definitionsError=lT(()=>this.launchState.definitionsError()?.message??null);launchTargetsLoading=this.launchState.loading;launchTargetsError=lT(()=>this.launchState.namespacesError()?.message??null);form=h(Hn).group({definitionKey:["",ve.required],namespaceId:["",ve.required],title:["",ve.maxLength(200)],ticket:["",ve.maxLength(64)],initialRequest:["",ve.maxLength(4e3)]});selectedNamespaceId=T(this.form.controls.namespaceId.valueChanges,{initialValue:this.form.controls.namespaceId.value});selectedNamespace=lT(()=>this.namespaces().find(e=>e.id===this.selectedNamespaceId())??null);constructor(){h(yb).crumbs.set([{label:"Workstreams",link:"/workstreams"},{label:"Launch a run"}]),this.launchState.loadOptions(),$s(()=>{let e=this.definitions();e.length===1&&!this.form.controls.definitionKey.value&&this.form.controls.definitionKey.setValue(this.definitionKey(e[0]));let o=this.namespaces();o.length===1&&!this.form.controls.namespaceId.value&&this.form.controls.namespaceId.setValue(o[0]?.id??"");});}definitionKey(e){return JSON.stringify([e?.workflowType,e?.version,e?.definitionHash])}onSubmit(){if(this.submitting())return;if(this.form.invalid){this.form.markAllAsTouched();return}let{definitionKey:e,namespaceId:o,title:n,ticket:b,initialRequest:x}=this.form.getRawValue(),f=this.definitions().find(u=>this.definitionKey(u)===e);if(this.definitionsLoading()||this.definitionsError()||!f){this.errorMessage.set("Select an available workflow version before launching.");return}if(this.launchTargetsLoading()||this.launchTargetsError()||!this.namespaces().some(u=>u.id===o)){this.errorMessage.set("Select an available namespace before launching.");return}let v=n.trim(),C=b.trim(),F=x.trim();this.submitting.set(true),this.successMessage.set(null),this.errorMessage.set(null),this.launchState.launch(I(I(I({namespaceId:o,workflowType:f.workflowType,definitionVersion:f.version,definitionHash:f.definitionHash},v?{title:v}:{}),F?{initialRequest:F}:{}),C?{parameters:{ticket:C}}:{})).pipe(U(this.destroyRef)).subscribe({next:u=>{let R=u?.submissionId;this.successMessage.set(R?`Launch accepted (id: ${R})`:"Launch accepted."),this.store.selectNamespace(o),this.store.refresh(),this.router.navigate(["/sessions",u.workflowId],{queryParams:{namespaceId:o}});},error:u=>{this.errorMessage.set(Ke(u));}});}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=xe({type:t,selectors:[["sf-launch-page"]],features:[Ey([_])],decls:55,vars:13,consts:[[1,"page"],[1,"page-head"],[1,"titles"],[1,"sf-muted"],["role","status","data-launch-success","true",1,"banner","banner--success"],["role","alert","data-launch-error","true",1,"banner","banner--error"],["role","alert","data-launch-definitions-error","true",1,"banner","banner--warn"],["role","alert","data-launch-targets-error","true",1,"banner","banner--error"],["novalidate","",1,"sf-panel","launch-form",3,"ngSubmit","formGroup"],["appearance","outline",1,"field"],["formControlName","definitionKey","data-launch-workflow-type","true"],[3,"value"],["formControlName","namespaceId","data-launch-namespace","true"],["data-launch-targets-loading","true"],["data-launch-targets-empty","true"],["appearance","outline",1,"field","field--wide"],["matInput","","formControlName","title","maxlength","200","placeholder","Readable run title","data-launch-title","true"],["matInput","","formControlName","ticket","placeholder","ABC-123 or #123","data-launch-ticket","true",1,"sf-mono"],["matInput","","id","launch-initial-request","formControlName","initialRequest","aria-describedby","launch-initial-request-help","rows","5","maxlength","4000","data-launch-initial-request","true"],["id","launch-initial-request-help"],[1,"form-actions"],["mat-flat-button","","type","submit","data-launch-submit","true",1,"sf-primary",3,"disabled"],["mat-stroked-button","","routerLink","/workstreams",1,"sf-secondary"],["aria-hidden","true"]],template:function(o,n){if(o&1&&(ma(0,"div",0)(1,"header",1)(2,"div",2)(3,"h1"),VC(4,"Launch a run"),Id(),ma(5,"p",3),VC(6," Creates and durably submits a real workflow. Factory assigns identity and execution context. "),Id()()(),ci(7,Ne,5,1,"div",4),ci(8,Le,5,1,"div",5),ci(9,Te,5,1,"div",6),ci(10,Ie,5,1,"div",7),ma(11,"form",8),ey("ngSubmit",function(){return n.onSubmit()}),ma(12,"mat-form-field",9)(13,"mat-label"),VC(14,"Workflow definition"),Id(),ma(15,"mat-select",10),eC(16,Pe,2,4,"mat-option",11,we,true),Id(),UI(),ci(18,Fe,2,0,"mat-error"),ma(19,"mat-hint"),VC(20),Id()(),ma(21,"mat-form-field",9)(22,"mat-label"),VC(23,"AgentOS namespace"),Id(),ma(24,"mat-select",12),eC(25,Re,2,2,"mat-option",11,ke),Id(),UI(),ci(27,De,2,0,"mat-error"),ci(28,Oe,2,1,"mat-hint")(29,qe,2,0,"mat-hint",13)(30,Ae,2,0,"mat-hint",14),Id(),ma(31,"mat-form-field",15)(32,"mat-label"),VC(33,"Title (optional)"),Id(),Yg(34,"input",16),UI(),ma(35,"mat-hint"),VC(36,"Factory generates a readable title if omitted."),Id()(),ma(37,"mat-form-field",9)(38,"mat-label"),VC(39,"Ticket / Issue (optional)"),Id(),Yg(40,"input",17),UI(),Id(),ma(41,"mat-form-field",15)(42,"mat-label"),VC(43,"What would you like to do? (optional)"),Id(),Yg(44,"textarea",18),UI(),ci(45,We,2,0,"mat-error"),ma(46,"mat-hint",19),VC(47," Describe your objective, even briefly. The agent will ask for any clarifications needed. "),Id()(),ma(48,"div",20)(49,"button",21)(50,"mat-icon"),VC(51),Id(),VC(52),Id(),ma(53,"a",22),VC(54,"Cancel"),Id()()()()),o&2){let b,x,f,v,C;ri(7),ui((b=n.successMessage())?7:-1,b),ri(),ui((x=n.errorMessage())?8:-1,x),ri(),ui((f=n.definitionsError())?9:-1,f),ri(),ui((v=n.launchTargetsError())?10:-1,v),ri(),Zg("formGroup",n.form),ri(4),$I(),ri(),tC(n.definitions()),ri(2),ui(n.form.controls.definitionKey.hasError("required")?18:-1),ri(2),hy(n.definitionsLoading()?"Loading definitions\u2026":n.definitions().length?"Choose an exact version. No automatic latest selection.":"No workflow version is available."),ri(4),$I(),ri(),tC(n.namespaces()),ri(2),ui(n.form.controls.namespaceId.hasError("required")?27:-1),ri(),ui((C=n.selectedNamespace())?28:n.launchTargetsLoading()?29:!n.launchTargetsError()&&n.namespaces().length===0?30:-1,C),ri(6),$I(),ri(6),$I(),ri(4),$I(),ri(),ui(n.form.controls.initialRequest.hasError("maxlength")?45:-1),ri(4),Zg("disabled",n.submitting()||n.definitionsLoading()||!!n.definitionsError()||n.definitions().length===0||n.form.invalid||n.launchTargetsLoading()||!!n.launchTargetsError()||n.namespaces().length===0),ri(2),hy(n.submitting()?"hourglass_top":"play_arrow"),ri(),Sd(" ",n.submitting()?"Launching\u2026":"Launch run"," ");}},dependencies:[Wn,Bn,Xe,kn,Tn,qt,fn,cn,Nt,HW,UW,Pt,It,Me,Se$1,_i,Y8,Z8,Be,Pe$1,Wr,Hr,ce$1],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px;max-width:900px}.page-head[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:12px}.titles[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px}h1[_ngcontent-%COMP%]{margin:0;font-family:var(--font-heading);font-size:28px;font-weight:600;letter-spacing:-.01em}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.launch-form[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px;padding:24px}.field[_ngcontent-%COMP%]{width:100%}.field--wide[_ngcontent-%COMP%]{grid-column:1/-1}.form-actions[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;gap:10px;padding-top:8px}@media(max-width:720px){.launch-form[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}"]})};export{Se as LaunchPageComponent,Ke as formatLaunchError};
@@ -1 +1 @@
1
- import {h,ar as vb,Q as Qe,av as yr,aD as A,at as ke,d5 as ut,az as M}from'./main-YM5YA3UI.js';function g(r){if(Array.isArray(r))return r;let e=typeof r=="object"&&r!==null?r:{};if(Array.isArray(e.items))return e.items;if(Array.isArray(e.data))return e.data;let i=typeof e.data=="object"&&e.data!==null?e.data:{};return Array.isArray(i.items)?i.items:[]}var c=class r{api=h(vb);definitions=Qe([]);loading=Qe(false);error=Qe(null);uploading=Qe(false);deletingKey=Qe(null);load(){this.loading.set(true),this.error.set(null),this.api.getWorkflowDefinitions().pipe(yr(()=>this.loading.set(false))).subscribe({next:e=>this.definitions.set(g(e)),error:e=>{this.definitions.set([]),this.error.set(e);}});}upload(e){return this.uploading.set(true),this.error.set(null),this.api.uploadWorkflowDefinition(e).pipe(A(()=>{}),ke(i=>(this.error.set(i),ut(()=>i))),yr(()=>this.uploading.set(false)))}delete(e,i){let p=`${e}@${i}`;return this.deletingKey.set(p),this.error.set(null),this.api.deleteWorkflowDefinition(e,i).pipe(A(()=>{}),ke(l=>(this.error.set(l),ut(()=>l))),yr(()=>this.deletingKey.set(null)))}static \u0275fac=function(i){return new(i||r)};static \u0275prov=M({token:r,factory:r.\u0275fac})};export{c,g};
1
+ import {h,ar as vb,Q as Qe,av as yr,aD as A,at as ke,d5 as ut,az as M}from'./main-T4S6RIJZ.js';function g(r){if(Array.isArray(r))return r;let e=typeof r=="object"&&r!==null?r:{};if(Array.isArray(e.items))return e.items;if(Array.isArray(e.data))return e.data;let i=typeof e.data=="object"&&e.data!==null?e.data:{};return Array.isArray(i.items)?i.items:[]}var c=class r{api=h(vb);definitions=Qe([]);loading=Qe(false);error=Qe(null);uploading=Qe(false);deletingKey=Qe(null);load(){this.loading.set(true),this.error.set(null),this.api.getWorkflowDefinitions().pipe(yr(()=>this.loading.set(false))).subscribe({next:e=>this.definitions.set(g(e)),error:e=>{this.definitions.set([]),this.error.set(e);}});}upload(e){return this.uploading.set(true),this.error.set(null),this.api.uploadWorkflowDefinition(e).pipe(A(()=>{}),ke(i=>(this.error.set(i),ut(()=>i))),yr(()=>this.uploading.set(false)))}delete(e,i){let p=`${e}@${i}`;return this.deletingKey.set(p),this.error.set(null),this.api.deleteWorkflowDefinition(e,i).pipe(A(()=>{}),ke(l=>(this.error.set(l),ut(()=>l))),yr(()=>this.deletingKey.set(null)))}static \u0275fac=function(i){return new(i||r)};static \u0275prov=M({token:r,factory:r.\u0275fac})};export{c,g};
@@ -1 +1 @@
1
- import {ab as Ue,h,Q as Qe,d4 as g,q as lT,b2 as Er,b0 as k}from'./main-YM5YA3UI.js';function U(n){n||(n=h(Ue));let e=new k(t=>{if(n.destroyed){t.next();return}return n.onDestroy(t.next.bind(t))});return t=>t.pipe(Er(e))}function T(n,e){let d=!e?.manualCleanup?e?.injector?.get(Ue)??h(Ue):null,l=p(e?.equal),o;e?.requireSync?o=Qe({kind:0},{equal:l}):o=Qe({kind:1,value:e?.initialValue},{equal:l});let i,b=n.subscribe({next:r=>o.set({kind:1,value:r}),error:r=>{o.set({kind:2,error:r}),i?.();},complete:()=>{i?.();}});if(e?.requireSync&&o().kind===0)throw new g(601,false);return i=d?.onDestroy(b.unsubscribe.bind(b)),lT(()=>{let r=o();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new g(601,false)}},{equal:e?.equal})}function p(n=Object.is){return (e,t)=>e.kind===1&&t.kind===1&&n(e.value,t.value)}export{T,U};
1
+ import {ab as Ue,h,Q as Qe,d4 as g,q as lT,b2 as Er,b0 as k}from'./main-T4S6RIJZ.js';function U(n){n||(n=h(Ue));let e=new k(t=>{if(n.destroyed){t.next();return}return n.onDestroy(t.next.bind(t))});return t=>t.pipe(Er(e))}function T(n,e){let d=!e?.manualCleanup?e?.injector?.get(Ue)??h(Ue):null,l=p(e?.equal),o;e?.requireSync?o=Qe({kind:0},{equal:l}):o=Qe({kind:1,value:e?.initialValue},{equal:l});let i,b=n.subscribe({next:r=>o.set({kind:1,value:r}),error:r=>{o.set({kind:2,error:r}),i?.();},complete:()=>{i?.();}});if(e?.requireSync&&o().kind===0)throw new g(601,false);return i=d?.onDestroy(b.unsubscribe.bind(b)),lT(()=>{let r=o();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new g(601,false)}},{equal:e?.equal})}function p(n=Object.is){return (e,t)=>e.kind===1&&t.kind===1&&n(e.value,t.value)}export{T,U};
@@ -1,4 +1,4 @@
1
- import {h,l as ln$1,Q as Qe$1,q as lT,aL as P,ae as I,aN as mU,bA as wt,y as yb,$ as $s,x as xe,N as Nt,H as HW,U as UW,bB as zM,P as Pt,I as It,M as Me$1,S as Se$1,bC as bi,Y as Y8,Z as Z8,bD as Bi$1,bE as U,bF as le,bG as Ai$1,bH as ai,W as Wr,a as Hr,c as ce,o as ot$1,m as ma$1,V as VC,b as Id,e as ey,g as Yg,d as eC,f as ci,bI as wd,by as $g,bJ as Cd,i as eT,r as ri,j as Zg,a8 as Sd,t as tC,u as ui,k as hy,n as oT,aU as KC,aq as Ey,bK as _t$1,bL as se,aS as iy,aT as vC,ar as vb,av as yr,aw as XW,az as M,bM as dt$1,aY as Cn$1,b1 as Z,bN as Pv,bO as Jb,au as qe,aC as Ec,aD as A,bP as po,b7 as Oe,bQ as _t$2,X as y$1,ba as rt$1,br as ya$1,bb as wt$1,L as he,R as ce$1,b3 as mb,T as no,bR as Vt,bS as Ac,b2 as Er,bT as pm,bU as Kr,_ as sr,bV as dn$1,a0 as ot$2,bW as fn$1,bc as R,bx as Xg,s as ir,G as It$1,bd as ny,be as gC,bf as yC,b4 as Ly,bh as uf,bg as ue,bX as N3,bi as so,bj as Ht,bk as pb,bY as Qg,O as Oy,aM as cy,A as pC,J as QC,bo as bC,b5 as iM,bZ as Qn$1,aZ as Nc,b_ as hf,bw as Bd,bv as Es,b$ as fU,aX as j,c0 as Df,c1 as O,b6 as mf,c2 as fb,c3 as K,c4 as tc,a5 as di,bp as ry,bs as rh,aP as Bt,c5 as Fy,c6 as De,c7 as A$1,c8 as Pe$1,bl as ka$1,c9 as ut$1,ca as hn$1,cb as Re$1,cc as Z$1,cd as Qb,ce as eD,cf as Kb,cg as Yb,ch as Yr,ci as Wr$1,cj as pn$1,ck as Zl}from'./main-YM5YA3UI.js';import {B as Be,P as Pe}from'./chunk-CnKPyIQK.js';import {y}from'./chunk-DzdTqKLn.js';var Li=["*",[["mat-chip-avatar"],["","matChipAvatar",""]],[["mat-chip-trailing-icon"],["","matChipRemove",""],["","matChipTrailingIcon",""]]],zi=["*","mat-chip-avatar, [matChipAvatar]","mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"];function vn(i,a){i&1&&(ma$1(0,"span",3),ot$2(1,1),Id());}function yn(i,a){i&1&&(ma$1(0,"span",6),ot$2(1,2),Id());}function bn(i,a){i&1&&(ma$1(0,"span",3),ot$2(1,1),ma$1(2,"span",7),rh(),ma$1(3,"svg",8),Yg(4,"path",9),Id()()());}function wn(i,a){i&1&&(ma$1(0,"span",6),ot$2(1,2),Id());}var Cn=`.mdc-evolution-chip,
1
+ import {h,p as pn$1,Q as Qe$1,q as lT,aL as P,ae as I,aN as mU,bA as wt,y as yb,$ as $s,x as xe,N as Nt,H as HW,U as UW,bB as zM,P as Pt,I as It,M as Me$1,S as Se$1,bC as bi,Y as Y8,Z as Z8,bD as Bi$1,bE as U,bF as le,bG as Ai$1,bH as ai,W as Wr,a as Hr,c as ce,o as ot$1,m as ma$1,V as VC,b as Id,e as ey,g as Yg,d as eC,f as ci,bI as wd,by as $g,bJ as Cd,i as eT,r as ri,j as Zg,a8 as Sd,t as tC,u as ui,k as hy,l as oT,aU as KC,aq as Ey,bK as _t$1,bL as se,aS as iy,aT as vC,ar as vb,av as yr,aw as XW,az as M,bM as dt$1,aY as Cn$1,b1 as Z,bN as Pv,bO as Jb,au as qe,aC as Ec,aD as A,bP as po,b7 as Oe,bQ as _t$2,X as y$1,ba as rt$1,br as ya$1,bb as wt$1,L as he,R as ce$1,b3 as mb,T as no,bR as Vt,bS as Ac,b2 as Er,bT as pm,bU as Kr,_ as sr,bV as dn$1,a0 as ot$2,bW as fn$1,bc as R,bx as Xg,s as ir,G as It$1,bd as ny,be as gC,bf as yC,b4 as Ly,bh as uf,bg as ue,bX as N3,bi as so,bj as Ht,bk as pb,bY as Qg,O as Oy,aM as cy,A as pC,J as QC,bo as bC,b5 as iM,bZ as Qn$1,aZ as Nc,b_ as hf,bw as Bd,bv as Es,b$ as fU,aX as j,c0 as Df,c1 as O,b6 as mf,c2 as fb,c3 as K,c4 as tc,a5 as di,bp as ry,bs as rh,aP as Bt,c5 as Fy,c6 as De,c7 as A$1,c8 as Pe$1,bl as ka$1,c9 as ut$1,ca as bn$1,cb as Re$1,cc as Z$1,cd as Qb,ce as eD,cf as Kb,cg as Yb,ch as Yr,ci as Wr$1,cj as pn$2,ck as Zl}from'./main-T4S6RIJZ.js';import {B as Be,P as Pe}from'./chunk-C4tkfNSW.js';import {y}from'./chunk-DtYNvLBh.js';var Li=["*",[["mat-chip-avatar"],["","matChipAvatar",""]],[["mat-chip-trailing-icon"],["","matChipRemove",""],["","matChipTrailingIcon",""]]],zi=["*","mat-chip-avatar, [matChipAvatar]","mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"];function vn(i,a){i&1&&(ma$1(0,"span",3),ot$2(1,1),Id());}function yn(i,a){i&1&&(ma$1(0,"span",6),ot$2(1,2),Id());}function bn(i,a){i&1&&(ma$1(0,"span",3),ot$2(1,1),ma$1(2,"span",7),rh(),ma$1(3,"svg",8),Yg(4,"path",9),Id()()());}function wn(i,a){i&1&&(ma$1(0,"span",6),ot$2(1,2),Id());}var Cn=`.mdc-evolution-chip,
2
2
  .mdc-evolution-chip__cell,
3
3
  .mdc-evolution-chip__action {
4
4
  display: inline-flex;
@@ -1230,10 +1230,10 @@ input.mat-mdc-chip-input {
1230
1230
  margin-left: 0;
1231
1231
  margin-right: 0;
1232
1232
  }
1233
- `],encapsulation:2})}return i})(),nt=class{source;value;constructor(a,e){this.source=a,this.value=e;}},xn={provide:R,useExisting:Es(()=>ct),multi:true},ct=(()=>{class i extends kn{_onTouched=()=>{};_onChange=()=>{};_defaultRole="listbox";_defaultOptions=h(ot,{optional:true});get multiple(){return this._multiple}set multiple(e){this._multiple=e,this._syncListboxProperties();}_multiple=false;get selected(){let e=this._chips.toArray().filter(t=>t.selected);return this.multiple?e:e[0]}ariaOrientation="horizontal";get selectable(){return this._selectable}set selectable(e){this._selectable=e,this._syncListboxProperties();}_selectable=true;compareWith=(e,t)=>e===t;required=false;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncListboxProperties();}_hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??false;get chipSelectionChanges(){return this._getChipStream(e=>e.selectionChange)}get chipBlurChanges(){return this._getChipStream(e=>e._onBlur)}get value(){return this._value}set value(e){this._chips&&this._chips.length&&this._setSelectionByValue(e,false),this._value=e;}_value;change=new Oe;_chips=void 0;ngAfterContentInit(){this._chips.changes.pipe(Ac(null),Er(this._destroyed)).subscribe(()=>{this.value!==void 0&&Promise.resolve().then(()=>{this._setSelectionByValue(this.value,false);}),this._syncListboxProperties();}),this.chipBlurChanges.pipe(Er(this._destroyed)).subscribe(()=>this._blur()),this.chipSelectionChanges.pipe(Er(this._destroyed)).subscribe(e=>{this.multiple||this._chips.forEach(t=>{t!==e.source&&t._setSelectedState(false,false,false);}),e.isUserInput&&this._propagateChanges();});}focus(){if(this.disabled)return;let e=this._getFirstSelectedChip();e&&!e.disabled?e.focus():this._chips.length>0?this._keyManager.setFirstItemActive():this._elementRef.nativeElement.focus();}writeValue(e){e!=null?this.value=e:this.value=void 0;}registerOnChange(e){this._onChange=e;}registerOnTouched(e){this._onTouched=e;}setDisabledState(e){this.disabled=e;}_setSelectionByValue(e,t=true){this._clearSelection(),Array.isArray(e)?e.forEach(n=>this._selectValue(n,t)):this._selectValue(e,t);}_blur(){this.disabled||setTimeout(()=>{this.focused||this._markAsTouched();});}_keydown(e){e.keyCode===9&&super._allowFocusEscape();}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck();}_propagateChanges(){let e=null;Array.isArray(this.selected)?e=this.selected.map(t=>t.value):e=this.selected?this.selected.value:void 0,this._value=e,this.change.emit(new nt(this,e)),this._onChange(e),this._changeDetectorRef.markForCheck();}_clearSelection(e){this._chips.forEach(t=>{t!==e&&t.deselect();});}_selectValue(e,t){let n=this._chips.find(o=>o.value!=null&&this.compareWith(o.value,e));return n&&(t?n.selectViaInteraction():n.select()),n}_syncListboxProperties(){this._chips&&Promise.resolve().then(()=>{this._chips.forEach(e=>{e._chipListMultiple=this.multiple,e.chipListSelectable=this._selectable,e._chipListHideSingleSelectionIndicator=this.hideSingleSelectionIndicator,e._changeDetectorRef.markForCheck();});});}_getFirstSelectedChip(){return Array.isArray(this.selected)?this.selected.length?this.selected[0]:void 0:this.selected}_skipPredicate(e){return false}static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275cmp=xe({type:i,selectors:[["mat-chip-listbox"]],contentQueries:function(t,n,o){if(t&1&&ny(o,st,5),t&2){let r;gC(r=yC())&&(n._chips=r);}},hostAttrs:[1,"mdc-evolution-chip-set","mat-mdc-chip-listbox"],hostVars:10,hostBindings:function(t,n){t&1&&ey("focus",function(){return n.focus()})("blur",function(){return n._blur()})("keydown",function(r){return n._keydown(r)}),t&2&&(Xg("tabIndex",n.disabled||n.empty?-1:n.tabIndex),ir("role",n.role)("aria-required",n.role?n.required:null)("aria-disabled",n.disabled.toString())("aria-multiselectable",n.multiple)("aria-orientation",n.ariaOrientation),It$1("mat-mdc-chip-list-disabled",n.disabled)("mat-mdc-chip-list-required",n.required));},inputs:{multiple:[2,"multiple","multiple",wt$1],ariaOrientation:[0,"aria-orientation","ariaOrientation"],selectable:[2,"selectable","selectable",wt$1],compareWith:"compareWith",required:[2,"required","required",wt$1],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",wt$1],value:"value"},outputs:{change:"change"},features:[Ey([xn]),Kr],ngContentSelectors:ji,decls:2,vars:0,consts:[["role","presentation",1,"mdc-evolution-chip-set__chips"]],template:function(t,n){t&1&&(sr(),dn$1(0,"div",0),ot$2(1),fn$1());},styles:[Dn],encapsulation:2})}return i})();var Qi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=he({type:i});static \u0275inj=ce$1({providers:[Vt,{provide:ot,useValue:{separatorKeyCodes:[13]}}],imports:[mb,no]})}return i})();var Rn=[[["caption"]],[["colgroup"],["col"]],"*"],Mn=["caption","colgroup, col","*"];function In(i,a){i&1&&ot$2(0,2);}function En(i,a){i&1&&(ma$1(0,"thead",0),Qg(1,1),Id(),ma$1(2,"tbody",0),Qg(3,2)(4,3),Id(),ma$1(5,"tfoot",0),Qg(6,4),Id());}function Fn(i,a){i&1&&Qg(0,1)(1,2)(2,3)(3,4);}var G=new y$1("CDK_TABLE");var $e=(()=>{class i{template=h(Wr$1);static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","cdkCellDef",""]]})}return i})(),Ge=(()=>{class i{template=h(Wr$1);static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","cdkHeaderCellDef",""]]})}return i})(),Gi=(()=>{class i{template=h(Wr$1);static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","cdkFooterCellDef",""]]})}return i})(),oe=(()=>{class i{_table=h(G,{optional:true});_hasStickyChanged=false;get name(){return this._name}set name(e){this._setNameInput(e);}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=true);}_sticky=false;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=true);}_stickyEnd=false;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=false;}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`];}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName());}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,n,o){if(t&1&&ny(o,$e,5)(o,Ge,5)(o,Gi,5),t&2){let r;gC(r=yC())&&(n.cell=r.first),gC(r=yC())&&(n.headerCell=r.first),gC(r=yC())&&(n.footerCell=r.first);}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",wt$1],stickyEnd:[2,"stickyEnd","stickyEnd",wt$1]}})}return i})(),Ue=class{constructor(a,e){e.nativeElement.classList.add(...a._columnCssClassName);}},Ki=(()=>{class i extends Ue{constructor(){super(h(oe),h(ue));}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[Kr]})}return i})();var Wi=(()=>{class i extends Ue{constructor(){let e=h(oe),t=h(ue);super(e,t);let n=e._table?._getCellRole();n&&t.nativeElement.setAttribute("role",n);}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[Kr]})}return i})();var dt=(()=>{class i{template=h(Wr$1);_differs=h(Fy);columns;_columnsDiffer;ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t);}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof Re?e.headerCell.template:this instanceof ht?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,features:[ya$1]})}return i})(),Re=(()=>{class i extends dt{_table=h(G,{optional:true});_hasStickyChanged=false;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=true);}_sticky=false;ngOnChanges(e){super.ngOnChanges(e);}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=false;}static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",wt$1]},features:[Kr,ya$1]})}return i})(),ht=(()=>{class i extends dt{_table=h(G,{optional:true});_hasStickyChanged=false;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=true);}_sticky=false;ngOnChanges(e){super.ngOnChanges(e);}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=false;}static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",wt$1]},features:[Kr,ya$1]})}return i})(),Ke=(()=>{class i extends dt{_table=h(G,{optional:true});when;static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[Kr]})}return i})(),de=(()=>{class i{_viewContainer=h(Yr);cells;context;static mostRecentCellOutlet=null;constructor(){i.mostRecentCellOutlet=this;}ngOnDestroy(){i.mostRecentCellOutlet===this&&(i.mostRecentCellOutlet=null);}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","cdkCellOutlet",""]]})}return i})(),mt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xe({type:i,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&Qg(0,0);},dependencies:[de],encapsulation:2,changeDetection:1})}return i})();var pt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xe({type:i,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&Qg(0,0);},dependencies:[de],encapsulation:2,changeDetection:1})}return i})(),We=(()=>{class i{templateRef=h(Wr$1);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["ng-template","cdkNoDataRow",""]]})}return i})(),Ui=["top","bottom","left","right"],lt=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(a=>this._updateCachedSizes(a)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=false;constructor(a,e,t=true,n=true,o,r,d){this._isNativeHtmlTable=a,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=n,this.direction=o,this._positionListener=r,this._tableInjector=d,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`};}clearStickyPositioning(a,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(a);let t=[];for(let n of a)n.nodeType===n.ELEMENT_NODE&&t.push(n,...Array.from(n.children));Zl({write:()=>{for(let n of t)this._removeStickyStyle(n,e);}},{injector:this._tableInjector});}updateStickyColumns(a,e,t,n=true,o=true){if(!a.length||!this._isBrowser||!(e.some(V=>V)||t.some(V=>V))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let r=a[0],d=r.children.length,p=this.direction==="rtl",f=p?"right":"left",g=p?"left":"right",R=e.lastIndexOf(true),I=t.indexOf(true),E,yt,bt;o&&this._updateStickyColumnReplayQueue({rows:[...a],stickyStartStates:[...e],stickyEndStates:[...t]}),Zl({earlyRead:()=>{E=this._getCellWidths(r,n),yt=this._getStickyStartColumnPositions(E,e),bt=this._getStickyEndColumnPositions(E,t);},write:()=>{for(let V of a)for(let B=0;B<d;B++){let wt=V.children[B];e[B]&&this._addStickyStyle(wt,f,yt[B],B===R),t[B]&&this._addStickyStyle(wt,g,bt[B],B===I);}this._positionListener&&E.some(V=>!!V)&&(this._positionListener.stickyColumnsUpdated({sizes:R===-1?[]:E.slice(0,R+1).map((V,B)=>e[B]?V:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:I===-1?[]:E.slice(I).map((V,B)=>t[B+I]?V:null).reverse()}));}},{injector:this._tableInjector});}stickRows(a,e,t){if(!this._isBrowser)return;let n=t==="bottom"?a.slice().reverse():a,o=t==="bottom"?e.slice().reverse():e,r=[],d=[],p=[];Zl({earlyRead:()=>{for(let f=0,g=0;f<n.length;f++){if(!o[f])continue;r[f]=g;let R=n[f];p[f]=this._isNativeHtmlTable?Array.from(R.children):[R];let I=this._retrieveElementSize(R).height;g+=I,d[f]=I;}},write:()=>{let f=o.lastIndexOf(true);for(let g=0;g<n.length;g++){if(!o[g])continue;let R=r[g],I=g===f;for(let E of p[g])this._addStickyStyle(E,t,R,I);}t==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:d,offsets:r,elements:p}):this._positionListener?.stickyFooterRowsUpdated({sizes:d,offsets:r,elements:p});}},{injector:this._tableInjector});}updateStickyFooterContainer(a,e){this._isNativeHtmlTable&&Zl({write:()=>{let t=a.querySelector("tfoot");t&&(e.some(n=>!n)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,false));}},{injector:this._tableInjector});}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=true;}_removeStickyStyle(a,e){if(!a.classList.contains(this._stickCellCss))return;for(let n of e)a.style[n]="",a.classList.remove(this._borderCellCss[n]);Ui.some(n=>e.indexOf(n)===-1&&a.style[n])?a.style.zIndex=this._getCalculatedZIndex(a):(a.style.zIndex="",this._needsPositionStickyOnElement&&(a.style.position=""),a.classList.remove(this._stickCellCss));}_addStickyStyle(a,e,t,n){a.classList.add(this._stickCellCss),n&&a.classList.add(this._borderCellCss[e]),a.style[e]=`${t}px`,a.style.zIndex=this._getCalculatedZIndex(a),this._needsPositionStickyOnElement&&(a.style.cssText+="position: -webkit-sticky; position: sticky; ");}_getCalculatedZIndex(a){let e={top:100,bottom:10,left:1,right:1},t=0;for(let n of Ui)a.style[n]&&(t+=e[n]);return t?`${t}`:""}_getCellWidths(a,e=true){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],n=a.children;for(let o=0;o<n.length;o++){let r=n[o];t.push(this._retrieveElementSize(r).width);}return this._cachedCellWidths=t,t}_getStickyStartColumnPositions(a,e){let t=[],n=0;for(let o=0;o<a.length;o++)e[o]&&(t[o]=n,n+=a[o]);return t}_getStickyEndColumnPositions(a,e){let t=[],n=0;for(let o=a.length;o>0;o--)e[o]&&(t[o]=n,n+=a[o]);return t}_retrieveElementSize(a){let e=this._elemSizeCache.get(a);if(e)return e;let t=a.getBoundingClientRect(),n={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(a,n),this._resizeObserver.observe(a,{box:"border-box"})),n}_updateStickyColumnReplayQueue(a){this._removeFromStickyColumnReplayQueue(a.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(a);}_removeFromStickyColumnReplayQueue(a){let e=new Set(a);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(n=>!e.has(n));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length);}_updateCachedSizes(a){let e=false;for(let t of a){let n=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};n.width!==this._elemSizeCache.get(t.target)?.width&&Tn(t.target)&&(e=true),this._elemSizeCache.set(t.target,n);}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,true,false);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null;}},0));}};function Tn(i){return ["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(a=>i.classList.contains(a))}var Se=new y$1("STICKY_POSITIONING_LISTENER");var ut=(()=>{class i{viewContainer=h(Yr);elementRef=h(ue);constructor(){let e=h(G);e._rowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","rowOutlet",""]]})}return i})(),ft=(()=>{class i{viewContainer=h(Yr);elementRef=h(ue);constructor(){let e=h(G);e._headerRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","headerRowOutlet",""]]})}return i})(),_t=(()=>{class i{viewContainer=h(Yr);elementRef=h(ue);constructor(){let e=h(G);e._footerRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","footerRowOutlet",""]]})}return i})(),gt=(()=>{class i{viewContainer=h(Yr);elementRef=h(ue);constructor(){let e=h(G);e._noDataRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","noDataRowOutlet",""]]})}return i})(),vt=(()=>{class i{_differs=h(Fy);_changeDetectorRef=h(Ly);_elementRef=h(ue);_dir=h(iM,{optional:true});_platform=h(De);_viewRepeater;_viewportRuler=h(A$1);_injector=h(K);_virtualScrollViewport=h(Pe$1,{optional:true,host:true});_positionListener=h(Se,{optional:true})||h(Se,{optional:true,skipSelf:true});_document=h(O);_data;_renderedRange;_onDestroy=new Z;_renderRows;_renderChangeSubscription=null;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef=null;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow=null;_headerRowDefChanged=true;_footerRowDefChanged=true;_stickyColumnStylesNeedReset=true;_forceRecalculateCellWidths=true;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=true;_isServer;_isShowingNoDataRow=false;_hasAllOutlets=false;_hasInitialized=false;_headerRowStickyUpdates=new Z;_footerRowStickyUpdates=new Z;_disableVirtualScrolling=false;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e;}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&(this._switchDataSource(e),this._changeDetectorRef.markForCheck());}_dataSource;_dataSourceChanges=new Z;_dataStream=new Z;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles());}_multiTemplateDataRows=false;get fixedLayout(){return this._virtualScrollEnabled()?true:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=true,this._stickyColumnStylesNeedReset=true;}_fixedLayout=false;recycleRows=false;contentChanged=new Oe;viewChange=new Cn$1({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;get renderedRows(){return this._renderRows}constructor(){h(new ka$1("role"),{optional:true})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((t,n)=>this.trackBy?this.trackBy(n.dataIndex,n.data):n);}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(Er(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=true;});}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new ut$1:new hn$1,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=true;}ngAfterContentChecked(){this._canRender()&&this._render();}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear();}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._headerRowStickyUpdates.complete(),this._footerRowStickyUpdates.complete(),this._onDestroy.next(),this._onDestroy.complete(),Re$1(this.dataSource)&&this.dataSource.disconnect(this);}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(n,o,r)=>this._getEmbeddedViewArgs(n.item,r),n=>n.item.data,n=>{n.operation===Z$1.INSERTED&&n.context&&this._renderCellTemplateForItem(n.record.item.rowDef,n.context);}),this._updateRowIndexContext(),e.forEachIdentityChange(n=>{let o=t.get(n.currentIndex);o.context.$implicit=n.item.data;}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles();}addColumnDef(e){this._customColumnDefs.add(e);}removeColumnDef(e){this._customColumnDefs.delete(e);}addRowDef(e){this._customRowDefs.add(e);}removeRowDef(e){this._customRowDefs.delete(e);}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=true;}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=true;}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=true;}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=true;}setNoDataRow(e){this._customNoDataRow=e;}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let n=$i(this._headerRowOutlet,"thead");n&&(n.style.display=e.length?"":"none");}let t=this._headerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(n=>n.resetStickyChanged());}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let n=$i(this._footerRowOutlet,"tfoot");n&&(n.style.display=e.length?"":"none");}let t=this._footerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(n=>n.resetStickyChanged());}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),n=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...n],["left","right"]),this._stickyColumnStylesNeedReset=false),e.forEach((o,r)=>{this._addStickyColumnStyles([o],this._headerRowDefs[r]);}),this._rowDefs.forEach(o=>{let r=[];for(let d=0;d<t.length;d++)this._renderRows[d].rowDef===o&&r.push(t[d]);this._addStickyColumnStyles(r,o);}),n.forEach((o,r)=>{this._addStickyColumnStyles([o],this._footerRowDefs[r]);}),Array.from(this._columnDefsByName.values()).forEach(o=>o.resetStickyChanged());}stickyColumnsUpdated(e){this._positionListener?.stickyColumnsUpdated(e);}stickyEndColumnsUpdated(e){this._positionListener?.stickyEndColumnsUpdated(e);}stickyHeaderRowsUpdated(e){this._headerRowStickyUpdates.next(e),this._positionListener?.stickyHeaderRowsUpdated(e);}stickyFooterRowsUpdated(e){this._footerRowStickyUpdates.next(e),this._positionListener?.stickyFooterRowsUpdated(e);}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=true,this._canRender()&&this._render());}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=false),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=false),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates();}_getAllRenderRows(){if(!Array.isArray(this._data)||!this._renderedRange)return [];let e=[],t=Math.min(this._data.length,this._renderedRange.end),n=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let o=this._renderedRange.start;o<t;o++){let r=this._data[o],d=this._getRenderRowsForData(r,o,n.get(r));this._cachedRenderRowsMap.has(r)||this._cachedRenderRowsMap.set(r,new WeakMap);for(let p=0;p<d.length;p++){let f=d[p],g=this._cachedRenderRowsMap.get(f.data);g.has(f.rowDef)?g.get(f.rowDef).push(f):g.set(f.rowDef,[f]),e.push(f);}}return e}_getRenderRowsForData(e,t,n){return this._getRowDefs(e,t).map(r=>{let d=n&&n.has(r)?n.get(r):[];if(d.length){let p=d.shift();return p.dataIndex=t,p}else return {data:e,rowDef:r,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),Qe(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t);});}_cacheRowDefs(){this._headerRowDefs=Qe(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=Qe(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=Qe(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0];}_renderUpdatedColumns(){let e=(r,d)=>{let p=!!d.getColumnsDiff();return r||p},t=this._rowDefs.reduce(e,false);t&&this._forceRenderDataRows();let n=this._headerRowDefs.reduce(e,false);n&&this._forceRenderHeaderRows();let o=this._footerRowDefs.reduce(e,false);return o&&this._forceRenderFooterRows(),t||n||o}_switchDataSource(e){this._data=[],Re$1(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e;}_observeRenderChanges(){if(!this.dataSource)return;let e;Re$1(this.dataSource)?e=this.dataSource.connect(this):Qb(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=qe(this.dataSource)),this._renderChangeSubscription=Ec([e,this.viewChange]).pipe(Er(this._onDestroy)).subscribe(([t,n])=>{this._data=t||[],this._renderedRange=n,this._dataStream.next(t),this.renderRows();});}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles();}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles();}_addStickyColumnStyles(e,t){let n=Array.from(t?.columns||[]).map(d=>{let p=this._columnDefsByName.get(d);return p}),o=n.map(d=>d.sticky),r=n.map(d=>d.stickyEnd);this._stickyStyler.updateStickyColumns(e,o,r,!this.fixedLayout||this._forceRecalculateCellWidths);}_getRenderedRows(e){let t=[];for(let n=0;n<e.viewContainer.length;n++){let o=e.viewContainer.get(n);t.push(o.rootNodes[0]);}return t}_getRowDefs(e,t){if(this._rowDefs.length===1)return [this._rowDefs[0]];let n=[];if(this.multiTemplateDataRows)n=this._rowDefs.filter(o=>!o.when||o.when(t,e));else {let o=this._rowDefs.find(r=>r.when&&r.when(t,e))||this._defaultRowDef;o&&n.push(o);}return n.length,n}_getEmbeddedViewArgs(e,t){let n=e.rowDef,o={$implicit:e.data};return {templateRef:n.template,context:o,index:t}}_renderRow(e,t,n,o={}){let r=e.viewContainer.createEmbeddedView(t.template,o,n);return this._renderCellTemplateForItem(t,o),r}_renderCellTemplateForItem(e,t){for(let n of this._getCellTemplates(e))de.mostRecentCellOutlet&&de.mostRecentCellOutlet._viewContainer.createEmbeddedView(n,t);this._changeDetectorRef.markForCheck();}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,n=e.length;t<n;t++){let r=e.get(t).context;r.count=n,r.first=t===0,r.last=t===n-1,r.even=t%2===0,r.odd=!r.even,this.multiTemplateDataRows?(r.dataIndex=this._renderRows[t].dataIndex,r.renderIndex=t):r.index=this._renderRows[t].dataIndex;}}_getCellTemplates(e){return !e||!e.columns?[]:Array.from(e.columns,t=>{let n=this._columnDefsByName.get(t);return e.extractCellTemplate(n)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows();}_checkStickyStates(){let e=(t,n)=>t||n.hasStickyChanged();this._headerRowDefs.reduce(e,false)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,false)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,false)&&(this._stickyColumnStylesNeedReset=true,this.updateStickyColumnStyles());}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",t=this._injector;this._stickyStyler=new lt(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:qe()).pipe(Er(this._onDestroy)).subscribe(n=>{this._stickyStyler.direction=n,this.updateStickyColumnStyles();});}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?Kb:Yb;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(eD(0,t),Er(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(n,o)=>this._measureRangeSize(n,o)}),Ec([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(Er(this._onDestroy)).subscribe(([n,o])=>{if(!(!o.sizes||!o.offsets||!o.elements))for(let r=0;r<o.elements.length;r++){let d=o.elements[r];if(d){let p=o.offsets[r],f=n!==0?Math.max(n-p,p):-p;for(let g of d)g.style.top=`${-f}px`;}}}),Ec([e.renderedContentOffset,this._footerRowStickyUpdates]).pipe(Er(this._onDestroy)).subscribe(([n,o])=>{if(!(!o.sizes||!o.offsets||!o.elements))for(let r=0;r<o.elements.length;r++){let d=o.elements[r];if(d)for(let p of d)p.style.bottom=`${n+o.offsets[r]}px`;}});}_getOwnDefs(e){return e.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let n=this._noDataRowOutlet.viewContainer;if(t){let o=n.createEmbeddedView(e.templateRef),r=o.rootNodes[0];if(o.rootNodes.length===1&&r?.nodeType===this._document.ELEMENT_NODE){r.setAttribute("role","row"),r.classList.add(...e._contentClassNames);let d=r.querySelectorAll(e._cellSelector);for(let p=0;p<d.length;p++)d[p].classList.add(...e._cellClassNames);}}else n.clear();this._isShowingNoDataRow=t,this._changeDetectorRef.markForCheck();}_measureRangeSize(e,t){if(e.start>=e.end||t!=="vertical")return 0;let n=this.viewChange.value,o=this._rowOutlet.viewContainer;e.start<n.start||e.end>n.end;let r=e.start-n.start,d=e.end-e.start,p,f;for(let I=0;I<d;I++){let E=o.get(I+r);if(E&&E.rootNodes.length){p=f=E.rootNodes[0];break}}for(let I=d-1;I>-1;I--){let E=o.get(I+r);if(E&&E.rootNodes.length){f=E.rootNodes[E.rootNodes.length-1];break}}let g=p?.getBoundingClientRect?.(),R=f?.getBoundingClientRect?.();return g&&R?R.bottom-g.top:0}_virtualScrollEnabled(){return !this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xe({type:i,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,n,o){if(t&1&&ny(o,We,5)(o,oe,5)(o,Ke,5)(o,Re,5)(o,ht,5),t&2){let r;gC(r=yC())&&(n._noDataRow=r.first),gC(r=yC())&&(n._contentColumnDefs=r),gC(r=yC())&&(n._contentRowDefs=r),gC(r=yC())&&(n._contentHeaderRowDefs=r),gC(r=yC())&&(n._contentFooterRowDefs=r);}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,n){t&2&&It$1("cdk-table-fixed-layout",n.fixedLayout);},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",wt$1],fixedLayout:[2,"fixedLayout","fixedLayout",wt$1],recycleRows:[2,"recycleRows","recycleRows",wt$1]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[Ey([{provide:G,useExisting:i},{provide:Se,useValue:null}])],ngContentSelectors:Mn,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,n){t&1&&(sr(Rn),ot$2(0),ot$2(1,1),ci(2,In,1,0),ci(3,En,7,0)(4,Fn,4,0)),t&2&&(ri(2),ui(n._isServer?2:-1),ri(),ui(n._isNativeHtmlTable?3:4));},dependencies:[ft,ut,gt,_t],styles:[`.cdk-table-fixed-layout {
1233
+ `],encapsulation:2})}return i})(),nt=class{source;value;constructor(a,e){this.source=a,this.value=e;}},xn={provide:R,useExisting:Es(()=>ct),multi:true},ct=(()=>{class i extends kn{_onTouched=()=>{};_onChange=()=>{};_defaultRole="listbox";_defaultOptions=h(ot,{optional:true});get multiple(){return this._multiple}set multiple(e){this._multiple=e,this._syncListboxProperties();}_multiple=false;get selected(){let e=this._chips.toArray().filter(t=>t.selected);return this.multiple?e:e[0]}ariaOrientation="horizontal";get selectable(){return this._selectable}set selectable(e){this._selectable=e,this._syncListboxProperties();}_selectable=true;compareWith=(e,t)=>e===t;required=false;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncListboxProperties();}_hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??false;get chipSelectionChanges(){return this._getChipStream(e=>e.selectionChange)}get chipBlurChanges(){return this._getChipStream(e=>e._onBlur)}get value(){return this._value}set value(e){this._chips&&this._chips.length&&this._setSelectionByValue(e,false),this._value=e;}_value;change=new Oe;_chips=void 0;ngAfterContentInit(){this._chips.changes.pipe(Ac(null),Er(this._destroyed)).subscribe(()=>{this.value!==void 0&&Promise.resolve().then(()=>{this._setSelectionByValue(this.value,false);}),this._syncListboxProperties();}),this.chipBlurChanges.pipe(Er(this._destroyed)).subscribe(()=>this._blur()),this.chipSelectionChanges.pipe(Er(this._destroyed)).subscribe(e=>{this.multiple||this._chips.forEach(t=>{t!==e.source&&t._setSelectedState(false,false,false);}),e.isUserInput&&this._propagateChanges();});}focus(){if(this.disabled)return;let e=this._getFirstSelectedChip();e&&!e.disabled?e.focus():this._chips.length>0?this._keyManager.setFirstItemActive():this._elementRef.nativeElement.focus();}writeValue(e){e!=null?this.value=e:this.value=void 0;}registerOnChange(e){this._onChange=e;}registerOnTouched(e){this._onTouched=e;}setDisabledState(e){this.disabled=e;}_setSelectionByValue(e,t=true){this._clearSelection(),Array.isArray(e)?e.forEach(n=>this._selectValue(n,t)):this._selectValue(e,t);}_blur(){this.disabled||setTimeout(()=>{this.focused||this._markAsTouched();});}_keydown(e){e.keyCode===9&&super._allowFocusEscape();}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck();}_propagateChanges(){let e=null;Array.isArray(this.selected)?e=this.selected.map(t=>t.value):e=this.selected?this.selected.value:void 0,this._value=e,this.change.emit(new nt(this,e)),this._onChange(e),this._changeDetectorRef.markForCheck();}_clearSelection(e){this._chips.forEach(t=>{t!==e&&t.deselect();});}_selectValue(e,t){let n=this._chips.find(o=>o.value!=null&&this.compareWith(o.value,e));return n&&(t?n.selectViaInteraction():n.select()),n}_syncListboxProperties(){this._chips&&Promise.resolve().then(()=>{this._chips.forEach(e=>{e._chipListMultiple=this.multiple,e.chipListSelectable=this._selectable,e._chipListHideSingleSelectionIndicator=this.hideSingleSelectionIndicator,e._changeDetectorRef.markForCheck();});});}_getFirstSelectedChip(){return Array.isArray(this.selected)?this.selected.length?this.selected[0]:void 0:this.selected}_skipPredicate(e){return false}static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275cmp=xe({type:i,selectors:[["mat-chip-listbox"]],contentQueries:function(t,n,o){if(t&1&&ny(o,st,5),t&2){let r;gC(r=yC())&&(n._chips=r);}},hostAttrs:[1,"mdc-evolution-chip-set","mat-mdc-chip-listbox"],hostVars:10,hostBindings:function(t,n){t&1&&ey("focus",function(){return n.focus()})("blur",function(){return n._blur()})("keydown",function(r){return n._keydown(r)}),t&2&&(Xg("tabIndex",n.disabled||n.empty?-1:n.tabIndex),ir("role",n.role)("aria-required",n.role?n.required:null)("aria-disabled",n.disabled.toString())("aria-multiselectable",n.multiple)("aria-orientation",n.ariaOrientation),It$1("mat-mdc-chip-list-disabled",n.disabled)("mat-mdc-chip-list-required",n.required));},inputs:{multiple:[2,"multiple","multiple",wt$1],ariaOrientation:[0,"aria-orientation","ariaOrientation"],selectable:[2,"selectable","selectable",wt$1],compareWith:"compareWith",required:[2,"required","required",wt$1],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",wt$1],value:"value"},outputs:{change:"change"},features:[Ey([xn]),Kr],ngContentSelectors:ji,decls:2,vars:0,consts:[["role","presentation",1,"mdc-evolution-chip-set__chips"]],template:function(t,n){t&1&&(sr(),dn$1(0,"div",0),ot$2(1),fn$1());},styles:[Dn],encapsulation:2})}return i})();var Qi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=he({type:i});static \u0275inj=ce$1({providers:[Vt,{provide:ot,useValue:{separatorKeyCodes:[13]}}],imports:[mb,no]})}return i})();var Rn=[[["caption"]],[["colgroup"],["col"]],"*"],Mn=["caption","colgroup, col","*"];function In(i,a){i&1&&ot$2(0,2);}function En(i,a){i&1&&(ma$1(0,"thead",0),Qg(1,1),Id(),ma$1(2,"tbody",0),Qg(3,2)(4,3),Id(),ma$1(5,"tfoot",0),Qg(6,4),Id());}function Fn(i,a){i&1&&Qg(0,1)(1,2)(2,3)(3,4);}var G=new y$1("CDK_TABLE");var $e=(()=>{class i{template=h(Wr$1);static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","cdkCellDef",""]]})}return i})(),Ge=(()=>{class i{template=h(Wr$1);static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","cdkHeaderCellDef",""]]})}return i})(),Gi=(()=>{class i{template=h(Wr$1);static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","cdkFooterCellDef",""]]})}return i})(),oe=(()=>{class i{_table=h(G,{optional:true});_hasStickyChanged=false;get name(){return this._name}set name(e){this._setNameInput(e);}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=true);}_sticky=false;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=true);}_stickyEnd=false;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=false;}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`];}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName());}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,n,o){if(t&1&&ny(o,$e,5)(o,Ge,5)(o,Gi,5),t&2){let r;gC(r=yC())&&(n.cell=r.first),gC(r=yC())&&(n.headerCell=r.first),gC(r=yC())&&(n.footerCell=r.first);}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",wt$1],stickyEnd:[2,"stickyEnd","stickyEnd",wt$1]}})}return i})(),Ue=class{constructor(a,e){e.nativeElement.classList.add(...a._columnCssClassName);}},Ki=(()=>{class i extends Ue{constructor(){super(h(oe),h(ue));}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[Kr]})}return i})();var Wi=(()=>{class i extends Ue{constructor(){let e=h(oe),t=h(ue);super(e,t);let n=e._table?._getCellRole();n&&t.nativeElement.setAttribute("role",n);}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[Kr]})}return i})();var dt=(()=>{class i{template=h(Wr$1);_differs=h(Fy);columns;_columnsDiffer;ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t);}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof Re?e.headerCell.template:this instanceof ht?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,features:[ya$1]})}return i})(),Re=(()=>{class i extends dt{_table=h(G,{optional:true});_hasStickyChanged=false;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=true);}_sticky=false;ngOnChanges(e){super.ngOnChanges(e);}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=false;}static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",wt$1]},features:[Kr,ya$1]})}return i})(),ht=(()=>{class i extends dt{_table=h(G,{optional:true});_hasStickyChanged=false;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=true);}_sticky=false;ngOnChanges(e){super.ngOnChanges(e);}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=false;}static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",wt$1]},features:[Kr,ya$1]})}return i})(),Ke=(()=>{class i extends dt{_table=h(G,{optional:true});when;static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[Kr]})}return i})(),de=(()=>{class i{_viewContainer=h(Yr);cells;context;static mostRecentCellOutlet=null;constructor(){i.mostRecentCellOutlet=this;}ngOnDestroy(){i.mostRecentCellOutlet===this&&(i.mostRecentCellOutlet=null);}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","cdkCellOutlet",""]]})}return i})(),mt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xe({type:i,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&Qg(0,0);},dependencies:[de],encapsulation:2,changeDetection:1})}return i})();var pt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xe({type:i,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&Qg(0,0);},dependencies:[de],encapsulation:2,changeDetection:1})}return i})(),We=(()=>{class i{templateRef=h(Wr$1);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["ng-template","cdkNoDataRow",""]]})}return i})(),Ui=["top","bottom","left","right"],lt=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(a=>this._updateCachedSizes(a)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=false;constructor(a,e,t=true,n=true,o,r,d){this._isNativeHtmlTable=a,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=n,this.direction=o,this._positionListener=r,this._tableInjector=d,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`};}clearStickyPositioning(a,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(a);let t=[];for(let n of a)n.nodeType===n.ELEMENT_NODE&&t.push(n,...Array.from(n.children));Zl({write:()=>{for(let n of t)this._removeStickyStyle(n,e);}},{injector:this._tableInjector});}updateStickyColumns(a,e,t,n=true,o=true){if(!a.length||!this._isBrowser||!(e.some(V=>V)||t.some(V=>V))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let r=a[0],d=r.children.length,p=this.direction==="rtl",f=p?"right":"left",g=p?"left":"right",R=e.lastIndexOf(true),I=t.indexOf(true),E,yt,bt;o&&this._updateStickyColumnReplayQueue({rows:[...a],stickyStartStates:[...e],stickyEndStates:[...t]}),Zl({earlyRead:()=>{E=this._getCellWidths(r,n),yt=this._getStickyStartColumnPositions(E,e),bt=this._getStickyEndColumnPositions(E,t);},write:()=>{for(let V of a)for(let B=0;B<d;B++){let wt=V.children[B];e[B]&&this._addStickyStyle(wt,f,yt[B],B===R),t[B]&&this._addStickyStyle(wt,g,bt[B],B===I);}this._positionListener&&E.some(V=>!!V)&&(this._positionListener.stickyColumnsUpdated({sizes:R===-1?[]:E.slice(0,R+1).map((V,B)=>e[B]?V:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:I===-1?[]:E.slice(I).map((V,B)=>t[B+I]?V:null).reverse()}));}},{injector:this._tableInjector});}stickRows(a,e,t){if(!this._isBrowser)return;let n=t==="bottom"?a.slice().reverse():a,o=t==="bottom"?e.slice().reverse():e,r=[],d=[],p=[];Zl({earlyRead:()=>{for(let f=0,g=0;f<n.length;f++){if(!o[f])continue;r[f]=g;let R=n[f];p[f]=this._isNativeHtmlTable?Array.from(R.children):[R];let I=this._retrieveElementSize(R).height;g+=I,d[f]=I;}},write:()=>{let f=o.lastIndexOf(true);for(let g=0;g<n.length;g++){if(!o[g])continue;let R=r[g],I=g===f;for(let E of p[g])this._addStickyStyle(E,t,R,I);}t==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:d,offsets:r,elements:p}):this._positionListener?.stickyFooterRowsUpdated({sizes:d,offsets:r,elements:p});}},{injector:this._tableInjector});}updateStickyFooterContainer(a,e){this._isNativeHtmlTable&&Zl({write:()=>{let t=a.querySelector("tfoot");t&&(e.some(n=>!n)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,false));}},{injector:this._tableInjector});}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=true;}_removeStickyStyle(a,e){if(!a.classList.contains(this._stickCellCss))return;for(let n of e)a.style[n]="",a.classList.remove(this._borderCellCss[n]);Ui.some(n=>e.indexOf(n)===-1&&a.style[n])?a.style.zIndex=this._getCalculatedZIndex(a):(a.style.zIndex="",this._needsPositionStickyOnElement&&(a.style.position=""),a.classList.remove(this._stickCellCss));}_addStickyStyle(a,e,t,n){a.classList.add(this._stickCellCss),n&&a.classList.add(this._borderCellCss[e]),a.style[e]=`${t}px`,a.style.zIndex=this._getCalculatedZIndex(a),this._needsPositionStickyOnElement&&(a.style.cssText+="position: -webkit-sticky; position: sticky; ");}_getCalculatedZIndex(a){let e={top:100,bottom:10,left:1,right:1},t=0;for(let n of Ui)a.style[n]&&(t+=e[n]);return t?`${t}`:""}_getCellWidths(a,e=true){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],n=a.children;for(let o=0;o<n.length;o++){let r=n[o];t.push(this._retrieveElementSize(r).width);}return this._cachedCellWidths=t,t}_getStickyStartColumnPositions(a,e){let t=[],n=0;for(let o=0;o<a.length;o++)e[o]&&(t[o]=n,n+=a[o]);return t}_getStickyEndColumnPositions(a,e){let t=[],n=0;for(let o=a.length;o>0;o--)e[o]&&(t[o]=n,n+=a[o]);return t}_retrieveElementSize(a){let e=this._elemSizeCache.get(a);if(e)return e;let t=a.getBoundingClientRect(),n={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(a,n),this._resizeObserver.observe(a,{box:"border-box"})),n}_updateStickyColumnReplayQueue(a){this._removeFromStickyColumnReplayQueue(a.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(a);}_removeFromStickyColumnReplayQueue(a){let e=new Set(a);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(n=>!e.has(n));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length);}_updateCachedSizes(a){let e=false;for(let t of a){let n=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};n.width!==this._elemSizeCache.get(t.target)?.width&&Tn(t.target)&&(e=true),this._elemSizeCache.set(t.target,n);}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,true,false);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null;}},0));}};function Tn(i){return ["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(a=>i.classList.contains(a))}var Se=new y$1("STICKY_POSITIONING_LISTENER");var ut=(()=>{class i{viewContainer=h(Yr);elementRef=h(ue);constructor(){let e=h(G);e._rowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","rowOutlet",""]]})}return i})(),ft=(()=>{class i{viewContainer=h(Yr);elementRef=h(ue);constructor(){let e=h(G);e._headerRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","headerRowOutlet",""]]})}return i})(),_t=(()=>{class i{viewContainer=h(Yr);elementRef=h(ue);constructor(){let e=h(G);e._footerRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","footerRowOutlet",""]]})}return i})(),gt=(()=>{class i{viewContainer=h(Yr);elementRef=h(ue);constructor(){let e=h(G);e._noDataRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["","noDataRowOutlet",""]]})}return i})(),vt=(()=>{class i{_differs=h(Fy);_changeDetectorRef=h(Ly);_elementRef=h(ue);_dir=h(iM,{optional:true});_platform=h(De);_viewRepeater;_viewportRuler=h(A$1);_injector=h(K);_virtualScrollViewport=h(Pe$1,{optional:true,host:true});_positionListener=h(Se,{optional:true})||h(Se,{optional:true,skipSelf:true});_document=h(O);_data;_renderedRange;_onDestroy=new Z;_renderRows;_renderChangeSubscription=null;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef=null;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow=null;_headerRowDefChanged=true;_footerRowDefChanged=true;_stickyColumnStylesNeedReset=true;_forceRecalculateCellWidths=true;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=true;_isServer;_isShowingNoDataRow=false;_hasAllOutlets=false;_hasInitialized=false;_headerRowStickyUpdates=new Z;_footerRowStickyUpdates=new Z;_disableVirtualScrolling=false;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e;}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&(this._switchDataSource(e),this._changeDetectorRef.markForCheck());}_dataSource;_dataSourceChanges=new Z;_dataStream=new Z;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles());}_multiTemplateDataRows=false;get fixedLayout(){return this._virtualScrollEnabled()?true:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=true,this._stickyColumnStylesNeedReset=true;}_fixedLayout=false;recycleRows=false;contentChanged=new Oe;viewChange=new Cn$1({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;get renderedRows(){return this._renderRows}constructor(){h(new ka$1("role"),{optional:true})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((t,n)=>this.trackBy?this.trackBy(n.dataIndex,n.data):n);}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(Er(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=true;});}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new ut$1:new bn$1,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=true;}ngAfterContentChecked(){this._canRender()&&this._render();}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear();}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._headerRowStickyUpdates.complete(),this._footerRowStickyUpdates.complete(),this._onDestroy.next(),this._onDestroy.complete(),Re$1(this.dataSource)&&this.dataSource.disconnect(this);}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(n,o,r)=>this._getEmbeddedViewArgs(n.item,r),n=>n.item.data,n=>{n.operation===Z$1.INSERTED&&n.context&&this._renderCellTemplateForItem(n.record.item.rowDef,n.context);}),this._updateRowIndexContext(),e.forEachIdentityChange(n=>{let o=t.get(n.currentIndex);o.context.$implicit=n.item.data;}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles();}addColumnDef(e){this._customColumnDefs.add(e);}removeColumnDef(e){this._customColumnDefs.delete(e);}addRowDef(e){this._customRowDefs.add(e);}removeRowDef(e){this._customRowDefs.delete(e);}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=true;}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=true;}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=true;}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=true;}setNoDataRow(e){this._customNoDataRow=e;}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let n=$i(this._headerRowOutlet,"thead");n&&(n.style.display=e.length?"":"none");}let t=this._headerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(n=>n.resetStickyChanged());}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let n=$i(this._footerRowOutlet,"tfoot");n&&(n.style.display=e.length?"":"none");}let t=this._footerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(n=>n.resetStickyChanged());}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),n=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...n],["left","right"]),this._stickyColumnStylesNeedReset=false),e.forEach((o,r)=>{this._addStickyColumnStyles([o],this._headerRowDefs[r]);}),this._rowDefs.forEach(o=>{let r=[];for(let d=0;d<t.length;d++)this._renderRows[d].rowDef===o&&r.push(t[d]);this._addStickyColumnStyles(r,o);}),n.forEach((o,r)=>{this._addStickyColumnStyles([o],this._footerRowDefs[r]);}),Array.from(this._columnDefsByName.values()).forEach(o=>o.resetStickyChanged());}stickyColumnsUpdated(e){this._positionListener?.stickyColumnsUpdated(e);}stickyEndColumnsUpdated(e){this._positionListener?.stickyEndColumnsUpdated(e);}stickyHeaderRowsUpdated(e){this._headerRowStickyUpdates.next(e),this._positionListener?.stickyHeaderRowsUpdated(e);}stickyFooterRowsUpdated(e){this._footerRowStickyUpdates.next(e),this._positionListener?.stickyFooterRowsUpdated(e);}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=true,this._canRender()&&this._render());}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=false),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=false),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates();}_getAllRenderRows(){if(!Array.isArray(this._data)||!this._renderedRange)return [];let e=[],t=Math.min(this._data.length,this._renderedRange.end),n=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let o=this._renderedRange.start;o<t;o++){let r=this._data[o],d=this._getRenderRowsForData(r,o,n.get(r));this._cachedRenderRowsMap.has(r)||this._cachedRenderRowsMap.set(r,new WeakMap);for(let p=0;p<d.length;p++){let f=d[p],g=this._cachedRenderRowsMap.get(f.data);g.has(f.rowDef)?g.get(f.rowDef).push(f):g.set(f.rowDef,[f]),e.push(f);}}return e}_getRenderRowsForData(e,t,n){return this._getRowDefs(e,t).map(r=>{let d=n&&n.has(r)?n.get(r):[];if(d.length){let p=d.shift();return p.dataIndex=t,p}else return {data:e,rowDef:r,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),Qe(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t);});}_cacheRowDefs(){this._headerRowDefs=Qe(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=Qe(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=Qe(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0];}_renderUpdatedColumns(){let e=(r,d)=>{let p=!!d.getColumnsDiff();return r||p},t=this._rowDefs.reduce(e,false);t&&this._forceRenderDataRows();let n=this._headerRowDefs.reduce(e,false);n&&this._forceRenderHeaderRows();let o=this._footerRowDefs.reduce(e,false);return o&&this._forceRenderFooterRows(),t||n||o}_switchDataSource(e){this._data=[],Re$1(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e;}_observeRenderChanges(){if(!this.dataSource)return;let e;Re$1(this.dataSource)?e=this.dataSource.connect(this):Qb(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=qe(this.dataSource)),this._renderChangeSubscription=Ec([e,this.viewChange]).pipe(Er(this._onDestroy)).subscribe(([t,n])=>{this._data=t||[],this._renderedRange=n,this._dataStream.next(t),this.renderRows();});}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles();}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles();}_addStickyColumnStyles(e,t){let n=Array.from(t?.columns||[]).map(d=>{let p=this._columnDefsByName.get(d);return p}),o=n.map(d=>d.sticky),r=n.map(d=>d.stickyEnd);this._stickyStyler.updateStickyColumns(e,o,r,!this.fixedLayout||this._forceRecalculateCellWidths);}_getRenderedRows(e){let t=[];for(let n=0;n<e.viewContainer.length;n++){let o=e.viewContainer.get(n);t.push(o.rootNodes[0]);}return t}_getRowDefs(e,t){if(this._rowDefs.length===1)return [this._rowDefs[0]];let n=[];if(this.multiTemplateDataRows)n=this._rowDefs.filter(o=>!o.when||o.when(t,e));else {let o=this._rowDefs.find(r=>r.when&&r.when(t,e))||this._defaultRowDef;o&&n.push(o);}return n.length,n}_getEmbeddedViewArgs(e,t){let n=e.rowDef,o={$implicit:e.data};return {templateRef:n.template,context:o,index:t}}_renderRow(e,t,n,o={}){let r=e.viewContainer.createEmbeddedView(t.template,o,n);return this._renderCellTemplateForItem(t,o),r}_renderCellTemplateForItem(e,t){for(let n of this._getCellTemplates(e))de.mostRecentCellOutlet&&de.mostRecentCellOutlet._viewContainer.createEmbeddedView(n,t);this._changeDetectorRef.markForCheck();}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,n=e.length;t<n;t++){let r=e.get(t).context;r.count=n,r.first=t===0,r.last=t===n-1,r.even=t%2===0,r.odd=!r.even,this.multiTemplateDataRows?(r.dataIndex=this._renderRows[t].dataIndex,r.renderIndex=t):r.index=this._renderRows[t].dataIndex;}}_getCellTemplates(e){return !e||!e.columns?[]:Array.from(e.columns,t=>{let n=this._columnDefsByName.get(t);return e.extractCellTemplate(n)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows();}_checkStickyStates(){let e=(t,n)=>t||n.hasStickyChanged();this._headerRowDefs.reduce(e,false)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,false)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,false)&&(this._stickyColumnStylesNeedReset=true,this.updateStickyColumnStyles());}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",t=this._injector;this._stickyStyler=new lt(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:qe()).pipe(Er(this._onDestroy)).subscribe(n=>{this._stickyStyler.direction=n,this.updateStickyColumnStyles();});}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?Kb:Yb;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(eD(0,t),Er(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(n,o)=>this._measureRangeSize(n,o)}),Ec([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(Er(this._onDestroy)).subscribe(([n,o])=>{if(!(!o.sizes||!o.offsets||!o.elements))for(let r=0;r<o.elements.length;r++){let d=o.elements[r];if(d){let p=o.offsets[r],f=n!==0?Math.max(n-p,p):-p;for(let g of d)g.style.top=`${-f}px`;}}}),Ec([e.renderedContentOffset,this._footerRowStickyUpdates]).pipe(Er(this._onDestroy)).subscribe(([n,o])=>{if(!(!o.sizes||!o.offsets||!o.elements))for(let r=0;r<o.elements.length;r++){let d=o.elements[r];if(d)for(let p of d)p.style.bottom=`${n+o.offsets[r]}px`;}});}_getOwnDefs(e){return e.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let n=this._noDataRowOutlet.viewContainer;if(t){let o=n.createEmbeddedView(e.templateRef),r=o.rootNodes[0];if(o.rootNodes.length===1&&r?.nodeType===this._document.ELEMENT_NODE){r.setAttribute("role","row"),r.classList.add(...e._contentClassNames);let d=r.querySelectorAll(e._cellSelector);for(let p=0;p<d.length;p++)d[p].classList.add(...e._cellClassNames);}}else n.clear();this._isShowingNoDataRow=t,this._changeDetectorRef.markForCheck();}_measureRangeSize(e,t){if(e.start>=e.end||t!=="vertical")return 0;let n=this.viewChange.value,o=this._rowOutlet.viewContainer;e.start<n.start||e.end>n.end;let r=e.start-n.start,d=e.end-e.start,p,f;for(let I=0;I<d;I++){let E=o.get(I+r);if(E&&E.rootNodes.length){p=f=E.rootNodes[0];break}}for(let I=d-1;I>-1;I--){let E=o.get(I+r);if(E&&E.rootNodes.length){f=E.rootNodes[E.rootNodes.length-1];break}}let g=p?.getBoundingClientRect?.(),R=f?.getBoundingClientRect?.();return g&&R?R.bottom-g.top:0}_virtualScrollEnabled(){return !this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xe({type:i,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,n,o){if(t&1&&ny(o,We,5)(o,oe,5)(o,Ke,5)(o,Re,5)(o,ht,5),t&2){let r;gC(r=yC())&&(n._noDataRow=r.first),gC(r=yC())&&(n._contentColumnDefs=r),gC(r=yC())&&(n._contentRowDefs=r),gC(r=yC())&&(n._contentHeaderRowDefs=r),gC(r=yC())&&(n._contentFooterRowDefs=r);}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,n){t&2&&It$1("cdk-table-fixed-layout",n.fixedLayout);},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",wt$1],fixedLayout:[2,"fixedLayout","fixedLayout",wt$1],recycleRows:[2,"recycleRows","recycleRows",wt$1]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[Ey([{provide:G,useExisting:i},{provide:Se,useValue:null}])],ngContentSelectors:Mn,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,n){t&1&&(sr(Rn),ot$2(0),ot$2(1,1),ci(2,In,1,0),ci(3,En,7,0)(4,Fn,4,0)),t&2&&(ri(2),ui(n._isServer?2:-1),ri(),ui(n._isNativeHtmlTable?3:4));},dependencies:[ft,ut,gt,_t],styles:[`.cdk-table-fixed-layout {
1234
1234
  table-layout: fixed;
1235
1235
  }
1236
- `],encapsulation:2,changeDetection:1})}return i})();function Qe(i,a){return i.concat(Array.from(a))}function $i(i,a){let e=a.toUpperCase(),t=i.viewContainer.element.nativeElement;for(;t;){let n=t.nodeType===1?t.nodeName:null;if(n===e)return t;if(n==="TABLE")break;t=t.parentNode;}return null}var Zi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=he({type:i});static \u0275inj=ce$1({imports:[Bt]})}return i})();var On=["*",[["","matSortHeaderIcon",""]]],Pn=["*","[matSortHeaderIcon]"];function An(i,a){i&1&&(rh(),dn$1(0,"svg",3),pn$1(1,"path",4),fn$1());}function Nn(i,a){i&1&&(dn$1(0,"div",2),ot$2(1,1,null,An,2,0),fn$1());}var Yi=new y$1("MAT_SORT_DEFAULT_OPTIONS"),be=(()=>{class i{_defaultOptions;_initializedStream=new po(1);sortables=new Map;_stateChanges=new Z;active;start="asc";get direction(){return this._direction}set direction(e){this._direction=e;}_direction="";disableClear;disabled=false;sortChange=new Oe;initialized=this._initializedStream;constructor(e){this._defaultOptions=e;}register(e){this.sortables.set(e.id,e);}deregister(e){this.sortables.delete(e.id);}sort(e){this.active!=e.id?(this.active=e.id,this.direction=e.start?e.start:this.start):this.direction=this.getNextSortDirection(e),this.sortChange.emit({active:this.active,direction:this.direction});}getNextSortDirection(e){if(!e)return "";let t=e?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear,n=Hn(e.start||this.start,t),o=n.indexOf(this.direction)+1;return o>=n.length&&(o=0),n[o]}ngOnInit(){this._initializedStream.next();}ngOnChanges(){this._stateChanges.next();}ngOnDestroy(){this._stateChanges.complete(),this._initializedStream.complete();}static \u0275fac=function(t){return new(t||i)(_t$2(Yi,8))};static \u0275dir=rt$1({type:i,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{active:[0,"matSortActive","active"],start:[0,"matSortStart","start"],direction:[0,"matSortDirection","direction"],disableClear:[2,"matSortDisableClear","disableClear",wt$1],disabled:[2,"matSortDisabled","disabled",wt$1]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[ya$1]})}return i})();function Hn(i,a){let e=["asc","desc"];return i=="desc"&&e.reverse(),a||e.push(""),e}var Xi=(()=>{class i{_sort=h(be,{optional:true});_columnDef=h(oe,{optional:true});_changeDetectorRef=h(Ly);_focusMonitor=h(uf);_elementRef=h(ue);_ariaDescriber=h(N3,{optional:true});_renderChanges;_animationsDisabled=so();_recentlyCleared=Qe$1(null);_sortButton;id;arrowPosition="after";start;disabled=false;get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(e){this._updateSortActionDescription(e);}_sortActionDescription="Sort";disableClear;constructor(){h(Ht).load(pb);let e=h(Yi,{optional:true});this._sort,e?.arrowPosition&&(this.arrowPosition=e?.arrowPosition);}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._sort.register(this),this._renderChanges=Jb(this._sort._stateChanges,this._sort.sortChange).subscribe(()=>this._changeDetectorRef.markForCheck()),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription);}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,true).subscribe(()=>{Promise.resolve().then(()=>this._recentlyCleared.set(null));});}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._renderChanges?.unsubscribe(),this._sortButton&&this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription);}_toggleOnInteraction(){if(!this._isDisabled()){let e=this._isSorted(),t=this._sort.direction;this._sort.sort(this),this._recentlyCleared.set(e&&!this._isSorted()?t:null);}}_handleKeydown(e){(e.keyCode===32||e.keyCode===13)&&(e.preventDefault(),this._toggleOnInteraction());}_isSorted(){return this._sort.active==this.id&&(this._sort.direction==="asc"||this._sort.direction==="desc")}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?this._sort.direction=="asc"?"ascending":"descending":"none"}_renderArrow(){return !this._isDisabled()||this._isSorted()}_updateSortActionDescription(e){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,e)),this._sortActionDescription=e;}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xe({type:i,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(t,n){t&1&&ey("click",function(){return n._toggleOnInteraction()})("keydown",function(r){return n._handleKeydown(r)})("mouseleave",function(){return n._recentlyCleared.set(null)}),t&2&&(ir("aria-sort",n._getAriaSortAttribute()),It$1("mat-sort-header-disabled",n._isDisabled()));},inputs:{id:[0,"mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",disabled:[2,"disabled","disabled",wt$1],sortActionDescription:"sortActionDescription",disableClear:[2,"disableClear","disableClear",wt$1]},exportAs:["matSortHeader"],ngContentSelectors:Pn,decls:4,vars:17,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],[1,"mat-sort-header-arrow"],["viewBox","0 -960 960 960","focusable","false","aria-hidden","true"],["d","M440-240v-368L296-464l-56-56 240-240 240 240-56 56-144-144v368h-80Z"]],template:function(t,n){t&1&&(sr(On),dn$1(0,"div",0)(1,"div",1),ot$2(2),fn$1(),ci(3,Nn,3,0,"div",2),fn$1()),t&2&&(It$1("mat-sort-header-sorted",n._isSorted())("mat-sort-header-position-before",n.arrowPosition==="before")("mat-sort-header-descending",n._sort.direction==="desc")("mat-sort-header-ascending",n._sort.direction==="asc")("mat-sort-header-recently-cleared-ascending",n._recentlyCleared()==="asc")("mat-sort-header-recently-cleared-descending",n._recentlyCleared()==="desc")("mat-sort-header-animations-disabled",n._animationsDisabled),ir("tabindex",n._isDisabled()?null:0)("role",n._isDisabled()?null:"button"),ri(3),ui(n._renderArrow()?3:-1));},styles:[`.mat-sort-header {
1236
+ `],encapsulation:2,changeDetection:1})}return i})();function Qe(i,a){return i.concat(Array.from(a))}function $i(i,a){let e=a.toUpperCase(),t=i.viewContainer.element.nativeElement;for(;t;){let n=t.nodeType===1?t.nodeName:null;if(n===e)return t;if(n==="TABLE")break;t=t.parentNode;}return null}var Zi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=he({type:i});static \u0275inj=ce$1({imports:[Bt]})}return i})();var On=["*",[["","matSortHeaderIcon",""]]],Pn=["*","[matSortHeaderIcon]"];function An(i,a){i&1&&(rh(),dn$1(0,"svg",3),pn$2(1,"path",4),fn$1());}function Nn(i,a){i&1&&(dn$1(0,"div",2),ot$2(1,1,null,An,2,0),fn$1());}var Yi=new y$1("MAT_SORT_DEFAULT_OPTIONS"),be=(()=>{class i{_defaultOptions;_initializedStream=new po(1);sortables=new Map;_stateChanges=new Z;active;start="asc";get direction(){return this._direction}set direction(e){this._direction=e;}_direction="";disableClear;disabled=false;sortChange=new Oe;initialized=this._initializedStream;constructor(e){this._defaultOptions=e;}register(e){this.sortables.set(e.id,e);}deregister(e){this.sortables.delete(e.id);}sort(e){this.active!=e.id?(this.active=e.id,this.direction=e.start?e.start:this.start):this.direction=this.getNextSortDirection(e),this.sortChange.emit({active:this.active,direction:this.direction});}getNextSortDirection(e){if(!e)return "";let t=e?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear,n=Hn(e.start||this.start,t),o=n.indexOf(this.direction)+1;return o>=n.length&&(o=0),n[o]}ngOnInit(){this._initializedStream.next();}ngOnChanges(){this._stateChanges.next();}ngOnDestroy(){this._stateChanges.complete(),this._initializedStream.complete();}static \u0275fac=function(t){return new(t||i)(_t$2(Yi,8))};static \u0275dir=rt$1({type:i,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{active:[0,"matSortActive","active"],start:[0,"matSortStart","start"],direction:[0,"matSortDirection","direction"],disableClear:[2,"matSortDisableClear","disableClear",wt$1],disabled:[2,"matSortDisabled","disabled",wt$1]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[ya$1]})}return i})();function Hn(i,a){let e=["asc","desc"];return i=="desc"&&e.reverse(),a||e.push(""),e}var Xi=(()=>{class i{_sort=h(be,{optional:true});_columnDef=h(oe,{optional:true});_changeDetectorRef=h(Ly);_focusMonitor=h(uf);_elementRef=h(ue);_ariaDescriber=h(N3,{optional:true});_renderChanges;_animationsDisabled=so();_recentlyCleared=Qe$1(null);_sortButton;id;arrowPosition="after";start;disabled=false;get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(e){this._updateSortActionDescription(e);}_sortActionDescription="Sort";disableClear;constructor(){h(Ht).load(pb);let e=h(Yi,{optional:true});this._sort,e?.arrowPosition&&(this.arrowPosition=e?.arrowPosition);}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._sort.register(this),this._renderChanges=Jb(this._sort._stateChanges,this._sort.sortChange).subscribe(()=>this._changeDetectorRef.markForCheck()),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription);}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,true).subscribe(()=>{Promise.resolve().then(()=>this._recentlyCleared.set(null));});}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._renderChanges?.unsubscribe(),this._sortButton&&this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription);}_toggleOnInteraction(){if(!this._isDisabled()){let e=this._isSorted(),t=this._sort.direction;this._sort.sort(this),this._recentlyCleared.set(e&&!this._isSorted()?t:null);}}_handleKeydown(e){(e.keyCode===32||e.keyCode===13)&&(e.preventDefault(),this._toggleOnInteraction());}_isSorted(){return this._sort.active==this.id&&(this._sort.direction==="asc"||this._sort.direction==="desc")}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?this._sort.direction=="asc"?"ascending":"descending":"none"}_renderArrow(){return !this._isDisabled()||this._isSorted()}_updateSortActionDescription(e){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,e)),this._sortActionDescription=e;}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xe({type:i,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(t,n){t&1&&ey("click",function(){return n._toggleOnInteraction()})("keydown",function(r){return n._handleKeydown(r)})("mouseleave",function(){return n._recentlyCleared.set(null)}),t&2&&(ir("aria-sort",n._getAriaSortAttribute()),It$1("mat-sort-header-disabled",n._isDisabled()));},inputs:{id:[0,"mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",disabled:[2,"disabled","disabled",wt$1],sortActionDescription:"sortActionDescription",disableClear:[2,"disableClear","disableClear",wt$1]},exportAs:["matSortHeader"],ngContentSelectors:Pn,decls:4,vars:17,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],[1,"mat-sort-header-arrow"],["viewBox","0 -960 960 960","focusable","false","aria-hidden","true"],["d","M440-240v-368L296-464l-56-56 240-240 240 240-56 56-144-144v368h-80Z"]],template:function(t,n){t&1&&(sr(On),dn$1(0,"div",0)(1,"div",1),ot$2(2),fn$1(),ci(3,Nn,3,0,"div",2),fn$1()),t&2&&(It$1("mat-sort-header-sorted",n._isSorted())("mat-sort-header-position-before",n.arrowPosition==="before")("mat-sort-header-descending",n._sort.direction==="desc")("mat-sort-header-ascending",n._sort.direction==="asc")("mat-sort-header-recently-cleared-ascending",n._recentlyCleared()==="asc")("mat-sort-header-recently-cleared-descending",n._recentlyCleared()==="desc")("mat-sort-header-animations-disabled",n._animationsDisabled),ir("tabindex",n._isDisabled()?null:0)("role",n._isDisabled()?null:"button"),ri(3),ui(n._renderArrow()?3:-1));},styles:[`.mat-sort-header {
1237
1237
  cursor: pointer;
1238
1238
  }
1239
1239
 
@@ -1509,5 +1509,5 @@ mat-cell.mat-mdc-cell,
1509
1509
  mat-footer-cell.mat-mdc-footer-cell {
1510
1510
  align-self: stretch;
1511
1511
  }
1512
- `],encapsulation:2,changeDetection:1})}return i})(),tn=(()=>{class i extends $e{static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["","matCellDef",""]],features:[Ey([{provide:$e,useExisting:i}]),Kr]})}return i})(),nn=(()=>{class i extends Ge{static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["","matHeaderCellDef",""]],features:[Ey([{provide:Ge,useExisting:i}]),Kr]})}return i})();var an=(()=>{class i extends oe{get name(){return this._name}set name(e){this._setNameInput(e);}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`);}static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[Ey([{provide:oe,useExisting:i}]),Kr]})}return i})(),on=(()=>{class i extends Ki{static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[Kr]})}return i})();var rn=(()=>{class i extends Wi{static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[Kr]})}return i})();var sn=(()=>{class i extends Re{static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",wt$1]},features:[Ey([{provide:Re,useExisting:i}]),Kr]})}return i})();var cn=(()=>{class i extends Ke{static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[Ey([{provide:Ke,useExisting:i}]),Kr]})}return i})(),ln=(()=>{class i extends mt{static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275cmp=xe({type:i,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[Ey([{provide:mt,useExisting:i}]),Kr],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&Qg(0,0);},dependencies:[de],encapsulation:2,changeDetection:1})}return i})();var dn=(()=>{class i extends pt{static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275cmp=xe({type:i,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[Ey([{provide:pt,useExisting:i}]),Kr],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&Qg(0,0);},dependencies:[de],encapsulation:2,changeDetection:1})}return i})(),hn=(()=>{class i extends We{_cellSelector="td, mat-cell, [mat-cell], .mat-cell";constructor(){super(),this._contentClassNames.push("mat-mdc-no-data-row","mat-mdc-row","mdc-data-table__row"),this._cellClassNames.push("mat-mdc-cell","mdc-data-table__cell","mat-no-data-cell");}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["ng-template","matNoDataRow",""]],features:[Ey([{provide:We,useExisting:i}]),Kr]})}return i})();var mn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=he({type:i});static \u0275inj=ce$1({imports:[Zi,no]})}return i})(),Qn=9007199254740991,Ze=class extends dt$1{_data;_renderData=new Cn$1([]);_filter=new Cn$1("");_internalPageChanges=new Z;_renderChangesSubscription=null;filteredData;get data(){return this._data.value}set data(a){a=Array.isArray(a)?a:[],this._data.next(a),this._renderChangesSubscription||this._filterData(a);}get filter(){return this._filter.value}set filter(a){this._filter.next(a),this._renderChangesSubscription||this._filterData(this.data);}get sort(){return this._sort}set sort(a){this._sort=a,this._updateChangeSubscription();}_sort;get paginator(){return this._paginator}set paginator(a){this._paginator=a,this._updateChangeSubscription();}_paginator;sortingDataAccessor=(a,e)=>{let t=a[e];if(Pv(t)){let n=Number(t);return n<Qn?n:t}return t};sortData=(a,e)=>{let t=e.active,n=e.direction;return !t||n==""?a:a.sort((o,r)=>{let d=this.sortingDataAccessor(o,t),p=this.sortingDataAccessor(r,t),f=typeof d,g=typeof p;f!==g&&(f==="number"&&(d+=""),g==="number"&&(p+=""));let R=0;return d!=null&&p!=null?d>p?R=1:d<p&&(R=-1):d!=null?R=1:p!=null&&(R=-1),R*(n=="asc"?1:-1)})};filterPredicate=(a,e)=>{let t=e.trim().toLowerCase();return Object.values(a).some(n=>`${n}`.toLowerCase().includes(t))};constructor(a=[]){super(),this._data=new Cn$1(a),this._updateChangeSubscription();}_updateChangeSubscription(){let a=this._sort?Jb(this._sort.sortChange,this._sort.initialized):qe(null),e=this._paginator?Jb(this._paginator.page,this._internalPageChanges,this._paginator.initialized):qe(null),t=this._data,n=Ec([t,this._filter]).pipe(A(([d])=>this._filterData(d))),o=Ec([n,a]).pipe(A(([d])=>this._orderData(d))),r=Ec([o,e]).pipe(A(([d])=>this._pageData(d)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=r.subscribe(d=>this._renderData.next(d));}_filterData(a){return this.filteredData=this.filter==null||this.filter===""?a:a.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(a){return this.sort?this.sortData(a.slice(),this.sort):a}_pageData(a){if(!this.paginator)return a;let e=this.paginator.pageIndex*this.paginator.pageSize;return a.slice(e,e+this.paginator.pageSize)}_updatePaginator(a){Promise.resolve().then(()=>{let e=this.paginator;if(e&&(e.length=a,e.pageIndex>0)){let t=Math.ceil(e.length/e.pageSize)-1||0,n=Math.min(e.pageIndex,t);n!==e.pageIndex&&(e.pageIndex=n,this._internalPageChanges.next());}});}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null;}};var Me=class i{api=h(vb);namespaces=Qe$1([]);loading=Qe$1(false);error=Qe$1(null);loadNamespaces(){this.loading.set(true),this.error.set(null),this.api.getNamespaces().pipe(yr(()=>this.loading.set(false))).subscribe({next:a=>this.namespaces.set(XW(a)),error:a=>{this.namespaces.set([]),this.error.set(a);}});}static \u0275fac=function(e){return new(e||i)};static \u0275prov=M({token:i,factory:i.\u0275fac})};var pn=(i,a)=>a.key;function Gn(i,a){if(i&1&&pn$1(0,"span",3),i&2){let e=a.$implicit;di("seg--"+e.tone),cy("flex-grow",e.ratio),It$1("running",e.status==="running")("skipped",e.status==="skipped");}}function Kn(i,a){i&1&&VC(0," \xB7 ");}function Wn(i,a){if(i&1&&(dn$1(0,"span"),VC(1),fn$1(),ci(2,Kn,1,0)),i&2){let e=a.$implicit,t=a.$index,n=a.$count;It$1("current",e.status==="running"),ri(),hy(e.key),ri(),ui(t!==n-1?2:-1);}}function Zn(i,a){if(i&1&&(dn$1(0,"span",2),eC(1,Wn,3,4,null,null,pn),fn$1()),i&2){let e=pC();ri(),tC(e.phases());}}var Ye=class i{phases=Oy.required();height=Oy(8);showLegend=Oy(true);ariaLabel=lT(()=>"Phases: "+this.phases().map(a=>a.status==="running"?`${a.key} running`:a.status==="waiting_human"?`${a.key} waiting for human`:a.status==="failed"?`${a.key} failed`:a.status==="indeterminate"?`${a.key} indeterminate`:a.status==="cancelled"?`${a.key} cancelled`:a.status==="pending"?`${a.key} waiting`:a.status==="skipped"?`${a.key} skipped, not executed`:`${a.key} completed`).join(", "));static \u0275fac=function(e){return new(e||i)};static \u0275cmp=xe({type:i,selectors:[["sf-phase-bar"]],inputs:{phases:[1,"phases"],height:[1,"height"],showLegend:[1,"showLegend"]},decls:4,vars:4,consts:[["role","img",1,"bar"],[1,"seg",3,"class","running","skipped","flex-grow"],[1,"legend"],[1,"seg"]],template:function(e,t){e&1&&(dn$1(0,"div",0),eC(1,Gn,1,8,"span",1,pn),fn$1(),ci(3,Zn,3,0,"span",2)),e&2&&(cy("height",t.height(),"px"),ir("aria-label",t.ariaLabel()),ri(),tC(t.phases()),ri(2),ui(t.showLegend()?3:-1));},styles:["[_nghost-%COMP%]{display:flex;align-items:center;gap:12px}.bar[_ngcontent-%COMP%]{flex:1;display:flex;gap:3px}.seg[_ngcontent-%COMP%]{min-width:4px;border-radius:var(--radius-sm, 0)}.seg--amber[_ngcontent-%COMP%]{background:var(--color-warning)}.seg--violet[_ngcontent-%COMP%]{background:var(--color-accent-700)}.seg--green[_ngcontent-%COMP%]{background:var(--color-success)}.seg--cyan[_ngcontent-%COMP%]{background:var(--color-accent)}.seg.running[_ngcontent-%COMP%]{background:repeating-linear-gradient(135deg,var(--color-accent) 0 6px,var(--color-accent-700) 6px 12px)}.seg.skipped[_ngcontent-%COMP%]{background:var(--sf-outline-strong);opacity:.55}.legend[_ngcontent-%COMP%]{font-family:var(--sf-mono);font-size:12px;color:var(--sf-text-muted);white-space:nowrap}.legend[_ngcontent-%COMP%] .current[_ngcontent-%COMP%]{color:var(--color-accent-700)}"]})};var Yn=()=>[10,25,50],fn=i=>["/sessions",i],_n=i=>({namespaceId:i}),Xn=(i,a)=>a.id,Jn=(i,a)=>a.name;function ea(i,a){if(i&1&&(ma$1(0,"mat-option",18),VC(1),Id()),i&2){let e=a.$implicit;Zg("value",e.id),ri(),hy(e.name);}}function ta(i,a){i&1&&(ma$1(0,"mat-hint"),VC(1,"Loading\u2026"),Id());}function ia(i,a){if(i&1&&(ma$1(0,"mat-hint",19),VC(1),Id()),i&2){let e=pC();ri(),hy(e.namespacesError());}}function na(i,a){i&1&&(ma$1(0,"th",50),VC(1,"Run"),Id());}function aa(i,a){if(i&1&&(ma$1(0,"td",51)(1,"a",52),VC(2),Id(),ma$1(3,"span",53),VC(4),Id()()),i&2){let e=a.$implicit;ri(),Zg("routerLink",QC(4,fn,e.id))("queryParams",QC(6,_n,e.namespaceId)),ri(),hy(e.title),ri(2),hy(e.id);}}function oa(i,a){i&1&&(ma$1(0,"th",54),VC(1,"Namespace"),Id());}function ra(i,a){if(i&1&&(ma$1(0,"td",55),VC(1),Id()),i&2){let e=a.$implicit;ri(),hy(e.namespaceId??"\u2014");}}function sa(i,a){i&1&&(ma$1(0,"th",54),VC(1,"Project \u203A branch"),Id());}function ca(i,a){if(i&1&&VC(0),i&2){let e=pC().$implicit;Sd(" \u203A ",e.branch," ");}}function la(i,a){if(i&1&&(ma$1(0,"td",55),VC(1),ci(2,ca,1,1),Id()),i&2){let e=a.$implicit;It$1("cyan",e.branch),ri(),Sd(" ",e.project," "),ri(),ui(e.branch?2:-1);}}function da(i,a){i&1&&(ma$1(0,"th",50),VC(1,"Status"),Id());}function ha(i,a){i&1&&(ma$1(0,"sf-status-chip",56),VC(1,"completed / stopped"),Id());}function ma(i,a){i&1&&(ma$1(0,"sf-status-chip",57),VC(1,"in progress"),Id());}function pa(i,a){if(i&1&&(ma$1(0,"td",51),ci(1,ha,2,0,"sf-status-chip",56)(2,ma,2,0,"sf-status-chip",57),Id()),i&2){let e=a.$implicit;ri(),ui(e.status==="destroyed"?1:2);}}function ua(i,a){i&1&&(ma$1(0,"th",54),VC(1,"Phases"),Id());}function fa(i,a){if(i&1&&Yg(0,"sf-phase-bar",58),i&2){let e=pC().$implicit;Zg("phases",e.phases)("height",6)("showLegend",false);}}function _a(i,a){i&1&&(ma$1(0,"span",4),VC(1,"\u2014"),Id());}function ga(i,a){if(i&1&&(ma$1(0,"td",51),ci(1,fa,1,3,"sf-phase-bar",58)(2,_a,2,0,"span",4),Id()),i&2){let e=a.$implicit;ri(),ui(e.phases.length?1:2);}}function va(i,a){i&1&&(ma$1(0,"th",59),VC(1,"Cost"),Id());}function ya(i,a){if(i&1&&(ma$1(0,"td",60),VC(1),eT(2,"usd"),Id()),i&2){let e=a.$implicit;It$1("zero",e.cost===0),ri(),Sd(" ",oT(2,3,e.cost,4,e.unknownCostCount)," ");}}function ba(i,a){i&1&&(ma$1(0,"th",54)(1,"span",61),VC(2,"Actions"),Id()());}function wa(i,a){if(i&1&&(ma$1(0,"td",51)(1,"button",62)(2,"mat-icon"),VC(3,"more_vert"),Id()(),ma$1(4,"mat-menu",null,0)(6,"a",63)(7,"mat-icon"),VC(8,"monitoring"),Id(),VC(9,"Open session"),Id(),ma$1(10,"button",64)(11,"mat-icon"),VC(12,"receipt_long"),Id(),VC(13,"View log"),Id()()()),i&2){let e=a.$implicit,t=bC(5);ri(),Zg("matMenuTriggerFor",t),ri(5),Zg("routerLink",QC(3,fn,e.id))("queryParams",QC(5,_n,e.namespaceId));}}function Ca(i,a){i&1&&Yg(0,"tr",65);}function Da(i,a){if(i&1&&Yg(0,"tr",66),i&2){let e=a.$implicit;It$1("row--active",e.status!=="destroyed");}}function ka(i,a){if(i&1&&(ma$1(0,"tr",67)(1,"td",68),VC(2,"No run matches these filters."),Id()()),i&2){let e=pC();ri(),ir("colspan",e.columns.length);}}function xa(i,a){if(i&1&&(ma$1(0,"li",69)(1,"span",70),VC(2),Id(),ma$1(3,"span",71),Yg(4,"span",72),Id(),ma$1(5,"span",73),VC(6),eT(7,"usd"),Id()()),i&2){let e=a.$implicit;It$1("active",e.active),ri(2),hy(e.name),ri(2),cy("width",e.pct,"%"),ri(2),hy(oT(7,6,e.cost,2,e.unknownCostCount));}}var un=class i{historyState=h(Me);store=h(ln$1);columns=["run","namespace","branch","status","phases","cost","actions"];query=Qe$1("");status=Qe$1("all");namespaceId=Qe$1("");namespaces=this.historyState.namespaces;namespacesLoading=this.historyState.loading;namespacesError=lT(()=>this.historyState.error()?"Namespaces unavailable.":null);rows=lT(()=>this.store.runs().map(a=>P(I({},a),{cost:a.status==="destroyed"&&a.finalCostUsd!==void 0?a.finalCostUsd:a.run?a.run.costUsd:a.costUsd,unknownCostCount:a.run?.unknownCostCount??null})));counts=lT(()=>({all:this.rows().length,working:this.rows().filter(a=>a.status!=="destroyed").length,destroyed:this.rows().filter(a=>a.status==="destroyed").length}));filtered=lT(()=>{let a=this.query().trim().toLowerCase(),e=this.status(),t=this.namespaceId();return this.rows().filter(n=>(!t||n.namespaceId===t)&&(e==="all"||(e==="working"?n.status!=="destroyed":n.status==="destroyed"))&&(!a||[n.title,n.branch,n.id,n.run?.workflow].some(o=>o?.toLowerCase().includes(a))))});totalCost=lT(()=>{let a=this.filtered();return a.some(e=>e.cost===null)?null:a.reduce((e,t)=>e+(t.cost??0),0)});totalUnknownCostCount=lT(()=>{let a=this.filtered();return a.some(e=>e.unknownCostCount===null)?null:a.reduce((e,t)=>e+(t.unknownCostCount??0),0)});costBars=lT(()=>{let e=[...this.filtered().filter(n=>n.cost!==null)].sort((n,o)=>o.cost-n.cost),t=Math.max(...e.map(n=>n.cost),1e-4);return e.map(n=>({name:n.title,cost:n.cost,unknownCostCount:n.unknownCostCount,active:n.status!=="destroyed",pct:Math.max(n.cost/t*100,.5)}))});dataSource=new Ze([]);sort=mU(be);paginator=mU(wt);constructor(){h(yb).crumbs.set([{label:"Run history",link:"/history"}]),this.historyState.loadNamespaces(),$s(()=>{this.store.runs().some(a=>a.status==="destroyed")&&this.store.enrichRemovedRunsUsage();}),$s(()=>{this.dataSource.data=this.filtered();}),$s(()=>{this.dataSource.sort=this.sort()??null,this.dataSource.paginator=this.paginator()??null;});}exportCsv(){let a=["run_id;namespace_id;project;branch;status;workflow;cost_usd",...this.filtered().map(t=>[t.id,t.namespaceId??"",t.project,t.branch??"",t.status,t.run?.workflow??t.title,t.cost?.toFixed(4)??""].join(";"))],e=URL.createObjectURL(new Blob([a.join(`
1512
+ `],encapsulation:2,changeDetection:1})}return i})(),tn=(()=>{class i extends $e{static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["","matCellDef",""]],features:[Ey([{provide:$e,useExisting:i}]),Kr]})}return i})(),nn=(()=>{class i extends Ge{static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["","matHeaderCellDef",""]],features:[Ey([{provide:Ge,useExisting:i}]),Kr]})}return i})();var an=(()=>{class i extends oe{get name(){return this._name}set name(e){this._setNameInput(e);}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`);}static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[Ey([{provide:oe,useExisting:i}]),Kr]})}return i})(),on=(()=>{class i extends Ki{static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[Kr]})}return i})();var rn=(()=>{class i extends Wi{static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[Kr]})}return i})();var sn=(()=>{class i extends Re{static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",wt$1]},features:[Ey([{provide:Re,useExisting:i}]),Kr]})}return i})();var cn=(()=>{class i extends Ke{static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275dir=rt$1({type:i,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[Ey([{provide:Ke,useExisting:i}]),Kr]})}return i})(),ln=(()=>{class i extends mt{static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275cmp=xe({type:i,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[Ey([{provide:mt,useExisting:i}]),Kr],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&Qg(0,0);},dependencies:[de],encapsulation:2,changeDetection:1})}return i})();var dn=(()=>{class i extends pt{static \u0275fac=(()=>{let e;return function(n){return (e||(e=pm(i)))(n||i)}})();static \u0275cmp=xe({type:i,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[Ey([{provide:pt,useExisting:i}]),Kr],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,n){t&1&&Qg(0,0);},dependencies:[de],encapsulation:2,changeDetection:1})}return i})(),hn=(()=>{class i extends We{_cellSelector="td, mat-cell, [mat-cell], .mat-cell";constructor(){super(),this._contentClassNames.push("mat-mdc-no-data-row","mat-mdc-row","mdc-data-table__row"),this._cellClassNames.push("mat-mdc-cell","mdc-data-table__cell","mat-no-data-cell");}static \u0275fac=function(t){return new(t||i)};static \u0275dir=rt$1({type:i,selectors:[["ng-template","matNoDataRow",""]],features:[Ey([{provide:We,useExisting:i}]),Kr]})}return i})();var mn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=he({type:i});static \u0275inj=ce$1({imports:[Zi,no]})}return i})(),Qn=9007199254740991,Ze=class extends dt$1{_data;_renderData=new Cn$1([]);_filter=new Cn$1("");_internalPageChanges=new Z;_renderChangesSubscription=null;filteredData;get data(){return this._data.value}set data(a){a=Array.isArray(a)?a:[],this._data.next(a),this._renderChangesSubscription||this._filterData(a);}get filter(){return this._filter.value}set filter(a){this._filter.next(a),this._renderChangesSubscription||this._filterData(this.data);}get sort(){return this._sort}set sort(a){this._sort=a,this._updateChangeSubscription();}_sort;get paginator(){return this._paginator}set paginator(a){this._paginator=a,this._updateChangeSubscription();}_paginator;sortingDataAccessor=(a,e)=>{let t=a[e];if(Pv(t)){let n=Number(t);return n<Qn?n:t}return t};sortData=(a,e)=>{let t=e.active,n=e.direction;return !t||n==""?a:a.sort((o,r)=>{let d=this.sortingDataAccessor(o,t),p=this.sortingDataAccessor(r,t),f=typeof d,g=typeof p;f!==g&&(f==="number"&&(d+=""),g==="number"&&(p+=""));let R=0;return d!=null&&p!=null?d>p?R=1:d<p&&(R=-1):d!=null?R=1:p!=null&&(R=-1),R*(n=="asc"?1:-1)})};filterPredicate=(a,e)=>{let t=e.trim().toLowerCase();return Object.values(a).some(n=>`${n}`.toLowerCase().includes(t))};constructor(a=[]){super(),this._data=new Cn$1(a),this._updateChangeSubscription();}_updateChangeSubscription(){let a=this._sort?Jb(this._sort.sortChange,this._sort.initialized):qe(null),e=this._paginator?Jb(this._paginator.page,this._internalPageChanges,this._paginator.initialized):qe(null),t=this._data,n=Ec([t,this._filter]).pipe(A(([d])=>this._filterData(d))),o=Ec([n,a]).pipe(A(([d])=>this._orderData(d))),r=Ec([o,e]).pipe(A(([d])=>this._pageData(d)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=r.subscribe(d=>this._renderData.next(d));}_filterData(a){return this.filteredData=this.filter==null||this.filter===""?a:a.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(a){return this.sort?this.sortData(a.slice(),this.sort):a}_pageData(a){if(!this.paginator)return a;let e=this.paginator.pageIndex*this.paginator.pageSize;return a.slice(e,e+this.paginator.pageSize)}_updatePaginator(a){Promise.resolve().then(()=>{let e=this.paginator;if(e&&(e.length=a,e.pageIndex>0)){let t=Math.ceil(e.length/e.pageSize)-1||0,n=Math.min(e.pageIndex,t);n!==e.pageIndex&&(e.pageIndex=n,this._internalPageChanges.next());}});}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null;}};var Me=class i{api=h(vb);namespaces=Qe$1([]);loading=Qe$1(false);error=Qe$1(null);loadNamespaces(){this.loading.set(true),this.error.set(null),this.api.getNamespaces().pipe(yr(()=>this.loading.set(false))).subscribe({next:a=>this.namespaces.set(XW(a)),error:a=>{this.namespaces.set([]),this.error.set(a);}});}static \u0275fac=function(e){return new(e||i)};static \u0275prov=M({token:i,factory:i.\u0275fac})};var pn=(i,a)=>a.key;function Gn(i,a){if(i&1&&pn$2(0,"span",3),i&2){let e=a.$implicit;di("seg--"+e.tone),cy("flex-grow",e.ratio),It$1("running",e.status==="running")("skipped",e.status==="skipped");}}function Kn(i,a){i&1&&VC(0," \xB7 ");}function Wn(i,a){if(i&1&&(dn$1(0,"span"),VC(1),fn$1(),ci(2,Kn,1,0)),i&2){let e=a.$implicit,t=a.$index,n=a.$count;It$1("current",e.status==="running"),ri(),hy(e.key),ri(),ui(t!==n-1?2:-1);}}function Zn(i,a){if(i&1&&(dn$1(0,"span",2),eC(1,Wn,3,4,null,null,pn),fn$1()),i&2){let e=pC();ri(),tC(e.phases());}}var Ye=class i{phases=Oy.required();height=Oy(8);showLegend=Oy(true);ariaLabel=lT(()=>"Phases: "+this.phases().map(a=>a.status==="running"?`${a.key} running`:a.status==="waiting_human"?`${a.key} waiting for human`:a.status==="failed"?`${a.key} failed`:a.status==="indeterminate"?`${a.key} indeterminate`:a.status==="cancelled"?`${a.key} cancelled`:a.status==="pending"?`${a.key} waiting`:a.status==="skipped"?`${a.key} skipped, not executed`:`${a.key} completed`).join(", "));static \u0275fac=function(e){return new(e||i)};static \u0275cmp=xe({type:i,selectors:[["sf-phase-bar"]],inputs:{phases:[1,"phases"],height:[1,"height"],showLegend:[1,"showLegend"]},decls:4,vars:4,consts:[["role","img",1,"bar"],[1,"seg",3,"class","running","skipped","flex-grow"],[1,"legend"],[1,"seg"]],template:function(e,t){e&1&&(dn$1(0,"div",0),eC(1,Gn,1,8,"span",1,pn),fn$1(),ci(3,Zn,3,0,"span",2)),e&2&&(cy("height",t.height(),"px"),ir("aria-label",t.ariaLabel()),ri(),tC(t.phases()),ri(2),ui(t.showLegend()?3:-1));},styles:["[_nghost-%COMP%]{display:flex;align-items:center;gap:12px}.bar[_ngcontent-%COMP%]{flex:1;display:flex;gap:3px}.seg[_ngcontent-%COMP%]{min-width:4px;border-radius:var(--radius-sm, 0)}.seg--amber[_ngcontent-%COMP%]{background:var(--color-warning)}.seg--violet[_ngcontent-%COMP%]{background:var(--color-accent-700)}.seg--green[_ngcontent-%COMP%]{background:var(--color-success)}.seg--cyan[_ngcontent-%COMP%]{background:var(--color-accent)}.seg.running[_ngcontent-%COMP%]{background:repeating-linear-gradient(135deg,var(--color-accent) 0 6px,var(--color-accent-700) 6px 12px)}.seg.skipped[_ngcontent-%COMP%]{background:var(--sf-outline-strong);opacity:.55}.legend[_ngcontent-%COMP%]{font-family:var(--sf-mono);font-size:12px;color:var(--sf-text-muted);white-space:nowrap}.legend[_ngcontent-%COMP%] .current[_ngcontent-%COMP%]{color:var(--color-accent-700)}"]})};var Yn=()=>[10,25,50],fn=i=>["/sessions",i],_n=i=>({namespaceId:i}),Xn=(i,a)=>a.id,Jn=(i,a)=>a.name;function ea(i,a){if(i&1&&(ma$1(0,"mat-option",18),VC(1),Id()),i&2){let e=a.$implicit;Zg("value",e.id),ri(),hy(e.name);}}function ta(i,a){i&1&&(ma$1(0,"mat-hint"),VC(1,"Loading\u2026"),Id());}function ia(i,a){if(i&1&&(ma$1(0,"mat-hint",19),VC(1),Id()),i&2){let e=pC();ri(),hy(e.namespacesError());}}function na(i,a){i&1&&(ma$1(0,"th",50),VC(1,"Run"),Id());}function aa(i,a){if(i&1&&(ma$1(0,"td",51)(1,"a",52),VC(2),Id(),ma$1(3,"span",53),VC(4),Id()()),i&2){let e=a.$implicit;ri(),Zg("routerLink",QC(4,fn,e.id))("queryParams",QC(6,_n,e.namespaceId)),ri(),hy(e.title),ri(2),hy(e.id);}}function oa(i,a){i&1&&(ma$1(0,"th",54),VC(1,"Namespace"),Id());}function ra(i,a){if(i&1&&(ma$1(0,"td",55),VC(1),Id()),i&2){let e=a.$implicit;ri(),hy(e.namespaceId??"\u2014");}}function sa(i,a){i&1&&(ma$1(0,"th",54),VC(1,"Project \u203A branch"),Id());}function ca(i,a){if(i&1&&VC(0),i&2){let e=pC().$implicit;Sd(" \u203A ",e.branch," ");}}function la(i,a){if(i&1&&(ma$1(0,"td",55),VC(1),ci(2,ca,1,1),Id()),i&2){let e=a.$implicit;It$1("cyan",e.branch),ri(),Sd(" ",e.project," "),ri(),ui(e.branch?2:-1);}}function da(i,a){i&1&&(ma$1(0,"th",50),VC(1,"Status"),Id());}function ha(i,a){i&1&&(ma$1(0,"sf-status-chip",56),VC(1,"completed / stopped"),Id());}function ma(i,a){i&1&&(ma$1(0,"sf-status-chip",57),VC(1,"in progress"),Id());}function pa(i,a){if(i&1&&(ma$1(0,"td",51),ci(1,ha,2,0,"sf-status-chip",56)(2,ma,2,0,"sf-status-chip",57),Id()),i&2){let e=a.$implicit;ri(),ui(e.status==="destroyed"?1:2);}}function ua(i,a){i&1&&(ma$1(0,"th",54),VC(1,"Phases"),Id());}function fa(i,a){if(i&1&&Yg(0,"sf-phase-bar",58),i&2){let e=pC().$implicit;Zg("phases",e.phases)("height",6)("showLegend",false);}}function _a(i,a){i&1&&(ma$1(0,"span",4),VC(1,"\u2014"),Id());}function ga(i,a){if(i&1&&(ma$1(0,"td",51),ci(1,fa,1,3,"sf-phase-bar",58)(2,_a,2,0,"span",4),Id()),i&2){let e=a.$implicit;ri(),ui(e.phases.length?1:2);}}function va(i,a){i&1&&(ma$1(0,"th",59),VC(1,"Cost"),Id());}function ya(i,a){if(i&1&&(ma$1(0,"td",60),VC(1),eT(2,"usd"),Id()),i&2){let e=a.$implicit;It$1("zero",e.cost===0),ri(),Sd(" ",oT(2,3,e.cost,4,e.unknownCostCount)," ");}}function ba(i,a){i&1&&(ma$1(0,"th",54)(1,"span",61),VC(2,"Actions"),Id()());}function wa(i,a){if(i&1&&(ma$1(0,"td",51)(1,"button",62)(2,"mat-icon"),VC(3,"more_vert"),Id()(),ma$1(4,"mat-menu",null,0)(6,"a",63)(7,"mat-icon"),VC(8,"monitoring"),Id(),VC(9,"Open session"),Id(),ma$1(10,"button",64)(11,"mat-icon"),VC(12,"receipt_long"),Id(),VC(13,"View log"),Id()()()),i&2){let e=a.$implicit,t=bC(5);ri(),Zg("matMenuTriggerFor",t),ri(5),Zg("routerLink",QC(3,fn,e.id))("queryParams",QC(5,_n,e.namespaceId));}}function Ca(i,a){i&1&&Yg(0,"tr",65);}function Da(i,a){if(i&1&&Yg(0,"tr",66),i&2){let e=a.$implicit;It$1("row--active",e.status!=="destroyed");}}function ka(i,a){if(i&1&&(ma$1(0,"tr",67)(1,"td",68),VC(2,"No run matches these filters."),Id()()),i&2){let e=pC();ri(),ir("colspan",e.columns.length);}}function xa(i,a){if(i&1&&(ma$1(0,"li",69)(1,"span",70),VC(2),Id(),ma$1(3,"span",71),Yg(4,"span",72),Id(),ma$1(5,"span",73),VC(6),eT(7,"usd"),Id()()),i&2){let e=a.$implicit;It$1("active",e.active),ri(2),hy(e.name),ri(2),cy("width",e.pct,"%"),ri(2),hy(oT(7,6,e.cost,2,e.unknownCostCount));}}var un=class i{historyState=h(Me);store=h(pn$1);columns=["run","namespace","branch","status","phases","cost","actions"];query=Qe$1("");status=Qe$1("all");namespaceId=Qe$1("");namespaces=this.historyState.namespaces;namespacesLoading=this.historyState.loading;namespacesError=lT(()=>this.historyState.error()?"Namespaces unavailable.":null);rows=lT(()=>this.store.runs().map(a=>P(I({},a),{cost:a.status==="destroyed"&&a.finalCostUsd!==void 0?a.finalCostUsd:a.run?a.run.costUsd:a.costUsd,unknownCostCount:a.run?.unknownCostCount??null})));counts=lT(()=>({all:this.rows().length,working:this.rows().filter(a=>a.status!=="destroyed").length,destroyed:this.rows().filter(a=>a.status==="destroyed").length}));filtered=lT(()=>{let a=this.query().trim().toLowerCase(),e=this.status(),t=this.namespaceId();return this.rows().filter(n=>(!t||n.namespaceId===t)&&(e==="all"||(e==="working"?n.status!=="destroyed":n.status==="destroyed"))&&(!a||[n.title,n.branch,n.id,n.run?.workflow].some(o=>o?.toLowerCase().includes(a))))});totalCost=lT(()=>{let a=this.filtered();return a.some(e=>e.cost===null)?null:a.reduce((e,t)=>e+(t.cost??0),0)});totalUnknownCostCount=lT(()=>{let a=this.filtered();return a.some(e=>e.unknownCostCount===null)?null:a.reduce((e,t)=>e+(t.unknownCostCount??0),0)});costBars=lT(()=>{let e=[...this.filtered().filter(n=>n.cost!==null)].sort((n,o)=>o.cost-n.cost),t=Math.max(...e.map(n=>n.cost),1e-4);return e.map(n=>({name:n.title,cost:n.cost,unknownCostCount:n.unknownCostCount,active:n.status!=="destroyed",pct:Math.max(n.cost/t*100,.5)}))});dataSource=new Ze([]);sort=mU(be);paginator=mU(wt);constructor(){h(yb).crumbs.set([{label:"Run history",link:"/history"}]),this.historyState.loadNamespaces(),$s(()=>{this.store.runs().some(a=>a.status==="destroyed")&&this.store.enrichRemovedRunsUsage();}),$s(()=>{this.dataSource.data=this.filtered();}),$s(()=>{this.dataSource.sort=this.sort()??null,this.dataSource.paginator=this.paginator()??null;});}exportCsv(){let a=["run_id;namespace_id;project;branch;status;workflow;cost_usd",...this.filtered().map(t=>[t.id,t.namespaceId??"",t.project,t.branch??"",t.status,t.run?.workflow??t.title,t.cost?.toFixed(4)??""].join(";"))],e=URL.createObjectURL(new Blob([a.join(`
1513
1513
  `)],{type:"text/csv"}));Object.assign(document.createElement("a"),{href:e,download:"runs.csv"}).click(),URL.revokeObjectURL(e);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=xe({type:i,selectors:[["sf-history-page"]],viewQuery:function(e,t){e&1&&iy(t.sort,be,5)(t.paginator,wt,5),e&2&&vC(2);},features:[Ey([{provide:se,useClass:_t$1},Me])],decls:82,vars:20,consts:[["menu","matMenu"],[1,"page"],[1,"page-head"],[1,"titles"],[1,"sf-muted"],["mat-stroked-button","",1,"sf-secondary",3,"click"],[1,"filters"],["appearance","outline","subscriptSizing","dynamic",1,"search"],["matPrefix",""],["matInput","","placeholder","Search run, branch, workflow\u2026","aria-label","Search",3,"input","value"],["aria-label","Filter by status",3,"change","value"],["value","all"],["value","working"],["value","destroyed"],[1,"sf-spacer"],["appearance","outline","subscriptSizing","dynamic",1,"project"],[3,"selectionChange","value"],["value",""],[3,"value"],[1,"hint--error"],[1,"table-wrap","sf-panel"],["mat-table","","matSort","","matSortActive","cost","matSortDirection","desc",3,"dataSource"],["matColumnDef","run"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","namespace"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","class","mono-cell",4,"matCellDef"],["matColumnDef","branch"],["mat-cell","","class","mono-cell",3,"cyan",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","phases"],["matColumnDef","cost"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","num",4,"matHeaderCellDef"],["mat-cell","","class","num mono-cell",3,"zero",4,"matCellDef"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"row--active",4,"matRowDef","matRowDefColumns"],["class","mat-row",4,"matNoDataRow"],[1,"table-foot"],[1,"sf-mono"],["aria-label","Pagination",3,"pageSize","pageSizeOptions"],["aria-labelledby","costs-title",1,"costs","sf-panel"],[1,"costs-head"],["id","costs-title",1,"sf-overline"],[1,"legend"],[1,"sw","sw--active"],[1,"sw"],[1,"bars"],[1,"bar-row",3,"active"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"name","name--active",3,"routerLink","queryParams"],[1,"sf-id"],["mat-header-cell",""],["mat-cell","",1,"mono-cell"],["tone","neutral","size","sm","dot",""],["tone","blue","size","sm","icon","progress_activity","spin",""],[3,"phases","height","showLegend"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"num"],["mat-cell","",1,"num","mono-cell"],[1,"cdk-visually-hidden"],["mat-icon-button","","aria-label","Actions",3,"matMenuTriggerFor"],["mat-menu-item","",3,"routerLink","queryParams"],["mat-menu-item",""],["mat-header-row",""],["mat-row",""],[1,"mat-row"],[1,"mat-cell","empty"],[1,"bar-row"],[1,"bar-name","sf-ellipsis"],[1,"bar-track"],[1,"bar-fill"],[1,"bar-val"]],template:function(e,t){e&1&&(ma$1(0,"div",1)(1,"header",2)(2,"div",3)(3,"h1"),VC(4,"Run history"),Id(),ma$1(5,"p",4),VC(6,"Every Factory run with its cost, status, duration and phases"),Id()(),ma$1(7,"button",5),ey("click",function(){return t.exportCsv()}),ma$1(8,"mat-icon"),VC(9,"download"),Id(),VC(10,"Export CSV "),Id()(),ma$1(11,"div",6)(12,"mat-form-field",7)(13,"mat-icon",8),VC(14,"search"),Id(),ma$1(15,"input",9),ey("input",function(o){return t.query.set(o.target.value)}),Id()(),ma$1(16,"mat-chip-listbox",10),ey("change",function(o){return t.status.set(o.value??"all")}),ma$1(17,"mat-chip-option",11),VC(18),Id(),ma$1(19,"mat-chip-option",12),VC(20),Id(),ma$1(21,"mat-chip-option",13),VC(22),Id()(),Yg(23,"span",14),ma$1(24,"mat-form-field",15)(25,"mat-label"),VC(26,"Namespace"),Id(),ma$1(27,"mat-select",16),ey("selectionChange",function(o){return t.namespaceId.set(o.value)}),ma$1(28,"mat-option",17),VC(29,"All"),Id(),eC(30,ea,2,2,"mat-option",18,Xn),Id(),ci(32,ta,2,0,"mat-hint"),ci(33,ia,2,1,"mat-hint",19),Id()(),ma$1(34,"section",20)(35,"table",21),wd(36,22),$g(37,na,2,0,"th",23)(38,aa,5,8,"td",24),Cd(),wd(39,25),$g(40,oa,2,0,"th",26)(41,ra,2,1,"td",27),Cd(),wd(42,28),$g(43,sa,2,0,"th",26)(44,la,3,4,"td",29),Cd(),wd(45,30),$g(46,da,2,0,"th",23)(47,pa,3,1,"td",24),Cd(),wd(48,31),$g(49,ua,2,0,"th",26)(50,ga,3,1,"td",24),Cd(),wd(51,32),$g(52,va,2,0,"th",33)(53,ya,3,7,"td",34),Cd(),wd(54,35),$g(55,ba,3,0,"th",26)(56,wa,14,7,"td",24),Cd(),$g(57,Ca,1,0,"tr",36)(58,Da,1,2,"tr",37)(59,ka,3,1,"tr",38),Id(),ma$1(60,"footer",39)(61,"span"),VC(62),ma$1(63,"b",40),VC(64),eT(65,"usd"),Id()(),Yg(66,"span",14)(67,"mat-paginator",41),Id()(),ma$1(68,"section",42)(69,"header",43)(70,"h2",44),VC(71,"Cost per run"),Id(),Yg(72,"span",14),ma$1(73,"span",45),Yg(74,"i",46),VC(75,"active"),Id(),ma$1(76,"span",45),Yg(77,"i",47),VC(78,"destroyed"),Id()(),ma$1(79,"ul",48),eC(80,xa,8,10,"li",49,Jn),Id()()()),e&2&&(ri(15),Zg("value",t.query()),ri(),Zg("value",t.status()),ri(2),Sd("All \xB7 ",t.counts().all),ri(2),Sd("In progress \xB7 ",t.counts().working),ri(2),Sd("Completed / Stopped \xB7 ",t.counts().destroyed),ri(5),Zg("value",t.namespaceId()),ri(3),tC(t.namespaces()),ri(2),ui(t.namespacesLoading()?32:-1),ri(),ui(t.namespacesError()?33:-1),ri(2),Zg("dataSource",t.dataSource),ri(22),Zg("matHeaderRowDef",t.columns),ri(),Zg("matRowDefColumns",t.columns),ri(4),Sd("",t.filtered().length," runs \xB7 cumulative cost "),ri(2),hy(oT(65,15,t.totalCost(),2,t.totalUnknownCostCount())),ri(3),Zg("pageSize",25)("pageSizeOptions",KC(19,Yn)),ri(13),tC(t.costBars()));},dependencies:[Nt,HW,UW,zM,Qi,ct,st,Pt,It,Me$1,Se$1,bi,Y8,Z8,Be,Pe,Bi$1,U,le,Ai$1,ai,wt,Wr,Hr,ce,Ji,be,Xi,mn,en,nn,sn,an,tn,cn,on,rn,ln,dn,hn,y,Ye,ot$1],styles:['@charset "UTF-8";.page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px;max-width:1400px}.page-head[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:16px}.titles[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px}h1[_ngcontent-%COMP%]{margin:0;font-family:var(--font-heading);font-size:28px;font-weight:600;letter-spacing:-.01em}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.search[_ngcontent-%COMP%]{width:380px}.project[_ngcontent-%COMP%]{width:160px}.table-wrap[_ngcontent-%COMP%]{overflow:hidden}table[_ngcontent-%COMP%]{width:100%}th.mat-mdc-header-cell[_ngcontent-%COMP%]{background:var(--color-surface-muted);font-family:var(--font-heading);font-size:11px;font-weight:600;letter-spacing:.12em;text-transform:uppercase}td.mat-mdc-cell[_ngcontent-%COMP%]{height:60px}tr.row--active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-accent) 8%,transparent)}tr.mat-mdc-row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.name[_ngcontent-%COMP%]{font-family:var(--sf-mono);font-size:13.5px;font-weight:600;color:var(--sf-text-2)}.name--active[_ngcontent-%COMP%]{color:var(--color-accent-700);font-weight:700;text-decoration:none}.name--active[_ngcontent-%COMP%]:hover{text-decoration:underline}.mono-cell[_ngcontent-%COMP%]{font-family:var(--sf-mono);font-size:12.5px;color:var(--sf-text-muted)}.mono-cell.cyan[_ngcontent-%COMP%]{color:var(--sf-secondary)}.run-cell[_ngcontent-%COMP%]{display:inline-flex;gap:8px;white-space:nowrap}td.mat-column-branch[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}.plain[_ngcontent-%COMP%]{font-family:var(--sf-font);font-size:13px}.num[_ngcontent-%COMP%]{text-align:right}td.num[_ngcontent-%COMP%]{font-size:13.5px;font-weight:600;color:var(--sf-text)}td.num.zero[_ngcontent-%COMP%]{color:var(--sf-text-faint)}sf-phase-bar[_ngcontent-%COMP%]{width:140px}.empty[_ngcontent-%COMP%]{padding:32px;text-align:center;color:var(--sf-text-muted)}.table-foot[_ngcontent-%COMP%]{display:flex;align-items:center;padding-left:20px;font-size:13px;color:var(--sf-text-muted);border-top:1px solid var(--color-divider)}.table-foot[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{color:var(--sf-text)}.costs[_ngcontent-%COMP%]{padding:20px 22px;display:flex;flex-direction:column;gap:14px}.costs-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px}.legend[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--sf-text-muted)}.sw[_ngcontent-%COMP%]{width:10px;height:10px;border-radius:var(--radius-sm, 0);background:var(--color-neutral-500)}.sw--active[_ngcontent-%COMP%]{background:var(--color-accent)}.bars[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px}.bar-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:330px minmax(0,1fr) 70px;gap:14px;align-items:center;font-family:var(--sf-mono);font-size:12.5px}.bar-name[_ngcontent-%COMP%]{color:var(--sf-text-2)}.bar-track[_ngcontent-%COMP%]{display:flex;height:14px}.bar-fill[_ngcontent-%COMP%]{border-radius:0 var(--radius-sm, 0) var(--radius-sm, 0) 0;background:var(--color-neutral-500)}.bar-val[_ngcontent-%COMP%]{text-align:right}.bar-row.active[_ngcontent-%COMP%] .bar-name[_ngcontent-%COMP%]{color:var(--sf-text)}.bar-row.active[_ngcontent-%COMP%] .bar-fill[_ngcontent-%COMP%]{background:var(--color-accent)}.bar-row.active[_ngcontent-%COMP%] .bar-val[_ngcontent-%COMP%]{color:var(--color-accent-700)}']})};export{un as HistoryPageComponent};
@@ -1,4 +1,4 @@
1
- import {h,X as y,b6 as mf,c3 as K$1,bi as so,b1 as Z,cL as Xb,bS as Ac,ae as I,aL as P,cM as je$1,cx as F,cN as Ne$1,cO as Wt,cP as jt$1,cy as Ge$1,cQ as q,cR as wt,cS as Ft,ci as Wr,cT as $$1,b5 as iM,bP as po,cU as Tt,bO as Jb,b9 as eb,b7 as Oe,bT as pm,x as xe,cV as Wi,bU as Kr,m as ma,by as $g,b as Id,bx as Xg,s as ir,G as It,L as he,R as ce,cW as di,cX as De,T as no,bg as ue,ba as rt,br as ya,e as ey,cY as Pw,cZ as pt,c_ as TM,c$ as Yv,aX as j,bh as uf,cn as ai,b4 as Ly,c6 as De$1,c1 as O$1,ck as Zl,d0 as dM,bp as ry,be as gC,bf as yC,Q as Qe$1,d1 as fM,d2 as xM,d3 as At}from'./main-YM5YA3UI.js';function ze(i,a){}var g=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=true;backdropClass="";disableClose=false;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=false;autoFocus="first-tabbable";restoreFocus=true;scrollStrategy;closeOnNavigation=true;closeOnDestroy=true;closeOnOverlayDetachments=true;disableAnimations=false;providers;container;templateContext;bindings};var K=(()=>{class i extends pt{_elementRef=h(ue);_focusTrapFactory=h(TM);_config;_interactivityChecker=h(Yv);_ngZone=h(j);_focusMonitor=h(uf);_renderer=h(ai);_changeDetectorRef=h(Ly);_injector=h(K$1);_platform=h(De$1);_document=h(O$1);_portalOutlet;_focusTrapped=new Z;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=false;constructor(){super(),this._config=h(g,{optional:true})||new g,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy);}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck();}_removeAriaLabelledBy(e){let t=this._ariaLabelledByQueue.indexOf(e);t>-1&&(this._ariaLabelledByQueue.splice(t,1),this._changeDetectorRef.markForCheck());}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus();}_captureInitialFocus(){this._trapFocus();}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=true,this._restoreFocus();}attachComponentPortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),t}attachTemplatePortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),t}attachDomPortal=e=>{this._portalOutlet.hasAttached();let t=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),t};_recaptureFocus(){this._containsFocus()||this._trapFocus();}_forceFocus(e,t){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let n=()=>{o(),l(),e.removeAttribute("tabindex");},o=this._renderer.listen(e,"blur",n),l=this._renderer.listen(e,"mousedown",n);})),e.focus(t);}_focusByCssSelector(e,t){let n=this._elementRef.nativeElement.querySelector(e);n&&this._forceFocus(n,t);}_trapFocus(e){this._isDestroyed||Zl(()=>{let t=this._elementRef.nativeElement;switch(this._config.autoFocus){case false:case "dialog":this._containsFocus()||t.focus(e);break;case true:case "first-tabbable":this._focusTrap?.focusInitialElement(e)||this._focusDialogContainer(e);break;case "first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',e);break;default:this._focusByCssSelector(this._config.autoFocus,e);break}this._focusTrapped.next();},{injector:this._injector});}_restoreFocus(){let e=this._config.restoreFocus,t=null;if(typeof e=="string"?t=this._document.querySelector(e):typeof e=="boolean"?t=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(t=e),this._config.restoreFocus&&t&&typeof t.focus=="function"){let n=dM(),o=this._elementRef.nativeElement;(!n||n===this._document.body||n===o||o.contains(n))&&(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus());}this._focusTrap&&this._focusTrap.destroy();}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e);}_containsFocus(){let e=this._elementRef.nativeElement,t=dM();return e===t||e.contains(t)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=dM()));}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xe({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(t,n){if(t&1&&ry(Wi,7),t&2){let o;gC(o=yC())&&(n._portalOutlet=o.first);}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(t,n){t&2&&ir("id",n._config.id||null)("role",n._config.role)("aria-modal",n._config.ariaModal)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null);},features:[Kr],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,n){t&1&&$g(0,ze,0,0,"ng-template",0);},dependencies:[Wi],styles:[`.cdk-dialog-container {
1
+ import {h,X as y,b6 as mf,c3 as K$1,bi as so,b1 as Z,cL as Xb,bS as Ac,ae as I,aL as P,cM as je$1,cx as F,cN as Ne$1,cO as Wt,cP as jt$1,cy as Ge$1,cQ as q,cR as wt,cS as Ft,ci as Wr,cT as $$1,b5 as iM,bP as po,cU as Tt,bO as Jb,b9 as eb,b7 as Oe,bT as pm,x as xe,cV as Wi,bU as Kr,m as ma,by as $g,b as Id,bx as Xg,s as ir,G as It,L as he,R as ce,cW as di,cX as De,T as no,bg as ue,ba as rt,br as ya,e as ey,cY as Pw,cZ as pt,c_ as TM,c$ as Yv,aX as j,bh as uf,cn as ai,b4 as Ly,c6 as De$1,c1 as O$1,ck as Zl,d0 as dM,bp as ry,be as gC,bf as yC,Q as Qe$1,d1 as fM,d2 as xM,d3 as At}from'./main-T4S6RIJZ.js';function ze(i,a){}var g=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=true;backdropClass="";disableClose=false;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=false;autoFocus="first-tabbable";restoreFocus=true;scrollStrategy;closeOnNavigation=true;closeOnDestroy=true;closeOnOverlayDetachments=true;disableAnimations=false;providers;container;templateContext;bindings};var K=(()=>{class i extends pt{_elementRef=h(ue);_focusTrapFactory=h(TM);_config;_interactivityChecker=h(Yv);_ngZone=h(j);_focusMonitor=h(uf);_renderer=h(ai);_changeDetectorRef=h(Ly);_injector=h(K$1);_platform=h(De$1);_document=h(O$1);_portalOutlet;_focusTrapped=new Z;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=false;constructor(){super(),this._config=h(g,{optional:true})||new g,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy);}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck();}_removeAriaLabelledBy(e){let t=this._ariaLabelledByQueue.indexOf(e);t>-1&&(this._ariaLabelledByQueue.splice(t,1),this._changeDetectorRef.markForCheck());}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus();}_captureInitialFocus(){this._trapFocus();}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=true,this._restoreFocus();}attachComponentPortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),t}attachTemplatePortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),t}attachDomPortal=e=>{this._portalOutlet.hasAttached();let t=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),t};_recaptureFocus(){this._containsFocus()||this._trapFocus();}_forceFocus(e,t){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let n=()=>{o(),l(),e.removeAttribute("tabindex");},o=this._renderer.listen(e,"blur",n),l=this._renderer.listen(e,"mousedown",n);})),e.focus(t);}_focusByCssSelector(e,t){let n=this._elementRef.nativeElement.querySelector(e);n&&this._forceFocus(n,t);}_trapFocus(e){this._isDestroyed||Zl(()=>{let t=this._elementRef.nativeElement;switch(this._config.autoFocus){case false:case "dialog":this._containsFocus()||t.focus(e);break;case true:case "first-tabbable":this._focusTrap?.focusInitialElement(e)||this._focusDialogContainer(e);break;case "first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',e);break;default:this._focusByCssSelector(this._config.autoFocus,e);break}this._focusTrapped.next();},{injector:this._injector});}_restoreFocus(){let e=this._config.restoreFocus,t=null;if(typeof e=="string"?t=this._document.querySelector(e):typeof e=="boolean"?t=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(t=e),this._config.restoreFocus&&t&&typeof t.focus=="function"){let n=dM(),o=this._elementRef.nativeElement;(!n||n===this._document.body||n===o||o.contains(n))&&(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus());}this._focusTrap&&this._focusTrap.destroy();}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e);}_containsFocus(){let e=this._elementRef.nativeElement,t=dM();return e===t||e.contains(t)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=dM()));}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xe({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(t,n){if(t&1&&ry(Wi,7),t&2){let o;gC(o=yC())&&(n._portalOutlet=o.first);}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(t,n){t&2&&ir("id",n._config.id||null)("role",n._config.role)("aria-modal",n._config.ariaModal)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null);},features:[Kr],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,n){t&1&&$g(0,ze,0,0,"ng-template",0);},dependencies:[Wi],styles:[`.cdk-dialog-container {
2
2
  display: block;
3
3
  width: 100%;
4
4
  height: 100%;
@@ -1 +1 @@
1
- import {$ as $e,H as Ht,j as jt,N as Nt,z as zt,V as Vt}from'./chunk-CFeLuvfm.js';import {h,x as xe,H as HW,U as UW,m as ma,V as VC,b as Id,f as ci,r as ri,k as hy,u as ui,j as Zg,G as It,a8 as Sd,A as pC}from'./main-YM5YA3UI.js';function S(n,m){if(n&1&&(ma(0,"code",1),VC(1),Id()),n&2){let a=pC();ri(),hy(a.data.detail);}}var I=class n{data=h($e);static \u0275fac=function(a){return new(a||n)};static \u0275cmp=xe({type:n,selectors:[["sf-confirm-dialog"]],decls:11,vars:8,consts:[["mat-dialog-title",""],[1,"sf-mono","dialog-detail"],["align","end"],["mat-button","",3,"mat-dialog-close"],["mat-stroked-button","",3,"mat-dialog-close"]],template:function(a,l){a&1&&(ma(0,"h2",0),VC(1),Id(),ma(2,"mat-dialog-content")(3,"p"),VC(4),Id(),ci(5,S,2,1,"code",1),Id(),ma(6,"mat-dialog-actions",2)(7,"button",3),VC(8,"Cancel"),Id(),ma(9,"button",4),VC(10),Id()()),a&2&&(ri(),hy(l.data.title),ri(3),hy(l.data.message),ri(),ui(l.data.detail?5:-1),ri(2),Zg("mat-dialog-close",false),ri(2),It("sf-danger",l.data.destructive),Zg("mat-dialog-close",true),ri(),Sd(" ",l.data.confirmLabel??"Confirm"," "));},dependencies:[HW,UW,Ht,jt,Nt,zt,Vt],styles:[".dialog-detail[_ngcontent-%COMP%]{display:inline-block;margin-top:10px;padding:4px 8px;border-radius:var(--radius-sm, 0);background:var(--color-surface-muted);color:var(--color-accent-700)}"]})};export{I};
1
+ import {$ as $e,H as Ht,j as jt,N as Nt,z as zt,V as Vt}from'./chunk-D9qJN01e.js';import {h,x as xe,H as HW,U as UW,m as ma,V as VC,b as Id,f as ci,r as ri,k as hy,u as ui,j as Zg,G as It,a8 as Sd,A as pC}from'./main-T4S6RIJZ.js';function S(n,m){if(n&1&&(ma(0,"code",1),VC(1),Id()),n&2){let a=pC();ri(),hy(a.data.detail);}}var I=class n{data=h($e);static \u0275fac=function(a){return new(a||n)};static \u0275cmp=xe({type:n,selectors:[["sf-confirm-dialog"]],decls:11,vars:8,consts:[["mat-dialog-title",""],[1,"sf-mono","dialog-detail"],["align","end"],["mat-button","",3,"mat-dialog-close"],["mat-stroked-button","",3,"mat-dialog-close"]],template:function(a,l){a&1&&(ma(0,"h2",0),VC(1),Id(),ma(2,"mat-dialog-content")(3,"p"),VC(4),Id(),ci(5,S,2,1,"code",1),Id(),ma(6,"mat-dialog-actions",2)(7,"button",3),VC(8,"Cancel"),Id(),ma(9,"button",4),VC(10),Id()()),a&2&&(ri(),hy(l.data.title),ri(3),hy(l.data.message),ri(),ui(l.data.detail?5:-1),ri(2),Zg("mat-dialog-close",false),ri(2),It("sf-danger",l.data.destructive),Zg("mat-dialog-close",true),ri(),Sd(" ",l.data.confirmLabel??"Confirm"," "));},dependencies:[HW,UW,Ht,jt,Nt,zt,Vt],styles:[".dialog-detail[_ngcontent-%COMP%]{display:inline-block;margin-top:10px;padding:4px 8px;border-radius:var(--radius-sm, 0);background:var(--color-surface-muted);color:var(--color-accent-700)}"]})};export{I};
@@ -1 +1 @@
1
- import {O as Oy,q as lT,x as xe,Y as Y8,Z as Z8,a1 as jt,a2 as vt,_ as sr,m as ma,V as VC,b as Id,a0 as ot,j as Zg,s as ir,r as ri,k as hy}from'./main-YM5YA3UI.js';var M=["*"],y=class a{icon=Oy.required();label=Oy("");unknownCostCount=Oy(void 0);tooltip=lT(()=>{let t=this.label(),e=this.unknownCostCount();return e==null?`${t} \xB7 analytics availability unknown`:e>0?`${t} \xB7 ${e} round(s) with unknown cost (floor value)`:t});static \u0275fac=function(e){return new(e||a)};static \u0275cmp=xe({type:a,selectors:[["sf-metric"]],inputs:{icon:[1,"icon"],label:[1,"label"],unknownCostCount:[1,"unknownCostCount"]},ngContentSelectors:M,decls:4,vars:3,consts:[[1,"metric",3,"matTooltip"],["aria-hidden","true"]],template:function(e,o){e&1&&(sr(),ma(0,"span",0)(1,"mat-icon",1),VC(2),Id(),ot(3),Id()),e&2&&(Zg("matTooltip",o.tooltip()),ir("aria-label",o.tooltip()),ri(2),hy(o.icon()));},dependencies:[Y8,Z8,jt,vt],styles:[".metric[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 11px;border-radius:var(--radius-md, 0);border:1px solid var(--color-divider);background:var(--color-bg);font-family:var(--sf-mono);font-size:13px;font-weight:600;color:var(--sf-text)}mat-icon[_ngcontent-%COMP%]{width:16px;height:16px;font-size:16px;color:var(--sf-text-muted)}"]})};export{y};
1
+ import {O as Oy,q as lT,x as xe,Y as Y8,Z as Z8,a1 as jt,a2 as vt,_ as sr,m as ma,V as VC,b as Id,a0 as ot,j as Zg,s as ir,r as ri,k as hy}from'./main-T4S6RIJZ.js';var M=["*"],y=class a{icon=Oy.required();label=Oy("");unknownCostCount=Oy(void 0);tooltip=lT(()=>{let t=this.label(),e=this.unknownCostCount();return e==null?`${t} \xB7 analytics availability unknown`:e>0?`${t} \xB7 ${e} round(s) with unknown cost (floor value)`:t});static \u0275fac=function(e){return new(e||a)};static \u0275cmp=xe({type:a,selectors:[["sf-metric"]],inputs:{icon:[1,"icon"],label:[1,"label"],unknownCostCount:[1,"unknownCostCount"]},ngContentSelectors:M,decls:4,vars:3,consts:[[1,"metric",3,"matTooltip"],["aria-hidden","true"]],template:function(e,o){e&1&&(sr(),ma(0,"span",0)(1,"mat-icon",1),VC(2),Id(),ot(3),Id()),e&2&&(Zg("matTooltip",o.tooltip()),ir("aria-label",o.tooltip()),ri(2),hy(o.icon()));},dependencies:[Y8,Z8,jt,vt],styles:[".metric[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 11px;border-radius:var(--radius-md, 0);border:1px solid var(--color-divider);background:var(--color-bg);font-family:var(--sf-mono);font-size:13px;font-weight:600;color:var(--sf-text)}mat-icon[_ngcontent-%COMP%]{width:16px;height:16px;font-size:16px;color:var(--sf-text-muted)}"]})};export{y};
@@ -1 +1 @@
1
- import {O as Oy,bb as wt,x as xe,Y as Y8,Z as Z8,_ as sr,f as ci,a0 as ot,u as ui,a5 as di,G as It,m as ma,V as VC,b as Id,A as pC,r as ri,k as hy,g as Yg}from'./main-YM5YA3UI.js';var _=["*"];function P(e,i){if(e&1&&(ma(0,"mat-icon",2),VC(1),Id()),e&2){let t=pC();It("sf-spin",t.spin()),ri(),hy(t.icon());}}function w(e,i){e&1&&Yg(0,"span",1);}var y=class e{tone=Oy("neutral");icon=Oy();spin=Oy(false,{transform:wt});dot=Oy(false,{transform:wt});size=Oy("md");static \u0275fac=function(t){return new(t||e)};static \u0275cmp=xe({type:e,selectors:[["sf-status-chip"]],hostVars:4,hostBindings:function(t,n){t&2&&(di("sf-chip sf-chip--"+n.tone()),It("sf-chip--sm",n.size()==="sm"));},inputs:{tone:[1,"tone"],icon:[1,"icon"],spin:[1,"spin"],dot:[1,"dot"],size:[1,"size"]},ngContentSelectors:_,decls:3,vars:1,consts:[["aria-hidden","true",3,"sf-spin"],["aria-hidden","true",1,"dot"],["aria-hidden","true"]],template:function(t,n){t&1&&(sr(),ci(0,P,2,3,"mat-icon",0)(1,w,1,0,"span",1),ot(2)),t&2&&ui(n.icon()?0:n.dot()?1:-1);},dependencies:[Y8,Z8],styles:["[_nghost-%COMP%]{--tone: var(--color-neutral-500);--tone-text: var(--color-text-secondary);display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 12px;border-radius:var(--radius-pill, 0);border:1px solid color-mix(in srgb,var(--tone) 40%,transparent);background:color-mix(in srgb,var(--tone) 12%,transparent);color:var(--tone-text);font-size:13px;font-weight:600;white-space:nowrap;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box}.sf-chip--sm[_nghost-%COMP%]{height:24px;padding:0 10px;font-size:12.5px}mat-icon[_ngcontent-%COMP%]{width:14px;height:14px;font-size:14px}.dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;background:var(--color-success)}.sf-chip--blue[_nghost-%COMP%]{--tone: var(--color-accent);--tone-text: var(--color-accent-700)}.sf-chip--amber[_nghost-%COMP%]{--tone: var(--color-warning);--tone-text: var(--status-pending-text)}.sf-chip--green[_nghost-%COMP%]{--tone: var(--color-success);--tone-text: color-mix(in srgb, var(--color-success) 70%, var(--color-text))}.sf-chip--red[_nghost-%COMP%]{--tone: var(--color-error);--tone-text: var(--red-deep)}.sf-chip--neutral[_nghost-%COMP%]{--tone: var(--color-neutral-500);--tone-text: var(--color-text-secondary)}.sf-chip--violet[_nghost-%COMP%]{--tone: var(--color-accent);--tone-text: var(--color-accent-800);background:color-mix(in srgb,var(--tone) 22%,transparent)}.sf-chip--cyan[_nghost-%COMP%]{--tone: var(--color-info);--tone-text: color-mix(in srgb, var(--color-info) 50%, var(--color-text))}"]})};export{y};
1
+ import {O as Oy,bb as wt,x as xe,Y as Y8,Z as Z8,_ as sr,f as ci,a0 as ot,u as ui,a5 as di,G as It,m as ma,V as VC,b as Id,A as pC,r as ri,k as hy,g as Yg}from'./main-T4S6RIJZ.js';var _=["*"];function P(e,i){if(e&1&&(ma(0,"mat-icon",2),VC(1),Id()),e&2){let t=pC();It("sf-spin",t.spin()),ri(),hy(t.icon());}}function w(e,i){e&1&&Yg(0,"span",1);}var y=class e{tone=Oy("neutral");icon=Oy();spin=Oy(false,{transform:wt});dot=Oy(false,{transform:wt});size=Oy("md");static \u0275fac=function(t){return new(t||e)};static \u0275cmp=xe({type:e,selectors:[["sf-status-chip"]],hostVars:4,hostBindings:function(t,n){t&2&&(di("sf-chip sf-chip--"+n.tone()),It("sf-chip--sm",n.size()==="sm"));},inputs:{tone:[1,"tone"],icon:[1,"icon"],spin:[1,"spin"],dot:[1,"dot"],size:[1,"size"]},ngContentSelectors:_,decls:3,vars:1,consts:[["aria-hidden","true",3,"sf-spin"],["aria-hidden","true",1,"dot"],["aria-hidden","true"]],template:function(t,n){t&1&&(sr(),ci(0,P,2,3,"mat-icon",0)(1,w,1,0,"span",1),ot(2)),t&2&&ui(n.icon()?0:n.dot()?1:-1);},dependencies:[Y8,Z8],styles:["[_nghost-%COMP%]{--tone: var(--color-neutral-500);--tone-text: var(--color-text-secondary);display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 12px;border-radius:var(--radius-pill, 0);border:1px solid color-mix(in srgb,var(--tone) 40%,transparent);background:color-mix(in srgb,var(--tone) 12%,transparent);color:var(--tone-text);font-size:13px;font-weight:600;white-space:nowrap;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box}.sf-chip--sm[_nghost-%COMP%]{height:24px;padding:0 10px;font-size:12.5px}mat-icon[_ngcontent-%COMP%]{width:14px;height:14px;font-size:14px}.dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;background:var(--color-success)}.sf-chip--blue[_nghost-%COMP%]{--tone: var(--color-accent);--tone-text: var(--color-accent-700)}.sf-chip--amber[_nghost-%COMP%]{--tone: var(--color-warning);--tone-text: var(--status-pending-text)}.sf-chip--green[_nghost-%COMP%]{--tone: var(--color-success);--tone-text: color-mix(in srgb, var(--color-success) 70%, var(--color-text))}.sf-chip--red[_nghost-%COMP%]{--tone: var(--color-error);--tone-text: var(--red-deep)}.sf-chip--neutral[_nghost-%COMP%]{--tone: var(--color-neutral-500);--tone-text: var(--color-text-secondary)}.sf-chip--violet[_nghost-%COMP%]{--tone: var(--color-accent);--tone-text: var(--color-accent-800);background:color-mix(in srgb,var(--tone) 22%,transparent)}.sf-chip--cyan[_nghost-%COMP%]{--tone: var(--color-info);--tone-text: color-mix(in srgb, var(--color-info) 50%, var(--color-text))}"]})};export{y};
@@ -1 +1 @@
1
- import {O as Oy,p as hU,q as lT,x as xe,bV as dn,bs as rh,cj as pn,bW as fn,d as eC,r as ri,aM as cy,s as ir,t as tC,f as ci,G as It,u as ui,B as aC,cK as ty,a6 as Wp,A as pC,a7 as Gp,V as VC,bx as Xg,k as hy,v as my,a8 as Sd,aU as KC,aA as gy}from'./main-YM5YA3UI.js';var X=()=>[],Y=(t,n)=>n.kind+":"+n.from+":"+n.to,q=(t,n)=>n.step.id,K=(t,n)=>n.name;function Q(t,n){if(t&1&&(rh(),dn(0,"text",7),VC(1),fn()),t&2){let e=pC().$implicit;ir("x",e.x)("y",e.y),ri(),hy(e.label);}}function U(t,n){if(t&1&&(rh(),pn(0,"path",6),ci(1,Q,2,3,":svg:text",7)),t&2){let e=n.$implicit;It("edge--fail-return",e.kind==="fail-return"),ir("d",e.path)("data-dependency",e.from+":"+e.to),ri(),ui(e.label?1:-1);}}function Z(t,n){if(t&1&&(dn(0,"span"),VC(1),fn()),t&2){let e=pC().$implicit;ri(),Sd("Decision \xB7 ",e.step.decision.mode);}}function ee(t,n){if(t&1&&(dn(0,"span"),VC(1),fn()),t&2){let e=pC().$implicit;ri(),Sd("Join \xB7 ",e.step.join);}}function te(t,n){if(t&1&&(dn(0,"span"),VC(1),fn()),t&2){let e=pC().$implicit;ri(),my("",e.step.status," \xB7 ",e.step.activation);}}function ne(t,n){if(t&1&&(dn(0,"span"),VC(1),fn()),t&2){let e=pC().$implicit;ri(),my("FAIL \u2192 ",e.step.outcomeTransitions?.fail?.target," \xB7 \u2264",e.step.outcomeTransitions?.fail?.maxCycles??2," cycles");}}function ie(t,n){if(t&1&&(dn(0,"span"),VC(1),fn()),t&2){let e=n;ri(),gy("execution ",e.executionNumber," \xB7 cycle ",e.cycleNumber??0," \xB7 ",e.status);}}function oe(t,n){if(t&1&&(dn(0,"span"),VC(1),fn()),t&2){let e=n;ri(),gy("correction ",e.cycleNumber,"/",e.maxCycles," \xB7 ",e.status);}}function ae(t,n){if(t&1&&(dn(0,"span"),VC(1),fn()),t&2){let e=pC().$implicit;ri(),Sd("Selected: ",e.step.routeDecision.selectedRoutes.join(", "));}}function re(t,n){if(t&1&&(dn(0,"span",9),VC(1),fn()),t&2){let e=n.$implicit;ri(),my("Route ",e.name," to ",e.target);}}function se(t,n){if(t&1){let e=aC();dn(0,"button",8),ty("click",function(){let a=Wp(e).$implicit,c=pC();return Gp(c.selected.emit(a.step.id))}),dn(1,"strong"),VC(2),fn(),dn(3,"span"),VC(4),fn(),ci(5,Z,2,1,"span"),ci(6,ee,2,1,"span"),ci(7,te,2,2,"span"),ci(8,ne,2,2,"span"),ci(9,ie,2,3,"span"),ci(10,oe,2,3,"span"),ci(11,ae,2,1,"span"),dn(12,"span",9),VC(13),fn(),eC(14,re,2,2,"span",9,K),fn();}if(t&2){let e,l,a=n.$implicit,c=pC();cy("left",a.x,"px")("top",a.y,"px"),Xg("disabled",c.disabled()),ir("data-step-node",a.step.id)("aria-pressed",c.selectedId()===a.step.id),ri(2),hy(a.step.name),ri(2),my("",a.step.responsibility?.kind," \xB7 ",a.step.responsibility?.name),ri(),ui(a.step.decision?5:-1),ri(),ui(a.step.join?6:-1),ri(),ui(a.step.status?7:-1),ri(),ui(a.step.outcomeTransitions?.fail?.action==="return"?8:-1),ri(),ui((e=c.currentExecution(a.step.id))?9:-1,e),ri(),ui((l=c.correctionFor(a.step.id))?10:-1,l),ri(),ui(a.step.routeDecision?11:-1),ri(2),Sd("Depends on: ",a.step.dependsOn?.join(", ")||"none"),ri(),tC(a.step.decision?.routes??KC(18,X));}}function de(t){let n=new Map,e=new Map(t.map(i=>[i.id,i]));function l(i,p=new Set){if(n.has(i))return n.get(i)??0;if(p.has(i))return 0;p.add(i);let s=(e.get(i)?.dependsOn??[]).filter(u=>e.has(u)),f=s.length?1+Math.max(...s.map(u=>l(u,new Set(p)))):0;return n.set(i,f),f}let a=new Map,c=t.map(i=>{let p=l(i.id),s=a.get(p)??0;return a.set(p,s+1),{step:i,x:p*360+16,y:s*180+16}}),T=new Map(c.map(i=>[i.step.id,i])),R=c.flatMap(i=>(i.step.dependsOn??[]).flatMap(p=>{let s=T.get(p);if(!s)return [];let f=s.x+216,u=s.y+40,_=i.x,b=i.y+40,E=s.step.decision?.routes.find(J=>J.target===i.step.id);return [{label:E?`${E.name} (${s.step.decision?.mode})`:i.step.join?"join":"",kind:"dependency",x:(f+_)/2,y:(u+b)/2-8,from:p,to:i.step.id,path:`M ${f} ${u} C ${f+22} ${u}, ${_-22} ${b}, ${_} ${b}`}]})),H=c.flatMap(i=>{let p=i.step.outcomeTransitions?.fail?.action==="return"?i.step.outcomeTransitions.fail.target:void 0,s=p?T.get(p):void 0;if(!s)return [];let f=i.x+108,u=i.y+80,_=s.x+108,b=s.y+80,E=i.step.outcomeTransitions?.fail?.maxCycles??2;return [{from:i.step.id,to:s.step.id,kind:"fail-return",label:`FAIL \u2192 correction (\u2264${E})`,x:(f+_)/2,y:Math.max(u,b)+26,path:`M ${f} ${u} C ${f} ${u+56}, ${_} ${b+56}, ${_} ${b}`}]});return {nodes:c,edges:[...R,...H],width:Math.max(260,...c.map(i=>i.x+240)),height:Math.max(180,...c.map(i=>i.y+164))}}var A=class t{steps=Oy([]);selectedId=Oy(null);executions=Oy([]);correction=Oy();disabled=Oy(false);selected=hU();layout=lT(()=>de(this.steps()));currentExecution(n){return this.executions().filter(e=>e.stepId===n).at(-1)}correctionFor(n){let e=this.correction();return e?.triggeringStepId===n||e?.returnTargetStepId===n?e:void 0}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=xe({type:t,selectors:[["sf-workflow-definition-diagram"]],inputs:{steps:[1,"steps"],selectedId:[1,"selectedId"],executions:[1,"executions"],correction:[1,"correction"],disabled:[1,"disabled"]},outputs:{selected:"selected"},decls:10,vars:6,consts:[["role","region","aria-label","Workflow steps and dependencies","tabindex","0",1,"scroll"],[1,"diagram"],["aria-hidden","true"],["id","definition-arrow","viewBox","0 0 10 10","refX","9","refY","5","markerWidth","6","markerHeight","6","orient","auto-start-reverse"],["d","M 0 0 L 10 5 L 0 10 z"],["type","button",3,"left","top","disabled"],["marker-end","url(#definition-arrow)",1,"edge"],["text-anchor","middle","font-size","10"],["type","button",3,"click","disabled"],[1,"sr-only"]],template:function(e,l){e&1&&(dn(0,"div",0)(1,"div",1),rh(),dn(2,"svg",2)(3,"defs")(4,"marker",3),pn(5,"path",4),fn()(),eC(6,U,2,5,null,null,Y),fn(),eC(8,se,16,19,"button",5,q),fn()()),e&2&&(ri(),cy("width",l.layout().width,"px")("height",l.layout().height,"px"),ri(),ir("width",l.layout().width)("height",l.layout().height),ri(4),tC(l.layout().edges),ri(2),tC(l.layout().nodes));},styles:["[_nghost-%COMP%]{display:block;min-width:0}.scroll[_ngcontent-%COMP%]{min-width:0;max-width:100%;box-sizing:border-box;overflow:auto;border:1px solid var(--sf-outline);border-radius:8px}.diagram[_ngcontent-%COMP%]{position:relative}svg[_ngcontent-%COMP%]{position:absolute;inset:0;pointer-events:none;fill:var(--sf-text-secondary, currentColor)}.edge[_ngcontent-%COMP%]{fill:none;stroke:var(--sf-text-secondary, currentColor);stroke-width:2}.edge--fail-return[_ngcontent-%COMP%]{stroke:var(--color-error, #b3261e);stroke-dasharray:5 4}button[_ngcontent-%COMP%]{position:absolute;width:216px;min-height:80px;padding:12px;border:1px solid var(--sf-outline);border-radius:8px;background:var(--sf-surface-2);color:inherit;cursor:pointer;text-align:left}button[aria-pressed=true][_ngcontent-%COMP%]{outline:2px solid var(--sf-primary, #9fa8ff)}button[_ngcontent-%COMP%]:focus-visible{outline:3px solid var(--sf-primary, #9fa8ff);outline-offset:3px}strong[_ngcontent-%COMP%], span[_ngcontent-%COMP%]{display:block;overflow-wrap:anywhere}strong[_ngcontent-%COMP%]{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}span[_ngcontent-%COMP%]{font-size:12px;margin-top:4px}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}"]})};export{A};
1
+ import {O as Oy,n as hU,q as lT,x as xe,bV as dn,bs as rh,cj as pn,bW as fn,d as eC,r as ri,aM as cy,s as ir,t as tC,f as ci,G as It,u as ui,B as aC,cK as ty,a6 as Wp,A as pC,a7 as Gp,V as VC,bx as Xg,k as hy,v as my,a8 as Sd,aU as KC,aA as gy}from'./main-T4S6RIJZ.js';var X=()=>[],Y=(t,n)=>n.kind+":"+n.from+":"+n.to,q=(t,n)=>n.step.id,K=(t,n)=>n.name;function Q(t,n){if(t&1&&(rh(),dn(0,"text",7),VC(1),fn()),t&2){let e=pC().$implicit;ir("x",e.x)("y",e.y),ri(),hy(e.label);}}function U(t,n){if(t&1&&(rh(),pn(0,"path",6),ci(1,Q,2,3,":svg:text",7)),t&2){let e=n.$implicit;It("edge--fail-return",e.kind==="fail-return"),ir("d",e.path)("data-dependency",e.from+":"+e.to),ri(),ui(e.label?1:-1);}}function Z(t,n){if(t&1&&(dn(0,"span"),VC(1),fn()),t&2){let e=pC().$implicit;ri(),Sd("Decision \xB7 ",e.step.decision.mode);}}function ee(t,n){if(t&1&&(dn(0,"span"),VC(1),fn()),t&2){let e=pC().$implicit;ri(),Sd("Join \xB7 ",e.step.join);}}function te(t,n){if(t&1&&(dn(0,"span"),VC(1),fn()),t&2){let e=pC().$implicit;ri(),my("",e.step.status," \xB7 ",e.step.activation);}}function ne(t,n){if(t&1&&(dn(0,"span"),VC(1),fn()),t&2){let e=pC().$implicit;ri(),my("FAIL \u2192 ",e.step.outcomeTransitions?.fail?.target," \xB7 \u2264",e.step.outcomeTransitions?.fail?.maxCycles??2," cycles");}}function ie(t,n){if(t&1&&(dn(0,"span"),VC(1),fn()),t&2){let e=n;ri(),gy("execution ",e.executionNumber," \xB7 cycle ",e.cycleNumber??0," \xB7 ",e.status);}}function oe(t,n){if(t&1&&(dn(0,"span"),VC(1),fn()),t&2){let e=n;ri(),gy("correction ",e.cycleNumber,"/",e.maxCycles," \xB7 ",e.status);}}function ae(t,n){if(t&1&&(dn(0,"span"),VC(1),fn()),t&2){let e=pC().$implicit;ri(),Sd("Selected: ",e.step.routeDecision.selectedRoutes.join(", "));}}function re(t,n){if(t&1&&(dn(0,"span",9),VC(1),fn()),t&2){let e=n.$implicit;ri(),my("Route ",e.name," to ",e.target);}}function se(t,n){if(t&1){let e=aC();dn(0,"button",8),ty("click",function(){let a=Wp(e).$implicit,c=pC();return Gp(c.selected.emit(a.step.id))}),dn(1,"strong"),VC(2),fn(),dn(3,"span"),VC(4),fn(),ci(5,Z,2,1,"span"),ci(6,ee,2,1,"span"),ci(7,te,2,2,"span"),ci(8,ne,2,2,"span"),ci(9,ie,2,3,"span"),ci(10,oe,2,3,"span"),ci(11,ae,2,1,"span"),dn(12,"span",9),VC(13),fn(),eC(14,re,2,2,"span",9,K),fn();}if(t&2){let e,l,a=n.$implicit,c=pC();cy("left",a.x,"px")("top",a.y,"px"),Xg("disabled",c.disabled()),ir("data-step-node",a.step.id)("aria-pressed",c.selectedId()===a.step.id),ri(2),hy(a.step.name),ri(2),my("",a.step.responsibility?.kind," \xB7 ",a.step.responsibility?.name),ri(),ui(a.step.decision?5:-1),ri(),ui(a.step.join?6:-1),ri(),ui(a.step.status?7:-1),ri(),ui(a.step.outcomeTransitions?.fail?.action==="return"?8:-1),ri(),ui((e=c.currentExecution(a.step.id))?9:-1,e),ri(),ui((l=c.correctionFor(a.step.id))?10:-1,l),ri(),ui(a.step.routeDecision?11:-1),ri(2),Sd("Depends on: ",a.step.dependsOn?.join(", ")||"none"),ri(),tC(a.step.decision?.routes??KC(18,X));}}function de(t){let n=new Map,e=new Map(t.map(i=>[i.id,i]));function l(i,p=new Set){if(n.has(i))return n.get(i)??0;if(p.has(i))return 0;p.add(i);let s=(e.get(i)?.dependsOn??[]).filter(u=>e.has(u)),f=s.length?1+Math.max(...s.map(u=>l(u,new Set(p)))):0;return n.set(i,f),f}let a=new Map,c=t.map(i=>{let p=l(i.id),s=a.get(p)??0;return a.set(p,s+1),{step:i,x:p*360+16,y:s*180+16}}),T=new Map(c.map(i=>[i.step.id,i])),R=c.flatMap(i=>(i.step.dependsOn??[]).flatMap(p=>{let s=T.get(p);if(!s)return [];let f=s.x+216,u=s.y+40,_=i.x,b=i.y+40,E=s.step.decision?.routes.find(J=>J.target===i.step.id);return [{label:E?`${E.name} (${s.step.decision?.mode})`:i.step.join?"join":"",kind:"dependency",x:(f+_)/2,y:(u+b)/2-8,from:p,to:i.step.id,path:`M ${f} ${u} C ${f+22} ${u}, ${_-22} ${b}, ${_} ${b}`}]})),H=c.flatMap(i=>{let p=i.step.outcomeTransitions?.fail?.action==="return"?i.step.outcomeTransitions.fail.target:void 0,s=p?T.get(p):void 0;if(!s)return [];let f=i.x+108,u=i.y+80,_=s.x+108,b=s.y+80,E=i.step.outcomeTransitions?.fail?.maxCycles??2;return [{from:i.step.id,to:s.step.id,kind:"fail-return",label:`FAIL \u2192 correction (\u2264${E})`,x:(f+_)/2,y:Math.max(u,b)+26,path:`M ${f} ${u} C ${f} ${u+56}, ${_} ${b+56}, ${_} ${b}`}]});return {nodes:c,edges:[...R,...H],width:Math.max(260,...c.map(i=>i.x+240)),height:Math.max(180,...c.map(i=>i.y+164))}}var A=class t{steps=Oy([]);selectedId=Oy(null);executions=Oy([]);correction=Oy();disabled=Oy(false);selected=hU();layout=lT(()=>de(this.steps()));currentExecution(n){return this.executions().filter(e=>e.stepId===n).at(-1)}correctionFor(n){let e=this.correction();return e?.triggeringStepId===n||e?.returnTargetStepId===n?e:void 0}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=xe({type:t,selectors:[["sf-workflow-definition-diagram"]],inputs:{steps:[1,"steps"],selectedId:[1,"selectedId"],executions:[1,"executions"],correction:[1,"correction"],disabled:[1,"disabled"]},outputs:{selected:"selected"},decls:10,vars:6,consts:[["role","region","aria-label","Workflow steps and dependencies","tabindex","0",1,"scroll"],[1,"diagram"],["aria-hidden","true"],["id","definition-arrow","viewBox","0 0 10 10","refX","9","refY","5","markerWidth","6","markerHeight","6","orient","auto-start-reverse"],["d","M 0 0 L 10 5 L 0 10 z"],["type","button",3,"left","top","disabled"],["marker-end","url(#definition-arrow)",1,"edge"],["text-anchor","middle","font-size","10"],["type","button",3,"click","disabled"],[1,"sr-only"]],template:function(e,l){e&1&&(dn(0,"div",0)(1,"div",1),rh(),dn(2,"svg",2)(3,"defs")(4,"marker",3),pn(5,"path",4),fn()(),eC(6,U,2,5,null,null,Y),fn(),eC(8,se,16,19,"button",5,q),fn()()),e&2&&(ri(),cy("width",l.layout().width,"px")("height",l.layout().height,"px"),ri(),ir("width",l.layout().width)("height",l.layout().height),ri(4),tC(l.layout().edges),ri(2),tC(l.layout().nodes));},styles:["[_nghost-%COMP%]{display:block;min-width:0}.scroll[_ngcontent-%COMP%]{min-width:0;max-width:100%;box-sizing:border-box;overflow:auto;border:1px solid var(--sf-outline);border-radius:8px}.diagram[_ngcontent-%COMP%]{position:relative}svg[_ngcontent-%COMP%]{position:absolute;inset:0;pointer-events:none;fill:var(--sf-text-secondary, currentColor)}.edge[_ngcontent-%COMP%]{fill:none;stroke:var(--sf-text-secondary, currentColor);stroke-width:2}.edge--fail-return[_ngcontent-%COMP%]{stroke:var(--color-error, #b3261e);stroke-dasharray:5 4}button[_ngcontent-%COMP%]{position:absolute;width:216px;min-height:80px;padding:12px;border:1px solid var(--sf-outline);border-radius:8px;background:var(--sf-surface-2);color:inherit;cursor:pointer;text-align:left}button[aria-pressed=true][_ngcontent-%COMP%]{outline:2px solid var(--sf-primary, #9fa8ff)}button[_ngcontent-%COMP%]:focus-visible{outline:3px solid var(--sf-primary, #9fa8ff);outline-offset:3px}strong[_ngcontent-%COMP%], span[_ngcontent-%COMP%]{display:block;overflow-wrap:anywhere}strong[_ngcontent-%COMP%]{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}span[_ngcontent-%COMP%]{font-size:12px;margin-top:4px}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}"]})};export{A};