@whoz-oss/coday-factory-cockpit 0.0.0-workstream-forge.26 → 0.0.0-workstream-forge.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-DQGIYG48.js → chunk-4c29JuK_.js} +1 -1
- package/browser/{chunk-BTxEtkRc.js → chunk-6xNiKFWE.js} +1 -1
- package/browser/{chunk-BpryEbHm.js → chunk-B26Ww1rq.js} +1 -1
- package/browser/{chunk-BvcgLtmT.js → chunk-B4B0i3CG.js} +1 -1
- package/browser/{chunk-DI3QSFg9.js → chunk-BYZCY_yB.js} +1 -1
- package/browser/{chunk-CiCJJ4w9.js → chunk-B_7o4ypb.js} +2 -2
- package/browser/{chunk-BEKDZwB0.js → chunk-BjVbzNPP.js} +1 -1
- package/browser/{chunk-C_DeZqXA.js → chunk-Bu7fcbUT.js} +1 -1
- package/browser/{chunk-B57wvCYg.js → chunk-C0I1KIo5.js} +1 -1
- package/browser/{chunk-DtEfVbXy.js → chunk-CEMTAsgG.js} +1 -1
- package/browser/{chunk-Aooj_ST7.js → chunk-DZbBIzAF.js} +1 -1
- package/browser/{chunk-DipW3yuQ.js → chunk-MTEdlWS6.js} +1 -1
- package/browser/{chunk-B2308hrL.js → chunk-N5S-IAAY.js} +1 -1
- package/browser/{chunk-D9NghTGy.js → chunk-yvUmK3gv.js} +1 -1
- package/browser/index.html +1 -1
- package/browser/{main-4Q33BLD3.js → main-Q2L26FCS.js} +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {B as pe,C as ce,J as Jr,h,aS as ue,F as y,cq as TM,A as Ae,cr as JT,be as Ld,b1 as jg,f as fa,bp as Jp,z as zg,E as Ed,bH as eh,cs as Gg,bF as fC,Q as Qo,r as rr,bf as ry,$ as $g,X as ii,D as Dt,b2 as Xg,aM as uC,aN as lC,R as sC,ct as QC}from'./main-
|
|
1
|
+
import {B as pe,C as ce,J as Jr,h,aS as ue,F as y,cq as TM,A as Ae,cr as JT,be as Ld,b1 as jg,f as fa,bp as Jp,z as zg,E as Ed,bH as eh,cs as Gg,bF as fC,Q as Qo,r as rr,bf as ry,$ as $g,X as ii,D as Dt,b2 as Xg,aM as uC,aN as lC,R as sC,ct as QC}from'./main-Q2L26FCS.js';var I=["determinateSpinner"];function z(i,V){if(i&1&&(Jp(),fa(0,"svg",11),zg(1,"circle",12),Ed()),i&2){let e=sC();rr("viewBox",e._viewBox()),Qo(),ry("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),rr("r",e._circleRadius());}}var D=new y("mat-progress-spinner-default-options",{providedIn:"root",factory:()=>({diameter:O})}),O=100,N=10,Z=(()=>{class i{_elementRef=h(ue);_noopAnimations;get color(){return this._color||this._defaultColor}set color(e){this._color=e;}_color;_defaultColor="primary";_determinateCircle;constructor(){let e=h(D),n=TM(),r=this._elementRef.nativeElement;this._noopAnimations=n==="di-disabled"&&!!e&&!e._forceAnimations,this.mode=r.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&n==="reduced-motion"&&r.classList.add("mat-progress-spinner-reduced-motion"),e&&(e.color&&(this.color=this._defaultColor=e.color),e.diameter&&(this.diameter=e.diameter),e.strokeWidth&&(this.strokeWidth=e.strokeWidth));}mode;get value(){return this.mode==="determinate"?this._value:0}set value(e){this._value=Math.max(0,Math.min(100,e||0));}_value=0;get diameter(){return this._diameter}set diameter(e){this._diameter=e||0;}_diameter=O;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=e||0;}_strokeWidth;_circleRadius(){return (this.diameter-N)/2}_viewBox(){let e=this._circleRadius()*2+this.strokeWidth;return `0 0 ${e} ${e}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=Ae({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(n,r){if(n&1&&Xg(I,5),n&2){let s;uC(s=lC())&&(r._determinateCircle=s.first);}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(n,r){n&2&&(rr("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",r.mode==="determinate"?r.value:null)("mode",r.mode),ii("mat-"+r.color),ry("width",r.diameter,"px")("height",r.diameter,"px")("--mat-progress-spinner-size",r.diameter+"px")("--mat-progress-spinner-active-indicator-width",r.diameter+"px"),Dt("_mat-animation-noopable",r._noopAnimations)("mdc-circular-progress--indeterminate",r.mode==="indeterminate"));},inputs:{color:"color",mode:"mode",value:[2,"value","value",Ld],diameter:[2,"diameter","diameter",Ld],strokeWidth:[2,"strokeWidth","strokeWidth",Ld]},exportAs:["matProgressSpinner"],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(n,r){if(n&1&&(jg(0,z,2,8,"ng-template",null,0,QC),fa(2,"div",2,1),Jp(),fa(4,"svg",3),zg(5,"circle",4),Ed()(),eh(),fa(6,"div",5)(7,"div",6)(8,"div",7),Gg(9,8),Ed(),fa(10,"div",9),Gg(11,8),Ed(),fa(12,"div",10),Gg(13,8),Ed()()()),n&2){let s=fC(1);Qo(4),rr("viewBox",r._viewBox()),Qo(),ry("stroke-dasharray",r._strokeCircumference(),"px")("stroke-dashoffset",r._strokeDashOffset(),"px")("stroke-width",r._circleStrokeWidth(),"%"),rr("r",r._circleRadius()),Qo(4),$g("ngTemplateOutlet",s),Qo(2),$g("ngTemplateOutlet",s),Qo(2),$g("ngTemplateOutlet",s);}},dependencies:[JT],styles:[`.mat-mdc-progress-spinner {
|
|
2
2
|
--mat-progress-spinner-animation-multiplier: 1;
|
|
3
3
|
display: block;
|
|
4
4
|
overflow: hidden;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {B as pe,C as ce,aj as Pt,J as Jr,h,aS as ue,cd as be,ce as M,aR as P,cf as Ee,aT as ti,aW as ff,F as y,aV as q,cg as P3,a7 as ie,ch as C3,ci as qt,ah as Kt,bW as Vt,cj as zt,ck as Gn,cl as me,V as Vs,aH as tt,b0 as ha,aJ as Et,aK as gy,cm as Fe,c as Yg,bK as qg,r as rr,D as Dt,cn as Je,b6 as Bt,b9 as In,co as pn,cp as F,A as Ae}from'./main-
|
|
1
|
+
import {B as pe,C as ce,aj as Pt,J as Jr,h,aS as ue,cd as be,ce as M,aR as P,cf as Ee,aT as ti,aW as ff,F as y,aV as q,cg as P3,a7 as ie,ch as C3,ci as qt,ah as Kt,bW as Vt,cj as zt,ck as Gn,cl as me,V as Vs,aH as tt,b0 as ha,aJ as Et,aK as gy,cm as Fe,c as Yg,bK as qg,r as rr,D as Dt,cn as Je,b6 as Bt,b9 as In,co as pn,cp as F,A as Ae}from'./main-Q2L26FCS.js';var J=(()=>{class s{static \u0275fac=function(t){return new(t||s)};static \u0275cmp=Ae({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}from'./chunk-
|
|
1
|
+
import {B as Be,P as Pe}from'./chunk-6xNiKFWE.js';import {h,a4 as fb,S as St,a5 as ce,g as Ye,a6 as Dn,a7 as ie,p as pb,a8 as AW,a9 as cc,aa as M,A as Ae,ab as An,ac as Vn,ad as Ue,ae as yn,af as Cn,ag as Nt,ah as Kt,ai as Xt,N as Nt$1,I as IW,_ as _W,aj as Pt,ak as It,al as Me$1,am as Se,an as _i,a as A8,x as x8,ao as Wr,ap as Hr,aq as ce$1,f as fa,k as kC,E as Ed,v as ni,c as Yg,z as zg,ar as OI,Q as Qo,y as ri,$ as $g,u as uy,as as LI,a2 as Cd,q as qw,at as Gw,R as sC,Z as Zw}from'./main-Q2L26FCS.js';var de=(e,t)=>t.id;function pe(e,t){e&1&&(fa(0,"div",4)(1,"mat-icon",21),kC(2,"check_circle"),Ed(),fa(3,"span"),kC(4),Ed()()),e&2&&(Qo(4),uy(t));}function ue(e,t){e&1&&(fa(0,"div",5)(1,"mat-icon",21),kC(2,"error"),Ed(),fa(3,"span"),kC(4),Ed()()),e&2&&(Qo(4),uy(t));}function fe(e,t){e&1&&(fa(0,"div",6)(1,"mat-icon",21),kC(2,"warning"),Ed(),fa(3,"span"),kC(4),Ed()()),e&2&&(Qo(4),uy(t));}function ge(e,t){if(e&1&&(fa(0,"mat-option",22),kC(1),Ed()),e&2){let n=t.$implicit;$g("value",n),Qo(),uy(n);}}function he(e,t){if(e&1&&(fa(0,"mat-select",9),qw(1,ge,2,2,"mat-option",22,Gw),Ed(),OI()),e&2){let n=sC();LI(),Qo(),Zw(n.workflowTypes());}}function be(e,t){e&1&&(zg(0,"input",10),OI()),e&2&&LI();}function ye(e,t){e&1&&(fa(0,"mat-error"),kC(1,"Workflow definition is required."),Ed());}function xe(e,t){if(e&1&&(fa(0,"mat-option",22),kC(1),Ed()),e&2){let n=t.$implicit;$g("value",n.id),Qo(),uy(n.name);}}function Ce(e,t){if(e&1&&(fa(0,"mat-select",11),qw(1,xe,2,2,"mat-option",22,de),Ed(),OI()),e&2){let n=sC();LI(),Qo(),Zw(n.namespaces());}}function _e(e,t){e&1&&(zg(0,"input",12),OI()),e&2&&LI();}function ve(e,t){e&1&&(fa(0,"mat-error"),kC(1,"Namespace is required."),Ed());}function we(e,t){e&1&&(fa(0,"mat-error"),kC(1,"The objective must not exceed 4,000 characters."),Ed());}function Me(e){let t=Array.isArray(e)?e:Array.isArray(e?.items)?e.items:[],n=new Set;for(let a of t){if(typeof a=="string"){a.trim()&&n.add(a.trim());continue}let s=a?.workflowType;typeof s=="string"&&s.trim()&&n.add(s.trim());}return Array.from(n)}function ke(e){let t=e?.code??"UNKNOWN_ERROR",n=e?.message?.trim();return n?`${n} (${t})`:`Launch failed (${t}).`}var me=class e{api=h(fb);store=h(St);router=h(ce);workflowTypes=Ye([]);namespaces=Ye([]);submitting=Ye(false);successMessage=Ye(null);errorMessage=Ye(null);definitionsLoading=Ye(false);definitionsError=Ye(null);form=h(Dn).group({workflowType:["",ie.required],namespaceId:["",ie.required],title:["",ie.maxLength(200)],ticket:["",ie.maxLength(64)],initialRequest:["",ie.maxLength(4e3)]});constructor(){h(pb).crumbs.set([{label:"Sandboxes",link:"/sandboxes"},{label:"Launch a run"}]),this.loadDefinitions(),this.loadNamespaces();}loadDefinitions(){this.definitionsLoading.set(true),this.definitionsError.set(null),this.api.getWorkflowDefinitions().subscribe({next:t=>{let n=Me(t);if(this.workflowTypes.set(n),n.length===1){let[a]=n;a&&this.form.controls.workflowType.setValue(a);}this.definitionsLoading.set(false);},error:t=>{this.definitionsError.set(t?.message??"Workflow definitions unavailable."),this.definitionsLoading.set(false);}});}loadNamespaces(){this.api.getNamespaces().subscribe(t=>{let n=AW(t);this.namespaces.set(n);let[a]=n;a&&!this.form.controls.namespaceId.value&&this.form.controls.namespaceId.setValue(a.id);});}onSubmit(){if(this.submitting())return;if(this.form.invalid){this.form.markAllAsTouched();return}let{workflowType:t,namespaceId:n,title:a,ticket:s,initialRequest:C}=this.form.getRawValue(),y=a.trim(),E=s.trim(),S=C.trim(),ce=cc();this.submitting.set(true),this.successMessage.set(null),this.errorMessage.set(null),this.api.createWorkflowRun(M(M(M({workflowType:t},y?{title:y}:{}),S?{initialRequest:S}:{}),E?{parameters:{ticket:E}}:{}),n,ce).subscribe({next:_=>{this.submitting.set(false);let L=_?.submissionId;this.successMessage.set(L?`Launch accepted (id: ${L})`:"Launch accepted."),this.store.refresh(),this.router.navigate(["/sessions",_.workflowId]);},error:_=>{this.submitting.set(false),this.errorMessage.set(ke(_));}});}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-launch-page"]],decls:49,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"],["novalidate","",1,"sf-panel","launch-form",3,"ngSubmit","formGroup"],["appearance","outline",1,"field"],["formControlName","workflowType","data-launch-workflow-type","true"],["matInput","","formControlName","workflowType","placeholder","adw_simple_sdlc","data-launch-workflow-type","true",1,"sf-mono"],["formControlName","namespaceId","data-launch-namespace","true"],["matInput","","formControlName","namespaceId","placeholder","default","data-launch-namespace","true",1,"sf-mono"],["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","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","/sandboxes",1,"sf-secondary"],["aria-hidden","true"],[3,"value"]],template:function(n,a){if(n&1&&(fa(0,"div",0)(1,"header",1)(2,"div",2)(3,"h1"),kC(4,"Launch a run"),Ed(),fa(5,"p",3),kC(6," Creates and durably submits a real workflow. Factory assigns identity and execution context. "),Ed()()(),ni(7,pe,5,1,"div",4),ni(8,ue,5,1,"div",5),ni(9,fe,5,1,"div",6),fa(10,"form",7),Yg("ngSubmit",function(){return a.onSubmit()}),fa(11,"mat-form-field",8)(12,"mat-label"),kC(13,"Workflow definition"),Ed(),ni(14,he,3,0,"mat-select",9)(15,be,1,0,"input",10),ni(16,ye,2,0,"mat-error"),fa(17,"mat-hint"),kC(18),Ed()(),fa(19,"mat-form-field",8)(20,"mat-label"),kC(21,"Namespace"),Ed(),ni(22,Ce,3,0,"mat-select",11)(23,_e,1,0,"input",12),ni(24,ve,2,0,"mat-error"),Ed(),fa(25,"mat-form-field",13)(26,"mat-label"),kC(27,"Title (optional)"),Ed(),zg(28,"input",14),OI(),fa(29,"mat-hint"),kC(30,"Factory generates a readable title if omitted."),Ed()(),fa(31,"mat-form-field",8)(32,"mat-label"),kC(33,"Jira ticket (optional)"),Ed(),zg(34,"input",15),OI(),Ed(),fa(35,"mat-form-field",13)(36,"mat-label"),kC(37,"What would you like to do? (optional)"),Ed(),zg(38,"textarea",16),OI(),ni(39,we,2,0,"mat-error"),fa(40,"mat-hint",17),kC(41," Describe your objective, even briefly. The agent will ask for any clarifications needed. "),Ed()(),fa(42,"div",18)(43,"button",19)(44,"mat-icon"),kC(45),Ed(),kC(46),Ed(),fa(47,"a",20),kC(48,"Cancel"),Ed()()()()),n&2){let s,C,y;Qo(7),ri((s=a.successMessage())?7:-1,s),Qo(),ri((C=a.errorMessage())?8:-1,C),Qo(),ri((y=a.definitionsError())?9:-1,y),Qo(),$g("formGroup",a.form),Qo(4),ri(a.workflowTypes().length>0?14:15),Qo(2),ri(a.form.controls.workflowType.hasError("required")?16:-1),Qo(2),uy(a.definitionsLoading()?"Loading definitions\u2026":"workflowType"),Qo(4),ri(a.namespaces().length>0?22:23),Qo(2),ri(a.form.controls.namespaceId.hasError("required")?24:-1),Qo(4),LI(),Qo(6),LI(),Qo(4),LI(),Qo(),ri(a.form.controls.initialRequest.hasError("maxlength")?39:-1),Qo(4),$g("disabled",a.submitting()),Qo(2),uy(a.submitting()?"hourglass_top":"play_arrow"),Qo(),Cd(" ",a.submitting()?"Launching\u2026":"Launch run"," ");}},dependencies:[An,Vn,Ue,yn,Cn,Nt,Kt,Xt,Nt$1,IW,_W,Pt,It,Me$1,Se,_i,A8,x8,Be,Pe,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-size:28px;font-weight:800;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}.banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid;font-size:13.5px;font-weight:600}.banner[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px}.banner--success[_ngcontent-%COMP%]{color:#6ee79a;border-color:#22583a;background:#0e1f16}.banner--error[_ngcontent-%COMP%]{color:#f58f8f;border-color:#6b2a2e;background:#1f1114}.banner--warn[_ngcontent-%COMP%]{color:var(--sf-tertiary);border-color:#5a4818;background:#1d180b}@media(max-width:720px){.launch-form[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}"]})};export{me as LaunchPageComponent,Me as extractWorkflowTypes,ke as formatLaunchError};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {cI as dt$1,bt as En,aV as q,cJ as Rv,ba as Zb,by as Ce,cK as Ic,aw as O,B as pe$1,C as ce$1,J as Jr,aG as um,A as Ae,aI as qr,H as or,L as nt$1,v as ni$1,Q as Qo,y as ri$1,aK as gy,F as y,D as Dt,aH as tt,aJ as Et,cs as Gg,h,aL as Qg,aM as uC,aN as lC,bj as Bt,cL as Ay,b4 as Ny,aS as ue$1,bA as QS,cd as be,cM as A,bZ as Y,cN as Ee,aQ as k,aU as ke,b8 as Aa,aA as yr,cO as ut$1,cP as g,cQ as Se,cR as Z,cS as jb,cT as Yb,cU as Ab,cV as xb,aO as Gr,bL as Ur,b0 as ha,b_ as Gl,f as fa,E as Ed}from'./main-4Q33BLD3.js';var ot=[[["caption"]],[["colgroup"],["col"]],"*"],nt=["caption","colgroup, col","*"];function rt(i,n){i&1&&nt$1(0,2);}function st(i,n){i&1&&(fa(0,"thead",0),Gg(1,1),Ed(),fa(2,"tbody",0),Gg(3,2)(4,3),Ed(),fa(5,"tfoot",0),Gg(6,4),Ed());}function at(i,n){i&1&&Gg(0,1)(1,2)(2,3)(3,4);}var R=new y("CDK_TABLE");var te=(()=>{class i{template=h(Ur);static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","cdkCellDef",""]]})}return i})(),ie=(()=>{class i{template=h(Ur);static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","cdkHeaderCellDef",""]]})}return i})(),Qe=(()=>{class i{template=h(Ur);static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","cdkFooterCellDef",""]]})}return i})(),U=(()=>{class i{_table=h(R,{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=tt({type:i,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,o,r){if(t&1&&Qg(r,te,5)(r,ie,5)(r,Qe,5),t&2){let s;uC(s=lC())&&(o.cell=s.first),uC(s=lC())&&(o.headerCell=s.first),uC(s=lC())&&(o.footerCell=s.first);}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",Et],stickyEnd:[2,"stickyEnd","stickyEnd",Et]}})}return i})(),ee=class{constructor(n,e){e.nativeElement.classList.add(...n._columnCssClassName);}},We=(()=>{class i extends ee{constructor(){super(h(U),h(ue$1));}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[qr]})}return i})();var $e=(()=>{class i extends ee{constructor(){let e=h(U),t=h(ue$1);super(e,t);let o=e._table?._getCellRole();o&&t.nativeElement.setAttribute("role",o);}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[qr]})}return i})();var de=(()=>{class i{template=h(Ur);_differs=h(Ay);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 W?e.headerCell.template:this instanceof fe?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,features:[ha]})}return i})(),W=(()=>{class i extends de{_table=h(R,{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(o){return (e||(e=um(i)))(o||i)}})();static \u0275dir=tt({type:i,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",Et]},features:[qr,ha]})}return i})(),fe=(()=>{class i extends de{_table=h(R,{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(o){return (e||(e=um(i)))(o||i)}})();static \u0275dir=tt({type:i,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",Et]},features:[qr,ha]})}return i})(),oe=(()=>{class i extends de{_table=h(R,{optional:true});when;static \u0275fac=(()=>{let e;return function(o){return (e||(e=um(i)))(o||i)}})();static \u0275dir=tt({type:i,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[qr]})}return i})(),N=(()=>{class i{_viewContainer=h(Gr);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=tt({type:i,selectors:[["","cdkCellOutlet",""]]})}return i})(),ue=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Ae({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,o){t&1&&Gg(0,0);},dependencies:[N],encapsulation:2,changeDetection:1})}return i})();var he=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Ae({type:i,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&Gg(0,0);},dependencies:[N],encapsulation:2,changeDetection:1})}return i})(),ne=(()=>{class i{templateRef=h(Ur);_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=tt({type:i,selectors:[["ng-template","cdkNoDataRow",""]]})}return i})(),Ue=["top","bottom","left","right"],ce=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(n=>this._updateCachedSizes(n)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=false;constructor(n,e,t=true,o=true,r,s,a){this._isNativeHtmlTable=n,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=o,this.direction=r,this._positionListener=s,this._tableInjector=a,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`};}clearStickyPositioning(n,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(n);let t=[];for(let o of n)o.nodeType===o.ELEMENT_NODE&&t.push(o,...Array.from(o.children));Gl({write:()=>{for(let o of t)this._removeStickyStyle(o,e);}},{injector:this._tableInjector});}updateStickyColumns(n,e,t,o=true,r=true){if(!n.length||!this._isBrowser||!(e.some(D=>D)||t.some(D=>D))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let s=n[0],a=s.children.length,c=this.direction==="rtl",d=c?"right":"left",u=c?"left":"right",h=e.lastIndexOf(true),y=t.indexOf(true),_,we,Ce;r&&this._updateStickyColumnReplayQueue({rows:[...n],stickyStartStates:[...e],stickyEndStates:[...t]}),Gl({earlyRead:()=>{_=this._getCellWidths(s,o),we=this._getStickyStartColumnPositions(_,e),Ce=this._getStickyEndColumnPositions(_,t);},write:()=>{for(let D of n)for(let w=0;w<a;w++){let De=D.children[w];e[w]&&this._addStickyStyle(De,d,we[w],w===h),t[w]&&this._addStickyStyle(De,u,Ce[w],w===y);}this._positionListener&&_.some(D=>!!D)&&(this._positionListener.stickyColumnsUpdated({sizes:h===-1?[]:_.slice(0,h+1).map((D,w)=>e[w]?D:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:y===-1?[]:_.slice(y).map((D,w)=>t[w+y]?D:null).reverse()}));}},{injector:this._tableInjector});}stickRows(n,e,t){if(!this._isBrowser)return;let o=t==="bottom"?n.slice().reverse():n,r=t==="bottom"?e.slice().reverse():e,s=[],a=[],c=[];Gl({earlyRead:()=>{for(let d=0,u=0;d<o.length;d++){if(!r[d])continue;s[d]=u;let h=o[d];c[d]=this._isNativeHtmlTable?Array.from(h.children):[h];let y=this._retrieveElementSize(h).height;u+=y,a[d]=y;}},write:()=>{let d=r.lastIndexOf(true);for(let u=0;u<o.length;u++){if(!r[u])continue;let h=s[u],y=u===d;for(let _ of c[u])this._addStickyStyle(_,t,h,y);}t==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:a,offsets:s,elements:c}):this._positionListener?.stickyFooterRowsUpdated({sizes:a,offsets:s,elements:c});}},{injector:this._tableInjector});}updateStickyFooterContainer(n,e){this._isNativeHtmlTable&&Gl({write:()=>{let t=n.querySelector("tfoot");t&&(e.some(o=>!o)?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(n,e){if(!n.classList.contains(this._stickCellCss))return;for(let o of e)n.style[o]="",n.classList.remove(this._borderCellCss[o]);Ue.some(o=>e.indexOf(o)===-1&&n.style[o])?n.style.zIndex=this._getCalculatedZIndex(n):(n.style.zIndex="",this._needsPositionStickyOnElement&&(n.style.position=""),n.classList.remove(this._stickCellCss));}_addStickyStyle(n,e,t,o){n.classList.add(this._stickCellCss),o&&n.classList.add(this._borderCellCss[e]),n.style[e]=`${t}px`,n.style.zIndex=this._getCalculatedZIndex(n),this._needsPositionStickyOnElement&&(n.style.cssText+="position: -webkit-sticky; position: sticky; ");}_getCalculatedZIndex(n){let e={top:100,bottom:10,left:1,right:1},t=0;for(let o of Ue)n.style[o]&&(t+=e[o]);return t?`${t}`:""}_getCellWidths(n,e=true){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],o=n.children;for(let r=0;r<o.length;r++){let s=o[r];t.push(this._retrieveElementSize(s).width);}return this._cachedCellWidths=t,t}_getStickyStartColumnPositions(n,e){let t=[],o=0;for(let r=0;r<n.length;r++)e[r]&&(t[r]=o,o+=n[r]);return t}_getStickyEndColumnPositions(n,e){let t=[],o=0;for(let r=n.length;r>0;r--)e[r]&&(t[r]=o,o+=n[r]);return t}_retrieveElementSize(n){let e=this._elemSizeCache.get(n);if(e)return e;let t=n.getBoundingClientRect(),o={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(n,o),this._resizeObserver.observe(n,{box:"border-box"})),o}_updateStickyColumnReplayQueue(n){this._removeFromStickyColumnReplayQueue(n.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(n);}_removeFromStickyColumnReplayQueue(n){let e=new Set(n);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(o=>!e.has(o));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length);}_updateCachedSizes(n){let e=false;for(let t of n){let o=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};o.width!==this._elemSizeCache.get(t.target)?.width&<(t.target)&&(e=true),this._elemSizeCache.set(t.target,o);}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 lt(i){return ["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(n=>i.classList.contains(n))}var Q=new y("STICKY_POSITIONING_LISTENER");var me=(()=>{class i{viewContainer=h(Gr);elementRef=h(ue$1);constructor(){let e=h(R);e._rowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","rowOutlet",""]]})}return i})(),ye=(()=>{class i{viewContainer=h(Gr);elementRef=h(ue$1);constructor(){let e=h(R);e._headerRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","headerRowOutlet",""]]})}return i})(),_e=(()=>{class i{viewContainer=h(Gr);elementRef=h(ue$1);constructor(){let e=h(R);e._footerRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","footerRowOutlet",""]]})}return i})(),pe=(()=>{class i{viewContainer=h(Gr);elementRef=h(ue$1);constructor(){let e=h(R);e._noDataRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","noDataRowOutlet",""]]})}return i})(),ge=(()=>{class i{_differs=h(Ay);_changeDetectorRef=h(Ny);_elementRef=h(ue$1);_dir=h(QS,{optional:true});_platform=h(be);_viewRepeater;_viewportRuler=h(A);_injector=h(Y);_virtualScrollViewport=h(Ee,{optional:true,host:true});_positionListener=h(Q,{optional:true})||h(Q,{optional:true,skipSelf:true});_document=h(k);_data;_renderedRange;_onDestroy=new q;_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 q;_footerRowStickyUpdates=new q;_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 q;_dataStream=new q;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 ke;viewChange=new En({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;get renderedRows(){return this._renderRows}constructor(){h(new Aa("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,o)=>this.trackBy?this.trackBy(o.dataIndex,o.data):o);}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(yr(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=true;});}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new ut$1:new g,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(),Se(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,(o,r,s)=>this._getEmbeddedViewArgs(o.item,s),o=>o.item.data,o=>{o.operation===Z.INSERTED&&o.context&&this._renderCellTemplateForItem(o.record.item.rowDef,o.context);}),this._updateRowIndexContext(),e.forEachIdentityChange(o=>{let r=t.get(o.currentIndex);r.context.$implicit=o.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 o=Ve(this._headerRowOutlet,"thead");o&&(o.style.display=e.length?"":"none");}let t=this._headerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(o=>o.resetStickyChanged());}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let o=Ve(this._footerRowOutlet,"tfoot");o&&(o.style.display=e.length?"":"none");}let t=this._footerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(o=>o.resetStickyChanged());}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),o=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...o],["left","right"]),this._stickyColumnStylesNeedReset=false),e.forEach((r,s)=>{this._addStickyColumnStyles([r],this._headerRowDefs[s]);}),this._rowDefs.forEach(r=>{let s=[];for(let a=0;a<t.length;a++)this._renderRows[a].rowDef===r&&s.push(t[a]);this._addStickyColumnStyles(s,r);}),o.forEach((r,s)=>{this._addStickyColumnStyles([r],this._footerRowDefs[s]);}),Array.from(this._columnDefsByName.values()).forEach(r=>r.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),o=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=this._renderedRange.start;r<t;r++){let s=this._data[r],a=this._getRenderRowsForData(s,r,o.get(s));this._cachedRenderRowsMap.has(s)||this._cachedRenderRowsMap.set(s,new WeakMap);for(let c=0;c<a.length;c++){let d=a[c],u=this._cachedRenderRowsMap.get(d.data);u.has(d.rowDef)?u.get(d.rowDef).push(d):u.set(d.rowDef,[d]),e.push(d);}}return e}_getRenderRowsForData(e,t,o){return this._getRowDefs(e,t).map(s=>{let a=o&&o.has(s)?o.get(s):[];if(a.length){let c=a.shift();return c.dataIndex=t,c}else return {data:e,rowDef:s,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),J(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t);});}_cacheRowDefs(){this._headerRowDefs=J(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=J(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=J(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0];}_renderUpdatedColumns(){let e=(s,a)=>{let c=!!a.getColumnsDiff();return s||c},t=this._rowDefs.reduce(e,false);t&&this._forceRenderDataRows();let o=this._headerRowDefs.reduce(e,false);o&&this._forceRenderHeaderRows();let r=this._footerRowDefs.reduce(e,false);return r&&this._forceRenderFooterRows(),t||o||r}_switchDataSource(e){this._data=[],Se(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;Se(this.dataSource)?e=this.dataSource.connect(this):jb(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=Ce(this.dataSource)),this._renderChangeSubscription=Ic([e,this.viewChange]).pipe(yr(this._onDestroy)).subscribe(([t,o])=>{this._data=t||[],this._renderedRange=o,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 o=Array.from(t?.columns||[]).map(a=>{let c=this._columnDefsByName.get(a);return c}),r=o.map(a=>a.sticky),s=o.map(a=>a.stickyEnd);this._stickyStyler.updateStickyColumns(e,r,s,!this.fixedLayout||this._forceRecalculateCellWidths);}_getRenderedRows(e){let t=[];for(let o=0;o<e.viewContainer.length;o++){let r=e.viewContainer.get(o);t.push(r.rootNodes[0]);}return t}_getRowDefs(e,t){if(this._rowDefs.length===1)return [this._rowDefs[0]];let o=[];if(this.multiTemplateDataRows)o=this._rowDefs.filter(r=>!r.when||r.when(t,e));else {let r=this._rowDefs.find(s=>s.when&&s.when(t,e))||this._defaultRowDef;r&&o.push(r);}return o.length,o}_getEmbeddedViewArgs(e,t){let o=e.rowDef,r={$implicit:e.data};return {templateRef:o.template,context:r,index:t}}_renderRow(e,t,o,r={}){let s=e.viewContainer.createEmbeddedView(t.template,r,o);return this._renderCellTemplateForItem(t,r),s}_renderCellTemplateForItem(e,t){for(let o of this._getCellTemplates(e))N.mostRecentCellOutlet&&N.mostRecentCellOutlet._viewContainer.createEmbeddedView(o,t);this._changeDetectorRef.markForCheck();}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,o=e.length;t<o;t++){let s=e.get(t).context;s.count=o,s.first=t===0,s.last=t===o-1,s.even=t%2===0,s.odd=!s.even,this.multiTemplateDataRows?(s.dataIndex=this._renderRows[t].dataIndex,s.renderIndex=t):s.index=this._renderRows[t].dataIndex;}}_getCellTemplates(e){return !e||!e.columns?[]:Array.from(e.columns,t=>{let o=this._columnDefsByName.get(t);return e.extractCellTemplate(o)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows();}_checkStickyStates(){let e=(t,o)=>t||o.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 ce(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:Ce()).pipe(yr(this._onDestroy)).subscribe(o=>{this._stickyStyler.direction=o,this.updateStickyColumnStyles();});}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?Ab:xb;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(Yb(0,t),yr(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(o,r)=>this._measureRangeSize(o,r)}),Ic([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(yr(this._onDestroy)).subscribe(([o,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let s=0;s<r.elements.length;s++){let a=r.elements[s];if(a){let c=r.offsets[s],d=o!==0?Math.max(o-c,c):-c;for(let u of a)u.style.top=`${-d}px`;}}}),Ic([e.renderedContentOffset,this._footerRowStickyUpdates]).pipe(yr(this._onDestroy)).subscribe(([o,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let s=0;s<r.elements.length;s++){let a=r.elements[s];if(a)for(let c of a)c.style.bottom=`${o+r.offsets[s]}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 o=this._noDataRowOutlet.viewContainer;if(t){let r=o.createEmbeddedView(e.templateRef),s=r.rootNodes[0];if(r.rootNodes.length===1&&s?.nodeType===this._document.ELEMENT_NODE){s.setAttribute("role","row"),s.classList.add(...e._contentClassNames);let a=s.querySelectorAll(e._cellSelector);for(let c=0;c<a.length;c++)a[c].classList.add(...e._cellClassNames);}}else o.clear();this._isShowingNoDataRow=t,this._changeDetectorRef.markForCheck();}_measureRangeSize(e,t){if(e.start>=e.end||t!=="vertical")return 0;let o=this.viewChange.value,r=this._rowOutlet.viewContainer;e.start<o.start||e.end>o.end;let s=e.start-o.start,a=e.end-e.start,c,d;for(let y=0;y<a;y++){let _=r.get(y+s);if(_&&_.rootNodes.length){c=d=_.rootNodes[0];break}}for(let y=a-1;y>-1;y--){let _=r.get(y+s);if(_&&_.rootNodes.length){d=_.rootNodes[_.rootNodes.length-1];break}}let u=c?.getBoundingClientRect?.(),h=d?.getBoundingClientRect?.();return u&&h?h.bottom-u.top:0}_virtualScrollEnabled(){return !this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Ae({type:i,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,o,r){if(t&1&&Qg(r,ne,5)(r,U,5)(r,oe,5)(r,W,5)(r,fe,5),t&2){let s;uC(s=lC())&&(o._noDataRow=s.first),uC(s=lC())&&(o._contentColumnDefs=s),uC(s=lC())&&(o._contentRowDefs=s),uC(s=lC())&&(o._contentHeaderRowDefs=s),uC(s=lC())&&(o._contentFooterRowDefs=s);}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,o){t&2&&Dt("cdk-table-fixed-layout",o.fixedLayout);},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",Et],fixedLayout:[2,"fixedLayout","fixedLayout",Et],recycleRows:[2,"recycleRows","recycleRows",Et]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[gy([{provide:R,useExisting:i},{provide:Q,useValue:null}])],ngContentSelectors:nt,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,o){t&1&&(or(ot),nt$1(0),nt$1(1,1),ni$1(2,rt,1,0),ni$1(3,st,7,0)(4,at,4,0)),t&2&&(Qo(2),ri$1(o._isServer?2:-1),Qo(),ri$1(o._isNativeHtmlTable?3:4));},dependencies:[ye,me,pe,_e],styles:[`.cdk-table-fixed-layout {
|
|
1
|
+
import {cI as dt$1,bt as En,aV as q,cJ as Rv,ba as Zb,by as Ce,cK as Ic,aw as O,B as pe$1,C as ce$1,J as Jr,aG as um,A as Ae,aI as qr,H as or,L as nt$1,v as ni$1,Q as Qo,y as ri$1,aK as gy,F as y,D as Dt,aH as tt,aJ as Et,cs as Gg,h,aL as Qg,aM as uC,aN as lC,bj as Bt,cL as Ay,b4 as Ny,aS as ue$1,bA as QS,cd as be,cM as A,bZ as Y,cN as Ee,aQ as k,aU as ke,b8 as Aa,aA as yr,cO as ut$1,cP as g,cQ as Se,cR as Z,cS as jb,cT as Yb,cU as Ab,cV as xb,aO as Gr,bL as Ur,b0 as ha,b_ as Gl,f as fa,E as Ed}from'./main-Q2L26FCS.js';var ot=[[["caption"]],[["colgroup"],["col"]],"*"],nt=["caption","colgroup, col","*"];function rt(i,n){i&1&&nt$1(0,2);}function st(i,n){i&1&&(fa(0,"thead",0),Gg(1,1),Ed(),fa(2,"tbody",0),Gg(3,2)(4,3),Ed(),fa(5,"tfoot",0),Gg(6,4),Ed());}function at(i,n){i&1&&Gg(0,1)(1,2)(2,3)(3,4);}var R=new y("CDK_TABLE");var te=(()=>{class i{template=h(Ur);static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","cdkCellDef",""]]})}return i})(),ie=(()=>{class i{template=h(Ur);static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","cdkHeaderCellDef",""]]})}return i})(),Qe=(()=>{class i{template=h(Ur);static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","cdkFooterCellDef",""]]})}return i})(),U=(()=>{class i{_table=h(R,{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=tt({type:i,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,o,r){if(t&1&&Qg(r,te,5)(r,ie,5)(r,Qe,5),t&2){let s;uC(s=lC())&&(o.cell=s.first),uC(s=lC())&&(o.headerCell=s.first),uC(s=lC())&&(o.footerCell=s.first);}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",Et],stickyEnd:[2,"stickyEnd","stickyEnd",Et]}})}return i})(),ee=class{constructor(n,e){e.nativeElement.classList.add(...n._columnCssClassName);}},We=(()=>{class i extends ee{constructor(){super(h(U),h(ue$1));}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[qr]})}return i})();var $e=(()=>{class i extends ee{constructor(){let e=h(U),t=h(ue$1);super(e,t);let o=e._table?._getCellRole();o&&t.nativeElement.setAttribute("role",o);}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[qr]})}return i})();var de=(()=>{class i{template=h(Ur);_differs=h(Ay);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 W?e.headerCell.template:this instanceof fe?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,features:[ha]})}return i})(),W=(()=>{class i extends de{_table=h(R,{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(o){return (e||(e=um(i)))(o||i)}})();static \u0275dir=tt({type:i,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",Et]},features:[qr,ha]})}return i})(),fe=(()=>{class i extends de{_table=h(R,{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(o){return (e||(e=um(i)))(o||i)}})();static \u0275dir=tt({type:i,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",Et]},features:[qr,ha]})}return i})(),oe=(()=>{class i extends de{_table=h(R,{optional:true});when;static \u0275fac=(()=>{let e;return function(o){return (e||(e=um(i)))(o||i)}})();static \u0275dir=tt({type:i,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[qr]})}return i})(),N=(()=>{class i{_viewContainer=h(Gr);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=tt({type:i,selectors:[["","cdkCellOutlet",""]]})}return i})(),ue=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Ae({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,o){t&1&&Gg(0,0);},dependencies:[N],encapsulation:2,changeDetection:1})}return i})();var he=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Ae({type:i,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&Gg(0,0);},dependencies:[N],encapsulation:2,changeDetection:1})}return i})(),ne=(()=>{class i{templateRef=h(Ur);_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=tt({type:i,selectors:[["ng-template","cdkNoDataRow",""]]})}return i})(),Ue=["top","bottom","left","right"],ce=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(n=>this._updateCachedSizes(n)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=false;constructor(n,e,t=true,o=true,r,s,a){this._isNativeHtmlTable=n,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=o,this.direction=r,this._positionListener=s,this._tableInjector=a,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`};}clearStickyPositioning(n,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(n);let t=[];for(let o of n)o.nodeType===o.ELEMENT_NODE&&t.push(o,...Array.from(o.children));Gl({write:()=>{for(let o of t)this._removeStickyStyle(o,e);}},{injector:this._tableInjector});}updateStickyColumns(n,e,t,o=true,r=true){if(!n.length||!this._isBrowser||!(e.some(D=>D)||t.some(D=>D))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let s=n[0],a=s.children.length,c=this.direction==="rtl",d=c?"right":"left",u=c?"left":"right",h=e.lastIndexOf(true),y=t.indexOf(true),_,we,Ce;r&&this._updateStickyColumnReplayQueue({rows:[...n],stickyStartStates:[...e],stickyEndStates:[...t]}),Gl({earlyRead:()=>{_=this._getCellWidths(s,o),we=this._getStickyStartColumnPositions(_,e),Ce=this._getStickyEndColumnPositions(_,t);},write:()=>{for(let D of n)for(let w=0;w<a;w++){let De=D.children[w];e[w]&&this._addStickyStyle(De,d,we[w],w===h),t[w]&&this._addStickyStyle(De,u,Ce[w],w===y);}this._positionListener&&_.some(D=>!!D)&&(this._positionListener.stickyColumnsUpdated({sizes:h===-1?[]:_.slice(0,h+1).map((D,w)=>e[w]?D:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:y===-1?[]:_.slice(y).map((D,w)=>t[w+y]?D:null).reverse()}));}},{injector:this._tableInjector});}stickRows(n,e,t){if(!this._isBrowser)return;let o=t==="bottom"?n.slice().reverse():n,r=t==="bottom"?e.slice().reverse():e,s=[],a=[],c=[];Gl({earlyRead:()=>{for(let d=0,u=0;d<o.length;d++){if(!r[d])continue;s[d]=u;let h=o[d];c[d]=this._isNativeHtmlTable?Array.from(h.children):[h];let y=this._retrieveElementSize(h).height;u+=y,a[d]=y;}},write:()=>{let d=r.lastIndexOf(true);for(let u=0;u<o.length;u++){if(!r[u])continue;let h=s[u],y=u===d;for(let _ of c[u])this._addStickyStyle(_,t,h,y);}t==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:a,offsets:s,elements:c}):this._positionListener?.stickyFooterRowsUpdated({sizes:a,offsets:s,elements:c});}},{injector:this._tableInjector});}updateStickyFooterContainer(n,e){this._isNativeHtmlTable&&Gl({write:()=>{let t=n.querySelector("tfoot");t&&(e.some(o=>!o)?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(n,e){if(!n.classList.contains(this._stickCellCss))return;for(let o of e)n.style[o]="",n.classList.remove(this._borderCellCss[o]);Ue.some(o=>e.indexOf(o)===-1&&n.style[o])?n.style.zIndex=this._getCalculatedZIndex(n):(n.style.zIndex="",this._needsPositionStickyOnElement&&(n.style.position=""),n.classList.remove(this._stickCellCss));}_addStickyStyle(n,e,t,o){n.classList.add(this._stickCellCss),o&&n.classList.add(this._borderCellCss[e]),n.style[e]=`${t}px`,n.style.zIndex=this._getCalculatedZIndex(n),this._needsPositionStickyOnElement&&(n.style.cssText+="position: -webkit-sticky; position: sticky; ");}_getCalculatedZIndex(n){let e={top:100,bottom:10,left:1,right:1},t=0;for(let o of Ue)n.style[o]&&(t+=e[o]);return t?`${t}`:""}_getCellWidths(n,e=true){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],o=n.children;for(let r=0;r<o.length;r++){let s=o[r];t.push(this._retrieveElementSize(s).width);}return this._cachedCellWidths=t,t}_getStickyStartColumnPositions(n,e){let t=[],o=0;for(let r=0;r<n.length;r++)e[r]&&(t[r]=o,o+=n[r]);return t}_getStickyEndColumnPositions(n,e){let t=[],o=0;for(let r=n.length;r>0;r--)e[r]&&(t[r]=o,o+=n[r]);return t}_retrieveElementSize(n){let e=this._elemSizeCache.get(n);if(e)return e;let t=n.getBoundingClientRect(),o={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(n,o),this._resizeObserver.observe(n,{box:"border-box"})),o}_updateStickyColumnReplayQueue(n){this._removeFromStickyColumnReplayQueue(n.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(n);}_removeFromStickyColumnReplayQueue(n){let e=new Set(n);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(o=>!e.has(o));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length);}_updateCachedSizes(n){let e=false;for(let t of n){let o=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};o.width!==this._elemSizeCache.get(t.target)?.width&<(t.target)&&(e=true),this._elemSizeCache.set(t.target,o);}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 lt(i){return ["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(n=>i.classList.contains(n))}var Q=new y("STICKY_POSITIONING_LISTENER");var me=(()=>{class i{viewContainer=h(Gr);elementRef=h(ue$1);constructor(){let e=h(R);e._rowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","rowOutlet",""]]})}return i})(),ye=(()=>{class i{viewContainer=h(Gr);elementRef=h(ue$1);constructor(){let e=h(R);e._headerRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","headerRowOutlet",""]]})}return i})(),_e=(()=>{class i{viewContainer=h(Gr);elementRef=h(ue$1);constructor(){let e=h(R);e._footerRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","footerRowOutlet",""]]})}return i})(),pe=(()=>{class i{viewContainer=h(Gr);elementRef=h(ue$1);constructor(){let e=h(R);e._noDataRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","noDataRowOutlet",""]]})}return i})(),ge=(()=>{class i{_differs=h(Ay);_changeDetectorRef=h(Ny);_elementRef=h(ue$1);_dir=h(QS,{optional:true});_platform=h(be);_viewRepeater;_viewportRuler=h(A);_injector=h(Y);_virtualScrollViewport=h(Ee,{optional:true,host:true});_positionListener=h(Q,{optional:true})||h(Q,{optional:true,skipSelf:true});_document=h(k);_data;_renderedRange;_onDestroy=new q;_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 q;_footerRowStickyUpdates=new q;_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 q;_dataStream=new q;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 ke;viewChange=new En({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;get renderedRows(){return this._renderRows}constructor(){h(new Aa("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,o)=>this.trackBy?this.trackBy(o.dataIndex,o.data):o);}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(yr(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=true;});}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new ut$1:new g,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(),Se(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,(o,r,s)=>this._getEmbeddedViewArgs(o.item,s),o=>o.item.data,o=>{o.operation===Z.INSERTED&&o.context&&this._renderCellTemplateForItem(o.record.item.rowDef,o.context);}),this._updateRowIndexContext(),e.forEachIdentityChange(o=>{let r=t.get(o.currentIndex);r.context.$implicit=o.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 o=Ve(this._headerRowOutlet,"thead");o&&(o.style.display=e.length?"":"none");}let t=this._headerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(o=>o.resetStickyChanged());}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let o=Ve(this._footerRowOutlet,"tfoot");o&&(o.style.display=e.length?"":"none");}let t=this._footerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(o=>o.resetStickyChanged());}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),o=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...o],["left","right"]),this._stickyColumnStylesNeedReset=false),e.forEach((r,s)=>{this._addStickyColumnStyles([r],this._headerRowDefs[s]);}),this._rowDefs.forEach(r=>{let s=[];for(let a=0;a<t.length;a++)this._renderRows[a].rowDef===r&&s.push(t[a]);this._addStickyColumnStyles(s,r);}),o.forEach((r,s)=>{this._addStickyColumnStyles([r],this._footerRowDefs[s]);}),Array.from(this._columnDefsByName.values()).forEach(r=>r.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),o=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=this._renderedRange.start;r<t;r++){let s=this._data[r],a=this._getRenderRowsForData(s,r,o.get(s));this._cachedRenderRowsMap.has(s)||this._cachedRenderRowsMap.set(s,new WeakMap);for(let c=0;c<a.length;c++){let d=a[c],u=this._cachedRenderRowsMap.get(d.data);u.has(d.rowDef)?u.get(d.rowDef).push(d):u.set(d.rowDef,[d]),e.push(d);}}return e}_getRenderRowsForData(e,t,o){return this._getRowDefs(e,t).map(s=>{let a=o&&o.has(s)?o.get(s):[];if(a.length){let c=a.shift();return c.dataIndex=t,c}else return {data:e,rowDef:s,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),J(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t);});}_cacheRowDefs(){this._headerRowDefs=J(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=J(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=J(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0];}_renderUpdatedColumns(){let e=(s,a)=>{let c=!!a.getColumnsDiff();return s||c},t=this._rowDefs.reduce(e,false);t&&this._forceRenderDataRows();let o=this._headerRowDefs.reduce(e,false);o&&this._forceRenderHeaderRows();let r=this._footerRowDefs.reduce(e,false);return r&&this._forceRenderFooterRows(),t||o||r}_switchDataSource(e){this._data=[],Se(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;Se(this.dataSource)?e=this.dataSource.connect(this):jb(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=Ce(this.dataSource)),this._renderChangeSubscription=Ic([e,this.viewChange]).pipe(yr(this._onDestroy)).subscribe(([t,o])=>{this._data=t||[],this._renderedRange=o,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 o=Array.from(t?.columns||[]).map(a=>{let c=this._columnDefsByName.get(a);return c}),r=o.map(a=>a.sticky),s=o.map(a=>a.stickyEnd);this._stickyStyler.updateStickyColumns(e,r,s,!this.fixedLayout||this._forceRecalculateCellWidths);}_getRenderedRows(e){let t=[];for(let o=0;o<e.viewContainer.length;o++){let r=e.viewContainer.get(o);t.push(r.rootNodes[0]);}return t}_getRowDefs(e,t){if(this._rowDefs.length===1)return [this._rowDefs[0]];let o=[];if(this.multiTemplateDataRows)o=this._rowDefs.filter(r=>!r.when||r.when(t,e));else {let r=this._rowDefs.find(s=>s.when&&s.when(t,e))||this._defaultRowDef;r&&o.push(r);}return o.length,o}_getEmbeddedViewArgs(e,t){let o=e.rowDef,r={$implicit:e.data};return {templateRef:o.template,context:r,index:t}}_renderRow(e,t,o,r={}){let s=e.viewContainer.createEmbeddedView(t.template,r,o);return this._renderCellTemplateForItem(t,r),s}_renderCellTemplateForItem(e,t){for(let o of this._getCellTemplates(e))N.mostRecentCellOutlet&&N.mostRecentCellOutlet._viewContainer.createEmbeddedView(o,t);this._changeDetectorRef.markForCheck();}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,o=e.length;t<o;t++){let s=e.get(t).context;s.count=o,s.first=t===0,s.last=t===o-1,s.even=t%2===0,s.odd=!s.even,this.multiTemplateDataRows?(s.dataIndex=this._renderRows[t].dataIndex,s.renderIndex=t):s.index=this._renderRows[t].dataIndex;}}_getCellTemplates(e){return !e||!e.columns?[]:Array.from(e.columns,t=>{let o=this._columnDefsByName.get(t);return e.extractCellTemplate(o)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows();}_checkStickyStates(){let e=(t,o)=>t||o.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 ce(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:Ce()).pipe(yr(this._onDestroy)).subscribe(o=>{this._stickyStyler.direction=o,this.updateStickyColumnStyles();});}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?Ab:xb;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(Yb(0,t),yr(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(o,r)=>this._measureRangeSize(o,r)}),Ic([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(yr(this._onDestroy)).subscribe(([o,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let s=0;s<r.elements.length;s++){let a=r.elements[s];if(a){let c=r.offsets[s],d=o!==0?Math.max(o-c,c):-c;for(let u of a)u.style.top=`${-d}px`;}}}),Ic([e.renderedContentOffset,this._footerRowStickyUpdates]).pipe(yr(this._onDestroy)).subscribe(([o,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let s=0;s<r.elements.length;s++){let a=r.elements[s];if(a)for(let c of a)c.style.bottom=`${o+r.offsets[s]}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 o=this._noDataRowOutlet.viewContainer;if(t){let r=o.createEmbeddedView(e.templateRef),s=r.rootNodes[0];if(r.rootNodes.length===1&&s?.nodeType===this._document.ELEMENT_NODE){s.setAttribute("role","row"),s.classList.add(...e._contentClassNames);let a=s.querySelectorAll(e._cellSelector);for(let c=0;c<a.length;c++)a[c].classList.add(...e._cellClassNames);}}else o.clear();this._isShowingNoDataRow=t,this._changeDetectorRef.markForCheck();}_measureRangeSize(e,t){if(e.start>=e.end||t!=="vertical")return 0;let o=this.viewChange.value,r=this._rowOutlet.viewContainer;e.start<o.start||e.end>o.end;let s=e.start-o.start,a=e.end-e.start,c,d;for(let y=0;y<a;y++){let _=r.get(y+s);if(_&&_.rootNodes.length){c=d=_.rootNodes[0];break}}for(let y=a-1;y>-1;y--){let _=r.get(y+s);if(_&&_.rootNodes.length){d=_.rootNodes[_.rootNodes.length-1];break}}let u=c?.getBoundingClientRect?.(),h=d?.getBoundingClientRect?.();return u&&h?h.bottom-u.top:0}_virtualScrollEnabled(){return !this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Ae({type:i,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,o,r){if(t&1&&Qg(r,ne,5)(r,U,5)(r,oe,5)(r,W,5)(r,fe,5),t&2){let s;uC(s=lC())&&(o._noDataRow=s.first),uC(s=lC())&&(o._contentColumnDefs=s),uC(s=lC())&&(o._contentRowDefs=s),uC(s=lC())&&(o._contentHeaderRowDefs=s),uC(s=lC())&&(o._contentFooterRowDefs=s);}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,o){t&2&&Dt("cdk-table-fixed-layout",o.fixedLayout);},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",Et],fixedLayout:[2,"fixedLayout","fixedLayout",Et],recycleRows:[2,"recycleRows","recycleRows",Et]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[gy([{provide:R,useExisting:i},{provide:Q,useValue:null}])],ngContentSelectors:nt,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,o){t&1&&(or(ot),nt$1(0),nt$1(1,1),ni$1(2,rt,1,0),ni$1(3,st,7,0)(4,at,4,0)),t&2&&(Qo(2),ri$1(o._isServer?2:-1),Qo(),ri$1(o._isNativeHtmlTable?3:4));},dependencies:[ye,me,pe,_e],styles:[`.cdk-table-fixed-layout {
|
|
2
2
|
table-layout: fixed;
|
|
3
3
|
}
|
|
4
4
|
`],encapsulation:2,changeDetection:1})}return i})();function J(i,n){return i.concat(Array.from(n))}function Ve(i,n){let e=n.toUpperCase(),t=i.viewContainer.element.nativeElement;for(;t;){let o=t.nodeType===1?t.nodeName:null;if(o===e)return t;if(o==="TABLE")break;t=t.parentNode;}return null}var qe=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=pe$1({type:i});static \u0275inj=ce$1({imports:[Bt]})}return i})();var ct=[[["caption"]],[["colgroup"],["col"]],"*"],dt=["caption","colgroup, col","*"];function ft(i,n){i&1&&nt$1(0,2);}function ut(i,n){i&1&&(fa(0,"thead",0),Gg(1,1),Ed(),fa(2,"tbody",2),Gg(3,3)(4,4),Ed(),fa(5,"tfoot",0),Gg(6,5),Ed());}function ht(i,n){i&1&&Gg(0,1)(1,3)(2,4)(3,5);}var Zt=(()=>{class i extends ge{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=false;static \u0275fac=(()=>{let e;return function(o){return (e||(e=um(i)))(o||i)}})();static \u0275cmp=Ae({type:i,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(t,o){t&2&&Dt("mat-table-fixed-layout",o.fixedLayout);},exportAs:["matTable"],features:[gy([{provide:ge,useExisting:i},{provide:R,useExisting:i},{provide:Q,useValue:null}]),qr],ngContentSelectors:dt,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,o){t&1&&(or(ct),nt$1(0),nt$1(1,1),ni$1(2,ft,1,0),ni$1(3,ut,7,0)(4,ht,4,0)),t&2&&(Qo(2),ri$1(o._isServer?2:-1),Qo(),ri$1(o._isNativeHtmlTable?3:4));},dependencies:[ye,me,pe,_e],styles:[`.mat-mdc-table-sticky {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b as xy,n as nT,A as Ae,a as A8,x as x8,M as $t,O as vt,H as or,f as fa,k as kC,E as Ed,L as nt,$ as $g,r as rr,Q as Qo,u as uy}from'./main-
|
|
1
|
+
import {b as xy,n as nT,A as Ae,a as A8,x as x8,M as $t,O as vt,H as or,f as fa,k as kC,E as Ed,L as nt,$ as $g,r as rr,Q as Qo,u as uy}from'./main-Q2L26FCS.js';var v=["*"],y=class a{icon=xy.required();label=xy("");unknownCostCount=xy(0);tooltip=nT(()=>{let t=this.label(),e=this.unknownCostCount();return e>0?`${t} \xB7 ${e} round(s) with unknown cost (floor value)`:t});static \u0275fac=function(e){return new(e||a)};static \u0275cmp=Ae({type:a,selectors:[["sf-metric"]],inputs:{icon:[1,"icon"],label:[1,"label"],unknownCostCount:[1,"unknownCostCount"]},ngContentSelectors:v,decls:4,vars:3,consts:[[1,"metric",3,"matTooltip"],["aria-hidden","true"]],template:function(e,n){e&1&&(or(),fa(0,"span",0)(1,"mat-icon",1),kC(2),Ed(),nt(3),Ed()),e&2&&($g("matTooltip",n.tooltip()),rr("aria-label",n.tooltip()),Qo(2),uy(n.icon()));},dependencies:[A8,x8,$t,vt],styles:[".metric[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 11px;border-radius:8px;border:1px solid var(--sf-outline);background:var(--sf-surface);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,4 +1,4 @@
|
|
|
1
|
-
import {y}from'./chunk-
|
|
1
|
+
import {y}from'./chunk-BYZCY_yB.js';import {h,S as St,p as pb,A as Ae,N as Nt$1,I as IW,_ as _W,a as A8,x as x8,o as ot,f as fa,k as kC,E as Ed,z as zg,G as GC,q as qw,Q as Qo,u as uy,K as KC,Z as Zw,b as xy,Y as YV,n as nT,r as rr,$ as $g,l as ly,e as eC,c as Yg,d as rn,g as Ye,V as Vs,i as bt$1,j as nS,s as st,m as nt,t as py,v as ni,P as PC,D as Dt,w as $C,y as ri,B as pe,C as ce$1,J as Jr,F as y$1,H as or,L as nt$1,M as $t$1,O as vt,R as sC,T as jC,U as YC,W as ZC,X as ii,a0 as Vp,a1 as Hp,a2 as Cd,a3 as Om}from'./main-Q2L26FCS.js';import {I}from'./chunk-DZbBIzAF.js';import {e as ee$1}from'./chunk-Bu7fcbUT.js';import {_}from'./chunk-yvUmK3gv.js';var wt=["*"];var Mt=new y$1("MAT_CARD_CONFIG"),_t=(()=>{class e{appearance;constructor(){let t=h(Mt,{optional:true});this.appearance=t?.appearance||"raised";}static \u0275fac=function(s){return new(s||e)};static \u0275cmp=Ae({type:e,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:8,hostBindings:function(s,d){s&2&&Dt("mat-mdc-card-outlined",d.appearance==="outlined")("mdc-card--outlined",d.appearance==="outlined")("mat-mdc-card-filled",d.appearance==="filled")("mdc-card--filled",d.appearance==="filled");},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:wt,decls:1,vars:0,template:function(s,d){s&1&&(or(),nt$1(0));},styles:[`.mat-mdc-card {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
box-sizing: border-box;
|
|
@@ -168,4 +168,4 @@ import {y}from'./chunk-DI3QSFg9.js';import {h,S as St,p as pb,A as Ae,N as Nt$1,
|
|
|
168
168
|
.mat-mdc-card-actions-align-end {
|
|
169
169
|
justify-content: flex-end;
|
|
170
170
|
}
|
|
171
|
-
`],encapsulation:2})}return e})();var yt=(()=>{class e{static \u0275fac=function(s){return new(s||e)};static \u0275mod=pe({type:e});static \u0275inj=ce$1({imports:[Jr]})}return e})();var Pt=(e,n)=>n.key;function Ot(e,n){if(e&1&&zg(0,"li",2),e&2){let t=n.$implicit,s=sC();ii(s.dotClass(t)),$g("matTooltip",s.dotLabel(t)),rr("aria-label",s.dotLabel(t));}}var $=class e{phases=xy.required();ariaLabel=nT(()=>{let n=this.phases();return n.length===0?"No steps":`Steps: ${n.map(t=>this.dotLabel(t)).join(", ")}`});dotClass(n){switch(n.status){case "done":return "dot--done";case "failed":return "dot--failed";case "blocked":return "dot--blocked";case "indeterminate":return "dot--indeterminate";case "cancelled":return "dot--cancelled";case "running":return "dot--running";case "waiting_human":return "dot--waiting-human";case "pending":return "dot--pending"}}dotLabel(n){let t={done:"completed",failed:"failed",blocked:"blocked",indeterminate:"indeterminate",cancelled:"cancelled",running:"running",waiting_human:"waiting for human",pending:"waiting"};return `${n.label??n.key}: ${t[n.status]}`}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-step-dots"]],inputs:{phases:[1,"phases"]},decls:3,vars:1,consts:[["role","list",1,"dots"],["tabindex","0","matTooltipShowDelay","200","role","listitem",1,"dot",3,"class","matTooltip"],["tabindex","0","matTooltipShowDelay","200","role","listitem",1,"dot",3,"matTooltip"]],template:function(t,s){t&1&&(fa(0,"ol",0),qw(1,Ot,1,4,"li",1,Pt),Ed()),t&2&&(rr("aria-label",s.ariaLabel()),Qo(),Zw(s.phases()));},dependencies:[$t$1,vt],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block}.dots[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;align-items:center;gap:7px}.dot[_ngcontent-%COMP%]{width:12px;height:12px;border-radius:50%;flex-shrink:0;cursor:default;outline-offset:2px}.dot[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--sf-primary)}.dot--done[_ngcontent-%COMP%]{background:var(--sf-success)}.dot--failed[_ngcontent-%COMP%]{background:var(--sf-error)}.dot--blocked[_ngcontent-%COMP%]{box-sizing:border-box;border:2px solid var(--sf-tertiary);background:transparent}.dot--indeterminate[_ngcontent-%COMP%]{background:var(--sf-error);opacity:.55}.dot--cancelled[_ngcontent-%COMP%]{background:var(--sf-outline-strong)}.dot--running[_ngcontent-%COMP%]{background:var(--sf-secondary);animation:_ngcontent-%COMP%_sf-dot-pulse 1.8s ease-in-out infinite}.dot--waiting-human[_ngcontent-%COMP%]{background:var(--sf-tertiary)}.dot--pending[_ngcontent-%COMP%]{background:var(--sf-outline)}@keyframes _ngcontent-%COMP%_sf-dot-pulse{0%,to{box-shadow:0 0 #5fd4e000}50%{box-shadow:0 0 0 4px #5fd4e038}}@media(prefers-reduced-motion:reduce){.dot--running[_ngcontent-%COMP%]{animation:none}}']})};var bt=e=>["/sessions",e];function Tt(e,n){e&1&&(fa(0,"sf-status-chip",4),kC(1,"destroyed"),Ed());}function It(e,n){e&1&&(fa(0,"sf-status-chip",16),kC(1,"failed"),Ed());}function Rt(e,n){e&1&&(fa(0,"sf-status-chip",17),kC(1,"blocked"),Ed());}function At(e,n){e&1&&(fa(0,"sf-status-chip",18),kC(1,"waiting for human"),Ed());}function Ft(e,n){e&1&&(fa(0,"sf-status-chip",19),kC(1,"running"),Ed());}function Lt(e,n){e&1&&(fa(0,"sf-status-chip",20),kC(1,"completed"),Ed());}function zt(e,n){e&1&&(fa(0,"sf-status-chip",21),kC(1,"waiting"),Ed());}function Wt(e,n){if(e&1&&ni(0,It,2,0,"sf-status-chip",16)(1,Rt,2,0,"sf-status-chip",17)(2,At,2,0,"sf-status-chip",18)(3,Ft,2,0,"sf-status-chip",19)(4,Lt,2,0,"sf-status-chip",20)(5,zt,2,0,"sf-status-chip",21),e&2){let t;sC();let s=jC(0);ri((t=s.run?.cardState)==="failed"?0:t==="blocked"?1:t==="waiting_human"?2:t==="running"?3:t==="succeeded"?4:5);}}function jt(e,n){if(e&1&&(fa(0,"sf-status-chip",6),kC(1),Ed()),e&2){sC();let t=jC(0);Qo(),uy(t.workflowType);}}function Nt(e,n){if(e&1&&(fa(0,"span"),kC(1,"\u203A"),Ed(),fa(2,"span",9),kC(3),Ed()),e&2){sC();let t=jC(0);Qo(3),uy(t.branch);}}function Ut(e,n){if(e&1&&(fa(0,"span"),kC(1,"\xB7"),Ed(),fa(2,"span"),kC(3,"ticket "),fa(4,"span",9),kC(5),Ed()()),e&2){sC();let t=jC(0);Qo(5),uy(t.ticket);}}function Bt(e,n){if(e&1&&(fa(0,"p",12),kC(1," Created on "),fa(2,"time",22),kC(3),GC(4,"date"),GC(5,"date"),Ed()()),e&2){sC();let t=jC(0);Qo(2),$g("dateTime",t.createdAt),Qo(),ly("",YC(4,3,t.createdAt,"MMM d, yyyy")," at ",YC(5,6,t.createdAt,"HH:mm"));}}function Vt(e,n){if(e&1&&(fa(0,"div",30)(1,"sf-status-chip",31),kC(2),Ed()()),e&2){let t=sC(2);Qo(2),Cd(" Waiting for reply",t.currentPhase?" \xB7 "+t.currentPhase:""," ");}}function $t(e,n){if(e&1&&(fa(0,"div",30)(1,"sf-status-chip",32),kC(2),Ed()()),e&2){let t=sC(2);Qo(2),Cd(" running",t.currentPhase?" \xB7 "+t.currentPhase:""," ");}}function Ht(e,n){if(e&1&&ni(0,Vt,3,1,"div",30)(1,$t,3,1,"div",30),e&2){let t=sC();ri(t.waitingHuman?0:1);}}function Gt(e,n){if(e&1&&(fa(0,"section",13),ni(1,Ht,2,1),fa(2,"div",23)(3,"div",24),zg(4,"sf-step-dots",25),Ed(),fa(5,"div",26)(6,"sf-metric",27),kC(7),GC(8,"usd"),Ed(),fa(9,"sf-metric",28),kC(10),GC(11,"duration"),Ed(),fa(12,"sf-metric",29),kC(13),GC(14,"tokens"),Ed()()()()),e&2){let t=n;Qo(),ri(t.status==="running"?1:-1),Qo(3),$g("phases",t.phases),Qo(2),$g("unknownCostCount",t.unknownCostCount??0),Qo(),uy(KC(8,6,t.costUsd,4,t.unknownCostCount)),Qo(3),uy(ZC(11,10,t.durationSec)),Qo(3),uy(ZC(14,12,t.tokens));}}function Xt(e,n){if(e&1&&(fa(0,"p",14),kC(1," Final cost \xB7 workflows "),fa(2,"b"),kC(3),GC(4,"usd"),Ed()()),e&2){sC();let t=jC(0);Qo(3),uy(ZC(4,1,t.finalCostUsd));}}function qt(e,n){if(e&1&&(fa(0,"a",33)(1,"mat-icon"),kC(2,"open_in_new"),Ed(),kC(3," View supervisor case "),Ed()),e&2){let t=sC(2);$g("href",t.supervisorCaseUrl(),Om);}}function Kt(e,n){e&1&&(fa(0,"mat-icon",42),kC(1,"autorenew"),Ed());}function Jt(e,n){if(e&1){let t=eC();fa(0,"button",41),Yg("click",function(){Vp(t);let d=sC(2);return Hp(d.askSupervisor())}),ni(1,Kt,2,0,"mat-icon",42),kC(2," Ask supervisor "),Ed();}if(e&2){let t=sC(2);$g("disabled",t.supervisorState()==="loading"),Qo(),ri(t.supervisorState()==="loading"?1:-1);}}function Qt(e,n){e&1&&(fa(0,"button",35),kC(1," Ask supervisor "),Ed());}function Yt(e,n){if(e&1){let t=eC();fa(0,"button",43),Yg("click",function(){Vp(t);let d=sC(2);return Hp(d.action.emit("stop"))}),kC(1,"Stop"),Ed();}}function Zt(e,n){if(e&1&&(fa(0,"a",37),kC(1,"Conversation"),Ed()),e&2){let t=sC(2);$g("href",t.conversationLink,Om);}}function te(e,n){e&1&&(fa(0,"button",38),kC(1," Conversation "),Ed());}function ee(e,n){if(e&1&&(fa(0,"p",40)(1,"mat-icon",44),kC(2,"error_outline"),Ed(),kC(3),Ed()),e&2){let t=sC(2);Qo(3),Cd(" ",t.supervisorError()," ");}}function ne(e,n){if(e&1){let t=eC();fa(0,"footer",15),ni(1,qt,4,1,"a",33)(2,Jt,3,2,"button",34)(3,Qt,2,0,"button",35),ni(4,Yt,2,0,"button",36),ni(5,Zt,2,1,"a",37)(6,te,2,0,"button",38),fa(7,"button",39),Yg("click",function(){Vp(t);let d=sC();return Hp(d.action.emit("remove"))}),kC(8,"Remove"),Ed()(),ni(9,ee,4,1,"p",40);}if(e&2){let t=sC(),s=jC(0);Qo(),ri(t.supervisorState()==="done"&&t.supervisorCaseUrl()?1:s.namespaceId?2:3),Qo(3),ri(t.canStop?4:-1),Qo(),ri(t.conversationLink?5:6),Qo(4),ri(t.supervisorState()==="error"&&t.supervisorError()?9:-1);}}function ae(e,n){if(e&1){let t=eC();fa(0,"footer",15)(1,"button",43),Yg("click",function(){Vp(t);let d=sC();return Hp(d.action.emit("restore"))}),kC(2,"Restore"),Ed()();}}var H=class e{run=xy.required();action=YV();store=h(St);agentOsBaseUrl=h(rn);supervisorState=Ye("idle");supervisorError=Ye(null);supervisorCaseUrl=Ye(null);constructor(){Vs(()=>{if(this.supervisorState()!=="idle")return;let n=this.store.restoreSupervisorCase(this.run());n&&(this.supervisorCaseUrl.set(n.agentOsUrl),this.supervisorState.set("done"));});}get canStop(){let n=this.run();return n.status!=="working"||!n.id?false:!!this.store.session(n.id)?.activeAttemptId}get conversationLink(){let n=this.run(),t=n.controllerCaseId;return t?bt$1(t,n.namespaceId,this.agentOsBaseUrl):null}askSupervisor(){if(this.supervisorState()==="loading"||this.supervisorState()==="done")return;let n=this.run();if(!n.namespaceId){this.supervisorError.set("Unknown namespace -- cannot open a supervisor case."),this.supervisorState.set("error");return}this.supervisorState.set("loading"),this.supervisorError.set(null);let t=window.open("","_blank");t&&(t.opener=null),this.store.openSupervisorCase(n).subscribe({next:s=>{this.supervisorCaseUrl.set(s.agentOsUrl),this.supervisorState.set("done"),t&&!t.closed&&(t.location.href=s.agentOsUrl);},error:s=>{t&&!t.closed&&t.close(),this.supervisorState.set("error"),this.supervisorError.set(`Failed to create supervisor case: ${s.message}`);}});}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-run-card"]],inputs:{run:[1,"run"]},outputs:{action:"action"},decls:26,vars:22,consts:[["appearance","outlined","role","region",1,"card"],[1,"head"],[1,"name"],[3,"routerLink"],["tone","neutral","dot",""],[1,"sf-spacer"],["tone","cyan","icon","polyline"],[1,"meta"],["aria-hidden","true",1,"branch-icon"],[1,"sf-workflow"],[1,"service-link",3,"routerLink"],[1,"dot"],[1,"created-at"],["aria-label","Run summary",1,"run"],[1,"final-cost"],[1,"actions"],["tone","red","icon","close"],["tone","amber","icon","block"],["tone","amber","icon","person_alert"],["tone","blue","icon","progress_activity","spin",""],["tone","green","icon","check"],["tone","neutral","icon","pause"],[3,"dateTime"],[1,"run-details"],[1,"run-steps"],[3,"phases"],["aria-label","Run metrics",1,"run-metrics"],["icon","paid","label","Run cost",3,"unknownCostCount"],["icon","timer","label","Duration"],["icon","link","label","Tokens"],[1,"run-notice"],["tone","amber","size","sm","icon","person_alert"],["tone","blue","size","sm","icon","progress_activity","spin",""],["mat-flat-button","","target","_blank","rel","noopener","title","Open supervisor case",1,"sf-primary",3,"href"],["mat-flat-button","",1,"sf-primary","supervisor-btn",3,"disabled"],["mat-flat-button","","disabled","","title","Unknown namespace \u2014 cannot open a supervisor case",1,"sf-primary"],["mat-stroked-button","",1,"sf-secondary"],["mat-button","","target","_blank","rel","noopener",1,"sf-ghost",3,"href"],["mat-button","","disabled","","title","AgentOS controller case unavailable (no agent step executed for this workflow yet)",1,"sf-ghost"],["mat-stroked-button","",1,"sf-danger",3,"click"],["role","alert",1,"supervisor-error"],["mat-flat-button","",1,"sf-primary","supervisor-btn",3,"click","disabled"],[1,"spin-icon"],["mat-stroked-button","",1,"sf-secondary",3,"click"],[1,"supervisor-error__icon"]],template:function(t,s){if(t&1&&(py(0),fa(1,"mat-card",0)(2,"header",1)(3,"h3",2)(4,"a",3),kC(5),Ed()(),ni(6,Tt,2,0,"sf-status-chip",4)(7,Wt,6,1),zg(8,"span",5),ni(9,jt,2,1,"sf-status-chip",6),Ed(),fa(10,"div",7)(11,"mat-icon",8),kC(12,"account_tree"),Ed(),fa(13,"span",9),kC(14),Ed(),ni(15,Nt,4,1),ni(16,Ut,6,1),zg(17,"span",5),fa(18,"a",10),zg(19,"span",11),kC(20,"Factory trace"),Ed()(),ni(21,Bt,6,9,"p",12),ni(22,Gt,15,14,"section",13)(23,Xt,5,3,"p",14),ni(24,ne,10,4)(25,ae,3,0,"footer",15),Ed()),t&2){let d,l=PC(s.run());Qo(),Dt("card--working",l.status==="working")("card--destroyed",l.status==="destroyed"),rr("aria-label","Run "+l.title)("data-run-id",l.id),Qo(3),$g("routerLink",$C(18,bt,l.id)),Qo(),uy(l.title),Qo(),ri(l.status==="destroyed"?6:7),Qo(3),ri(l.workflowType?9:-1),Qo(5),uy(l.project),Qo(),ri(l.branch?15:-1),Qo(),ri(l.ticket?16:-1),Qo(2),$g("routerLink",$C(20,bt,l.id)),Qo(3),ri(l.createdAt?21:-1),Qo(),ri((d=l.run)?22:l.status==="destroyed"?23:-1,d),Qo(2),ri(l.status!=="destroyed"?24:25);}},dependencies:[Nt$1,yt,_t,IW,_W,A8,x8,_,y,$,nS,ot,st,nt],styles:[".card[_ngcontent-%COMP%]{padding:20px 22px;display:flex;flex-direction:column;gap:14px}.card--working[_ngcontent-%COMP%]{border-color:var(--sf-outline-active);box-shadow:0 10px 40px -18px #7aa2f773}.card--destroyed[_ngcontent-%COMP%]{opacity:.8}.head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.name[_ngcontent-%COMP%]{margin:0;font-family:var(--sf-mono);font-size:19px;font-weight:700;color:var(--sf-primary)}.name[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:inherit;text-decoration:none}.name[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-family:var(--sf-mono);font-size:13px;color:var(--sf-text-muted)}.branch-icon[_ngcontent-%COMP%]{width:16px;height:16px;font-size:16px;color:var(--sf-secondary)}.service-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:7px;height:26px;padding:0 11px;border-radius:999px;border:1px solid var(--sf-outline);font-family:var(--sf-font);font-size:12.5px;font-weight:600;color:var(--sf-text-2);text-decoration:none}.service-link[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;background:var(--sf-secondary)}.service-link[_ngcontent-%COMP%]:hover{border-color:var(--sf-outline-strong);color:var(--sf-text)}.service-link--disabled[_ngcontent-%COMP%]{opacity:.45;cursor:default;pointer-events:none}.service-link--disabled[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{background:var(--sf-text-muted)}.created-at[_ngcontent-%COMP%]{margin:0;font-size:12px;color:var(--sf-text-muted);font-family:var(--sf-mono);letter-spacing:.01em}.run[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;padding:14px 16px;border-radius:12px;background:var(--sf-chrome);border:1px solid var(--sf-outline)}.run-notice[_ngcontent-%COMP%]{display:flex;align-items:center;min-width:0}.run-details[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0}.run-steps[_ngcontent-%COMP%]{min-width:0}.run-metrics[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex:0 0 auto}.goal[_ngcontent-%COMP%]{margin:0;font-size:14px;color:#d5d9e4}.final-cost[_ngcontent-%COMP%]{margin:0;font-family:var(--sf-mono);font-size:13px;color:var(--sf-text-muted)}.final-cost[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{color:var(--sf-text)}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding-top:2px}.supervisor-btn[_ngcontent-%COMP%]{display:inline-flex!important;align-items:center;gap:4px}.spin-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;animation:_ngcontent-%COMP%_sf-spin 1s linear infinite}@keyframes _ngcontent-%COMP%_sf-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media(max-width:760px){.card[_ngcontent-%COMP%]{padding:16px}.meta[_ngcontent-%COMP%], .actions[_ngcontent-%COMP%]{flex-wrap:wrap}.run-details[_ngcontent-%COMP%]{align-items:flex-start;flex-direction:column;gap:10px}.run-metrics[_ngcontent-%COMP%]{justify-content:flex-start;flex-wrap:wrap}}.supervisor-error[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin:4px 0 0;padding:6px 10px;border-radius:6px;background:color-mix(in srgb,var(--sf-danger, #e53e3e) 12%,transparent);color:var(--sf-danger, #e53e3e);font-size:13px}.supervisor-error__icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;flex-shrink:0}"]})};var ie=(e,n)=>n.id;function re(e,n){if(e&1){let t=eC();fa(0,"div",9)(1,"sf-run-card",11),Yg("action",function(d){let l=Vp(t).$implicit,kt=sC();return Hp(kt.onRunAction(l.id,d))}),Ed()();}if(e&2){let t=n.$implicit;Qo(),$g("run",t);}}function oe(e,n){e&1&&(fa(0,"p",10),kC(1,"No run in this workstream."),Ed());}var G=class e{workstream=xy.required();action=YV();runCount=nT(()=>this.workstream().runs.length);totalCost=nT(()=>this.workstream().runs.reduce((n,t)=>n+(t.run?.costUsd??t.costUsd??0),0));unknownCostCount=nT(()=>this.workstream().runs.reduce((n,t)=>n+(t.run?.unknownCostCount??0),0));onRunAction(n,t){this.action.emit({runId:n,action:t});}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-workstream-card"]],inputs:{workstream:[1,"workstream"]},outputs:{action:"action"},decls:17,vars:15,consts:[["role","region",1,"workstream"],[1,"workstream-head"],[1,"workstream-identity"],[1,"title"],[1,"namespace-id","sf-mono",3,"title"],["aria-label","Workstream totals",1,"workstream-totals"],[1,"count"],[1,"cost"],["role","list",1,"runs"],["role","listitem",1,"run-item"],[1,"empty","sf-muted"],[3,"action","run"]],template:function(t,s){if(t&1&&(fa(0,"section",0)(1,"header",1)(2,"div",2)(3,"h2",3),kC(4),Ed(),fa(5,"code",4),kC(6),Ed()(),fa(7,"div",5)(8,"span",6),kC(9),Ed(),fa(10,"span",7),kC(11),GC(12,"usd"),Ed()()(),fa(13,"div",8),qw(14,re,2,1,"div",9,ie,false,oe,2,0,"p",10),Ed()()),t&2){let d=s.workstream();rr("aria-label","Workstream "+d.title)("data-namespace-id",d.namespaceId),Qo(4),uy(d.title),Qo(),$g("title","Namespace ID: "+d.namespaceId),Qo(),uy(d.namespaceId),Qo(2),rr("aria-label",s.runCount()+" runs"),Qo(),ly(" ",s.runCount()," run",s.runCount()===1?"":"s"," "),Qo(),rr("aria-label","Workstream cost"),Qo(),uy(KC(12,11,s.totalCost(),2,s.unknownCostCount())),Qo(3),Zw(d.runs);}},dependencies:[H,ot],styles:[".workstream[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding:16px 18px;border:1px solid var(--sf-outline);border-left:4px solid var(--sf-primary);border-radius:16px;background:var(--sf-panel, transparent)}.workstream-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:20px}.workstream-identity[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}.workstream-totals[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex:0 0 auto}.title[_ngcontent-%COMP%]{margin:0;font-family:var(--sf-font);font-size:30px;font-weight:800;letter-spacing:-.02em;color:var(--sf-text-primary)}.title[_ngcontent-%COMP%]:first-letter{text-transform:uppercase}.namespace-id[_ngcontent-%COMP%]{font-size:12px;color:var(--sf-text-muted);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.count[_ngcontent-%COMP%]{font-size:13px;color:var(--sf-text-muted)}.cost[_ngcontent-%COMP%]{font-family:var(--sf-mono);font-size:15px;font-weight:700;color:var(--sf-secondary)}.runs[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.run-item[_ngcontent-%COMP%]{display:block}.empty[_ngcontent-%COMP%]{margin:0;padding:12px}@media(max-width:620px){.workstream[_ngcontent-%COMP%]{padding:14px}.workstream-head[_ngcontent-%COMP%]{align-items:flex-start;flex-direction:column;gap:10px}.workstream-totals[_ngcontent-%COMP%]{justify-content:space-between;width:100%}}"]})};var se=(e,n)=>n.namespaceId;function de(e,n){if(e&1){let t=eC();fa(0,"sf-workstream-card",17),Yg("action",function(d){Vp(t);let l=sC();return Hp(l.onAction(d))}),Ed();}if(e&2){let t=n.$implicit;$g("workstream",t);}}function ce(e,n){e&1&&(fa(0,"p",16),kC(1,"No active workflows."),Ed());}var ht=class e{store=h(St);dialog=h(ee$1);constructor(){h(pb).crumbs.set([{label:"Workstreams",link:"/workstreams"}]);}onAction(n){let{runId:t,action:s}=n;switch(s){case "stop":this.store.stop(t);return;case "remove":this.confirmRemove(t);return;case "restore":this.store.restore(t);return;case "ask":case "conversation":return}}confirmRemove(n){let t={title:"Remove run",message:"Are you sure you want to remove this run? The action is recoverable via the destroyed runs toggle.",confirmLabel:"Remove",destructive:true};this.dialog.open(I,{data:t,width:"440px"}).afterClosed().subscribe(s=>{s===true&&this.store.remove(n);});}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-workstreams-page"]],decls:40,vars:12,consts:[[1,"page"],[1,"page-head"],[1,"titles"],[1,"sf-muted"],["mat-flat-button","","routerLink","/lancer","data-workstreams-launch","true",1,"sf-primary"],["aria-label","Key metrics",1,"kpis"],[1,"kpi","sf-panel"],[1,"sf-overline"],[1,"kpi-value"],[1,"kpi-sub"],[1,"ok-dot"],[1,"kpi-value","kpi-value--cyan"],[1,"kpi","sf-panel","kpi--total"],[1,"kpi-value","kpi-value--violet"],["aria-label","Workstreams",1,"cards"],[3,"workstream"],[1,"empty","sf-panel","sf-muted"],[3,"action","workstream"]],template:function(t,s){if(t&1&&(fa(0,"div",0)(1,"header",1)(2,"div",2)(3,"h1"),kC(4,"Workstreams"),Ed(),fa(5,"p",3),kC(6,"Runs grouped by namespace, derived from the real workflows exposed by factory-service."),Ed()(),fa(7,"a",4)(8,"mat-icon"),kC(9,"play_arrow"),Ed(),kC(10," Launch a run "),Ed()(),fa(11,"section",5)(12,"article",6)(13,"h2",7),kC(14,"Active workflows"),Ed(),fa(15,"span",8),kC(16),Ed(),fa(17,"span",9),zg(18,"span",10),kC(19,"real runs in progress"),Ed()(),fa(20,"article",6)(21,"h2",7),kC(22,"Workflow cost"),Ed(),fa(23,"span",11),kC(24),GC(25,"usd"),Ed(),fa(26,"span",9),kC(27,"cumulative real cost"),Ed()(),fa(28,"article",12)(29,"h2",7),kC(30,"Total"),Ed(),fa(31,"span",13),kC(32),GC(33,"usd"),Ed(),fa(34,"span",9),kC(35,"real cost of active workflows"),Ed()()(),fa(36,"section",14),qw(37,de,1,1,"sf-workstream-card",15,se,false,ce,2,0,"p",16),Ed()()),t&2){let d=s.store.costs();Qo(16),uy(d.active),Qo(8),uy(KC(25,4,d.workflowsUsd,2,d.unknownCostCount)),Qo(8),uy(KC(33,8,d.totalUsd,2,d.unknownCostCount)),Qo(5),Zw(s.store.workstreams());}},dependencies:[Nt$1,IW,_W,A8,x8,G,ot],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;max-width:1400px}.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-size:28px;font-weight:800;letter-spacing:-.01em}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.kpis[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.kpi[_ngcontent-%COMP%]{padding:18px 20px;display:flex;flex-direction:column;gap:8px;border-radius:14px}.kpi--total[_ngcontent-%COMP%]{background:#151027;border-color:#3b2d63}.kpi--total[_ngcontent-%COMP%] .sf-overline[_ngcontent-%COMP%], .kpi--total[_ngcontent-%COMP%] .kpi-sub[_ngcontent-%COMP%]{color:#b9a4e6}.kpi-value[_ngcontent-%COMP%]{font-family:var(--sf-mono);font-size:30px;font-weight:600}.kpi-value--cyan[_ngcontent-%COMP%]{color:var(--sf-secondary)}.kpi-value--violet[_ngcontent-%COMP%]{color:var(--sf-primary);font-weight:700}.kpi-sub[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--sf-text-muted)}.ok-dot[_ngcontent-%COMP%]{width:7px;height:7px;flex-shrink:0;border-radius:50%;background:var(--sf-success);display:inline-block}.cards[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.empty[_ngcontent-%COMP%]{padding:24px;text-align:center;margin:0}"]})};export{ht as WorkstreamsPageComponent};
|
|
171
|
+
`],encapsulation:2})}return e})();var yt=(()=>{class e{static \u0275fac=function(s){return new(s||e)};static \u0275mod=pe({type:e});static \u0275inj=ce$1({imports:[Jr]})}return e})();var Pt=(e,n)=>n.key;function Ot(e,n){if(e&1&&zg(0,"li",2),e&2){let t=n.$implicit,s=sC();ii(s.dotClass(t)),$g("matTooltip",s.dotLabel(t)),rr("aria-label",s.dotLabel(t));}}var $=class e{phases=xy.required();ariaLabel=nT(()=>{let n=this.phases();return n.length===0?"No steps":`Steps: ${n.map(t=>this.dotLabel(t)).join(", ")}`});dotClass(n){switch(n.status){case "done":return "dot--done";case "failed":return "dot--failed";case "blocked":return "dot--blocked";case "indeterminate":return "dot--indeterminate";case "cancelled":return "dot--cancelled";case "running":return "dot--running";case "waiting_human":return "dot--waiting-human";case "pending":return "dot--pending"}}dotLabel(n){let t={done:"completed",failed:"failed",blocked:"blocked",indeterminate:"indeterminate",cancelled:"cancelled",running:"running",waiting_human:"waiting for human",pending:"waiting"};return `${n.label??n.key}: ${t[n.status]}`}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-step-dots"]],inputs:{phases:[1,"phases"]},decls:3,vars:1,consts:[["role","list",1,"dots"],["tabindex","0","matTooltipShowDelay","200","role","listitem",1,"dot",3,"class","matTooltip"],["tabindex","0","matTooltipShowDelay","200","role","listitem",1,"dot",3,"matTooltip"]],template:function(t,s){t&1&&(fa(0,"ol",0),qw(1,Ot,1,4,"li",1,Pt),Ed()),t&2&&(rr("aria-label",s.ariaLabel()),Qo(),Zw(s.phases()));},dependencies:[$t$1,vt],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block}.dots[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;align-items:center;gap:7px}.dot[_ngcontent-%COMP%]{width:12px;height:12px;border-radius:50%;flex-shrink:0;cursor:default;outline-offset:2px}.dot[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--sf-primary)}.dot--done[_ngcontent-%COMP%]{background:var(--sf-success)}.dot--failed[_ngcontent-%COMP%]{background:var(--sf-error)}.dot--blocked[_ngcontent-%COMP%]{box-sizing:border-box;border:2px solid var(--sf-tertiary);background:transparent}.dot--indeterminate[_ngcontent-%COMP%]{background:var(--sf-error);opacity:.55}.dot--cancelled[_ngcontent-%COMP%]{background:var(--sf-outline-strong)}.dot--running[_ngcontent-%COMP%]{background:var(--sf-secondary);animation:_ngcontent-%COMP%_sf-dot-pulse 1.8s ease-in-out infinite}.dot--waiting-human[_ngcontent-%COMP%]{background:var(--sf-tertiary)}.dot--pending[_ngcontent-%COMP%]{background:var(--sf-outline)}@keyframes _ngcontent-%COMP%_sf-dot-pulse{0%,to{box-shadow:0 0 #5fd4e000}50%{box-shadow:0 0 0 4px #5fd4e038}}@media(prefers-reduced-motion:reduce){.dot--running[_ngcontent-%COMP%]{animation:none}}']})};var bt=e=>["/sessions",e];function Tt(e,n){e&1&&(fa(0,"sf-status-chip",4),kC(1,"destroyed"),Ed());}function It(e,n){e&1&&(fa(0,"sf-status-chip",16),kC(1,"failed"),Ed());}function Rt(e,n){e&1&&(fa(0,"sf-status-chip",17),kC(1,"blocked"),Ed());}function At(e,n){e&1&&(fa(0,"sf-status-chip",18),kC(1,"waiting for human"),Ed());}function Ft(e,n){e&1&&(fa(0,"sf-status-chip",19),kC(1,"running"),Ed());}function Lt(e,n){e&1&&(fa(0,"sf-status-chip",20),kC(1,"completed"),Ed());}function zt(e,n){e&1&&(fa(0,"sf-status-chip",21),kC(1,"waiting"),Ed());}function Wt(e,n){if(e&1&&ni(0,It,2,0,"sf-status-chip",16)(1,Rt,2,0,"sf-status-chip",17)(2,At,2,0,"sf-status-chip",18)(3,Ft,2,0,"sf-status-chip",19)(4,Lt,2,0,"sf-status-chip",20)(5,zt,2,0,"sf-status-chip",21),e&2){let t;sC();let s=jC(0);ri((t=s.run?.cardState)==="failed"?0:t==="blocked"?1:t==="waiting_human"?2:t==="running"?3:t==="succeeded"?4:5);}}function jt(e,n){if(e&1&&(fa(0,"sf-status-chip",6),kC(1),Ed()),e&2){sC();let t=jC(0);Qo(),uy(t.workflowType);}}function Nt(e,n){if(e&1&&(fa(0,"span"),kC(1,"\u203A"),Ed(),fa(2,"span",9),kC(3),Ed()),e&2){sC();let t=jC(0);Qo(3),uy(t.branch);}}function Ut(e,n){if(e&1&&(fa(0,"span"),kC(1,"\xB7"),Ed(),fa(2,"span"),kC(3,"ticket "),fa(4,"span",9),kC(5),Ed()()),e&2){sC();let t=jC(0);Qo(5),uy(t.ticket);}}function Bt(e,n){if(e&1&&(fa(0,"p",12),kC(1," Created on "),fa(2,"time",22),kC(3),GC(4,"date"),GC(5,"date"),Ed()()),e&2){sC();let t=jC(0);Qo(2),$g("dateTime",t.createdAt),Qo(),ly("",YC(4,3,t.createdAt,"MMM d, yyyy")," at ",YC(5,6,t.createdAt,"HH:mm"));}}function Vt(e,n){if(e&1&&(fa(0,"div",30)(1,"sf-status-chip",31),kC(2),Ed()()),e&2){let t=sC(2);Qo(2),Cd(" Waiting for reply",t.currentPhase?" \xB7 "+t.currentPhase:""," ");}}function $t(e,n){if(e&1&&(fa(0,"div",30)(1,"sf-status-chip",32),kC(2),Ed()()),e&2){let t=sC(2);Qo(2),Cd(" running",t.currentPhase?" \xB7 "+t.currentPhase:""," ");}}function Ht(e,n){if(e&1&&ni(0,Vt,3,1,"div",30)(1,$t,3,1,"div",30),e&2){let t=sC();ri(t.waitingHuman?0:1);}}function Gt(e,n){if(e&1&&(fa(0,"section",13),ni(1,Ht,2,1),fa(2,"div",23)(3,"div",24),zg(4,"sf-step-dots",25),Ed(),fa(5,"div",26)(6,"sf-metric",27),kC(7),GC(8,"usd"),Ed(),fa(9,"sf-metric",28),kC(10),GC(11,"duration"),Ed(),fa(12,"sf-metric",29),kC(13),GC(14,"tokens"),Ed()()()()),e&2){let t=n;Qo(),ri(t.status==="running"?1:-1),Qo(3),$g("phases",t.phases),Qo(2),$g("unknownCostCount",t.unknownCostCount??0),Qo(),uy(KC(8,6,t.costUsd,4,t.unknownCostCount)),Qo(3),uy(ZC(11,10,t.durationSec)),Qo(3),uy(ZC(14,12,t.tokens));}}function Xt(e,n){if(e&1&&(fa(0,"p",14),kC(1," Final cost \xB7 workflows "),fa(2,"b"),kC(3),GC(4,"usd"),Ed()()),e&2){sC();let t=jC(0);Qo(3),uy(ZC(4,1,t.finalCostUsd));}}function qt(e,n){if(e&1&&(fa(0,"a",33)(1,"mat-icon"),kC(2,"open_in_new"),Ed(),kC(3," View supervisor case "),Ed()),e&2){let t=sC(2);$g("href",t.supervisorCaseUrl(),Om);}}function Kt(e,n){e&1&&(fa(0,"mat-icon",42),kC(1,"autorenew"),Ed());}function Jt(e,n){if(e&1){let t=eC();fa(0,"button",41),Yg("click",function(){Vp(t);let d=sC(2);return Hp(d.askSupervisor())}),ni(1,Kt,2,0,"mat-icon",42),kC(2," Ask supervisor "),Ed();}if(e&2){let t=sC(2);$g("disabled",t.supervisorState()==="loading"),Qo(),ri(t.supervisorState()==="loading"?1:-1);}}function Qt(e,n){e&1&&(fa(0,"button",35),kC(1," Ask supervisor "),Ed());}function Yt(e,n){if(e&1){let t=eC();fa(0,"button",43),Yg("click",function(){Vp(t);let d=sC(2);return Hp(d.action.emit("stop"))}),kC(1,"Stop"),Ed();}}function Zt(e,n){if(e&1&&(fa(0,"a",37),kC(1,"Conversation"),Ed()),e&2){let t=sC(2);$g("href",t.conversationLink,Om);}}function te(e,n){e&1&&(fa(0,"button",38),kC(1," Conversation "),Ed());}function ee(e,n){if(e&1&&(fa(0,"p",40)(1,"mat-icon",44),kC(2,"error_outline"),Ed(),kC(3),Ed()),e&2){let t=sC(2);Qo(3),Cd(" ",t.supervisorError()," ");}}function ne(e,n){if(e&1){let t=eC();fa(0,"footer",15),ni(1,qt,4,1,"a",33)(2,Jt,3,2,"button",34)(3,Qt,2,0,"button",35),ni(4,Yt,2,0,"button",36),ni(5,Zt,2,1,"a",37)(6,te,2,0,"button",38),fa(7,"button",39),Yg("click",function(){Vp(t);let d=sC();return Hp(d.action.emit("remove"))}),kC(8,"Remove"),Ed()(),ni(9,ee,4,1,"p",40);}if(e&2){let t=sC(),s=jC(0);Qo(),ri(t.supervisorState()==="done"&&t.supervisorCaseUrl()?1:s.namespaceId?2:3),Qo(3),ri(t.canStop?4:-1),Qo(),ri(t.conversationLink?5:6),Qo(4),ri(t.supervisorState()==="error"&&t.supervisorError()?9:-1);}}function ae(e,n){if(e&1){let t=eC();fa(0,"footer",15)(1,"button",43),Yg("click",function(){Vp(t);let d=sC();return Hp(d.action.emit("restore"))}),kC(2,"Restore"),Ed()();}}var H=class e{run=xy.required();action=YV();store=h(St);agentOsBaseUrl=h(rn);supervisorState=Ye("idle");supervisorError=Ye(null);supervisorCaseUrl=Ye(null);constructor(){Vs(()=>{if(this.supervisorState()!=="idle")return;let n=this.store.restoreSupervisorCase(this.run());n&&(this.supervisorCaseUrl.set(n.agentOsUrl),this.supervisorState.set("done"));});}get canStop(){let n=this.run();return n.status!=="working"||!n.id?false:!!this.store.session(n.id)?.activeAttemptId}get conversationLink(){let n=this.run(),t=n.controllerCaseId;return t?bt$1(t,n.namespaceId,this.agentOsBaseUrl):null}askSupervisor(){if(this.supervisorState()==="loading"||this.supervisorState()==="done")return;let n=this.run();if(!n.namespaceId){this.supervisorError.set("Unknown namespace -- cannot open a supervisor case."),this.supervisorState.set("error");return}this.supervisorState.set("loading"),this.supervisorError.set(null);let t=window.open("","_blank");t&&(t.opener=null),this.store.openSupervisorCase(n).subscribe({next:s=>{this.supervisorCaseUrl.set(s.agentOsUrl),this.supervisorState.set("done"),t&&!t.closed&&(t.location.href=s.agentOsUrl);},error:s=>{t&&!t.closed&&t.close(),this.supervisorState.set("error"),this.supervisorError.set(`Failed to create supervisor case: ${s.message}`);}});}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-run-card"]],inputs:{run:[1,"run"]},outputs:{action:"action"},decls:26,vars:22,consts:[["appearance","outlined","role","region",1,"card"],[1,"head"],[1,"name"],[3,"routerLink"],["tone","neutral","dot",""],[1,"sf-spacer"],["tone","cyan","icon","polyline"],[1,"meta"],["aria-hidden","true",1,"branch-icon"],[1,"sf-workflow"],[1,"service-link",3,"routerLink"],[1,"dot"],[1,"created-at"],["aria-label","Run summary",1,"run"],[1,"final-cost"],[1,"actions"],["tone","red","icon","close"],["tone","amber","icon","block"],["tone","amber","icon","person_alert"],["tone","blue","icon","progress_activity","spin",""],["tone","green","icon","check"],["tone","neutral","icon","pause"],[3,"dateTime"],[1,"run-details"],[1,"run-steps"],[3,"phases"],["aria-label","Run metrics",1,"run-metrics"],["icon","paid","label","Run cost",3,"unknownCostCount"],["icon","timer","label","Duration"],["icon","link","label","Tokens"],[1,"run-notice"],["tone","amber","size","sm","icon","person_alert"],["tone","blue","size","sm","icon","progress_activity","spin",""],["mat-flat-button","","target","_blank","rel","noopener","title","Open supervisor case",1,"sf-primary",3,"href"],["mat-flat-button","",1,"sf-primary","supervisor-btn",3,"disabled"],["mat-flat-button","","disabled","","title","Unknown namespace \u2014 cannot open a supervisor case",1,"sf-primary"],["mat-stroked-button","",1,"sf-secondary"],["mat-button","","target","_blank","rel","noopener",1,"sf-ghost",3,"href"],["mat-button","","disabled","","title","AgentOS controller case unavailable (no agent step executed for this workflow yet)",1,"sf-ghost"],["mat-stroked-button","",1,"sf-danger",3,"click"],["role","alert",1,"supervisor-error"],["mat-flat-button","",1,"sf-primary","supervisor-btn",3,"click","disabled"],[1,"spin-icon"],["mat-stroked-button","",1,"sf-secondary",3,"click"],[1,"supervisor-error__icon"]],template:function(t,s){if(t&1&&(py(0),fa(1,"mat-card",0)(2,"header",1)(3,"h3",2)(4,"a",3),kC(5),Ed()(),ni(6,Tt,2,0,"sf-status-chip",4)(7,Wt,6,1),zg(8,"span",5),ni(9,jt,2,1,"sf-status-chip",6),Ed(),fa(10,"div",7)(11,"mat-icon",8),kC(12,"account_tree"),Ed(),fa(13,"span",9),kC(14),Ed(),ni(15,Nt,4,1),ni(16,Ut,6,1),zg(17,"span",5),fa(18,"a",10),zg(19,"span",11),kC(20,"Factory trace"),Ed()(),ni(21,Bt,6,9,"p",12),ni(22,Gt,15,14,"section",13)(23,Xt,5,3,"p",14),ni(24,ne,10,4)(25,ae,3,0,"footer",15),Ed()),t&2){let d,l=PC(s.run());Qo(),Dt("card--working",l.status==="working")("card--destroyed",l.status==="destroyed"),rr("aria-label","Run "+l.title)("data-run-id",l.id),Qo(3),$g("routerLink",$C(18,bt,l.id)),Qo(),uy(l.title),Qo(),ri(l.status==="destroyed"?6:7),Qo(3),ri(l.workflowType?9:-1),Qo(5),uy(l.project),Qo(),ri(l.branch?15:-1),Qo(),ri(l.ticket?16:-1),Qo(2),$g("routerLink",$C(20,bt,l.id)),Qo(3),ri(l.createdAt?21:-1),Qo(),ri((d=l.run)?22:l.status==="destroyed"?23:-1,d),Qo(2),ri(l.status!=="destroyed"?24:25);}},dependencies:[Nt$1,yt,_t,IW,_W,A8,x8,_,y,$,nS,ot,st,nt],styles:[".card[_ngcontent-%COMP%]{padding:20px 22px;display:flex;flex-direction:column;gap:14px}.card--working[_ngcontent-%COMP%]{border-color:var(--sf-outline-active);box-shadow:0 10px 40px -18px #7aa2f773}.card--destroyed[_ngcontent-%COMP%]{opacity:.8}.head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.name[_ngcontent-%COMP%]{margin:0;font-family:var(--sf-mono);font-size:19px;font-weight:700;color:var(--sf-primary)}.name[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:inherit;text-decoration:none}.name[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-family:var(--sf-mono);font-size:13px;color:var(--sf-text-muted)}.branch-icon[_ngcontent-%COMP%]{width:16px;height:16px;font-size:16px;color:var(--sf-secondary)}.service-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:7px;height:26px;padding:0 11px;border-radius:999px;border:1px solid var(--sf-outline);font-family:var(--sf-font);font-size:12.5px;font-weight:600;color:var(--sf-text-2);text-decoration:none}.service-link[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;background:var(--sf-secondary)}.service-link[_ngcontent-%COMP%]:hover{border-color:var(--sf-outline-strong);color:var(--sf-text)}.service-link--disabled[_ngcontent-%COMP%]{opacity:.45;cursor:default;pointer-events:none}.service-link--disabled[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{background:var(--sf-text-muted)}.created-at[_ngcontent-%COMP%]{margin:0;font-size:12px;color:var(--sf-text-muted);font-family:var(--sf-mono);letter-spacing:.01em}.run[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;padding:14px 16px;border-radius:12px;background:var(--sf-chrome);border:1px solid var(--sf-outline)}.run-notice[_ngcontent-%COMP%]{display:flex;align-items:center;min-width:0}.run-details[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0}.run-steps[_ngcontent-%COMP%]{min-width:0}.run-metrics[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex:0 0 auto}.goal[_ngcontent-%COMP%]{margin:0;font-size:14px;color:#d5d9e4}.final-cost[_ngcontent-%COMP%]{margin:0;font-family:var(--sf-mono);font-size:13px;color:var(--sf-text-muted)}.final-cost[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{color:var(--sf-text)}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding-top:2px}.supervisor-btn[_ngcontent-%COMP%]{display:inline-flex!important;align-items:center;gap:4px}.spin-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;animation:_ngcontent-%COMP%_sf-spin 1s linear infinite}@keyframes _ngcontent-%COMP%_sf-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media(max-width:760px){.card[_ngcontent-%COMP%]{padding:16px}.meta[_ngcontent-%COMP%], .actions[_ngcontent-%COMP%]{flex-wrap:wrap}.run-details[_ngcontent-%COMP%]{align-items:flex-start;flex-direction:column;gap:10px}.run-metrics[_ngcontent-%COMP%]{justify-content:flex-start;flex-wrap:wrap}}.supervisor-error[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin:4px 0 0;padding:6px 10px;border-radius:6px;background:color-mix(in srgb,var(--sf-danger, #e53e3e) 12%,transparent);color:var(--sf-danger, #e53e3e);font-size:13px}.supervisor-error__icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;flex-shrink:0}"]})};var ie=(e,n)=>n.id;function re(e,n){if(e&1){let t=eC();fa(0,"div",9)(1,"sf-run-card",11),Yg("action",function(d){let l=Vp(t).$implicit,kt=sC();return Hp(kt.onRunAction(l.id,d))}),Ed()();}if(e&2){let t=n.$implicit;Qo(),$g("run",t);}}function oe(e,n){e&1&&(fa(0,"p",10),kC(1,"No run in this workstream."),Ed());}var G=class e{workstream=xy.required();action=YV();runCount=nT(()=>this.workstream().runs.length);totalCost=nT(()=>this.workstream().runs.reduce((n,t)=>n+(t.run?.costUsd??t.costUsd??0),0));unknownCostCount=nT(()=>this.workstream().runs.reduce((n,t)=>n+(t.run?.unknownCostCount??0),0));onRunAction(n,t){this.action.emit({runId:n,action:t});}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-workstream-card"]],inputs:{workstream:[1,"workstream"]},outputs:{action:"action"},decls:17,vars:15,consts:[["role","region",1,"workstream"],[1,"workstream-head"],[1,"workstream-identity"],[1,"title"],[1,"namespace-id","sf-mono",3,"title"],["aria-label","Workstream totals",1,"workstream-totals"],[1,"count"],[1,"cost"],["role","list",1,"runs"],["role","listitem",1,"run-item"],[1,"empty","sf-muted"],[3,"action","run"]],template:function(t,s){if(t&1&&(fa(0,"section",0)(1,"header",1)(2,"div",2)(3,"h2",3),kC(4),Ed(),fa(5,"code",4),kC(6),Ed()(),fa(7,"div",5)(8,"span",6),kC(9),Ed(),fa(10,"span",7),kC(11),GC(12,"usd"),Ed()()(),fa(13,"div",8),qw(14,re,2,1,"div",9,ie,false,oe,2,0,"p",10),Ed()()),t&2){let d=s.workstream();rr("aria-label","Workstream "+d.title)("data-namespace-id",d.namespaceId),Qo(4),uy(d.title),Qo(),$g("title","Namespace ID: "+d.namespaceId),Qo(),uy(d.namespaceId),Qo(2),rr("aria-label",s.runCount()+" runs"),Qo(),ly(" ",s.runCount()," run",s.runCount()===1?"":"s"," "),Qo(),rr("aria-label","Workstream cost"),Qo(),uy(KC(12,11,s.totalCost(),2,s.unknownCostCount())),Qo(3),Zw(d.runs);}},dependencies:[H,ot],styles:[".workstream[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding:16px 18px;border:1px solid var(--sf-outline);border-left:4px solid var(--sf-primary);border-radius:16px;background:var(--sf-panel, transparent)}.workstream-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:20px}.workstream-identity[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}.workstream-totals[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex:0 0 auto}.title[_ngcontent-%COMP%]{margin:0;font-family:var(--sf-font);font-size:30px;font-weight:800;letter-spacing:-.02em;color:var(--sf-text-primary)}.title[_ngcontent-%COMP%]:first-letter{text-transform:uppercase}.namespace-id[_ngcontent-%COMP%]{font-size:12px;color:var(--sf-text-muted);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.count[_ngcontent-%COMP%]{font-size:13px;color:var(--sf-text-muted)}.cost[_ngcontent-%COMP%]{font-family:var(--sf-mono);font-size:15px;font-weight:700;color:var(--sf-secondary)}.runs[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.run-item[_ngcontent-%COMP%]{display:block}.empty[_ngcontent-%COMP%]{margin:0;padding:12px}@media(max-width:620px){.workstream[_ngcontent-%COMP%]{padding:14px}.workstream-head[_ngcontent-%COMP%]{align-items:flex-start;flex-direction:column;gap:10px}.workstream-totals[_ngcontent-%COMP%]{justify-content:space-between;width:100%}}"]})};var se=(e,n)=>n.namespaceId;function de(e,n){if(e&1){let t=eC();fa(0,"sf-workstream-card",17),Yg("action",function(d){Vp(t);let l=sC();return Hp(l.onAction(d))}),Ed();}if(e&2){let t=n.$implicit;$g("workstream",t);}}function ce(e,n){e&1&&(fa(0,"p",16),kC(1,"No active workflows."),Ed());}var ht=class e{store=h(St);dialog=h(ee$1);constructor(){h(pb).crumbs.set([{label:"Workstreams",link:"/workstreams"}]);}onAction(n){let{runId:t,action:s}=n;switch(s){case "stop":this.store.stop(t);return;case "remove":this.confirmRemove(t);return;case "restore":this.store.restore(t);return;case "ask":case "conversation":return}}confirmRemove(n){let t={title:"Remove run",message:"Are you sure you want to remove this run? The action is recoverable via the destroyed runs toggle.",confirmLabel:"Remove",destructive:true};this.dialog.open(I,{data:t,width:"440px"}).afterClosed().subscribe(s=>{s===true&&this.store.remove(n);});}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-workstreams-page"]],decls:40,vars:12,consts:[[1,"page"],[1,"page-head"],[1,"titles"],[1,"sf-muted"],["mat-flat-button","","routerLink","/launch","data-workstreams-launch","true",1,"sf-primary"],["aria-label","Key metrics",1,"kpis"],[1,"kpi","sf-panel"],[1,"sf-overline"],[1,"kpi-value"],[1,"kpi-sub"],[1,"ok-dot"],[1,"kpi-value","kpi-value--cyan"],[1,"kpi","sf-panel","kpi--total"],[1,"kpi-value","kpi-value--violet"],["aria-label","Workstreams",1,"cards"],[3,"workstream"],[1,"empty","sf-panel","sf-muted"],[3,"action","workstream"]],template:function(t,s){if(t&1&&(fa(0,"div",0)(1,"header",1)(2,"div",2)(3,"h1"),kC(4,"Workstreams"),Ed(),fa(5,"p",3),kC(6,"Runs grouped by namespace, derived from the real workflows exposed by factory-service."),Ed()(),fa(7,"a",4)(8,"mat-icon"),kC(9,"play_arrow"),Ed(),kC(10," Launch a run "),Ed()(),fa(11,"section",5)(12,"article",6)(13,"h2",7),kC(14,"Active workflows"),Ed(),fa(15,"span",8),kC(16),Ed(),fa(17,"span",9),zg(18,"span",10),kC(19,"real runs in progress"),Ed()(),fa(20,"article",6)(21,"h2",7),kC(22,"Workflow cost"),Ed(),fa(23,"span",11),kC(24),GC(25,"usd"),Ed(),fa(26,"span",9),kC(27,"cumulative real cost"),Ed()(),fa(28,"article",12)(29,"h2",7),kC(30,"Total"),Ed(),fa(31,"span",13),kC(32),GC(33,"usd"),Ed(),fa(34,"span",9),kC(35,"real cost of active workflows"),Ed()()(),fa(36,"section",14),qw(37,de,1,1,"sf-workstream-card",15,se,false,ce,2,0,"p",16),Ed()()),t&2){let d=s.store.costs();Qo(16),uy(d.active),Qo(8),uy(KC(25,4,d.workflowsUsd,2,d.unknownCostCount)),Qo(8),uy(KC(33,8,d.totalUsd,2,d.unknownCostCount)),Qo(5),Zw(s.store.workstreams());}},dependencies:[Nt$1,IW,_W,A8,x8,G,ot],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;max-width:1400px}.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-size:28px;font-weight:800;letter-spacing:-.01em}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.kpis[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.kpi[_ngcontent-%COMP%]{padding:18px 20px;display:flex;flex-direction:column;gap:8px;border-radius:14px}.kpi--total[_ngcontent-%COMP%]{background:#151027;border-color:#3b2d63}.kpi--total[_ngcontent-%COMP%] .sf-overline[_ngcontent-%COMP%], .kpi--total[_ngcontent-%COMP%] .kpi-sub[_ngcontent-%COMP%]{color:#b9a4e6}.kpi-value[_ngcontent-%COMP%]{font-family:var(--sf-mono);font-size:30px;font-weight:600}.kpi-value--cyan[_ngcontent-%COMP%]{color:var(--sf-secondary)}.kpi-value--violet[_ngcontent-%COMP%]{color:var(--sf-primary);font-weight:700}.kpi-sub[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--sf-text-muted)}.ok-dot[_ngcontent-%COMP%]{width:7px;height:7px;flex-shrink:0;border-radius:50%;background:var(--sf-success);display:inline-block}.cards[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.empty[_ngcontent-%COMP%]{padding:24px;text-align:center;margin:0}"]})};export{ht as WorkstreamsPageComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {J,Z}from'./chunk-
|
|
1
|
+
import {J,Z}from'./chunk-4c29JuK_.js';import {h,a4 as fb,au as G,p as pb,g as Ye,A as Ae,I as IW,_ as _W,a as A8,x as x8,N as Nt,f as fa,k as kC,E as Ed,v as ni,Q as Qo,$ as $g,l as ly,y as ri,u as uy,z as zg,R as sC}from'./main-Q2L26FCS.js';function T(e,t){e&1&&(fa(0,"p",5),kC(1),Ed()),e&2&&(Qo(),uy(t));}function W(e,t){e&1&&(fa(0,"div",6),zg(1,"mat-progress-spinner",9),fa(2,"span",10),kC(3,"Loading definition\u2026"),Ed()());}function I(e,t){e&1&&(fa(0,"div",7)(1,"mat-icon",11),kC(2,"cloud_off"),Ed(),fa(3,"span"),kC(4),Ed()()),e&2&&(Qo(4),uy(t));}function z(e,t){if(e&1&&(fa(0,"pre",8)(1,"code"),kC(2),Ed()()),e&2){let l=sC();Qo(2),uy(l.formatJson(t));}}function F(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}var E=class e{api=h(fb);route=h(G);shell=h(pb);backLink=["/workflows"];loading=Ye(false);error=Ye(null);definition=Ye(null);workflowType;version;formatJson=F;constructor(){let t=this.route.snapshot.paramMap;this.workflowType=t.get("type")??"",this.version=t.get("version")??"",this.shell.crumbs.set([{label:"Workflows",link:"/workflows"},{label:`${this.workflowType}@${this.version}`,mono:true}]),this.load();}load(){if(!this.workflowType||!this.version){this.error.set("Missing route parameters (type or version).");return}this.loading.set(true),this.error.set(null),this.api.getWorkflowDefinition(this.workflowType,this.version).subscribe({next:t=>{this.definition.set(t),this.loading.set(false);},error:t=>{this.error.set(t?.message?.trim()||"Unable to load workflow definition."),this.loading.set(false);}});}static \u0275fac=function(l){return new(l||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-workflow-detail-page"]],decls:13,vars:5,consts:[[1,"page"],[1,"page-head"],["mat-stroked-button","","data-workflow-back","",1,"sf-secondary","back-btn",3,"routerLink"],[1,"titles"],["data-workflow-detail-type","",1,"sf-mono"],["data-workflow-detail-title","",1,"sf-muted"],["data-workflow-detail-loading","",1,"state"],["role","alert","data-workflow-detail-error","",1,"banner","banner--warn"],["data-workflow-detail-json","",1,"json-block"],["diameter","32","mode","indeterminate"],[1,"sf-muted"],["aria-hidden","true"]],template:function(l,a){if(l&1&&(fa(0,"div",0)(1,"header",1)(2,"a",2)(3,"mat-icon"),kC(4,"arrow_back"),Ed(),kC(5," Back "),Ed(),fa(6,"div",3)(7,"h1",4),kC(8),Ed(),ni(9,T,2,1,"p",5),Ed()(),ni(10,W,4,0,"div",6)(11,I,5,1,"div",7)(12,z,3,1,"pre",8),Ed()),l&2){let g,f;Qo(2),$g("routerLink",a.backLink),Qo(6),ly("",a.workflowType,"@",a.version),Qo(),ri((g=a.definition()?.title)?9:-1,g),Qo(),ri(a.loading()?10:(f=a.error())?11:(f=a.definition())?12:-1,f);}},dependencies:[IW,_W,A8,x8,J,Z,Nt],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px;max-width:1200px}.page-head[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:16px}.back-btn[_ngcontent-%COMP%]{flex-shrink:0;margin-top:2px}.titles[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px}h1[_ngcontent-%COMP%]{margin:0;font-size:22px;font-weight:700;letter-spacing:-.01em;word-break:break-all}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid;font-size:13.5px;font-weight:600}.banner[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px}.banner--warn[_ngcontent-%COMP%]{color:var(--sf-tertiary);border-color:#5a4818;background:#1d180b}.state[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.json-block[_ngcontent-%COMP%]{margin:0;padding:20px 24px;border-radius:12px;border:1px solid var(--sf-outline);background:var(--sf-surface-2);font-family:var(--sf-mono);font-size:13px;line-height:1.6;overflow-x:auto;overflow-y:auto;max-height:75vh;white-space:pre;tab-size:2}.json-block[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font:inherit;color:inherit;background:none;padding:0}"]})};export{E as WorkflowDetailPageComponent,F as formatJson};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {h,F as y,aW as ff,bZ as Y,aP as ro,aV as q,cu as qb,aE as xc,aa as M,bg as Q,cv as je$1,cp as F,cw as Le$1,cx as Xe$1,c7 as Xt,aZ as at,c8 as q$1,cy as wt,cz as Ft,bL as Ur,a_ as $$1,bA as QS,bU as ao,aY as wt$1,ba as Zb,bb as Yv,aU as ke,aG as um,A as Ae,a$ as Wi,aI as qr,f as fa,b1 as jg,E as Ed,bK as qg,r as rr,D as Dt,B as pe,C as ce,bX as di,aC as Pe$1,J as Jr,aS as ue,aH as tt,b0 as ha,c as Yg,cA as Aw,cB as pt,cC as vM,cD as zv,aR as P,b3 as sf,aT as ti,b4 as Ny,cd as be,aQ as k,b_ as Gl,cE as rM,b2 as Xg,aM as uC,aN as lC,g as Ye$1,cF as oM,cG as EM,cH as At}from'./main-
|
|
1
|
+
import {h,F as y,aW as ff,bZ as Y,aP as ro,aV as q,cu as qb,aE as xc,aa as M,bg as Q,cv as je$1,cp as F,cw as Le$1,cx as Xe$1,c7 as Xt,aZ as at,c8 as q$1,cy as wt,cz as Ft,bL as Ur,a_ as $$1,bA as QS,bU as ao,aY as wt$1,ba as Zb,bb as Yv,aU as ke,aG as um,A as Ae,a$ as Wi,aI as qr,f as fa,b1 as jg,E as Ed,bK as qg,r as rr,D as Dt,B as pe,C as ce,bX as di,aC as Pe$1,J as Jr,aS as ue,aH as tt,b0 as ha,c as Yg,cA as Aw,cB as pt,cC as vM,cD as zv,aR as P,b3 as sf,aT as ti,b4 as Ny,cd as be,aQ as k,b_ as Gl,cE as rM,b2 as Xg,aM as uC,aN as lC,g as Ye$1,cF as oM,cG as EM,cH as At}from'./main-Q2L26FCS.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(vM);_config;_interactivityChecker=h(zv);_ngZone=h(P);_focusMonitor=h(sf);_renderer=h(ti);_changeDetectorRef=h(Ny);_injector=h(Y);_platform=h(be);_document=h(k);_portalOutlet;_focusTrapped=new q;_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||Gl(()=>{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=rM(),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=rM();return e===t||e.contains(t)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=rM()));}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Ae({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(t,n){if(t&1&&Xg(Wi,7),t&2){let o;uC(o=lC())&&(n._portalOutlet=o.first);}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(t,n){t&2&&rr("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:[qr],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,n){t&1&&jg(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,4 +1,4 @@
|
|
|
1
|
-
import {h,a4 as fb,S as St,g as Ye,n as nT,bg as Q,aa as M,bh as KV,bM as gt,p as pb,V as Vs,a8 as AW,A as Ae,N as Nt,I as IW,_ as _W,bN as LM,aj as Pt,ak as It,al as Me,am as Se,bO as bi,a as A8,x as x8,bP as Mt,ao as Wr,ap as Hr,aq as ce$1,o as ot,f as fa,k as kC,E as Ed,c as Yg,z as zg,q as qw,v as ni$1,bQ as _d,b1 as jg,bR as Id,G as GC,Q as Qo,$ as $g,a2 as Cd,Z as Zw,y as ri$1,u as uy,U as YC,bo as UC,aK as gy,bS as et$1,bT as C,bm as ey,bn as dC,bU as ao,aV as q,aU as ke,bV as bt,F as y,aH as tt$1,b0 as ha,aJ as Et,B as pe,C as ce$2,bz as lb,J as Jr,bW as Vt,aE as xc,aA as yr,aG as um,aI as qr,H as or,bc as un$1,L as nt$1,bd as ln$1,bC as Ge,bK as qg,r as rr,D as Dt,aL as Qg,aM as uC,aN as lC,bX as di,bY as Vt$1,aS as ue,b4 as Ny,bZ as Y,aP as ro,aD as Yn$1,aW as ff,aF as df,bu as Ac,ba as Zb,bb as Yv,b_ as Gl,b$ as Bg,b2 as Xg,aQ as k,b3 as sf,b6 as Bt,b7 as cb,bD as K3,b5 as G,aT as ti$1,c0 as _i,c1 as Ei$1,c2 as f3,b as xy,bf as ry,R as sC,w as $C,W as ZC,bF as fC,bA as QS,be as Ld,bJ as ys,c3 as qV,aR as P,c4 as yf,c5 as ab,c6 as Xa,X as ii$1,bp as Jp,aO as Gr,aZ as at,c7 as Xt,c8 as q$1,c9 as Yt,by as Ce,aY as wt,a_ as $,ca as UI,bq as dn$1,cb as It$1,e as eC,cc as Kg,a0 as Vp,a1 as Hp,bL as Ur}from'./main-
|
|
1
|
+
import {h,a4 as fb,S as St,g as Ye,n as nT,bg as Q,aa as M,bh as KV,bM as gt,p as pb,V as Vs,a8 as AW,A as Ae,N as Nt,I as IW,_ as _W,bN as LM,aj as Pt,ak as It,al as Me,am as Se,bO as bi,a as A8,x as x8,bP as Mt,ao as Wr,ap as Hr,aq as ce$1,o as ot,f as fa,k as kC,E as Ed,c as Yg,z as zg,q as qw,v as ni$1,bQ as _d,b1 as jg,bR as Id,G as GC,Q as Qo,$ as $g,a2 as Cd,Z as Zw,y as ri$1,u as uy,U as YC,bo as UC,aK as gy,bS as et$1,bT as C,bm as ey,bn as dC,bU as ao,aV as q,aU as ke,bV as bt,F as y,aH as tt$1,b0 as ha,aJ as Et,B as pe,C as ce$2,bz as lb,J as Jr,bW as Vt,aE as xc,aA as yr,aG as um,aI as qr,H as or,bc as un$1,L as nt$1,bd as ln$1,bC as Ge,bK as qg,r as rr,D as Dt,aL as Qg,aM as uC,aN as lC,bX as di,bY as Vt$1,aS as ue,b4 as Ny,bZ as Y,aP as ro,aD as Yn$1,aW as ff,aF as df,bu as Ac,ba as Zb,bb as Yv,b_ as Gl,b$ as Bg,b2 as Xg,aQ as k,b3 as sf,b6 as Bt,b7 as cb,bD as K3,b5 as G,aT as ti$1,c0 as _i,c1 as Ei$1,c2 as f3,b as xy,bf as ry,R as sC,w as $C,W as ZC,bF as fC,bA as QS,be as Ld,bJ as ys,c3 as qV,aR as P,c4 as yf,c5 as ab,c6 as Xa,X as ii$1,bp as Jp,aO as Gr,aZ as at,c7 as Xt,c8 as q$1,c9 as Yt,by as Ce,aY as wt,a_ as $,ca as UI,bq as dn$1,cb as It$1,e as eC,cc as Kg,a0 as Vp,a1 as Hp,bL as Ur}from'./main-Q2L26FCS.js';import {B as Be,P as Pe}from'./chunk-6xNiKFWE.js';import {K as Ke,c as ci,Z as Zt,e as ei,n as ni,t as ti,J as Jt,r as ri,i as ii,o as oi,s as si,a as ai,l as li,U}from'./chunk-B4B0i3CG.js';import {_}from'./chunk-yvUmK3gv.js';var Di=["*",[["mat-chip-avatar"],["","matChipAvatar",""]],[["mat-chip-trailing-icon"],["","matChipRemove",""],["","matChipTrailingIcon",""]]],Ei=["*","mat-chip-avatar, [matChipAvatar]","mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"];function Qi(n,a){n&1&&(fa(0,"span",3),nt$1(1,1),Ed());}function Gi(n,a){n&1&&(fa(0,"span",6),nt$1(1,2),Ed());}function Ki(n,a){n&1&&(fa(0,"span",3),nt$1(1,1),fa(2,"span",7),Jp(),fa(3,"svg",8),zg(4,"path",9),Ed()()());}function Ui(n,a){n&1&&(fa(0,"span",6),nt$1(1,2),Ed());}var Yi=`.mdc-evolution-chip,
|
|
2
2
|
.mdc-evolution-chip__cell,
|
|
3
3
|
.mdc-evolution-chip__action {
|
|
4
4
|
display: inline-flex;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b as xy,h,au as G,S as St$1,p as pb,d as rn,av as Be,n as nT,g as Ye,aw as O,ax as Oi$1,ay as Ht,V as Vs,i as bt,A as Ae,I as IW,_ as _W,j as nS,o as ot,s as st$1,m as nt,v as ni$1,y as ri$1,az as g,aA as yr,aB as R,B as pe,C as ce,aC as Pe,J as Jr,aD as Yn$1,aE as xc,aF as df,aG as um,aH as tt,aI as qr,aJ as Et$1,aK as gy,F as y$1,D as Dt,aL as Qg,aM as uC,aN as lC,aO as Gr,aP as ro$1,aQ as k,aR as P,aS as ue,aT as ti$1,aU as ke,aV as q,aW as ff,aX as p,aY as wt,aZ as at$1,a_ as $,a$ as Wi$1,b0 as ha$1,H as or,L as nt$1,f as fa$1,b1 as jg,E as Ed,Q as Qo$1,r as rr,$ as $g,b2 as Xg,b3 as sf,b4 as Ny,b5 as G$1,b6 as Bt,b7 as cb,b8 as Aa$1,b9 as In$1,ba as Zb,bb as Yv,bc as un,bd as ln,be as Ld,c as Yg,bf as ry,Y as YV,bg as Q,aa as M,a as A8,x as x8,M as $t,O as vt$1,k as kC,q as qw,G as GC,Z as Zw,u as uy,W as ZC,bh as KV,bi as oi$1,bj as Bt$1,bk as Qe,bl as si$1,z as zg,a2 as Cd,bm as ey,bn as dC,e as eC,a0 as Vp,R as sC,a1 as Hp,U as YC,K as KC,bo as UC,bp as Jp,bq as dn,br as Ww,X as ii$1,bs as Xr,bt as En$1,bu as Ac,bv as ze,bw as Ie$1,a9 as cc,bx as S,by as Ce,bz as lb,bA as QS,bB as d,bC as Ge,bD as K3,bE as wn$1,bF as fC,bG as m,bH as eh,bI as O$1,bJ as ys,bK as qg,at as Gw,bL as Ur,a3 as Om}from'./main-
|
|
1
|
+
import {b as xy,h,au as G,S as St$1,p as pb,d as rn,av as Be,n as nT,g as Ye,aw as O,ax as Oi$1,ay as Ht,V as Vs,i as bt,A as Ae,I as IW,_ as _W,j as nS,o as ot,s as st$1,m as nt,v as ni$1,y as ri$1,az as g,aA as yr,aB as R,B as pe,C as ce,aC as Pe,J as Jr,aD as Yn$1,aE as xc,aF as df,aG as um,aH as tt,aI as qr,aJ as Et$1,aK as gy,F as y$1,D as Dt,aL as Qg,aM as uC,aN as lC,aO as Gr,aP as ro$1,aQ as k,aR as P,aS as ue,aT as ti$1,aU as ke,aV as q,aW as ff,aX as p,aY as wt,aZ as at$1,a_ as $,a$ as Wi$1,b0 as ha$1,H as or,L as nt$1,f as fa$1,b1 as jg,E as Ed,Q as Qo$1,r as rr,$ as $g,b2 as Xg,b3 as sf,b4 as Ny,b5 as G$1,b6 as Bt,b7 as cb,b8 as Aa$1,b9 as In$1,ba as Zb,bb as Yv,bc as un,bd as ln,be as Ld,c as Yg,bf as ry,Y as YV,bg as Q,aa as M,a as A8,x as x8,M as $t,O as vt$1,k as kC,q as qw,G as GC,Z as Zw,u as uy,W as ZC,bh as KV,bi as oi$1,bj as Bt$1,bk as Qe,bl as si$1,z as zg,a2 as Cd,bm as ey,bn as dC,e as eC,a0 as Vp,R as sC,a1 as Hp,U as YC,K as KC,bo as UC,bp as Jp,bq as dn,br as Ww,X as ii$1,bs as Xr,bt as En$1,bu as Ac,bv as ze,bw as Ie$1,a9 as cc,bx as S,by as Ce,bz as lb,bA as QS,bB as d,bC as Ge,bD as K3,bE as wn$1,bF as fC,bG as m,bH as eh,bI as O$1,bJ as ys,bK as qg,at as Gw,bL as Ur,a3 as Om}from'./main-Q2L26FCS.js';import {y}from'./chunk-BYZCY_yB.js';import {e as ee,$ as $e,H as Ht$1,j as jt,N as Nt,z as zt,V as Vt}from'./chunk-Bu7fcbUT.js';import {_}from'./chunk-yvUmK3gv.js';function Cn(t){t||(t=h(Be));let n=new R(e=>{if(t.destroyed){e.next();return}return t.onDestroy(e.next.bind(e))});return e=>e.pipe(yr(n))}function Ie(t,n){let i=!n?.manualCleanup?n?.injector?.get(Be)??h(Be):null,o=zn(n?.equal),d;n?.requireSync?d=Ye({kind:0},{equal:o}):d=Ye({kind:1,value:n?.initialValue},{equal:o});let _,U=t.subscribe({next:ie=>d.set({kind:1,value:ie}),error:ie=>{d.set({kind:2,error:ie}),_?.();},complete:()=>{_?.();}});if(n?.requireSync&&d().kind===0)throw new g(601,false);return _=i?.onDestroy(U.unsubscribe.bind(U)),nT(()=>{let ie=d();switch(ie.kind){case 1:return ie.value;case 2:throw ie.error;case 0:throw new g(601,false)}},{equal:n?.equal})}function zn(t=Object.is){return (n,e)=>n.kind===1&&e.kind===1&&t(n.value,e.value)}var vt=new y$1("CdkAccordion"),yn=(()=>{class t{_stateChanges=new q;_openCloseAllActions=new q;id=h(ff).getId("cdk-accordion-");multi=false;openAll(){this.multi&&this._openCloseAllActions.next(true);}closeAll(){this._openCloseAllActions.next(false);}ngOnChanges(e){this._stateChanges.next(e);}ngOnDestroy(){this._stateChanges.complete(),this._openCloseAllActions.complete();}static \u0275fac=function(i){return new(i||t)};static \u0275dir=tt({type:t,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:[2,"multi","multi",Et$1]},exportAs:["cdkAccordion"],features:[gy([{provide:vt,useExisting:t}]),ha$1]})}return t})(),kn=(()=>{class t{accordion=h(vt,{optional:true,skipSelf:true});_changeDetectorRef=h(Ny);_expansionDispatcher=h(p);_openCloseAllSubscription=G$1.EMPTY;closed=new ke;opened=new ke;destroyed=new ke;expandedChange=new ke;id=h(ff).getId("cdk-accordion-child-");get expanded(){return this._expanded}set expanded(e){if(this._expanded!==e){if(this._expanded=e,this.expandedChange.emit(e),e){this.opened.emit();let i=this.accordion?this.accordion.id:this.id;this._expansionDispatcher.notify(this.id,i);}else this.closed.emit();this._changeDetectorRef.markForCheck();}}_expanded=false;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(e);}_disabled=Ye(false);_removeUniqueSelectionListener=()=>{};ngOnInit(){this._removeUniqueSelectionListener=this._expansionDispatcher.listen((e,i)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===i&&this.id!==e&&(this.expanded=false);}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions());}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe();}toggle(){this.disabled||(this.expanded=!this.expanded);}close(){this.disabled||(this.expanded=false);}open(){this.disabled||(this.expanded=true);}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e);})}static \u0275fac=function(i){return new(i||t)};static \u0275dir=tt({type:t,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[2,"expanded","expanded",Et$1],disabled:[2,"disabled","disabled",Et$1]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[gy([{provide:vt,useValue:void 0}])]})}return t})(),Mn=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=pe({type:t});static \u0275inj=ce({})}return t})();var $n=["body"],Vn=["bodyWrapper"],qn=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],Qn=["mat-expansion-panel-header","*","mat-action-row"];function Gn(t,n){}var jn=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],Hn=["mat-panel-title","mat-panel-description","*"];function Un(t,n){t&1&&(un(0,"span",1),Jp(),un(1,"svg",2),dn(2,"path",3),ln()());}var Ct=new y$1("MAT_ACCORDION"),In=new y$1("MAT_EXPANSION_PANEL"),Wn=(()=>{class t{_template=h(Ur);_expansionPanel=h(In,{optional:true});static \u0275fac=function(i){return new(i||t)};static \u0275dir=tt({type:t,selectors:[["ng-template","matExpansionPanelContent",""]]})}return t})(),wn=new y$1("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),Mt=(()=>{class t extends kn{_viewContainerRef=h(Gr);_animationsDisabled=ro$1();_document=h(k);_ngZone=h(P);_elementRef=h(ue);_renderer=h(ti$1);_cleanupTransitionEnd;get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=e;}_hideToggle=false;get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e;}_togglePosition;afterExpand=new ke;afterCollapse=new ke;_inputChanges=new q;accordion=h(Ct,{optional:true,skipSelf:true});_lazyContent;_body;_bodyWrapper;_portal;_headerId=h(ff).getId("mat-expansion-panel-header-");constructor(){super();let e=h(wn,{optional:true});this._expansionDispatcher=h(p),e&&(this.hideToggle=e.hideToggle);}_hasSpacing(){return this.accordion?this.expanded&&this.accordion.displayMode==="default":false}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded;}close(){this.expanded=false;}open(){this.expanded=true;}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(xc(null),wt(()=>this.expanded&&!this._portal),at$1(1)).subscribe(()=>{this._portal=new $(this._lazyContent._template,this._viewContainerRef);}),this._setupAnimationEvents();}ngOnChanges(e){this._inputChanges.next(e);}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTransitionEnd?.(),this._inputChanges.complete();}_containsFocus(){if(this._body){let e=this._document.activeElement,i=this._body.nativeElement;return e===i||i.contains(e)}return false}_transitionEndListener=({target:e,propertyName:i})=>{e===this._bodyWrapper?.nativeElement&&i==="grid-template-rows"&&this._ngZone.run(()=>{this.expanded?this.afterExpand.emit():this.afterCollapse.emit();});};_setupAnimationEvents(){this._ngZone.runOutsideAngular(()=>{this._animationsDisabled?(this.opened.subscribe(()=>this._ngZone.run(()=>this.afterExpand.emit())),this.closed.subscribe(()=>this._ngZone.run(()=>this.afterCollapse.emit()))):setTimeout(()=>{let e=this._elementRef.nativeElement;this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this._transitionEndListener),e.classList.add("mat-expansion-panel-animations-enabled");},200);});}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Ae({type:t,selectors:[["mat-expansion-panel"]],contentQueries:function(i,o,d){if(i&1&&Qg(d,Wn,5),i&2){let _;uC(_=lC())&&(o._lazyContent=_.first);}},viewQuery:function(i,o){if(i&1&&Xg($n,5)(Vn,5),i&2){let d;uC(d=lC())&&(o._body=d.first),uC(d=lC())&&(o._bodyWrapper=d.first);}},hostAttrs:[1,"mat-expansion-panel"],hostVars:4,hostBindings:function(i,o){i&2&&Dt("mat-expanded",o.expanded)("mat-expansion-panel-spacing",o._hasSpacing());},inputs:{hideToggle:[2,"hideToggle","hideToggle",Et$1],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[gy([{provide:Ct,useValue:void 0},{provide:In,useExisting:t}]),qr,ha$1],ngContentSelectors:Qn,decls:9,vars:4,consts:[["bodyWrapper",""],["body",""],[1,"mat-expansion-panel-content-wrapper"],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(i,o){i&1&&(or(qn),nt$1(0),fa$1(1,"div",2,0)(3,"div",3,1)(5,"div",4),nt$1(6,1),jg(7,Gn,0,0,"ng-template",5),Ed(),nt$1(8,2),Ed()()),i&2&&(Qo$1(),rr("inert",o.expanded?null:""),Qo$1(2),$g("id",o.id),rr("aria-labelledby",o._headerId),Qo$1(4),$g("cdkPortalOutlet",o._portal));},dependencies:[Wi$1],styles:[`.mat-expansion-panel {
|
|
2
2
|
box-sizing: content-box;
|
|
3
3
|
display: block;
|
|
4
4
|
margin: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {$ as $e,H as Ht,j as jt,N as Nt,z as zt,V as Vt}from'./chunk-
|
|
1
|
+
import {$ as $e,H as Ht,j as jt,N as Nt,z as zt,V as Vt}from'./chunk-Bu7fcbUT.js';import {h,A as Ae,I as IW,_ as _W,f as fa,k as kC,E as Ed,v as ni,Q as Qo,u as uy,y as ri,$ as $g,D as Dt,a2 as Cd,R as sC}from'./main-Q2L26FCS.js';function S(o,m){if(o&1&&(fa(0,"code",1),kC(1),Ed()),o&2){let a=sC();Qo(),uy(a.data.detail);}}var I=class o{data=h($e);static \u0275fac=function(a){return new(a||o)};static \u0275cmp=Ae({type:o,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-flat-button","",3,"mat-dialog-close"]],template:function(a,l){a&1&&(fa(0,"h2",0),kC(1),Ed(),fa(2,"mat-dialog-content")(3,"p"),kC(4),Ed(),ni(5,S,2,1,"code",1),Ed(),fa(6,"mat-dialog-actions",2)(7,"button",3),kC(8,"Cancel"),Ed(),fa(9,"button",4),kC(10),Ed()()),a&2&&(Qo(),uy(l.data.title),Qo(3),uy(l.data.message),Qo(),ri(l.data.detail?5:-1),Qo(2),$g("mat-dialog-close",false),Qo(2),Dt("sf-danger",l.data.destructive),$g("mat-dialog-close",true),Qo(),Cd(" ",l.data.confirmLabel??"Confirm"," "));},dependencies:[IW,_W,Ht,jt,Nt,zt,Vt],styles:[".dialog-detail[_ngcontent-%COMP%]{display:inline-block;margin-top:10px;padding:4px 8px;border-radius:6px;background:var(--sf-surface-2);color:var(--sf-primary)}"]})};export{I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {I}from'./chunk-Aooj_ST7.js';import {e as ee$1}from'./chunk-C_DeZqXA.js';import {c as ci,Z as Zt,e as ei,n as ni,t as ti,J as Jt,r as ri,i as ii,o as oi,s as si,a as ai}from'./chunk-BvcgLtmT.js';import {_}from'./chunk-D9NghTGy.js';import {h,a4 as fb,g as Ye,p as pb,aw as O,A as Ae,I as IW,_ as _W,a as A8,x as x8,f as fa,k as kC,E as Ed,v as ni$1,c as Yg,z as zg,bQ as _d,b1 as jg,bR as Id,Q as Qo,$ as $g,a2 as Cd,y as ri$1,u as uy,e as eC,R as sC,a0 as Vp,a1 as Hp}from'./main-4Q33BLD3.js';function X(e,t){e&1&&(fa(0,"div",5)(1,"mat-icon",29),kC(2,"gpp_bad"),Ed(),fa(3,"span"),kC(4),Ed()()),e&2&&(Qo(4),uy(t));}function Y(e,t){e&1&&(fa(0,"span",11),kC(1),Ed()),e&2&&(Qo(),uy(t.name));}function Z(e,t){e&1&&(fa(0,"div",15),kC(1),Ed()),e&2&&(Qo(),uy(t));}function ee(e,t){e&1&&(fa(0,"th",30),kC(1,"Type"),Ed());}function te(e,t){if(e&1&&(fa(0,"td",31),kC(1),Ed()),e&2){let i=t.$implicit;Qo(),uy(i.workflowType);}}function ne(e,t){e&1&&(fa(0,"th",30),kC(1,"Version"),Ed());}function ie(e,t){if(e&1&&(fa(0,"td",32),kC(1),Ed()),e&2){let i=t.$implicit;Qo(),uy(i.version);}}function oe(e,t){e&1&&(fa(0,"th",30),kC(1,"Hash"),Ed());}function ae(e,t){if(e&1&&(fa(0,"td",33),kC(1),Ed()),e&2){let i=t.$implicit;Qo(),uy(i.definitionHash);}}function re(e,t){e&1&&zg(0,"th",30);}function de(e,t){if(e&1){let i=eC();fa(0,"td",34)(1,"button",35),Yg("click",function(){let l=Vp(i).$implicit,f=sC();return Hp(f.deleteDefinition(l))}),kC(2),Ed()();}if(e&2){let i=t.$implicit,n=sC();Qo(),$g("disabled",n.adminDisabled()||n.deletingKey()===n.definitionKey(i)),Qo(),Cd(" ",n.deletingKey()===n.definitionKey(i)?"Deleting\u2026":"Delete"," ");}}function le(e,t){e&1&&zg(0,"tr",36);}function se(e,t){e&1&&zg(0,"tr",37);}function me(e,t){if(e&1&&(fa(0,"p",28),kC(1),Ed()),e&2){let i=sC();Qo(),Cd(" ",i.definitionsLoading()?"Loading\u2026":"No definitions registered."," ");}}var q="FORBIDDEN_ADMIN_REQUIRED";function fe(e){let t=e?.status===403||e?.code===q,i=typeof e?.message=="string"&&e.message.trim()?e.message.trim():null;return t?{forbidden:true,message:`Access denied: ${i??"admin rights required"} (${q})`}:{forbidden:false,message:i??"Admin command failed (network or server error)."}}function pe(e){if(Array.isArray(e))return e;let t=e?.items;return Array.isArray(t)?t:[]}var G=class e{api=h(fb);dialog=h(ee$1);adminDisabled=Ye(false);forbiddenError=Ye(null);definitions=Ye([]);definitionsLoading=Ye(false);uploading=Ye(false);selectedFile=Ye(null);definitionsError=Ye(null);deletingKey=Ye(null);definitionColumns=["workflowType","version","definitionHash","actions"];constructor(){h(pb).crumbs.set([{label:"Workflow definitions"}]),this.loadDefinitions();}loadDefinitions(){this.adminDisabled()||(this.definitionsLoading.set(true),this.definitionsError.set(null),this.api.getWorkflowDefinitions().subscribe({next:t=>{this.definitions.set(pe(t)),this.definitionsLoading.set(false);},error:t=>{this.applyError(t,i=>this.definitionsError.set(i)),this.definitionsLoading.set(false);}}));}onFileSelected(t){let i=t.target;this.selectedFile.set(i.files?.[0]??null);}uploadDefinition(){if(this.adminDisabled()||this.uploading())return;let t=this.selectedFile();if(!t){this.definitionsError.set("Please select a JSON definition file.");return}this.uploading.set(true),this.definitionsError.set(null),this.api.uploadWorkflowDefinition(t).subscribe({next:()=>{this.selectedFile.set(null),this.uploading.set(false),this.loadDefinitions();},error:i=>{this.applyError(i,n=>this.definitionsError.set(n)),this.uploading.set(false);}});}deleteDefinition(t){if(this.adminDisabled()||this.deletingKey())return;let i=String(t.workflowType??"").trim(),n=String(t.version??"").trim();!i||!n||this.confirm({title:"Delete definition",message:"This will permanently delete the workflow definition. Already running executions are not affected.",detail:`${i}@${n}`,confirmLabel:"Delete",destructive:true}).subscribe(l=>{l&&(this.deletingKey.set(`${i}@${n}`),this.definitionsError.set(null),this.api.deleteWorkflowDefinition(i,n).subscribe({next:()=>{this.deletingKey.set(null),this.loadDefinitions();},error:f=>{this.applyError(f,x=>this.definitionsError.set(x)),this.deletingKey.set(null);}}));});}definitionKey(t){return `${t.workflowType??""}@${t.version??""}`}confirm(t){return this.dialog.open(I,{data:t,width:"440px"}).afterClosed().pipe(O(i=>i===true))}applyError(t,i){let n=fe(t);n.forbidden?(this.adminDisabled.set(true),this.forbiddenError.set(n.message)):i(n.message);}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-admin-page"]],decls:44,vars:13,consts:[[1,"page"],[1,"page-head"],[1,"titles"],[1,"sf-muted"],["dot","",3,"tone"],["role","alert","data-admin-forbidden","true",1,"banner","banner--error"],["data-admin-definitions","true",1,"section","sf-panel"],[1,"section-title"],[1,"sf-muted","section-desc"],[1,"row","file-row"],["type","file","accept",".json,application/json","data-admin-definition-file","true",3,"change","disabled"],["data-admin-definition-filename","true",1,"result-chip"],[1,"sf-spacer"],["mat-flat-button","","data-admin-definition-upload","true",1,"sf-primary",3,"click","disabled"],["mat-stroked-button","","data-admin-definition-refresh","true",1,"sf-secondary",3,"click","disabled"],["role","alert","data-admin-definition-error","true",1,"banner","banner--warn"],["mat-table","",1,"definitions-table",3,"dataSource"],["matColumnDef","workflowType"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","class","sf-mono","data-definition-type","true",4,"matCellDef"],["matColumnDef","version"],["mat-cell","","class","sf-mono","data-definition-version","true",4,"matCellDef"],["matColumnDef","definitionHash"],["mat-cell","","class","sf-mono","data-definition-hash","true",4,"matCellDef"],["matColumnDef","actions"],["mat-cell","",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["data-definition-empty","true",1,"sf-muted","empty"],["aria-hidden","true"],["mat-header-cell",""],["mat-cell","","data-definition-type","true",1,"sf-mono"],["mat-cell","","data-definition-version","true",1,"sf-mono"],["mat-cell","","data-definition-hash","true",1,"sf-mono"],["mat-cell",""],["mat-stroked-button","","data-admin-definition-delete","true",1,"sf-danger",3,"click","disabled"],["mat-header-row",""],["mat-row",""]],template:function(i,n){if(i&1&&(fa(0,"div",0)(1,"header",1)(2,"div",2)(3,"h1"),kC(4,"Workflow definitions"),Ed(),fa(5,"p",3),kC(6,"Import and manage registered workflow definitions."),Ed()(),fa(7,"sf-status-chip",4),kC(8),Ed()(),ni$1(9,X,5,1,"div",5),fa(10,"section",6)(11,"h2",7),kC(12,"Workflow definitions"),Ed(),fa(13,"p",8),kC(14,"Import a JSON definition (v1 format) and manage registered definitions."),Ed(),fa(15,"div",9)(16,"input",10),Yg("change",function(f){return n.onFileSelected(f)}),Ed(),ni$1(17,Y,2,1,"span",11),zg(18,"span",12),fa(19,"button",13),Yg("click",function(){return n.uploadDefinition()}),fa(20,"mat-icon"),kC(21,"upload"),Ed(),kC(22),Ed(),fa(23,"button",14),Yg("click",function(){return n.loadDefinitions()}),fa(24,"mat-icon"),kC(25,"refresh"),Ed(),kC(26," Refresh "),Ed()(),ni$1(27,Z,2,1,"div",15),fa(28,"table",16),_d(29,17),jg(30,ee,2,0,"th",18)(31,te,2,1,"td",19),Id(),_d(32,20),jg(33,ne,2,0,"th",18)(34,ie,2,1,"td",21),Id(),_d(35,22),jg(36,oe,2,0,"th",18)(37,ae,2,1,"td",23),Id(),_d(38,24),jg(39,re,1,0,"th",18)(40,de,3,2,"td",25),Id(),jg(41,le,1,0,"tr",26)(42,se,1,0,"tr",27),Ed(),ni$1(43,me,2,1,"p",28),Ed()()),i&2){let l,f,x;Qo(7),$g("tone",n.adminDisabled()?"red":"green"),Qo(),Cd(" ",n.adminDisabled()?"Access denied":"Admin"," "),Qo(),ri$1((l=n.forbiddenError())?9:-1,l),Qo(7),$g("disabled",n.adminDisabled()||n.uploading()),Qo(),ri$1((f=n.selectedFile())?17:-1,f),Qo(2),$g("disabled",n.adminDisabled()||n.uploading()),Qo(3),Cd(" ",n.uploading()?"Importing\u2026":"Import definition"," "),Qo(),$g("disabled",n.adminDisabled()||n.definitionsLoading()),Qo(4),ri$1((x=n.definitionsError())?27:-1,x),Qo(),$g("dataSource",n.definitions()),Qo(13),$g("matHeaderRowDef",n.definitionColumns),Qo(),$g("matRowDefColumns",n.definitionColumns),Qo(),ri$1(n.definitions().length===0?43:-1);}},dependencies:[IW,_W,A8,x8,ci,Zt,ei,ni,ti,Jt,ri,ii,oi,si,ai,_],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px;max-width:1100px}.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-size:28px;font-weight:800;letter-spacing:-.01em}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding:20px}.section-title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:700}.section-desc[_ngcontent-%COMP%]{margin:0;font-size:13.5px}.row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.file-row[_ngcontent-%COMP%]{gap:10px}.file-row[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{color:var(--sf-text-2);font-size:13px}.field[_ngcontent-%COMP%]{width:100%;max-width:480px}.result[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-top:4px}.result-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;height:26px;padding:0 12px;border-radius:999px;border:1px solid var(--sf-outline-strong);background:var(--sf-surface-2);color:var(--sf-text-2);font-size:13px;font-weight:600}.result-chip--success[_ngcontent-%COMP%]{color:#6ee79a;border-color:#22583a;background:#0e1f16}.result-chip--error[_ngcontent-%COMP%]{color:#f58f8f;border-color:#6b2a2e;background:#1f1114}.timestamp[_ngcontent-%COMP%]{color:var(--sf-text-muted);font-size:12.5px}.banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid;font-size:13.5px;font-weight:600}.banner[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px}.banner--error[_ngcontent-%COMP%]{color:#f58f8f;border-color:#6b2a2e;background:#1f1114}.banner--warn[_ngcontent-%COMP%]{color:var(--sf-tertiary);border-color:#5a4818;background:#1d180b}.definitions-table[_ngcontent-%COMP%]{width:100%}th.mat-mdc-header-cell[_ngcontent-%COMP%]{background:var(--sf-chrome);font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--sf-text-faint)}td.mat-mdc-cell[_ngcontent-%COMP%]{border-bottom-color:#1a1f2c}.empty[_ngcontent-%COMP%]{margin:0;padding:12px 4px;font-size:13.5px}.mat-mdc-unelevated-button.sf-danger[_ngcontent-%COMP%]{background:#6b2a2e;color:#ffd9d9;border-radius:10px;font-weight:700}"]})};export{G as AdminPageComponent,q as FORBIDDEN_ADMIN_REQUIRED,fe as describeAdminError};
|
|
1
|
+
import {I}from'./chunk-DZbBIzAF.js';import {e as ee$1}from'./chunk-Bu7fcbUT.js';import {c as ci,Z as Zt,e as ei,n as ni,t as ti,J as Jt,r as ri,i as ii,o as oi,s as si,a as ai}from'./chunk-B4B0i3CG.js';import {_}from'./chunk-yvUmK3gv.js';import {h,a4 as fb,g as Ye,p as pb,aw as O,A as Ae,I as IW,_ as _W,a as A8,x as x8,f as fa,k as kC,E as Ed,v as ni$1,c as Yg,z as zg,bQ as _d,b1 as jg,bR as Id,Q as Qo,$ as $g,a2 as Cd,y as ri$1,u as uy,e as eC,R as sC,a0 as Vp,a1 as Hp}from'./main-Q2L26FCS.js';function X(e,t){e&1&&(fa(0,"div",5)(1,"mat-icon",29),kC(2,"gpp_bad"),Ed(),fa(3,"span"),kC(4),Ed()()),e&2&&(Qo(4),uy(t));}function Y(e,t){e&1&&(fa(0,"span",11),kC(1),Ed()),e&2&&(Qo(),uy(t.name));}function Z(e,t){e&1&&(fa(0,"div",15),kC(1),Ed()),e&2&&(Qo(),uy(t));}function ee(e,t){e&1&&(fa(0,"th",30),kC(1,"Type"),Ed());}function te(e,t){if(e&1&&(fa(0,"td",31),kC(1),Ed()),e&2){let i=t.$implicit;Qo(),uy(i.workflowType);}}function ne(e,t){e&1&&(fa(0,"th",30),kC(1,"Version"),Ed());}function ie(e,t){if(e&1&&(fa(0,"td",32),kC(1),Ed()),e&2){let i=t.$implicit;Qo(),uy(i.version);}}function oe(e,t){e&1&&(fa(0,"th",30),kC(1,"Hash"),Ed());}function ae(e,t){if(e&1&&(fa(0,"td",33),kC(1),Ed()),e&2){let i=t.$implicit;Qo(),uy(i.definitionHash);}}function re(e,t){e&1&&zg(0,"th",30);}function de(e,t){if(e&1){let i=eC();fa(0,"td",34)(1,"button",35),Yg("click",function(){let l=Vp(i).$implicit,f=sC();return Hp(f.deleteDefinition(l))}),kC(2),Ed()();}if(e&2){let i=t.$implicit,n=sC();Qo(),$g("disabled",n.adminDisabled()||n.deletingKey()===n.definitionKey(i)),Qo(),Cd(" ",n.deletingKey()===n.definitionKey(i)?"Deleting\u2026":"Delete"," ");}}function le(e,t){e&1&&zg(0,"tr",36);}function se(e,t){e&1&&zg(0,"tr",37);}function me(e,t){if(e&1&&(fa(0,"p",28),kC(1),Ed()),e&2){let i=sC();Qo(),Cd(" ",i.definitionsLoading()?"Loading\u2026":"No definitions registered."," ");}}var q="FORBIDDEN_ADMIN_REQUIRED";function fe(e){let t=e?.status===403||e?.code===q,i=typeof e?.message=="string"&&e.message.trim()?e.message.trim():null;return t?{forbidden:true,message:`Access denied: ${i??"admin rights required"} (${q})`}:{forbidden:false,message:i??"Admin command failed (network or server error)."}}function pe(e){if(Array.isArray(e))return e;let t=e?.items;return Array.isArray(t)?t:[]}var G=class e{api=h(fb);dialog=h(ee$1);adminDisabled=Ye(false);forbiddenError=Ye(null);definitions=Ye([]);definitionsLoading=Ye(false);uploading=Ye(false);selectedFile=Ye(null);definitionsError=Ye(null);deletingKey=Ye(null);definitionColumns=["workflowType","version","definitionHash","actions"];constructor(){h(pb).crumbs.set([{label:"Workflow definitions"}]),this.loadDefinitions();}loadDefinitions(){this.adminDisabled()||(this.definitionsLoading.set(true),this.definitionsError.set(null),this.api.getWorkflowDefinitions().subscribe({next:t=>{this.definitions.set(pe(t)),this.definitionsLoading.set(false);},error:t=>{this.applyError(t,i=>this.definitionsError.set(i)),this.definitionsLoading.set(false);}}));}onFileSelected(t){let i=t.target;this.selectedFile.set(i.files?.[0]??null);}uploadDefinition(){if(this.adminDisabled()||this.uploading())return;let t=this.selectedFile();if(!t){this.definitionsError.set("Please select a JSON definition file.");return}this.uploading.set(true),this.definitionsError.set(null),this.api.uploadWorkflowDefinition(t).subscribe({next:()=>{this.selectedFile.set(null),this.uploading.set(false),this.loadDefinitions();},error:i=>{this.applyError(i,n=>this.definitionsError.set(n)),this.uploading.set(false);}});}deleteDefinition(t){if(this.adminDisabled()||this.deletingKey())return;let i=String(t.workflowType??"").trim(),n=String(t.version??"").trim();!i||!n||this.confirm({title:"Delete definition",message:"This will permanently delete the workflow definition. Already running executions are not affected.",detail:`${i}@${n}`,confirmLabel:"Delete",destructive:true}).subscribe(l=>{l&&(this.deletingKey.set(`${i}@${n}`),this.definitionsError.set(null),this.api.deleteWorkflowDefinition(i,n).subscribe({next:()=>{this.deletingKey.set(null),this.loadDefinitions();},error:f=>{this.applyError(f,x=>this.definitionsError.set(x)),this.deletingKey.set(null);}}));});}definitionKey(t){return `${t.workflowType??""}@${t.version??""}`}confirm(t){return this.dialog.open(I,{data:t,width:"440px"}).afterClosed().pipe(O(i=>i===true))}applyError(t,i){let n=fe(t);n.forbidden?(this.adminDisabled.set(true),this.forbiddenError.set(n.message)):i(n.message);}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-admin-page"]],decls:44,vars:13,consts:[[1,"page"],[1,"page-head"],[1,"titles"],[1,"sf-muted"],["dot","",3,"tone"],["role","alert","data-admin-forbidden","true",1,"banner","banner--error"],["data-admin-definitions","true",1,"section","sf-panel"],[1,"section-title"],[1,"sf-muted","section-desc"],[1,"row","file-row"],["type","file","accept",".json,application/json","data-admin-definition-file","true",3,"change","disabled"],["data-admin-definition-filename","true",1,"result-chip"],[1,"sf-spacer"],["mat-flat-button","","data-admin-definition-upload","true",1,"sf-primary",3,"click","disabled"],["mat-stroked-button","","data-admin-definition-refresh","true",1,"sf-secondary",3,"click","disabled"],["role","alert","data-admin-definition-error","true",1,"banner","banner--warn"],["mat-table","",1,"definitions-table",3,"dataSource"],["matColumnDef","workflowType"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","class","sf-mono","data-definition-type","true",4,"matCellDef"],["matColumnDef","version"],["mat-cell","","class","sf-mono","data-definition-version","true",4,"matCellDef"],["matColumnDef","definitionHash"],["mat-cell","","class","sf-mono","data-definition-hash","true",4,"matCellDef"],["matColumnDef","actions"],["mat-cell","",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["data-definition-empty","true",1,"sf-muted","empty"],["aria-hidden","true"],["mat-header-cell",""],["mat-cell","","data-definition-type","true",1,"sf-mono"],["mat-cell","","data-definition-version","true",1,"sf-mono"],["mat-cell","","data-definition-hash","true",1,"sf-mono"],["mat-cell",""],["mat-stroked-button","","data-admin-definition-delete","true",1,"sf-danger",3,"click","disabled"],["mat-header-row",""],["mat-row",""]],template:function(i,n){if(i&1&&(fa(0,"div",0)(1,"header",1)(2,"div",2)(3,"h1"),kC(4,"Workflow definitions"),Ed(),fa(5,"p",3),kC(6,"Import and manage registered workflow definitions."),Ed()(),fa(7,"sf-status-chip",4),kC(8),Ed()(),ni$1(9,X,5,1,"div",5),fa(10,"section",6)(11,"h2",7),kC(12,"Workflow definitions"),Ed(),fa(13,"p",8),kC(14,"Import a JSON definition (v1 format) and manage registered definitions."),Ed(),fa(15,"div",9)(16,"input",10),Yg("change",function(f){return n.onFileSelected(f)}),Ed(),ni$1(17,Y,2,1,"span",11),zg(18,"span",12),fa(19,"button",13),Yg("click",function(){return n.uploadDefinition()}),fa(20,"mat-icon"),kC(21,"upload"),Ed(),kC(22),Ed(),fa(23,"button",14),Yg("click",function(){return n.loadDefinitions()}),fa(24,"mat-icon"),kC(25,"refresh"),Ed(),kC(26," Refresh "),Ed()(),ni$1(27,Z,2,1,"div",15),fa(28,"table",16),_d(29,17),jg(30,ee,2,0,"th",18)(31,te,2,1,"td",19),Id(),_d(32,20),jg(33,ne,2,0,"th",18)(34,ie,2,1,"td",21),Id(),_d(35,22),jg(36,oe,2,0,"th",18)(37,ae,2,1,"td",23),Id(),_d(38,24),jg(39,re,1,0,"th",18)(40,de,3,2,"td",25),Id(),jg(41,le,1,0,"tr",26)(42,se,1,0,"tr",27),Ed(),ni$1(43,me,2,1,"p",28),Ed()()),i&2){let l,f,x;Qo(7),$g("tone",n.adminDisabled()?"red":"green"),Qo(),Cd(" ",n.adminDisabled()?"Access denied":"Admin"," "),Qo(),ri$1((l=n.forbiddenError())?9:-1,l),Qo(7),$g("disabled",n.adminDisabled()||n.uploading()),Qo(),ri$1((f=n.selectedFile())?17:-1,f),Qo(2),$g("disabled",n.adminDisabled()||n.uploading()),Qo(3),Cd(" ",n.uploading()?"Importing\u2026":"Import definition"," "),Qo(),$g("disabled",n.adminDisabled()||n.definitionsLoading()),Qo(4),ri$1((x=n.definitionsError())?27:-1,x),Qo(),$g("dataSource",n.definitions()),Qo(13),$g("matHeaderRowDef",n.definitionColumns),Qo(),$g("matRowDefColumns",n.definitionColumns),Qo(),ri$1(n.definitions().length===0?43:-1);}},dependencies:[IW,_W,A8,x8,ci,Zt,ei,ni,ti,Jt,ri,ii,oi,si,ai,_],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px;max-width:1100px}.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-size:28px;font-weight:800;letter-spacing:-.01em}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding:20px}.section-title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:700}.section-desc[_ngcontent-%COMP%]{margin:0;font-size:13.5px}.row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.file-row[_ngcontent-%COMP%]{gap:10px}.file-row[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{color:var(--sf-text-2);font-size:13px}.field[_ngcontent-%COMP%]{width:100%;max-width:480px}.result[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-top:4px}.result-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;height:26px;padding:0 12px;border-radius:999px;border:1px solid var(--sf-outline-strong);background:var(--sf-surface-2);color:var(--sf-text-2);font-size:13px;font-weight:600}.result-chip--success[_ngcontent-%COMP%]{color:#6ee79a;border-color:#22583a;background:#0e1f16}.result-chip--error[_ngcontent-%COMP%]{color:#f58f8f;border-color:#6b2a2e;background:#1f1114}.timestamp[_ngcontent-%COMP%]{color:var(--sf-text-muted);font-size:12.5px}.banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid;font-size:13.5px;font-weight:600}.banner[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px}.banner--error[_ngcontent-%COMP%]{color:#f58f8f;border-color:#6b2a2e;background:#1f1114}.banner--warn[_ngcontent-%COMP%]{color:var(--sf-tertiary);border-color:#5a4818;background:#1d180b}.definitions-table[_ngcontent-%COMP%]{width:100%}th.mat-mdc-header-cell[_ngcontent-%COMP%]{background:var(--sf-chrome);font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--sf-text-faint)}td.mat-mdc-cell[_ngcontent-%COMP%]{border-bottom-color:#1a1f2c}.empty[_ngcontent-%COMP%]{margin:0;padding:12px 4px;font-size:13.5px}.mat-mdc-unelevated-button.sf-danger[_ngcontent-%COMP%]{background:#6b2a2e;color:#ffd9d9;border-radius:10px;font-weight:700}"]})};export{G as AdminPageComponent,q as FORBIDDEN_ADMIN_REQUIRED,fe as describeAdminError};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {J,Z}from'./chunk-
|
|
1
|
+
import {J,Z}from'./chunk-4c29JuK_.js';import {h,a4 as fb,g as Ye,p as pb,A as Ae,N as Nt,I as IW,_ as _W,a as A8,x as x8,f as fa,k as kC,E as Ed,c as Yg,v as ni,Q as Qo,$ as $g,y as ri,u as uy,z as zg,q as qw,R as sC,Z as Zw,r as rr,l as ly,a2 as Cd}from'./main-Q2L26FCS.js';function z(n,e){return this.definitionKey(e)}function I(n,e){n&1&&(fa(0,"div",5)(1,"mat-icon",9),kC(2,"cloud_off"),Ed(),fa(3,"span"),kC(4),Ed()()),n&2&&(Qo(4),uy(e));}function L(n,e){n&1&&(fa(0,"div",6),zg(1,"mat-progress-spinner",10),fa(2,"span",3),kC(3,"Loading definitions\u2026"),Ed()());}function N(n,e){n&1&&(fa(0,"div",7)(1,"mat-icon",9),kC(2,"inventory_2"),Ed(),fa(3,"p",3),kC(4,"No workflow definitions registered."),Ed()());}function j(n,e){if(n&1&&(fa(0,"a",11)(1,"div",12)(2,"h2",13),kC(3),Ed(),fa(4,"p",14),kC(5),Ed()(),fa(6,"span",15),kC(7),Ed(),fa(8,"mat-icon",16),kC(9,"chevron_right"),Ed()()),n&2){let t=e.$implicit,i=sC(2);$g("routerLink",i.detailLink(t)),rr("data-workflow-card",i.definitionKey(t))("data-workflow-card-link",i.definitionKey(t)),Qo(3),uy(i.definitionTitle(t)),Qo(2),ly(" ",t.workflowType,"@",t.version," "),Qo(),$g("title",t.definitionHash??""),Qo(),Cd(" ",i.shortHash(t)," ");}}function F(n,e){if(n&1&&(fa(0,"div",8),qw(1,j,10,8,"a",11,z,true),Ed()),n&2){let t=sC();Qo(),Zw(t.definitions());}}function H(n){if(Array.isArray(n))return n;let e=typeof n=="object"&&n!==null?n:{};if(Array.isArray(e.items))return e.items;let t=e.data;if(Array.isArray(t))return t;let i=typeof t=="object"&&t!==null?t:{};return Array.isArray(i.items)?i.items:[]}var A=class n{api=h(fb);definitions=Ye([]);loading=Ye(false);error=Ye(null);constructor(){h(pb).crumbs.set([{label:"Workflows"}]),this.load();}load(){this.loading.set(true),this.error.set(null),this.api.getWorkflowDefinitions().subscribe({next:e=>{this.definitions.set(H(e)),this.loading.set(false);},error:e=>{this.error.set(e?.message?.trim()||"Unable to load workflow definitions."),this.definitions.set([]),this.loading.set(false);}});}definitionKey(e){return `${e.workflowType??""}@${e.version??""}`}definitionTitle(e){let t=typeof e.title=="string"?e.title.trim():"",i=typeof e.workflowType=="string"?e.workflowType.trim():"";return t||i||"Definition without type"}shortHash(e){let t=typeof e.definitionHash=="string"?e.definitionHash.trim():"";return t?t.length>12?`${t.slice(0,12)}\u2026`:t:"\u2014"}detailLink(e){return ["/workflows",String(e.workflowType??""),String(e.version??"")]}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Ae({type:n,selectors:[["sf-workflows-page"]],decls:15,vars:3,consts:[[1,"page"],[1,"page-head"],[1,"titles"],[1,"sf-muted"],["mat-stroked-button","",1,"sf-secondary",3,"click","disabled"],["role","alert","data-workflow-error","true",1,"banner","banner--warn"],["data-workflow-loading","true",1,"state"],["data-workflow-empty","true",1,"state","sf-panel"],["data-workflow-list","true",1,"grid"],["aria-hidden","true"],["diameter","32","mode","indeterminate"],[1,"wf-card",3,"routerLink"],[1,"wf-card__titles"],["data-workflow-title","",1,"wf-card__title"],["data-workflow-subtitle","",1,"wf-card__subtitle","sf-mono"],["data-workflow-hash","",1,"wf-card__hash","sf-mono",3,"title"],["aria-hidden","true",1,"wf-card__chevron"]],template:function(t,i){if(t&1&&(fa(0,"div",0)(1,"header",1)(2,"div",2)(3,"h1"),kC(4,"Workflows"),Ed(),fa(5,"p",3),kC(6,"Registered workflow definitions and their governed steps."),Ed()(),fa(7,"button",4),Yg("click",function(){return i.load()}),fa(8,"mat-icon"),kC(9,"refresh"),Ed(),kC(10," Refresh "),Ed()(),ni(11,I,5,1,"div",5),ni(12,L,4,0,"div",6)(13,N,5,0,"div",7)(14,F,3,0,"div",8),Ed()),t&2){let f;Qo(7),$g("disabled",i.loading()),Qo(4),ri((f=i.error())?11:-1,f),Qo(),ri(i.loading()?12:i.definitions().length===0?13:14);}},dependencies:[Nt,IW,_W,A8,x8,J,Z],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px;max-width:1200px}.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-size:28px;font-weight:800;letter-spacing:-.01em}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid;font-size:13.5px;font-weight:600}.banner[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px}.banner--warn[_ngcontent-%COMP%]{color:var(--sf-tertiary);border-color:#5a4818;background:#1d180b}.state[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.state.sf-panel[_ngcontent-%COMP%]{flex-direction:column;justify-content:center;gap:8px;padding:40px;text-align:center}.state.sf-panel[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:36px;height:36px;font-size:36px;color:var(--sf-text-muted)}.grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(420px,1fr));gap:16px}.wf-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;padding:18px 20px;border-radius:12px;border:1px solid var(--sf-outline);background:var(--sf-surface);text-decoration:none;color:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.wf-card[_ngcontent-%COMP%]:hover{background:#141a26;border-color:var(--sf-outline-active)}.wf-card[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--sf-primary);outline-offset:2px}.wf-card__titles[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.wf-card__title[_ngcontent-%COMP%]{margin:0;font-size:17px;font-weight:700;color:var(--sf-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wf-card__subtitle[_ngcontent-%COMP%]{margin:0;font-size:12.5px;color:var(--sf-secondary)}.wf-card__hash[_ngcontent-%COMP%]{font-size:12px;color:var(--sf-text-muted);padding:4px 10px;border:1px solid var(--sf-outline-strong);border-radius:999px;background:var(--sf-surface-2);white-space:nowrap;flex-shrink:0}.wf-card__chevron[_ngcontent-%COMP%]{color:var(--sf-text-muted);flex-shrink:0}"]})};export{A as WorkflowsPageComponent,H as extractWorkflowDefinitions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b as xy,aJ as Et,A as Ae,a as A8,x as x8,H as or,v as ni,L as nt,y as ri,X as ii,D as Dt,f as fa,k as kC,E as Ed,R as sC,Q as Qo,u as uy,z as zg}from'./main-
|
|
1
|
+
import {b as xy,aJ as Et,A as Ae,a as A8,x as x8,H as or,v as ni,L as nt,y as ri,X as ii,D as Dt,f as fa,k as kC,E as Ed,R as sC,Q as Qo,u as uy,z as zg}from'./main-Q2L26FCS.js';var v=["*"];function P(o,i){if(o&1&&(fa(0,"mat-icon",2),kC(1),Ed()),o&2){let e=sC();Dt("sf-spin",e.spin()),Qo(),uy(e.icon());}}function O(o,i){o&1&&zg(0,"span",1);}var _=class o{tone=xy("neutral");icon=xy();spin=xy(false,{transform:Et});dot=xy(false,{transform:Et});size=xy("md");static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Ae({type:o,selectors:[["sf-status-chip"]],hostVars:4,hostBindings:function(e,t){e&2&&(ii("sf-chip sf-chip--"+t.tone()),Dt("sf-chip--sm",t.size()==="sm"));},inputs:{tone:[1,"tone"],icon:[1,"icon"],spin:[1,"spin"],dot:[1,"dot"],size:[1,"size"]},ngContentSelectors:v,decls:3,vars:1,consts:[["aria-hidden","true",3,"sf-spin"],["aria-hidden","true",1,"dot"],["aria-hidden","true"]],template:function(e,t){e&1&&(or(),ni(0,P,2,3,"mat-icon",0)(1,O,1,0,"span",1),nt(2)),e&2&&ri(t.icon()?0:t.dot()?1:-1);},dependencies:[A8,x8],styles:["[_nghost-%COMP%]{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 12px;border-radius:999px;border:1px solid;font-size:13px;font-weight:700;white-space:nowrap}.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(--sf-success)}.sf-chip--blue[_nghost-%COMP%]{color:var(--sf-running);border-color:#33486e;background:#121a2b}.sf-chip--amber[_nghost-%COMP%]{color:var(--sf-tertiary);border-color:#5a4818;background:#1d180b;font-weight:600}.sf-chip--green[_nghost-%COMP%]{color:#6ee79a;border-color:#22583a;background:#0e1f16}.sf-chip--red[_nghost-%COMP%]{color:#f58f8f;border-color:#6b2a2e;background:#1f1114}.sf-chip--neutral[_nghost-%COMP%]{color:var(--sf-text-muted);border-color:var(--sf-outline-strong);background:var(--sf-surface-2)}.sf-chip--violet[_nghost-%COMP%]{color:#e3d6ff;border-color:#4b3d80;background:#2a2145}.sf-chip--cyan[_nghost-%COMP%]{color:var(--sf-secondary);border-color:#2c5d63;background:#0e1d21}"]})};export{_};
|
package/browser/index.html
CHANGED
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
<style>:root{--sf-bg:#0a0d13;--sf-chrome:#0d1118;--sf-surface:#10141d;--sf-surface-2:#151a25;--sf-outline:#242b3b;--sf-outline-strong:#2f3950;--sf-outline-active:#33486e;--sf-primary:#c4a1ff;--sf-primary-deep:#a98cff;--sf-on-primary:#1b1030;--sf-secondary:#5fd4e0;--sf-tertiary:#f0c75e;--sf-success:#4ade80;--sf-running:#9dbaf9;--sf-error:#ff4d4f;--sf-text-primary:#e7eaf2;--sf-text:#e7eaf2;--sf-text-2:#c9cfdd;--sf-text-muted:#9199ad;--sf-text-faint:#7d859a;--sf-font:"Manrope", system-ui, sans-serif;--sf-mono:"JetBrains Mono", ui-monospace, monospace;--sf-radius:16px}html{color-scheme:dark;--mat-sys-background:#151316;--mat-sys-error:#ffb4ab;--mat-sys-error-container:#93000a;--mat-sys-inverse-on-surface:#323033;--mat-sys-inverse-primary:#7d00fa;--mat-sys-inverse-surface:#e6e1e6;--mat-sys-on-background:#e6e1e6;--mat-sys-on-error:#690005;--mat-sys-on-error-container:#ffdad6;--mat-sys-on-primary:#42008a;--mat-sys-on-primary-container:#ecdcff;--mat-sys-on-primary-fixed:#270057;--mat-sys-on-primary-fixed-variant:#5f00c0;--mat-sys-on-secondary:#352d40;--mat-sys-on-secondary-container:#eadef7;--mat-sys-on-secondary-fixed:#1f182a;--mat-sys-on-secondary-fixed-variant:#4b4357;--mat-sys-on-surface:#e6e1e6;--mat-sys-on-surface-variant:#e8e0eb;--mat-sys-on-tertiary:#003737;--mat-sys-on-tertiary-container:#00fbfb;--mat-sys-on-tertiary-fixed:#002020;--mat-sys-on-tertiary-fixed-variant:#004f4f;--mat-sys-outline:#958e99;--mat-sys-outline-variant:#49454e;--mat-sys-primary:#d5baff;--mat-sys-primary-container:#5f00c0;--mat-sys-primary-fixed:#ecdcff;--mat-sys-primary-fixed-dim:#d5baff;--mat-sys-scrim:#000000;--mat-sys-secondary:#cec2db;--mat-sys-secondary-container:#4b4357;--mat-sys-secondary-fixed:#eadef7;--mat-sys-secondary-fixed-dim:#cec2db;--mat-sys-shadow:#000000;--mat-sys-surface:#151316;--mat-sys-surface-bright:#3b383c;--mat-sys-surface-container:#211f22;--mat-sys-surface-container-high:#2b292d;--mat-sys-surface-container-highest:#363437;--mat-sys-surface-container-low:#1d1b1e;--mat-sys-surface-container-lowest:#0f0d11;--mat-sys-surface-dim:#151316;--mat-sys-surface-tint:#d5baff;--mat-sys-surface-variant:#49454e;--mat-sys-tertiary:#00dddd;--mat-sys-tertiary-container:#004f4f;--mat-sys-tertiary-fixed:#00fbfb;--mat-sys-tertiary-fixed-dim:#00dddd;--mat-sys-neutral-variant20:#332f37;--mat-sys-neutral10:#1d1b1e;--mat-sys-level0:0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-sys-level1:0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mat-sys-level2:0px 3px 3px -2px rgba(0, 0, 0, .2), 0px 3px 4px 0px rgba(0, 0, 0, .14), 0px 1px 8px 0px rgba(0, 0, 0, .12);--mat-sys-level3:0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mat-sys-level4:0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mat-sys-level5:0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mat-sys-body-large:400 1rem / 1.5rem Manrope, system-ui, sans-serif;--mat-sys-body-large-font:Manrope, system-ui, sans-serif;--mat-sys-body-large-line-height:1.5rem;--mat-sys-body-large-size:1rem;--mat-sys-body-large-tracking:.031rem;--mat-sys-body-large-weight:400;--mat-sys-body-medium:400 .875rem / 1.25rem Manrope, system-ui, sans-serif;--mat-sys-body-medium-font:Manrope, system-ui, sans-serif;--mat-sys-body-medium-line-height:1.25rem;--mat-sys-body-medium-size:.875rem;--mat-sys-body-medium-tracking:.016rem;--mat-sys-body-medium-weight:400;--mat-sys-body-small:400 .75rem / 1rem Manrope, system-ui, sans-serif;--mat-sys-body-small-font:Manrope, system-ui, sans-serif;--mat-sys-body-small-line-height:1rem;--mat-sys-body-small-size:.75rem;--mat-sys-body-small-tracking:.025rem;--mat-sys-body-small-weight:400;--mat-sys-display-large:400 3.562rem / 4rem Manrope, system-ui, sans-serif;--mat-sys-display-large-font:Manrope, system-ui, sans-serif;--mat-sys-display-large-line-height:4rem;--mat-sys-display-large-size:3.562rem;--mat-sys-display-large-tracking:-.016rem;--mat-sys-display-large-weight:400;--mat-sys-display-medium:400 2.812rem / 3.25rem Manrope, system-ui, sans-serif;--mat-sys-display-medium-font:Manrope, system-ui, sans-serif;--mat-sys-display-medium-line-height:3.25rem;--mat-sys-display-medium-size:2.812rem;--mat-sys-display-medium-tracking:0;--mat-sys-display-medium-weight:400;--mat-sys-display-small:400 2.25rem / 2.75rem Manrope, system-ui, sans-serif;--mat-sys-display-small-font:Manrope, system-ui, sans-serif;--mat-sys-display-small-line-height:2.75rem;--mat-sys-display-small-size:2.25rem;--mat-sys-display-small-tracking:0;--mat-sys-display-small-weight:400;--mat-sys-headline-large:400 2rem / 2.5rem Manrope, system-ui, sans-serif;--mat-sys-headline-large-font:Manrope, system-ui, sans-serif;--mat-sys-headline-large-line-height:2.5rem;--mat-sys-headline-large-size:2rem;--mat-sys-headline-large-tracking:0;--mat-sys-headline-large-weight:400;--mat-sys-headline-medium:400 1.75rem / 2.25rem Manrope, system-ui, sans-serif;--mat-sys-headline-medium-font:Manrope, system-ui, sans-serif;--mat-sys-headline-medium-line-height:2.25rem;--mat-sys-headline-medium-size:1.75rem;--mat-sys-headline-medium-tracking:0;--mat-sys-headline-medium-weight:400;--mat-sys-headline-small:400 1.5rem / 2rem Manrope, system-ui, sans-serif;--mat-sys-headline-small-font:Manrope, system-ui, sans-serif;--mat-sys-headline-small-line-height:2rem;--mat-sys-headline-small-size:1.5rem;--mat-sys-headline-small-tracking:0;--mat-sys-headline-small-weight:400;--mat-sys-label-large:500 .875rem / 1.25rem Manrope, system-ui, sans-serif;--mat-sys-label-large-font:Manrope, system-ui, sans-serif;--mat-sys-label-large-line-height:1.25rem;--mat-sys-label-large-size:.875rem;--mat-sys-label-large-tracking:.006rem;--mat-sys-label-large-weight:500;--mat-sys-label-large-weight-prominent:700;--mat-sys-label-medium:500 .75rem / 1rem Manrope, system-ui, sans-serif;--mat-sys-label-medium-font:Manrope, system-ui, sans-serif;--mat-sys-label-medium-line-height:1rem;--mat-sys-label-medium-size:.75rem;--mat-sys-label-medium-tracking:.031rem;--mat-sys-label-medium-weight:500;--mat-sys-label-medium-weight-prominent:700;--mat-sys-label-small:500 .688rem / 1rem Manrope, system-ui, sans-serif;--mat-sys-label-small-font:Manrope, system-ui, sans-serif;--mat-sys-label-small-line-height:1rem;--mat-sys-label-small-size:.688rem;--mat-sys-label-small-tracking:.031rem;--mat-sys-label-small-weight:500;--mat-sys-title-large:400 1.375rem / 1.75rem Manrope, system-ui, sans-serif;--mat-sys-title-large-font:Manrope, system-ui, sans-serif;--mat-sys-title-large-line-height:1.75rem;--mat-sys-title-large-size:1.375rem;--mat-sys-title-large-tracking:0;--mat-sys-title-large-weight:400;--mat-sys-title-medium:500 1rem / 1.5rem Manrope, system-ui, sans-serif;--mat-sys-title-medium-font:Manrope, system-ui, sans-serif;--mat-sys-title-medium-line-height:1.5rem;--mat-sys-title-medium-size:1rem;--mat-sys-title-medium-tracking:.009rem;--mat-sys-title-medium-weight:500;--mat-sys-title-small:500 .875rem / 1.25rem Manrope, system-ui, sans-serif;--mat-sys-title-small-font:Manrope, system-ui, sans-serif;--mat-sys-title-small-line-height:1.25rem;--mat-sys-title-small-size:.875rem;--mat-sys-title-small-tracking:.006rem;--mat-sys-title-small-weight:500;--mat-checkbox-touch-target-display:block;--mat-checkbox-state-layer-size:36px;--mat-chip-container-height:28px;--mat-expansion-header-collapsed-state-height:44px;--mat-expansion-header-expanded-state-height:60px;--mat-fab-small-touch-target-display: ;--mat-fab-touch-target-display:block;--mat-button-filled-touch-target-display:block;--mat-button-filled-container-height:36px;--mat-button-outlined-container-height:36px;--mat-button-outlined-touch-target-display:block;--mat-button-protected-touch-target-display:block;--mat-button-protected-container-height:36px;--mat-button-text-touch-target-display:block;--mat-button-text-container-height:36px;--mat-button-tonal-container-height:36px;--mat-button-tonal-touch-target-display:block;--mat-form-field-container-height:52px;--mat-form-field-filled-label-display:block;--mat-form-field-container-vertical-padding:14px;--mat-form-field-filled-with-label-container-padding-top:22px;--mat-form-field-filled-with-label-container-padding-bottom:6px;--mat-icon-button-touch-target-display:block;--mat-icon-button-state-layer-size:36px;--mat-list-list-item-leading-icon-start-space:12px;--mat-list-list-item-leading-icon-end-space:12px;--mat-list-list-item-one-line-container-height:44px;--mat-list-list-item-two-line-container-height:60px;--mat-list-list-item-three-line-container-height:84px;--mat-paginator-container-size:52px;--mat-paginator-form-field-container-height:40px;--mat-paginator-form-field-container-vertical-padding:8px;--mat-paginator-touch-target-display:block;--mat-radio-touch-target-display:block;--mat-radio-state-layer-size:36px;--mat-tab-container-height:44px;--mat-select-arrow-transform:translateY(-8px);--mat-button-toggle-height:40px;--mat-stepper-header-height:68px;--mat-table-header-container-height:52px;--mat-table-footer-container-height:48px;--mat-table-row-item-container-height:48px;--mat-toolbar-standard-height:60px;--mat-toolbar-mobile-height:52px;--mat-tree-node-min-height:44px;--mat-sys-corner-extra-large:28px;--mat-sys-corner-extra-large-top:28px 28px 0 0;--mat-sys-corner-extra-small:4px;--mat-sys-corner-extra-small-top:4px 4px 0 0;--mat-sys-corner-full:9999px;--mat-sys-corner-large:16px;--mat-sys-corner-large-end:0 16px 16px 0;--mat-sys-corner-large-start:16px 0 0 16px;--mat-sys-corner-large-top:16px 16px 0 0;--mat-sys-corner-medium:12px;--mat-sys-corner-none:0;--mat-sys-corner-small:8px;--mat-sys-dragged-state-layer-opacity:.16;--mat-sys-focus-state-layer-opacity:.12;--mat-sys-hover-state-layer-opacity:.08;--mat-sys-pressed-state-layer-opacity:.12;--mat-toolbar-container-background-color:var(--sf-chrome);--mat-sidenav-container-background-color:var(--sf-chrome);--mat-sidenav-content-background-color:var(--sf-bg);--mat-sidenav-container-shape:0;--mat-card-outlined-container-color:var(--sf-surface);--mat-card-outlined-outline-color:var(--sf-outline);--mat-card-outlined-container-shape:var(--sf-radius);--mat-table-background-color:var(--sf-surface);--mat-table-header-headline-color:var(--sf-text-faint);--mat-table-row-item-outline-color:#1a1f2c;--mat-paginator-container-background-color:var(--sf-surface);--mat-expansion-container-background-color:transparent;--mat-expansion-header-text-weight:700;--mat-form-field-outlined-outline-color:var(--sf-outline-strong);--mat-form-field-outlined-focus-outline-color:var(--sf-primary-deep);--mat-form-field-outlined-focus-label-text-color:var(--sf-primary)}html,body{height:100%}body{margin:0;background:var(--sf-bg);color:var(--sf-text);font-family:var(--sf-font)}</style><link rel="stylesheet" href="styles-ZH3SLIUD.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-ZH3SLIUD.css"></noscript></head>
|
|
12
12
|
<body>
|
|
13
13
|
<sf-root></sf-root>
|
|
14
|
-
<script src="main-
|
|
14
|
+
<script src="main-Q2L26FCS.js" type="module"></script></body>
|
|
15
15
|
</html>
|
|
@@ -2631,7 +2631,7 @@ div.mat-mdc-select-panel {
|
|
|
2631
2631
|
`],encapsulation:2})}return a})(),Mt$2=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=pe$3({type:a});static \u0275inj=ce$3({imports:[IW,Wr,$t$2,gt$2]})}return a})();var et=class a extends C{itemsPerPageLabel="Items per page";nextPageLabel="Next page";previousPageLabel="Previous page";firstPageLabel="First page";lastPageLabel="Last page";getRangeLabel=(l,t,i)=>{if(i===0||t===0)return `0 of ${i}`;let e=l*t,r=Math.min(e+t,i);return `${e+1} \u2013 ${r} of ${i}`};static \u0275fac=(()=>{let l;return function(i){return (l||(l=um(a)))(i||a)}})();static \u0275prov=S$2({token:a,factory:a.\u0275fac})};var ke$2=class i{http=h(Xr$1);createCase(e){let t=new Ie$3().set("Content-Type","application/json").set("X-Correlation-Id",cc());return this.http.post("/api/cases",e,{headers:t}).pipe(ze$4(n=>zt$5(()=>ct$1(n))))}addMessage(e,t){let n=new Ie$3().set("Content-Type","application/json").set("X-Correlation-Id",cc());return this.http.post(`/api/cases/${encodeURIComponent(e)}/messages`,{content:t},{headers:n}).pipe(ze$4(s=>zt$5(()=>ct$1(s))))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=S$2({token:i,factory:i.\u0275fac,providedIn:"root"})};function ct$1(i){if(i instanceof jt$3){let e=i.error,t=e?.error,n=typeof t?.code=="string"?t.code:typeof e?.code=="string"?e.code:`HTTP_${i.status}`,s=typeof t?.message=="string"?t.message:typeof e?.message=="string"?e.message:i.message||"AgentOS API request failed";return {code:n,message:s,status:i.status,raw:i}}return i instanceof Error?{code:"UNKNOWN_ERROR",message:i.message,status:0,raw:i}:{code:"UNKNOWN_ERROR",message:"AgentOS API request failed",status:0,raw:i}}var we=class i{static STORAGE_KEY="factory-cockpit.supervisor-cases";save(e,t){try{let n=this.readMap();n[this.storageKey(e)]=t,localStorage.setItem(i.STORAGE_KEY,JSON.stringify(n));}catch{}}load(e){try{let n=this.readMap()[this.storageKey(e)];return Tt$2(n)?n:void 0}catch{return}}remove(e){try{let t=this.readMap();delete t[this.storageKey(e)],localStorage.setItem(i.STORAGE_KEY,JSON.stringify(t));}catch{}}storageKey(e){return `${e.namespaceId}::${e.workflowId}`}readMap(){try{let e=localStorage.getItem(i.STORAGE_KEY);if(!e)return {};let t=JSON.parse(e);return typeof t=="object"&&t!==null&&!Array.isArray(t)?t:{}}catch{return {}}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=S$2({token:i,factory:i.\u0275fac,providedIn:"root"})};function Tt$2(i){if(typeof i!="object"||i===null||Array.isArray(i))return false;let e=i;return typeof e.caseId=="string"&&e.caseId.length>0&&typeof e.namespaceId=="string"&&e.namespaceId.length>0&&typeof e.createdAt=="string"&&e.createdAt.length>0}function l(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)?i:void 0}function P(i){return Array.isArray(i)?i:[]}function o(i,e){let t=i?.[e];return typeof t=="string"&&t.length>0?t:void 0}function R(i,e){let t=i?.[e];return typeof t=="number"&&Number.isFinite(t)?t:void 0}function Pe$1(i,e){let t=i?.[e];return typeof t=="boolean"?t:void 0}function _$1(i){if(typeof i=="number"&&Number.isFinite(i))return i;if(typeof i=="string"){let e=Date.parse(i);return Number.isFinite(e)?e:null}return null}function ye$2(i){if(!i)return "--:--:--";let e=new Date(i);return Number.isNaN(e.getTime())?"--:--:--":e.toISOString().slice(11,19)}function Fe$1(i,e){if(Array.isArray(i))return i;let t=l(i);if(!t)return [];let n=t[e];return Array.isArray(n)?n:Array.isArray(t.items)?t.items:Array.isArray(t.data)?t.data:[]}var Ct$2=/(oracle|build|test|lint|scan|typecheck|type-check|compile|deterministic|verify|code)/i,Nt$2=/(human|humain|approv|validat|decision|manual|confirm|review|gate|revue)/i;function Q(i){let e=l(i),t=o(e,"lane");if(t==="human"||t==="agent"||t==="code")return t;let n=l(e?.responsibility),s=o(n,"kind");if(s==="human"||s==="agent"||s==="code")return s;let r=`${o(e,"id")??""} ${o(e,"name")??""}`;return Ct$2.test(r)?"code":Nt$2.test(r)?"human":"agent"}function Z$1(i){let e=l(i),t=l(e?.responsibility),n=l(e?.facts);return o(t,"name")??o(e,"agentName")??o(n,"agentName")??"agent"}function Ue$1(i){let e=Q(i);if(e==="human")return {id:"engineer",kind:"human",label:"engineer"};if(e==="code")return {id:"code",kind:"code",label:"code"};let t=Z$1(i);return {id:`agent:${t}`,kind:"agent",label:t}}function O(i){let e=o(l(i),"status")??"pending";return ["pending","ready","running","waiting_human","completed","failed","indeterminate","cancelled"].includes(e)?e:"pending"}function B$1(i){let e=l(i),t=_$1(e?.startedAt),n=_$1(e?.finishedAt??e?.completedAt??e?.endedAt);if(t!==null&&n!==null&&n>=t)return (n-t)/1e3;let s=e?.durationMs,r=typeof s=="number"&&Number.isFinite(s)&&s>=0?s:void 0;return r!==void 0?r/1e3:null}function ee$1(i){return i==="human"?"amber":i==="code"?"cyan":"violet"}function ue(i){let e=l(i);if(!e)return;let t=l(e.realCost)??e,n=R(t,"cost"),s=R(t,"unknownCostCount"),r=R(t,"liveTokens");if(n===void 0&&s===void 0&&r===void 0)return;let u=t.runCostThreshold===null?null:R(t,"runCostThreshold")??null;return {cost:n,unknownCostCount:s,liveTokens:r,paused:Pe$1(t,"paused"),active:Pe$1(t,"active"),runCostThreshold:u}}function jt$1(i){if(Array.isArray(i))return i;let e=l(i);return e?Array.isArray(e.items)?e.items:Array.isArray(e.data)?e.data:[]:[]}function Ot$1(i){if(!Array.isArray(i))return;let e=[];return i.forEach((t,n)=>{if(typeof t=="string"&&t.length>0){e.push({id:t,label:t});return}let s=l(t);if(!s)return;let r=o(s,"id")??o(s,"actionId")??String(n+1),a=o(s,"label")??o(s,"name")??o(s,"title")??r;e.push({id:r,label:a});}),e.length>0?e:void 0}function We(i){return jt$1(i).map((e,t)=>{let n=l(e)??{},s=l(n.payload)??{},r={interactionId:o(n,"interactionId")??o(n,"id")??`interaction-${t+1}`,stepId:o(n,"stepId")??o(s,"stepId")??"",interactionType:o(n,"interactionType")??o(n,"type")??"unknown",status:o(n,"status")??"unknown"},a=o(n,"workflowId");a&&(r.workflowId=a);let u=R(n,"revision");u!==void 0&&(r.revision=u);let d=o(s,"prompt")??o(s,"question")??o(n,"prompt");d&&(r.prompt=d);let p=o(n,"questionType")??o(s,"questionType")??o(s,"type");p&&(r.questionType=p);let g=s.options??n.options;Array.isArray(g)&&(r.options=g.filter(S=>typeof S=="string"));let f=Ot$1(s.actions??n.actions);f&&(r.actions=f);let m=o(s,"recipient")??o(n,"recipient");m&&(r.recipient=m);let y=o(n,"recipientRole")??o(s,"recipientRole");y&&(r.recipientRole=y);let k=o(n,"namespaceId")??o(s,"namespaceId");k&&(r.namespaceId=k);let b=o(n,"createdAt")??o(s,"createdAt");return b&&(r.createdAt=b),r})}function _t$1(i){if(Array.isArray(i))return i;let e=l(i);return e?Array.isArray(e.items)?e.items:Array.isArray(e.data)?e.data:[]:[]}function te$1(i){return _t$1(i).map((e,t)=>{let n=l(e)??{},s={attemptId:o(n,"attemptId")??o(n,"id")??`attempt-${t+1}`,stepId:o(n,"stepId")??"",attemptNumber:R(n,"attemptNumber")??0,agentName:o(n,"agentName")??"",status:o(n,"status")??"unknown",caseId:o(n,"caseId")??""},r=o(n,"failureCode");r&&(s.failureCode=r);let a=o(n,"resultEvidenceId");a&&(s.resultEvidenceId=a);let u=R(n,"revision");u!==void 0&&(s.revision=u);let d=o(n,"createdAt");d&&(s.createdAt=d);let p=o(n,"startedAt");p&&(s.startedAt=p);let g=o(n,"completedAt");return g&&(s.completedAt=g),s})}function Be(i){let e=[];for(let t of Fe$1(i,"allowedActions")){let n=l(t);if(!n)continue;let s=o(n,"type");if(!s)continue;let r={type:s},a=o(n,"label");a&&(r.label=a);let u=o(n,"interactionId");u&&(r.interactionId=u);let d=o(n,"stepId");d&&(r.stepId=d);let p=o(n,"attemptId");p&&(r.attemptId=p);let g=o(n,"caseId");g&&(r.caseId=g);let f=o(n,"questionEventId");f&&(r.questionEventId=f);let m=R(n,"expectedRevision");m!==void 0&&(r.expectedRevision=m),e.push(r);}return e}function Le$1(i){let e=[];for(let t of Fe$1(i,"blockers")){let n=l(t);if(!n)continue;let s=o(n,"code")??"UNKNOWN_RUNTIME",r=o(n,"message"),a=o(n,"label")??r??o(n,"details")??s,u={code:s,label:a},d=o(n,"stepId");d&&(u.stepId=d),r&&(u.message=r);let p=o(n,"details");p&&(u.details=p),e.push(u);}return e}var Qe=2,Mt$1=new Set(["succeeded","completed","failed","indeterminate","interrupted","superseded","cancelled"]);function ut$1(i){if(i.length===0)return "queued";let e=i.map(t=>O(t));return e.some(t=>t==="failed"||t==="indeterminate"||t==="cancelled")?"failed":e.some(t=>t==="running"||t==="waiting_human")?"running":e.every(t=>t==="completed")?"succeeded":"queued"}function V$1(i,e){switch((i??"").toLowerCase()){case "running":case "waiting_human":return "running";case "ready":return "queued";case "active":case "existing":return ut$1(P(e));case "completed":case "succeeded":return "succeeded";case "failed":case "indeterminate":case "cancelled":return "failed";case "pending":case "queued":return "queued";default:return ut$1(P(e))}}function Ae(i,e){let t=l(i.instance),n=i.controllerRequest??e.controllerRequest??t?.controllerRequest;if(typeof n=="string"&&n.length>0)return {text:n};let s=l(n);if(!s)return;let r={},a=o(s,"text");a&&(r.text=a);let u=o(s,"prompt");u&&(r.prompt=u);let d=o(s,"namespaceId");d&&(r.namespaceId=d);let p=o(s,"observedAt");p&&(r.observedAt=p);let g=o(s,"actorId");g&&(r.actorId=g);let f=o(s,"source");return f&&(r.source=f),r.text!==void 0||r.prompt!==void 0||r.actorId!==void 0||r.observedAt!==void 0?r:void 0}function qt$2(i,e){let t=i.attemptNumber-e.attemptNumber;if(t!==0)return t;let n=_$1(i.startedAt??i.createdAt??i.completedAt)??Number.POSITIVE_INFINITY,s=_$1(e.startedAt??e.createdAt??e.completedAt)??Number.POSITIVE_INFINITY;return n-s||i.attemptId.localeCompare(e.attemptId)}function Dt$1(i){let e=i.status.toLowerCase();return e==="succeeded"||e==="completed"||e==="superseded"?"completed":e==="interrupted"||e==="cancelled"?"cancelled":e==="failed"||e==="indeterminate"||e==="running"||e==="waiting_human"?e:"pending"}function $e$1(i,e){let t=new Map;for(let n of e){if(!n.stepId)continue;let s=t.get(n.stepId)??[];s.push(n),t.set(n.stepId,s);}return i.flatMap(n=>{let s=l(n)??{},r=o(s,"id"),a=r?t.get(r):void 0;if(Q(s)!=="agent"||!a?.length)return [n];let u=[...a].sort(qt$2);return u.map(d=>{let p=Mt$1.has(d.status.toLowerCase());return Q$1(M$1({},s),{id:`${r}:attempt:${d.attemptId}`,sourceStepId:r,name:u.length>1?`${o(s,"name")??r} \xB7 attempt ${d.attemptNumber||"?"}`:o(s,"name")??r,agentName:d.agentName||o(s,"agentName"),attemptId:d.attemptId,attemptNumber:d.attemptNumber,caseId:d.caseId||void 0,failureCode:d.failureCode||void 0,responsibility:Q$1(M$1({},l(s.responsibility)??{}),{kind:"agent",name:d.agentName||Z$1(s)}),status:Dt$1(d),startedAt:d.startedAt,completedAt:p?d.completedAt:void 0,durationMs:void 0})})})}function Pt$1(i){let e=O(i);return e==="waiting_human"?"waiting_human":e==="running"?"running":e==="pending"||e==="ready"?"pending":e==="failed"?"failed":e==="cancelled"?"cancelled":e==="indeterminate"?"indeterminate":"done"}function Ft$1(i){return ["failed","indeterminate"].includes(O(i))?"red":ee$1(Q(i))}function lt$1(i,e=0){let t=Array.isArray(i)?i:[];if(t.length===0)return [];let n=t.map(a=>B$1(a)??0),s=n.reduce((a,u)=>a+u,0),r=e>0?e:s;return t.map((a,u)=>{let d=l(a),p=o(d,"id")??o(d,"name")??`step-${u+1}`,g=o(d,"name"),f=n[u]??0,m={key:p,ratio:r>0?f/r:1/t.length,tone:Ft$1(a),status:Pt$1(a)};return g&&g!==p&&(m.label=g),m})}function Ut$1(i){let e=i.find(n=>["running","waiting_human","ready"].includes(O(n)));if(e)return o(l(e),"name")??o(l(e),"id");let t=i[i.length-1];return t?o(l(t),"name")??o(l(t),"id"):void 0}function He$1(i,e,t){let n=l(i)??{},s=l(n.projection)??n,r=P(s.steps),a=$e$1(r,te$1(t)),u=Ae(n,s),d=[...r,...a].map(g=>_$1(l(g)?.startedAt)).filter(g=>g!==null),p=_$1(u?.observedAt);return p!==null&&d.push(p),d.length>0?Math.min(...d):_$1(l(e)?.startedAt)??Date.now()}function Wt$1(i){return _$1(i.finishedAt??i.completedAt??i.endedAt)}function dt$1(i,e,t,n){let s=[];for(let r of P(i)){let a=null;if(typeof r=="number"&&Number.isFinite(r))a=r;else if(typeof r=="string"){let u=_$1(r);u!==null&&(a=(u-e)/1e3);}a!==null&&a>=t&&a<=n&&s.push(a);}return s.length>0?s:void 0}function Ke(i,e,t){let n=l(i)??{},s=l(n.projection)??n,r=$e$1(P(s.steps),te$1(t)),a=Ae(n,s);if(r.length===0&&!a)return [];let u=r.map(c=>_$1(l(c)?.startedAt)).filter(c=>c!==null),d=_$1(a?.observedAt),p=He$1(i,e,t),g=new Map,f=c=>P(c.dependsOn).reduce((w,A)=>typeof A!="string"?w:Math.max(w,g.get(A)??0),0),m=r.map((c,h)=>{let w=l(c)??{};return {obj:w,index:h,start:_$1(w.startedAt),terminalEnd:Wt$1(w),duration:B$1(c)}}).sort((c,h)=>{let w=c.start??Number.POSITIVE_INFINITY,A=h.start??Number.POSITIVE_INFINITY;return w-A||c.index-h.index}),y=new Map,k=(c,h)=>{let w=y.get(c.id);return w||(w={id:c.id,label:c.label,subtitle:c.kind==="agent"?c.label:"workspace",kind:c.kind==="human"?"human":c.kind==="code"?"workspace":"agent",tone:ee$1(c.kind),blocks:[]},y.set(c.id,w)),c.kind==="agent"&&h!==void 0&&(w.contextPct=h),w},b=0;for(let c of m){let h=Ue$1(c.obj),w=R(c.obj,"contextPct"),A=k(h,w),v=O(c.obj);if(!(v==="running"||v==="completed"||v==="failed"||v==="indeterminate"||v==="cancelled"||v==="waiting_human"&&c.start!==null))continue;let T=o(c.obj,"sourceStepId")??o(c.obj,"id"),q=Math.max(f(c.obj),b),C=c.start!==null?Math.max((c.start-p)/1e3,0):q,H=c.start!==null&&c.terminalEnd!==null&&c.terminalEnd>=c.start?Math.max((c.terminalEnd-p)/1e3,C):null,z=C+Math.max(c.duration??0,Qe),ne=v==="running"&&c.start!==null?Math.max((Date.now()-p)/1e3,C):null,J=Math.max(ne??H??z,C);b=Math.max(b,J),T&&g.set(T,J);let N=Q$1(M$1({label:o(c.obj,"name")??o(c.obj,"id")??"step"},o(c.obj,"sourceStepId")??o(c.obj,"id")?{stepId:o(c.obj,"sourceStepId")??o(c.obj,"id")}:{}),{startSec:C,endSec:J,status:v}),se=o(c.obj,"description");se&&(N.description=se);let ie=dt$1(c.obj.ticks,p,C,J);ie&&(N.ticksSec=ie);let Y=dt$1(c.obj.errorTicks,p,C,J);Y&&(N.errorTicksSec=Y);let me=o(c.obj,"agentName");me&&(N.agentName=me);let oe=o(c.obj,"attemptId");oe&&(N.attemptId=oe);let re=R(c.obj,"attemptNumber");re!==void 0&&(N.attemptNumber=re);let fe=o(c.obj,"caseId");fe&&(N.caseId=fe);let ae=o(c.obj,"failureCode");ae&&(N.failureCode=ae);let Xe=o(c.obj,"id")==="request"||N.label==="request";h.kind==="human"&&Xe&&!A.request?A.request=N:A.blocks.push(N);}if(a){let c=y.get("engineer");if(c||(c={id:"engineer",label:"engineer",subtitle:a.actorId??"engineer",kind:"human",tone:"amber",blocks:[]},y.set("engineer",c)),!c.request){let h=u.length>0?Math.min(...u):null,A={label:"request",startSec:0,endSec:d!==null&&h!==null&&h>d?Math.max((h-p)/1e3,Qe):Qe,status:"completed"},v=a.text??a.prompt;v&&(A.description=v),c.request=A;}a.actorId&&(!c.subtitle||c.subtitle==="workspace")&&(c.subtitle=a.actorId);}let S=c=>c.kind==="human"?0:c.kind==="workspace"?1:2;return [...y.values()].sort((c,h)=>S(c)-S(h))}function Ie(i,e,t,n=new Set){let s=l(i)??{},r=l(s.projection)??s,a=l(s.relations),u=P(r.steps),d=ue(e),p=u.map(v=>B$1(v)).filter(v=>v!==null),g=Math.round(p.reduce((v,M)=>v+M,0)),f=o(s,"workflowId")??o(r,"workflowId")??"unknown",m=o(r,"goal")??o(r,"title")??o(a,"ticket")??o(s,"workflowId")??"",k=u.map(O).some(v=>v==="waiting_human"),b=lt$1(u,g).map(v=>n.has(v.key)&&v.status==="pending"?Q$1(M$1({},v),{status:"blocked"}):v),S=Ae(s,r),c=b.some(v=>v.key==="request"||v.label==="request");if(S&&!c){let v=u.some(C=>o(l(C),"startedAt")!==void 0),M={key:"user-request",label:"Demande utilisateur",ratio:b.length>0?Math.min(1/(b.length+1),.15):1,tone:"amber",status:v?"done":"pending"},T=1-M.ratio,q=b.map(C=>Q$1(M$1({},C),{ratio:C.ratio*T}));b.splice(0,b.length,M,...q);}let h=V$1(o(r,"status"),u),w=h==="failed"?"failed":k?"waiting_human":n.size>0?"blocked":h==="running"?"running":h==="succeeded"?"succeeded":"pending",A={id:f,workflow:o(r,"title")??f,status:h,cardState:w,currentPhase:Ut$1(u),goal:m,costUsd:d?.cost??R(r,"costUsd")??R(s,"costUsd")??0,unknownCostCount:d?.unknownCostCount??0,durationSec:g,tokens:R(r,"tokens")??0,phases:b};return k&&(A.waitingHuman=true),A}function Bt$2(i){if(i.length!==0)return i.reduce((e,t)=>t.attemptNumber>=e.attemptNumber?t:e)}function Lt$1(i){return i.map(e=>{let t={title:e.interactionType,status:e.status};return e.prompt&&(t.subtitle=e.prompt),e.actions&&(t.actions=e.actions),t})}function Qt$2(i){return i.map((e,t)=>{let n=l(e)??{},s=l(n.facts)??{},a={title:o(n,"kind")??o(n,"evidenceId")??`sortie-${t+1}`},u=o(n,"outcome");u&&(a.status=u);let d=o(s,"message")??o(s,"text")??o(s,"summary")??u;return d&&(a.subtitle=d),a})}function xe$2(i,e,t=[],n=[],s=[],r){let a;r&&(a=i.find(T=>{let q=l(T);return o(q,"id")===r||o(q,"key")===r})),a||(a=i.find(T=>["running","waiting_human","ready"].includes(O(T)))??i[i.length-1]);let u=l(a)??{},d=l(u.responsibility),p=B$1(u)??0,g=o(u,"description"),f=o(u,"id")??o(u,"key"),m=o(d,"name")??Z$1(u),y=o(d,"kind")??Q(u),k=f?n.filter(T=>T.stepId===f):[],b=Bt$2(k),S={name:o(u,"name")??o(u,"id")??"phase",status:o(u,"status")?V$1(o(u,"status"),[u]):e,stepStatus:O(u),durationSec:Math.round(p),owner:m,kind:y,attempt:"1/1",sections:[]};f&&(S.stepId=f),k.length>0&&b&&(S.attempt=`${b.attemptNumber}/${k.length}`,S.currentAttemptNumber=b.attemptNumber,S.totalAttempts=k.length,S.attempts=k,S.agentName=b.agentName,S.attemptStatus=b.status,S.caseId=b.caseId,b.failureCode&&(S.failureCode=b.failureCode));let c=f?t.filter(T=>T.stepId===f):t,h={label:"Gates",count:c.length,items:Lt$1(c)};c.length===0&&(h.body="Aucune gate d'interaction pour cette phase.");let w=s.filter(T=>{let q=l(T)??{},C=o(q,"stepId"),H=o(q,"evidenceId")??o(q,"id"),z=f!==void 0&&C===f,ne=b?.resultEvidenceId!==void 0&&H===b.resultEvidenceId;return z||ne}),A={label:"Sorties",count:w.length,items:Qt$2(w)};w.length===0&&(A.body="Aucune sortie enregistr\xE9e pour cette phase.");let v=[];(S.agentName??m)&&v.push({title:"Agent",subtitle:S.agentName??m}),m&&v.push({title:"R\xF4le",subtitle:`${m} (${y})`}),S.caseId&&v.push({title:"Case",subtitle:S.caseId}),S.totalAttempts&&v.push({title:"Tentatives",subtitle:S.attempt});let M={label:"Configuration de l'agent",items:v};return v.length===0&&(M.body="Information agent non disponible"),S.sections=[h,A,M],g&&S.sections.push({label:"Description",body:g}),S.sections.push({label:"Prompts compil\xE9s",notAvailable:true,body:"Non disponible (n\xE9cessite exposition backend)"},{label:"Mod\xE8le LLM r\xE9solu",notAvailable:true,body:"Non disponible (n\xE9cessite exposition backend)"}),S}function Ge(i,e,t=[],n=[],s=[]){let r=new Map;for(let a of i){let u=l(a),d=o(u,"id")??o(u,"key");d&&r.set(d,xe$2(i,e,t,n,s,d));}return r}function $t$1(i){let e=i.toLowerCase();return e.includes("tool")?"tool_call":e.includes("think")?"thinking":e.includes("human")||e.includes("decision")||e.includes("agent")?"agent_message":e.includes("phase")?"phase_start":"log"}var ft$1=2e3,Ht$2=2048,Re$1=8192,pt$1=20,Kt$2=/[\u001B\u009B][[\]()#;?]*(?:(?:(?:[a-zA-Z\d]*(?:;[-a-zA-Z\d/#&.:=?%@~_]+)*)?\u0007)|(?:(?:\d{1,4}(?:[;:]\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))/g;function F$1(i,e){if(typeof i=="string")return i.replace(Kt$2,"").replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g,"").slice(0,e)}function mt$1(i){if(typeof i=="string")return {excerpt:F$1(i,Re$1)??"",truncated:i.length>Re$1};let e=l(i);if(!e)return;let t=typeof e.excerpt=="string"?e.excerpt:"",s={excerpt:F$1(t,Re$1)??"",truncated:e.truncated===true||t.length>Re$1},r=F$1(e.sha256,128);return r&&(s.sha256=r),s}function Gt$2(...i){let e=i.map(s=>s?.excerpt??"").join(`
|
|
2632
2632
|
`),t=new Set,n=[/Running target \S+ for project ([A-Za-z0-9._-]+) failed/gi,/Failed tasks?:\s*([^\n]+)/gi];for(let s of n)for(let r of e.matchAll(s))if(F$1(r[1],256)?.split(/[,\s]+/).filter(Boolean).forEach(a=>t.add(a)),t.size>=pt$1)break;return [...t].slice(0,pt$1)}function Vt$2(i,e){let t=o(i,"kind"),n=F$1(e.verification,256);if(!(t==="code-verification"||t==="session-step"&&(n||e.executed!==void 0)))return;let r=e.timedOut===true,a=e.executed,u=typeof e.exitCode=="number"&&Number.isFinite(e.exitCode)?e.exitCode:void 0,d=o(i,"outcome"),g=F$1(e.status,64)==="running"||d==="running"?"running":a===false?"refused":r?"timed_out":u===0&&d!=="fail"&&d!=="failed"?"passed":"failed",f=mt$1(e.stdout),m=mt$1(e.stderr),y={};for(let k of ["cwd","observedHead","rootIdentity","timeoutMs"]){let b=e[k];typeof b=="string"?y[k]=F$1(b,512)??"":typeof b=="number"&&Number.isFinite(b)&&(y[k]=b);}return f?.sha256&&(y.stdoutSha256=f.sha256),m?.sha256&&(y.stderrSha256=m.sha256),{verification:n,state:g,command:F$1(e.command,Ht$2),code:F$1(e.code,256),message:F$1(e.message,ft$1),exitCode:u,stdout:f,stderr:m,failedTasks:Gt$2(f,m),technical:y}}function Ee$1(i,e){let t=[],n=new Map;for(let r of i){let a=l(r);if(o(a,"kind")!=="code-verification")continue;let u=o(a,"evidenceId")??o(a,"id");u&&n.set(u,a??{});}let s=new Set;for(let r of i){let a=l(r)??{},u=l(a.facts)??{},d=o(a,"kind")??"log",p=d==="session-step"?o(u,"evidenceId"):void 0,g=p?n.get(p):void 0,f=l(g?.facts);if(g&&f&&s.add(p),d==="code-verification"){let h=o(a,"evidenceId")??o(a,"id");if(h&&s.has(h)||i.some(A=>{let v=l(A),M=l(v?.facts);return o(v,"kind")==="session-step"&&o(M,"evidenceId")===h}))continue}let m=f?M$1(M$1({},f),u):u,y=g?Q$1(M$1(M$1({},g),a),{kind:"code-verification"}):a,k=Vt$2(y,m),b={time:ye$2(o(a,"createdAt")??o(m,"startedAt")),type:$t$1(d),text:F$1(k?.message??m.message??m.text??a.outcome??d,ft$1)??d};k&&(b.codeDiagnostic=k);let S=o(m,"tool");S&&(b.tool=S);let c=typeof m.durationMs=="number"&&Number.isFinite(m.durationMs)?m.durationMs:void 0;c!==void 0&&(b.durationSec=c/1e3),t.push(b);}if(t.length===0)for(let r of e){let a=l(r)??{},u=o(a,"startedAt");u&&t.push({time:ye$2(u),type:"phase_start",text:o(a,"name")??o(a,"id")??"step"});}return t}function Te$1(i){return i.map(e=>({time:ye$2(e.createdAt),type:"agent_message",text:`[Human Gate - ${e.interactionType}] ${e.prompt??e.status}`}))}function Ce$2(i,e){let t=0;for(let n of i){let s=l(l(n)?.facts),r=s&&typeof s[e]=="number"&&Number.isFinite(s[e])?s[e]:void 0;r!==void 0&&(t+=r);}return t}function Ne$1(i,e,t,n,s,r){if(!s)return i;let a=new Set;for(let f of e){let m=l(f)??{},y=o(m,"stepId"),k=o(m,"evidenceId")??o(m,"id");if(k)if(r){let S=n.find(h=>h.attemptId===r)?.resultEvidenceId===k,c=o(m,"attemptId")===r;(S||y===s&&c)&&a.add(k);}else y===s&&a.add(k);}let u=e.filter(f=>{let m=l(f)??{},y=o(m,"evidenceId")??o(m,"id");return y!==void 0&&a.has(y)}),d=Ee$1(u,[]),p=t.filter(f=>f.stepId===s),g=Te$1(p);return [...d,...g]}var zt$1=new Set(["running","active","waiting_human"]),Jt$2=new Set(["idle","ready","pending","queued"]);function gt$1(i,e){let t=(i??"").toLowerCase();return zt$1.has(t)?"working":Jt$2.has(t)?"idle":e==="running"?"working":"idle"}function Yt$1(i){return i?Number.isFinite(Date.parse(i)):false}function E(i){let e=l(i),t=l(e?.projection);return o(e,"workflowId")??o(t,"workflowId")}function de$1(i){let e=l(i),t=l(e?.instance);return o(e,"namespaceId")??o(t,"namespaceId")}function Ve(i){let e=l(i),t=l(e?.controllerExecution);return o(t,"caseId")}function Xt$2(i){return ["failed","indeterminate"].includes(O(i))?"red":ee$1(Q(i))}function Zt$1(i,e=new Set){return i.map((t,n)=>{let s=l(t)??{},r=O(s),a={key:o(s,"id")??o(s,"name")??`step-${n+1}`,tone:Xt$2(s),status:e.has(o(s,"id")??o(s,"name")??`step-${n+1}`)?"blocked":r==="waiting_human"?"waiting_human":r==="running"?"running":r==="failed"?"failed":r==="pending"||r==="ready"?"pending":"done"},u=B$1(s);return u!==null&&(a.durationSec=Math.round(u)),a})}function le$1(i,e,t,n,s,r,a,u){let d=l(i)??{},p=l(d.projection)??d,g=P(p.steps),f=P(l(t)?.items),m=en$1(g,f),y=l(d.controllerExecution),k=l(e),b=l(n),S=ue(b),c=We(s),h=te$1(r),w=Be(a),A=Le$1(a),v=new Set(A.map(x=>x.stepId).filter(x=>!!x)),M=w.find(x=>x.type==="cancel_attempt"&&x.attemptId!==void 0),T=h.find(x=>x.status==="running"),q=M?.attemptId??T?.attemptId,C=M?.expectedRevision??T?.revision,H=o(d,"workflowId")??o(p,"workflowId")??"unknown",z=Ve(d),ne=V$1(o(p,"status"),m),N=V$1(void 0,m)==="failed"?"failed":ne,se=m.map(O),ie=se.includes("waiting_human")||h.some(x=>x.status==="waiting_human"),Y=!ie&&se.includes("running"),me=ie?"waiting_human":Y?"running":N==="succeeded"?"completed":N==="failed"?"failed":"pending",oe=Q$1(M$1({},d),{projection:Q$1(M$1({},p),{steps:m})}),re=He$1(oe,e,h),fe=new Date(re).toISOString(),ae=Ke(oe,e,h),ge=ae.reduce((x,K)=>{let ce=K.request?.endSec??0,Rt=K.blocks.reduce((xt,Et)=>Math.max(xt,Et.endSec),0);return Math.max(x,ce,Rt)},0),kt=m.map(x=>B$1(x)).filter(x=>x!==null).reduce((x,K)=>x+K,0),Ze=Ce$2(f,"tokensRead"),et=Ce$2(f,"tokensWritten"),wt=S?.liveTokens&&S.liveTokens>0?S.liveTokens:void 0,yt=R(p,"tokens")??wt??R(b,"tokens")??Ze+et,At=Ge(m,N,c,h,f),tt=new Map,nt=new Map;for(let x of m){let K=l(x),ce=o(K,"id")??o(K,"key");ce&&tt.set(ce,Ne$1([],f,c,h,ce,void 0));}for(let x of h)nt.set(x.attemptId,Ne$1([],f,c,h,x.stepId,x.attemptId));let It=l(d.relations)??l(l(d.instance)?.relations)??void 0;return Q$1(M$1(M$1(M$1({id:H,sandbox:o(It,"ticket")??o(y,"caseId")??o(d,"namespaceId")??H,goal:o(p,"goal")??o(p,"title")??"",status:N,executionState:me,activelyRunning:Y,startedAt:o(k,"startedAt")??o(p,"startedAt")??tn$1(m)??new Date().toISOString(),timelineOriginAt:fe,workflow:o(p,"title")??H,costUsd:S?.cost??R(p,"costUsd")??R(b,"costUsd")??R(d,"costUsd")??0,unknownCostCount:S?.unknownCostCount??0,durationSec:Math.max(Math.round(kt),Math.round(ge)),tokens:yt,tokensRead:Ze,tokensWritten:et,steps:Zt$1(m,v),lanes:ae,nowSec:Math.round(Y?Math.max(ge,Math.max((Date.now()-re)/1e3,0)):ge),events:[...Ee$1(f,m),...Te$1(c)],phase:xe$2(m,N,c,h,f),phaseByStepId:At,interactions:c,attempts:h,allowedActions:w,blockers:A,agentQuestions:u??[]},q!==void 0?{activeAttemptId:q}:{}),C!==void 0?{activeAttemptRevision:C}:{}),z!==void 0?{controllerCaseId:z}:{}),{eventsByStepId:tt,eventsByAttemptId:nt})}function en$1(i,e){let t=new Map;for(let n of e){let s=l(n),r=o(s,"kind");if(r!=="code-verification"&&r!=="session-step")continue;let a=o(s,"stepId")??o(l(s?.facts),"stepId");if(!a)continue;let u=l(s?.facts);if(!u)continue;let d=o(u,"status")??o(s,"outcome");!(R(u,"durationMs")!==void 0||o(u,"startedAt")!==void 0)&&d!=="running"||t.set(a,Q$1(M$1({},u),{evidenceStatus:d}));}return i.map(n=>{let s=l(n),r=o(s,"id");if(!s||!r)return n;let a=t.get(r);if(!a)return n;let u=R(s,"durationMs")??R(a,"durationMs"),d=o(s,"startedAt")??o(a,"startedAt"),p=o(s,"completedAt")??o(a,"completedAt"),g=O(s),m=o(a,"evidenceStatus")==="running"?"running":R(a,"exitCode")===0&&a.timedOut!==true?"completed":"failed";return Q$1(M$1(M$1(M$1(M$1({},s),u!==void 0?{durationMs:u}:{}),d?{startedAt:d}:{}),p?{completedAt:p}:{}),{status:g==="pending"||g==="ready"?m:g})})}function tn$1(i){for(let e of i){let t=o(l(e),"startedAt");if(t)return t}}function pe$1(i,e){let t=Ie(i),n=l(i)??{},s=l(n.projection)??n,r=l(n.relations)??l(l(n.instance)?.relations),a=de$1(i),u=o(r,"ticket"),d=o(r,"branch")??u,p=o(s,"workflowType"),g=o(s,"title"),f=o(s,"goal"),m=o(s,"status"),y=g??(t.id!=="unknown"?t.id:u??f??"workflow"),k={id:t.id,title:y,project:a??u??"coday",status:e??(t.status==="failed"?"failed":gt$1(m,t.status)),costUsd:t.costUsd,durationSec:t.durationSec,tokens:t.tokens,phases:t.phases,run:t};a&&(k.namespaceId=a),p&&(k.workflowType=p),u&&(k.ticket=u),d&&(k.branch=d);let b=Ve(i);b&&(k.controllerCaseId=b);let S=o(n,"createdAt");return S&&Yt$1(S)&&(k.createdAt=S),k}function ze$1(i,e){let t=new Set((e.blockers??[]).map(s=>s.stepId).filter(s=>!!s)),n=Ie(i,{realCost:{cost:e.costUsd,unknownCostCount:e.unknownCostCount??0,liveTokens:e.tokens}},void 0,t);return n.status=e.status,n.durationSec=e.durationSec,n.tokens=e.tokens,n.costUsd=e.costUsd,n.unknownCostCount=e.unknownCostCount??0,n.waitingHuman=e.executionState==="waiting_human",n.cardState=e.status==="failed"?"failed":e.executionState==="waiting_human"?"waiting_human":t.size>0?"blocked":e.activelyRunning?"running":e.status==="succeeded"?"succeeded":"pending",n.phases=e.steps.map(s=>({key:s.key,ratio:e.durationSec>0?(s.durationSec??0)/e.durationSec:1/Math.max(e.steps.length,1),tone:s.tone,status:s.status})),n}var Je="unassigned";var Ye={id:"872641a8",sandbox:"coday-agentos-execution-adapter-03b2",goal:"@Archay Goal: Implement explicit AgentOS Execution Adapter boundary & robust SSE Client in factory-service",status:"running",executionState:"running",activelyRunning:true,startedAt:"2026-09-30T18:08:22+02:00",workflow:"adw_simple_sdlc",costUsd:1.07,durationSec:856,tokens:606500,tokensRead:73500,tokensWritten:17900,nowSec:856,steps:[{key:"request",tone:"amber",status:"done",durationSec:0},{key:"plan",tone:"violet",status:"done",durationSec:236},{key:"workspace",tone:"green",status:"done"},{key:"build",tone:"cyan",status:"running",durationSec:619}],lanes:[{id:"human",label:"benjamin.valdes",subtitle:"engineer",kind:"human",tone:"amber",blocks:[],request:{label:"request",description:"Capture the incoming ask",startSec:0,endSec:0,status:"completed"}},{id:"code",label:"code",subtitle:"workspace",kind:"workspace",tone:"cyan",blocks:[{label:"workspace",startSec:229,endSec:237,status:"completed"}]},{id:"planner",label:"planner",subtitle:"claude-opus-4-8",kind:"agent",tone:"violet",contextPct:7,blocks:[{label:"plan",description:"Turn the request into an implementable plan",startSec:0,endSec:236,status:"completed",ticksSec:[6,12,18,24,30,90,180,230],errorTicksSec:[48,52]}]},{id:"builder",label:"builder",subtitle:"kimi-k3",kind:"agent",tone:"cyan",blocks:[{label:"build",description:"Implement the plan exactly",startSec:237,endSec:856,status:"running",ticksSec:[252,260,268,276,284,292,780,840]}]}],phase:{name:"build",status:"running",stepStatus:"running",durationSec:619,owner:"builder",kind:"agent",attempt:"1/1",sections:[{label:"Configuration de l'agent"},{label:"Description"},{label:"Prompts compil\xE9s",count:2},{label:"Gates",count:0},{label:"Sorties",count:0}]},events:[{time:"18:12:19",type:"phase_start",text:"build"},{time:"18:12:19",type:"agent_start",text:"builder"},{time:"18:12:27",type:"thinking",text:"Let me start by reading the plan and spec files, and exploring the factory-service\u2026"},{time:"18:12:27",type:"tool_call",tool:"read",text:"/work/data/sessions/872641a8/context_handoff/plan.md",durationSec:.01},{time:"18:12:27",type:"tool_call",tool:"read",text:"/work/app/specs/872641a8_agentos_execution_adapter_sse.md",durationSec:.01},{time:"18:12:36",type:"tool_call",tool:"bash",text:"find /work/app -type d -name factory-service | head",durationSec:.47},{time:"18:12:43",type:"tool_call",tool:"ls",text:"/work/app/factory-service/src/main/kotlin/io/whozoss/factory",durationSec:0},{time:"18:13:02",type:"thinking",text:"Now let me read the app_docs (SSE contract), and check the build setup\u2026"},{time:"18:13:02",type:"tool_call",tool:"read",text:"/work/app/factory-service/build.gradle.kts",durationSec:.01},{time:"18:13:13",type:"tool_call",tool:"read",text:"/work/app/app_docs/agentos-sse-contract.md",durationSec:0},{time:"18:21:18",type:"agent_message",text:"I have full context now. Let me check the Nx/Gradle wiring for running factory-service\u2026"},{time:"18:22:14",type:"agent_message",text:"Now I'll implement the new package. Starting with the main source files."},{time:"18:22:14",type:"tool_call",tool:"write",text:"/work/app/factory-service/src/main/kotlin/io/whozoss/factory/adapter/\u2026",durationSec:0}]};var nn$1=["workflow-projection-updated","workflow-projection-removed","workflow-projection-restored","workflow-projection-purged"],sn$1=new y("COCKPIT_V2_EVENT_SOURCE_FACTORY",{providedIn:"root",factory:()=>i=>{if(typeof EventSource>"u")throw new Error("EventSource is not available in this environment");return new EventSource(i)}}),ht$1="/api/factory/workflows/stream",on$1=3e4,je$1=class i{eventSourceFactory=h(sn$1);source=null;reconnectTimer=null;reconnectAttempts=0;hasConnected=false;namespaceId;disposed=false;invalidationsSubject=new q$2;reconnectedSubject=new q$2;connectionSubject=new q$2;invalidations$=this.invalidationsSubject.asObservable();reconnected$=this.reconnectedSubject.asObservable();connectionState$=this.connectionSubject.asObservable();connect(e){this.namespaceId=e,this.open();}close(){this.clearReconnect(),this.closeSource(),this.hasConnected=false,this.reconnectAttempts=0,this.connectionSubject.next(false);}ngOnDestroy(){this.disposed=true,this.close(),this.invalidationsSubject.complete(),this.reconnectedSubject.complete(),this.connectionSubject.complete();}open(){if(this.disposed)return;this.clearReconnect(),this.closeSource();let e;try{e=this.eventSourceFactory(this.buildUrl());}catch{this.scheduleReconnect();return}this.source=e,e.onopen=()=>this.handleOpen(),e.onerror=()=>this.handleError();for(let t of nn$1)e.addEventListener(t,n=>this.handleEvent(t,n));}buildUrl(){let e=this.namespaceId?.trim();return e?`${ht$1}?namespaceId=${encodeURIComponent(e)}`:ht$1}handleOpen(){this.reconnectAttempts=0,this.hasConnected&&this.reconnectedSubject.next(),this.hasConnected=true,this.connectionSubject.next(true);}handleEvent(e,t){let n=this.parse(t.data),s=typeof n=="object"&&n!==null?n:void 0,r={type:e,data:n,receivedAt:Date.now()};typeof s?.workflowId=="string"&&(r.workflowId=s.workflowId),typeof s?.namespaceId=="string"&&(r.namespaceId=s.namespaceId),typeof s?.revision=="number"&&(r.revision=s.revision),this.invalidationsSubject.next(r);}parse(e){if(typeof e!="string"||e.length===0)return e;try{return JSON.parse(e)}catch{return e}}handleError(){this.connectionSubject.next(false),this.closeSource(),this.scheduleReconnect();}scheduleReconnect(){if(this.disposed||this.reconnectTimer!==null)return;let e=Math.min(2e3*2**this.reconnectAttempts,on$1);this.reconnectAttempts+=1,this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.open();},e);}clearReconnect(){this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null);}closeSource(){this.source&&(this.source.onopen=null,this.source.onerror=null,this.source.close(),this.source=null);}static \u0275fac=function(t){return new(t||i)};static \u0275prov=S$2({token:i,factory:i.\u0275fac,providedIn:"root"})};var rn$1=new y("AGENTOS_BASE_URL",{providedIn:"root",factory:()=>""});function bt$2(i,e,t){let n=new URLSearchParams;return e&&n.set("ns",e),n.set("case",i),`${t}/agentos/home?${n.toString()}`}var St$2=class i{api=h(fb);agentOs=h(ke$2);sse=h(je$1);agentOsBaseUrl=h(rn$1);supervisorCaseStore=h(we);namespaces=Ye$3(new Map);runs=Ye$3([]);recentTasks=Ye$3([]);showDestroyed=Ye$3(false);answeringQuestionId=Ye$3(null);questionFeedback=Ye$3(null);sandboxes=nT(()=>this.runs());activeRuns=nT(()=>this.runs().filter(e=>e.status!=="destroyed"));destroyedRuns=nT(()=>this.runs().filter(e=>e.status==="destroyed"));visibleRuns=nT(()=>{let e=this.showDestroyed()?this.runs():this.activeRuns();return cn$1([...e])});workstreams=nT(()=>{let e=this.namespaces(),t=new Map;for(let n of this.visibleRuns()){let s=n.namespaceId?.trim()||Je,r=t.get(s)??[];r.push(n),t.set(s,r);}return [...t.entries()].map(([n,s])=>({namespaceId:n,title:n===Je?"Sans namespace":e.get(n)??n,runs:s})).sort((n,s)=>n.title.localeCompare(s.title))});costs=nT(()=>{let e=this.activeRuns(),t=e.reduce((s,r)=>s+(r.run?.costUsd??r.costUsd??0),0),n=e.reduce((s,r)=>s+(r.run?.unknownCostCount??0),0);return {active:e.length,workflowsUsd:t,totalUsd:t,unknownCostCount:n}});workflows=Ye$3([]);sessions=Ye$3(new Map);enrichment=new Map;subscriptions=new G$4;overviewRequest=null;overviewRefreshPending=false;detailRequest=null;detailRefreshPending=false;selectedWorkflowId=null;overviewEnrichmentRequests=new Map;overviewEnrichmentPending=new Set;constructor(){this.load(),this.subscriptions.add(this.sse.invalidations$.subscribe(e=>{this.load(),e.workflowId?this.queueOverviewEnrichment(e.workflowId):this.queueAllOverviewEnrichment(),(!e.workflowId||e.workflowId===this.selectedWorkflowId)&&this.refreshSelectedSession();})),this.subscriptions.add(this.sse.reconnected$.subscribe(()=>{this.load(),this.queueAllOverviewEnrichment(),this.refreshSelectedSession();})),this.sse.connect();}session(e){let t=this.sessions().get(e);return t||(e===Ye.id?Ye:void 0)}selectSession(e){let t=e.trim();if(!t){this.clearSessionSelection();return}if(t===this.selectedWorkflowId){this.queueDetailRefresh(t);return}this.selectedWorkflowId=t,this.cancelDetailRequest(),this.startDetailRequest(t);}clearSessionSelection(e){e&&e!==this.selectedWorkflowId||(this.selectedWorkflowId=null,this.cancelDetailRequest());}refresh(){this.load(),this.queueAllOverviewEnrichment(),this.refreshSelectedSession();}load(){if(this.overviewRequest){this.overviewRefreshPending=true;return}this.overviewRequest=this.loadOverview().pipe(gr(()=>{this.overviewRequest=null,this.overviewRefreshPending&&(this.overviewRefreshPending=false,this.load());})).subscribe();}loadOverview(){return wc({active:this.api.getWorkflows("active").pipe(ze$4(()=>Ce$3([]))),removed:this.api.getWorkflows("removed").pipe(ze$4(()=>Ce$3([]))),namespaces:this.api.getNamespaces()}).pipe(Ht$5(({active:e,removed:t,namespaces:n})=>{this.applyNamespaces(n),this.applyWorkflows(e,t);}),Ac(()=>Ce$3(void 0)))}applyNamespaces(e){let t=new Map;for(let n of AW(e))t.set(n.id,n.name);this.namespaces.set(t);}applyWorkflows(e,t){let n=Array.isArray(e)?e:[],s=Array.isArray(t)?t:[],r=[...n,...s],a=this.selectedWorkflowId,u=a?this.workflowSnapshot(a):void 0,d=a?r.find(c=>E(c)===a):void 0,p=u&&vt$2(u)>vt$2(d)?u:void 0,g=p?r.some(c=>E(c)===a)?r.map(c=>E(c)===a?p:c):[...r,p]:r,f=p?n.some(c=>E(c)===a)?n.map(c=>E(c)===a?p:c):s.some(c=>E(c)===a)?n:[...n,p]:n,m=p?s.map(c=>E(c)===a?p:c):s;this.workflows.set(g);let y=new Set(g.map(c=>E(c)).filter(c=>!!c));for(let c of [...this.enrichment.keys()])y.has(c)||this.enrichment.delete(c);for(let[c,h]of [...this.overviewEnrichmentRequests])y.has(c)||(this.overviewEnrichmentRequests.delete(c),this.overviewEnrichmentPending.delete(c),this.detailRequest===h&&(this.detailRequest=null),h.unsubscribe());let k=f.map(c=>pe$1(c)),b=m.map(c=>pe$1(c,"destroyed"));this.runs.set([...k,...b]);let S=new Map;for(let c of g){let h=E(c),w=h?this.enrichment.get(h):void 0,A=le$1(c,w?.timing,w?.evidence,w?.metrics,w?.interactions,w?.attempts,w?.actions,w?.agentQuestions);w?.agentQuestionsError&&(A.agentQuestionsError=w.agentQuestionsError),S.set(A.id,A);}this.sessions.set(S);for(let c of f){let h=E(c);!h||h===this.selectedWorkflowId||this.enrichment.has(h)||this.overviewEnrichmentRequests.has(h)||this.queueOverviewEnrichment(h);}this.selectedWorkflowId&&f.some(c=>E(c)===this.selectedWorkflowId)&&!this.enrichment.has(this.selectedWorkflowId)&&this.refreshSelectedSession();}workflowSnapshot(e){return this.workflows().find(t=>E(t)===e)}refreshSelectedSession(){this.selectedWorkflowId&&this.queueDetailRefresh(this.selectedWorkflowId);}queueDetailRefresh(e){if(e===this.selectedWorkflowId){if(this.detailRequest){this.detailRefreshPending=true;return}this.startDetailRequest(e);}}startDetailRequest(e){if(e!==this.selectedWorkflowId)return;let t=this.overviewEnrichmentRequests.get(e);if(t){this.detailRequest=t;return}let n=this.workflowSnapshot(e),s=null;s=(n?this.enrichSession(n):this.loadSelectedWorkflow(e)).pipe(gr(()=>{if(this.detailRequest===s&&(this.detailRequest=null,this.detailRefreshPending)){this.detailRefreshPending=false;let r=this.selectedWorkflowId;r===e&&this.startDetailRequest(r);}})).subscribe(),this.detailRequest=s;}cancelDetailRequest(){this.detailRefreshPending=false,this.detailRequest?.unsubscribe(),this.detailRequest=null;}refreshAfterAction(e){this.load(),e===this.selectedWorkflowId?this.queueDetailRefresh(e):this.queueOverviewEnrichment(e);}loadSelectedWorkflow(e){return this.api.getWorkflow(e).pipe(Ac(t=>{if(E(t)!==e)return Ce$3(void 0);let n=this.workflows();if(!n.some(s=>E(s)===e)){this.workflows.set([...n,t]),this.runs.update(r=>[...r,pe$1(t)]);let s=le$1(t);this.sessions.update(r=>new Map(r).set(s.id,s));}return this.enrichSession(t)}),ze$4(()=>Ce$3(void 0)))}enrichSession(e){let t=E(e);if(!t)return Ce$3(void 0);let n=de$1(e),s=()=>this.workflowSnapshot(t)??e,r=u=>{let d=M$1(M$1({},this.enrichment.get(t)??{}),u);this.enrichment.set(t,d);let p=s(),g=le$1(p,d.timing,d.evidence,d.metrics,d.interactions,d.attempts,d.actions,d.agentQuestions);d.agentQuestionsError&&(g.agentQuestionsError=d.agentQuestionsError),this.sessions.update(f=>{let m=new Map(f);return m.set(g.id,g),m}),this.updateRun(ze$1(p,g));},a=u=>u.pipe(ze$4(()=>Ce$3(void 0)));return wc({timing:a(this.api.getTiming(t,n)),evidence:a(this.api.getEvidence(t,n)),metrics:a(this.api.getMetrics(t,n)),interactions:a(this.api.getInteractions(t,n)),attempts:a(this.api.getAttempts(t,n)),actions:a(this.api.getActions(t,n)),agentQuestions:this.api.getAgentQuestions(t,n).pipe(ze$4(u=>(u.code==="AGENT_QUESTIONS_UNAVAILABLE"&&r({agentQuestions:[],agentQuestionsError:an$1(u,t,n)}),Ce$3(void 0))))}).pipe(Ht$5(u=>{let d=Object.fromEntries(Object.entries(u).filter(([,p])=>p!==void 0));r(d);}),Ac(()=>Ce$3(void 0)))}queueAllOverviewEnrichment(){for(let e of this.workflows()){let t=E(e);t&&this.queueOverviewEnrichment(t);}}queueOverviewEnrichment(e){if(e===this.selectedWorkflowId)return;if(this.overviewEnrichmentRequests.has(e)){this.overviewEnrichmentPending.add(e);return}let t=this.workflowSnapshot(e);if(!t||this.runs().find(s=>s.id===e)?.status==="destroyed")return;let n=null;n=this.enrichSession(t).pipe(gr(()=>{if(this.overviewEnrichmentRequests.get(e)!==n)return;this.overviewEnrichmentRequests.delete(e);let s=this.detailRequest===n;s&&(this.detailRequest=null);let r=this.overviewEnrichmentPending.delete(e);e===this.selectedWorkflowId?s&&(r||this.detailRefreshPending)&&(this.detailRefreshPending=false,this.startDetailRequest(e)):r&&this.queueOverviewEnrichment(e);})).subscribe(),this.overviewEnrichmentRequests.set(e,n);}namespaceFor(e){let t=this.workflows().find(n=>E(n)===e);return t?de$1(t):void 0}replyInteraction(e,t,n,s){let r=s??this.namespaceFor(e);this.api.replyInteraction(e,t,n,r).subscribe({next:()=>this.refreshAfterAction(e),error:()=>{}});}answerAgentQuestion(e,t,n){if(this.answeringQuestionId())return;this.answeringQuestionId.set(t.questionEventId),this.questionFeedback.set(null);let s=this.namespaceFor(e);this.api.answerAgentQuestion(e,t.questionEventId,{stepId:t.stepId,answer:n},s).subscribe({next:()=>{this.answeringQuestionId.set(null),this.refreshAfterAction(e);},error:r=>{this.answeringQuestionId.set(null);let a=r.status===409;this.questionFeedback.set({interactionId:t.questionEventId,kind:a?"conflict":"error",message:a?"The question has changed. The allowed state has been updated; please review your answer.":r.message}),a&&this.refreshAfterAction(e);}});}retry(e,t,n){let s=n??this.namespaceFor(e);this.api.openRetry(e,t,s).subscribe({next:()=>this.refreshAfterAction(e),error:()=>{}});}cancelAttempt(e,t,n,s){let r=s??this.namespaceFor(e);this.api.cancelAttempt(e,t,n,r).subscribe({next:()=>this.refreshAfterAction(e),error:()=>{}});}continueCost(e,t,n){let s=n??this.namespaceFor(e);this.api.continueCost(e,t,s).subscribe({next:()=>this.refreshAfterAction(e),error:()=>{}});}stopCost(e,t){let n=t??this.namespaceFor(e);this.api.stopCost(e,n).subscribe({next:()=>this.refreshAfterAction(e),error:()=>{}});}stop(e,t){let n=this.sessions().get(e),s=n?.activeAttemptId;if(!s)return;let r=n?.activeAttemptRevision,a={reason:"stop"};r!==void 0&&(a.expectedRevision=r),this.cancelAttempt(e,s,a,t);}remove(e,t){let n=t??this.namespaceFor(e);this.api.removeWorkflow(e,n).subscribe({next:()=>this.refreshAfterAction(e),error:()=>{}});}restore(e,t){let n=t??this.namespaceFor(e);this.api.restoreWorkflow(e,n).subscribe({next:()=>this.refreshAfterAction(e),error:()=>{}});}restoreSupervisorCase(e){let t=e.namespaceId,n=e.id;if(!t||!n)return;let s=this.supervisorCaseStore.load({workflowId:n,namespaceId:t});if(s)return {caseId:s.caseId,namespaceId:s.namespaceId,agentOsUrl:bt$2(s.caseId,s.namespaceId,this.agentOsBaseUrl)}}openSupervisorCase(e){let t=e.namespaceId,n=e.id,s=`Supervisor assistance \u2014 ${e.title}`,r=un$1(e.title,n,e.ticket,e.workflowType);return this.agentOs.createCase({namespaceId:t,title:s}).pipe(Ht$5(a=>{this.supervisorCaseStore.save({workflowId:n,namespaceId:t},{caseId:a.id,namespaceId:t,createdAt:new Date().toISOString()});}),Ac(a=>this.agentOs.addMessage(a.id,r).pipe(ze$4(()=>Ce$3(void 0)),Ac(()=>Ce$3({caseId:a.id,namespaceId:t,agentOsUrl:bt$2(a.id,t,this.agentOsBaseUrl)})))))}updateRun(e){this.runs.update(t=>t.map(n=>n.id===e.id?Q$1(M$1({},n),{status:n.status==="destroyed"?"destroyed":e.cardState==="failed"?"failed":e.cardState==="blocked"?"blocked":e.cardState==="waiting_human"?"waiting_human":e.cardState==="running"?"working":"idle",run:e,costUsd:e.costUsd,durationSec:e.durationSec,tokens:e.tokens,phases:e.phases}):n));}static \u0275fac=function(t){return new(t||i)};static \u0275prov=S$2({token:i,factory:i.\u0275fac,providedIn:"root"})};function vt$2(i){if(typeof i!="object"||i===null)return -1;let e=i.revision;return typeof e=="number"&&Number.isFinite(e)?e:-1}function an$1(i,e,t){let n=i.details,s=r=>{let a=n?.[r];return typeof a=="string"&&a.length>0?a:void 0};return {code:i.code,message:i.message,caseId:s("caseId"),namespaceId:s("namespaceId")??t,workflowId:s("workflowId")??e,stepId:s("stepId")}}function cn$1(i){return i.sort((e,t)=>{let n=e.createdAt?Date.parse(e.createdAt):null,s=t.createdAt?Date.parse(t.createdAt):null;return n===null&&s===null?0:n===null?1:s===null?-1:s-n})}function un$1(i,e,t,n){return [`@Heimdall Hello. I am opening this case from the Factory Cockpit for sandbox **${i}**.`,"","Available identifiers:",`- Workflow ID: \`${e}\``,...t?[`- Ticket: \`${t}\``]:[],...n?[`- Workflow type: \`${n}\``]:[],"","Could you check the state of this workflow and let me know what is happening?"].join(`
|
|
2633
2633
|
`)}var f="primary",ze=Symbol("RouteTitle"),Bt$1=class Bt{params;constructor(n){this.params=n||{};}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return []}get keys(){return Object.keys(this.params)}};function ie$1(t){return new Bt$1(t)}function zt(t,n,e){for(let r=0;r<t.length;r++){let i=t[r],o=n[r];if(i[0]===":")e[i.substring(1)]=o;else if(i!==o.path)return false}return true}function tn(t,n,e){let r=e.path.split("/"),i=r.indexOf("**");if(i===-1){if(r.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||r.length<t.length))return null;let s={},u=t.slice(0,r.length);return zt(r,u,s)?{consumed:u,posParams:s}:null}if(i!==r.lastIndexOf("**"))return null;let o=r.slice(0,i),a=r.slice(i+1);if(o.length+a.length>t.length||e.pathMatch==="full"&&n.hasChildren()&&e.path!=="**")return null;let c={};return !zt(o,t.slice(0,o.length),c)||!zt(a,t.slice(t.length-a.length),c)?null:{consumed:t,posParams:c}}function st(t){return new Promise((n,e)=>{t.pipe(Xb()).subscribe({next:r=>n(r),error:r=>e(r)});})}function Wn(t,n){if(t.length!==n.length)return false;for(let e=0;e<t.length;++e)if(!F(t[e],n[e]))return false;return true}function F(t,n){let e=t?Vt$1(t):void 0,r=n?Vt$1(n):void 0;if(!e||!r||e.length!=r.length)return false;let i;for(let o=0;o<e.length;o++)if(i=e[o],!rn(t[i],n[i]))return false;return true}function Vt$1(t){return [...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function rn(t,n){if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return false;let e=[...t].sort(),r=[...n].sort();return e.every((i,o)=>r[o]===i)}else return t===n}function Qn(t){return t.length>0?t[t.length-1]:null}function se(t){return jb(t)?t:Sa(t)?st$4(Promise.resolve(t)):Ce$3(t)}function nn(t){return jb(t)?st(t):Promise.resolve(t)}var Kn={exact:an,subset:sn},on={exact:Yn,subset:Zn,ignored:()=>true},or={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},_e={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};function ar(t,n,e){let r=t instanceof I?t:n.parseUrl(t);return nT(()=>Gt$1(n.lastSuccessfulNavigation()?.finalUrl??new I,r,M$1(M$1({},_e),e)))}function Gt$1(t,n,e){return Kn[e.paths](t.root,n.root,e.matrixParams)&&on[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function Yn(t,n){return F(t,n)}function an(t,n,e){if(!ne$1(t.segments,n.segments)||!it(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return false;for(let r in n.children)if(!t.children[r]||!an(t.children[r],n.children[r],e))return false;return true}function Zn(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>rn(t[e],n[e]))}function sn(t,n,e){return cn(t,n,n.segments,e)}function cn(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return !(!ne$1(i,e)||n.hasChildren()||!it(i,e,r))}else if(t.segments.length===e.length){if(!ne$1(t.segments,e)||!it(t.segments,e,r))return false;for(let i in n.children)if(!t.children[i]||!sn(t.children[i],n.children[i],r))return false;return true}else {let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return !ne$1(t.segments,i)||!it(t.segments,i,r)||!t.children[f]?false:cn(t.children[f],n,o,r)}}function it(t,n,e){return n.every((r,i)=>on[e](t[i].parameters,r.parameters))}var I=class{root;queryParams;fragment;_queryParamMap;constructor(n=new m([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r;}get queryParamMap(){return this._queryParamMap??=ie$1(this.queryParams),this._queryParamMap}toString(){return ei.serialize(this)}},m=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(r=>r.parent=this);}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return ot(this)}},K=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e;}get parameterMap(){return this._parameterMap??=ie$1(this.parameters),this._parameterMap}toString(){return ln(this)}};function Jn(t,n){return ne$1(t,n)&&t.every((e,r)=>F(e.parameters,n[r].parameters))}function ne$1(t,n){return t.length!==n.length?false:t.every((e,r)=>e.path===n[r].path)}function Xn(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===f&&(e=e.concat(n(i,r)));}),Object.entries(t.children).forEach(([r,i])=>{r!==f&&(e=e.concat(n(i,r)));}),e}var ye$1=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=F$2({token:t,factory:()=>new Y})}return t})(),Y=class{parse(n){let e=new Qt$1(n);return new I(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${Ee(n.root,true)}`,r=ni(n.queryParams),i=typeof n.fragment=="string"?`#${ti(n.fragment)}`:"";return `${e}${r}${i}`}},ei=new Y;function ot(t){return t.segments.map(n=>ln(n)).join("/")}function Ee(t,n){if(!t.hasChildren())return ot(t);if(n){let e=t.children[f]?Ee(t.children[f],false):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==f&&r.push(`${i}:${Ee(o,false)}`);}),r.length>0?`${e}(${r.join("//")})`:e}else {let e=Xn(t,(r,i)=>i===f?[Ee(t.children[f],false)]:[`${i}:${Ee(r,false)}`]);return Object.keys(t.children).length===1&&t.children[f]!=null?`${ot(t)}/${e[0]}`:`${ot(t)}/(${e.join("//")})`}}function un(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function rt(t){return un(t).replace(/%3B/gi,";")}function ti(t){return encodeURI(t)}function Wt(t){return un(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function at(t){return decodeURIComponent(t)}function Qr(t){return at(t.replace(/\+/g,"%20"))}function ln(t){return `${Wt(t.path)}${ri(t.parameters)}`}function ri(t){return Object.entries(t).map(([n,e])=>`;${Wt(n)}=${Wt(e)}`).join("")}function ni(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${rt(e)}=${rt(i)}`).join("&"):`${rt(e)}=${rt(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var ii=/^[^\/()?;#]+/;function Ht$1(t){let n=t.match(ii);return n?n[0]:""}var oi=/^[^\/()?;=#]+/;function ai(t){let n=t.match(oi);return n?n[0]:""}var si=/^[^=?&#]+/;function ci(t){let n=t.match(si);return n?n[0]:""}var ui=/^[^&#]+/;function li(t){let n=t.match(ui);return n?n[0]:""}var Qt$1=class Qt{url;remaining;constructor(n){this.url=n,this.remaining=n;}parseRootSegment(){for(;this.consumeOptional("/"););return this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new m([],{}):new m([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(n=0){if(n>50)throw new g$1(4010,false);if(this.remaining==="")return {};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let r={};this.peekStartsWith("/(")&&(this.capture("/"),r=this.parseParens(true,n));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(false,n)),(e.length>0||Object.keys(r).length>0)&&(i[f]=new m(e,r)),i}parseSegment(){let n=Ht$1(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new g$1(4009,false);return this.capture(n),new K(at(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=ai(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=Ht$1(this.remaining);i&&(r=i,this.capture(r));}n[at(e)]=at(r);}parseQueryParam(n){let e=ci(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let a=li(this.remaining);a&&(r=a,this.capture(r));}let i=Qr(e),o=Qr(r);if(Object.hasOwn(n,i)){let a=n[i];Array.isArray(a)||(a=[a],n[i]=a),a.push(o);}else n[i]=o;}parseParens(n,e){let r=Object.create(null);for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=Ht$1(this.remaining),o=this.remaining[i.length];if(o!=="/"&&o!==")"&&o!==";")throw new g$1(4010,false);let a;i.indexOf(":")>-1?(a=i.slice(0,i.indexOf(":")),this.capture(a),this.capture(":")):n&&(a=f);let c=this.parseChildren(e+1);r[a??f]=Object.keys(c).length===1&&c[f]?c[f]:new m([],c),this.consumeOptional("//");}return r}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),true):false}capture(n){if(!this.consumeOptional(n))throw new g$1(4011,false)}};function hn(t){return t.segments.length>0?new m([],{[f]:t}):t}function dn(t){let n=Object.create(null);for(let[r,i]of Object.entries(t.children)){let o=dn(i);if(r===f&&o.segments.length===0&&o.hasChildren())for(let[a,c]of Object.entries(o.children))n[a]=c;else (o.segments.length>0||o.hasChildren())&&(n[r]=o);}let e=new m(t.segments,n);return hi(e)}function hi(t){if(t.numberOfChildren===1&&t.children[f]){let n=t.children[f];return new m(t.segments.concat(n.segments),n.children)}return t}function Z(t){return t instanceof I}function fn(t,n,e=null,r=null,i=new Y){let o=pn(t);return gn(o,n,e,r,i)}function pn(t){let n;function e(o){let a={};for(let s of o.children){let u=e(s);a[s.outlet]=u;}let c=new m(o.url,a);return o===t&&(n=c),c}let r=e(t.root),i=hn(r);return n??i}function gn(t,n,e,r,i){let o=t;for(;o.parent;)o=o.parent;if(n.length===0)return Ft(o,o,o,e,r,i);let a=di(n);if(a.toRoot())return Ft(o,o,new m([],{}),e,r,i);let c=fi(a,o,t),s=c.processChildren?Ne(c.segmentGroup,c.index,a.commands):mn(c.segmentGroup,c.index,a.commands);return Ft(o,c.segmentGroup,s,e,r,i)}function ct(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function Ue(t){return typeof t=="object"&&t!=null&&t.outlets}function Kr(t,n,e){t||="\u0275";let r=new I;return r.queryParams={[t]:n},e.parse(e.serialize(r)).queryParams[t]}function Ft(t,n,e,r,i,o){let a={};for(let[u,h]of Object.entries(r??{}))a[u]=Array.isArray(h)?h.map(v=>Kr(u,v,o)):Kr(u,h,o);let c;t===n?c=e:c=vn(t,n,e);let s=hn(dn(c));return new I(s,a,i)}function vn(t,n,e){let r=Object.create(null);return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=vn(o,n,e);}),new m(t.segments,r)}var ut=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&ct(r[0]))throw new g$1(4003,false);let i=r.find(Ue);if(i&&i!==Qn(r))throw new g$1(4004,false)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function di(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new ut(true,0,t);let n=0,e=false,r=t.reduce((i,o,a)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let c={};return Object.entries(o.outlets).forEach(([s,u])=>{c[s]=typeof u=="string"?u.split("/"):u;}),[...i,{outlets:c}]}if(o.segmentPath)return [...i,o.segmentPath]}return typeof o!="string"?[...i,o]:a===0?(o.split("/").forEach((c,s)=>{s==0&&c==="."||(s==0&&c===""?e=true:c===".."?n++:c!=""&&i.push(c));}),i):[...i,o]},[]);return new ut(e,n,r)}var he=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r;}};function fi(t,n,e){if(t.isAbsolute)return new he(n,true,0);if(!e)return new he(n,false,NaN);if(e.parent===null)return new he(e,true,0);let r=ct(t.commands[0])?0:1,i=e.segments.length-1+r;return pi(e,i,t.numberOfDoubleDots)}function pi(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new g$1(4005,false);i=r.segments.length;}return new he(r,false,i-o)}function gi(t){return Ue(t[0])?t[0].outlets:{[f]:t}}function mn(t,n,e){if(t??=new m([],{}),t.segments.length===0&&t.hasChildren())return Ne(t,n,e);let r=vi(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new m(t.segments.slice(0,r.pathIndex),{});return o.children[f]=new m(t.segments.slice(r.pathIndex),t.children),Ne(o,0,i)}else return r.match&&i.length===0?new m(t.segments,{}):r.match&&!t.hasChildren()?Kt$1(t,n,e):r.match?Ne(t,0,i):Kt$1(t,n,e)}function Ne(t,n,e){if(e.length===0)return new m(t.segments,{});{let r=gi(e),i=Object.create(null);if(Object.keys(r).some(o=>o!==f)&&t.children[f]&&t.numberOfChildren===1&&t.children[f].segments.length===0){let o=Ne(t.children[f],n,e);return new m(t.segments,o.children)}return Object.entries(r).forEach(([o,a])=>{typeof a=="string"&&(a=[a]),a!==null&&(i[o]=mn(t.children[o],n,a));}),Object.entries(t.children).forEach(([o,a])=>{r[o]===void 0&&(i[o]=a);}),new m(t.segments,i)}}function vi(t,n,e){let r=0,i=n,o={match:false,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(r>=e.length)return o;let a=t.segments[i],c=e[r];if(Ue(c))break;let s=`${c}`,u=r<e.length-1?e[r+1]:null;if(i>0&&s===void 0)break;if(s&&u&&typeof u=="object"&&u.outlets===void 0){if(!Zr(s,u,a))return o;r+=2;}else {if(!Zr(s,{},a))return o;r++;}i++;}return {match:true,pathIndex:i,commandIndex:r}}function Kt$1(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if(Ue(o)){let s=mi(o.outlets);return new m(r,s)}if(i===0&&ct(e[0])){let s=t.segments[n];r.push(new K(s.path,Yr(e[0]))),i++;continue}let a=Ue(o)?o.outlets[f]:`${o}`,c=i<e.length-1?e[i+1]:null;a&&c&&ct(c)?(r.push(new K(a,Yr(c))),i+=2):(r.push(new K(a,{})),i++);}return new m(r,{})}function mi(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=Kt$1(new m([],{}),0,r));}),n}function Yr(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function Zr(t,n,e){return t==e.path&&F(n,e.parameters)}var Me="imperative",S=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(S||{}),_=class{id;url;constructor(n,e){this.id=n,this.url=e;}},oe=class extends _{type=S.NavigationStart;navigationTrigger;restoredState;constructor(n,e,r="imperative",i=null){super(n,e),this.navigationTrigger=r,this.restoredState=i;}toString(){return `NavigationStart(id: ${this.id}, url: '${this.url}')`}},z=class extends _{urlAfterRedirects;type=S.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r;}toString(){return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},w=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(w||{}),Oe=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(Oe||{}),x=class extends _{reason;code;type=S.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i;}toString(){return `NavigationCancel(id: ${this.id}, url: '${this.url}')`}};function yn(t){return t instanceof x&&(t.code===w.Redirect||t.code===w.SupersededByNewNavigation)}var V=class extends _{reason;code;type=S.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i;}},ae=class extends _{error;target;type=S.NavigationError;constructor(n,e,r,i){super(n,e),this.error=r,this.target=i;}toString(){return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},Pe=class extends _{urlAfterRedirects;state;type=S.RoutesRecognized;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i;}toString(){return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},lt=class extends _{urlAfterRedirects;state;type=S.GuardsCheckStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i;}toString(){return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ht=class extends _{urlAfterRedirects;state;shouldActivate;type=S.GuardsCheckEnd;constructor(n,e,r,i,o){super(n,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o;}toString(){return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},dt=class extends _{urlAfterRedirects;state;type=S.ResolveStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i;}toString(){return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ft=class extends _{urlAfterRedirects;state;type=S.ResolveEnd;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i;}toString(){return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},pt=class{route;type=S.RouteConfigLoadStart;constructor(n){this.route=n;}toString(){return `RouteConfigLoadStart(path: ${this.route.path})`}},gt=class{route;type=S.RouteConfigLoadEnd;constructor(n){this.route=n;}toString(){return `RouteConfigLoadEnd(path: ${this.route.path})`}},vt$1=class vt{snapshot;type=S.ChildActivationStart;constructor(n){this.snapshot=n;}toString(){return `ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},mt=class{snapshot;type=S.ChildActivationEnd;constructor(n){this.snapshot=n;}toString(){return `ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},yt$1=class yt{snapshot;type=S.ActivationStart;constructor(n){this.snapshot=n;}toString(){return `ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Rt$1=class Rt{snapshot;type=S.ActivationEnd;constructor(n){this.snapshot=n;}toString(){return `ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var fe=class{},Le=class{},pe=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e;}};function yi(t){return !(t instanceof fe)&&!(t instanceof pe)&&!(t instanceof Le)}var St$1=class St{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return this.route?.snapshot._environmentInjector??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new Re(this.rootInjector);}},Re=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e;}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i);}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null);}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e;}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new St$1(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(I$2(ae$2))};static \u0275prov=S$2({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ct$1=class Ct{_root;constructor(n){this._root=n;}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=Yt(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=Yt(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=Zt(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return Zt(n,this._root).map(e=>e.value)}};function Yt(t,n){if(t===n.value)return n;for(let e of n.children){let r=Yt(t,e);if(r)return r}return null}function Zt(t,n){if(t===n.value)return [n];for(let e of n.children){let r=Zt(t,e);if(r.length)return r.unshift(n),r}return []}var D=class{value;children;constructor(n,e){this.value=n,this.children=e;}toString(){return `TreeNode(${this.value})`}};function le(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var je=class extends Ct$1{snapshot;constructor(n,e){super(n),this.snapshot=e,cr(this,n);}toString(){return this.snapshot.toString()}};function Rn(t,n){let e=Ri(t,n),r=new En$1([new K("",{})]),i=new En$1({}),o=new En$1({}),a=new En$1({}),c=new En$1(""),s=new G$1(r,i,a,c,o,f,t,e.root);return s.snapshot=e.root,new je(new D(s,[]),e)}function Ri(t,n){let e={},r={},i={},a=new ge([],e,i,"",r,f,t,null,{},n);return new xe$1("",new D(a,[]))}var G$1=class G{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;_localInjector;constructor(n,e,r,i,o,a,c,s){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=a,this.component=c,this._futureSnapshot=s,this.title=this.dataSubject?.pipe(O$2(u=>u[ze]))??Ce$3(void 0),this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o;}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(O$2(n=>ie$1(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(O$2(n=>ie$1(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}},Si="always";function sr(t,n,e){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:M$1(M$1({},n.params),t.params),data:M$1(M$1({},n.data),t.data),resolve:M$1(M$1(M$1(M$1({},t.data),n.data),i?.data),t._resolvedData)}:r={params:M$1({},t.params),data:M$1({},t.data),resolve:M$1(M$1({},t.data),t._resolvedData??{})},i&&Cn(i)&&(r.resolve[ze]=i.title),r}var ge=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;_environmentInjector;get title(){return this.data?.[ze]}constructor(n,e,r,i,o,a,c,s,u,h){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=a,this.component=c,this.routeConfig=s,this._resolve=u,this._environmentInjector=h;}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=ie$1(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=ie$1(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return `Route(url:'${n}', path:'${e}')`}},xe$1=class xe extends Ct$1{url;constructor(n,e){super(e),this.url=n,cr(this,e);}toString(){return Sn(this._root)}};function cr(t,n){n.value._routerState=t,n.children.forEach(e=>cr(t,e));}function Sn(t){let n=t.children.length>0?` { ${t.children.map(Sn).join(", ")} } `:"";return `${t.value}${n}`}function qt$1(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,F(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),F(n.params,e.params)||t.paramsSubject.next(e.params),Wn(n.url,e.url)||t.urlSubject.next(e.url),F(n.data,e.data)||t.dataSubject.next(e.data);}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data);}function Jt$1(t,n){let e=F(t.params,n.params)&&Jn(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||Jt$1(t.parent,n.parent))}function Cn(t){return typeof t.title=="string"||t.title===null}var wn=new y(""),ur=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=f;activateEvents=new ke$5;deactivateEvents=new ke$5;attachEvents=new ke$5;detachEvents=new ke$5;routerOutletData=xy();parentContexts=h(Re);location=h(Gr);changeDetector=h(Ny);inputBinder=h(He,{optional:true});supportsBindingToComponentInputs=true;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName();}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this);}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName();}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector));}get isActivated(){return !!this.activated}get component(){if(!this.activated)throw new g$1(4012,false);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new g$1(4012,false);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new g$1(4012,false);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance);}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e);}}activateWith(e,r){if(this.isActivated)throw new g$1(4013,false);this._activatedRoute=e;let i=this.location,a=e.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,s=new Xt$1(e,c,i.injector,this.routerOutletData);this.activated=i.createComponent(a,{index:i.length,injector:s,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance);}static \u0275fac=function(r){return new(r||t)};static \u0275dir=tt$1({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[ha]})}return t})(),Xt$1=class Xt{route;childContexts;parent;outletData;constructor(n,e,r,i){this.route=n,this.childContexts=e,this.parent=r,this.outletData=i;}get(n,e){return n===G$1?this.route:n===Re?this.childContexts:n===wn?this.outletData:this.parent.get(n,e)}},He=new y(""),bn=(()=>{class t{options;outletDataSubscriptions=new Map;outletSeenKeys=new Map;constructor(e){this.options=e,this.options.queryParams??=true;}bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e);}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e),this.outletSeenKeys.delete(e);}subscribeToRouteData(e){let{activatedRoute:r}=e,i=Ic([this.options.queryParams?r.queryParams:Ce$3({}),r.params,r.data]).pipe(Ac(([o,a,c],s)=>(c=M$1(M$1(M$1({},o),a),c),s===0?Ce$3(c):Promise.resolve(c)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(e);return}let a=eH(r.component);if(!a){this.unsubscribeFromRouteData(e);return}let c=this.outletSeenKeys.get(e);c||(c=new Set,this.outletSeenKeys.set(e,c));for(let u of Object.keys(o))c.add(u);let s=this.options.unmatchedInputBehavior??"alwaysUndefined";for(let{templateName:u}of a.inputs){let h=o[u];(h!==void 0||s==="alwaysUndefined"||c.has(u))&&e.activatedComponentRef.setInput(u,h);}});this.outletDataSubscriptions.set(e,i);}static \u0275fac=function(r){UI();};static \u0275prov=S$2({token:t,factory:t.\u0275fac})}return t})(),lr=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Ae$2({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&zg(0,"router-outlet");},dependencies:[ur],encapsulation:2,changeDetection:1})}return t})();function hr(t){let n=t.children&&t.children.map(hr),e=n?Q$1(M$1({},t),{children:n}):M$1({},t);return !e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==f&&(e.component=lr),e}function Ci(t,n,e){let r=new Set,i=ke$1(t,n._root,e?e._root:void 0,r);return {newlyCreatedRoutes:r,state:new je(i,n)}}function ke$1(t,n,e,r){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let i=e.value;i._futureSnapshot=n.value;let o=wi(t,n,e,r);return new D(i,o)}else {if(t.shouldAttach(n.value)){let a=t.retrieve(n.value);if(a!==null){let c=a.route;return c.value._futureSnapshot=n.value,c.children=n.children.map(s=>ke$1(t,s,void 0,r)),c}}let i=bi(n.value);r.add(i);let o=n.children.map(a=>ke$1(t,a,void 0,r));return new D(i,o)}}function wi(t,n,e,r){return n.children.map(i=>{for(let o of e.children)if(t.shouldReuseRoute(i.value,o.value.snapshot))return ke$1(t,i,o,r);return ke$1(t,i,void 0,r)})}function bi(t){return new G$1(new En$1(t.url),new En$1(t.params),new En$1(t.queryParams),new En$1(t.fragment),new En$1(t.data),t.outlet,t.component,t)}var ve$1=class ve{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e;}},In="ngNavigationCancelingError";function wt$1(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=Z(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=An(false,w.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function An(t,n){let e=new Error(`NavigationCancelingError: ${""}`);return e[In]=true,e.cancellationCode=n,e}function Ii(t){return En(t)&&Z(t.url)}function En(t){return !!t&&t[In]}var er=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,r,i,o){this.routeReuseStrategy=n,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o;}activate(n){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,n),qt$1(this.futureState.root),this.activateChildRoutes(e,r,n);}deactivateChildRoutes(n,e,r){let i=le(e);n.children.forEach(o=>{let a=o.value.outlet;this.deactivateRoutes(o,i[a],r),delete i[a];}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r);});}deactivateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(i===o)if(i.component){let a=r.getContext(i.outlet);a&&this.deactivateChildRoutes(n,e,a.children);}else this.deactivateChildRoutes(n,e,r);else o&&this.deactivateRouteAndItsChildren(e,r);}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e);}detachAndStoreRouteSubtree(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=le(n);for(let a of Object.values(o))this.deactivateRouteAndItsChildren(a,i);if(r&&r.outlet){let a=r.outlet.detach(),c=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:a,route:n,contexts:c});}}deactivateRouteAndOutlet(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=le(n);for(let a of Object.values(o))this.deactivateRouteAndItsChildren(a,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null),n.value._localInjector?.destroy();}activateChildRoutes(n,e,r){let i=le(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new Rt$1(o.value.snapshot));}),n.children.length&&this.forwardEvent(new mt(n.value.snapshot));}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(qt$1(i),i===o)if(i.component){let a=r.getOrCreateContext(i.outlet);this.activateChildRoutes(n,e,a.children);}else this.activateChildRoutes(n,e,r);else if(i.component){let a=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let c=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),a.children.onOutletReAttached(c.contexts),a.attachRef=c.componentRef,a.route=c.route.value,a.outlet&&a.outlet.attach(c.componentRef,c.route.value),qt$1(c.route.value),this.activateChildRoutes(n,null,a.children);}else a.attachRef=null,a.route=i,a.outlet&&a.outlet.activateWith(i,a.injector),this.activateChildRoutes(n,null,a.children);}else this.activateChildRoutes(n,null,r);}},bt$1=class bt{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1];}},de=class{component;route;constructor(n,e){this.component=n,this.route=e;}};function Ai(t,n,e){let r=t._root,i=n?n._root:null;return Te(r,i,e,[r.value])}function Ei(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return !n||n.length===0?null:{node:t,guards:n}}function Se(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!fD(t)?t:n.get(t):r}function Te(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=le(n);return t.children.forEach(a=>{Ti(a,o[a.value.outlet],e,r.concat([a.value]),i),delete o[a.value.outlet];}),Object.entries(o).forEach(([a,c])=>De(c,e.getContext(a),i)),i}function Ti(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,a=n?n.value:null,c=e?e.getContext(t.value.outlet):null;if(a&&o.routeConfig===a.routeConfig){let s=Ni(a,o,o.routeConfig.runGuardsAndResolvers);s?i.canActivateChecks.push(new bt$1(r)):(o.data=a.data,o._resolvedData=a._resolvedData),o.component?Te(t,n,c?c.children:null,r,i):Te(t,n,e,r,i),s&&c&&c.outlet&&c.outlet.isActivated&&i.canDeactivateChecks.push(new de(c.outlet.component,a));}else a&&De(n,c,i),i.canActivateChecks.push(new bt$1(r)),o.component?Te(t,null,c?c.children:null,r,i):Te(t,null,e,r,i);return i}function Ni(t,n,e){if(typeof e=="function")return Mr(n._environmentInjector,()=>e(t,n));switch(e){case "pathParamsChange":return !ne$1(t.url,n.url);case "pathParamsOrQueryParamsChange":return !ne$1(t.url,n.url)||!F(t.queryParams,n.queryParams);case "always":return true;case "paramsOrQueryParamsChange":return !Jt$1(t,n)||!F(t.queryParams,n.queryParams);default:return !Jt$1(t,n)}}function De(t,n,e){let r=le(t),i=t.value;Object.entries(r).forEach(([o,a])=>{i.component?n?De(a,n.children.getContext(o),e):De(a,null,e):De(a,n,e);}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new de(n.outlet.component,i)):e.canDeactivateChecks.push(new de(null,i)):e.canDeactivateChecks.push(new de(null,i));}function Fe(t){return typeof t=="function"}function Mi(t){return typeof t=="boolean"}function Di(t){return t&&Fe(t.canLoad)}function _i(t){return t&&Fe(t.canActivate)}function Ui(t){return t&&Fe(t.canActivateChild)}function Oi(t){return t&&Fe(t.canDeactivate)}function Pi(t){return t&&Fe(t.canMatch)}function Tn(t){return t instanceof lo$1||t?.name==="EmptyError"}var nt=Symbol("INITIAL_VALUE");function me(){return Ac(t=>Ic(t.map(n=>n.pipe(at$4(1),xc(nt)))).pipe(O$2(n=>{for(let e of n)if(e!==true){if(e===nt)return nt;if(e===false||Li(e))return e}return true}),wt$5(n=>n!==nt),at$4(1)))}function Li(t){return Z(t)||t instanceof ve$1}function Nn(t){return t.aborted?Ce$3(void 0).pipe(at$4(1)):new R$1(n=>{let e=()=>{n.next(),n.complete();};return t.addEventListener("abort",e),()=>t.removeEventListener("abort",e)})}function Mn(t){return yr(Nn(t))}function ji(t){return It$5(n=>{let{targetSnapshot:e,currentSnapshot:r,guards:{canActivateChecks:i,canDeactivateChecks:o}}=n;return o.length===0&&i.length===0?Ce$3(Q$1(M$1({},n),{guardsResult:true})):xi(o,e,r).pipe(It$5(a=>a&&Mi(a)?ki(e,i,t):Ce$3(a)),O$2(a=>Q$1(M$1({},n),{guardsResult:a})))})}function xi(t,n,e){return st$4(t).pipe(It$5(r=>qi(r.component,r.route,e,n)),Xb(r=>r!==true,true))}function ki(t,n,e){return st$4(n).pipe(Cc(r=>Wt$4(zi(r.route.parent,e),$i(r.route,e),Fi(t,r.path),Hi(t,r.route))),Xb(r=>r!==true,true))}function $i(t,n){return t!==null&&n&&n(new yt$1(t)),Ce$3(true)}function zi(t,n){return t!==null&&n&&n(new vt$1(t)),Ce$3(true)}function Hi(t,n){let e=n.routeConfig?n.routeConfig.canActivate:null;if(!e||e.length===0)return Ce$3(true);let r=e.map(i=>qb(()=>{let o=n._environmentInjector,a=Se(i,o),c=_i(a)?a.canActivate(n,t):Mr(o,()=>a(n,t));return se(c).pipe(Xb())}));return Ce$3(r).pipe(me())}function Fi(t,n){let e=n[n.length-1],i=n.slice(0,n.length-1).reverse().map(o=>Ei(o)).filter(o=>o!==null).map(o=>qb(()=>{let a=o.guards.map(c=>{let s=o.node._environmentInjector,u=Se(c,s),h=Ui(u)?u.canActivateChild(e,t):Mr(s,()=>u(e,t));return se(h).pipe(Xb())});return Ce$3(a).pipe(me())}));return Ce$3(i).pipe(me())}function qi(t,n,e,r){let i=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!i||i.length===0)return Ce$3(true);let o=i.map(a=>{let c=n._environmentInjector,s=Se(a,c),u=Oi(s)?s.canDeactivate(t,n,e,r):Mr(c,()=>s(t,n,e,r));return se(u).pipe(Xb())});return Ce$3(o).pipe(me())}function Bi(t,n,e,r,i){let o=n.canLoad;if(o===void 0||o.length===0)return Ce$3(true);let a=o.map(c=>{let s=Se(c,t),u=Di(s)?s.canLoad(n,e):Mr(t,()=>s(n,e)),h=se(u);return i?h.pipe(Mn(i)):h});return Ce$3(a).pipe(me(),Dn(r))}function Dn(t){return Ib(Ht$5(n=>{if(typeof n!="boolean")throw wt$1(t,n)}),O$2(n=>n===true))}function Vi(t,n,e,r,i,o){let a=n.canMatch;if(!a||a.length===0)return Ce$3(true);let c=a.map(s=>{let u=Se(s,t),h=Pi(u)?u.canMatch(n,e,i):Mr(t,()=>u(n,e,i));return se(h).pipe(Mn(o))});return Ce$3(c).pipe(me(),Dn(r))}var B=class t extends Error{segmentGroup;constructor(n){super(),this.segmentGroup=n||null,Object.setPrototypeOf(this,t.prototype);}},$e=class t extends Error{urlTree;constructor(n){super(),this.urlTree=n,Object.setPrototypeOf(this,t.prototype);}};function Gi(t){throw new g$1(4e3,false)}function Wi(t){throw An(false,w.GuardRejected)}var tr=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e;}async lineralizeSegments(n,e){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return r;if(i.numberOfChildren>1||!i.children[f])throw Gi(`${n.redirectTo}`);i=i.children[f];}}async applyRedirectCommands(n,e,r,i,o){let a=await Qi(e,i,o);if(a instanceof I)throw new $e(a);let c=this.applyRedirectCreateUrlTree(a,this.urlSerializer.parse(a),n,r);if(a[0]==="/")throw new $e(c);return c}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new I(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let r={};return Object.entries(n).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let c=o.substring(1);r[i]=e[c];}else r[i]=o;}),r}createSegmentGroup(n,e,r,i){let o=this.createSegments(n,e.segments,r,i),a=Object.create(null);return Object.entries(e.children).forEach(([c,s])=>{a[c]=this.createSegmentGroup(n,s,r,i);}),new m(o,a)}createSegments(n,e,r,i){return e.map(o=>o.path[0]===":"?this.findPosParam(n,o,i):this.findOrReturn(o,r))}findPosParam(n,e,r){let i=r[e.path.substring(1)];if(!i)throw new g$1(4001,false);return i}findOrReturn(n,e){let r=0;for(let i of e){if(i.path===n.path)return e.splice(r),i;r++;}return n}};function Qi(t,n,e){if(typeof t=="string")return Promise.resolve(t);let r=t;return st(se(Mr(e,()=>r(n))))}function Ki(t,n){return t.providers&&!t._injector&&(t._injector=kg(t.providers,n,`Route: ${t.path}`)),t._injector??n}function $(t){return t.outlet||f}function Yi(t,n){let e=t.filter(r=>$(r)===n);return e.push(...t.filter(r=>$(r)!==n)),e}var rr={matched:false,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function _n(t){return {routeConfig:t.routeConfig,url:t.url,params:t.params,queryParams:t.queryParams,fragment:t.fragment,data:t.data,outlet:t.outlet,title:t.title,paramMap:t.paramMap,queryParamMap:t.queryParamMap}}function Zi(t,n,e,r,i,o,a){let c=Un(t,n,e);if(!c.matched)return Ce$3(c);let s=_n(o(c));return r=Ki(n,r),Vi(r,n,e,i,s,a).pipe(O$2(u=>u===true?c:M$1({},rr)))}function Un(t,n,e){if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?M$1({},rr):{matched:true,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||tn)(e,t,n);if(!i)return M$1({},rr);let o={};Object.entries(i.posParams??{}).forEach(([c,s])=>{o[c]=s.path;});let a=i.consumed.length>0?M$1(M$1({},o),i.consumed[i.consumed.length-1].parameters):o;return {matched:true,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:a,positionalParamSegments:i.posParams??{}}}function Jr(t,n,e,r,i){return e.length>0&&eo(t,e,r,i)?{segmentGroup:new m(n,Xi(r,new m(e,t.children))),slicedSegments:[]}:e.length===0&&to(t,e,r)?{segmentGroup:new m(t.segments,Ji(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new m(t.segments,t.children),slicedSegments:e}}function Ji(t,n,e,r){let i={};for(let o of e)if(At$1(t,n,o)&&!r[$(o)]){let a=new m([],{});i[$(o)]=a;}return M$1(M$1({},r),i)}function Xi(t,n){let e={};e[f]=n;for(let r of t)if(r.path===""&&$(r)!==f){let i=new m([],{});e[$(r)]=i;}return e}function eo(t,n,e,r){return e.some(i=>!At$1(t,n,i)||!($(i)!==f)?false:!(r!==void 0&&$(i)===r))}function to(t,n,e){return e.some(r=>At$1(t,n,r))}function At$1(t,n,e){return (t.hasChildren()||n.length>0)&&e.pathMatch==="full"?false:e.path===""}function ro(t,n,e){return n.length===0&&!t.children[e]}var nr=class{};async function no(t,n,e,r,i,o,a,c){return new ir(t,n,e,r,i,a,o,c).recognize()}var io=31,ir=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=true;constructor(n,e,r,i,o,a,c,s){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=a,this.urlSerializer=c,this.abortSignal=s,this.applyRedirects=new tr(this.urlSerializer,this.urlTree);}noMatchError(n){return new g$1(4002,`'${n.segmentGroup}'`)}async recognize(){let n=Jr(this.urlTree.root,[],[],this.config).segmentGroup,{children:e,rootSnapshot:r}=await this.match(n),i=new D(r,e),o=new xe$1("",i),a=fn(r,[],this.urlTree.queryParams,this.urlTree.fragment);return a.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(a),{state:o,tree:a}}async match(n){let e=new ge([],Object.freeze({}),Object.freeze(M$1({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),f,this.rootComponentType,null,{},this.injector);try{return {children:await this.processSegmentGroup(this.injector,this.config,n,f,e),rootSnapshot:e}}catch(r){if(r instanceof $e)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof B?this.noMatchError(r):r}}async processSegmentGroup(n,e,r,i,o){if(r.segments.length===0&&r.hasChildren())return this.processChildren(n,e,r,o);let a=await this.processSegment(n,e,r,r.segments,i,true,o);return a instanceof D?[a]:[]}async processChildren(n,e,r,i){let o=[];for(let s of Object.keys(r.children))s==="primary"?o.unshift(s):o.push(s);let a=[];for(let s of o){let u=r.children[s],h=Yi(e,s),v=await this.processSegmentGroup(n,h,u,s,i);a.push(...v);}let c=On(a);return oo(c),c}async processSegment(n,e,r,i,o,a,c){for(let s of e)try{return await this.processSegmentAgainstRoute(s._injector??n,e,s,r,i,o,a,c)}catch(u){if(u instanceof B||Tn(u))continue;throw u}if(ro(r,i,o))return new nr;throw new B(r)}async processSegmentAgainstRoute(n,e,r,i,o,a,c,s){if($(r)!==a&&(a===f||!At$1(i,o,r)))throw new B(i);if(r.redirectTo===void 0)return this.matchSegmentAgainstRoute(n,i,r,o,a,s);if(this.allowRedirects&&c)return this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,a,s);throw new B(i)}async expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,a,c){let{matched:s,parameters:u,consumedSegments:h,positionalParamSegments:v,remainingSegments:g}=Un(e,i,o);if(!s)throw new B(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>io&&(this.allowRedirects=false));let A=this.createSnapshot(n,i,o,u,c);if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let k=await this.applyRedirects.applyRedirectCommands(h,i.redirectTo,v,_n(A),n),J=await this.applyRedirects.lineralizeSegments(i,k);return this.processSegment(n,r,e,J.concat(g),a,false,c)}createSnapshot(n,e,r,i,o){let a=new ge(r,i,Object.freeze(M$1({},this.urlTree.queryParams)),this.urlTree.fragment,so(e),$(e),e.component??e._loadedComponent??null,e,co(e),n),c=sr(a,o,this.paramsInheritanceStrategy);return a.params=Object.freeze(c.params),a.data=Object.freeze(c.data),a}async matchSegmentAgainstRoute(n,e,r,i,o,a){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let c=X=>this.createSnapshot(n,r,X.consumedSegments,X.parameters,a),s=await st(Zi(e,r,i,n,this.urlSerializer,c,this.abortSignal));if(r.path==="**"&&(e.children={}),!s?.matched)throw new B(e);n=r._injector??n;let{routes:u}=await this.getChildConfig(n,r,i),h=r._loadedInjector??n,{parameters:v,consumedSegments:g,remainingSegments:A}=s,k=this.createSnapshot(n,r,g,v,a),{segmentGroup:J,slicedSegments:we}=Jr(e,g,A,u,o);if(we.length===0&&J.hasChildren()){let X=await this.processChildren(h,u,J,k);return new D(k,X)}if(u.length===0&&we.length===0)return new D(k,[]);let Mt=$(r)===o,Be=await this.processSegment(h,u,J,we,Mt?f:o,true,k);return new D(k,Be instanceof D?[Be]:[])}async getChildConfig(n,e,r){if(e.children)return {routes:e.children,injector:n};if(e.loadChildren){if(e._loadedRoutes!==void 0){let o=e._loadedNgModuleFactory;return o&&!e._loadedInjector&&(e._loadedInjector=o.create(n).injector),{routes:e._loadedRoutes,injector:e._loadedInjector}}if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(await st(Bi(n,e,r,this.urlSerializer,this.abortSignal))){let o=await this.configLoader.loadChildren(n,e);return e._loadedRoutes=o.routes,e._loadedInjector=o.injector,e._loadedNgModuleFactory=o.factory,o}throw Wi()}return {routes:[],injector:n}}};function oo(t){t.sort((n,e)=>n.value.outlet===f?-1:e.value.outlet===f?1:n.value.outlet.localeCompare(e.value.outlet));}function ao(t){let n=t.value.routeConfig;return n&&n.path===""}function On(t){let n=[],e=new Set;for(let r of t){if(!ao(r)){n.push(r);continue}let i=n.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):n.push(r);}for(let r of e){let i=On(r.children);n.push(new D(r.value,i));}return n.filter(r=>!e.has(r))}function so(t){return t.data||{}}function co(t){return t.resolve||{}}function uo(t,n,e,r,i,o,a){return It$5(async c=>{let{state:s,tree:u}=await no(t,n,e,r,c.extractedUrl,i,o,a);return Q$1(M$1({},c),{targetSnapshot:s,urlAfterRedirects:u})})}function lo(t){return It$5(n=>{let{targetSnapshot:e,guards:{canActivateChecks:r}}=n;if(!r.length)return Ce$3(n);let i=new Set(r.map(c=>c.route)),o=new Set;for(let c of i)if(!o.has(c))for(let s of Pn(c))o.add(s);let a=0;return st$4(o).pipe(Cc(c=>i.has(c)?ho(c,e,t):(c.data=sr(c,c.parent,t).resolve,Ce$3(void 0))),Ht$5(()=>a++),Jb(1),It$5(c=>a===o.size?Ce$3(n):In$1))})}function Pn(t){let n=t.children.map(e=>Pn(e)).flat();return [t,...n]}function ho(t,n,e){let r=t.routeConfig,i=t._resolve;return r?.title!==void 0&&!Cn(r)&&(i[ze]=r.title),qb(()=>(t.data=sr(t,t.parent,e).resolve,fo(i,t,n).pipe(O$2(o=>(t._resolvedData=o,t.data=M$1(M$1({},t.data),o),null)))))}function fo(t,n,e){let r=Vt$1(t);if(r.length===0)return Ce$3({});let i={};return st$4(r).pipe(It$5(o=>po(t[o],n,e).pipe(Xb(),Ht$5(a=>{if(a instanceof ve$1)throw wt$1(new Y,a);i[o]=a;}))),Jb(1),O$2(()=>i),ze$4(o=>Tn(o)?In$1:zt$5(o)))}function po(t,n,e){let r=n._environmentInjector,i=Se(t,r),o=i.resolve?i.resolve(n,e):Mr(r,()=>i(n,e));return se(o)}function Xr(t){return Ac(n=>{let e=t(n);return e?st$4(e).pipe(O$2(()=>n)):Ce$3(n)})}var dr=(()=>{class t{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===f);return r}getResolvedTitleForRoute(e){return e.data[ze]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=F$2({token:t,factory:()=>h(Ln)})}return t})(),Ln=(()=>{class t extends dr{title;constructor(e){super(),this.title=e;}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r);}static \u0275fac=function(r){return new(r||t)(I$2(Q$))};static \u0275prov=S$2({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ce$1=new y("",{factory:()=>({})}),qe=new y(""),jn=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=h(JC);async loadComponent(e,r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return Promise.resolve(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=(async()=>{try{let o=await nn(Mr(e,()=>r.loadComponent())),a=await kn(ZV(o));return this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=a,a}finally{this.componentLoaders.delete(r);}})();return this.componentLoaders.set(r,i),i}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Promise.resolve({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let i=(async()=>{try{let o=await xn(r,this.compiler,e,this.onLoadEndListener);return r._loadedRoutes=o.routes,r._loadedInjector=o.injector,r._loadedNgModuleFactory=o.factory,o}finally{this.childrenLoaders.delete(r);}})();return this.childrenLoaders.set(r,i),i}static \u0275fac=function(r){return new(r||t)};static \u0275prov=F$2({token:t,factory:t.\u0275fac})}return t})();async function xn(t,n,e,r){let i=await nn(Mr(e,()=>t.loadChildren())),o=await kn(ZV(i)),a;o instanceof Rg||Array.isArray(o)?a=o:a=await n.compileModuleAsync(o),r&&r(t);let c,s,h;return Array.isArray(a)?(s=a,true):(c=a.create(e).injector,h=a,s=c.get(qe,[],{optional:true,self:true}).flat()),{routes:s.map(hr),injector:c,factory:h}}async function kn(t){return t}var Et=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=F$2({token:t,factory:()=>h(go)})}return t})(),go=(()=>{class t{shouldProcessUrl(e){return true}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=F$2({token:t,factory:t.\u0275fac})}return t})(),$n=new y("");var zn=new y(""),vo=()=>{},Hn=new y(""),Fn=(()=>{class t{currentNavigation=Ye$3(null,{equal:()=>false});currentTransition=null;lastSuccessfulNavigation=Ye$3(null);events=new q$2;transitionAbortWithErrorSubject=new q$2;configLoader=h(jn);environmentInjector=h(ae$2);destroyRef=h(Be$3);urlSerializer=h(ye$1);rootContexts=h(Re);location=h(Vy);inputBindingEnabled=h(He,{optional:true})!==null;titleStrategy=h(dr);options=h(Ce$1,{optional:true})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||Si;urlHandlingStrategy=h(Et);createViewTransition=h($n,{optional:true});navigationErrorHandler=h(Hn,{optional:true});activatedRouteInjectorFeature=h(zn,{optional:true});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>Ce$3(void 0);rootComponentType=null;destroyed=false;constructor(){let e=i=>this.events.next(new pt(i)),r=i=>this.events.next(new gt(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=true;});}complete(){this.transitions?.complete();}handleNavigationRequest(e){let r=++this.navigationId;ai$3(()=>{this.transitions?.next(Q$1(M$1({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:r,routesRecognizeHandler:{},beforeActivateHandler:{}}));});}setupNavigations(e){return this.transitions=new En$1(null),this.transitions.pipe(wt$5(r=>r!==null),Ac(r=>{let i=true,o=false,a=new AbortController,c=()=>!o&&this.currentTransition?.id===r.id;return Ce$3(r).pipe(Ac(s=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",w.SupersededByNewNavigation),In$1;this.currentTransition=r;let u=this.lastSuccessfulNavigation();this.currentNavigation.set({id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,targetBrowserUrl:typeof s.extras.browserUrl=="string"?this.urlSerializer.parse(s.extras.browserUrl):s.extras.browserUrl,trigger:s.source,extras:s.extras,previousNavigation:u?Q$1(M$1({},u),{previousNavigation:null}):null,abort:()=>a.abort(),routesRecognizeHandler:s.routesRecognizeHandler,beforeActivateHandler:s.beforeActivateHandler});let h=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),v=s.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!h&&v!=="reload")return this.events.next(new V(s.id,this.urlSerializer.serialize(s.rawUrl),"",Oe.IgnoredSameUrlNavigation)),s.resolve(false),In$1;if(this.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return Ce$3(s).pipe(Ac(g=>(this.events.next(new oe(g.id,this.urlSerializer.serialize(g.extractedUrl),g.source,g.restoredState)),g.id!==this.navigationId?In$1:Promise.resolve(g))),uo(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy,a.signal),Ht$5(g=>{r.targetSnapshot=g.targetSnapshot,r.urlAfterRedirects=g.urlAfterRedirects,this.currentNavigation.update(A=>(A.finalUrl=g.urlAfterRedirects,A)),this.events.next(new Le);}),Ac(g=>st$4(r.routesRecognizeHandler.deferredHandle??Ce$3(void 0)).pipe(O$2(()=>g))),Ht$5(()=>{let g=new Pe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(g);}));if(h&&this.urlHandlingStrategy.shouldProcessUrl(s.currentRawUrl)){let{id:g,extractedUrl:A,source:k,restoredState:J,extras:we}=s,Mt=new oe(g,this.urlSerializer.serialize(A),k,J);this.events.next(Mt);let Be=Rn(this.rootComponentType,this.environmentInjector).snapshot;return this.currentTransition=r=Q$1(M$1({},s),{targetSnapshot:Be,urlAfterRedirects:A,extras:Q$1(M$1({},we),{skipLocationChange:false,replaceUrl:false})}),this.currentNavigation.update(X=>(X.finalUrl=A,X)),Ce$3(r)}else return this.events.next(new V(s.id,this.urlSerializer.serialize(s.extractedUrl),"",Oe.IgnoredByUrlHandlingStrategy)),s.resolve(false),In$1}),O$2(s=>{let u=new lt(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);return this.events.next(u),this.currentTransition=r=Q$1(M$1({},s),{guards:Ai(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),r}),ji(s=>this.events.next(s)),Ac(s=>{if(r.guardsResult=s.guardsResult,s.guardsResult&&typeof s.guardsResult!="boolean")throw wt$1(this.urlSerializer,s.guardsResult);let u=new ht(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);if(this.events.next(u),!c())return In$1;if(!s.guardsResult)return this.cancelNavigationTransition(s,"",w.GuardRejected),In$1;if(s.guards.canActivateChecks.length===0)return Ce$3(s);let h=new dt(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);if(this.events.next(h),!c())return In$1;let v=false;return Ce$3(s).pipe(lo(this.paramsInheritanceStrategy),Ht$5({next:()=>{v=true;let g=new ft(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(g);},complete:()=>{v||this.cancelNavigationTransition(s,"",w.NoDataFromResolver);}}))}),Xr(s=>{let u=v=>{let g=[];if(v.routeConfig?._loadedComponent)v.component=v.routeConfig?._loadedComponent;else if(v.routeConfig?.loadComponent){let A=v._environmentInjector;g.push(this.configLoader.loadComponent(A,v.routeConfig).then(k=>{v.component=k;}));}for(let A of v.children)g.push(...u(A));return g},h=u(s.targetSnapshot.root);return h.length===0?Ce$3(s):st$4(Promise.all(h).then(()=>s))}),Ac(s=>{let{newlyCreatedRoutes:u,state:h}=Ci(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return this.currentTransition=r=s=Q$1(M$1({},s),{targetRouterState:h,newlyCreatedRoutes:u}),this.currentNavigation.update(v=>(v.targetRouterState=h,v)),Ce$3(s)}),this.activatedRouteInjectorFeature?.operator()??(s=>s),Xr(()=>this.afterPreactivation()),Ac(()=>{let{currentSnapshot:s,targetSnapshot:u}=r,h=this.createViewTransition?.(this.environmentInjector,s.root,u.root);return h?st$4(h).pipe(O$2(()=>r)):Ce$3(r)}),at$4(1),Ac(s=>{i=false,this.events.next(new fe);let u=r.beforeActivateHandler.deferredHandle;return u?st$4(u.then(()=>s)):Ce$3(s)}),Ht$5(s=>{new er(e.routeReuseStrategy,r.targetRouterState,r.currentRouterState,u=>this.events.next(u),this.inputBindingEnabled).activate(this.rootContexts),s.newlyCreatedRoutes?.clear(),c()&&(o=true,this.currentNavigation.update(u=>(u.abort=vo,u)),this.lastSuccessfulNavigation.set(ai$3(this.currentNavigation)),this.events.next(new z(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects))),this.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(true));}),yr(Nn(a.signal).pipe(wt$5(()=>!o&&i),Ht$5(()=>{this.cancelNavigationTransition(r,a.signal.reason+"",w.Aborted);}))),Ht$5({complete:()=>{o=true;}}),yr(this.transitionAbortWithErrorSubject.pipe(Ht$5(s=>{throw s}))),gr(()=>{a.abort(),o||this.cancelNavigationTransition(r,"",w.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null);}),ze$4(s=>{if(o=true,en(r),this.destroyed)return r.resolve(false),In$1;if(En(s))this.events.next(new x(r.id,this.urlSerializer.serialize(r.extractedUrl),s.message,s.cancellationCode)),Ii(s)?this.events.next(new pe(s.url,s.navigationBehaviorOptions)):r.resolve(false);else {let u=new ae(r.id,this.urlSerializer.serialize(r.extractedUrl),s,r.targetSnapshot??void 0);try{let h=Mr(this.environmentInjector,()=>this.navigationErrorHandler?.(u));if(h instanceof ve$1){let{message:v,cancellationCode:g}=wt$1(this.urlSerializer,h);this.events.next(new x(r.id,this.urlSerializer.serialize(r.extractedUrl),v,g)),this.events.next(new pe(h.redirectTo,h.navigationBehaviorOptions));}else throw this.events.next(u),s}catch(h){this.options.resolveNavigationPromiseOnError?r.resolve(false):r.reject(h);}}return In$1}))}))}cancelNavigationTransition(e,r,i){en(e);let o=new x(e.id,this.urlSerializer.serialize(e.extractedUrl),r,i);this.events.next(o),e.resolve(false);}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(true))),r=ai$3(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return e.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||t)};static \u0275prov=F$2({token:t,factory:t.\u0275fac})}return t})();function mo(t){return t!==Me}function en(t){if(t.newlyCreatedRoutes)for(let n of t.newlyCreatedRoutes)n._localInjector?.destroy();}var qn=new y("");var Bn=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=F$2({token:t,factory:()=>h(yo)})}return t})(),It$1=class It{shouldDetach(n){return false}store(n,e){}shouldAttach(n){return false}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}shouldDestroyInjector(n){return true}},yo=(()=>{class t extends It$1{static \u0275fac=function(r){return new(r||t)};static \u0275prov=F$2({token:t,factory:t.\u0275fac})}return t})(),Tt$1=(()=>{class t{urlSerializer=h(ye$1);options=h(Ce$1,{optional:true})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=h(Vy);urlHandlingStrategy=h(Et);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new I;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:r,targetBrowserUrl:i}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,r):r,a=i??o;return a instanceof I?this.urlSerializer.serialize(a):a}routerUrlState(e){return e?.targetBrowserUrl===void 0||e?.finalUrl===void 0?{}:{\u0275routerUrl:this.urlSerializer.serialize(e.finalUrl)}}commitTransition({targetRouterState:e,finalUrl:r,initialUrl:i}){r&&e?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=e):this.rawUrlTree=i;}routerState=Rn(null,h(ae$2));getRouterState(){return this.routerState}_stateMemento=this.createStateMemento();get stateMemento(){return this._stateMemento}updateStateMemento(){this._stateMemento=this.createStateMemento();}createStateMemento(){return {rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}restoredState(){return this.location.getState()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=F$2({token:t,factory:()=>h(Ro)})}return t})(),Ro=(()=>{class t extends Tt$1{currentPageId=0;lastSuccessfulId=-1;get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type==="popstate"&&setTimeout(()=>{e(r.url,r.state,"popstate",{replaceUrl:true});});})}handleRouterEvent(e,r){e instanceof oe?this.updateStateMemento():e instanceof V?this.commitTransition(r):e instanceof Pe?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof fe?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof x&&!yn(e)?this.restoreHistory(r):e instanceof ae?this.restoreHistory(r,true):e instanceof z&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId);}setBrowserUrl(e,r){let{extras:i,id:o}=r,{replaceUrl:a,state:c}=i;if(this.location.isCurrentPathEqualTo(e)||a){let s=this.browserPageId,u=M$1(M$1({},c),this.generateNgRouterState(o,s,r));this.location.replaceState(e,"",u);}else {let s=M$1(M$1({},c),this.generateNgRouterState(o,this.browserPageId+1,r));this.location.go(e,"",s);}}restoreHistory(e,r=false){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree());}else this.canceledNavigationResolution==="replace"&&(r&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree());}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree);}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId));}generateNgRouterState(e,r,i){return this.canceledNavigationResolution==="computed"?M$1({navigationId:e,\u0275routerPageId:r},this.routerUrlState(i)):M$1({navigationId:e},this.routerUrlState(i))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=F$2({token:t,factory:t.\u0275fac})}return t})();function fr(t,n){t.events.pipe(wt$5(e=>e instanceof z||e instanceof x||e instanceof ae||e instanceof V),O$2(e=>e instanceof z||e instanceof V?0:(e instanceof x?e.code===w.Redirect||e.code===w.SupersededByNewNavigation:false)?2:1),wt$5(e=>e!==2),at$4(1)).subscribe(()=>{n();});}var ce=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=false;nonRouterCurrentEntryChangeSubscription;console=h(Vg);stateManager=h(Tt$1);options=h(Ce$1,{optional:true})||{};pendingTasks=h($n$1);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=h(Fn);urlSerializer=h(ye$1);location=h(Vy);urlHandlingStrategy=h(Et);injector=h(ae$2);_events=new q$2;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=false;routeReuseStrategy=h(Bn);injectorCleanup=h(qn,{optional:true});onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=h(qe,{optional:true})?.flat()??[];componentInputBindingEnabled=!!h(He,{optional:true});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{}}),this.subscribeToNavigationEvents();}eventsSubscription=new G$4;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=ai$3(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof x&&r.code!==w.Redirect&&r.code!==w.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof z)this.navigated=!0,this.injectorCleanup?.(this.routeReuseStrategy,this.routerState,this.config);else if(r instanceof pe){let a=r.navigationBehaviorOptions,c=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),s=M$1({scroll:i.extras.scroll,browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||mo(i.source)},a);this.scheduleNavigation(c,Me,null,s,{resolve:i.resolve,reject:i.reject,promise:i.promise});}}yi(r)&&this._events.next(r);}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i);}});this.eventsSubscription.add(e);}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e;}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(true),Me,this.stateManager.restoredState(),{replaceUrl:true});}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i,o)=>{this.navigateToSyncWithBrowser(e,i,r,o);});}navigateToSyncWithBrowser(e,r,i,o){let a=i?.navigationId?i:null,c=i?.\u0275routerUrl??e;if(i?.\u0275routerUrl&&(o=Q$1(M$1({},o),{browserUrl:e})),i){let u=M$1({},i);delete u.navigationId,delete u.\u0275routerPageId,delete u.\u0275routerUrl,Object.keys(u).length!==0&&(o.state=u);}let s=this.parseUrl(c);this.scheduleNavigation(s,r,a,o).catch(u=>{this.disposed||this.injector.get(on$2)(u);});}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return ai$3(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(hr),this.navigated=false;}ngOnDestroy(){this.dispose();}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription?.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0,this.disposed=true,this.eventsSubscription.unsubscribe();}createUrlTree(e,r={}){let{relativeTo:i,queryParams:o,fragment:a,queryParamsHandling:c,preserveFragment:s}=r,u=s?this.currentUrlTree.fragment:a,h=null;switch(c??this.options.defaultQueryParamsHandling){case "merge":h=M$1(M$1({},this.currentUrlTree.queryParams),o);break;case "preserve":h=this.currentUrlTree.queryParams;break;default:h=o||null;}h!==null&&(h=this.removeEmptyProps(h));let v;try{let g=i?i.snapshot:this.routerState.snapshot.root;v=pn(g);}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),v=this.currentUrlTree.root;}return gn(v,e,h,u??null,this.urlSerializer)}navigateByUrl(e,r={skipLocationChange:false}){let i=Z(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,Me,null,r)}navigate(e,r={skipLocationChange:false}){return So(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.console.warn(Mt$6(4018,false)),this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===true?i=M$1({},or):r===false?i=M$1({},_e):i=M$1(M$1({},_e),r),Z(e))return Gt$1(this.currentUrlTree,e,i);let o=this.parseUrl(e);return Gt$1(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((r,[i,o])=>(o!=null&&(r[i]=o),r),{})}scheduleNavigation(e,r,i,o,a){if(this.disposed)return Promise.resolve(false);let c,s,u;a?(c=a.resolve,s=a.reject,u=a.promise):u=new Promise((v,g)=>{c=v,s=g;});let h=this.pendingTasks.add();return fr(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(h));}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:c,reject:s,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(Promise.reject.bind(Promise))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=F$2({token:t,factory:t.\u0275fac})}return t})();function So(t){for(let n=0;n<t.length;n++)if(t[n]==null)throw new g$1(4008,false)}var wo=(()=>{class t{router=h(ce);stateManager=h(Tt$1);fragment=Ye$3("");queryParams=Ye$3({});path=Ye$3("");serializer=h(ye$1);constructor(){this.updateState(),this.router.events?.subscribe(e=>{e instanceof z&&this.updateState();});}updateState(){let{fragment:e,root:r,queryParams:i}=this.stateManager.getCurrentUrlTree();this.fragment.set(e),this.queryParams.set(i),this.path.set(this.serializer.serialize(new I(r)));}static \u0275fac=function(r){return new(r||t)};static \u0275prov=F$2({token:t,factory:t.\u0275fac})}return t})(),Nt$1=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;hrefAttributeValue=h(new Aa("href"),{optional:true});reactiveHref=oT(()=>this.isAnchorElement?this.computeHref(this._urlTree()):this.hrefAttributeValue);get href(){return ai$3(this.reactiveHref)}set href(e){this.reactiveHref.set(e);}set target(e){this._target.set(e);}get target(){return ai$3(this._target)}_target=Ye$3(void 0);set queryParams(e){this._queryParams.set(e);}get queryParams(){return ai$3(this._queryParams)}_queryParams=Ye$3(void 0,{equal:()=>false});set fragment(e){this._fragment.set(e);}get fragment(){return ai$3(this._fragment)}_fragment=Ye$3(void 0);set queryParamsHandling(e){this._queryParamsHandling.set(e);}get queryParamsHandling(){return ai$3(this._queryParamsHandling)}_queryParamsHandling=Ye$3(void 0);set state(e){this._state.set(e);}get state(){return ai$3(this._state)}_state=Ye$3(void 0,{equal:()=>false});set info(e){this._info.set(e);}get info(){return ai$3(this._info)}_info=Ye$3(void 0,{equal:()=>false});set relativeTo(e){this._relativeTo.set(e);}get relativeTo(){return ai$3(this._relativeTo)}_relativeTo=Ye$3(void 0);set preserveFragment(e){this._preserveFragment.set(e);}get preserveFragment(){return ai$3(this._preserveFragment)}_preserveFragment=Ye$3(false);set skipLocationChange(e){this._skipLocationChange.set(e);}get skipLocationChange(){return ai$3(this._skipLocationChange)}_skipLocationChange=Ye$3(false);set replaceUrl(e){this._replaceUrl.set(e);}get replaceUrl(){return ai$3(this._replaceUrl)}_replaceUrl=Ye$3(false);browserUrl=xy(void 0);isAnchorElement;onChanges=new q$2;applicationErrorHandler=h(on$2);options=h(Ce$1,{optional:true});reactiveRouterState=h(wo);constructor(e,r,i,o,a,c){this.router=e,this.route=r,this.tabIndexAttribute=i,this.renderer=o,this.el=a,this.locationStrategy=c;let s=a.nativeElement.tagName?.toLowerCase();this.isAnchorElement=s==="a"||s==="area"||!!(typeof customElements=="object"&&customElements.get(s)?.observedAttributes?.includes?.("href"));}setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e);}ngOnChanges(e){this.onChanges.next(this);}routerLinkInput=Ye$3(null);set routerLink(e){e==null?(this.routerLinkInput.set(null),this.setTabIndexIfNotOnNativeEl(null)):(Z(e)?this.routerLinkInput.set(e):this.routerLinkInput.set(Array.isArray(e)?e:[e]),this.setTabIndexIfNotOnNativeEl("0"));}onClick(e,r,i,o,a){let c=this._urlTree();if(c===null||this.isAnchorElement&&(e!==0||r||i||o||a||typeof this.target=="string"&&this.target!="_self"))return true;let s=this.browserUrl(),u=M$1({skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info},s!==void 0&&{browserUrl:s});return this.router.navigateByUrl(c,u)?.catch(h=>{this.applicationErrorHandler(h);}),!this.isAnchorElement}ngOnDestroy(){}applyAttributeValue(e,r){let i=this.renderer,o=this.el.nativeElement;r!==null?i.setAttribute(o,e,r):i.removeAttribute(o,e);}_urlTree=nT(()=>{this.reactiveRouterState.path(),this._preserveFragment()&&this.reactiveRouterState.fragment();let e=i=>i==="preserve"||i==="merge";(e(this._queryParamsHandling())||e(this.options?.defaultQueryParamsHandling))&&this.reactiveRouterState.queryParams();let r=this.routerLinkInput();return r===null||!this.router.createUrlTree?null:Z(r)?r:this.router.createUrlTree(r,{relativeTo:this._relativeTo()!==void 0?this._relativeTo():this.route,queryParams:this._queryParams(),fragment:this._fragment(),queryParamsHandling:this._queryParamsHandling(),preserveFragment:this._preserveFragment()})},{equal:(e,r)=>this.computeHref(e)===this.computeHref(r)});get urlTree(){return ai$3(this._urlTree)}computeHref(e){return e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null}static \u0275fac=function(r){return new(r||t)(bt$5(ce),bt$5(G$1),Rl("tabindex"),bt$5(ti$3),bt$5(ue$2),bt$5(Ra))};static \u0275dir=tt$1({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&Yg("click",function(a){return i.onClick(a.button,a.ctrlKey,a.shiftKey,a.altKey,a.metaKey)}),r&2&&rr$1("href",i.reactiveHref(),a_)("target",i._target());},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",Et$3],skipLocationChange:[2,"skipLocationChange","skipLocationChange",Et$3],replaceUrl:[2,"replaceUrl","replaceUrl",Et$3],browserUrl:[1,"browserUrl"],routerLink:"routerLink"},features:[ha]})}return t})(),bo=(()=>{class t{router;element;renderer;cdr;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=false;get isActive(){return this._isActive}routerLinkActiveOptions={exact:false};ariaCurrentWhenActive;isActiveChange=new ke$5;link=h(Nt$1,{optional:true});constructor(e,r,i,o){this.router=e,this.element=r,this.renderer=i,this.cdr=o,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof z&&this.update();});}ngAfterContentInit(){Ce$3(this.links.changes,Ce$3(null)).pipe(fo$1()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges();});}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=st$4(e).pipe(fo$1()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update();});}set routerLinkActive(e){let r=Array.isArray(e)?e:e.split(" ");this.classes=r.filter(i=>!!i);}ngOnChanges(e){this.update();}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe();}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(r=>{e?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r);}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e));});}isLinkActive(e){let r=Io(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact??false?M$1({},or):M$1({},_e);return i=>{let o=i.urlTree;return o?ai$3(ar(o,e,r)):false}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(r){return new(r||t)(bt$5(ce),bt$5(ue$2),bt$5(ti$3),bt$5(Ny))};static \u0275dir=tt$1({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,i,o){if(r&1&&Qg(o,Nt$1,5),r&2){let a;uC(a=lC())&&(i.links=a);}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[ha]})}return t})();function Io(t){let n=t;return !!(n.paths||n.matrixParams||n.queryParams||n.fragment)}var Ao=new y("");function Eo(t,...n){return Fn$1([{provide:qe,multi:true,useValue:t},{provide:G$1,useFactory:To},{provide:bd,multi:true,useFactory:Mo},n.map(e=>e.\u0275providers)])}function To(){return h(ce).routerState.root}function No(t,n){return {\u0275kind:t,\u0275providers:n}}function Mo(){let t=h(Y$1);return n=>{let e=t.get(nr$1);if(n!==e.components[0])return;let r=t.get(ce),i=t.get(Do);t.get(_o)===1&&r.initialNavigation(),t.get(Uo,null,{optional:true})?.setUpPreloading(),t.get(Ao,null,{optional:true})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe());}}var Do=new y("",{factory:()=>new q$2}),_o=new y("",{factory:()=>1});var Uo=new y("");function Oo(t={}){return No(8,[{provide:He,useFactory:()=>new bn(t)}])}
|
|
2634
|
-
function Tt(i){let e=Math.floor(Math.abs(i)),n=i.toString().replace(/^[^.]*\.?/,"").length;return e===1&&n===0?1:5}var _t=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],void 0,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm\u202Fa","h:mm:ss\u202Fa","h:mm:ss\u202Fa z","h:mm:ss\u202Fa zzzz"],["{1}, {0}",void 0,void 0,void 0],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",Tt];var bt=[{path:"",pathMatch:"full",redirectTo:"workstreams"},{path:"sandboxes",redirectTo:"workstreams",pathMatch:"full"},{path:"workstreams",loadComponent:()=>import('./chunk-
|
|
2634
|
+
function Tt(i){let e=Math.floor(Math.abs(i)),n=i.toString().replace(/^[^.]*\.?/,"").length;return e===1&&n===0?1:5}var _t=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],void 0,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm\u202Fa","h:mm:ss\u202Fa","h:mm:ss\u202Fa z","h:mm:ss\u202Fa zzzz"],["{1}, {0}",void 0,void 0,void 0],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",Tt];var bt=[{path:"",pathMatch:"full",redirectTo:"workstreams"},{path:"sandboxes",redirectTo:"workstreams",pathMatch:"full"},{path:"workstreams",loadComponent:()=>import('./chunk-B_7o4ypb.js').then(i=>i.WorkstreamsPageComponent)},{path:"launch",loadComponent:()=>import('./chunk-B26Ww1rq.js').then(i=>i.LaunchPageComponent)},{path:"sessions/:runId",loadComponent:()=>import('./chunk-CEMTAsgG.js').then(i=>i.SessionPageComponent)},{path:"historique",loadComponent:()=>import('./chunk-C0I1KIo5.js').then(i=>i.HistoryPageComponent)},{path:"workflows",loadComponent:()=>import('./chunk-N5S-IAAY.js').then(i=>i.WorkflowsPageComponent)},{path:"workflows/:type/:version",loadComponent:()=>import('./chunk-BjVbzNPP.js').then(i=>i.WorkflowDetailPageComponent)},{path:"reglages",loadComponent:()=>import('./chunk-MTEdlWS6.js').then(i=>i.AdminPageComponent)},{path:"**",redirectTo:"workstreams"}];var wt={agentOsBaseUrl:"http://localhost:4200"};TU(_t);var vt={providers:[XC(),US(),{provide:si$3,useValue:"en"},{provide:C,useClass:et},Eo(bt,Oo()),{provide:rn$1,useValue:wt.agentOsBaseUrl},Mw(()=>{h(Sv).setDefaultFontSetClass("material-symbols-outlined");})]};var Pt=["*",[["mat-toolbar-row"]]],It=["*","mat-toolbar-row"],Ot=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275dir=tt$1({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]})}return i})(),yt=(()=>{class i{_elementRef=h(ue$2);_platform=h(be);_document=h(k$1);color;_toolbarRows;ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()));}_checkToolbarMixedModes(){this._toolbarRows.length;}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=Ae$2({type:i,selectors:[["mat-toolbar"]],contentQueries:function(n,t,s){if(n&1&&Qg(s,Ot,5),n&2){let l;uC(l=lC())&&(t._toolbarRows=l);}},hostAttrs:[1,"mat-toolbar"],hostVars:6,hostBindings:function(n,t){n&2&&(ii$3(t.color?"mat-"+t.color:""),Dt$4("mat-toolbar-multiple-rows",t._toolbarRows.length>0)("mat-toolbar-single-row",t._toolbarRows.length===0));},inputs:{color:"color"},exportAs:["matToolbar"],ngContentSelectors:It,decls:2,vars:0,template:function(n,t){n&1&&(or$1(Pt),nt$4(0),nt$4(1,1));},styles:[`.mat-toolbar {
|
|
2635
2635
|
background: var(--mat-toolbar-container-background-color, var(--mat-sys-surface));
|
|
2636
2636
|
color: var(--mat-toolbar-container-text-color, var(--mat-sys-on-surface));
|
|
2637
2637
|
}
|