daimon 0.9.0 → 0.10.0
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/CHANGELOG.md +83 -0
- package/dist/cli.js +98 -88
- package/dist/dashboard/browser/chunk-2LMH5KDX.js +5 -0
- package/dist/dashboard/browser/{chunk-6Z4FDREI.js → chunk-2QORICNU.js} +1 -1
- package/dist/dashboard/browser/{chunk-UUJWPV5O.js → chunk-36JZZZCV.js} +1 -1
- package/dist/dashboard/browser/{chunk-4KVYA2AQ.js → chunk-3S7OJ77P.js} +1 -1
- package/dist/dashboard/browser/{chunk-TGSV7ZHM.js → chunk-42QQHEGP.js} +1 -1
- package/dist/dashboard/browser/chunk-4L223A7A.js +1 -0
- package/dist/dashboard/browser/{chunk-EBGPIJ7S.js → chunk-532NB4ME.js} +1 -1
- package/dist/dashboard/browser/{chunk-X4RGWMLE.js → chunk-6CP6NCA6.js} +2 -2
- package/dist/dashboard/browser/chunk-6OMBXV4F.js +1 -0
- package/dist/dashboard/browser/chunk-6YXOOFGY.js +1 -0
- package/dist/dashboard/browser/{chunk-VMW35ZNT.js → chunk-AHO3BCLI.js} +1 -1
- package/dist/dashboard/browser/{chunk-CIQNXWDY.js → chunk-ASK7FG27.js} +1 -1
- package/dist/dashboard/browser/{chunk-AGN2F6JP.js → chunk-BCGQJHY3.js} +1 -1
- package/dist/dashboard/browser/{chunk-ACPSBF55.js → chunk-BDTAVYPH.js} +1 -1
- package/dist/dashboard/browser/{chunk-FZLMX6EY.js → chunk-BFBXHJEF.js} +1 -1
- package/dist/dashboard/browser/{chunk-B2DPS6BL.js → chunk-BKYXU3OY.js} +1 -1
- package/dist/dashboard/browser/{chunk-UC7AWK4C.js → chunk-BPUIUSAU.js} +1 -1
- package/dist/dashboard/browser/{chunk-6MTVWBQQ.js → chunk-C6SNIY22.js} +1 -1
- package/dist/dashboard/browser/{chunk-3ZFFKHPU.js → chunk-CCRYWDXZ.js} +1 -1
- package/dist/dashboard/browser/{chunk-JWXROQJJ.js → chunk-DNHNU64I.js} +1 -1
- package/dist/dashboard/browser/{chunk-FRKUCFVI.js → chunk-DRBVSI3B.js} +1 -1
- package/dist/dashboard/browser/{chunk-RNUJZTKS.js → chunk-EXOJOB6H.js} +2 -2
- package/dist/dashboard/browser/chunk-EYOED3X7.js +2 -0
- package/dist/dashboard/browser/{chunk-3EPFSBJ2.js → chunk-G3IBZZQH.js} +1 -1
- package/dist/dashboard/browser/chunk-H3HRZLHG.js +4 -0
- package/dist/dashboard/browser/chunk-H5GKWN4K.js +1 -0
- package/dist/dashboard/browser/{chunk-KRC72WWY.js → chunk-HVK4GEK7.js} +1 -1
- package/dist/dashboard/browser/{chunk-7LKM244H.js → chunk-HYIZY5FQ.js} +1 -1
- package/dist/dashboard/browser/chunk-ITSOVQEA.js +1 -0
- package/dist/dashboard/browser/{chunk-WOMCRDMJ.js → chunk-JODWQVMA.js} +1 -1
- package/dist/dashboard/browser/chunk-LAMOHX23.js +1 -0
- package/dist/dashboard/browser/chunk-NMKAKRON.js +1 -0
- package/dist/dashboard/browser/{chunk-F3FCHBFQ.js → chunk-NY5IR366.js} +1 -1
- package/dist/dashboard/browser/{chunk-NVL5HFLU.js → chunk-OOQPWG6B.js} +1 -1
- package/dist/dashboard/browser/{chunk-SR4HVFOB.js → chunk-P3Q7RWT5.js} +1 -1
- package/dist/dashboard/browser/{chunk-YHBNUNU3.js → chunk-PVPELZPO.js} +1 -1
- package/dist/dashboard/browser/{chunk-66VYPESU.js → chunk-QHXOUNPA.js} +1 -1
- package/dist/dashboard/browser/{chunk-VHALTUPL.js → chunk-RMV7CR6Y.js} +1 -1
- package/dist/dashboard/browser/chunk-RQSDQXNY.js +1 -0
- package/dist/dashboard/browser/chunk-RWX5JIT4.js +1 -0
- package/dist/dashboard/browser/{chunk-R7VSXL63.js → chunk-SXE7REUK.js} +1 -1
- package/dist/dashboard/browser/chunk-TLCLILNG.js +4 -0
- package/dist/dashboard/browser/chunk-UAIWZYHN.js +1 -0
- package/dist/dashboard/browser/chunk-UFTWVSEC.js +2 -0
- package/dist/dashboard/browser/{chunk-RWXAGDGT.js → chunk-UXLEE3F2.js} +1 -1
- package/dist/dashboard/browser/{chunk-K6PUQAFE.js → chunk-XPP3TYS2.js} +1 -1
- package/dist/dashboard/browser/{chunk-PRLUGTKR.js → chunk-YFYMS5EE.js} +1 -1
- package/dist/dashboard/browser/chunk-YPVVBWNF.js +1 -0
- package/dist/dashboard/browser/{chunk-BBTQXZIS.js → chunk-Z3XFJOYG.js} +1 -1
- package/dist/dashboard/browser/index.html +2 -2
- package/dist/dashboard/browser/main-EENULCI5.js +1 -0
- package/dist/main.js +55 -51
- package/dist/mcp.js +3 -3
- package/package.json +4 -2
- package/dist/dashboard/browser/chunk-55AO3FMG.js +0 -1
- package/dist/dashboard/browser/chunk-FD3BW2ZN.js +0 -1
- package/dist/dashboard/browser/chunk-GMEW64AS.js +0 -1
- package/dist/dashboard/browser/chunk-HXX2OUOE.js +0 -1
- package/dist/dashboard/browser/chunk-HZNVO3JE.js +0 -1
- package/dist/dashboard/browser/chunk-K2SFF47Z.js +0 -5
- package/dist/dashboard/browser/chunk-K5WKBG55.js +0 -1
- package/dist/dashboard/browser/chunk-LBWOIG7N.js +0 -5
- package/dist/dashboard/browser/chunk-O76B43BY.js +0 -4
- package/dist/dashboard/browser/chunk-QYIYT4YU.js +0 -1
- package/dist/dashboard/browser/chunk-RXOAYCKI.js +0 -2
- package/dist/dashboard/browser/chunk-WRX32YWH.js +0 -1
- package/dist/dashboard/browser/main-YAROJLJV.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as et,b as tt,c as it}from"./chunk-
|
|
1
|
+
import{a as et,b as tt,c as it}from"./chunk-XPP3TYS2.js";import{a as Xe,b as Ge,c as Qe,d as Ye,e as Ze}from"./chunk-Z3XFJOYG.js";import{a as Se,b as Me}from"./chunk-G3IBZZQH.js";import{a as Ve}from"./chunk-HYIZY5FQ.js";import{a as $e,d as je,e as Le,f as qe,g as Be,h as He}from"./chunk-TLCLILNG.js";import{a as Je,b as We,c as Ue,d as Ke}from"./chunk-36JZZZCV.js";import{a as Ae,b as Ne,e as ze}from"./chunk-EYOED3X7.js";import"./chunk-PVPELZPO.js";import"./chunk-HVK4GEK7.js";import{a as ye,b as we,c as xe,f as Ce,h as ke,m as Ee}from"./chunk-2QORICNU.js";import"./chunk-CCRYWDXZ.js";import{a as Oe,b as Ie,c as Pe}from"./chunk-2LMH5KDX.js";import"./chunk-6YXOOFGY.js";import{d as Te}from"./chunk-BCGQJHY3.js";import{a as Fe}from"./chunk-P3Q7RWT5.js";import{b as De,d as Re}from"./chunk-JODWQVMA.js";import{a as be,b as ve}from"./chunk-RMV7CR6Y.js";import"./chunk-YNQPX5G6.js";import"./chunk-C6SNIY22.js";import"./chunk-42QQHEGP.js";import"./chunk-AHO3BCLI.js";import{f as fe}from"./chunk-DRBVSI3B.js";import"./chunk-BKYXU3OY.js";import{e as ue,f as _e}from"./chunk-BPUIUSAU.js";import{a as me}from"./chunk-6CP6NCA6.js";import{f as pe,h as he,s as ge,z as H}from"./chunk-DNHNU64I.js";import{h as ce}from"./chunk-532NB4ME.js";import{$b as ie,Ac as V,Ca as Q,Cc as se,Db as O,Fb as f,Gb as b,Hb as ee,Hc as le,Ib as A,Jb as k,Kb as E,Kc as T,Lb as u,Lc as de,Mb as o,Nb as r,Ob as x,Tb as _,Ub as te,Vb as p,Xb as l,Ya as Y,Yb as N,Zb as z,_ as W,_a as c,a as L,aa as U,ac as ne,b as q,bc as ae,ca as K,db as B,ea as y,fc as S,hc as M,ic as oe,ja as h,jc as d,ka as g,kc as C,la as X,lc as P,pb as F,qb as Z,s as R,ta as w,uc as re,za as G}from"./chunk-H3HRZLHG.js";var dt=["mat-internal-form-field",""],ct=["*"],at=(()=>{class a{labelPosition;static \u0275fac=function(t){return new(t||a)};static \u0275cmp=F({type:a,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(t,n){t&2&&M("mdc-form-field--align-end",n.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},attrs:dt,ngContentSelectors:ct,decls:1,vars:0,template:function(t,n){t&1&&(N(),z(0))},styles:[`.mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;vertical-align:middle}.mat-internal-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mat-internal-form-field>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}return a})();var mt=["switch"],pt=["*"];function ht(a,i){a&1&&(o(0,"span",11),X(),o(1,"svg",13),x(2,"path",14),r(),o(3,"svg",15),x(4,"path",16),r()())}var gt=new K("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1,disabledInteractive:!1})}),$=class{source;checked;constructor(i,e){this.source=i,this.checked=e}},J=(()=>{class a{_elementRef=y(Q);_focusMonitor=y(pe);_changeDetectorRef=y(le);defaults=y(gt);_onChange=e=>{};_onTouched=()=>{};_validatorOnChange=()=>{};_uniqueId;_checked=!1;_createChangeEvent(e){return new $(this,e)}_labelId;get buttonId(){return`${this.id||this._uniqueId}-button`}_switchElement;focus(){this._switchElement.nativeElement.focus()}_noopAnimations=fe();_focused;name=null;id;labelPosition="after";ariaLabel=null;ariaLabelledby=null;ariaDescribedby;required;color;disabled=!1;disableRipple=!1;tabIndex=0;get checked(){return this._checked}set checked(e){this._checked=e,this._changeDetectorRef.markForCheck()}hideIcon;disabledInteractive;change=new B;toggleChange=new B;get inputId(){return`${this.id||this._uniqueId}-input`}constructor(){y(he).load(Fe);let e=y(new se("tabindex"),{optional:!0}),t=this.defaults;this.tabIndex=e==null?0:parseInt(e)||0,this.color=t.color||"accent",this.id=this._uniqueId=y(ge).getId("mat-mdc-slide-toggle-"),this.hideIcon=t.hideIcon??!1,this.disabledInteractive=t.disabledInteractive??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{e==="keyboard"||e==="program"?(this._focused=!0,this._changeDetectorRef.markForCheck()):e||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnChanges(e){e.required&&this._validatorOnChange()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(e){this.checked=!!e}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}validate(e){return this.required&&e.value!==!0?{required:!0}:null}registerOnValidatorChange(e){this._validatorOnChange=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}_handleClick(){this.disabled||(this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new $(this,this.checked))))}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=F({type:a,selectors:[["mat-slide-toggle"]],viewQuery:function(t,n){if(t&1&&ie(mt,5),t&2){let s;ne(s=ae())&&(n._switchElement=s.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(t,n){t&2&&(te("id",n.id),O("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),oe(n.color?"mat-"+n.color:""),M("mat-mdc-slide-toggle-focused",n._focused)("mat-mdc-slide-toggle-checked",n.checked)("_mat-animation-noopable",n._noopAnimations))},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],required:[2,"required","required",T],color:"color",disabled:[2,"disabled","disabled",T],disableRipple:[2,"disableRipple","disableRipple",T],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:de(e)],checked:[2,"checked","checked",T],hideIcon:[2,"hideIcon","hideIcon",T],disabledInteractive:[2,"disabledInteractive","disabledInteractive",T]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[re([{provide:ye,useExisting:W(()=>a),multi:!0},{provide:xe,useExisting:a,multi:!0}]),G],ngContentSelectors:pt,decls:14,vars:27,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mat-mdc-slide-toggle-touch-target"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(t,n){if(t&1){let s=_();N(),o(0,"div",1)(1,"button",2,0),p("click",function(){return h(s),g(n._handleClick())}),x(3,"div",3)(4,"span",4),o(5,"span",5)(6,"span",6)(7,"span",7),x(8,"span",8),r(),o(9,"span",9),x(10,"span",10),r(),f(11,ht,5,0,"span",11),r()()(),o(12,"label",12),p("click",function(v){return h(s),g(v.stopPropagation())}),z(13),r()()}if(t&2){let s=S(2);u("labelPosition",n.labelPosition),c(),M("mdc-switch--selected",n.checked)("mdc-switch--unselected",!n.checked)("mdc-switch--checked",n.checked)("mdc-switch--disabled",n.disabled)("mat-mdc-slide-toggle-disabled-interactive",n.disabledInteractive),u("tabIndex",n.disabled&&!n.disabledInteractive?-1:n.tabIndex)("disabled",n.disabled&&!n.disabledInteractive),O("id",n.buttonId)("name",n.name)("aria-label",n.ariaLabel)("aria-labelledby",n._getAriaLabelledBy())("aria-describedby",n.ariaDescribedby)("aria-required",n.required||null)("aria-checked",n.checked)("aria-disabled",n.disabled&&n.disabledInteractive?"true":null),c(9),u("matRippleTrigger",s)("matRippleDisabled",n.disableRipple||n.disabled)("matRippleCentered",!0),c(),b(n.hideIcon?-1:11),c(),u("for",n.buttonId),O("id",n._labelId)}},dependencies:[Te,at],styles:[`.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative;width:var(--mat-slide-toggle-track-width, 52px)}.mdc-switch.mdc-switch--disabled{cursor:default;pointer-events:none}.mdc-switch.mat-mdc-slide-toggle-disabled-interactive{pointer-events:auto}.mdc-switch__track{overflow:hidden;position:relative;width:100%;height:var(--mat-slide-toggle-track-height, 32px);border-radius:var(--mat-slide-toggle-track-shape, var(--mat-sys-corner-full))}.mdc-switch--disabled.mdc-switch .mdc-switch__track{opacity:var(--mat-slide-toggle-disabled-track-opacity, 0.12)}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%;border-width:var(--mat-slide-toggle-track-outline-width, 2px);border-color:var(--mat-slide-toggle-track-outline-color, var(--mat-sys-outline))}.mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track::after{border-width:var(--mat-slide-toggle-selected-track-outline-width, 2px);border-color:var(--mat-slide-toggle-selected-track-outline-color, transparent)}.mdc-switch--disabled .mdc-switch__track::before,.mdc-switch--disabled .mdc-switch__track::after{border-width:var(--mat-slide-toggle-disabled-unselected-track-outline-width, 2px);border-color:var(--mat-slide-toggle-disabled-unselected-track-outline-color, var(--mat-sys-on-surface))}@media(forced-colors: active){.mdc-switch__track{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0);background:var(--mat-slide-toggle-unselected-track-color, var(--mat-sys-surface-variant))}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch--selected .mdc-switch__track::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::before{opacity:var(--mat-slide-toggle-hidden-track-opacity, 0);transition:var(--mat-slide-toggle-hidden-track-transition, opacity 75ms)}.mdc-switch--unselected .mdc-switch__track::before{opacity:var(--mat-slide-toggle-visible-track-opacity, 1);transition:var(--mat-slide-toggle-visible-track-transition, opacity 75ms)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mat-slide-toggle-unselected-hover-track-color, var(--mat-sys-surface-variant))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mat-slide-toggle-unselected-focus-track-color, var(--mat-sys-surface-variant))}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mat-slide-toggle-unselected-pressed-track-color, var(--mat-sys-surface-variant))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::before,.mdc-switch.mdc-switch--disabled .mdc-switch__track::before{background:var(--mat-slide-toggle-disabled-unselected-track-color, var(--mat-sys-surface-variant))}.mdc-switch__track::after{transform:translateX(-100%);background:var(--mat-slide-toggle-selected-track-color, var(--mat-sys-primary))}[dir=rtl] .mdc-switch__track::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::after{transform:translateX(0)}.mdc-switch--selected .mdc-switch__track::after{opacity:var(--mat-slide-toggle-visible-track-opacity, 1);transition:var(--mat-slide-toggle-visible-track-transition, opacity 75ms)}.mdc-switch--unselected .mdc-switch__track::after{opacity:var(--mat-slide-toggle-hidden-track-opacity, 0);transition:var(--mat-slide-toggle-hidden-track-transition, opacity 75ms)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mat-slide-toggle-selected-hover-track-color, var(--mat-sys-primary))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mat-slide-toggle-selected-focus-track-color, var(--mat-sys-primary))}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mat-slide-toggle-selected-pressed-track-color, var(--mat-sys-primary))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::after,.mdc-switch.mdc-switch--disabled .mdc-switch__track::after{background:var(--mat-slide-toggle-disabled-selected-track-color, var(--mat-sys-on-surface))}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0);width:calc(100% - var(--mat-slide-toggle-handle-width))}[dir=rtl] .mdc-switch__handle-track{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto;transition:width 75ms cubic-bezier(0.4, 0, 0.2, 1),height 75ms cubic-bezier(0.4, 0, 0.2, 1),margin 75ms cubic-bezier(0.4, 0, 0.2, 1);width:var(--mat-slide-toggle-handle-width);height:var(--mat-slide-toggle-handle-height);border-radius:var(--mat-slide-toggle-handle-shape, var(--mat-sys-corner-full))}[dir=rtl] .mdc-switch__handle{left:auto;right:0}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{width:var(--mat-slide-toggle-unselected-handle-size, 16px);height:var(--mat-slide-toggle-unselected-handle-size, 16px);margin:var(--mat-slide-toggle-unselected-handle-horizontal-margin, 0 8px)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-slide-toggle-unselected-with-icon-handle-horizontal-margin, 0 4px)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{width:var(--mat-slide-toggle-selected-handle-size, 24px);height:var(--mat-slide-toggle-selected-handle-size, 24px);margin:var(--mat-slide-toggle-selected-handle-horizontal-margin, 0 24px)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-slide-toggle-selected-with-icon-handle-horizontal-margin, 0 24px)}.mat-mdc-slide-toggle .mdc-switch__handle:has(.mdc-switch__icons){width:var(--mat-slide-toggle-with-icon-handle-size, 24px);height:var(--mat-slide-toggle-with-icon-handle-size, 24px)}.mat-mdc-slide-toggle .mdc-switch:active:not(.mdc-switch--disabled) .mdc-switch__handle{width:var(--mat-slide-toggle-pressed-handle-size, 28px);height:var(--mat-slide-toggle-pressed-handle-size, 28px)}.mat-mdc-slide-toggle .mdc-switch--selected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-slide-toggle-selected-pressed-handle-horizontal-margin, 0 22px)}.mat-mdc-slide-toggle .mdc-switch--unselected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-slide-toggle-unselected-pressed-handle-horizontal-margin, 0 2px)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__handle::after{opacity:var(--mat-slide-toggle-disabled-selected-handle-opacity, 1)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__handle::after{opacity:var(--mat-slide-toggle-disabled-unselected-handle-opacity, 0.38)}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media(forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-handle-color, var(--mat-sys-on-primary))}.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-hover-handle-color, var(--mat-sys-primary-container))}.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-focus-handle-color, var(--mat-sys-primary-container))}.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-pressed-handle-color, var(--mat-sys-primary-container))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:hover:not(:focus):not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:focus:not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:active .mdc-switch__handle::after,.mdc-switch--selected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-disabled-selected-handle-color, var(--mat-sys-surface))}.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-handle-color, var(--mat-sys-outline))}.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-hover-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-focus-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-pressed-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-disabled-unselected-handle-color, var(--mat-sys-on-surface))}.mdc-switch__handle::before{background:var(--mat-slide-toggle-handle-surface-color)}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mat-slide-toggle-handle-elevation-shadow)}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__shadow,.mdc-switch.mdc-switch--disabled .mdc-switch__shadow{box-shadow:var(--mat-slide-toggle-disabled-handle-elevation-shadow)}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1;width:var(--mat-slide-toggle-state-layer-size, 40px);height:var(--mat-slide-toggle-state-layer-size, 40px)}.mdc-switch__ripple::after{content:"";opacity:0}.mdc-switch--disabled .mdc-switch__ripple::after{display:none}.mat-mdc-slide-toggle-disabled-interactive .mdc-switch__ripple::after{display:block}.mdc-switch:hover .mdc-switch__ripple::after{transition:75ms opacity cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:focus .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:active .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:hover:not(:focus) .mdc-switch__ripple::after,.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mat-slide-toggle-unselected-hover-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-slide-toggle-unselected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background:var(--mat-slide-toggle-unselected-focus-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-slide-toggle-unselected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background:var(--mat-slide-toggle-unselected-pressed-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-slide-toggle-unselected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mat-slide-toggle-selected-hover-state-layer-color, var(--mat-sys-primary));opacity:var(--mat-slide-toggle-selected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background:var(--mat-slide-toggle-selected-focus-state-layer-color, var(--mat-sys-primary));opacity:var(--mat-slide-toggle-selected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background:var(--mat-slide-toggle-selected-pressed-state-layer-color, var(--mat-sys-primary));opacity:var(--mat-slide-toggle-selected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch__icons{position:relative;height:100%;width:100%;z-index:1;transform:translateZ(0)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__icons{opacity:var(--mat-slide-toggle-disabled-unselected-icon-opacity, 0.38)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__icons{opacity:var(--mat-slide-toggle-disabled-selected-icon-opacity, 0.38)}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--unselected .mdc-switch__icon{width:var(--mat-slide-toggle-unselected-icon-size, 16px);height:var(--mat-slide-toggle-unselected-icon-size, 16px);fill:var(--mat-slide-toggle-unselected-icon-color, var(--mat-sys-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mat-slide-toggle-disabled-unselected-icon-color, var(--mat-sys-surface-variant))}.mdc-switch--selected .mdc-switch__icon{width:var(--mat-slide-toggle-selected-icon-size, 16px);height:var(--mat-slide-toggle-selected-icon-size, 16px);fill:var(--mat-slide-toggle-selected-icon-color, var(--mat-sys-on-primary-container))}.mdc-switch--selected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mat-slide-toggle-disabled-selected-icon-color, var(--mat-sys-on-surface))}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{-webkit-user-select:none;user-select:none;display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-internal-form-field{color:var(--mat-slide-toggle-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-slide-toggle-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-slide-toggle-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-slide-toggle-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-slide-toggle-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-slide-toggle-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:var(--mat-slide-toggle-disabled-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-slide-toggle-touch-target{position:absolute;top:50%;left:50%;height:var(--mat-slide-toggle-touch-target-size, 48px);width:100%;transform:translate(-50%, -50%);display:var(--mat-slide-toggle-touch-target-display, block)}[dir=rtl] .mat-mdc-slide-toggle-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}
|
|
3
3
|
`],encapsulation:2,changeDetection:0})}return a})(),ot=(()=>{class a{static \u0275fac=function(t){return new(t||a)};static \u0275mod=Z({type:a});static \u0275inj=U({imports:[J,H,H]})}return a})();var j=[{id:"network",title:"Network",icon:"lan",description:"Ports and bind behavior. daimon always binds to 127.0.0.1 \u2014 never the LAN.",fields:[{key:"apiPort",label:"API port",kind:"number",help:"The port the daimon daemon serves the HTTP API and dashboard on. Default 4999. If something else is on this port, daimon refuses to start.",min:1024,max:65535,restartRequired:!0},{key:"portRange",label:"Dev server port range",kind:"number-pair",help:"Range of ports daimon hands out to apps when their config does not pin one. Ports outside this range will not be auto-assigned, but explicit pins in overrides[].port still work.",min:1024,max:65535},{key:"headless",label:"Headless mode",kind:"boolean",help:"When ON, daimon never opens the TUI in this daemon instance \u2014 useful when running as a background service. The CLI still works the same.",restartRequired:!0}]},{id:"discovery",title:"Discovery",icon:"travel_explore",description:"Which folders daimon scans for Angular / Nx / Vite / Storybook projects.",fields:[{key:"searchRoots",label:"Search roots",kind:"path-objects",help:"Absolute paths to workspace folders. daimon will look for nx.json / angular.json / vite.config.* / .storybook in each. Soft-reloaded on save \u2014 no daemon restart needed.",placeholder:"C:\\path\\to\\workspace"}]},{id:"apps",title:"Apps",icon:"apps",description:"Which apps run automatically and what runs together.",fields:[{key:"autoStart",label:"Auto-start apps",kind:"string-array",help:"Apps to start automatically when the daemon spawns. Match the discovered app names. Empty list means nothing auto-starts.",placeholder:"app-name"},{key:"cascadeRestart",label:"Cascade restart on error",kind:"boolean",help:"When ON, an app entering error state restarts any apps that depend on it. Use with caution if you have noisy compile errors."}]},{id:"healthProbe",title:"Health probe",icon:"monitor_heart",description:'How daimon decides an app is "healthy" \u2014 a HEAD/GET against the announced URL.',fields:[{key:"healthProbe.enabled",label:"Enabled",kind:"boolean",help:'Master switch. When OFF, "serving" is treated as the terminal state for daimon wait / daimon ensure.'},{key:"healthProbe.intervalMs",label:"Interval",kind:"number",help:"How often to re-probe a serving app. Lower values catch outages faster but spend CPU.",min:1e3,max:6e5,unit:"ms"},{key:"healthProbe.timeoutMs",label:"Per-probe timeout",kind:"number",help:"How long to wait for a single probe response before marking unhealthy.",min:200,max:3e4,unit:"ms"},{key:"healthProbe.path",label:"Path",kind:"string",help:'URL path to probe. "/" is fine for most apps; some Nx apps need "/index.html" or a custom health route.',placeholder:"/"},{key:"healthProbe.host",label:"Host override",kind:"string",help:'Optional. Force a specific host (e.g. "127.0.0.1") instead of what the dev server announced. Leave blank to use the announced host.',placeholder:"(announced)"},{key:"healthProbe.scheme",label:"Scheme override",kind:"enum",enumValues:["(announced)","http","https"],help:'Force a specific scheme. Leave on "(announced)" to use whatever the dev server printed in its "Local:" line.'},{key:"healthProbe.rejectUnauthorized",label:"Strict HTTPS certs",kind:"boolean",help:"When OFF, self-signed certs (mkcert, Vite's auto-cert) are accepted. v0.5 forces this OFF for loopback hosts regardless \u2014 this setting only affects off-loopback probes."}]},{id:"autoRestart",title:"Auto-restart",icon:"restart_alt",description:"How daimon recovers from crashed dev servers.",fields:[{key:"autoRestart.enabled",label:"Enabled",kind:"boolean",help:"When ON, daimon respawns an app that exits non-zero, up to the cap below."},{key:"autoRestart.maxAttempts",label:"Max attempts per window",kind:"number",help:"Stops retrying after this many consecutive restarts inside the time window. Prevents thrashing.",min:1,max:50},{key:"autoRestart.windowMs",label:"Retry window",kind:"number",help:'Time window over which max-attempts is counted. Resets after a successful "serving" state.',min:1e4,max:36e5,unit:"ms"}]},{id:"history",title:"History",icon:"history",description:"Persistent SQLite database of events, compile times, and task runs.",fields:[{key:"history.enabled",label:"Enabled",kind:"boolean",help:"When OFF, daimon still tracks live state but does not persist history across daemon restarts.",restartRequired:!0},{key:"history.path",label:"Database path",kind:"path",help:"Where the SQLite file lives. Defaults to ~/.daimon/history.db. Use forward slashes or the path syntax of your OS.",restartRequired:!0},{key:"history.retentionDays",label:"Retention",kind:"number",help:"Days of history to keep. Older rows are purged at startup. 0 disables pruning.",min:0,max:3650,unit:"days"}]},{id:"notifications",title:"Desktop notifications",icon:"notifications",description:"OS notifications via node-notifier. Disable if they're too noisy.",fields:[{key:"notifications.enabled",label:"Enabled",kind:"boolean",help:"Master switch for desktop notifications."},{key:"notifications.onError",label:"On compile error",kind:"boolean",help:'Notify when an app transitions into "error" state.'},{key:"notifications.onUnhealthy",label:"On health failure",kind:"boolean",help:"Notify when an app fails its health probe enough times to flip to unhealthy."},{key:"notifications.tray",label:"Show tray icon",kind:"boolean",help:"Reserve space in the OS tray (where supported). Most users leave this off."}]},{id:"staleDetect",title:"Stale detection",icon:"hourglass_empty",description:"Flag apps that have gone quiet without printing anything.",fields:[{key:"staleDetect.enabled",label:"Enabled",kind:"boolean",help:'When ON, daimon marks an app "stale" if it has not printed output for the duration below \u2014 useful for catching hung dev servers.'},{key:"staleDetect.silentMs",label:"Silent threshold",kind:"number",help:"Quiet duration before marking stale. Most dev servers print at least heartbeats, so 30s is a safe default.",min:5e3,max:6e5,unit:"ms"}]},{id:"logs",title:"Log persistence",icon:"description",description:"Save app stdout/stderr to disk for later inspection.",fields:[{key:"logs.enabled",label:"Enabled",kind:"boolean",help:"When ON, daimon writes per-app log files to the directory below. Default OFF \u2014 daimon already keeps the last 500 lines per app in memory for the dashboard."},{key:"logs.dir",label:"Directory",kind:"path",help:"Where rotated log files live. Defaults to ~/.daimon/logs."},{key:"logs.maxFiles",label:"Files per app",kind:"number",help:"Rotation depth. After this many files, the oldest is deleted.",min:1,max:100},{key:"logs.maxBytesPerFile",label:"Max size per file",kind:"number",help:"Rotate when a single file reaches this many bytes. 10000000 = 10 MB.",min:1e5,max:1e9,unit:"bytes"}]},{id:"requestLog",title:"Request log (proxy)",icon:"compare_arrows",description:"Reverse-proxy your dev server through a sibling port to capture every HTTP request.",fields:[{key:"requestLog.enabled",label:"Enabled",kind:"boolean",help:"When ON, daimon proxies the dev server on a sibling port (announced port + offset). The Requests page becomes useful. OFF by default because it adds a hop.",restartRequired:!0},{key:"requestLog.portOffset",label:"Proxy port offset",kind:"number",help:"Added to the app's dev-server port to compute the proxy port (e.g. dev=4200 + offset=1000 \u2192 5200).",min:100,max:5e4,restartRequired:!0}]},{id:"metrics",title:"Prometheus metrics",icon:"monitoring",description:"Expose CPU / memory / status / compile-time as Prometheus text on /metrics.",fields:[{key:"metrics.enabled",label:"Enabled",kind:"boolean",help:"Turn this on if you scrape the dashboard with Prometheus. The /metrics endpoint stays loopback-only \u2014 no remote scraping."}]},{id:"dashboard",title:"Dashboard",icon:"tune",description:"How this web UI looks. Applies after page reload.",fields:[{key:"dashboard.theme",label:"Theme",kind:"enum",enumValues:["auto","light","dark"],help:'"auto" follows your OS preference. The theme toggle in the topbar overrides this per-browser via localStorage.'},{key:"dashboard.density",label:"Density",kind:"enum",enumValues:["comfortable","compact"],help:"Material 3 density. Compact shows more rows per screen at the cost of click targets."}]},{id:"output",title:"CLI output",icon:"terminal",description:"Defaults for the daimon CLI (the `daimon list` / `status` / `errors` you invoke from a shell).",fields:[{key:"output.format",label:"Default format",kind:"enum",enumValues:["compact","full"],help:'"compact" returns ~10 fields per app, optimized for agents. "full" returns the v0.4 verbose shape. The --full / --compact flags at the call site always win.'},{key:"output.ndjson",label:"Default NDJSON",kind:"boolean",help:"When ON, `daimon list` emits one JSON record per line instead of a single JSON array."}]},{id:"doctor",title:"Doctor auto-fix",icon:"medical_services",description:"Which repair routines `daimon doctor --auto-fix` is allowed to run.",fields:[{key:"doctor.autoFix.onInit",label:"Run after `daimon init`",kind:"boolean",help:"When ON, daimon will run auto-fix at the end of `daimon init`. Most users leave this OFF \u2014 init only writes a config file and doesn't need fixes."},{key:"doctor.autoFix.permitted",label:"Allowed routines",kind:"string-array",help:"Subset of: orphan-daemon, stale-lock, missing-search-root, corrupt-history-db. Removing a name disables that routine entirely."}]},{id:"editor",title:"Editor integration",icon:"edit_note",description:"How clicking on error file paths opens your editor.",fields:[{key:"editor.scheme",label:"URL scheme",kind:"enum",enumValues:["vscode","vscode-insiders","cursor","jetbrains"],help:"When you click a file:line:col in the dashboard, daimon opens `<scheme>://file/<path>:<line>:<col>`. Pick the editor you actually use."}]},{id:"auth",title:"API authentication",icon:"lock",description:"Optional bearer token. Most users leave this empty since daimon is loopback-only.",fields:[{key:"apiToken",label:"Bearer token",kind:"token",help:"When set, mutating endpoints require an Authorization: Bearer <token> header. The CLI reads this from DAIMON_TOKEN env var. Leave blank if you trust everything on this machine.",restartRequired:!0}]}];function I(a,i){let e=i.split("."),t=a;for(let n of e){if(t==null)return;t=t[n]}return t}function rt(a,i,e){let t=i.split("."),n=a;for(let s=0;s<t.length-1;s++){let m=t[s];(n[m]==null||typeof n[m]!="object")&&(n[m]={}),n=n[m]}n[t[t.length-1]]=e}var _t=(a,i)=>i.id,ft=(a,i)=>i.key;function bt(a,i){if(a&1&&(d(0," \xB7 "),o(1,"dm-mono"),d(2),r()),a&2){let e=l();c(2),P("etag ",e.etag().slice(0,8))}}function vt(a,i){if(a&1){let e=_();o(0,"button",18),p("click",function(){h(e);let n=l();return g(n.discard())}),o(1,"mat-icon",7),d(2,"undo"),r(),d(3," Discard "),r()}}function yt(a,i){a&1&&x(0,"mat-spinner",12)}function wt(a,i){a&1&&(o(0,"mat-icon",7),d(1,"save"),r())}function xt(a,i){if(a&1){let e=_();o(0,"div",13)(1,"mat-icon",7),d(2,"sync_problem"),r(),o(3,"div")(4,"strong"),d(5,"Config changed elsewhere."),r(),d(6," Your local edits are stale. Reload to pull the latest, then re-apply. "),r(),o(7,"button",19),p("click",function(){h(e);let n=l();return g(n.reload())}),d(8,"Reload"),r()()}}function Ct(a,i){if(a&1&&(o(0,"span",20)(1,"dm-mono"),d(2),r()()),a&2){let e=i.$implicit;c(2),C(e)}}function kt(a,i){if(a&1&&(o(0,"div",14)(1,"mat-icon",7),d(2,"restart_alt"),r(),o(3,"div")(4,"strong"),d(5,"Some changes need a daemon restart to take effect."),r(),k(6,Ct,3,1,"span",20,A),r(),x(8,"span"),r()),a&2){let e=l();c(6),E(e.restartHints())}}function Et(a,i){a&1&&(o(0,"div",15),x(1,"dm-skeleton",21)(2,"dm-skeleton",22)(3,"dm-skeleton",22)(4,"dm-skeleton",22),r())}function St(a,i){a&1&&(o(0,"span",32),d(1,"restart"),r())}function Mt(a,i){a&1&&(o(0,"span",33),d(1,"modified"),r())}function Tt(a,i){if(a&1){let e=_();o(0,"mat-slide-toggle",41),p("change",function(n){h(e);let s=l().$implicit,m=l(3);return g(m.setVal(s.key,n.checked))}),d(1),r()}if(a&2){let e=l().$implicit,t=l(3);u("checked",!!t.getVal(e.key)),c(),P(" ",t.getVal(e.key)?"On":"Off"," ")}}function Ft(a,i){if(a&1&&(o(0,"span",43),d(1),r()),a&2){let e=l(2).$implicit;c(),C(e.unit)}}function Ot(a,i){if(a&1){let e=_();o(0,"mat-form-field",36)(1,"input",42),p("input",function(n){h(e);let s=l().$implicit,m=l(3);return g(m.setVal(s.key,m.toNum(n.target.value)))}),r(),f(2,Ft,2,1,"span",43),r()}if(a&2){let e=l().$implicit,t=l(3);c(),u("min",e.min??null)("max",e.max??null)("value",t.getVal(e.key)),c(),b(e.unit?2:-1)}}function It(a,i){if(a&1){let e=_();o(0,"div",37)(1,"mat-form-field",36)(2,"mat-label"),d(3,"min"),r(),o(4,"input",42),p("input",function(n){h(e);let s=l().$implicit,m=l(3);return g(m.setPairIdx(s.key,0,m.toNum(n.target.value)))}),r()(),o(5,"span",44),d(6,"\u2013"),r(),o(7,"mat-form-field",36)(8,"mat-label"),d(9,"max"),r(),o(10,"input",42),p("input",function(n){h(e);let s=l().$implicit,m=l(3);return g(m.setPairIdx(s.key,1,m.toNum(n.target.value)))}),r()()()}if(a&2){let e=l().$implicit,t=l(3);c(4),u("min",e.min??null)("max",e.max??null)("value",t.getPair(e.key)[0]),c(6),u("min",e.min??null)("max",e.max??null)("value",t.getPair(e.key)[1])}}function Pt(a,i){if(a&1){let e=_();o(0,"mat-form-field",36)(1,"input",45),p("input",function(n){h(e);let s=l().$implicit,m=l(3);return g(m.setVal(s.key,n.target.value||(s.kind==="string"?"":null)))}),r()()}if(a&2){let e=l().$implicit,t=l(3);c(),u("placeholder",e.placeholder??"")("value",t.getStrOrEmpty(e.key))}}function Vt(a,i){if(a&1){let e=_();o(0,"mat-form-field",36)(1,"input",46),p("input",function(n){h(e);let s=l().$implicit,m=l(3);return g(m.setVal(s.key,n.target.value))}),r()()}if(a&2){let e=l().$implicit,t=l(3);c(),u("placeholder",e.placeholder??"")("value",t.getStrOrEmpty(e.key))}}function Dt(a,i){if(a&1){let e=_();o(0,"mat-form-field",36)(1,"input",47),p("input",function(n){h(e);let s=l().$implicit,m=l(3);return g(m.setVal(s.key,n.target.value||null))}),r(),o(2,"button",48),p("click",function(){h(e);let n=l(4);return g(n.showToken.set(!n.showToken()))}),o(3,"mat-icon",7),d(4),r()()()}if(a&2){let e=l().$implicit,t=l(3);c(),u("type",t.showToken()?"text":"password")("placeholder","(unset)")("value",t.getStrOrEmpty(e.key)),c(),O("aria-label",t.showToken()?"Hide token":"Show token"),c(2),C(t.showToken()?"visibility_off":"visibility")}}function Rt(a,i){if(a&1&&(o(0,"mat-button-toggle",49),d(1),r()),a&2){let e=i.$implicit;u("value",e),c(),C(e)}}function At(a,i){if(a&1){let e=_();o(0,"mat-button-toggle-group",5),p("change",function(n){h(e);let s=l().$implicit,m=l(3);return g(m.setEnum(s,n.value))}),k(1,Rt,2,2,"mat-button-toggle",49,A),r()}if(a&2){let e=l().$implicit,t=l(3);u("value",t.enumValue(e.key,e)),c(),E(e.enumValues)}}function Nt(a,i){if(a&1){let e=_();o(0,"mat-chip",53),p("removed",function(){let n=h(e).$index,s=l(2).$implicit,m=l(3);return g(m.removeAt(s.key,n))}),o(1,"dm-mono"),d(2),r(),o(3,"button",54)(4,"mat-icon",7),d(5,"cancel"),r()()()}if(a&2){let e=i.$implicit;u("removable",!0),c(2),C(e)}}function zt(a,i){if(a&1){let e=_();o(0,"div",39)(1,"mat-chip-set"),k(2,Nt,6,2,"mat-chip",50,A),r(),o(4,"mat-form-field",51)(5,"input",52,0),p("keydown.enter",function(n){h(e);let s=S(6),m=l().$implicit;return l(3).addItem(m.key,s.value),s.value="",g(n.preventDefault())}),r(),o(7,"button",48),p("click",function(){h(e);let n=S(6),s=l().$implicit;return l(3).addItem(s.key,n.value),g(n.value="")}),o(8,"mat-icon",7),d(9,"add"),r()()()()}if(a&2){let e=l().$implicit,t=l(3);c(2),E(t.getArr(e.key)),c(3),u("placeholder",e.placeholder??"Add value and press Enter")}}function $t(a,i){if(a&1){let e=_();o(0,"div",55)(1,"mat-form-field",57)(2,"input",58),p("input",function(n){let s=h(e).$index,m=l(2).$implicit,v=l(3);return g(v.setObjAt(m.key,s,"path",n.target.value))}),r()(),o(3,"mat-form-field",59)(4,"mat-label"),d(5,"label"),r(),o(6,"input",60),p("input",function(n){let s=h(e).$index,m=l(2).$implicit,v=l(3);return g(v.setObjAt(m.key,s,"label",n.target.value||null))}),r()(),o(7,"button",61),p("click",function(){let n=h(e).$index,s=l(2).$implicit,m=l(3);return g(m.removeAt(s.key,n))}),o(8,"mat-icon",7),d(9,"delete"),r()()()}if(a&2){let e=i.$implicit;c(2),u("value",e.path),c(4),u("value",e.label??"")}}function jt(a,i){if(a&1){let e=_();o(0,"div",39),k(1,$t,10,2,"div",55,ee),o(3,"mat-form-field",51)(4,"input",56,1),p("keydown.enter",function(n){h(e);let s=S(5),m=l().$implicit;return l(3).addObj(m.key,s.value),s.value="",g(n.preventDefault())}),r(),o(6,"button",48),p("click",function(){h(e);let n=S(5),s=l().$implicit;return l(3).addObj(s.key,n.value),g(n.value="")}),o(7,"mat-icon",7),d(8,"add"),r()()()()}if(a&2){let e=l().$implicit,t=l(3);c(),E(t.getObjArr(e.key)),c(3),u("placeholder",e.placeholder??"Add absolute path and press Enter")}}function Lt(a,i){if(a&1&&(o(0,"div",29)(1,"div",30)(2,"label",31),d(3),r(),f(4,St,2,0,"span",32),f(5,Mt,2,0,"span",33),r(),o(6,"div",34),f(7,Tt,2,2,"mat-slide-toggle",35)(8,Ot,3,4,"mat-form-field",36)(9,It,11,6,"div",37)(10,Pt,2,2,"mat-form-field",36)(11,Vt,2,2,"mat-form-field",36)(12,Dt,5,5,"mat-form-field",36)(13,At,3,1,"mat-button-toggle-group",38)(14,zt,10,1,"div",39)(15,jt,9,1,"div",39),r(),o(16,"div",40),d(17),r()()),a&2){let e,t=i.$implicit,n=l(3);M("dm-field-dirty",n.isFieldDirty(t.key)),c(3),C(t.label),c(),b(t.restartRequired?4:-1),c(),b(n.isFieldDirty(t.key)?5:-1),c(2),b((e=t.kind)==="boolean"?7:e==="number"?8:e==="number-pair"?9:e==="string"?10:e==="path"?11:e==="token"?12:e==="enum"?13:e==="string-array"?14:e==="path-objects"?15:-1),c(10),C(t.help)}}function qt(a,i){if(a&1){let e=_();o(0,"mat-expansion-panel",25),p("afterExpand",function(){let n=h(e).$implicit,s=l(2);return g(s.onExpand(n.id,!0))})("afterCollapse",function(){let n=h(e).$implicit,s=l(2);return g(s.onExpand(n.id,!1))}),o(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"mat-icon",7),d(4),r(),o(5,"span",26),d(6),r()(),o(7,"mat-panel-description"),d(8),r()(),o(9,"div",27),k(10,Lt,18,7,"div",28,ft),r()()}if(a&2){let e=i.$implicit,t=l(2);u("expanded",t.isExpanded(e.id)),c(4),C(e.icon),c(2),C(e.title),c(2),P(" ",e.description," "),c(2),E(e.fields)}}function Bt(a,i){if(a&1&&(o(0,"div",16),k(1,qt,12,4,"mat-expansion-panel",23,_t),o(3,"section",24)(4,"p"),d(5," Some settings \u2014 "),o(6,"strong"),d(7,"overrides"),r(),d(8,", "),o(9,"strong"),d(10,"profiles"),r(),d(11,", "),o(12,"strong"),d(13,"tags"),r(),d(14,", "),o(15,"strong"),d(16,"depends"),r(),d(17,", "),o(18,"strong"),d(19,"envFiles"),r(),d(20," \u2014 are per-app dictionaries best edited as JSON. Switch to the JSON tab in the header to edit them. "),r()()()),a&2){let e=l();c(),E(e.sections)}}function Ht(a,i){if(a&1&&(o(0,"span",63)(1,"mat-icon",7),d(2,"error"),r(),d(3),r()),a&2){let e=l(2);c(3),P(" invalid JSON \xB7 ",e.parseError()," ")}}function Jt(a,i){a&1&&(o(0,"span",64)(1,"mat-icon",7),d(2,"check_circle"),r(),d(3," valid JSON "),r())}function Wt(a,i){if(a&1){let e=_();o(0,"div",17)(1,"div",62),f(2,Ht,4,1,"span",63)(3,Jt,4,0,"span",64),r(),o(4,"mat-form-field",65)(5,"textarea",66),p("ngModelChange",function(n){h(e);let s=l();return g(s.onJsonInput(n))}),r()()()}if(a&2){let e=l();c(2),b(e.parseError()?2:3),c(3),u("ngModel",e.jsonText())}}var st="daimon.config.mode",lt=class a{http=y(me);snack=y(Ve);sections=j;mode=w("form");loading=w(!0);saving=w(!1);etag=w("");original=w(null);working=w(null);jsonText=w("");conflict=w(!1);showToken=w(!1);expanded=w({});dirty=V(()=>JSON.stringify(this.working())!==JSON.stringify(this.original()));parseError=V(()=>{if(this.mode()!=="json")return null;try{return JSON.parse(this.jsonText()),null}catch(i){return i?.message??"parse error"}});canSave=V(()=>!this.saving()&&!this.loading()&&this.dirty()&&!this.parseError());restartHints=V(()=>{let i=this.original(),e=this.working();if(!i||!e)return[];let t=[];for(let n of j)for(let s of n.fields)s.restartRequired&&JSON.stringify(I(i,s.key))!==JSON.stringify(I(e,s.key))&&t.push(s.key);return t});async ngOnInit(){try{let e=localStorage.getItem(st);(e==="form"||e==="json")&&this.mode.set(e)}catch{}let i={};for(let e of j)i[e.id]=["network","discovery","healthProbe"].includes(e.id);this.expanded.set(i),await this.load()}setMode(i){if(i!==this.mode()){if(i==="json")this.jsonText.set(JSON.stringify(this.working(),null,2));else if(this.parseError()===null)try{this.working.set(JSON.parse(this.jsonText()))}catch{}else{this.snack.open("Fix the JSON parse error before switching back to the form view.","OK",{duration:4e3});return}this.mode.set(i);try{localStorage.setItem(st,i)}catch{}}}onJsonInput(i){this.jsonText.set(i);try{this.working.set(JSON.parse(i))}catch{}}isExpanded(i){return!!this.expanded()[i]}onExpand(i,e){this.expanded.update(t=>q(L({},t),{[i]:e}))}getVal(i){return I(this.working(),i)}getStrOrEmpty(i){let e=this.getVal(i);return e==null?"":String(e)}getArr(i){let e=this.getVal(i);return Array.isArray(e)?e:[]}getObjArr(i){let e=this.getVal(i);return Array.isArray(e)?e.map(t=>typeof t=="string"?{path:t}:{path:String(t?.path??""),label:t?.label??null}):[]}setObjAt(i,e,t,n){let s=this.getObjArr(i);if(!s[e])return;let m=s.slice();m[e]=q(L({},m[e]),{[t]:n}),t==="label"&&(n===""||n==null)&&delete m[e].label,this.setVal(i,m)}addObj(i,e){let t=e.trim();if(!t)return;let n=this.getObjArr(i);n.some(s=>s.path===t)||this.setVal(i,[...n,{path:t}])}getPair(i){let e=this.getVal(i);return Array.isArray(e)&&e.length>=2?[Number(e[0])||0,Number(e[1])||0]:[0,0]}setVal(i,e){let t=structuredClone(this.working());rt(t,i,e),this.working.set(t)}setPairIdx(i,e,t){let n=this.getPair(i);n[e]=t,this.setVal(i,n)}setEnum(i,e){if(i.key.startsWith("healthProbe.")&&(i.key.endsWith(".scheme")||i.key.endsWith(".host"))){this.setVal(i.key,e==="(announced)"?null:e);return}this.setVal(i.key,e)}enumValue(i,e){let t=this.getVal(i);return t==null&&e.enumValues?.includes("(announced)")?"(announced)":String(t??e.enumValues?.[0]??"")}addItem(i,e){let t=e.trim();if(!t)return;let n=[...this.getArr(i)];n.includes(t)||(n.push(t),this.setVal(i,n))}removeAt(i,e){let t=this.getVal(i);if(!Array.isArray(t))return;let n=t.slice();n.splice(e,1),this.setVal(i,n)}toNum(i){let e=Number(i);return Number.isFinite(e)?e:0}isFieldDirty(i){let e=this.original(),t=this.working();return!e||!t?!1:JSON.stringify(I(e,i))!==JSON.stringify(I(t,i))}async load(){this.loading.set(!0),this.conflict.set(!1);try{let i=await R(this.http.get("/api/config"));this.etag.set(i.etag??""),this.original.set(structuredClone(i.config)),this.working.set(structuredClone(i.config)),this.jsonText.set(JSON.stringify(i.config,null,2))}catch(i){this.snack.open(`Failed to load config: ${i?.message??i}`,"Dismiss",{duration:5e3})}finally{this.loading.set(!1)}}discard(){this.working.set(structuredClone(this.original())),this.jsonText.set(JSON.stringify(this.original(),null,2)),this.conflict.set(!1)}async reload(){try{await R(this.http.post("/api/config/reload",{}))}catch{}await this.load()}async save(){if(this.canSave()){this.saving.set(!0);try{let i=await R(this.http.patch("/api/config",this.working(),{headers:{"if-match":this.etag(),"content-type":"application/json"},observe:"response"})),e=i.body??{},t=i.headers.get("etag")??e.etag??"";t&&this.etag.set(t),this.original.set(structuredClone(this.working()));let n=Array.isArray(e.applied)?e.applied.length:0,s=Array.isArray(e.addedApps)?e.addedApps.length:0,m=Array.isArray(e.removedApps)?e.removedApps.length:0,v=Array.isArray(e.restartRequired)?e.restartRequired.length:0,D=`Applied ${n} change${n===1?"":"s"}`;s&&(D+=` \xB7 +${s} app${s===1?"":"s"}`),m&&(D+=` \xB7 \u2212${m} app${m===1?"":"s"}`),v&&(D+=` \xB7 ${v} setting${v===1?"":"s"} need restart`),this.snack.open(D,"OK",{duration:4e3})}catch(i){i?.status===412?(this.conflict.set(!0),this.snack.open("Config changed elsewhere \u2014 reload before saving.","Reload",{duration:6e3}).onAction().subscribe(()=>this.reload())):this.snack.open(`Save failed: ${i?.error?.error??i?.message??i}`,"Dismiss",{duration:6e3})}finally{this.saving.set(!1)}}}onKey(i){(i.metaKey||i.ctrlKey)&&i.key.toLowerCase()==="s"&&(i.preventDefault(),this.save())}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=F({type:a,selectors:[["dm-config-editor"]],hostBindings:function(e,t){e&1&&p("keydown",function(s){return t.onKey(s)},Y)},decls:31,vars:8,consts:[["addInput",""],["addObjInput",""],[1,"dm-page-header"],[1,"dm-page-sub"],[1,"dm-header-actions"],["hideSingleSelectionIndicator","",3,"change","value"],["value","form","matTooltip","Form editor with explanations"],["fontSet","material-symbols-outlined"],["value","json","matTooltip","Raw JSON editor"],["mat-button","","matTooltip","Throw away pending changes"],["mat-button","","matTooltip","Reload from daemon",3,"click"],["mat-flat-button","","color","primary",3,"click","disabled"],["diameter","18"],[1,"dm-banner","dm-banner-warn"],[1,"dm-banner","dm-banner-info"],[1,"dm-skel"],[1,"dm-settings"],[1,"dm-json"],["mat-button","","matTooltip","Throw away pending changes",3,"click"],["mat-stroked-button","",3,"click"],[1,"dm-restart-key"],["height","3rem"],["height","14rem"],[3,"expanded"],[1,"dm-advanced-note"],[3,"afterExpand","afterCollapse","expanded"],[1,"dm-sec-title"],[1,"dm-fields"],[1,"dm-field",3,"dm-field-dirty"],[1,"dm-field"],[1,"dm-field-label-row"],[1,"dm-field-label"],["matTooltip","A daemon restart applies this",1,"dm-field-tag"],[1,"dm-field-tag","dm-tag-dirty"],[1,"dm-field-control"],[3,"checked"],["appearance","outline","subscriptSizing","dynamic"],[1,"dm-pair"],["hideSingleSelectionIndicator","",3,"value"],[1,"dm-array"],[1,"dm-field-help"],[3,"change","checked"],["matInput","","type","number",3,"input","min","max","value"],["matTextSuffix","",1,"dm-suffix"],[1,"dm-pair-sep"],["matInput","",3,"input","placeholder","value"],["matInput","",1,"dm-mono",3,"input","placeholder","value"],["matInput","",3,"input","type","placeholder","value"],["matSuffix","","mat-icon-button","","type","button",3,"click"],[3,"value"],[3,"removable"],["appearance","outline","subscriptSizing","dynamic",1,"dm-array-input"],["matInput","",3,"keydown.enter","placeholder"],[3,"removed","removable"],["matChipRemove",""],[1,"dm-path-row"],["matInput","",1,"dm-mono",3,"keydown.enter","placeholder"],["appearance","outline","subscriptSizing","dynamic",1,"dm-path-input"],["matInput","",1,"dm-mono",3,"input","value"],["appearance","outline","subscriptSizing","dynamic",1,"dm-path-label"],["matInput","",3,"input","value"],["mat-icon-button","","type","button","matTooltip","Remove",3,"click"],[1,"dm-json-status"],[1,"dm-status","dm-status-bad"],[1,"dm-status","dm-status-ok"],["appearance","outline",1,"dm-json-field"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","20","spellcheck","false",3,"ngModelChange","ngModel"]],template:function(e,t){e&1&&(o(0,"div",2)(1,"div")(2,"h1"),d(3,"Config"),r(),o(4,"div",3),d(5," Active configuration \xB7 changes apply via soft-reload where possible "),f(6,bt,3,1),r()(),o(7,"div",4)(8,"mat-button-toggle-group",5),p("change",function(s){return t.setMode(s.value)}),o(9,"mat-button-toggle",6)(10,"mat-icon",7),d(11,"tune"),r(),d(12," Settings "),r(),o(13,"mat-button-toggle",8)(14,"mat-icon",7),d(15,"data_object"),r(),d(16," JSON "),r()(),f(17,vt,4,0,"button",9),o(18,"button",10),p("click",function(){return t.reload()}),o(19,"mat-icon",7),d(20,"refresh"),r(),d(21," Reload "),r(),o(22,"button",11),p("click",function(){return t.save()}),f(23,yt,1,0,"mat-spinner",12)(24,wt,2,0,"mat-icon",7),d(25," Save "),r()()(),f(26,xt,9,0,"div",13),f(27,kt,9,0,"div",14),f(28,Et,5,0,"div",15)(29,Bt,21,0,"div",16)(30,Wt,6,2,"div",17)),e&2&&(c(6),b(t.etag()?6:-1),c(2),u("value",t.mode()),c(9),b(t.dirty()?17:-1),c(5),u("disabled",!t.canSave()),c(),b(t.saving()?23:24),c(3),b(t.conflict()?26:-1),c(),b(t.restartHints().length?27:-1),c(),b(t.loading()?28:t.mode()==="form"?29:30))},dependencies:[ce,Ee,we,Ce,ke,Pe,Ie,Oe,_e,ue,ve,be,$e,ze,Ae,Ne,He,Be,Le,je,ot,J,it,et,tt,Ke,We,Je,Ue,Ze,Xe,Ge,Ye,Qe,Me,Se,qe,De,Re],styles:["[_nghost-%COMP%]{display:block}.dm-header-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.dm-banner[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr auto;gap:.75rem;align-items:center;padding:12px 16px;border-radius:12px;margin-bottom:1rem}.dm-banner-warn[_ngcontent-%COMP%]{background:color-mix(in oklch,var(--mat-sys-error) 14%,transparent);color:var(--mat-sys-on-surface);border:1px solid color-mix(in oklch,var(--mat-sys-error) 35%,transparent)}.dm-banner-warn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--mat-sys-error)}.dm-banner-info[_ngcontent-%COMP%]{background:color-mix(in oklch,var(--mat-sys-tertiary) 14%,transparent);color:var(--mat-sys-on-surface);border:1px solid color-mix(in oklch,var(--mat-sys-tertiary) 35%,transparent)}.dm-banner-info[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--mat-sys-tertiary)}.dm-restart-key[_ngcontent-%COMP%]{margin-left:.35rem}.dm-skel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.dm-settings[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.dm-sec-title[_ngcontent-%COMP%]{margin-left:.5rem;font:500 .9375rem/1.25rem Roboto}mat-expansion-panel[_ngcontent-%COMP%]{border-radius:12px!important;box-shadow:var(--mat-sys-level1)!important}mat-expansion-panel-header[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--mat-sys-primary)}mat-panel-description[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant);font:400 .8125rem/1.25rem Roboto}.dm-fields[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.875rem;padding:.25rem 0}.dm-field[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,200px) 1fr;gap:.125rem 1.25rem;align-items:start}.dm-field-label-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.35rem;flex-wrap:wrap;padding-top:.4rem}.dm-field-label[_ngcontent-%COMP%]{font:500 .875rem/1.25rem Roboto;color:var(--mat-sys-on-surface)}.dm-field-tag[_ngcontent-%COMP%]{font:500 .625rem/.875rem Roboto;letter-spacing:.04em;text-transform:uppercase;padding:1px 6px;border-radius:999px;background:var(--mat-sys-surface-container);color:var(--mat-sys-on-surface-variant);border:1px solid var(--mat-sys-outline-variant)}.dm-tag-dirty[_ngcontent-%COMP%]{background:color-mix(in oklch,var(--mat-sys-tertiary) 18%,transparent);color:var(--mat-sys-tertiary);border-color:color-mix(in oklch,var(--mat-sys-tertiary) 40%,transparent)}.dm-field-help[_ngcontent-%COMP%]{grid-column:2;color:var(--mat-sys-on-surface-variant);font:400 .75rem/1.125rem Roboto;max-width:64ch;margin-top:-.125rem}.dm-field-dirty[_ngcontent-%COMP%] .dm-field-label[_ngcontent-%COMP%]{color:var(--mat-sys-tertiary)}.dm-pair[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.dm-pair-sep[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant)}.dm-suffix[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant);margin-left:.25rem;font:400 .75rem/1rem Roboto}.dm-array[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.dm-array-input[_ngcontent-%COMP%]{max-width:32rem}.dm-path-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) 12rem auto;gap:.5rem;align-items:center}.dm-path-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-family:var(--dm-mono)}@media(max-width:700px){.dm-path-row[_ngcontent-%COMP%]{grid-template-columns:1fr}}.dm-mono[_ngcontent-%COMP%] input.dm-mono[_ngcontent-%COMP%], input.dm-mono[_ngcontent-%COMP%]{font-family:var(--dm-mono)}.dm-advanced-note[_ngcontent-%COMP%]{margin-top:.5rem;padding:1rem 1.25rem;background:var(--mat-sys-surface-container);border-radius:12px;color:var(--mat-sys-on-surface-variant);font:400 .875rem/1.5rem Roboto}.dm-json[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.dm-json-status[_ngcontent-%COMP%]{display:flex;gap:.5rem}.dm-status[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.35rem;font:500 .75rem/1rem Roboto;padding:4px 10px;border-radius:999px;background:var(--mat-sys-surface-container)}.dm-status[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.dm-status-ok[_ngcontent-%COMP%]{color:var(--mat-sys-primary)}.dm-status-bad[_ngcontent-%COMP%]{color:var(--mat-sys-error)}.dm-json-field[_ngcontent-%COMP%]{width:100%}.dm-json-field[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{font-family:var(--dm-mono);font-size:.8125rem;line-height:1.5}@media(max-width:900px){.dm-field[_ngcontent-%COMP%]{grid-template-columns:1fr}.dm-field-help[_ngcontent-%COMP%]{grid-column:1}}"],changeDetection:0})};export{lt as ConfigEditorComponent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u,b as Ce,c as f,d as Re,e as ye,f as F,g as xe}from"./chunk-B2DPS6BL.js";import{l as C,m as g,n as we,o as Se,p as T}from"./chunk-EBGPIJ7S.js";import{$ as k,$b as de,C as A,Ca as z,D as m,Fc as ge,Gc as me,Ic as ve,J as N,O as W,Ob as ne,Pb as oe,Qb as se,R as j,T as x,U,V as v,Xb as le,Yb as ae,_ as H,_a as X,_b as ce,aa as D,ac as he,ca as b,d as M,ea as o,eb as p,f as R,fb as K,fc as ue,gb as J,gc as fe,hb as O,i as h,ib as ee,k as I,l as L,lb as te,na as G,o as y,oa as Z,pa as $,pb as ie,q as P,qb as E,rb as _,sb as V,sc as S,ta as w,xa as Y,xc as pe,ya as q,za as Q,zb as re,zc as _e}from"./chunk-O76B43BY.js";var Ee=["contentWrapper"],Ve=["*"],ze=new b("VIRTUAL_SCROLL_STRATEGY"),B=class{_scrolledIndexChange=new h;scrolledIndexChange=this._scrolledIndexChange.pipe(N());_viewport=null;_itemSize;_minBufferPx;_maxBufferPx;constructor(a,e,t){this._itemSize=a,this._minBufferPx=e,this._maxBufferPx=t}attach(a){this._viewport=a,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(a,e,t){t<e,this._itemSize=a,this._minBufferPx=e,this._maxBufferPx=t,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(a,e){this._viewport&&this._viewport.scrollToOffset(a*this._itemSize,e)}_updateTotalContentSize(){this._viewport&&this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;let a=this._viewport.getRenderedRange(),e={start:a.start,end:a.end},t=this._viewport.getViewportSize(),i=this._viewport.getDataLength(),r=this._viewport.measureScrollOffset(),s=this._itemSize>0?r/this._itemSize:0;if(e.end>i){let l=Math.ceil(t/this._itemSize),c=Math.max(0,Math.min(s,i-l));s!=c&&(s=c,r=c*this._itemSize,e.start=Math.floor(s)),e.end=Math.max(0,Math.min(i,e.start+l))}let d=r-e.start*this._itemSize;if(d<this._minBufferPx&&e.start!=0){let l=Math.ceil((this._maxBufferPx-d)/this._itemSize);e.start=Math.max(0,e.start-l),e.end=Math.min(i,Math.ceil(s+(t+this._minBufferPx)/this._itemSize))}else{let l=e.end*this._itemSize-(r+t);if(l<this._minBufferPx&&e.end!=i){let c=Math.ceil((this._maxBufferPx-l)/this._itemSize);c>0&&(e.end=Math.min(i,e.end+c),e.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(Math.round(this._itemSize*e.start)),this._scrolledIndexChange.next(Math.floor(s))}};function Te(n){return n._scrollStrategy}var lt=(()=>{class n{get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=g(e)}_itemSize=20;get minBufferPx(){return this._minBufferPx}set minBufferPx(e){this._minBufferPx=g(e)}_minBufferPx=100;get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(e){this._maxBufferPx=g(e)}_maxBufferPx=200;_scrollStrategy=new B(this.itemSize,this.minBufferPx,this.maxBufferPx);ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=_({type:n,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[S([{provide:ze,useFactory:Te,deps:[H(()=>n)]}]),Q]})}return n})(),Fe=20,Be=(()=>{class n{_ngZone=o(p);_platform=o(C);_renderer=o(O).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new h;_scrolledCount=0;scrollContainers=new Map;register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let t=this.scrollContainers.get(e);t&&(t.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=Fe){return this._platform.isBrowser?new R(t=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=e>0?this._scrolled.pipe(m(e)).subscribe(t):this._scrolled.subscribe(t);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):y()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,t)=>this.deregister(t)),this._scrolled.complete()}ancestorScrolled(e,t){let i=this.getAncestorScrollContainers(e);return this.scrolled(t).pipe(A(r=>!r||i.indexOf(r)>-1))}getAncestorScrollContainers(e){let t=[];return this.scrollContainers.forEach((i,r)=>{this._scrollableContainsElement(r,e)&&t.push(r)}),t}_scrollableContainsElement(e,t){let i=we(t),r=e.getElementRef().nativeElement;do if(i==r)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(t){return new(t||n)};static \u0275prov=k({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Oe=(()=>{class n{elementRef=o(z);scrollDispatcher=o(Be);ngZone=o(p);dir=o(Se,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new h;_renderer=o(ee);_cleanupScroll;_elementScrolled=new h;constructor(){}ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",e=>this._elementScrolled.next(e))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let t=this.elementRef.nativeElement,i=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=i?e.end:e.start),e.right==null&&(e.right=i?e.start:e.end),e.bottom!=null&&(e.top=t.scrollHeight-t.clientHeight-e.bottom),i&&f()!=u.NORMAL?(e.left!=null&&(e.right=t.scrollWidth-t.clientWidth-e.left),f()==u.INVERTED?e.left=e.right:f()==u.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=t.scrollWidth-t.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let t=this.elementRef.nativeElement;Ce()?t.scrollTo(e):(e.top!=null&&(t.scrollTop=e.top),e.left!=null&&(t.scrollLeft=e.left))}measureScrollOffset(e){let t="left",i="right",r=this.elementRef.nativeElement;if(e=="top")return r.scrollTop;if(e=="bottom")return r.scrollHeight-r.clientHeight-r.scrollTop;let s=this.dir&&this.dir.value=="rtl";return e=="start"?e=s?i:t:e=="end"&&(e=s?t:i),s&&f()==u.INVERTED?e==t?r.scrollWidth-r.clientWidth-r.scrollLeft:r.scrollLeft:s&&f()==u.NEGATED?e==t?r.scrollLeft+r.scrollWidth-r.clientWidth:-r.scrollLeft:e==t?r.scrollLeft:r.scrollWidth-r.clientWidth-r.scrollLeft}static \u0275fac=function(t){return new(t||n)};static \u0275dir=_({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return n})(),Me=20,Ie=(()=>{class n{_platform=o(C);_listeners;_viewportSize;_change=new h;_document=o(Z);constructor(){let e=o(p),t=o(O).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=r=>this._change.next(r);this._listeners=[t.listen("window","resize",i),t.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(e=>e()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:t,height:i}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+i,right:e.left+t,height:i,width:t}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,t=this._getWindow(),i=e.documentElement,r=i.getBoundingClientRect(),s=-r.top||e.body.scrollTop||t.scrollY||i.scrollTop||0,d=-r.left||e.body.scrollLeft||t.scrollX||i.scrollLeft||0;return{top:s,left:d}}change(e=Me){return e>0?this._change.pipe(m(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static \u0275fac=function(t){return new(t||n)};static \u0275prov=k({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),ke=new b("VIRTUAL_SCROLLABLE"),Le=(()=>{class n extends Oe{constructor(){super()}measureViewportSize(e){let t=this.elementRef.nativeElement;return e==="horizontal"?t.clientWidth:t.clientHeight}static \u0275fac=function(t){return new(t||n)};static \u0275dir=_({type:n,features:[V]})}return n})();function Pe(n,a){return n.start==a.start&&n.end==a.end}var Ae=typeof requestAnimationFrame<"u"?L:I,Ne=(()=>{class n extends Le{elementRef=o(z);_changeDetectorRef=o(ge);_scrollStrategy=o(ze,{optional:!0});scrollable=o(ke,{optional:!0});_platform=o(C);_detachedSubject=new h;_renderedRangeSubject=new h;get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}_orientation="vertical";appendOnly=!1;scrolledIndexChange=new R(e=>this._scrollStrategy.scrolledIndexChange.subscribe(t=>Promise.resolve().then(()=>this.ngZone.run(()=>e.next(t)))));_contentWrapper;renderedRangeStream=this._renderedRangeSubject;_totalContentSize=0;_totalContentWidth=w("");_totalContentHeight=w("");_renderedContentTransform;_renderedRange={start:0,end:0};_dataLength=0;_viewportSize=0;_forOf;_renderedContentOffset=0;_renderedContentOffsetNeedsRewrite=!1;_changeDetectionNeeded=w(!1);_runAfterChangeDetection=[];_viewportChanges=M.EMPTY;_injector=o(G);_isDestroyed=!1;constructor(){super();let e=o(Ie);this._scrollStrategy,this._viewportChanges=e.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this);let t=_e(()=>{this._changeDetectionNeeded()&&this._doChangeDetection()},{injector:o(re).injector});o($).onDestroy(()=>{t.destroy()})}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(x(null),m(0,Ae),v(this._destroyed)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),this._isDestroyed=!0,super.ngOnDestroy()}attach(e){this._forOf,this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe(v(this._detachedSubject)).subscribe(t=>{let i=t.length;i!==this._dataLength&&(this._dataLength=i,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(e){return this.getElementRef().nativeElement.getBoundingClientRect()[e]}setTotalContentSize(e){this._totalContentSize!==e&&(this._totalContentSize=e,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(e){Pe(this._renderedRange,e)||(this.appendOnly&&(e={start:0,end:Math.max(this._renderedRange.end,e.end)}),this._renderedRangeSubject.next(this._renderedRange=e),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(e,t="to-start"){e=this.appendOnly&&t==="to-start"?0:e;let i=this.dir&&this.dir.value=="rtl",r=this.orientation=="horizontal",s=r?"X":"Y",l=`translate${s}(${Number((r&&i?-1:1)*e)}px)`;this._renderedContentOffset=e,t==="to-end"&&(l+=` translate${s}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=l&&(this._renderedContentTransform=l,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,t="auto"){let i={behavior:t};this.orientation==="horizontal"?i.start=e:i.top=e,this.scrollable.scrollTo(i)}scrollToIndex(e,t="auto"){this._scrollStrategy.scrollToIndex(e,t)}measureScrollOffset(e){let t;return this.scrollable==this?t=i=>super.measureScrollOffset(i):t=i=>this.scrollable.measureScrollOffset(i),Math.max(0,t(e??(this.orientation==="horizontal"?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(e){let t,i="left",r="right",s=this.dir?.value=="rtl";e=="start"?t=s?r:i:e=="end"?t=s?i:r:e?t=e:t=this.orientation==="horizontal"?"left":"top";let d=this.scrollable.measureBoundingClientRectWithScrollOffset(t);return this.elementRef.nativeElement.getBoundingClientRect()[t]-d}measureRenderedContentSize(){let e=this._contentWrapper.nativeElement;return this.orientation==="horizontal"?e.offsetWidth:e.offsetHeight}measureRangeSize(e){return this._forOf?this._forOf.measureRangeSize(e,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(e){e&&this._runAfterChangeDetection.push(e),!pe(this._changeDetectionNeeded)&&this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this.ngZone.run(()=>{this._changeDetectionNeeded.set(!0)})})})}_doChangeDetection(){this._isDestroyed||this.ngZone.run(()=>{this._changeDetectorRef.markForCheck(),this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,K(()=>{this._changeDetectionNeeded.set(!1);let e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let t of e)t()},{injector:this._injector})})}_calculateSpacerSize(){this._totalContentHeight.set(this.orientation==="horizontal"?"":`${this._totalContentSize}px`),this._totalContentWidth.set(this.orientation==="horizontal"?`${this._totalContentSize}px`:"")}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ie({type:n,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(t,i){if(t&1&&ce(Ee,7),t&2){let r;de(r=he())&&(i._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(t,i){t&2&&fe("cdk-virtual-scroll-orientation-horizontal",i.orientation==="horizontal")("cdk-virtual-scroll-orientation-vertical",i.orientation!=="horizontal")},inputs:{orientation:"orientation",appendOnly:[2,"appendOnly","appendOnly",ve]},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[S([{provide:Oe,useFactory:(e,t)=>e||t,deps:[[new q,new Y(ke)],n]}]),V],ngContentSelectors:Ve,decls:4,vars:4,consts:[["contentWrapper",""],[1,"cdk-virtual-scroll-content-wrapper"],[1,"cdk-virtual-scroll-spacer"]],template:function(t,i){t&1&&(le(),ne(0,"div",1,0),ae(2),oe(),se(3,"div",2)),t&2&&(X(3),ue("width",i._totalContentWidth())("height",i._totalContentHeight()))},styles:[`cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}
|
|
1
|
+
import{a as u,b as Ce,c as f,d as Re,e as ye,f as F,g as xe}from"./chunk-BKYXU3OY.js";import{l as C,m as g,n as we,o as Se,p as T}from"./chunk-532NB4ME.js";import{$ as k,$b as ce,Bc as _e,C as A,Ca as z,D as m,Hc as ge,Ic as me,J as N,Kc as ve,O as W,Pb as ne,Qb as oe,R as j,Rb as se,T as x,U,V as v,Yb as le,Zb as ae,_ as H,_a as X,aa as D,ac as de,bc as he,ca as b,d as M,ea as o,eb as p,f as R,fb as K,gb as J,gc as ue,hb as O,hc as fe,i as h,ib as ee,k as I,l as L,lb as te,na as G,o as y,oa as Z,pa as $,pb as ie,q as P,qb as E,rb as _,sb as V,ta as w,uc as S,xa as Y,ya as q,za as Q,zb as re,zc as pe}from"./chunk-H3HRZLHG.js";var Ee=["contentWrapper"],Ve=["*"],ze=new b("VIRTUAL_SCROLL_STRATEGY"),B=class{_scrolledIndexChange=new h;scrolledIndexChange=this._scrolledIndexChange.pipe(N());_viewport=null;_itemSize;_minBufferPx;_maxBufferPx;constructor(a,e,t){this._itemSize=a,this._minBufferPx=e,this._maxBufferPx=t}attach(a){this._viewport=a,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(a,e,t){t<e,this._itemSize=a,this._minBufferPx=e,this._maxBufferPx=t,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(a,e){this._viewport&&this._viewport.scrollToOffset(a*this._itemSize,e)}_updateTotalContentSize(){this._viewport&&this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;let a=this._viewport.getRenderedRange(),e={start:a.start,end:a.end},t=this._viewport.getViewportSize(),i=this._viewport.getDataLength(),r=this._viewport.measureScrollOffset(),s=this._itemSize>0?r/this._itemSize:0;if(e.end>i){let l=Math.ceil(t/this._itemSize),c=Math.max(0,Math.min(s,i-l));s!=c&&(s=c,r=c*this._itemSize,e.start=Math.floor(s)),e.end=Math.max(0,Math.min(i,e.start+l))}let d=r-e.start*this._itemSize;if(d<this._minBufferPx&&e.start!=0){let l=Math.ceil((this._maxBufferPx-d)/this._itemSize);e.start=Math.max(0,e.start-l),e.end=Math.min(i,Math.ceil(s+(t+this._minBufferPx)/this._itemSize))}else{let l=e.end*this._itemSize-(r+t);if(l<this._minBufferPx&&e.end!=i){let c=Math.ceil((this._maxBufferPx-l)/this._itemSize);c>0&&(e.end=Math.min(i,e.end+c),e.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(Math.round(this._itemSize*e.start)),this._scrolledIndexChange.next(Math.floor(s))}};function Te(n){return n._scrollStrategy}var lt=(()=>{class n{get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=g(e)}_itemSize=20;get minBufferPx(){return this._minBufferPx}set minBufferPx(e){this._minBufferPx=g(e)}_minBufferPx=100;get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(e){this._maxBufferPx=g(e)}_maxBufferPx=200;_scrollStrategy=new B(this.itemSize,this.minBufferPx,this.maxBufferPx);ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=_({type:n,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[S([{provide:ze,useFactory:Te,deps:[H(()=>n)]}]),Q]})}return n})(),Fe=20,Be=(()=>{class n{_ngZone=o(p);_platform=o(C);_renderer=o(O).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new h;_scrolledCount=0;scrollContainers=new Map;register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let t=this.scrollContainers.get(e);t&&(t.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=Fe){return this._platform.isBrowser?new R(t=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=e>0?this._scrolled.pipe(m(e)).subscribe(t):this._scrolled.subscribe(t);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):y()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,t)=>this.deregister(t)),this._scrolled.complete()}ancestorScrolled(e,t){let i=this.getAncestorScrollContainers(e);return this.scrolled(t).pipe(A(r=>!r||i.indexOf(r)>-1))}getAncestorScrollContainers(e){let t=[];return this.scrollContainers.forEach((i,r)=>{this._scrollableContainsElement(r,e)&&t.push(r)}),t}_scrollableContainsElement(e,t){let i=we(t),r=e.getElementRef().nativeElement;do if(i==r)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(t){return new(t||n)};static \u0275prov=k({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Oe=(()=>{class n{elementRef=o(z);scrollDispatcher=o(Be);ngZone=o(p);dir=o(Se,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new h;_renderer=o(ee);_cleanupScroll;_elementScrolled=new h;constructor(){}ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",e=>this._elementScrolled.next(e))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let t=this.elementRef.nativeElement,i=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=i?e.end:e.start),e.right==null&&(e.right=i?e.start:e.end),e.bottom!=null&&(e.top=t.scrollHeight-t.clientHeight-e.bottom),i&&f()!=u.NORMAL?(e.left!=null&&(e.right=t.scrollWidth-t.clientWidth-e.left),f()==u.INVERTED?e.left=e.right:f()==u.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=t.scrollWidth-t.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let t=this.elementRef.nativeElement;Ce()?t.scrollTo(e):(e.top!=null&&(t.scrollTop=e.top),e.left!=null&&(t.scrollLeft=e.left))}measureScrollOffset(e){let t="left",i="right",r=this.elementRef.nativeElement;if(e=="top")return r.scrollTop;if(e=="bottom")return r.scrollHeight-r.clientHeight-r.scrollTop;let s=this.dir&&this.dir.value=="rtl";return e=="start"?e=s?i:t:e=="end"&&(e=s?t:i),s&&f()==u.INVERTED?e==t?r.scrollWidth-r.clientWidth-r.scrollLeft:r.scrollLeft:s&&f()==u.NEGATED?e==t?r.scrollLeft+r.scrollWidth-r.clientWidth:-r.scrollLeft:e==t?r.scrollLeft:r.scrollWidth-r.clientWidth-r.scrollLeft}static \u0275fac=function(t){return new(t||n)};static \u0275dir=_({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return n})(),Me=20,Ie=(()=>{class n{_platform=o(C);_listeners;_viewportSize;_change=new h;_document=o(Z);constructor(){let e=o(p),t=o(O).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=r=>this._change.next(r);this._listeners=[t.listen("window","resize",i),t.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(e=>e()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:t,height:i}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+i,right:e.left+t,height:i,width:t}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,t=this._getWindow(),i=e.documentElement,r=i.getBoundingClientRect(),s=-r.top||e.body.scrollTop||t.scrollY||i.scrollTop||0,d=-r.left||e.body.scrollLeft||t.scrollX||i.scrollLeft||0;return{top:s,left:d}}change(e=Me){return e>0?this._change.pipe(m(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static \u0275fac=function(t){return new(t||n)};static \u0275prov=k({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),ke=new b("VIRTUAL_SCROLLABLE"),Le=(()=>{class n extends Oe{constructor(){super()}measureViewportSize(e){let t=this.elementRef.nativeElement;return e==="horizontal"?t.clientWidth:t.clientHeight}static \u0275fac=function(t){return new(t||n)};static \u0275dir=_({type:n,features:[V]})}return n})();function Pe(n,a){return n.start==a.start&&n.end==a.end}var Ae=typeof requestAnimationFrame<"u"?L:I,Ne=(()=>{class n extends Le{elementRef=o(z);_changeDetectorRef=o(ge);_scrollStrategy=o(ze,{optional:!0});scrollable=o(ke,{optional:!0});_platform=o(C);_detachedSubject=new h;_renderedRangeSubject=new h;get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}_orientation="vertical";appendOnly=!1;scrolledIndexChange=new R(e=>this._scrollStrategy.scrolledIndexChange.subscribe(t=>Promise.resolve().then(()=>this.ngZone.run(()=>e.next(t)))));_contentWrapper;renderedRangeStream=this._renderedRangeSubject;_totalContentSize=0;_totalContentWidth=w("");_totalContentHeight=w("");_renderedContentTransform;_renderedRange={start:0,end:0};_dataLength=0;_viewportSize=0;_forOf;_renderedContentOffset=0;_renderedContentOffsetNeedsRewrite=!1;_changeDetectionNeeded=w(!1);_runAfterChangeDetection=[];_viewportChanges=M.EMPTY;_injector=o(G);_isDestroyed=!1;constructor(){super();let e=o(Ie);this._scrollStrategy,this._viewportChanges=e.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this);let t=_e(()=>{this._changeDetectionNeeded()&&this._doChangeDetection()},{injector:o(re).injector});o($).onDestroy(()=>{t.destroy()})}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(x(null),m(0,Ae),v(this._destroyed)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),this._isDestroyed=!0,super.ngOnDestroy()}attach(e){this._forOf,this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe(v(this._detachedSubject)).subscribe(t=>{let i=t.length;i!==this._dataLength&&(this._dataLength=i,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(e){return this.getElementRef().nativeElement.getBoundingClientRect()[e]}setTotalContentSize(e){this._totalContentSize!==e&&(this._totalContentSize=e,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(e){Pe(this._renderedRange,e)||(this.appendOnly&&(e={start:0,end:Math.max(this._renderedRange.end,e.end)}),this._renderedRangeSubject.next(this._renderedRange=e),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(e,t="to-start"){e=this.appendOnly&&t==="to-start"?0:e;let i=this.dir&&this.dir.value=="rtl",r=this.orientation=="horizontal",s=r?"X":"Y",l=`translate${s}(${Number((r&&i?-1:1)*e)}px)`;this._renderedContentOffset=e,t==="to-end"&&(l+=` translate${s}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=l&&(this._renderedContentTransform=l,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,t="auto"){let i={behavior:t};this.orientation==="horizontal"?i.start=e:i.top=e,this.scrollable.scrollTo(i)}scrollToIndex(e,t="auto"){this._scrollStrategy.scrollToIndex(e,t)}measureScrollOffset(e){let t;return this.scrollable==this?t=i=>super.measureScrollOffset(i):t=i=>this.scrollable.measureScrollOffset(i),Math.max(0,t(e??(this.orientation==="horizontal"?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(e){let t,i="left",r="right",s=this.dir?.value=="rtl";e=="start"?t=s?r:i:e=="end"?t=s?i:r:e?t=e:t=this.orientation==="horizontal"?"left":"top";let d=this.scrollable.measureBoundingClientRectWithScrollOffset(t);return this.elementRef.nativeElement.getBoundingClientRect()[t]-d}measureRenderedContentSize(){let e=this._contentWrapper.nativeElement;return this.orientation==="horizontal"?e.offsetWidth:e.offsetHeight}measureRangeSize(e){return this._forOf?this._forOf.measureRangeSize(e,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(e){e&&this._runAfterChangeDetection.push(e),!pe(this._changeDetectionNeeded)&&this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this.ngZone.run(()=>{this._changeDetectionNeeded.set(!0)})})})}_doChangeDetection(){this._isDestroyed||this.ngZone.run(()=>{this._changeDetectorRef.markForCheck(),this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,K(()=>{this._changeDetectionNeeded.set(!1);let e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let t of e)t()},{injector:this._injector})})}_calculateSpacerSize(){this._totalContentHeight.set(this.orientation==="horizontal"?"":`${this._totalContentSize}px`),this._totalContentWidth.set(this.orientation==="horizontal"?`${this._totalContentSize}px`:"")}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ie({type:n,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(t,i){if(t&1&&ce(Ee,7),t&2){let r;de(r=he())&&(i._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(t,i){t&2&&fe("cdk-virtual-scroll-orientation-horizontal",i.orientation==="horizontal")("cdk-virtual-scroll-orientation-vertical",i.orientation!=="horizontal")},inputs:{orientation:"orientation",appendOnly:[2,"appendOnly","appendOnly",ve]},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[S([{provide:Oe,useFactory:(e,t)=>e||t,deps:[[new q,new Y(ke)],n]}]),V],ngContentSelectors:Ve,decls:4,vars:4,consts:[["contentWrapper",""],[1,"cdk-virtual-scroll-content-wrapper"],[1,"cdk-virtual-scroll-spacer"]],template:function(t,i){t&1&&(le(),ne(0,"div",1,0),ae(2),oe(),se(3,"div",2)),t&2&&(X(3),ue("width",i._totalContentWidth())("height",i._totalContentHeight()))},styles:[`cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}return n})();function De(n,a,e){let t=e;if(!t.getBoundingClientRect)return 0;let i=t.getBoundingClientRect();return n==="horizontal"?a==="start"?i.left:i.right:a==="start"?i.top:i.bottom}var at=(()=>{class n{_viewContainerRef=o(te);_template=o(J);_differs=o(me);_viewRepeater=o(F);_viewport=o(Ne,{skipSelf:!0});viewChange=new h;_dataSourceChanges=new h;get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(e){this._cdkVirtualForOf=e,Re(e)?this._dataSourceChanges.next(e):this._dataSourceChanges.next(new ye(P(e)?e:Array.from(e||[])))}_cdkVirtualForOf;get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(e){this._needsUpdate=!0,this._cdkVirtualForTrackBy=e?(t,i)=>e(t+(this._renderedRange?this._renderedRange.start:0),i):void 0}_cdkVirtualForTrackBy;set cdkVirtualForTemplate(e){e&&(this._needsUpdate=!0,this._template=e)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(e){this._viewRepeater.viewCacheSize=g(e)}dataStream=this._dataSourceChanges.pipe(x(null),W(),U(([e,t])=>this._changeDataSource(e,t)),j(1));_differ=null;_data;_renderedItems;_renderedRange;_needsUpdate=!1;_destroyed=new h;constructor(){let e=o(p);this.dataStream.subscribe(t=>{this._data=t,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(v(this._destroyed)).subscribe(t=>{this._renderedRange=t,this.viewChange.observers.length&&e.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}measureRangeSize(e,t){if(e.start>=e.end)return 0;e.start<this._renderedRange.start||e.end>this._renderedRange.end;let i=e.start-this._renderedRange.start,r=e.end-e.start,s,d;for(let l=0;l<r;l++){let c=this._viewContainerRef.get(l+i);if(c&&c.rootNodes.length){s=d=c.rootNodes[0];break}}for(let l=r-1;l>-1;l--){let c=this._viewContainerRef.get(l+i);if(c&&c.rootNodes.length){d=c.rootNodes[c.rootNodes.length-1];break}}return s&&d?De(t,"end",d)-De(t,"start",s):0}ngDoCheck(){if(this._differ&&this._needsUpdate){let e=this._differ.diff(this._renderedItems);e?this._applyChanges(e):this._updateContext(),this._needsUpdate=!1}}ngOnDestroy(){this._viewport.detach(),this._dataSourceChanges.next(void 0),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete(),this._viewRepeater.detach()}_onRenderedDataChange(){this._renderedRange&&(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create((e,t)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(e,t):t)),this._needsUpdate=!0)}_changeDataSource(e,t){return e&&e.disconnect(this),this._needsUpdate=!0,t?t.connect(this):y()}_updateContext(){let e=this._data.length,t=this._viewContainerRef.length;for(;t--;){let i=this._viewContainerRef.get(t);i.context.index=this._renderedRange.start+t,i.context.count=e,this._updateComputedContextProperties(i.context),i.detectChanges()}}_applyChanges(e){this._viewRepeater.applyChanges(e,this._viewContainerRef,(r,s,d)=>this._getEmbeddedViewArgs(r,d),r=>r.item),e.forEachIdentityChange(r=>{let s=this._viewContainerRef.get(r.currentIndex);s.context.$implicit=r.item});let t=this._data.length,i=this._viewContainerRef.length;for(;i--;){let r=this._viewContainerRef.get(i);r.context.index=this._renderedRange.start+i,r.context.count=t,this._updateComputedContextProperties(r.context)}}_updateComputedContextProperties(e){e.first=e.index===0,e.last=e.index===e.count-1,e.even=e.index%2===0,e.odd=!e.even}_getEmbeddedViewArgs(e,t){return{templateRef:this._template,context:{$implicit:e.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:t}}static ngTemplateContextGuard(e,t){return!0}static \u0275fac=function(t){return new(t||n)};static \u0275dir=_({type:n,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[S([{provide:F,useClass:xe}])]})}return n})();var be=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=E({type:n});static \u0275inj=D({})}return n})(),ct=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=E({type:n});static \u0275inj=D({imports:[T,be,T,be]})}return n})();export{lt as a,Be as b,Oe as c,Ie as d,Ne as e,at as f,be as g,ct as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as U}from"./chunk-WAN7TQQW.js";import{a as W,b as j}from"./chunk-G3IBZZQH.js";import{a as pt}from"./chunk-HYIZY5FQ.js";import"./chunk-2LMH5KDX.js";import"./chunk-6YXOOFGY.js";import"./chunk-BCGQJHY3.js";import"./chunk-P3Q7RWT5.js";import{a as q,b as dt,c as mt,d as B}from"./chunk-JODWQVMA.js";import{a as L,b as F}from"./chunk-RMV7CR6Y.js";import"./chunk-YNQPX5G6.js";import"./chunk-C6SNIY22.js";import"./chunk-42QQHEGP.js";import"./chunk-AHO3BCLI.js";import"./chunk-DRBVSI3B.js";import"./chunk-BKYXU3OY.js";import{b as st,c as lt}from"./chunk-YFYMS5EE.js";import{f as ct}from"./chunk-BPUIUSAU.js";import{d as K}from"./chunk-6CP6NCA6.js";import"./chunk-DNHNU64I.js";import"./chunk-532NB4ME.js";import{$b as nt,Ac as I,Bc as at,Db as V,Fb as _,Gb as u,Hb as et,Ib as D,Jb as h,Kb as M,Lb as x,Mb as o,Nb as r,Ob as C,Tb as v,Vb as g,Wa as N,Xb as p,Ya as tt,_a as s,a as R,ac as it,b as $,bc as ot,db as P,ea as O,gc as z,hc as k,ja as d,jc as c,ka as m,kc as f,lc as E,mc as A,pa as Z,pb as T,ta as w,vc as rt}from"./chunk-H3HRZLHG.js";var G=(n,e)=>e.name;function ft(n,e){if(n&1&&C(0,"span",5),n&2){let t=e.$implicit;V("data-k",t)}}function xt(n,e){if(n&1&&(o(0,"span",8)(1,"span",22),c(2,"error"),r(),c(3),r()),n&2){let t=p().$implicit;x("matTooltip",t.errorCount+" errors"),s(3),E("",t.errorCount," ")}}function Ct(n,e){if(n&1&&(o(0,"span",11)(1,"span",22),c(2,"lan"),r(),o(3,"dm-mono"),c(4),r()()),n&2){let t=p().$implicit;s(4),f(t.port)}}function vt(n,e){if(n&1){let t=v();o(0,"a",23),g("click",function(a){return d(t),m(a.stopPropagation())}),o(1,"span",22),c(2,"open_in_new"),r(),o(3,"dm-mono"),c(4),r()()}if(n&2){let t=p().$implicit;x("href",t.url,N),s(4),f(t.url)}}function bt(n,e){if(n&1&&(o(0,"span",15)(1,"span",22),c(2,"folder_open"),r(),c(3),r()),n&2){let t=p().$implicit;s(3),f(t.workspaceLabel)}}function yt(n,e){if(n&1&&(o(0,"span",16),c(1),r()),n&2){let t=p().$implicit,i=p();s(),f(i.fmtSince(t.lastChangeMs))}}function wt(n,e){n&1&&C(0,"mat-spinner",21)}function ht(n,e){n&1&&(o(0,"span",22),c(1,"play_arrow"),r())}function Mt(n,e){if(n&1){let t=v();o(0,"button",24),g("click",function(){d(t);let a=p().$implicit,l=p();return m(l.act.emit({name:a.name,kind:"start"}))}),_(1,wt,1,0,"mat-spinner",21)(2,ht,2,0,"span",22),r()}if(n&2){let t=p().$implicit,i=p();x("disabled",i.isBusy(t.name,"start")),s(),u(i.isBusy(t.name,"start")?1:2)}}function kt(n,e){n&1&&C(0,"mat-spinner",21)}function Pt(n,e){n&1&&(o(0,"span",22),c(1,"stop"),r())}function Ot(n,e){if(n&1){let t=v();o(0,"button",25),g("click",function(){d(t);let a=p().$implicit,l=p();return m(l.act.emit({name:a.name,kind:"stop"}))}),_(1,kt,1,0,"mat-spinner",21)(2,Pt,2,0,"span",22),r()}if(n&2){let t=p().$implicit,i=p();x("disabled",i.isBusy(t.name,"stop")),s(),u(i.isBusy(t.name,"stop")?1:2)}}function St(n,e){n&1&&C(0,"mat-spinner",21)}function Tt(n,e){n&1&&(o(0,"span",22),c(1,"restart_alt"),r())}function Vt(n,e){if(n&1){let t=v();o(0,"article",2),g("click",function(){let a=d(t).$implicit,l=p();return m(l.open.emit(a.name))})("mouseenter",function(){let a=d(t).$index,l=p();return m(l.focus.emit(a))})("keydown.enter",function(){let a=d(t).$implicit,l=p();return m(l.open.emit(a.name))}),C(1,"div",3),o(2,"div",4),h(3,ft,1,1,"span",5,et),r(),o(5,"div",6),C(6,"dm-status-pill",7),_(7,xt,4,2,"span",8),r(),o(8,"div",9)(9,"dm-mono"),c(10),r()(),o(11,"div",10),_(12,Ct,5,1,"span",11),_(13,vt,5,2,"a",12),r(),o(14,"div",13)(15,"div",14),_(16,bt,4,1,"span",15),_(17,yt,2,1,"span",16),r(),o(18,"div",17),g("click",function(a){return d(t),m(a.stopPropagation())}),_(19,Mt,3,2,"button",18)(20,Ot,3,2,"button",19),o(21,"button",20),g("click",function(){let a=d(t).$implicit,l=p();return m(l.act.emit({name:a.name,kind:"restart"}))}),_(22,St,1,0,"mat-spinner",21)(23,Tt,2,0,"span",22),r()()()()}if(n&2){let t=e.$implicit,i=e.$index,a=p();z("--dm-tone",a.tone(t.workspaceLabel)),k("f",i===a.focusedIndex),s(2),x("matTooltip",a.ribbonTooltip(t.name)),s(),M(a.ribbonTicks(t.name)),s(3),x("status",t.status)("health",t.health),s(),u(t.errorCount>0?7:-1),s(3),f(t.name),s(2),u(t.port!=null?12:-1),s(),u(t.url?13:-1),s(3),u(t.workspaceLabel?16:-1),s(),u(t.lastChangeMs?17:-1),s(2),u(t.status==="stopped"||t.status==="error"?19:20),s(2),x("disabled",a.isBusy(t.name,"restart")),s(),u(a.isBusy(t.name,"restart")?22:23)}}function Et(n,e){if(n&1&&(o(0,"span",10),c(1),r()),n&2){let t=p().$implicit;s(),f(t.errorCount)}}function At(n,e){n&1&&(o(0,"span",11),c(1,"0"),r())}function It(n,e){n&1&&C(0,"mat-spinner",16)}function Lt(n,e){n&1&&(o(0,"span",17),c(1,"play_arrow"),r())}function Ft(n,e){if(n&1){let t=v();o(0,"button",19),g("click",function(){d(t);let a=p().$implicit,l=p();return m(l.act.emit({name:a.name,kind:"start"}))}),_(1,It,1,0,"mat-spinner",16)(2,Lt,2,0,"span",17),r()}if(n&2){let t=p().$implicit,i=p();x("disabled",i.isBusy(t.name,"start")),s(),u(i.isBusy(t.name,"start")?1:2)}}function Bt(n,e){n&1&&C(0,"mat-spinner",16)}function Rt(n,e){n&1&&(o(0,"span",17),c(1,"stop"),r())}function $t(n,e){if(n&1){let t=v();o(0,"button",20),g("click",function(){d(t);let a=p().$implicit,l=p();return m(l.act.emit({name:a.name,kind:"stop"}))}),_(1,Bt,1,0,"mat-spinner",16)(2,Rt,2,0,"span",17),r()}if(n&2){let t=p().$implicit,i=p();x("disabled",i.isBusy(t.name,"stop")),s(),u(i.isBusy(t.name,"stop")?1:2)}}function Nt(n,e){n&1&&C(0,"mat-spinner",16)}function Dt(n,e){n&1&&(o(0,"span",17),c(1,"restart_alt"),r())}function zt(n,e){if(n&1&&(o(0,"a",18)(1,"span",17),c(2,"open_in_new"),r()()),n&2){let t=p().$implicit;x("href",t.url,N)}}function Kt(n,e){if(n&1){let t=v();o(0,"div",4),g("click",function(){let a=d(t).$implicit,l=p();return m(l.open.emit(a.name))})("mouseenter",function(){let a=d(t).$index,l=p();return m(l.focus.emit(a))})("keydown.enter",function(){let a=d(t).$implicit,l=p();return m(l.open.emit(a.name))}),o(1,"div"),C(2,"dm-status-pill",5),r(),o(3,"div",6),C(4,"span",7),o(5,"dm-mono"),c(6),r()(),o(7,"div",8),c(8),r(),o(9,"div",9)(10,"dm-mono"),c(11),r()(),o(12,"div",9)(13,"dm-mono"),c(14),r()(),o(15,"div",9)(16,"dm-mono"),c(17),r()(),o(18,"div",9)(19,"dm-mono"),c(20),r()(),o(21,"div"),_(22,Et,2,1,"span",10)(23,At,2,0,"span",11),r(),o(24,"div",12),g("click",function(a){return d(t),m(a.stopPropagation())}),_(25,Ft,3,2,"button",13)(26,$t,3,2,"button",14),o(27,"button",15),g("click",function(){let a=d(t).$implicit,l=p();return m(l.act.emit({name:a.name,kind:"restart"}))}),_(28,Nt,1,0,"mat-spinner",16)(29,Dt,2,0,"span",17),r(),_(30,zt,3,1,"a",18),r()()}if(n&2){let t=e.$implicit,i=e.$index,a=p();z("--dm-tone",a.tone(t.workspaceLabel)),k("f",i===a.focusedIndex),s(2),x("status",t.status)("health",t.health),s(4),f(t.name),s(2),f(t.workspaceLabel||"\u2014"),s(3),f(t.port??"\u2014"),s(3),f(a.fmtUptime(t.uptimeMs)),s(3),f(a.fmtPct(t.cpu)),s(3),f(a.fmtMem(t.memMB)),s(2),u(t.errorCount>0?22:23),s(3),u(t.status==="stopped"||t.status==="error"?25:26),s(2),x("disabled",a.isBusy(t.name,"restart")),s(),u(a.isBusy(t.name,"restart")?28:29),s(2),u(t.url?30:-1)}}var Wt=["searchInput"],jt=n=>["/apps",n],qt=(n,e)=>e.key;function Ut(n,e){if(n&1&&(o(0,"div",27)(1,"span",24),c(2),r(),o(3,"span",25),c(4,"errors"),r()()),n&2){let t=p();s(2),f(t.totals.totalErrCount)}}function Qt(n,e){if(n&1&&(o(0,"span",34),c(1),r()),n&2){let t=p(2).$implicit;s(),E(" ",t.firstError.code)}}function Ht(n,e){if(n&1&&(o(0,"dm-mono")(1,"span",33),c(2),r(),_(3,Qt,2,1,"span",34),r()),n&2){let t=p().$implicit;s(2),A("",t.firstError.file,":",t.firstError.line),s(),u(t.firstError.code?3:-1)}}function Yt(n,e){if(n&1&&(o(0,"a",31)(1,"strong"),c(2),r(),o(3,"span",32),c(4),r(),_(5,Ht,4,3,"dm-mono"),r()),n&2){let t=e.$implicit;x("routerLink",rt(5,jt,t.name)),s(2),f(t.name),s(2),A("",t.errCount," ",t.errCount===1?"error":"errors"),s(),u(t.firstError?5:-1)}}function Gt(n,e){if(n&1&&(o(0,"div",28)(1,"div",29)(2,"span",8),c(3,"priority_high"),r(),c(4,"Needs attention "),r(),o(5,"div",30),h(6,Yt,6,7,"a",31,G),r()()),n&2){let t=p();s(6),M(t.needsAttention)}}function Jt(n,e){if(n&1&&(o(0,"section",2)(1,"div",22)(2,"div",23)(3,"span",24),c(4),r(),o(5,"span",25),c(6,"apps"),r()(),o(7,"div",26)(8,"span",24),c(9),r(),o(10,"span",25),c(11,"serving"),r()(),o(12,"div",27)(13,"span",24),c(14),r(),o(15,"span",25),c(16,"errored"),r()(),o(17,"div",23)(18,"span",24),c(19),r(),o(20,"span",25),c(21,"stopped"),r()(),_(22,Ut,5,1,"div",27),r(),_(23,Gt,8,0,"div",28),r()),n&2){let t=e;s(4),f(t.totals.apps),s(5),f(t.totals.serving),s(3),k("dm-zero",!t.totals.errors),s(2),f(t.totals.errors),s(5),f(t.totals.stopped),s(3),u(t.totals.totalErrCount>0?22:-1),s(),u(t.needsAttention.length?23:-1)}}function Xt(n,e){if(n&1&&(c(0," \xB7 workspace "),o(1,"dm-mono"),c(2),r()),n&2){let t=p();s(2),f(t.workspace())}}function Zt(n,e){if(n&1){let t=v();o(0,"button",35),g("click",function(){d(t);let a=p();return m(a.onQuery(""))}),o(1,"span",8),c(2,"close"),r()()}}function te(n,e){if(n&1){let t=v();o(0,"button",36),g("click",function(){let a=d(t).$implicit,l=p();return m(l.setStatus(a.key))}),c(1),o(2,"span",37),c(3),r()()}if(n&2){let t=e.$implicit,i=p();k("active",i.status()===t.key),V("aria-selected",i.status()===t.key),s(),E(" ",t.label),s(2),f(i.countFor(t.key))}}function ee(n,e){if(n&1){let t=v();o(0,"button",40),g("click",function(){let a=d(t).$implicit,l=p(2);return m(l.toggleTag(a))}),c(1),r()}if(n&2){let t=e.$implicit,i=p(2);k("active",i.isTagSelected(t)),V("aria-pressed",i.isTagSelected(t)),s(),f(t)}}function ne(n,e){if(n&1){let t=v();o(0,"button",41),g("click",function(){d(t);let a=p(2);return m(a.clearTags())}),o(1,"span",8),c(2,"close"),r()()}}function ie(n,e){if(n&1&&(o(0,"div",17),h(1,ee,2,4,"button",38,D),_(3,ne,3,0,"button",39),r()),n&2){let t=p();s(),M(t.allTags()),s(2),u(t.selectedTags().size?3:-1)}}function oe(n,e){n&1&&(o(0,"article",42),C(1,"div",43),o(2,"div",44),C(3,"dm-skeleton",45)(4,"dm-skeleton",46)(5,"dm-skeleton",47),r()())}function re(n,e){if(n&1&&(o(0,"div",18),h(1,oe,6,0,"article",42,D),r()),n&2){let t=p();s(),M(t.skeletonItems)}}function ae(n,e){n&1&&(o(0,"dm-empty",19)(1,"div",48)(2,"a",49)(3,"span",8),c(4,"stethoscope"),r(),c(5,"Open Doctor "),r()()())}function se(n,e){n&1&&C(0,"dm-empty",20)}function le(n,e){if(n&1){let t=v();o(0,"dm-apps-cards",50),g("open",function(a){d(t);let l=p();return m(l.open(a))})("focus",function(a){d(t);let l=p();return m(l.focusedIndex.set(a))})("act",function(a){d(t);let l=p();return m(l.act(a.name,a.kind))}),r()}if(n&2){let t=p();x("items",t.filtered())("focusedIndex",t.focusedIndex())("busy",t.busyMap())}}function ce(n,e){if(n&1){let t=v();o(0,"dm-apps-list-view",50),g("open",function(a){d(t);let l=p();return m(l.open(a))})("focus",function(a){d(t);let l=p();return m(l.focusedIndex.set(a))})("act",function(a){d(t);let l=p();return m(l.act(a.name,a.kind))}),r()}if(n&2){let t=p();x("items",t.filtered())("focusedIndex",t.focusedIndex())("busy",t.busyMap())}}var _t="daimon.apps.view",ut="daimon.workspace",Q="daimon.apps.tags",H=class n{items=[];focusedIndex=0;busy={};open=new P;focus=new P;act=new P;tone=U;api=O(K);RIBBON_BUCKETS=20;RIBBON_WINDOW_MS=3600*1e3;perAppTicks=I(()=>{let e=this.api.events(),i=Date.now()-this.RIBBON_WINDOW_MS,a=this.RIBBON_WINDOW_MS/this.RIBBON_BUCKETS,l=new Map,y={stopped:1,serving:2,compiling:3,starting:3,error:4};for(let b of e){if(b.type!=="status"||!b.app||!b.to||b.ts<i)continue;let J=Math.min(this.RIBBON_BUCKETS-1,Math.floor((b.ts-i)/a)),S=l.get(b.app);S||(S=new Array(this.RIBBON_BUCKETS).fill(""),l.set(b.app,S));let X=S[J];(!X||(y[b.to]??0)>(y[X]??0))&&(S[J]=b.to)}return l});isBusy(e,t){return!!this.busy[e]?.[t]}ribbonTicks(e){return this.perAppTicks().get(e)??new Array(this.RIBBON_BUCKETS).fill("")}ribbonTooltip(e){let t=this.perAppTicks().get(e);if(!t)return"no status events in the last 60 min";let i={};for(let l of t)l&&(i[l]=(i[l]??0)+1);let a=Object.entries(i).map(([l,y])=>`${y} ${l}`).join(" \xB7 ");return a?`last 60 min: ${a}`:"no status events in the last 60 min"}fmtSince(e){if(!e||e<=0)return"";let t=Math.floor(e/1e3);return t<60?t+"s ago":t<3600?Math.floor(t/60)+"m ago":t<86400?Math.floor(t/3600)+"h ago":Math.floor(t/86400)+"d ago"}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=T({type:n,selectors:[["dm-apps-cards"]],inputs:{items:"items",focusedIndex:"focusedIndex",busy:"busy"},outputs:{open:"open",focus:"focus",act:"act"},decls:3,vars:0,consts:[[1,"g"],["role","button","tabindex","0",1,"c",3,"f","--dm-tone"],["role","button","tabindex","0",1,"c",3,"click","mouseenter","keydown.enter"],[1,"ac"],["aria-hidden","true",1,"rb",3,"matTooltip"],[1,"tk"],[1,"h"],[3,"status","health"],[1,"eb",3,"matTooltip"],[1,"n"],[1,"m"],["matTooltip","Port",1,"mi"],["target","_blank","rel","noopener",1,"mi","ml",3,"href"],[1,"ft"],[1,"tg"],[1,"ws"],[1,"sn"],[1,"ax",3,"click"],["matTooltip","Start (s)","aria-label","Start",1,"ib",3,"disabled"],["matTooltip","Stop (x)","aria-label","Stop",1,"ib",3,"disabled"],["matTooltip","Restart (r)","aria-label","Restart",1,"ib",3,"click","disabled"],["diameter","16"],[1,"material-symbols-outlined"],["target","_blank","rel","noopener",1,"mi","ml",3,"click","href"],["matTooltip","Start (s)","aria-label","Start",1,"ib",3,"click","disabled"],["matTooltip","Stop (x)","aria-label","Stop",1,"ib",3,"click","disabled"]],template:function(t,i){t&1&&(o(0,"div",0),h(1,Vt,24,16,"article",1,G),r()),t&2&&(s(),M(i.items))},dependencies:[F,L,j,W,q,B],styles:["[_nghost-%COMP%]{display:block}.g[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1rem}.c[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;background:var(--mat-sys-surface-container-low);border:1px solid var(--mat-sys-outline-variant);border-radius:14px;overflow:hidden;cursor:pointer;transition:box-shadow var(--dm-motion-short) var(--dm-motion-easing),transform var(--dm-motion-short) var(--dm-motion-easing),border-color var(--dm-motion-short) var(--dm-motion-easing)}.c[_ngcontent-%COMP%]:hover{box-shadow:var(--mat-sys-level2);transform:translateY(-1px)}.c.f[_ngcontent-%COMP%]{border-color:var(--mat-sys-primary);box-shadow:0 0 0 2px color-mix(in oklch,var(--mat-sys-primary) 25%,transparent)}.ac[_ngcontent-%COMP%]{height:4px;background:var(--dm-tone,var(--mat-sys-surface-container))}.rb[_ngcontent-%COMP%]{display:flex;gap:1px;height:6px;padding:0 .75rem;align-items:center;background:var(--mat-sys-surface-container-lowest)}.rb[_ngcontent-%COMP%] .tk[_ngcontent-%COMP%]{flex:1;height:6px;border-radius:1px;background:var(--mat-sys-surface-container)}.rb[_ngcontent-%COMP%] .tk[data-k=serving][_ngcontent-%COMP%]{background:color-mix(in oklch,var(--mat-sys-primary) 60%,transparent)}.rb[_ngcontent-%COMP%] .tk[data-k=error][_ngcontent-%COMP%]{background:var(--mat-sys-error)}.rb[_ngcontent-%COMP%] .tk[data-k=starting][_ngcontent-%COMP%], .rb[_ngcontent-%COMP%] .tk[data-k=compiling][_ngcontent-%COMP%]{background:color-mix(in oklch,var(--mat-sys-tertiary) 70%,transparent)}.rb[_ngcontent-%COMP%] .tk[data-k=stopped][_ngcontent-%COMP%]{background:var(--mat-sys-outline-variant)}.h[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.75rem .875rem 0}.n[_ngcontent-%COMP%]{padding:.375rem .875rem 0;font:500 1.05rem/1.5rem Roboto}.n[_ngcontent-%COMP%] .dm-mono[_ngcontent-%COMP%]{font-size:1.05rem;font-weight:500}.m[_ngcontent-%COMP%]{padding:.25rem .875rem .5rem;display:flex;flex-wrap:wrap;gap:.75rem;color:var(--mat-sys-on-surface-variant)}.mi[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;font-size:.8125rem}.mi[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:14px}.ml[_ngcontent-%COMP%]{color:var(--mat-sys-primary);text-decoration:none}.ml[_ngcontent-%COMP%]:hover{text-decoration:underline}.ft[_ngcontent-%COMP%]{margin-top:auto;padding:.5rem .75rem .5rem .875rem;display:flex;align-items:center;justify-content:space-between;gap:.5rem;border-top:1px solid var(--mat-sys-outline-variant)}.tg[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;flex-wrap:wrap;min-width:0}.ws[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;padding:2px 8px;border-radius:999px;font:500 .6875rem/1rem Roboto;background:var(--mat-sys-surface-container);color:var(--mat-sys-on-surface-variant);border:1px solid var(--mat-sys-outline-variant)}.ws[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:12px}.sn[_ngcontent-%COMP%]{font:400 .6875rem/1rem Roboto;color:var(--mat-sys-on-surface-variant)}.ax[_ngcontent-%COMP%]{display:inline-flex;gap:.25rem}.ib[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:0;border-radius:8px;color:var(--mat-sys-on-surface-variant);cursor:pointer;transition:background var(--dm-motion-short) var(--dm-motion-easing),color var(--dm-motion-short) var(--dm-motion-easing)}.ib[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--mat-sys-surface-container-high);color:var(--mat-sys-on-surface)}.ib[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:not-allowed}.ib[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px}.eb[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;padding:1px 8px;border-radius:999px;font:600 .75rem/1rem var(--dm-mono);background:color-mix(in oklch,var(--mat-sys-error) 14%,transparent);color:var(--mat-sys-error);border:1px solid color-mix(in oklch,var(--mat-sys-error) 30%,transparent)}.eb[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:14px}"],changeDetection:0})},Y=class n{items=[];focusedIndex=0;busy={};open=new P;focus=new P;act=new P;tone=U;isBusy(e,t){return!!this.busy[e]?.[t]}fmtUptime(e){if(!e||e<0)return"\u2014";let t=Math.floor(e/1e3);return t<60?t+"s":t<3600?Math.floor(t/60)+"m":t<86400?Math.floor(t/3600)+"h":Math.floor(t/86400)+"d"}fmtPct(e){return e==null||isNaN(e)?"\u2014":e.toFixed(0)+"%"}fmtMem(e){return e==null||isNaN(e)?"\u2014":e>=1024?(e/1024).toFixed(1)+"G":Math.round(e)+"M"}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=T({type:n,selectors:[["dm-apps-list-view"]],inputs:{items:"items",focusedIndex:"focusedIndex",busy:"busy"},outputs:{open:"open",focus:"focus",act:"act"},decls:22,vars:0,consts:[["role","table",1,"ls"],["role","row",1,"rw","rh"],[1,"ar"],["role","row","tabindex","0",1,"rw",3,"f","--dm-tone"],["role","row","tabindex","0",1,"rw",3,"click","mouseenter","keydown.enter"],[3,"status","health"],[1,"nm"],[1,"tn"],[1,"ws"],[1,"sm"],[1,"eb"],[1,"dm"],[1,"ax",3,"click"],["matTooltip","Start","aria-label","Start",1,"ib",3,"disabled"],["matTooltip","Stop","aria-label","Stop",1,"ib",3,"disabled"],["matTooltip","Restart","aria-label","Restart",1,"ib",3,"click","disabled"],["diameter","14"],[1,"material-symbols-outlined"],["target","_blank","rel","noopener","matTooltip","Open","aria-label","Open",1,"ib",3,"href"],["matTooltip","Start","aria-label","Start",1,"ib",3,"click","disabled"],["matTooltip","Stop","aria-label","Stop",1,"ib",3,"click","disabled"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"div",1)(2,"div"),c(3,"status"),r(),o(4,"div"),c(5,"name"),r(),o(6,"div"),c(7,"workspace"),r(),o(8,"div"),c(9,"port"),r(),o(10,"div"),c(11,"uptime"),r(),o(12,"div"),c(13,"cpu"),r(),o(14,"div"),c(15,"mem"),r(),o(16,"div"),c(17,"err"),r(),o(18,"div",2),c(19,"actions"),r()(),h(20,Kt,31,17,"div",3,G),r()),t&2&&(s(20),M(i.items))},dependencies:[F,L,j,W,q,B],styles:['[_nghost-%COMP%]{display:block}.ls[_ngcontent-%COMP%]{background:var(--mat-sys-surface-container-low);border:1px solid var(--mat-sys-outline-variant);border-radius:12px;overflow:hidden}.rw[_ngcontent-%COMP%]{display:grid;align-items:center;gap:.75rem;grid-template-columns:110px minmax(160px,1.5fr) minmax(100px,1fr) 70px 80px 70px 80px 60px 140px;padding:0 .875rem;min-height:36px;cursor:pointer;position:relative;border-bottom:1px solid var(--mat-sys-outline-variant);transition:background var(--dm-motion-short) var(--dm-motion-easing)}.rw[_ngcontent-%COMP%]:last-child{border-bottom:0}.rw[_ngcontent-%COMP%]:hover{background:var(--mat-sys-surface-container)}.rw.f[_ngcontent-%COMP%]{background:color-mix(in oklch,var(--mat-sys-primary) 8%,transparent)}.rw.f[_ngcontent-%COMP%]:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--mat-sys-primary)}.rh[_ngcontent-%COMP%]{min-height:30px;background:var(--mat-sys-surface-container);cursor:default;font:500 .6875rem/1rem Roboto;text-transform:uppercase;letter-spacing:.04rem;color:var(--mat-sys-on-surface-variant)}.rh[_ngcontent-%COMP%]:hover{background:var(--mat-sys-surface-container)}.nm[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0;overflow:hidden}.nm[_ngcontent-%COMP%] .dm-mono[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tn[_ngcontent-%COMP%]{width:3px;height:18px;border-radius:2px;background:var(--dm-tone,var(--mat-sys-surface-container));flex-shrink:0}.ws[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--mat-sys-on-surface-variant);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sm[_ngcontent-%COMP%]{font-size:.8125rem}.ar[_ngcontent-%COMP%], .ax[_ngcontent-%COMP%]{display:inline-flex;gap:.125rem;justify-content:flex-end}.dm[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant);font-size:.8125rem}.ib[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;background:transparent;border:0;border-radius:6px;color:var(--mat-sys-on-surface-variant);cursor:pointer;transition:background var(--dm-motion-short) var(--dm-motion-easing),color var(--dm-motion-short) var(--dm-motion-easing);text-decoration:none}.ib[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--mat-sys-surface-container-high);color:var(--mat-sys-on-surface)}.ib[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:not-allowed}.ib[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:16px}.eb[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:0 6px;border-radius:999px;font:600 .75rem/1rem var(--dm-mono);background:color-mix(in oklch,var(--mat-sys-error) 14%,transparent);color:var(--mat-sys-error);border:1px solid color-mix(in oklch,var(--mat-sys-error) 30%,transparent)}@media(max-width:1000px){.rw[_ngcontent-%COMP%]{grid-template-columns:100px minmax(120px,1fr) 70px 70px 60px 110px}.rw[_ngcontent-%COMP%] .ws[_ngcontent-%COMP%], .rw[_ngcontent-%COMP%] .sm[_ngcontent-%COMP%]:nth-of-type(3), .rw[_ngcontent-%COMP%] .sm[_ngcontent-%COMP%]:nth-of-type(4){display:none}}'],changeDetection:0})},gt=class n{api=O(K);router=O(st);snack=O(pt);destroyRef=O(Z);searchInput;view=w("cards");query=w("");status=w("all");workspace=w(null);focusedIndex=w(0);busyMap=w({});selectedTags=w(new Set);allTags=I(()=>{let e=new Set;for(let t of this.api.apps())for(let i of t.tags??[])e.add(i);return Array.from(e).sort()});skeletonItems=Array.from({length:6},(e,t)=>t);statusFilters=[{key:"all",label:"All"},{key:"serving",label:"Serving"},{key:"errors",label:"Errors"},{key:"stopped",label:"Stopped"}];filtered=I(()=>{let e=this.query().trim().toLowerCase(),t=this.status(),i=this.workspace(),a=this.selectedTags();return this.api.apps().filter(l=>{if(i&&l.workspaceLabel!==i||t==="serving"&&l.status!=="serving"||t==="errors"&&l.status!=="error"&&l.errorCount===0||t==="stopped"&&l.status!=="stopped")return!1;if(a.size){let y=l.tags??[];for(let b of a)if(!y.includes(b))return!1}return!(e&&![l.name,l.workspaceLabel??"",...l.tags??[]].join(" ").toLowerCase().includes(e))})});constructor(){this.view.set(localStorage.getItem(_t)==="list"?"list":"cards"),this.workspace.set(localStorage.getItem(ut));let e=(localStorage.getItem(Q)??"").split(",").map(t=>t.trim()).filter(Boolean);e.length&&this.selectedTags.set(new Set(e)),at(()=>{let t=this.filtered().length;this.focusedIndex()>=t&&this.focusedIndex.set(Math.max(0,t-1))}),this.bindWindow("daimon:toggle-density",()=>this.setView(this.view()==="cards"?"list":"cards")),this.bindWindow("daimon:focus-filter",()=>queueMicrotask(()=>this.searchInput?.nativeElement.focus())),this.bindWindow("daimon:workspace",t=>{let i=t.detail;this.workspace.set(i??null)}),this.bindWindow("daimon:key",t=>this.onKey(t.detail))}async ngAfterViewInit(){this.api.ready()||await this.api.refresh()}onStorage(e){e.key===ut&&this.workspace.set(e.newValue)}bindWindow(e,t){window.addEventListener(e,t),this.destroyRef.onDestroy(()=>window.removeEventListener(e,t))}setView(e){this.view.set(e),localStorage.setItem(_t,e)}setStatus(e){this.status.set(e),this.focusedIndex.set(0)}isTagSelected(e){return this.selectedTags().has(e)}toggleTag(e){let t=new Set(this.selectedTags());t.has(e)?t.delete(e):t.add(e),this.selectedTags.set(t),this.persistTags(t),this.focusedIndex.set(0)}clearTags(){this.selectedTags.set(new Set),this.persistTags(new Set),this.focusedIndex.set(0)}persistTags(e){e.size?localStorage.setItem(Q,Array.from(e).join(",")):localStorage.removeItem(Q)}onQuery(e){this.query.set(e),this.focusedIndex.set(0)}open(e){this.router.navigate(["/apps",e])}countFor(e){return this.api.apps().filter(t=>e==="all"?!0:e==="serving"?t.status==="serving":e==="errors"?t.status==="error"||t.errorCount>0:e==="stopped"?t.status==="stopped":!1).length}async act(e,t){if(!this.busyMap()[e]?.[t]){this.setBusy(e,t,!0);try{t==="start"?await this.api.startApp(e):t==="stop"?await this.api.stopApp(e):await this.api.restartApp(e)}catch(i){this.snack.open(`${t} ${e} failed: ${i?.message??"error"}`,"Dismiss",{duration:4e3})}finally{this.setBusy(e,t,!1)}}}setBusy(e,t,i){this.busyMap.update(a=>$(R({},a),{[e]:$(R({},a[e]??{}),{[t]:i})}))}onKey(e){let t=this.filtered();if(!t.length)return;let i=Math.max(0,Math.min(this.focusedIndex(),t.length-1));if(e==="j")this.focusedIndex.set((i+1)%t.length);else if(e==="k")this.focusedIndex.set((i-1+t.length)%t.length);else if(e==="s")this.act(t[i].name,"start");else if(e==="x")this.act(t[i].name,"stop");else if(e==="r"){let a=t[i].name;this.snack.open(`Restart ${a}? Press R again or click confirm.`,"Confirm",{duration:4e3}).onAction().subscribe(()=>{this.act(a,"restart")})}}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=T({type:n,selectors:[["dm-apps-list"]],viewQuery:function(t,i){if(t&1&&nt(Wt,5),t&2){let a;it(a=ot())&&(i.searchInput=a.first)}},hostBindings:function(t,i){t&1&&g("storage",function(l){return i.onStorage(l)},tt)},decls:33,vars:12,consts:[["searchInput",""],[1,"dm-page"],[1,"dm-overview"],[1,"dm-page-header"],[1,"dm-page-sub"],[1,"dm-header-actions"],["role","group","aria-label","View mode",1,"dm-toggle"],["type","button","matTooltip","Cards (.)","aria-label","Cards view",3,"click"],[1,"material-symbols-outlined"],["type","button","matTooltip","Dense list (.)","aria-label","List view",3,"click"],[1,"dm-filterbar"],[1,"dm-search"],[1,"material-symbols-outlined","dm-search-icon"],["type","search","placeholder","Filter apps by name, tag, workspace\u2026","aria-label","Filter apps",3,"input","value"],["type","button","aria-label","Clear",1,"dm-search-clear"],["role","tablist","aria-label","Status filter",1,"dm-chips"],["type","button","role","tab",1,"dm-chip",3,"active"],["role","group","aria-label","Tag filter",1,"dm-chips","dm-tag-row"],[1,"dm-grid-sk"],["icon","rocket_launch","title","No apps discovered yet","hint","Run daimon init --auto in your workspace to discover apps, or run /discover. The doctor page can help diagnose missing apps."],["icon","search_off","title","No matches","hint","No apps match the current filters. Clear them or try a different query."],[3,"items","focusedIndex","busy"],[1,"dm-totals-row"],[1,"dm-total"],[1,"dm-total-num"],[1,"dm-total-label"],[1,"dm-total","dm-total-serving"],[1,"dm-total","dm-total-error"],[1,"dm-attention"],[1,"dm-att-title"],[1,"dm-att-list"],[1,"dm-att-row",3,"routerLink"],[1,"dm-att-meta"],[1,"dm-att-where"],[1,"dm-att-code"],["type","button","aria-label","Clear",1,"dm-search-clear",3,"click"],["type","button","role","tab",1,"dm-chip",3,"click"],[1,"dm-chip-count"],["type","button",1,"dm-chip",3,"active"],["type","button","aria-label","Clear tag filter",1,"dm-chip","dm-chip-clear"],["type","button",1,"dm-chip",3,"click"],["type","button","aria-label","Clear tag filter",1,"dm-chip","dm-chip-clear",3,"click"],[1,"dm-card-sk"],[1,"dm-sk-accent"],[1,"dm-sk-body"],["width","60%","height","1.25rem"],["width","40%","height",".875rem"],["width","80%","height",".875rem"],[1,"dm-empty-actions"],["routerLink","/doctor",1,"dm-link-btn"],[3,"open","focus","act","items","focusedIndex","busy"]],template:function(t,i){if(t&1){let a=v();o(0,"div",1),_(1,Jt,24,8,"section",2),o(2,"header",3)(3,"div")(4,"h1"),c(5,"Apps"),r(),o(6,"div",4),c(7),_(8,Xt,3,1),r()(),o(9,"div",5)(10,"div",6)(11,"button",7),g("click",function(){return d(a),m(i.setView("cards"))}),o(12,"span",8),c(13,"grid_view"),r()(),o(14,"button",9),g("click",function(){return d(a),m(i.setView("list"))}),o(15,"span",8),c(16,"view_list"),r()()()()(),o(17,"div",10)(18,"div",11)(19,"span",12),c(20,"search"),r(),o(21,"input",13,0),g("input",function(y){return d(a),m(i.onQuery(y.target.value))}),r(),_(23,Zt,3,0,"button",14),r(),o(24,"div",15),h(25,te,4,5,"button",16,qt),r(),_(27,ie,4,1,"div",17),r(),_(28,re,3,0,"div",18)(29,ae,6,0,"dm-empty",19)(30,se,1,0,"dm-empty",20)(31,le,1,3,"dm-apps-cards",21)(32,ce,1,3,"dm-apps-list-view",21),r()}if(t&2){let a;s(),u((a=i.api.overview())?1:-1,a),s(6),A(" ",i.filtered().length," of ",i.api.apps().length," visible "),s(),u(i.workspace()?8:-1),s(3),k("active",i.view()==="cards"),s(3),k("active",i.view()==="list"),s(7),x("value",i.query()),s(2),u(i.query()?23:-1),s(2),M(i.statusFilters),s(2),u(i.allTags().length?27:-1),s(),u(i.api.ready()?i.api.apps().length===0?29:i.filtered().length===0?30:i.view()==="cards"?31:32:28)}},dependencies:[lt,ct,F,L,dt,mt,B,H,Y],styles:["[_nghost-%COMP%]{display:block}.dm-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.dm-overview[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(280px,1fr) minmax(0,2fr);gap:1rem;padding:1rem 1.25rem;border-radius:14px;background:var(--mat-sys-surface-container-low);border:1px solid var(--mat-sys-outline-variant)}@media(max-width:760px){.dm-overview[_ngcontent-%COMP%]{grid-template-columns:1fr}}.dm-totals-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.75rem}.dm-total[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:.5rem .875rem;border-radius:10px;background:var(--mat-sys-surface-container);min-width:70px}.dm-total-num[_ngcontent-%COMP%]{font:600 1.5rem/1.75rem Roboto;color:var(--mat-sys-on-surface)}.dm-total-label[_ngcontent-%COMP%]{font:500 .6875rem/1rem Roboto;text-transform:uppercase;letter-spacing:.04rem;color:var(--mat-sys-on-surface-variant)}.dm-total-serving[_ngcontent-%COMP%] .dm-total-num[_ngcontent-%COMP%]{color:var(--mat-sys-primary)}.dm-total-error[_ngcontent-%COMP%] .dm-total-num[_ngcontent-%COMP%]{color:var(--mat-sys-error)}.dm-total-error.dm-zero[_ngcontent-%COMP%] .dm-total-num[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant)}.dm-attention[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;min-width:0}.dm-att-title[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;font:500 .8125rem/1.25rem Roboto;color:var(--mat-sys-error)}.dm-att-title[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px}.dm-att-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.dm-att-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;min-width:0;padding:.375rem .625rem;border-radius:8px;text-decoration:none;color:var(--mat-sys-on-surface);background:var(--mat-sys-surface-container);border-left:3px solid var(--mat-sys-error)}.dm-att-row[_ngcontent-%COMP%]:hover{background:var(--mat-sys-surface-container-high)}.dm-att-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:500;font-size:.875rem}.dm-att-meta[_ngcontent-%COMP%]{font-size:.75rem;color:var(--mat-sys-on-surface-variant);white-space:nowrap}.dm-att-where[_ngcontent-%COMP%]{color:var(--mat-sys-error)}.dm-att-code[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant);margin-left:.25rem}.dm-page-header[_ngcontent-%COMP%]{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem}.dm-page-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0;font:400 1.5rem/2rem Roboto}.dm-page-sub[_ngcontent-%COMP%]{font:400 .8125rem/1.25rem Roboto;color:var(--mat-sys-on-surface-variant);margin-top:.25rem;display:flex;gap:.25rem;flex-wrap:wrap}.dm-header-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.dm-toggle[_ngcontent-%COMP%], .dm-chips[_ngcontent-%COMP%]{display:inline-flex;padding:2px;border-radius:10px;background:var(--mat-sys-surface-container);border:1px solid var(--mat-sys-outline-variant)}.dm-toggle[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .dm-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;padding:5px 10px;border-radius:8px;background:transparent;border:0;color:var(--mat-sys-on-surface-variant);cursor:pointer;font:500 .8125rem/1rem Roboto}.dm-toggle[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px}.dm-toggle[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .dm-chip[_ngcontent-%COMP%]:hover{color:var(--mat-sys-on-surface)}.dm-toggle[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%], .dm-chip.active[_ngcontent-%COMP%]{background:var(--mat-sys-surface);color:var(--mat-sys-primary)}.dm-toggle[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{box-shadow:var(--mat-sys-level1)}.dm-chip-count[_ngcontent-%COMP%]{font:500 .6875rem/1rem var(--dm-mono);padding:0 5px;border-radius:999px;background:var(--mat-sys-surface-container-high);color:var(--mat-sys-on-surface-variant)}.dm-chip.active[_ngcontent-%COMP%] .dm-chip-count[_ngcontent-%COMP%]{background:color-mix(in oklch,var(--mat-sys-primary) 16%,transparent);color:var(--mat-sys-primary)}.dm-filterbar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.dm-search[_ngcontent-%COMP%]{position:relative;flex:1;min-width:220px;display:inline-flex;align-items:center;background:var(--mat-sys-surface-container);border:1px solid var(--mat-sys-outline-variant);border-radius:10px}.dm-search[_ngcontent-%COMP%]:focus-within{border-color:var(--mat-sys-primary)}.dm-search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1;border:0;outline:0;background:transparent;padding:8px 36px;font:400 .875rem/1.25rem Roboto;color:var(--mat-sys-on-surface)}.dm-search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:var(--mat-sys-on-surface-variant)}.dm-search-icon[_ngcontent-%COMP%]{position:absolute;left:10px;pointer-events:none;font-size:18px;color:var(--mat-sys-on-surface-variant)}.dm-search-clear[_ngcontent-%COMP%]{position:absolute;right:6px;background:transparent;border:0;cursor:pointer;color:var(--mat-sys-on-surface-variant);width:24px;height:24px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center}.dm-search-clear[_ngcontent-%COMP%]:hover{background:var(--mat-sys-surface-container-high)}.dm-search-clear[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:16px}.dm-grid-sk[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1rem}.dm-card-sk[_ngcontent-%COMP%]{background:var(--mat-sys-surface-container-low);border:1px solid var(--mat-sys-outline-variant);border-radius:14px;overflow:hidden}.dm-sk-accent[_ngcontent-%COMP%]{height:4px;background:var(--mat-sys-surface-container)}.dm-sk-body[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:.5rem}.dm-empty-actions[_ngcontent-%COMP%]{margin-top:.75rem}.dm-link-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;padding:6px 14px;border-radius:10px;background:var(--mat-sys-primary);color:var(--mat-sys-on-primary);text-decoration:none;font:500 .875rem/1.25rem Roboto}.dm-link-btn[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px}.dm-tag-row[_ngcontent-%COMP%]{flex-wrap:wrap;gap:4px;max-width:100%}.dm-chip-clear[_ngcontent-%COMP%]{padding:5px 6px;color:var(--mat-sys-on-surface-variant)}.dm-chip-clear[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:16px}"],changeDetection:0})};export{H as AppsCardsViewComponent,gt as AppsListComponent,Y as AppsListViewComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as o,Ca as h,Ha as L,aa as l,ca as f,da as u,db as M,ea as s,i as v,ib as T,jb as g,lb as R,oa as c,qb as D,rb as p,ta as b,za as I}from"./chunk-O76B43BY.js";var N=null;function m(){return N}function G(t){N??=t}var E=class{},w=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=o({token:t,factory:()=>s(P),providedIn:"platform"})}return t})();var P=(()=>{class t extends w{_location;_history;_doc=s(c);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return m().getBaseHref(this._doc)}onPopState(e){let n=m().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){let n=m().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",e,!1),()=>n.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,n,i){this._history.pushState(e,n,i)}replaceState(e,n,i){this._history.replaceState(e,n,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||t)};static \u0275prov=o({token:t,factory:()=>new t,providedIn:"platform"})}return t})();function k(t,r){return t?r?t.endsWith("/")?r.startsWith("/")?t+r.slice(1):t+r:r.startsWith("/")?t+r:`${t}/${r}`:t:r}function O(t){let r=t.search(/#|\?|$/);return t[r-1]==="/"?t.slice(0,r-1)+t.slice(r):t}function a(t){return t&&t[0]!=="?"?`?${t}`:t}var y=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=o({token:t,factory:()=>s($),providedIn:"root"})}return t})(),x=new f(""),$=(()=>{class t extends y{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,n){super(),this._platformLocation=e,this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??s(c).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return k(this._baseHref,e)}path(e=!1){let n=this._platformLocation.pathname+a(this._platformLocation.search),i=this._platformLocation.hash;return i&&e?`${n}${i}`:n}pushState(e,n,i,d){let F=this.prepareExternalUrl(i+a(d));this._platformLocation.pushState(e,n,F)}replaceState(e,n,i,d){let F=this.prepareExternalUrl(i+a(d));this._platformLocation.replaceState(e,n,F)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(n){return new(n||t)(u(w),u(x,8))};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),U=(()=>{class t{_subject=new v;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let n=this._locationStrategy.getBaseHref();this._basePath=Z(O(B(n))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,n=""){return this.path()==this.normalize(e+a(n))}normalize(e){return t.stripTrailingSlash(W(this._basePath,B(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,n="",i=null){this._locationStrategy.pushState(i,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+a(n)),i)}replaceState(e,n="",i=null){this._locationStrategy.replaceState(i,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+a(n)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{let n=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(n,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",n){this._urlChangeListeners.forEach(i=>i(e,n))}subscribe(e,n,i){return this._subject.subscribe({next:e,error:n??void 0,complete:i??void 0})}static normalizeQueryParams=a;static joinWithSlash=k;static stripTrailingSlash=O;static \u0275fac=function(n){return new(n||t)(u(y))};static \u0275prov=o({token:t,factory:()=>H(),providedIn:"root"})}return t})();function H(){return new U(u(y))}function W(t,r){if(!t||!r.startsWith(t))return r;let e=r.substring(t.length);return e===""||["/",";","?","#"].includes(e[0])?e:r}function B(t){return t.replace(/\/index.html$/,"")}function Z(t){if(new RegExp("^(https?:)?//").test(t)){let[,e]=t.split(/\/\/[^\/]+/);return e}return t}var A=/\s+/,z=[],Y=(()=>{class t{_ngEl;_renderer;initialClasses=z;rawClass;stateMap=new Map;constructor(e,n){this._ngEl=e,this._renderer=n}set klass(e){this.initialClasses=e!=null?e.trim().split(A):z}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(A):e}ngDoCheck(){for(let n of this.initialClasses)this._updateState(n,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let n of e)this._updateState(n,!0);else if(e!=null)for(let n of Object.keys(e))this._updateState(n,!!e[n]);this._applyStateDiff()}_updateState(e,n){let i=this.stateMap.get(e);i!==void 0?(i.enabled!==n&&(i.changed=!0,i.enabled=n),i.touched=!0):this.stateMap.set(e,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let n=e[0],i=e[1];i.changed?(this._toggleClass(n,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),i.touched=!1}}_toggleClass(e,n){e=e.trim(),e.length>0&&e.split(A).forEach(i=>{n?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(n){return new(n||t)(g(h),g(T))};static \u0275dir=p({type:t,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return t})();var K=(()=>{class t{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let i=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,n,i)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,i):!1,get:(e,n,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,i)}})}static \u0275fac=function(n){return new(n||t)(g(R))};static \u0275dir=p({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[I]})}return t})();var X=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=D({type:t});static \u0275inj=l({})}return t})();function q(t,r){r=encodeURIComponent(r);for(let e of t.split(";")){let n=e.indexOf("="),[i,d]=n==-1?[e,""]:[e.slice(0,n),e.slice(n+1)];if(i.trim()===r)return decodeURIComponent(d)}return null}var S=class{};var Q="browser";function j(t){return t===Q}var ee=new f("cdk-dir-doc",{providedIn:"root",factory:te});function te(){return s(c)}var ne=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function V(t){let r=t?.toLowerCase()||"";return r==="auto"&&typeof navigator<"u"&&navigator?.language?ne.test(navigator.language)?"rtl":"ltr":r==="rtl"?"rtl":"ltr"}var ie=(()=>{class t{get value(){return this.valueSignal()}valueSignal=b("ltr");change=new M;constructor(){let e=s(ee,{optional:!0});if(e){let n=e.body?e.body.dir:null,i=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(V(n||i||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var zt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=D({type:t});static \u0275inj=l({})}return t})();var _;try{_=typeof Intl<"u"&&Intl.v8BreakIterator}catch{_=!1}var Wt=(()=>{class t{_platformId=s(L);isBrowser=this._platformId?j(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||_)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Kt(t,r=0){return re(t)?Number(t):arguments.length===2?r:0}function re(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function Xt(t){return t instanceof h?t.nativeElement:t}export{m as a,G as b,E as c,y as d,U as e,Y as f,K as g,X as h,q as i,S as j,Q as k,Wt as l,Kt as m,Xt as n,ie as o,zt as p};
|
|
1
|
+
import{$ as o,Ca as h,Ha as L,aa as l,ca as f,da as u,db as M,ea as s,i as v,ib as T,jb as g,lb as R,oa as c,qb as D,rb as p,ta as b,za as I}from"./chunk-H3HRZLHG.js";var N=null;function m(){return N}function G(t){N??=t}var E=class{},w=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=o({token:t,factory:()=>s(P),providedIn:"platform"})}return t})();var P=(()=>{class t extends w{_location;_history;_doc=s(c);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return m().getBaseHref(this._doc)}onPopState(e){let n=m().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){let n=m().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",e,!1),()=>n.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,n,i){this._history.pushState(e,n,i)}replaceState(e,n,i){this._history.replaceState(e,n,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||t)};static \u0275prov=o({token:t,factory:()=>new t,providedIn:"platform"})}return t})();function k(t,r){return t?r?t.endsWith("/")?r.startsWith("/")?t+r.slice(1):t+r:r.startsWith("/")?t+r:`${t}/${r}`:t:r}function O(t){let r=t.search(/#|\?|$/);return t[r-1]==="/"?t.slice(0,r-1)+t.slice(r):t}function a(t){return t&&t[0]!=="?"?`?${t}`:t}var y=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=o({token:t,factory:()=>s($),providedIn:"root"})}return t})(),x=new f(""),$=(()=>{class t extends y{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,n){super(),this._platformLocation=e,this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??s(c).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return k(this._baseHref,e)}path(e=!1){let n=this._platformLocation.pathname+a(this._platformLocation.search),i=this._platformLocation.hash;return i&&e?`${n}${i}`:n}pushState(e,n,i,d){let F=this.prepareExternalUrl(i+a(d));this._platformLocation.pushState(e,n,F)}replaceState(e,n,i,d){let F=this.prepareExternalUrl(i+a(d));this._platformLocation.replaceState(e,n,F)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(n){return new(n||t)(u(w),u(x,8))};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),U=(()=>{class t{_subject=new v;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let n=this._locationStrategy.getBaseHref();this._basePath=Z(O(B(n))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,n=""){return this.path()==this.normalize(e+a(n))}normalize(e){return t.stripTrailingSlash(W(this._basePath,B(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,n="",i=null){this._locationStrategy.pushState(i,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+a(n)),i)}replaceState(e,n="",i=null){this._locationStrategy.replaceState(i,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+a(n)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{let n=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(n,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",n){this._urlChangeListeners.forEach(i=>i(e,n))}subscribe(e,n,i){return this._subject.subscribe({next:e,error:n??void 0,complete:i??void 0})}static normalizeQueryParams=a;static joinWithSlash=k;static stripTrailingSlash=O;static \u0275fac=function(n){return new(n||t)(u(y))};static \u0275prov=o({token:t,factory:()=>H(),providedIn:"root"})}return t})();function H(){return new U(u(y))}function W(t,r){if(!t||!r.startsWith(t))return r;let e=r.substring(t.length);return e===""||["/",";","?","#"].includes(e[0])?e:r}function B(t){return t.replace(/\/index.html$/,"")}function Z(t){if(new RegExp("^(https?:)?//").test(t)){let[,e]=t.split(/\/\/[^\/]+/);return e}return t}var A=/\s+/,z=[],Y=(()=>{class t{_ngEl;_renderer;initialClasses=z;rawClass;stateMap=new Map;constructor(e,n){this._ngEl=e,this._renderer=n}set klass(e){this.initialClasses=e!=null?e.trim().split(A):z}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(A):e}ngDoCheck(){for(let n of this.initialClasses)this._updateState(n,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let n of e)this._updateState(n,!0);else if(e!=null)for(let n of Object.keys(e))this._updateState(n,!!e[n]);this._applyStateDiff()}_updateState(e,n){let i=this.stateMap.get(e);i!==void 0?(i.enabled!==n&&(i.changed=!0,i.enabled=n),i.touched=!0):this.stateMap.set(e,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let n=e[0],i=e[1];i.changed?(this._toggleClass(n,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),i.touched=!1}}_toggleClass(e,n){e=e.trim(),e.length>0&&e.split(A).forEach(i=>{n?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(n){return new(n||t)(g(h),g(T))};static \u0275dir=p({type:t,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return t})();var K=(()=>{class t{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let i=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,n,i)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,i):!1,get:(e,n,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,i)}})}static \u0275fac=function(n){return new(n||t)(g(R))};static \u0275dir=p({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[I]})}return t})();var X=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=D({type:t});static \u0275inj=l({})}return t})();function q(t,r){r=encodeURIComponent(r);for(let e of t.split(";")){let n=e.indexOf("="),[i,d]=n==-1?[e,""]:[e.slice(0,n),e.slice(n+1)];if(i.trim()===r)return decodeURIComponent(d)}return null}var S=class{};var Q="browser";function j(t){return t===Q}var ee=new f("cdk-dir-doc",{providedIn:"root",factory:te});function te(){return s(c)}var ne=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function V(t){let r=t?.toLowerCase()||"";return r==="auto"&&typeof navigator<"u"&&navigator?.language?ne.test(navigator.language)?"rtl":"ltr":r==="rtl"?"rtl":"ltr"}var ie=(()=>{class t{get value(){return this.valueSignal()}valueSignal=b("ltr");change=new M;constructor(){let e=s(ee,{optional:!0});if(e){let n=e.body?e.body.dir:null,i=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(V(n||i||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var zt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=D({type:t});static \u0275inj=l({})}return t})();var _;try{_=typeof Intl<"u"&&Intl.v8BreakIterator}catch{_=!1}var Wt=(()=>{class t{_platformId=s(L);isBrowser=this._platformId?j(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||_)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Kt(t,r=0){return re(t)?Number(t):arguments.length===2?r:0}function re(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function Xt(t){return t instanceof h?t.nativeElement:t}export{m as a,G as b,E as c,y as d,U as e,Y as f,K as g,X as h,q as i,S as j,Q as k,Wt as l,Kt as m,Xt as n,ie as o,zt as p};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as
|
|
2
|
-
`).forEach(t=>{let n=t.indexOf(":");if(n>0){let s=t.slice(0,n),i=t.slice(n+1).trim();this.addHeaderEntry(s,i)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,n)=>{this.addHeaderEntry(n,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,n])=>{this.setHeaderEntries(t,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof r?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new r;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof r?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,t);let s=(e.op==="a"?this.headers.get(t):void 0)||[];s.push(...n),this.headers.set(t,s);break;case"d":let i=e.value;if(!i)this.headers.delete(t),this.normalizedNames.delete(t);else{let o=this.headers.get(t);if(!o)return;o=o.filter(c=>i.indexOf(c)===-1),o.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,o)}break}}addHeaderEntry(e,t){let n=e.toLowerCase();this.maybeSetNormalizedName(e,n),this.headers.has(n)?this.headers.get(n).push(t):this.headers.set(n,[t])}setHeaderEntries(e,t){let n=(Array.isArray(t)?t:[t]).map(i=>i.toString()),s=e.toLowerCase();this.headers.set(s,n),this.maybeSetNormalizedName(e,s)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var W=class{encodeKey(e){return Ee(e)}encodeValue(e){return Ee(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Be(r,e){let t=new Map;return r.length>0&&r.replace(/^\?/,"").split("&").forEach(s=>{let i=s.indexOf("="),[o,c]=i==-1?[e.decodeKey(s),""]:[e.decodeKey(s.slice(0,i)),e.decodeValue(s.slice(i+1))],a=t.get(o)||[];a.push(c),t.set(o,a)}),t}var $e=/%(\d[a-f0-9])/gi,Xe={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Ee(r){return encodeURIComponent(r).replace($e,(e,t)=>Xe[t]??e)}function V(r){return`${r}`}var N=class r{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new W,e.fromString){if(e.fromObject)throw new k(2805,!1);this.map=Be(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let n=e.fromObject[t],s=Array.isArray(n)?n.map(V):[V(n)];this.map.set(t,s)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(n=>{let s=e[n];Array.isArray(s)?s.forEach(i=>{t.push({param:n,value:i,op:"a"})}):t.push({param:n,value:s,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(n=>t+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new r({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(V(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],s=n.indexOf(V(e.value));s!==-1&&n.splice(s,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var G=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function ze(r){switch(r){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Pe(r){return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer}function Me(r){return typeof Blob<"u"&&r instanceof Blob}function Ne(r){return typeof FormData<"u"&&r instanceof FormData}function Je(r){return typeof URLSearchParams<"u"&&r instanceof URLSearchParams}var X="Content-Type",q="Accept",ie="X-Request-URL",ke="text/plain",Oe="application/json",Ie=`${Oe}, ${ke}, */*`,F=class r{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,n,s){this.url=t,this.method=e.toUpperCase();let i;if(ze(this.method)||s?(this.body=n!==void 0?n:null,i=s):i=n,i){if(this.reportProgress=!!i.reportProgress,this.withCredentials=!!i.withCredentials,this.keepalive=!!i.keepalive,i.responseType&&(this.responseType=i.responseType),i.headers&&(this.headers=i.headers),i.context&&(this.context=i.context),i.params&&(this.params=i.params),i.priority&&(this.priority=i.priority),i.cache&&(this.cache=i.cache),i.credentials&&(this.credentials=i.credentials),typeof i.timeout=="number"){if(i.timeout<1||!Number.isInteger(i.timeout))throw new k(2822,"");this.timeout=i.timeout}i.mode&&(this.mode=i.mode),i.redirect&&(this.redirect=i.redirect),i.integrity&&(this.integrity=i.integrity),i.referrer&&(this.referrer=i.referrer),this.transferCache=i.transferCache}if(this.headers??=new P,this.context??=new G,!this.params)this.params=new N,this.urlWithParams=t;else{let o=this.params.toString();if(o.length===0)this.urlWithParams=t;else{let c=t.indexOf("?"),a=c===-1?"?":c<t.length-1?"&":"";this.urlWithParams=t+a+o}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||Pe(this.body)||Me(this.body)||Ne(this.body)||Je(this.body)?this.body:this.body instanceof N?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||Ne(this.body)?null:Me(this.body)?this.body.type||null:Pe(this.body)?null:typeof this.body=="string"?ke:this.body instanceof N?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Oe:null}clone(e={}){let t=e.method||this.method,n=e.url||this.url,s=e.responseType||this.responseType,i=e.keepalive??this.keepalive,o=e.priority||this.priority,c=e.cache||this.cache,a=e.mode||this.mode,h=e.redirect||this.redirect,f=e.credentials||this.credentials,m=e.referrer||this.referrer,w=e.integrity||this.integrity,D=e.transferCache??this.transferCache,y=e.timeout??this.timeout,_=e.body!==void 0?e.body:this.body,d=e.withCredentials??this.withCredentials,l=e.reportProgress??this.reportProgress,g=e.headers||this.headers,T=e.params||this.params,p=e.context??this.context;return e.setHeaders!==void 0&&(g=Object.keys(e.setHeaders).reduce((b,M)=>b.set(M,e.setHeaders[M]),g)),e.setParams&&(T=Object.keys(e.setParams).reduce((b,M)=>b.set(M,e.setParams[M]),T)),new r(t,n,_,{params:T,headers:g,context:p,reportProgress:l,responseType:s,withCredentials:d,transferCache:D,keepalive:i,cache:c,priority:o,timeout:y,mode:a,redirect:h,credentials:f,referrer:m,integrity:w})}},A=(function(r){return r[r.Sent=0]="Sent",r[r.UploadProgress=1]="UploadProgress",r[r.ResponseHeader=2]="ResponseHeader",r[r.DownloadProgress=3]="DownloadProgress",r[r.Response=4]="Response",r[r.User=5]="User",r})(A||{}),S=class{headers;status;statusText;url;ok;type;redirected;constructor(e,t=200,n="OK"){this.headers=e.headers||new P,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.redirected=e.redirected,this.ok=this.status>=200&&this.status<300}},z=class r extends S{constructor(e={}){super(e)}type=A.ResponseHeader;clone(e={}){return new r({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},B=class r extends S{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=A.Response;clone(e={}){return new r({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected})}},E=class extends S{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},De=200,Ve=204;function te(r,e){return{body:e,headers:r.headers,context:r.context,observe:r.observe,params:r.params,reportProgress:r.reportProgress,responseType:r.responseType,withCredentials:r.withCredentials,credentials:r.credentials,transferCache:r.transferCache,timeout:r.timeout,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,integrity:r.integrity,referrer:r.referrer}}var Q=(()=>{class r{handler;constructor(t){this.handler=t}request(t,n,s={}){let i;if(t instanceof F)i=t;else{let a;s.headers instanceof P?a=s.headers:a=new P(s.headers);let h;s.params&&(s.params instanceof N?h=s.params:h=new N({fromObject:s.params})),i=new F(t,n,s.body!==void 0?s.body:null,{headers:a,context:s.context,params:h,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials,transferCache:s.transferCache,keepalive:s.keepalive,priority:s.priority,cache:s.cache,mode:s.mode,redirect:s.redirect,credentials:s.credentials,referrer:s.referrer,integrity:s.integrity,timeout:s.timeout})}let o=ee(i).pipe(le(a=>this.handler.handle(a)));if(t instanceof F||s.observe==="events")return o;let c=o.pipe(de(a=>a instanceof B));switch(s.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return c.pipe($(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new k(2806,!1);return a.body}));case"blob":return c.pipe($(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new k(2807,!1);return a.body}));case"text":return c.pipe($(a=>{if(a.body!==null&&typeof a.body!="string")throw new k(2808,!1);return a.body}));default:return c.pipe($(a=>a.body))}case"response":return c;default:throw new k(2809,!1)}}delete(t,n={}){return this.request("DELETE",t,n)}get(t,n={}){return this.request("GET",t,n)}head(t,n={}){return this.request("HEAD",t,n)}jsonp(t,n){return this.request("JSONP",t,{params:new N().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,n={}){return this.request("OPTIONS",t,n)}patch(t,n,s={}){return this.request("PATCH",t,te(s,n))}post(t,n,s={}){return this.request("POST",t,te(s,n))}put(t,n,s={}){return this.request("PUT",t,te(s,n))}static \u0275fac=function(n){return new(n||r)(U(L))};static \u0275prov=O({token:r,factory:r.\u0275fac})}return r})(),Ke=/^\)\]\}',?\n/;function Ae(r){if(r.url)return r.url;let e=ie.toLocaleLowerCase();return r.headers.get(e)}var _e=new I(""),K=(()=>{class r{fetchImpl=v(re,{optional:!0})?.fetch??((...t)=>globalThis.fetch(...t));ngZone=v(we);destroyRef=v(ge);handle(t){return new H(n=>{let s=new AbortController;this.doRequest(t,s.signal,n).then(ne,o=>n.error(new E({error:o})));let i;return t.timeout&&(i=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{s.signal.aborted||s.abort(new DOMException("signal timed out","TimeoutError"))},t.timeout))),()=>{i!==void 0&&clearTimeout(i),s.abort()}})}async doRequest(t,n,s){let i=this.createRequestInit(t),o;try{let y=this.ngZone.runOutsideAngular(()=>this.fetchImpl(t.urlWithParams,C({signal:n},i)));We(y),s.next({type:A.Sent}),o=await y}catch(y){s.error(new E({error:y,status:y.status??0,statusText:y.statusText,url:t.urlWithParams,headers:y.headers}));return}let c=new P(o.headers),a=o.statusText,h=Ae(o)??t.urlWithParams,f=o.status,m=null;if(t.reportProgress&&s.next(new z({headers:c,status:f,statusText:a,url:h})),o.body){let y=o.headers.get("content-length"),_=[],d=o.body.getReader(),l=0,g,T,p=typeof Zone<"u"&&Zone.current,b=!1;if(await this.ngZone.runOutsideAngular(async()=>{for(;;){if(this.destroyRef.destroyed){await d.cancel(),b=!0;break}let{done:x,value:Z}=await d.read();if(x)break;if(_.push(Z),l+=Z.length,t.reportProgress){T=t.responseType==="text"?(T??"")+(g??=new TextDecoder).decode(Z,{stream:!0}):void 0;let ae=()=>s.next({type:A.DownloadProgress,total:y?+y:void 0,loaded:l,partialText:T});p?p.run(ae):ae()}}}),b){s.complete();return}let M=this.concatChunks(_,l);try{let x=o.headers.get(X)??"";m=this.parseBody(t,M,x,f)}catch(x){s.error(new E({error:x,headers:new P(o.headers),status:o.status,statusText:o.statusText,url:Ae(o)??t.urlWithParams}));return}}f===0&&(f=m?De:0);let w=f>=200&&f<300,D=o.redirected;w?(s.next(new B({body:m,headers:c,status:f,statusText:a,url:h,redirected:D})),s.complete()):s.error(new E({error:m,headers:c,status:f,statusText:a,url:h,redirected:D}))}parseBody(t,n,s,i){switch(t.responseType){case"json":let o=new TextDecoder().decode(n).replace(Ke,"");if(o==="")return null;try{return JSON.parse(o)}catch(c){if(i<200||i>=300)return o;throw c}case"text":return new TextDecoder().decode(n);case"blob":return new Blob([n],{type:s});case"arraybuffer":return n.buffer}}createRequestInit(t){let n={},s;if(s=t.credentials,t.withCredentials&&(s="include"),t.headers.forEach((i,o)=>n[i]=o.join(",")),t.headers.has(q)||(n[q]=Ie),!t.headers.has(X)){let i=t.detectContentTypeHeader();i!==null&&(n[X]=i)}return{body:t.serializeBody(),method:t.method,headers:n,credentials:s,keepalive:t.keepalive,cache:t.cache,priority:t.priority,mode:t.mode,redirect:t.redirect,referrer:t.referrer,integrity:t.integrity}}concatChunks(t,n){let s=new Uint8Array(n),i=0;for(let o of t)s.set(o,i),i+=o.length;return s}static \u0275fac=function(n){return new(n||r)};static \u0275prov=O({token:r,factory:r.\u0275fac})}return r})(),re=class{};function ne(){}function We(r){r.then(ne,ne)}function Ge(r,e){return e(r)}function qe(r,e,t){return(n,s)=>me(t,()=>e(n,i=>r(i,s)))}var xe=new I(""),Ce=new I(""),Ue=new I("",{providedIn:"root",factory:()=>!0});var Y=(()=>{class r extends L{backend;injector;chain=null;pendingTasks=v(ve);contributeToStability=v(Ue);constructor(t,n){super(),this.backend=t,this.injector=n}handle(t){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(xe),...this.injector.get(Ce,[])]));this.chain=n.reduceRight((s,i)=>qe(s,i,this.injector),Ge)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(t,s=>this.backend.handle(s)).pipe(ue(n))}else return this.chain(t,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||r)(U(j),U(fe))};static \u0275prov=O({token:r,factory:r.\u0275fac})}return r})();var Ye=/^\)\]\}',?\n/,Qe=RegExp(`^${ie}:`,"m");function Ze(r){return"responseURL"in r&&r.responseURL?r.responseURL:Qe.test(r.getAllResponseHeaders())?r.getResponseHeader(ie):null}var se=(()=>{class r{xhrFactory;constructor(t){this.xhrFactory=t}handle(t){if(t.method==="JSONP")throw new k(-2800,!1);let n=this.xhrFactory;return ee(null).pipe(he(()=>new H(i=>{let o=n.build();if(o.open(t.method,t.urlWithParams),t.withCredentials&&(o.withCredentials=!0),t.headers.forEach((d,l)=>o.setRequestHeader(d,l.join(","))),t.headers.has(q)||o.setRequestHeader(q,Ie),!t.headers.has(X)){let d=t.detectContentTypeHeader();d!==null&&o.setRequestHeader(X,d)}if(t.timeout&&(o.timeout=t.timeout),t.responseType){let d=t.responseType.toLowerCase();o.responseType=d!=="json"?d:"text"}let c=t.serializeBody(),a=null,h=()=>{if(a!==null)return a;let d=o.statusText||"OK",l=new P(o.getAllResponseHeaders()),g=Ze(o)||t.url;return a=new z({headers:l,status:o.status,statusText:d,url:g}),a},f=()=>{let{headers:d,status:l,statusText:g,url:T}=h(),p=null;l!==Ve&&(p=typeof o.response>"u"?o.responseText:o.response),l===0&&(l=p?De:0);let b=l>=200&&l<300;if(t.responseType==="json"&&typeof p=="string"){let M=p;p=p.replace(Ye,"");try{p=p!==""?JSON.parse(p):null}catch(x){p=M,b&&(b=!1,p={error:x,text:p})}}b?(i.next(new B({body:p,headers:d,status:l,statusText:g,url:T||void 0})),i.complete()):i.error(new E({error:p,headers:d,status:l,statusText:g,url:T||void 0}))},m=d=>{let{url:l}=h(),g=new E({error:d,status:o.status||0,statusText:o.statusText||"Unknown Error",url:l||void 0});i.error(g)},w=m;t.timeout&&(w=d=>{let{url:l}=h(),g=new E({error:new DOMException("Request timed out","TimeoutError"),status:o.status||0,statusText:o.statusText||"Request timeout",url:l||void 0});i.error(g)});let D=!1,y=d=>{D||(i.next(h()),D=!0);let l={type:A.DownloadProgress,loaded:d.loaded};d.lengthComputable&&(l.total=d.total),t.responseType==="text"&&o.responseText&&(l.partialText=o.responseText),i.next(l)},_=d=>{let l={type:A.UploadProgress,loaded:d.loaded};d.lengthComputable&&(l.total=d.total),i.next(l)};return o.addEventListener("load",f),o.addEventListener("error",m),o.addEventListener("timeout",w),o.addEventListener("abort",m),t.reportProgress&&(o.addEventListener("progress",y),c!==null&&o.upload&&o.upload.addEventListener("progress",_)),o.send(c),i.next({type:A.Sent}),()=>{o.removeEventListener("error",m),o.removeEventListener("abort",m),o.removeEventListener("load",f),o.removeEventListener("timeout",w),t.reportProgress&&(o.removeEventListener("progress",y),c!==null&&o.upload&&o.upload.removeEventListener("progress",_)),o.readyState!==o.DONE&&o.abort()}})))}static \u0275fac=function(n){return new(n||r)(U(Re))};static \u0275prov=O({token:r,factory:r.\u0275fac})}return r})(),Fe=new I(""),He="XSRF-TOKEN",et=new I("",{providedIn:"root",factory:()=>He}),tt="X-XSRF-TOKEN",rt=new I("",{providedIn:"root",factory:()=>tt}),J=class{},nt=(()=>{class r{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(t,n){this.doc=t,this.cookieName=n}getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=be(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(n){return new(n||r)(U(ye),U(et))};static \u0275prov=O({token:r,factory:r.\u0275fac})}return r})(),st=/^(?:https?:)?\/\//i;function it(r,e){if(!v(Fe)||r.method==="GET"||r.method==="HEAD"||st.test(r.url))return e(r);let t=v(J).getToken(),n=v(rt);return t!=null&&!r.headers.has(n)&&(r=r.clone({headers:r.headers.set(n,t)})),e(r)}var oe=(function(r){return r[r.Interceptors=0]="Interceptors",r[r.LegacyInterceptors=1]="LegacyInterceptors",r[r.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",r[r.NoXsrfProtection=3]="NoXsrfProtection",r[r.JsonpSupport=4]="JsonpSupport",r[r.RequestsMadeViaParent=5]="RequestsMadeViaParent",r[r.Fetch=6]="Fetch",r})(oe||{});function ot(r,e){return{\u0275kind:r,\u0275providers:e}}function at(...r){let e=[Q,se,Y,{provide:L,useExisting:Y},{provide:j,useFactory:()=>v(_e,{optional:!0})??v(se)},{provide:xe,useValue:it,multi:!0},{provide:Fe,useValue:!0},{provide:J,useClass:nt}];for(let t of r)e.push(...t.\u0275providers);return pe(e)}function ct(){return ot(oe.Fetch,[K,{provide:_e,useExisting:K},{provide:j,useExisting:K}])}var Le=200,dt=5e3,je=class r{http=v(Q);apps=R([]);overview=R(null);events=R([]);connected=R(!1);ready=R(!1);cwdHint=R(null);cwdResolved=R(null);cwdUnknown=R(!1);workspaceRows=R([]);workspaces=Te(()=>{let e=new Set;for(let t of this.apps())t.workspaceLabel&&e.add(t.workspaceLabel);return Array.from(e).sort()});byName(e){return this.apps().find(t=>t.name===e)}streamStop;pollTimer;start(){this.streamStop||(this.refresh(),this.streamStop=this.openEventStream(),this.pollTimer=setInterval(()=>{this.refresh()},dt))}stop(){this.streamStop?.(),this.streamStop=void 0,this.pollTimer&&clearInterval(this.pollTimer),this.pollTimer=void 0}async refresh(){try{let[e,t]=await Promise.all([u(this.http.get("/api/apps?format=full")),u(this.http.get("/api/overview"))]);this.apps.set(Array.isArray(e)?e:[]),this.overview.set(t??null),this.connected.set(!0),this.ready.set(!0)}catch{this.connected.set(!1)}}async appDetail(e){try{return await u(this.http.get(`/api/apps/${encodeURIComponent(e)}?format=full`))}catch{return null}}async appErrors(e){try{let t=await u(this.http.get(`/api/apps/${encodeURIComponent(e)}/errors?format=full&level=all`));return Array.isArray(t)?t:[]}catch{return[]}}async startApp(e){this.patch(e,{status:"starting"}),await u(this.http.post(`/api/apps/${encodeURIComponent(e)}/start`,{})),await this.refresh()}async stopApp(e){this.patch(e,{status:"stopped"}),await u(this.http.post(`/api/apps/${encodeURIComponent(e)}/stop`,{})),await this.refresh()}async restartApp(e){this.patch(e,{status:"starting"}),await u(this.http.post(`/api/apps/${encodeURIComponent(e)}/restart`,{})),await this.refresh()}async ensureApp(e,t="healthy",n=18e4){return u(this.http.post(`/api/apps/${encodeURIComponent(e)}/ensure?until=${t}&timeoutMs=${n}`,{}))}async ensureUp(e,t="healthy",n=3e5){return u(this.http.post(`/api/profiles/${encodeURIComponent(e)}/ensure-up?until=${t}&timeoutMs=${n}`,{}))}async discoveryExplain(){try{return await u(this.http.get("/api/discovery/explain"))}catch{return null}}async getConfig(){try{return await u(this.http.get("/api/config"))}catch{return null}}async patchConfig(e,t){return u(this.http.patch("/api/config",t,{headers:{"if-match":e}}))}async reloadConfig(){return u(this.http.post("/api/config/reload",{}))}async runAutoFix(e={}){return u(this.http.post("/api/doctor/auto-fix",e))}async getCompileTimes(e,t=100){try{let n=await u(this.http.get(`/api/history/compile-times?app=${encodeURIComponent(e)}&limit=${t}`));return Array.isArray(n)?n:[]}catch{return[]}}async getTrends(e){try{let t=new URLSearchParams;return e.app&&t.set("app",e.app),t.set("metric",e.metric),t.set("since",e.since),await u(this.http.get(`/api/history/trends?${t.toString()}`))}catch{return null}}async getTrendsMulti(e){try{let t=new URLSearchParams;return e.app&&t.set("app",e.app),t.set("metrics",e.metrics.join(",")),t.set("since",e.since),await u(this.http.get(`/api/history/trends?${t.toString()}`))}catch{return null}}async getSelf(){try{return await u(this.http.get("/api/self"))}catch{return null}}async listWorkspaces(){try{let e=await u(this.http.get("/api/workspaces")),t=Array.isArray(e)?e:[];return this.workspaceRows.set(t),t}catch{return[]}}async resolveCwd(e){try{return await u(this.http.get(`/api/workspaces/resolve?cwd=${encodeURIComponent(e)}`))}catch{return null}}async registerWorkspace(e,t){let n={path:e};return t&&(n.label=t),u(this.http.post("/api/workspaces/ensure",n))}async getTimeline(e={}){try{let t=new URLSearchParams;e.since&&t.set("since",e.since),e.app&&t.set("app",e.app),e.kinds&&t.set("kinds",e.kinds);let n=t.toString(),s=await u(this.http.get("/api/history/timeline"+(n?"?"+n:"")));return Array.isArray(s)?s:[]}catch{return[]}}async getSelfHistory(e="6h"){try{let t=await u(this.http.get(`/api/self/history?since=${e}`));return Array.isArray(t)?t:[]}catch{return[]}}async getBundles(e,t=100){try{let n=await u(this.http.get(`/api/history/bundles?app=${encodeURIComponent(e)}&limit=${t}`));return Array.isArray(n)?n:[]}catch{return[]}}async getHistoryWhy(e){try{return await u(this.http.get(`/api/history/why/${encodeURIComponent(e)}`))}catch{return null}}openLogStream(e,t){let n=new AbortController;return(async()=>{try{let i=(await fetch(`/api/apps/${encodeURIComponent(e)}/logs/stream`,{signal:n.signal})).body?.getReader();if(!i)return;let o=new TextDecoder,c="";for(;;){let{done:a,value:h}=await i.read();if(a)break;c+=o.decode(h,{stream:!0});let f=c.split(`
|
|
1
|
+
import{i as Te,j as Re}from"./chunk-532NB4ME.js";import{$ as O,Ac as be,C as le,F as de,K as ue,U as he,Y as k,a as C,b as ce,ca as I,da as U,ea as v,eb as we,f as H,fa as pe,ha as fe,ia as me,o as ee,oa as ye,pa as ge,s as u,t as $,ta as R,wa as ve}from"./chunk-H3HRZLHG.js";var L=class{},j=class{},P=class r{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(e){e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
|
|
2
|
+
`).forEach(t=>{let n=t.indexOf(":");if(n>0){let s=t.slice(0,n),i=t.slice(n+1).trim();this.addHeaderEntry(s,i)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,n)=>{this.addHeaderEntry(n,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,n])=>{this.setHeaderEntries(t,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof r?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new r;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof r?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,t);let s=(e.op==="a"?this.headers.get(t):void 0)||[];s.push(...n),this.headers.set(t,s);break;case"d":let i=e.value;if(!i)this.headers.delete(t),this.normalizedNames.delete(t);else{let o=this.headers.get(t);if(!o)return;o=o.filter(c=>i.indexOf(c)===-1),o.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,o)}break}}addHeaderEntry(e,t){let n=e.toLowerCase();this.maybeSetNormalizedName(e,n),this.headers.has(n)?this.headers.get(n).push(t):this.headers.set(n,[t])}setHeaderEntries(e,t){let n=(Array.isArray(t)?t:[t]).map(i=>i.toString()),s=e.toLowerCase();this.headers.set(s,n),this.maybeSetNormalizedName(e,s)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var W=class{encodeKey(e){return Ee(e)}encodeValue(e){return Ee(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Be(r,e){let t=new Map;return r.length>0&&r.replace(/^\?/,"").split("&").forEach(s=>{let i=s.indexOf("="),[o,c]=i==-1?[e.decodeKey(s),""]:[e.decodeKey(s.slice(0,i)),e.decodeValue(s.slice(i+1))],a=t.get(o)||[];a.push(c),t.set(o,a)}),t}var $e=/%(\d[a-f0-9])/gi,Xe={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Ee(r){return encodeURIComponent(r).replace($e,(e,t)=>Xe[t]??e)}function V(r){return`${r}`}var A=class r{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new W,e.fromString){if(e.fromObject)throw new k(2805,!1);this.map=Be(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let n=e.fromObject[t],s=Array.isArray(n)?n.map(V):[V(n)];this.map.set(t,s)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(n=>{let s=e[n];Array.isArray(s)?s.forEach(i=>{t.push({param:n,value:i,op:"a"})}):t.push({param:n,value:s,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(n=>t+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new r({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(V(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],s=n.indexOf(V(e.value));s!==-1&&n.splice(s,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var G=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function ze(r){switch(r){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Pe(r){return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer}function Me(r){return typeof Blob<"u"&&r instanceof Blob}function Ae(r){return typeof FormData<"u"&&r instanceof FormData}function Je(r){return typeof URLSearchParams<"u"&&r instanceof URLSearchParams}var X="Content-Type",q="Accept",ie="X-Request-URL",ke="text/plain",Oe="application/json",Ie=`${Oe}, ${ke}, */*`,F=class r{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,n,s){this.url=t,this.method=e.toUpperCase();let i;if(ze(this.method)||s?(this.body=n!==void 0?n:null,i=s):i=n,i){if(this.reportProgress=!!i.reportProgress,this.withCredentials=!!i.withCredentials,this.keepalive=!!i.keepalive,i.responseType&&(this.responseType=i.responseType),i.headers&&(this.headers=i.headers),i.context&&(this.context=i.context),i.params&&(this.params=i.params),i.priority&&(this.priority=i.priority),i.cache&&(this.cache=i.cache),i.credentials&&(this.credentials=i.credentials),typeof i.timeout=="number"){if(i.timeout<1||!Number.isInteger(i.timeout))throw new k(2822,"");this.timeout=i.timeout}i.mode&&(this.mode=i.mode),i.redirect&&(this.redirect=i.redirect),i.integrity&&(this.integrity=i.integrity),i.referrer&&(this.referrer=i.referrer),this.transferCache=i.transferCache}if(this.headers??=new P,this.context??=new G,!this.params)this.params=new A,this.urlWithParams=t;else{let o=this.params.toString();if(o.length===0)this.urlWithParams=t;else{let c=t.indexOf("?"),a=c===-1?"?":c<t.length-1?"&":"";this.urlWithParams=t+a+o}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||Pe(this.body)||Me(this.body)||Ae(this.body)||Je(this.body)?this.body:this.body instanceof A?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||Ae(this.body)?null:Me(this.body)?this.body.type||null:Pe(this.body)?null:typeof this.body=="string"?ke:this.body instanceof A?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Oe:null}clone(e={}){let t=e.method||this.method,n=e.url||this.url,s=e.responseType||this.responseType,i=e.keepalive??this.keepalive,o=e.priority||this.priority,c=e.cache||this.cache,a=e.mode||this.mode,h=e.redirect||this.redirect,f=e.credentials||this.credentials,m=e.referrer||this.referrer,w=e.integrity||this.integrity,D=e.transferCache??this.transferCache,y=e.timeout??this.timeout,_=e.body!==void 0?e.body:this.body,l=e.withCredentials??this.withCredentials,d=e.reportProgress??this.reportProgress,g=e.headers||this.headers,b=e.params||this.params,p=e.context??this.context;return e.setHeaders!==void 0&&(g=Object.keys(e.setHeaders).reduce((T,M)=>T.set(M,e.setHeaders[M]),g)),e.setParams&&(b=Object.keys(e.setParams).reduce((T,M)=>T.set(M,e.setParams[M]),b)),new r(t,n,_,{params:b,headers:g,context:p,reportProgress:d,responseType:s,withCredentials:l,transferCache:D,keepalive:i,cache:c,priority:o,timeout:y,mode:a,redirect:h,credentials:f,referrer:m,integrity:w})}},N=(function(r){return r[r.Sent=0]="Sent",r[r.UploadProgress=1]="UploadProgress",r[r.ResponseHeader=2]="ResponseHeader",r[r.DownloadProgress=3]="DownloadProgress",r[r.Response=4]="Response",r[r.User=5]="User",r})(N||{}),S=class{headers;status;statusText;url;ok;type;redirected;constructor(e,t=200,n="OK"){this.headers=e.headers||new P,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.redirected=e.redirected,this.ok=this.status>=200&&this.status<300}},z=class r extends S{constructor(e={}){super(e)}type=N.ResponseHeader;clone(e={}){return new r({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},B=class r extends S{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=N.Response;clone(e={}){return new r({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected})}},E=class extends S{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},De=200,Ve=204;function te(r,e){return{body:e,headers:r.headers,context:r.context,observe:r.observe,params:r.params,reportProgress:r.reportProgress,responseType:r.responseType,withCredentials:r.withCredentials,credentials:r.credentials,transferCache:r.transferCache,timeout:r.timeout,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,integrity:r.integrity,referrer:r.referrer}}var Q=(()=>{class r{handler;constructor(t){this.handler=t}request(t,n,s={}){let i;if(t instanceof F)i=t;else{let a;s.headers instanceof P?a=s.headers:a=new P(s.headers);let h;s.params&&(s.params instanceof A?h=s.params:h=new A({fromObject:s.params})),i=new F(t,n,s.body!==void 0?s.body:null,{headers:a,context:s.context,params:h,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials,transferCache:s.transferCache,keepalive:s.keepalive,priority:s.priority,cache:s.cache,mode:s.mode,redirect:s.redirect,credentials:s.credentials,referrer:s.referrer,integrity:s.integrity,timeout:s.timeout})}let o=ee(i).pipe(de(a=>this.handler.handle(a)));if(t instanceof F||s.observe==="events")return o;let c=o.pipe(le(a=>a instanceof B));switch(s.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return c.pipe($(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new k(2806,!1);return a.body}));case"blob":return c.pipe($(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new k(2807,!1);return a.body}));case"text":return c.pipe($(a=>{if(a.body!==null&&typeof a.body!="string")throw new k(2808,!1);return a.body}));default:return c.pipe($(a=>a.body))}case"response":return c;default:throw new k(2809,!1)}}delete(t,n={}){return this.request("DELETE",t,n)}get(t,n={}){return this.request("GET",t,n)}head(t,n={}){return this.request("HEAD",t,n)}jsonp(t,n){return this.request("JSONP",t,{params:new A().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,n={}){return this.request("OPTIONS",t,n)}patch(t,n,s={}){return this.request("PATCH",t,te(s,n))}post(t,n,s={}){return this.request("POST",t,te(s,n))}put(t,n,s={}){return this.request("PUT",t,te(s,n))}static \u0275fac=function(n){return new(n||r)(U(L))};static \u0275prov=O({token:r,factory:r.\u0275fac})}return r})(),Ke=/^\)\]\}',?\n/;function Ne(r){if(r.url)return r.url;let e=ie.toLocaleLowerCase();return r.headers.get(e)}var _e=new I(""),K=(()=>{class r{fetchImpl=v(re,{optional:!0})?.fetch??((...t)=>globalThis.fetch(...t));ngZone=v(we);destroyRef=v(ge);handle(t){return new H(n=>{let s=new AbortController;this.doRequest(t,s.signal,n).then(ne,o=>n.error(new E({error:o})));let i;return t.timeout&&(i=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{s.signal.aborted||s.abort(new DOMException("signal timed out","TimeoutError"))},t.timeout))),()=>{i!==void 0&&clearTimeout(i),s.abort()}})}async doRequest(t,n,s){let i=this.createRequestInit(t),o;try{let y=this.ngZone.runOutsideAngular(()=>this.fetchImpl(t.urlWithParams,C({signal:n},i)));We(y),s.next({type:N.Sent}),o=await y}catch(y){s.error(new E({error:y,status:y.status??0,statusText:y.statusText,url:t.urlWithParams,headers:y.headers}));return}let c=new P(o.headers),a=o.statusText,h=Ne(o)??t.urlWithParams,f=o.status,m=null;if(t.reportProgress&&s.next(new z({headers:c,status:f,statusText:a,url:h})),o.body){let y=o.headers.get("content-length"),_=[],l=o.body.getReader(),d=0,g,b,p=typeof Zone<"u"&&Zone.current,T=!1;if(await this.ngZone.runOutsideAngular(async()=>{for(;;){if(this.destroyRef.destroyed){await l.cancel(),T=!0;break}let{done:x,value:Z}=await l.read();if(x)break;if(_.push(Z),d+=Z.length,t.reportProgress){b=t.responseType==="text"?(b??"")+(g??=new TextDecoder).decode(Z,{stream:!0}):void 0;let ae=()=>s.next({type:N.DownloadProgress,total:y?+y:void 0,loaded:d,partialText:b});p?p.run(ae):ae()}}}),T){s.complete();return}let M=this.concatChunks(_,d);try{let x=o.headers.get(X)??"";m=this.parseBody(t,M,x,f)}catch(x){s.error(new E({error:x,headers:new P(o.headers),status:o.status,statusText:o.statusText,url:Ne(o)??t.urlWithParams}));return}}f===0&&(f=m?De:0);let w=f>=200&&f<300,D=o.redirected;w?(s.next(new B({body:m,headers:c,status:f,statusText:a,url:h,redirected:D})),s.complete()):s.error(new E({error:m,headers:c,status:f,statusText:a,url:h,redirected:D}))}parseBody(t,n,s,i){switch(t.responseType){case"json":let o=new TextDecoder().decode(n).replace(Ke,"");if(o==="")return null;try{return JSON.parse(o)}catch(c){if(i<200||i>=300)return o;throw c}case"text":return new TextDecoder().decode(n);case"blob":return new Blob([n],{type:s});case"arraybuffer":return n.buffer}}createRequestInit(t){let n={},s;if(s=t.credentials,t.withCredentials&&(s="include"),t.headers.forEach((i,o)=>n[i]=o.join(",")),t.headers.has(q)||(n[q]=Ie),!t.headers.has(X)){let i=t.detectContentTypeHeader();i!==null&&(n[X]=i)}return{body:t.serializeBody(),method:t.method,headers:n,credentials:s,keepalive:t.keepalive,cache:t.cache,priority:t.priority,mode:t.mode,redirect:t.redirect,referrer:t.referrer,integrity:t.integrity}}concatChunks(t,n){let s=new Uint8Array(n),i=0;for(let o of t)s.set(o,i),i+=o.length;return s}static \u0275fac=function(n){return new(n||r)};static \u0275prov=O({token:r,factory:r.\u0275fac})}return r})(),re=class{};function ne(){}function We(r){r.then(ne,ne)}function Ge(r,e){return e(r)}function qe(r,e,t){return(n,s)=>me(t,()=>e(n,i=>r(i,s)))}var xe=new I(""),Ce=new I(""),Ue=new I("",{providedIn:"root",factory:()=>!0});var Y=(()=>{class r extends L{backend;injector;chain=null;pendingTasks=v(ve);contributeToStability=v(Ue);constructor(t,n){super(),this.backend=t,this.injector=n}handle(t){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(xe),...this.injector.get(Ce,[])]));this.chain=n.reduceRight((s,i)=>qe(s,i,this.injector),Ge)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(t,s=>this.backend.handle(s)).pipe(ue(n))}else return this.chain(t,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||r)(U(j),U(fe))};static \u0275prov=O({token:r,factory:r.\u0275fac})}return r})();var Ye=/^\)\]\}',?\n/,Qe=RegExp(`^${ie}:`,"m");function Ze(r){return"responseURL"in r&&r.responseURL?r.responseURL:Qe.test(r.getAllResponseHeaders())?r.getResponseHeader(ie):null}var se=(()=>{class r{xhrFactory;constructor(t){this.xhrFactory=t}handle(t){if(t.method==="JSONP")throw new k(-2800,!1);let n=this.xhrFactory;return ee(null).pipe(he(()=>new H(i=>{let o=n.build();if(o.open(t.method,t.urlWithParams),t.withCredentials&&(o.withCredentials=!0),t.headers.forEach((l,d)=>o.setRequestHeader(l,d.join(","))),t.headers.has(q)||o.setRequestHeader(q,Ie),!t.headers.has(X)){let l=t.detectContentTypeHeader();l!==null&&o.setRequestHeader(X,l)}if(t.timeout&&(o.timeout=t.timeout),t.responseType){let l=t.responseType.toLowerCase();o.responseType=l!=="json"?l:"text"}let c=t.serializeBody(),a=null,h=()=>{if(a!==null)return a;let l=o.statusText||"OK",d=new P(o.getAllResponseHeaders()),g=Ze(o)||t.url;return a=new z({headers:d,status:o.status,statusText:l,url:g}),a},f=()=>{let{headers:l,status:d,statusText:g,url:b}=h(),p=null;d!==Ve&&(p=typeof o.response>"u"?o.responseText:o.response),d===0&&(d=p?De:0);let T=d>=200&&d<300;if(t.responseType==="json"&&typeof p=="string"){let M=p;p=p.replace(Ye,"");try{p=p!==""?JSON.parse(p):null}catch(x){p=M,T&&(T=!1,p={error:x,text:p})}}T?(i.next(new B({body:p,headers:l,status:d,statusText:g,url:b||void 0})),i.complete()):i.error(new E({error:p,headers:l,status:d,statusText:g,url:b||void 0}))},m=l=>{let{url:d}=h(),g=new E({error:l,status:o.status||0,statusText:o.statusText||"Unknown Error",url:d||void 0});i.error(g)},w=m;t.timeout&&(w=l=>{let{url:d}=h(),g=new E({error:new DOMException("Request timed out","TimeoutError"),status:o.status||0,statusText:o.statusText||"Request timeout",url:d||void 0});i.error(g)});let D=!1,y=l=>{D||(i.next(h()),D=!0);let d={type:N.DownloadProgress,loaded:l.loaded};l.lengthComputable&&(d.total=l.total),t.responseType==="text"&&o.responseText&&(d.partialText=o.responseText),i.next(d)},_=l=>{let d={type:N.UploadProgress,loaded:l.loaded};l.lengthComputable&&(d.total=l.total),i.next(d)};return o.addEventListener("load",f),o.addEventListener("error",m),o.addEventListener("timeout",w),o.addEventListener("abort",m),t.reportProgress&&(o.addEventListener("progress",y),c!==null&&o.upload&&o.upload.addEventListener("progress",_)),o.send(c),i.next({type:N.Sent}),()=>{o.removeEventListener("error",m),o.removeEventListener("abort",m),o.removeEventListener("load",f),o.removeEventListener("timeout",w),t.reportProgress&&(o.removeEventListener("progress",y),c!==null&&o.upload&&o.upload.removeEventListener("progress",_)),o.readyState!==o.DONE&&o.abort()}})))}static \u0275fac=function(n){return new(n||r)(U(Re))};static \u0275prov=O({token:r,factory:r.\u0275fac})}return r})(),Fe=new I(""),He="XSRF-TOKEN",et=new I("",{providedIn:"root",factory:()=>He}),tt="X-XSRF-TOKEN",rt=new I("",{providedIn:"root",factory:()=>tt}),J=class{},nt=(()=>{class r{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(t,n){this.doc=t,this.cookieName=n}getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Te(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(n){return new(n||r)(U(ye),U(et))};static \u0275prov=O({token:r,factory:r.\u0275fac})}return r})(),st=/^(?:https?:)?\/\//i;function it(r,e){if(!v(Fe)||r.method==="GET"||r.method==="HEAD"||st.test(r.url))return e(r);let t=v(J).getToken(),n=v(rt);return t!=null&&!r.headers.has(n)&&(r=r.clone({headers:r.headers.set(n,t)})),e(r)}var oe=(function(r){return r[r.Interceptors=0]="Interceptors",r[r.LegacyInterceptors=1]="LegacyInterceptors",r[r.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",r[r.NoXsrfProtection=3]="NoXsrfProtection",r[r.JsonpSupport=4]="JsonpSupport",r[r.RequestsMadeViaParent=5]="RequestsMadeViaParent",r[r.Fetch=6]="Fetch",r})(oe||{});function ot(r,e){return{\u0275kind:r,\u0275providers:e}}function at(...r){let e=[Q,se,Y,{provide:L,useExisting:Y},{provide:j,useFactory:()=>v(_e,{optional:!0})??v(se)},{provide:xe,useValue:it,multi:!0},{provide:Fe,useValue:!0},{provide:J,useClass:nt}];for(let t of r)e.push(...t.\u0275providers);return pe(e)}function ct(){return ot(oe.Fetch,[K,{provide:_e,useExisting:K},{provide:j,useExisting:K}])}var Le=200,lt=5e3,je=class r{http=v(Q);apps=R([]);overview=R(null);events=R([]);connected=R(!1);ready=R(!1);cwdHint=R(null);cwdResolved=R(null);cwdUnknown=R(!1);workspaceRows=R([]);workspaces=be(()=>{let e=new Set;for(let t of this.apps())t.workspaceLabel&&e.add(t.workspaceLabel);return Array.from(e).sort()});byName(e){return this.apps().find(t=>t.name===e)}streamStop;pollTimer;start(){this.streamStop||(this.refresh(),this.streamStop=this.openEventStream(),this.pollTimer=setInterval(()=>{this.refresh()},lt))}stop(){this.streamStop?.(),this.streamStop=void 0,this.pollTimer&&clearInterval(this.pollTimer),this.pollTimer=void 0}async refresh(){try{let[e,t]=await Promise.all([u(this.http.get("/api/apps?format=full")),u(this.http.get("/api/overview"))]);this.apps.set(Array.isArray(e)?e:[]),this.overview.set(t??null),this.connected.set(!0),this.ready.set(!0)}catch{this.connected.set(!1)}}async appDetail(e){try{return await u(this.http.get(`/api/apps/${encodeURIComponent(e)}?format=full`))}catch{return null}}async appErrors(e){try{let t=await u(this.http.get(`/api/apps/${encodeURIComponent(e)}/errors?format=full&level=all`));return Array.isArray(t)?t:[]}catch{return[]}}async startApp(e){this.patch(e,{status:"starting"}),await u(this.http.post(`/api/apps/${encodeURIComponent(e)}/start`,{})),await this.refresh()}async stopApp(e){this.patch(e,{status:"stopped"}),await u(this.http.post(`/api/apps/${encodeURIComponent(e)}/stop`,{})),await this.refresh()}async restartApp(e){this.patch(e,{status:"starting"}),await u(this.http.post(`/api/apps/${encodeURIComponent(e)}/restart`,{})),await this.refresh()}async ensureApp(e,t="healthy",n=18e4){return u(this.http.post(`/api/apps/${encodeURIComponent(e)}/ensure?until=${t}&timeoutMs=${n}`,{}))}async ensureUp(e,t="healthy",n=3e5){return u(this.http.post(`/api/profiles/${encodeURIComponent(e)}/ensure-up?until=${t}&timeoutMs=${n}`,{}))}async discoveryExplain(){try{return await u(this.http.get("/api/discovery/explain"))}catch{return null}}async getConfig(){try{return await u(this.http.get("/api/config"))}catch{return null}}async patchConfig(e,t){return u(this.http.patch("/api/config",t,{headers:{"if-match":e}}))}async reloadConfig(){return u(this.http.post("/api/config/reload",{}))}async runAutoFix(e={}){return u(this.http.post("/api/doctor/auto-fix",e))}async getCompileTimes(e,t=100){try{let n=await u(this.http.get(`/api/history/compile-times?app=${encodeURIComponent(e)}&limit=${t}`));return Array.isArray(n)?n:[]}catch{return[]}}async getTrends(e){try{let t=new URLSearchParams;return e.app&&t.set("app",e.app),t.set("metric",e.metric),t.set("since",e.since),await u(this.http.get(`/api/history/trends?${t.toString()}`))}catch{return null}}async getTrendsMulti(e){try{let t=new URLSearchParams;return e.app&&t.set("app",e.app),t.set("metrics",e.metrics.join(",")),t.set("since",e.since),await u(this.http.get(`/api/history/trends?${t.toString()}`))}catch{return null}}async getSelf(){try{return await u(this.http.get("/api/self"))}catch{return null}}async listWorkspaces(){try{let e=await u(this.http.get("/api/workspaces")),t=Array.isArray(e)?e:[];return this.workspaceRows.set(t),t}catch{return[]}}async resolveCwd(e){try{return await u(this.http.get(`/api/workspaces/resolve?cwd=${encodeURIComponent(e)}`))}catch{return null}}async registerWorkspace(e,t){let n={path:e};return t&&(n.label=t),u(this.http.post("/api/workspaces/ensure",n))}async getTimeline(e={}){try{let t=new URLSearchParams;e.since&&t.set("since",e.since),e.app&&t.set("app",e.app),e.kinds&&t.set("kinds",e.kinds);let n=t.toString(),s=await u(this.http.get("/api/history/timeline"+(n?"?"+n:"")));return Array.isArray(s)?s:[]}catch{return[]}}async getSelfHistory(e="6h"){try{let t=await u(this.http.get(`/api/self/history?since=${e}`));return Array.isArray(t)?t:[]}catch{return[]}}async getBundles(e,t=100){try{let n=await u(this.http.get(`/api/history/bundles?app=${encodeURIComponent(e)}&limit=${t}`));return Array.isArray(n)?n:[]}catch{return[]}}async getHistoryWhy(e){try{return await u(this.http.get(`/api/history/why/${encodeURIComponent(e)}`))}catch{return null}}async getAgents(){try{let e=await u(this.http.get("/api/agents"));return{agents:Array.isArray(e?.agents)?e.agents:[],locks:e?.locks&&typeof e.locks=="object"?e.locks:{},self:typeof e?.self=="string"?e.self:null}}catch{return{agents:[],locks:{},self:null}}}async getHistoryEvents(e={}){try{let t=new URLSearchParams;e.type&&t.set("type",e.type),e.app&&t.set("app",e.app),e.since&&t.set("since",e.since),e.limit&&t.set("limit",String(e.limit));let n=t.toString(),s=await u(this.http.get("/api/history/events"+(n?"?"+n:"")));return Array.isArray(s)?s.map(i=>({ts:i.ts,app:i.app,type:i.type,from:i.from_state??i.from,to:i.to_state??i.to,message:i.message})):[]}catch{return[]}}openLogStream(e,t){let n=new AbortController;return(async()=>{try{let i=(await fetch(`/api/apps/${encodeURIComponent(e)}/logs/stream`,{signal:n.signal})).body?.getReader();if(!i)return;let o=new TextDecoder,c="";for(;;){let{done:a,value:h}=await i.read();if(a)break;c+=o.decode(h,{stream:!0});let f=c.split(`
|
|
3
3
|
`);c=f.pop()??"";for(let m of f){let w=m.startsWith("data: ")?m.slice(6):m;if(w.trim())try{t(JSON.parse(w))}catch{}}}}catch{}})(),()=>n.abort()}patch(e,t){this.apps.update(n=>n.map(s=>s.name===e?C(C({},s),t):s))}appendEvent(e){this.events.update(t=>{let n=t.concat(e);return n.length>Le?n.slice(n.length-Le):n})}applyEvent(e){this.appendEvent(e),e.app&&(e.type==="status"&&e.to?this.patch(e.app,{status:e.to,lastChangeMs:0}):e.type==="health"&&e.to?this.patch(e.app,{health:e.to}):e.type==="error"&&this.apps.update(t=>t.map(n=>n.name===e.app?ce(C({},n),{errorCount:(n.errorCount??0)+1}):n)))}openEventStream(){let e=new AbortController;return(async()=>{try{let t=await fetch("/api/events?stream=ndjson",{signal:e.signal});this.connected.set(!0);let n=t.body?.getReader();if(!n)return;let s=new TextDecoder,i="";for(;;){let{done:o,value:c}=await n.read();if(o)break;i+=s.decode(c,{stream:!0});let a=i.split(`
|
|
4
4
|
`);i=a.pop()??"";for(let h of a)if(h.trim())try{this.applyEvent(JSON.parse(h))}catch{}}}catch{this.connected.set(!1)}})(),()=>e.abort()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=O({token:r,factory:r.\u0275fac,providedIn:"root"})};function Wt(r){switch(r.status){case"serving":return{color:"var(--mat-sys-primary)",label:r.health==="healthy"?"healthy":"serving",kind:"serving"};case"compiling":return{color:"var(--mat-sys-tertiary)",label:"compiling",kind:"compiling"};case"starting":return{color:"var(--mat-sys-secondary)",label:"starting",kind:"starting"};case"error":return{color:"var(--mat-sys-error)",label:"error",kind:"error"};default:return{color:"var(--mat-sys-outline)",label:"stopped",kind:"stopped"}}}export{Q as a,at as b,ct as c,je as d,Wt as e};
|