@whoz-oss/coday-client 0.249.7 → 0.249.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-Dt4HP_6r.js → chunk-0DLazttZ.js} +1 -1
- package/browser/{chunk-CwOPXZEL.js → chunk-14xVulKm.js} +1 -1
- package/browser/{chunk-Ce-SqhaH.js → chunk-4W78grSG.js} +1 -1
- package/browser/{chunk-yZXrhXjq.js → chunk-5rdVZHKH.js} +1 -1
- package/browser/{chunk-DhoUXdbf.js → chunk-6SsfFSoG.js} +1 -1
- package/browser/{chunk-m-JrYooj.js → chunk-B1LoEamJ.js} +1 -1
- package/browser/{chunk-Clsp8PqN.js → chunk-B4IOFZod.js} +1 -1
- package/browser/{chunk-BVn3NXYI.js → chunk-B4glcPfc.js} +1 -1
- package/browser/{chunk-D4BFancP.js → chunk-B5JJGvDV.js} +1 -1
- package/browser/{chunk-BAmsPD3r.js → chunk-B638hYBH.js} +1 -1
- package/browser/{chunk-CgJwfnU2.js → chunk-B86dntDV.js} +1 -1
- package/browser/{chunk-CmjpqALv.js → chunk-B8Hj5zSc.js} +3 -3
- package/browser/{chunk-BuvPMEL0.js → chunk-B9bfwdrZ.js} +3 -3
- package/browser/{chunk-EWpqubAu.js → chunk-BCdZ0s7K.js} +1 -1
- package/browser/{chunk-Dszi4fsk.js → chunk-BCqgdXa2.js} +1 -1
- package/browser/{chunk-BZI3JT54.js → chunk-BEWBmv_p.js} +1 -1
- package/browser/{chunk-BfeoBGQ9.js → chunk-BFyba197.js} +1 -1
- package/browser/{chunk-DMseVDyx.js → chunk-BJDByX7-.js} +1 -1
- package/browser/{chunk-B8vTtlfh.js → chunk-BQJyTdNB.js} +2 -2
- package/browser/chunk-BSTCpwsr.js +1 -0
- package/browser/{chunk-BbBDsahP.js → chunk-BTaLhUa1.js} +1 -1
- package/browser/{chunk-C5iStkq3.js → chunk-B_SIbEE4.js} +1 -1
- package/browser/chunk-BbLMzp9k.js +37 -0
- package/browser/{chunk-CwVIbvMt.js → chunk-BfZyIX9-.js} +1 -1
- package/browser/{chunk-BXQlLEq4.js → chunk-BgYxYYFj.js} +2 -2
- package/browser/{chunk-DBVltHOO.js → chunk-BiIYygHc.js} +3 -3
- package/browser/{chunk-C5a0dF7k.js → chunk-BjmMhl9l.js} +1 -1
- package/browser/{chunk-DtRowKlH.js → chunk-Bs4lUz4W.js} +1 -1
- package/browser/{chunk-CFsppsJO.js → chunk-C1jgW_vt.js} +1 -1
- package/browser/{chunk-Cuj0_PIE.js → chunk-C61o-KhY.js} +1 -1
- package/browser/{chunk-BmXT79gZ.js → chunk-C7O0lv-N.js} +1 -1
- package/browser/{chunk-Bm3jLRpw.js → chunk-C857K-GW.js} +1 -1
- package/browser/{chunk-D4pA968T.js → chunk-CALvfg9j.js} +1 -1
- package/browser/{chunk-CAtc1ecu.js → chunk-CDlpxL7C.js} +1 -1
- package/browser/{chunk-BRXCNJvv.js → chunk-CEIj_SQC.js} +1 -1
- package/browser/chunk-COV5Dgin.js +276 -0
- package/browser/chunk-CPtlVKZn.js +1 -0
- package/browser/{chunk-DdMCtiIj.js → chunk-CRfYIzzY.js} +1 -1
- package/browser/{chunk-8Eyic2K4.js → chunk-CX_ZpPnR.js} +1 -1
- package/browser/{chunk-BwFdftpq.js → chunk-C_Myq1m3.js} +1 -1
- package/browser/{chunk-C7dWjJdY.js → chunk-CgzkgcLp.js} +2 -2
- package/browser/chunk-CjOZDsNf.js +7 -0
- package/browser/{chunk-IRYK8gQC.js → chunk-CtA5aepT.js} +1 -1
- package/browser/{chunk-maGoHfNW.js → chunk-CxSXBi5z.js} +1 -1
- package/browser/{chunk-BUz3EUUk.js → chunk-D1TRN0MX.js} +1 -1
- package/browser/{chunk-SP2AM0SK.js → chunk-D21FPLZ4.js} +1 -1
- package/browser/{chunk-zdTdqHNW.js → chunk-DGZZZMSy.js} +2 -2
- package/browser/{chunk-DmDjr28S.js → chunk-DOgkeupI.js} +1 -1
- package/browser/{chunk-C8-Us7mG.js → chunk-DR7eHENE.js} +1 -1
- package/browser/{chunk-cd-U8aJW.js → chunk-DZo4BkAy.js} +1 -1
- package/browser/{chunk-BMgmcV4B.js → chunk-Dax4e1JZ.js} +6 -6
- package/browser/{chunk-3_ejZSiX.js → chunk-DcNhcvYJ.js} +1 -1
- package/browser/{chunk-BBLhUbcZ.js → chunk-Djnp-vUI.js} +6 -6
- package/browser/{chunk-FyGR8D8l.js → chunk-Djxe1buY.js} +4 -4
- package/browser/{chunk-CyB5bq-B.js → chunk-DpTWpgRi.js} +1 -1
- package/browser/{chunk-BY12tEuK.js → chunk-DtIFBPXN.js} +1 -1
- package/browser/{chunk-Dl5GYR1f.js → chunk-EaXjSZ08.js} +1 -1
- package/browser/{chunk-3x6JTc-Q.js → chunk-FNh4E199.js} +1 -1
- package/browser/{chunk-Cie8aEhE.js → chunk-Hwi8LgHH.js} +1 -1
- package/browser/{chunk-DbPWDOCY.js → chunk-ILoui0Go.js} +1 -1
- package/browser/{chunk-DiH98F5Y.js → chunk-RmWeivJM.js} +1 -1
- package/browser/{chunk-DGfCbMIU.js → chunk-SFXE5Xl_.js} +1 -1
- package/browser/{chunk-Ba9oGMbp.js → chunk-SmTJ8TRR.js} +2 -2
- package/browser/{chunk-DEM_1kYL.js → chunk-_rnm3CUz.js} +1 -1
- package/browser/{chunk-C7yIemdX.js → chunk-pvYR1_Ao.js} +1 -1
- package/browser/{chunk-CyPzVyFW.js → chunk-vZ6JA8WO.js} +5 -5
- package/browser/index.html +1 -1
- package/browser/{main-RF3N53YL.js → main-VYETRYCE.js} +16 -16
- package/package.json +1 -1
- package/browser/chunk-9yQCwEpD.js +0 -1
- package/browser/chunk-CUubHATe.js +0 -276
- package/browser/chunk-CmdzwND4.js +0 -37
- package/browser/chunk-DLdFeD2Y.js +0 -7
- package/browser/chunk-DRHPWyM_.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {W as We$1,Q as Qt$1}from'./chunk-BMgmcV4B.js';import {_,b as _e,d as an,E as En}from'./chunk-CmdzwND4.js';import {aK as Do,aL as Wn,cp as Se,aN as wt$1,g,az as Qt,br as wl,bF as p,aS as Ut$1,aO as G,aV as w,cq as mB,m as mT,cr as vB,cs as vi,H as Hi,an as ce$1,aR as K,bs as Qn,cc as Hf,bQ as bd,u as ue,au as tv,ae as Ot$1,ap as Vy,bO as Yy,ct as IB,A as Aw,cd as Sb,bz as vC,af as Dg,ag as fT,v as vs,l as Ag,n as eC,bA as DC,k as dl,X as XE,y as Hg,t as tC,b4 as nT,cu as Lg,D as Fg,cv as CC,I as IC,E as wC,cw as Pg,bu as kg,aY as ks,aQ as As,cx as si,cy as Xr,aC as wu,aZ as YT,b$ as Ng,C as Cg,bE as X,b5 as Sg,aw as fl,ax as pl,ac as mC,o as bg,r as Tg,T as TC,cz as Sn$1,aW as D,cA as on,cB as R,cC as Ce,W as WC,a8 as Zg,aE as A,cD as Rd}from'./main-RF3N53YL.js';var oe=class{_box;_destroyed=new ce$1;_resizeSubject=new ce$1;_resizeObserver;_elementObservables=new Map;constructor(l){this._box=l,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)));}observe(l){return this._elementObservables.has(l)||this._elementObservables.set(l,new A(e=>{let t=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(l,{box:this._box}),()=>{this._resizeObserver?.unobserve(l),t.unsubscribe(),this._elementObservables.delete(l);}}).pipe(Ot$1(e=>e.some(t=>t.target===l)),Rd({bufferSize:1,refCount:true}),Vy(this._destroyed))),this._elementObservables.get(l)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear();}},qe=(()=>{class i{_cleanupErrorListener;_observers=new Map;_ngZone=g(G);constructor(){}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.();}observe(e,t){let n=t?.box||"content-box";return this._observers.has(n)||this._observers.set(n,new oe(n)),this._observers.get(n).observe(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Ce({token:i,factory:i.\u0275fac})}return i})();var ut=["notch"],ht=["*"],Ue=["iconPrefixContainer"],We=["textPrefixContainer"],Ge=["iconSuffixContainer"],$e=["textSuffixContainer"],pt=["textField"],_t=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],bt=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function gt(i,l){i&1&&bg(0,"span",21);}function vt(i,l){if(i&1&&(vs(0,"label",20),DC(1,1),eC(2,gt,1,0,"span",21),dl()),i&2){let e=mC(2);Tg("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),Cg("for",e._control.disableAutomaticLabeling?null:e._control.id),XE(2),tC(!e.hideRequiredMarker&&e._control.required?2:-1);}}function xt(i,l){if(i&1&&eC(0,vt,3,5,"label",20),i&2){let e=mC();tC(e._hasFloatingLabel()?0:-1);}}function yt(i,l){i&1&&bg(0,"div",7);}function Ft(i,l){}function Ct(i,l){if(i&1&&Dg(0,Ft,0,0,"ng-template",13),i&2){mC(2);let e=TC(1);Tg("ngTemplateOutlet",e);}}function wt(i,l){if(i&1&&(vs(0,"div",9),eC(1,Ct,1,1,null,13),dl()),i&2){let e=mC();Tg("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),XE(),tC(e._forceDisplayInfixLabel()?-1:1);}}function Mt(i,l){i&1&&(vs(0,"div",10,2),DC(2,2),dl());}function Et(i,l){i&1&&(vs(0,"div",11,3),DC(2,3),dl());}function St(i,l){}function Tt(i,l){if(i&1&&Dg(0,St,0,0,"ng-template",13),i&2){mC();let e=TC(1);Tg("ngTemplateOutlet",e);}}function Rt(i,l){i&1&&(vs(0,"div",14,4),DC(2,4),dl());}function Dt(i,l){i&1&&(vs(0,"div",15,5),DC(2,5),dl());}function Nt(i,l){i&1&&bg(0,"div",16);}function At(i,l){i&1&&(vs(0,"div",18),DC(1,6),dl());}function It(i,l){if(i&1&&(vs(0,"mat-hint",22),WC(1),dl()),i&2){let e=mC(2);Tg("id",e._hintLabelId),XE(),Zg(e.hintLabel);}}function Lt(i,l){if(i&1&&(vs(0,"div",19),eC(1,It,2,2,"mat-hint",22),DC(2,7),bg(3,"div",23),DC(4,8),dl()),i&2){let e=mC();XE(),tC(e.hintLabel?1:-1);}}var ae=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["mat-label"]]})}return i})(),kt=new w("MatError");var le=(()=>{class i{align="start";id=g(Ut$1).getId("mat-mdc-hint-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(t,n){t&2&&(Ng("id",n.id),Cg("align",null),Hg("mat-mdc-form-field-hint-end",n.align==="end"));},inputs:{align:"align",id:"id"}})}return i})(),et=new w("MatPrefix"),Ot=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:[0,"matTextPrefix","_isTextSelector"]},features:[nT([{provide:et,useExisting:i}])]})}return i})(),tt=new w("MatSuffix"),zt=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[nT([{provide:tt,useExisting:i}])]})}return i})(),it=new w("FloatingLabelParent"),Ze=(()=>{class i{_elementRef=g(Qt);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize();}_floating=false;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe();}_monitorResize=false;_resizeObserver=g(qe);_ngZone=g(G);_parent=g(it);_resizeSubscription=new X;ngOnDestroy(){this._resizeSubscription.unsubscribe();}getWidth(){return Pt(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized());}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize());});}static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(t,n){t&2&&Hg("mdc-floating-label--float-above",n.floating);},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return i})();function Pt(i){let l=i;if(l.offsetParent!==null)return l.scrollWidth;let e=l.cloneNode(true);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let t=e.scrollWidth;return e.remove(),t}var Qe="mdc-line-ripple--active",Z="mdc-line-ripple--deactivating",Xe=(()=>{class i{_elementRef=g(Qt);_cleanupTransitionEnd;constructor(){let e=g(G),t=g(As);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=t.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd);});}activate(){let e=this._elementRef.nativeElement.classList;e.remove(Z),e.add(Qe);}deactivate(){this._elementRef.nativeElement.classList.add(Z);}_handleTransitionEnd=e=>{let t=this._elementRef.nativeElement.classList,n=t.contains(Z);e.propertyName==="opacity"&&n&&t.remove(Qe,Z);};ngOnDestroy(){this._cleanupTransitionEnd();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return i})(),Ye=(()=>{class i{_elementRef=g(Qt);_ngZone=g(G);open=false;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,t=e.querySelector(".mdc-floating-label");t?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="");}))):e.classList.add("mdc-notched-outline--no-label");}_setNotchWidth(e){let t=this._notch.nativeElement;!this.open||!e?t.style.width="":t.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`;}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`);}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Aw({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(t,n){if(t&1&&Fg(ut,5),t&2){let r;IC(r=wC())&&(n._notch=r.first);}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(t,n){t&2&&Hg("mdc-notched-outline--notched",n.open);},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},ngContentSelectors:ht,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(t,n){t&1&&(vC(),Sg(0,"div",1),fl(1,"div",2,0),DC(3),pl(),Sg(4,"div",3));},encapsulation:2})}return i})(),de=(()=>{class i{value=null;stateChanges;id;placeholder;ngControl=null;focused=false;empty=false;shouldLabelFloat=false;required=false;disabled=false;errorState=false;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i})}return i})();var se=new w("MatFormField"),Bt=new w("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Ke="fill",Vt="auto",Je="fixed",Ht="translateY(-50%)",nt=(()=>{class i{_elementRef=g(Qt);_changeDetectorRef=g(wl);_platform=g(p);_idGenerator=g(Ut$1);_ngZone=g(G);_defaults=g(Bt,{optional:true});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=mB("iconPrefixContainer");_textPrefixContainerSignal=mB("textPrefixContainer");_iconSuffixContainerSignal=mB("iconSuffixContainer");_textSuffixContainerSignal=mB("textSuffixContainer");_prefixSuffixContainers=mT(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=vB(ae);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=vi(e);}_hideRequiredMarker=false;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||Vt}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck());}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let t=e||this._defaults?.appearance||Ke;this._appearanceSignal.set(t);}_appearanceSignal=Hi(Ke);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||Je}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||Je;}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints();}_hintLabel="";_hasIconPrefix=false;_hasTextPrefix=false;_hasIconSuffix=false;_hasTextSuffix=false;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e;}_destroyed=new ce$1;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=K();constructor(){let e=this._defaults,t=g(Qn);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),Hf(()=>this._currentDirection=t.valueSignal()),this._syncOutlineLabelOffset();}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled");},300);}),this._changeDetectorRef.detectChanges();}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix();}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck();}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete();}getLabelId=mT(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always");}_initializeControl(e){let t=this._control,n="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(n+e.controlType),t.controlType&&this._elementRef.nativeElement.classList.add(n+t.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=t.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck();}),this._describedByChanges?.unsubscribe(),this._describedByChanges=t.stateChanges.pipe(bd([void 0,void 0]),ue(()=>[t.errorState,t.userAriaDescribedBy]),tv(),Ot$1(([[r,a],[s,C]])=>r!==s||a!==C)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),t.ngControl&&t.ngControl.valueChanges&&(this._valueChanges=t.ngControl.valueChanges.pipe(Vy(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()));}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText);}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Yy(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck();});}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck();}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck();}),this._validateHints(),this._syncDescribedByIds();}_assertFormFieldControl(){this._control;}_updateFocusState(){let e=this._control.focused;e&&!this._isFocused?(this._isFocused=true,this._lineRipple?.activate()):!e&&(this._isFocused||this._isFocused===null)&&(this._isFocused=false,this._lineRipple?.deactivate()),this._elementRef.nativeElement.classList.toggle("mat-focused",e),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",e);}_syncOutlineLabelOffset(){IB({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset());});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"});}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())});}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return !this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=mT(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():false}_shouldForward(e){let t=this._control?this._control.ngControl:null;return t&&t[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth();}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth());}_processHints(){this._validateHints(),this._syncDescribedByIds();}_validateHints(){this._hintChildren;}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let r=this._hintChildren?this._hintChildren.find(s=>s.align==="start"):null,a=this._hintChildren?this._hintChildren.find(s=>s.align==="end"):null;r?e.push(r.id):this._hintLabel&&e.push(this._hintLabelId),a&&e.push(a.id);}else this._errorChildren&&e.push(...this._errorChildren.map(r=>r.id));let t=this._control.describedByIds,n;if(t){let r=this._describedByIds||e;n=e.concat(t.filter(a=>a&&!r.includes(a)));}else n=e;this._control.setDescribedByIds(n),this._describedByIds=e;}}_getOutlinedLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return ["",null];if(!this._isAttachedToDom())return null;let e=this._iconPrefixContainer?.nativeElement,t=this._textPrefixContainer?.nativeElement,n=this._iconSuffixContainer?.nativeElement,r=this._textSuffixContainer?.nativeElement,a=e?.getBoundingClientRect().width??0,s=t?.getBoundingClientRect().width??0,C=n?.getBoundingClientRect().width??0,M=r?.getBoundingClientRect().width??0,dt=this._currentDirection==="rtl"?"-1":"1",st=`${a+s}px`,ct=`calc(${dt} * (${st} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,ft=`var(--mat-mdc-form-field-label-transform, ${Ht} translateX(${ct}))`,mt=a+s+C+M;return [ft,mt]}_writeOutlinedLabelStyles(e){if(e!==null){let[t,n]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=t),n!==null&&this._notchedOutline?._setMaxWidth(n);}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let t=e.getRootNode();return t&&t!==e}return document.documentElement.contains(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Aw({type:i,selectors:[["mat-form-field"]],contentQueries:function(t,n,r){if(t&1&&(Pg(r,n._labelChild,ae,5),kg(r,de,5)(r,et,5)(r,tt,5)(r,kt,5)(r,le,5)),t&2){CC();let a;IC(a=wC())&&(n._formFieldControl=a.first),IC(a=wC())&&(n._prefixChildren=a),IC(a=wC())&&(n._suffixChildren=a),IC(a=wC())&&(n._errorChildren=a),IC(a=wC())&&(n._hintChildren=a);}},viewQuery:function(t,n){if(t&1&&(Lg(n._iconPrefixContainerSignal,Ue,5)(n._textPrefixContainerSignal,We,5)(n._iconSuffixContainerSignal,Ge,5)(n._textSuffixContainerSignal,$e,5),Fg(pt,5)(Ue,5)(We,5)(Ge,5)($e,5)(Ze,5)(Ye,5)(Xe,5)),t&2){CC(4);let r;IC(r=wC())&&(n._textField=r.first),IC(r=wC())&&(n._iconPrefixContainer=r.first),IC(r=wC())&&(n._textPrefixContainer=r.first),IC(r=wC())&&(n._iconSuffixContainer=r.first),IC(r=wC())&&(n._textSuffixContainer=r.first),IC(r=wC())&&(n._floatingLabel=r.first),IC(r=wC())&&(n._notchedOutline=r.first),IC(r=wC())&&(n._lineRipple=r.first);}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(t,n){t&2&&Hg("mat-mdc-form-field-label-always-float",n._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",n._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",n._hasIconSuffix)("mat-form-field-invalid",n._control.errorState)("mat-form-field-disabled",n._control.disabled)("mat-form-field-autofilled",n._control.autofilled)("mat-form-field-appearance-fill",n.appearance=="fill")("mat-form-field-appearance-outline",n.appearance=="outline")("mat-form-field-hide-placeholder",n._hasFloatingLabel()&&!n._shouldLabelFloat())("mat-primary",n.color!=="accent"&&n.color!=="warn")("mat-accent",n.color==="accent")("mat-warn",n.color==="warn")("ng-untouched",n._shouldForward("untouched"))("ng-touched",n._shouldForward("touched"))("ng-pristine",n._shouldForward("pristine"))("ng-dirty",n._shouldForward("dirty"))("ng-valid",n._shouldForward("valid"))("ng-invalid",n._shouldForward("invalid"))("ng-pending",n._shouldForward("pending"));},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[nT([{provide:se,useExisting:i},{provide:it,useExisting:i}])],ngContentSelectors:bt,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],["aria-atomic","true","aria-live","polite",1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(t,n){if(t&1&&(vC(_t),Dg(0,xt,1,1,"ng-template",null,0,fT),vs(2,"div",6,1),Ag("click",function(a){return n._control.onContainerClick(a)}),eC(4,yt,1,0,"div",7),vs(5,"div",8),eC(6,wt,2,2,"div",9),eC(7,Mt,3,0,"div",10),eC(8,Et,3,0,"div",11),vs(9,"div",12),eC(10,Tt,1,1,null,13),DC(11),dl(),eC(12,Rt,3,0,"div",14),eC(13,Dt,3,0,"div",15),dl(),eC(14,Nt,1,0,"div",16),dl(),vs(15,"div",17),eC(16,At,2,0,"div",18)(17,Lt,5,1,"div",19),dl()),t&2){let r;XE(2),Hg("mdc-text-field--filled",!n._hasOutline())("mdc-text-field--outlined",n._hasOutline())("mdc-text-field--no-label",!n._hasFloatingLabel())("mdc-text-field--disabled",n._control.disabled)("mdc-text-field--invalid",n._control.errorState),XE(2),tC(!n._hasOutline()&&!n._control.disabled?4:-1),XE(2),tC(n._hasOutline()?6:-1),XE(),tC(n._hasIconPrefix?7:-1),XE(),tC(n._hasTextPrefix?8:-1),XE(2),tC(!n._hasOutline()||n._forceDisplayInfixLabel()?10:-1),XE(2),tC(n._hasTextSuffix?12:-1),XE(),tC(n._hasIconSuffix?13:-1),XE(),tC(n._hasOutline()?-1:14),XE(),Hg("mat-mdc-form-field-subscript-dynamic-size",n.subscriptSizing==="dynamic");let a=n._getSubscriptMessageType();XE(),tC((r=a)==="error"?16:r==="hint"?17:-1);}},dependencies:[Ze,Ye,Sb,Xe,le],styles:[`.mdc-text-field {
|
|
1
|
+
import {W as We$1,Q as Qt$1}from'./chunk-Dax4e1JZ.js';import {_,b as _e,d as an,E as En}from'./chunk-BbLMzp9k.js';import {aK as Do,aL as qn,cp as Se,aN as wt$1,g,az as Qt,br as Cl,bF as p,aS as Ut$1,aO as G,aV as w,cq as vB,m as mT,cr as EB,cs as vi,H as Hi,an as ce$1,aR as K,bs as Qn,cc as Hf,bQ as bd,u as ue,au as tv,ae as Ot$1,ap as Vy,bO as Yy,ct as CB,A as Aw,cd as Sb,bz as vC,af as Dg,ag as fT,v as vs,l as Ag,n as eC,bA as DC,k as fl,X as XE,y as Hg,t as tC,b4 as nT,cu as Lg,D as Fg,cv as CC,I as IC,E as wC,cw as Pg,bu as kg,aY as ks,aQ as As,cx as si,cy as Xr,aC as Cu,aZ as YT,b$ as Ng,C as Cg,bE as X,b5 as Sg,aw as pl,ax as hl,ac as mC,o as bg,r as Tg,T as TC,cz as Sn$1,aW as D,cA as on,cB as R,cC as Ce,W as WC,a8 as Zg,aE as A,cD as Rd}from'./main-VYETRYCE.js';var oe=class{_box;_destroyed=new ce$1;_resizeSubject=new ce$1;_resizeObserver;_elementObservables=new Map;constructor(l){this._box=l,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)));}observe(l){return this._elementObservables.has(l)||this._elementObservables.set(l,new A(e=>{let t=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(l,{box:this._box}),()=>{this._resizeObserver?.unobserve(l),t.unsubscribe(),this._elementObservables.delete(l);}}).pipe(Ot$1(e=>e.some(t=>t.target===l)),Rd({bufferSize:1,refCount:true}),Vy(this._destroyed))),this._elementObservables.get(l)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear();}},qe=(()=>{class i{_cleanupErrorListener;_observers=new Map;_ngZone=g(G);constructor(){}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.();}observe(e,t){let n=t?.box||"content-box";return this._observers.has(n)||this._observers.set(n,new oe(n)),this._observers.get(n).observe(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Ce({token:i,factory:i.\u0275fac})}return i})();var ut=["notch"],ht=["*"],Ue=["iconPrefixContainer"],We=["textPrefixContainer"],Ge=["iconSuffixContainer"],$e=["textSuffixContainer"],pt=["textField"],_t=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],bt=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function gt(i,l){i&1&&bg(0,"span",21);}function vt(i,l){if(i&1&&(vs(0,"label",20),DC(1,1),eC(2,gt,1,0,"span",21),fl()),i&2){let e=mC(2);Tg("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),Cg("for",e._control.disableAutomaticLabeling?null:e._control.id),XE(2),tC(!e.hideRequiredMarker&&e._control.required?2:-1);}}function xt(i,l){if(i&1&&eC(0,vt,3,5,"label",20),i&2){let e=mC();tC(e._hasFloatingLabel()?0:-1);}}function yt(i,l){i&1&&bg(0,"div",7);}function Ft(i,l){}function Ct(i,l){if(i&1&&Dg(0,Ft,0,0,"ng-template",13),i&2){mC(2);let e=TC(1);Tg("ngTemplateOutlet",e);}}function wt(i,l){if(i&1&&(vs(0,"div",9),eC(1,Ct,1,1,null,13),fl()),i&2){let e=mC();Tg("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),XE(),tC(e._forceDisplayInfixLabel()?-1:1);}}function Mt(i,l){i&1&&(vs(0,"div",10,2),DC(2,2),fl());}function Et(i,l){i&1&&(vs(0,"div",11,3),DC(2,3),fl());}function St(i,l){}function Tt(i,l){if(i&1&&Dg(0,St,0,0,"ng-template",13),i&2){mC();let e=TC(1);Tg("ngTemplateOutlet",e);}}function Rt(i,l){i&1&&(vs(0,"div",14,4),DC(2,4),fl());}function Dt(i,l){i&1&&(vs(0,"div",15,5),DC(2,5),fl());}function Nt(i,l){i&1&&bg(0,"div",16);}function At(i,l){i&1&&(vs(0,"div",18),DC(1,6),fl());}function It(i,l){if(i&1&&(vs(0,"mat-hint",22),WC(1),fl()),i&2){let e=mC(2);Tg("id",e._hintLabelId),XE(),Zg(e.hintLabel);}}function Lt(i,l){if(i&1&&(vs(0,"div",19),eC(1,It,2,2,"mat-hint",22),DC(2,7),bg(3,"div",23),DC(4,8),fl()),i&2){let e=mC();XE(),tC(e.hintLabel?1:-1);}}var ae=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["mat-label"]]})}return i})(),kt=new w("MatError");var le=(()=>{class i{align="start";id=g(Ut$1).getId("mat-mdc-hint-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(t,n){t&2&&(Ng("id",n.id),Cg("align",null),Hg("mat-mdc-form-field-hint-end",n.align==="end"));},inputs:{align:"align",id:"id"}})}return i})(),et=new w("MatPrefix"),Ot=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:[0,"matTextPrefix","_isTextSelector"]},features:[nT([{provide:et,useExisting:i}])]})}return i})(),tt=new w("MatSuffix"),zt=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[nT([{provide:tt,useExisting:i}])]})}return i})(),it=new w("FloatingLabelParent"),Ze=(()=>{class i{_elementRef=g(Qt);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize();}_floating=false;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe();}_monitorResize=false;_resizeObserver=g(qe);_ngZone=g(G);_parent=g(it);_resizeSubscription=new X;ngOnDestroy(){this._resizeSubscription.unsubscribe();}getWidth(){return Pt(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized());}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize());});}static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(t,n){t&2&&Hg("mdc-floating-label--float-above",n.floating);},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return i})();function Pt(i){let l=i;if(l.offsetParent!==null)return l.scrollWidth;let e=l.cloneNode(true);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let t=e.scrollWidth;return e.remove(),t}var Qe="mdc-line-ripple--active",Z="mdc-line-ripple--deactivating",Xe=(()=>{class i{_elementRef=g(Qt);_cleanupTransitionEnd;constructor(){let e=g(G),t=g(As);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=t.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd);});}activate(){let e=this._elementRef.nativeElement.classList;e.remove(Z),e.add(Qe);}deactivate(){this._elementRef.nativeElement.classList.add(Z);}_handleTransitionEnd=e=>{let t=this._elementRef.nativeElement.classList,n=t.contains(Z);e.propertyName==="opacity"&&n&&t.remove(Qe,Z);};ngOnDestroy(){this._cleanupTransitionEnd();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return i})(),Ye=(()=>{class i{_elementRef=g(Qt);_ngZone=g(G);open=false;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,t=e.querySelector(".mdc-floating-label");t?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="");}))):e.classList.add("mdc-notched-outline--no-label");}_setNotchWidth(e){let t=this._notch.nativeElement;!this.open||!e?t.style.width="":t.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`;}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`);}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Aw({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(t,n){if(t&1&&Fg(ut,5),t&2){let r;IC(r=wC())&&(n._notch=r.first);}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(t,n){t&2&&Hg("mdc-notched-outline--notched",n.open);},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},ngContentSelectors:ht,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(t,n){t&1&&(vC(),Sg(0,"div",1),pl(1,"div",2,0),DC(3),hl(),Sg(4,"div",3));},encapsulation:2})}return i})(),de=(()=>{class i{value=null;stateChanges;id;placeholder;ngControl=null;focused=false;empty=false;shouldLabelFloat=false;required=false;disabled=false;errorState=false;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i})}return i})();var se=new w("MatFormField"),Bt=new w("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Ke="fill",Vt="auto",Je="fixed",Ht="translateY(-50%)",nt=(()=>{class i{_elementRef=g(Qt);_changeDetectorRef=g(Cl);_platform=g(p);_idGenerator=g(Ut$1);_ngZone=g(G);_defaults=g(Bt,{optional:true});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=vB("iconPrefixContainer");_textPrefixContainerSignal=vB("textPrefixContainer");_iconSuffixContainerSignal=vB("iconSuffixContainer");_textSuffixContainerSignal=vB("textSuffixContainer");_prefixSuffixContainers=mT(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=EB(ae);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=vi(e);}_hideRequiredMarker=false;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||Vt}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck());}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let t=e||this._defaults?.appearance||Ke;this._appearanceSignal.set(t);}_appearanceSignal=Hi(Ke);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||Je}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||Je;}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints();}_hintLabel="";_hasIconPrefix=false;_hasTextPrefix=false;_hasIconSuffix=false;_hasTextSuffix=false;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e;}_destroyed=new ce$1;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=K();constructor(){let e=this._defaults,t=g(Qn);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),Hf(()=>this._currentDirection=t.valueSignal()),this._syncOutlineLabelOffset();}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled");},300);}),this._changeDetectorRef.detectChanges();}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix();}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck();}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete();}getLabelId=mT(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always");}_initializeControl(e){let t=this._control,n="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(n+e.controlType),t.controlType&&this._elementRef.nativeElement.classList.add(n+t.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=t.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck();}),this._describedByChanges?.unsubscribe(),this._describedByChanges=t.stateChanges.pipe(bd([void 0,void 0]),ue(()=>[t.errorState,t.userAriaDescribedBy]),tv(),Ot$1(([[r,a],[s,C]])=>r!==s||a!==C)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),t.ngControl&&t.ngControl.valueChanges&&(this._valueChanges=t.ngControl.valueChanges.pipe(Vy(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()));}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText);}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Yy(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck();});}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck();}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck();}),this._validateHints(),this._syncDescribedByIds();}_assertFormFieldControl(){this._control;}_updateFocusState(){let e=this._control.focused;e&&!this._isFocused?(this._isFocused=true,this._lineRipple?.activate()):!e&&(this._isFocused||this._isFocused===null)&&(this._isFocused=false,this._lineRipple?.deactivate()),this._elementRef.nativeElement.classList.toggle("mat-focused",e),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",e);}_syncOutlineLabelOffset(){CB({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset());});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"});}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())});}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return !this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=mT(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():false}_shouldForward(e){let t=this._control?this._control.ngControl:null;return t&&t[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth();}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth());}_processHints(){this._validateHints(),this._syncDescribedByIds();}_validateHints(){this._hintChildren;}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let r=this._hintChildren?this._hintChildren.find(s=>s.align==="start"):null,a=this._hintChildren?this._hintChildren.find(s=>s.align==="end"):null;r?e.push(r.id):this._hintLabel&&e.push(this._hintLabelId),a&&e.push(a.id);}else this._errorChildren&&e.push(...this._errorChildren.map(r=>r.id));let t=this._control.describedByIds,n;if(t){let r=this._describedByIds||e;n=e.concat(t.filter(a=>a&&!r.includes(a)));}else n=e;this._control.setDescribedByIds(n),this._describedByIds=e;}}_getOutlinedLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return ["",null];if(!this._isAttachedToDom())return null;let e=this._iconPrefixContainer?.nativeElement,t=this._textPrefixContainer?.nativeElement,n=this._iconSuffixContainer?.nativeElement,r=this._textSuffixContainer?.nativeElement,a=e?.getBoundingClientRect().width??0,s=t?.getBoundingClientRect().width??0,C=n?.getBoundingClientRect().width??0,M=r?.getBoundingClientRect().width??0,dt=this._currentDirection==="rtl"?"-1":"1",st=`${a+s}px`,ct=`calc(${dt} * (${st} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,ft=`var(--mat-mdc-form-field-label-transform, ${Ht} translateX(${ct}))`,mt=a+s+C+M;return [ft,mt]}_writeOutlinedLabelStyles(e){if(e!==null){let[t,n]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=t),n!==null&&this._notchedOutline?._setMaxWidth(n);}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let t=e.getRootNode();return t&&t!==e}return document.documentElement.contains(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Aw({type:i,selectors:[["mat-form-field"]],contentQueries:function(t,n,r){if(t&1&&(Pg(r,n._labelChild,ae,5),kg(r,de,5)(r,et,5)(r,tt,5)(r,kt,5)(r,le,5)),t&2){CC();let a;IC(a=wC())&&(n._formFieldControl=a.first),IC(a=wC())&&(n._prefixChildren=a),IC(a=wC())&&(n._suffixChildren=a),IC(a=wC())&&(n._errorChildren=a),IC(a=wC())&&(n._hintChildren=a);}},viewQuery:function(t,n){if(t&1&&(Lg(n._iconPrefixContainerSignal,Ue,5)(n._textPrefixContainerSignal,We,5)(n._iconSuffixContainerSignal,Ge,5)(n._textSuffixContainerSignal,$e,5),Fg(pt,5)(Ue,5)(We,5)(Ge,5)($e,5)(Ze,5)(Ye,5)(Xe,5)),t&2){CC(4);let r;IC(r=wC())&&(n._textField=r.first),IC(r=wC())&&(n._iconPrefixContainer=r.first),IC(r=wC())&&(n._textPrefixContainer=r.first),IC(r=wC())&&(n._iconSuffixContainer=r.first),IC(r=wC())&&(n._textSuffixContainer=r.first),IC(r=wC())&&(n._floatingLabel=r.first),IC(r=wC())&&(n._notchedOutline=r.first),IC(r=wC())&&(n._lineRipple=r.first);}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(t,n){t&2&&Hg("mat-mdc-form-field-label-always-float",n._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",n._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",n._hasIconSuffix)("mat-form-field-invalid",n._control.errorState)("mat-form-field-disabled",n._control.disabled)("mat-form-field-autofilled",n._control.autofilled)("mat-form-field-appearance-fill",n.appearance=="fill")("mat-form-field-appearance-outline",n.appearance=="outline")("mat-form-field-hide-placeholder",n._hasFloatingLabel()&&!n._shouldLabelFloat())("mat-primary",n.color!=="accent"&&n.color!=="warn")("mat-accent",n.color==="accent")("mat-warn",n.color==="warn")("ng-untouched",n._shouldForward("untouched"))("ng-touched",n._shouldForward("touched"))("ng-pristine",n._shouldForward("pristine"))("ng-dirty",n._shouldForward("dirty"))("ng-valid",n._shouldForward("valid"))("ng-invalid",n._shouldForward("invalid"))("ng-pending",n._shouldForward("pending"));},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[nT([{provide:se,useExisting:i},{provide:it,useExisting:i}])],ngContentSelectors:bt,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],["aria-atomic","true","aria-live","polite",1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(t,n){if(t&1&&(vC(_t),Dg(0,xt,1,1,"ng-template",null,0,fT),vs(2,"div",6,1),Ag("click",function(a){return n._control.onContainerClick(a)}),eC(4,yt,1,0,"div",7),vs(5,"div",8),eC(6,wt,2,2,"div",9),eC(7,Mt,3,0,"div",10),eC(8,Et,3,0,"div",11),vs(9,"div",12),eC(10,Tt,1,1,null,13),DC(11),fl(),eC(12,Rt,3,0,"div",14),eC(13,Dt,3,0,"div",15),fl(),eC(14,Nt,1,0,"div",16),fl(),vs(15,"div",17),eC(16,At,2,0,"div",18)(17,Lt,5,1,"div",19),fl()),t&2){let r;XE(2),Hg("mdc-text-field--filled",!n._hasOutline())("mdc-text-field--outlined",n._hasOutline())("mdc-text-field--no-label",!n._hasFloatingLabel())("mdc-text-field--disabled",n._control.disabled)("mdc-text-field--invalid",n._control.errorState),XE(2),tC(!n._hasOutline()&&!n._control.disabled?4:-1),XE(2),tC(n._hasOutline()?6:-1),XE(),tC(n._hasIconPrefix?7:-1),XE(),tC(n._hasTextPrefix?8:-1),XE(2),tC(!n._hasOutline()||n._forceDisplayInfixLabel()?10:-1),XE(2),tC(n._hasTextSuffix?12:-1),XE(),tC(n._hasIconSuffix?13:-1),XE(),tC(n._hasOutline()?-1:14),XE(),Hg("mat-mdc-form-field-subscript-dynamic-size",n.subscriptSizing==="dynamic");let a=n._getSubscriptMessageType();XE(),tC((r=a)==="error"?16:r==="hint"?17:-1);}},dependencies:[Ze,Ye,Sb,Xe,le],styles:[`.mdc-text-field {
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: baseline;
|
|
4
4
|
padding: 0 16px;
|
|
@@ -947,7 +947,7 @@ select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) optio
|
|
|
947
947
|
.mdc-notched-outline--upgraded .mdc-floating-label--float-above {
|
|
948
948
|
max-width: calc(133.3333333333% + 1px);
|
|
949
949
|
}
|
|
950
|
-
`],encapsulation:2})}return i})();var ce=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=Do({type:i});static \u0275inj=
|
|
950
|
+
`],encapsulation:2})}return i})();var ce=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=Do({type:i});static \u0275inj=qn({imports:[Se,nt,wt$1]})}return i})();var jt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Aw({type:i,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(t,n){},styles:[`textarea.cdk-textarea-autosize {
|
|
951
951
|
resize: none;
|
|
952
952
|
}
|
|
953
953
|
|
|
@@ -973,4 +973,4 @@ textarea.cdk-textarea-autosize-measuring-firefox {
|
|
|
973
973
|
.cdk-text-field-autofill-monitored:not(:-webkit-autofill) {
|
|
974
974
|
animation: cdk-text-field-autofill-end 0s 1ms;
|
|
975
975
|
}
|
|
976
|
-
`],encapsulation:2})}return i})(),qt={passive:true},rt=(()=>{class i{_platform=g(p);_ngZone=g(G);_renderer=g(Sn$1).createRenderer(null,null);_styleLoader=g(D);_monitoredElements=new Map;monitor(e){if(!this._platform.isBrowser)return on;this._styleLoader.load(jt);let t=R(e),n=this._monitoredElements.get(t);if(n)return n.subject;let r=new ce$1,a="cdk-text-field-autofilled",s=M=>{M.animationName==="cdk-text-field-autofill-start"&&!t.classList.contains(a)?(t.classList.add(a),this._ngZone.run(()=>r.next({target:M.target,isAutofilled:true}))):M.animationName==="cdk-text-field-autofill-end"&&t.classList.contains(a)&&(t.classList.remove(a),this._ngZone.run(()=>r.next({target:M.target,isAutofilled:false})));},C=this._ngZone.runOutsideAngular(()=>(t.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(t,"animationstart",s,qt)));return this._monitoredElements.set(t,{subject:r,unlisten:C}),r}stopMonitoring(e){let t=R(e),n=this._monitoredElements.get(t);n&&(n.unlisten(),n.subject.complete(),t.classList.remove("cdk-text-field-autofill-monitored"),t.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(t));}ngOnDestroy(){this._monitoredElements.forEach((e,t)=>this.stopMonitoring(t));}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Ce({token:i,factory:i.\u0275fac})}return i})();var ot=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=Do({type:i});static \u0275inj=
|
|
976
|
+
`],encapsulation:2})}return i})(),qt={passive:true},rt=(()=>{class i{_platform=g(p);_ngZone=g(G);_renderer=g(Sn$1).createRenderer(null,null);_styleLoader=g(D);_monitoredElements=new Map;monitor(e){if(!this._platform.isBrowser)return on;this._styleLoader.load(jt);let t=R(e),n=this._monitoredElements.get(t);if(n)return n.subject;let r=new ce$1,a="cdk-text-field-autofilled",s=M=>{M.animationName==="cdk-text-field-autofill-start"&&!t.classList.contains(a)?(t.classList.add(a),this._ngZone.run(()=>r.next({target:M.target,isAutofilled:true}))):M.animationName==="cdk-text-field-autofill-end"&&t.classList.contains(a)&&(t.classList.remove(a),this._ngZone.run(()=>r.next({target:M.target,isAutofilled:false})));},C=this._ngZone.runOutsideAngular(()=>(t.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(t,"animationstart",s,qt)));return this._monitoredElements.set(t,{subject:r,unlisten:C}),r}stopMonitoring(e){let t=R(e),n=this._monitoredElements.get(t);n&&(n.unlisten(),n.subject.complete(),t.classList.remove("cdk-text-field-autofill-monitored"),t.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(t));}ngOnDestroy(){this._monitoredElements.forEach((e,t)=>this.stopMonitoring(t));}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Ce({token:i,factory:i.\u0275fac})}return i})();var ot=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=Do({type:i});static \u0275inj=qn({})}return i})();var at=new w("");var lt=new w("MAT_INPUT_VALUE_ACCESSOR");var Ut=["button","checkbox","file","hidden","image","radio","range","reset","submit"],Wt=new w("MAT_INPUT_CONFIG"),Sn=(()=>{class i{_elementRef=g(Qt);_platform=g(p);ngControl=g(_,{optional:true,self:true});_autofillMonitor=g(rt);_ngZone=g(G);_formField=g(se,{optional:true});_renderer=g(As);_uid=g(Ut$1).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder=null;_errorStateTracker;_config=g(Wt,{optional:true});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer=false;_isNativeSelect=false;_isTextarea=false;_isInFormField=false;focused=false;stateChanges=new ce$1;controlType="mat-input";autofilled=false;get disabled(){return this._disabled}set disabled(e){this._disabled=vi(e),this.focused&&(this.focused=false,this.stateChanges.next());}_disabled=false;get id(){return this._id}set id(e){this._id=e||this._uid;}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(_e.required)??false}set required(e){this._required=vi(e);}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&si().has(this._type)&&(this._elementRef.nativeElement.type=this._type);}_type="text";get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e;}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(e){e!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(e):this._inputValueAccessor.value=e,this.stateChanges.next());}get readonly(){return this._readonly}set readonly(e){this._readonly=vi(e);}_readonly=false;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e;}_neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(e=>si().has(e));constructor(){let e=g(an,{optional:true}),t=g(En,{optional:true}),n=g(We$1),r=g(lt,{optional:true,self:true}),a=g(at,{optional:true,self:true}),s=this._elementRef.nativeElement,C=s.nodeName.toLowerCase();r?Xr(r.value)?this._signalBasedValueAccessor=r:this._inputValueAccessor=r:this._inputValueAccessor=s,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(s,"keyup",this._iOSKeyupListener);}),this._errorStateTracker=new Qt$1(n,a||this.ngControl,t,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=C==="select",this._isTextarea=C==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||false,this._isNativeSelect&&(this.controlType=s.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&Hf(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next();});}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next();});}ngOnChanges(){this.stateChanges.next();}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.();}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder();}focus(e){this._elementRef.nativeElement.focus(e);}updateErrorState(){this._errorStateTracker.updateErrorState();}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let t=this._elementRef.nativeElement;t.type==="number"?(t.type="text",t.setSelectionRange(0,0),t.type="number"):t.setSelectionRange(0,0);}this.focused=e,this.stateChanges.next();}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next());}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let t=this._elementRef.nativeElement;this._previousPlaceholder=e,e?t.setAttribute("placeholder",e):t.removeAttribute("placeholder");}}_getPlaceholder(){return this.placeholder||null}_validateType(){Ut.indexOf(this._type)>-1;}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return !this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,t=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&t&&t.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby");}onContainerClick(){this.focused||this.focus();}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let t=e.target;!t.value&&t.selectionStart===0&&t.selectionEnd===0&&(t.setSelectionRange(1,1),t.setSelectionRange(0,0));};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(t,n){t&1&&Ag("focus",function(){return n._focusChanged(true)})("blur",function(){return n._focusChanged(false)})("input",function(){return n._onInput()}),t&2&&(Ng("id",n.id)("disabled",n.disabled&&!n.disabledInteractive)("required",n.required),Cg("name",n.name||null)("readonly",n._getReadonlyAttribute())("aria-disabled",n.disabled&&n.disabledInteractive?"true":null)("aria-invalid",n.empty&&n.required?null:n.errorState)("aria-required",n.required)("id",n.id),Hg("mat-input-server",n._isServer)("mat-mdc-form-field-textarea-control",n._isInFormField&&n._isTextarea)("mat-mdc-form-field-input-control",n._isInFormField)("mat-mdc-input-disabled-interactive",n.disabledInteractive)("mdc-text-field__input",n._isInFormField)("mat-mdc-native-select-inline",n._isInlineSelect()));},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",YT]},exportAs:["matInput"],features:[nT([{provide:de,useExisting:i}]),Cu]})}return i})(),Tn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=Do({type:i});static \u0275inj=qn({imports:[ce,ce,ot,wt$1]})}return i})();export{Ot as O,Sn as S,Tn as T,ae as a,at as b,ce as c,de as d,le as l,nt as n,se as s,zt as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {g,G,P,A as Aw,i as hr,p as pr,v as vs,l as Ag,W as WC,k as
|
|
1
|
+
import {g,G,P,A as Aw,i as hr,p as pr,v as vs,l as Ag,W as WC,k as fl,n as eC,X as XE,r as Tg,t as tC,a5 as yl,al as yt$1,am as Gm,a9 as dC,ai as Jg,aa as If,aj as KC,ab as wf,a3 as HI,ak as Xg,a6 as $I,D as Fg,I as IC,E as wC,ac as mC,a8 as Zg}from'./main-VYETRYCE.js';import {y as yt,w as wt,t as ti,Y as Ye,Z as Zn,c as cn}from'./chunk-BbLMzp9k.js';var J=["inputElement"];function K(o,r){if(o&1&&(vs(0,"span",3),WC(1),fl()),o&2){let t=mC();XE(),Zg(t.label);}}function U(o,r){if(o&1&&(vs(0,"small",5),WC(1),fl()),o&2){let t=mC();XE(),Zg(t.hint);}}var h=class o{label="";placeholder="";hint="";isDisabled=false;value="";autoFocus=true;valueChange=new yt$1;enterPressed=new yt$1;inputElement;inputValue="";ngAfterViewInit(){this.inputValue=this.value,this.autoFocus&&setTimeout(()=>this.inputElement?.nativeElement.focus(),100);}onValueChange(r){this.valueChange.emit(r);}onEnter(){this.inputValue.trim()&&this.enterPressed.emit(this.inputValue.trim());}focus(){this.inputElement?.nativeElement.focus();}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=Aw({type:o,selectors:[["app-text-input"]],viewQuery:function(t,e){if(t&1&&Fg(J,5),t&2){let p;IC(p=wC())&&(e.inputElement=p.first);}},inputs:{label:"label",placeholder:"placeholder",hint:"hint",isDisabled:"isDisabled",value:"value",autoFocus:"autoFocus"},outputs:{valueChange:"valueChange",enterPressed:"enterPressed"},decls:6,vars:5,consts:[["inputElement",""],[1,"text-input-container"],[1,"text-input-wrapper"],[1,"text-input-label"],["type","text",1,"text-input-field",3,"ngModelChange","keydown.enter","ngModel","placeholder","disabled"],[1,"text-input-hint"]],template:function(t,e){if(t&1){let p=dC();vs(0,"div",1)(1,"label",2),eC(2,K,2,1,"span",3),vs(3,"input",4,0),Jg("ngModelChange",function(m){return If(p),KC(e.inputValue,m)||(e.inputValue=m),wf(m)}),Ag("ngModelChange",function(m){return e.onValueChange(m)})("keydown.enter",function(){return e.onEnter()}),fl(),HI(),fl(),eC(5,U,2,1,"small",5),fl();}t&2&&(XE(2),tC(e.label?2:-1),XE(),Xg("ngModel",e.inputValue),Tg("placeholder",e.placeholder)("disabled",e.isDisabled),$I(),XE(2),tC(e.hint?5:-1));},dependencies:[ti,Ye,Zn,cn,Gm],styles:[".text-input-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%}.text-input-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;cursor:text}.text-input-label[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);margin:0}.text-input-field[_ngcontent-%COMP%]{width:100%;padding:.75rem 1rem;font-size:1rem;color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-border);border-radius:8px;outline:none;transition:all .2s ease}.text-input-field[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary);opacity:.7}.text-input-field[_ngcontent-%COMP%]:focus{border-color:var(--color-primary);box-shadow:0 0 0 3px rgba(var(--color-primary-rgb),.1)}.text-input-field[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed;background:var(--color-surface)}.text-input-hint[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);margin:0;font-style:italic}@media(max-width:768px){.text-input-field[_ngcontent-%COMP%]{padding:.65rem .85rem;font-size:.95rem}.text-input-label[_ngcontent-%COMP%]{font-size:.9rem}.text-input-hint[_ngcontent-%COMP%]{font-size:.8rem}}"],changeDetection:1})};function X(o,r){if(o&1&&(vs(0,"div",8),WC(1),fl()),o&2){let t=mC();XE(),Zg(t.errorMessage);}}var L=class o{router=g(G);projectStateService=g(P);projectName="";projectPath="";isCreating=false;errorMessage=null;isValid(){return this.projectName.trim()!==""&&this.projectPath.trim()!==""}onCreate(){if(!this.isValid()){this.errorMessage="Both name and path are required";return}this.isCreating=true,this.errorMessage=null,this.projectStateService.createProject(this.projectName.trim(),this.projectPath.trim()).subscribe({next:()=>{let r=this.projectName.trim();this.isCreating=false,this.projectStateService.selectProject(r),this.router.navigate(["project",r]);},error:r=>{this.errorMessage=r.error?.error??"Failed to create project",this.isCreating=false;}});}onCancel(){this.router.navigate(["/"]);}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=Aw({type:o,selectors:[["app-project-new"]],decls:19,vars:9,consts:[[1,"project-new-page"],[1,"project-new-card"],["mat-button","",1,"project-new__back",3,"click"],[1,"project-new__title"],[1,"project-new__subtitle"],[1,"project-new__form"],["label","Project name","placeholder","my-project",3,"valueChange","value","isDisabled","autoFocus"],["label","Project path","placeholder","/path/to/project","hint","Absolute path to the project directory",3,"valueChange","enterPressed","value","isDisabled"],[1,"project-new__error"],[1,"project-new__actions"],["mat-button","",3,"click","disabled"],["mat-flat-button","","color","primary",3,"click","disabled"]],template:function(t,e){t&1&&(vs(0,"div",0)(1,"div",1)(2,"button",2),Ag("click",function(){return e.onCancel()}),vs(3,"mat-icon"),WC(4,"arrow_back"),fl(),WC(5," Back to projects "),fl(),vs(6,"h1",3),WC(7,"New project"),fl(),vs(8,"p",4),WC(9,"Point Coday to an existing directory on your machine."),fl(),vs(10,"div",5)(11,"app-text-input",6),Ag("valueChange",function(d){return e.projectName=d}),fl(),vs(12,"app-text-input",7),Ag("valueChange",function(d){return e.projectPath=d})("enterPressed",function(){return e.onCreate()}),fl(),eC(13,X,2,1,"div",8),fl(),vs(14,"div",9)(15,"button",10),Ag("click",function(){return e.onCancel()}),WC(16,"Cancel"),fl(),vs(17,"button",11),Ag("click",function(){return e.onCreate()}),WC(18),fl()()()()),t&2&&(XE(11),Tg("value",e.projectName)("isDisabled",e.isCreating)("autoFocus",true),XE(),Tg("value",e.projectPath)("isDisabled",e.isCreating),XE(),tC(e.errorMessage?13:-1),XE(2),Tg("disabled",e.isCreating),XE(2),Tg("disabled",!e.isValid()||e.isCreating),XE(),yl(" ",e.isCreating?"Creating\u2026":"Create project"," "));},dependencies:[hr,pr,yt,wt,h],styles:[".project-new-page[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:center;min-height:100vh;width:100%;background:var(--color-bg);padding:2rem 1.5rem;box-sizing:border-box}.project-new-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;width:100%;max-width:560px;padding:2rem;background:var(--color-bg-secondary, rgba(255, 255, 255, .7));border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:16px;box-shadow:var(--glass-shadow, 0 8px 32px rgba(31, 38, 135, .15));margin-top:2rem}.project-new__back[_ngcontent-%COMP%]{align-self:flex-start;margin-left:-.5rem;color:var(--color-text-secondary, #6e6e73)}.project-new__title[_ngcontent-%COMP%]{margin:0;font-size:1.625rem;font-weight:700;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.project-new__subtitle[_ngcontent-%COMP%]{margin:-.75rem 0 0;font-size:.9375rem;color:var(--color-text-secondary, #6e6e73)}.project-new__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.project-new__error[_ngcontent-%COMP%]{padding:.75rem 1rem;background:#dc262614;border:1px solid rgba(220,38,38,.25);border-radius:8px;color:var(--color-error, #ff3b30);font-size:.875rem}.project-new__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;justify-content:flex-end;padding-top:.25rem}"],changeDetection:1})};export{L as ProjectNewComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {f}from'./chunk-Cuj0_PIE.js';import {g,bl as Sm,R as Re,H as Hi,m as mT,A as Aw,i as hr,j as Gn,v as vs,l as Ag,W as WC,k as dl,n as eC,af as Dg,ag as fT,T as TC,X as XE,r as Tg,t as tC,J as dy,P,aE as A,Y as x,Z as z,_ as Ue,$ as zt,a0 as jt,a1 as Vt,a2 as Nt,p as pr,bm as Xt,ai as Jg,aj as KC,a3 as HI,q as oC,bn as nC,a8 as Zg,ak as Xg,a6 as $I,x as iC,a5 as ml,ac as mC,a9 as dC,aa as If,ab as wf,bo as hl,bp as gl,ah as rT,b3 as oT,y as Hg,a$ as Yg,a4 as rC,C as Cg,o as bg}from'./main-RF3N53YL.js';import {P as Pt}from'./chunk-C7dWjJdY.js';import {T as Tn,S as Sn,n as nt$2,a as ae,l as le,c as ce}from'./chunk-DBVltHOO.js';import {W as Wn,i as it$1,n as nt$1,I as In,D as De,B as Be,_ as _a,E as En}from'./chunk-BBLhUbcZ.js';import'./chunk-BMgmcV4B.js';import {y as yt,w as wt,t as ti,Q as Qn,e as ei,Y as Ye$1,f as fn,m as mn,Z as Zn,g as gt,$ as $t,W as Wt,c as cn}from'./chunk-CmdzwND4.js';var w=class s{http=g(dy);projectState=g(P);getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/agents`}listEditableAgents(){return this.http.get(`${this.getBaseUrl()}/editable`)}getAgent(t){return this.http.get(`${this.getBaseUrl()}/${encodeURIComponent(t)}`)}createAgent(t,e){return this.http.post(this.getBaseUrl(),{location:e,definition:t})}updateAgent(t,e){return this.http.put(`${this.getBaseUrl()}/${encodeURIComponent(t)}`,{definition:e})}listDocuments(t){return this.http.get(`${this.getBaseUrl()}/documents`,{params:{location:t}})}uploadDocument(t,e){return new A(n=>{let a=new FileReader;a.onload=()=>{let r=a.result.split(",")[1];this.http.post(`${this.getBaseUrl()}/documents`,{filename:e.name,content:r,mimeType:e.type},{params:{location:t}}).subscribe(n);},a.onerror=()=>n.error(a.error),a.readAsDataURL(e);})}deleteAgent(t){return this.http.delete(`${this.getBaseUrl()}/${encodeURIComponent(t)}`)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=x({token:s,factory:s.\u0275fac,providedIn:"root"})};function ze(s,t){s&1&&(vs(0,"p",15),WC(1,"No integrations defined \u2014 agent will have access to all tools."),dl());}function qe(s,t){if(s&1){let e=dC();vs(0,"div",16)(1,"mat-form-field",22)(2,"mat-label"),WC(3,"Integration"),dl(),vs(4,"input",23),Jg("ngModelChange",function(a){let r=If(e).$implicit;return KC(r.integration,a)||(r.integration=a),wf(a)}),dl(),HI(),dl(),vs(5,"mat-form-field",24)(6,"mat-label"),WC(7,"Tools (comma-separated)"),dl(),vs(8,"input",25),Jg("ngModelChange",function(a){let r=If(e).$implicit;return KC(r.tools,a)||(r.tools=a),wf(a)}),dl(),HI(),dl(),vs(9,"button",26),Ag("click",function(){let a=If(e).$index,r=mC();return wf(r.removeIntegrationRow(a))}),vs(10,"mat-icon"),WC(11,"delete"),dl()()();}if(s&2){let e=t.$implicit;XE(4),Xg("ngModel",e.integration),$I(),XE(4),Xg("ngModel",e.tools),$I();}}function He(s,t){if(s&1&&(vs(0,"p",30),WC(1),dl()),s&2){let e=mC(2);XE(),Zg(e.docUploadError);}}function Ge(s,t){s&1&&(vs(0,"p",15),WC(1,"No mandatory documents defined."),dl());}function Ze(s,t){if(s&1&&bg(0,"option",35),s&2){let e=t.$implicit;Tg("value","documents/"+e);}}function Ke(s,t){if(s&1){let e=dC();vs(0,"div",31)(1,"mat-form-field",32)(2,"mat-label"),WC(3,"Document path"),dl(),vs(4,"input",33),Jg("ngModelChange",function(a){let r=If(e).$index,j=mC(2);return KC(j.mandatoryDocs[r],a)||(j.mandatoryDocs[r]=a),wf(a)}),dl(),HI(),vs(5,"datalist",34),oC(6,Ze,1,1,"option",35,rC),dl()(),vs(8,"button",26),Ag("click",function(){let a=If(e).$index,r=mC(2);return wf(r.removeDocRow(a))}),vs(9,"mat-icon"),WC(10,"delete"),dl()()();}if(s&2){let e=t.$index,n=mC(2);XE(4),Xg("ngModel",n.mandatoryDocs[e]),Cg("list","docs-list-"+e),$I(),XE(),Tg("id","docs-list-"+e),XE(),iC(n.availableDocuments);}}function Je(s,t){if(s&1){let e=dC();vs(0,"div",6)(1,"span"),WC(2,"Mandatory Documents"),dl(),vs(3,"button",27),Ag("click",function(){If(e);let a=mC();return wf(a.addDocRow())}),vs(4,"mat-icon"),WC(5,"add"),dl()(),vs(6,"label",28)(7,"mat-icon"),WC(8,"upload_file"),dl(),vs(9,"input",29),Ag("change",function(a){If(e);let r=mC();return wf(r.onDocFileSelected(a))}),dl()()(),eC(10,He,2,1,"p",30),eC(11,Ge,2,0,"p",15),oC(12,Ke,11,3,"div",31,nC);}if(s&2){let e=mC();XE(6),Hg("uploading",e.isUploadingDoc),XE(3),Tg("disabled",e.isUploadingDoc),XE(),tC(e.docUploadError?10:-1),XE(),tC(e.mandatoryDocs.length===0?11:-1),XE(),iC(e.mandatoryDocs);}}function Qe(s,t){s&1&&(vs(0,"p",15),WC(1,"\u{1F4A1} Documents can be added after the agent is created."),dl());}function Xe(s,t){if(s&1){let e=dC();vs(0,"div",6),WC(1,"Save to"),dl(),vs(2,"div",36)(3,"label",37)(4,"input",38),Jg("ngModelChange",function(a){If(e);let r=mC();return KC(r.location,a)||(r.location=a),wf(a)}),dl(),HI(),vs(5,"div",39)(6,"div",40)(7,"span",41),WC(8,"\u{1F464}"),dl(),vs(9,"span",42),WC(10,"Project config"),dl()(),vs(11,"p",43),WC(12),dl()()(),vs(13,"label",37)(14,"input",44),Jg("ngModelChange",function(a){If(e);let r=mC();return KC(r.location,a)||(r.location=a),wf(a)}),dl(),HI(),vs(15,"div",39)(16,"div",40)(17,"span",41),WC(18,"\u{1F4E6}"),dl(),vs(19,"span",42),WC(20,"Colocated"),dl()(),vs(21,"p",43),WC(22,"Next to coday.yaml in ./agents/ (committable)"),dl()()()(),vs(23,"p",15),WC(24,"Storage location is permanent and cannot be changed after creation."),dl();}if(s&2){let e=mC();XE(3),Hg("selected",e.location==="project"),XE(),Xg("ngModel",e.location),$I(),XE(8),Yg("~/.coday/projects/","{","name","}","/agents/ (not committed)"),XE(),Hg("selected",e.location==="colocated"),XE(),Xg("ngModel",e.location),$I();}}function Ye(s,t){if(s&1&&(vs(0,"div",17)(1,"span",6),WC(2,"Storage Location"),dl(),vs(3,"span",45),WC(4),dl(),vs(5,"p",15),WC(6,"Cannot be changed after creation."),dl()()),s&2){let e=mC();XE(3),Hg("badge-project",e.location==="project")("badge-colocated",e.location==="colocated"),XE(),ml(" ",e.location==="project"?"\u{1F464} Project config":"\u{1F4E6} Colocated"," ");}}function $e(s,t){if(s&1&&(vs(0,"div",18)(1,"mat-icon"),WC(2,"error"),dl(),vs(3,"span"),WC(4),dl()()),s&2){let e=mC();XE(4),Zg(e.errorMessage);}}var E=class s{agentCrudApi=g(w);agentApi=g(f);dialogRef=g(z);data=g(Ue);name="";description="";instructions="";aiProvider="";modelName="";temperature=null;maxOutputTokens=null;openaiAssistantId="";integrationRows=[];mandatoryDocs=[];availableDocuments=[];isUploadingDoc=false;docUploadError="";location="project";isSaving=false;errorMessage="";isEditMode=false;ngOnInit(){if(this.isEditMode=this.data.mode==="edit",this.isEditMode&&this.data.agent){let t=this.data.agent.definition;this.name=t.name,this.description=t.description,this.instructions=t.instructions??"",this.aiProvider=t.aiProvider??"",this.modelName=t.modelName??"",this.temperature=t.temperature??null,this.maxOutputTokens=t.maxOutputTokens??null,this.openaiAssistantId=t.openaiAssistantId??"",this.location=this.data.agent.source,t.integrations&&(this.integrationRows=Object.entries(t.integrations).map(([e,n])=>({integration:e,tools:n?.join(", ")??""}))),this.mandatoryDocs=[...t.mandatoryDocs??[]],this.loadAvailableDocuments();}}loadAvailableDocuments(){this.agentCrudApi.listDocuments(this.location).subscribe({next:t=>this.availableDocuments=t,error:()=>this.availableDocuments=[]});}addDocRow(){this.mandatoryDocs.push("");}removeDocRow(t){this.mandatoryDocs.splice(t,1);}onDocFileSelected(t){let e=t.target,n=e.files?.[0];n&&(this.isUploadingDoc=true,this.docUploadError="",this.agentCrudApi.uploadDocument(this.location,n).subscribe({next:a=>{this.isUploadingDoc=false,this.mandatoryDocs.push(a.relativePath),this.loadAvailableDocuments(),e.value="";},error:a=>{this.isUploadingDoc=false,this.docUploadError=a?.error?.error??a?.message??"Upload failed",e.value="";}}));}addIntegrationRow(){this.integrationRows.push({integration:"",tools:""});}removeIntegrationRow(t){this.integrationRows.splice(t,1);}trackByIndex(t){return t}validateForm(){if(!this.name.trim())return this.errorMessage="Name is required",false;if(!/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/.test(this.name.trim()))return this.errorMessage="Name must start with alphanumeric and contain only letters, digits, hyphens or underscores",false;if(!this.description.trim())return this.errorMessage="Description is required",false;for(let t of this.integrationRows)if(!t.integration.trim())return this.errorMessage="Integration name cannot be empty",false;return true}buildDefinition(){let t=this.mandatoryDocs.map(n=>n.trim()).filter(Boolean),e=this.integrationRows.length>0?Object.fromEntries(this.integrationRows.filter(n=>n.integration.trim()).map(n=>[n.integration.trim(),n.tools.split(",").map(a=>a.trim()).filter(Boolean)])):void 0;return {name:this.name.trim(),description:this.description.trim(),instructions:this.instructions.trim()||void 0,aiProvider:this.aiProvider.trim()||void 0,modelName:this.modelName.trim()||void 0,temperature:this.temperature??void 0,maxOutputTokens:this.maxOutputTokens??void 0,openaiAssistantId:this.openaiAssistantId.trim()||void 0,integrations:e,mandatoryDocs:t.length>0?t:void 0}}save(){if(this.errorMessage="",!this.validateForm())return;let t=this.buildDefinition();this.isSaving=true,(this.isEditMode?this.agentCrudApi.updateAgent(this.name.trim(),t):this.agentCrudApi.createAgent(t,this.location)).subscribe({next:()=>{this.isSaving=false,this.agentApi.clearAllCache(),this.dialogRef.close(true);},error:n=>{this.isSaving=false,this.errorMessage=n?.error?.error||n?.message||"Failed to save agent";}});}cancel(){this.dialogRef.close(false);}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=Aw({type:s,selectors:[["app-agent-form"]],decls:69,vars:18,consts:[["mat-dialog-title",""],[1,"form-container"],["appearance","outline",1,"full-width"],["matInput","","placeholder","my-agent","required","",3,"ngModelChange","ngModel","readonly"],["matInput","","placeholder","What does this agent do?","rows","2","required","",3,"ngModelChange","ngModel"],["matInput","","placeholder","System instructions for the agent...","rows","6",3,"ngModelChange","ngModel"],[1,"section-title"],[1,"row-2col"],["appearance","outline"],["matInput","","placeholder","e.g. anthropic, openai",3,"ngModelChange","ngModel"],["matInput","","placeholder","e.g. claude-sonnet-4-5",3,"ngModelChange","ngModel"],["matInput","","type","number","min","0","max","2","step","0.1","placeholder","0.0 \u2013 2.0",3,"ngModelChange","ngModel"],["matInput","","type","number","min","1","placeholder","e.g. 4096",3,"ngModelChange","ngModel"],["matInput","","placeholder","asst_...",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Add integration",3,"click"],[1,"hint"],[1,"integration-row"],[1,"source-display"],[1,"error-message"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["appearance","outline",1,"integration-name"],["matInput","","placeholder","e.g. GITHUB",3,"ngModelChange","ngModel"],["appearance","outline",1,"integration-tools"],["matInput","","placeholder","Leave empty for all tools",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Remove",3,"click"],["mat-icon-button","","type","button","title","Add document path",3,"click"],["title","Upload a document to the pool",1,"upload-btn"],["type","file","hidden","",3,"change","disabled"],[1,"doc-upload-error"],[1,"doc-row"],["appearance","outline",1,"doc-field"],["matInput","","placeholder","documents/guide.md",3,"ngModelChange","ngModel"],[3,"id"],[3,"value"],[1,"source-options"],[1,"source-option"],["type","radio","name","location","value","project",3,"ngModelChange","ngModel"],[1,"source-content"],[1,"source-header"],[1,"source-icon"],[1,"source-label"],[1,"source-description"],["type","radio","name","location","value","colocated",3,"ngModelChange","ngModel"],[1,"source-badge"]],template:function(e,n){e&1&&(vs(0,"h2",0),WC(1),dl(),vs(2,"mat-dialog-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),WC(6,"Name"),dl(),vs(7,"input",3),Jg("ngModelChange",function(r){return KC(n.name,r)||(n.name=r),r}),dl(),HI(),vs(8,"mat-hint"),WC(9,"Alphanumeric, hyphens and underscores only. Cannot be changed after creation."),dl()(),vs(10,"mat-form-field",2)(11,"mat-label"),WC(12,"Description"),dl(),vs(13,"textarea",4),Jg("ngModelChange",function(r){return KC(n.description,r)||(n.description=r),r}),dl(),HI(),dl(),vs(14,"mat-form-field",2)(15,"mat-label"),WC(16,"Instructions"),dl(),vs(17,"textarea",5),Jg("ngModelChange",function(r){return KC(n.instructions,r)||(n.instructions=r),r}),dl(),HI(),vs(18,"mat-hint"),WC(19,"System prompt / instructions sent to the AI model"),dl()(),vs(20,"div",6),WC(21,"AI Configuration"),dl(),vs(22,"div",7)(23,"mat-form-field",8)(24,"mat-label"),WC(25,"AI Provider"),dl(),vs(26,"input",9),Jg("ngModelChange",function(r){return KC(n.aiProvider,r)||(n.aiProvider=r),r}),dl(),HI(),dl(),vs(27,"mat-form-field",8)(28,"mat-label"),WC(29,"Model Name"),dl(),vs(30,"input",10),Jg("ngModelChange",function(r){return KC(n.modelName,r)||(n.modelName=r),r}),dl(),HI(),dl()(),vs(31,"div",7)(32,"mat-form-field",8)(33,"mat-label"),WC(34,"Temperature"),dl(),vs(35,"input",11),Jg("ngModelChange",function(r){return KC(n.temperature,r)||(n.temperature=r),r}),dl(),HI(),vs(36,"mat-hint"),WC(37,"Leave empty for model default"),dl()(),vs(38,"mat-form-field",8)(39,"mat-label"),WC(40,"Max Output Tokens"),dl(),vs(41,"input",12),Jg("ngModelChange",function(r){return KC(n.maxOutputTokens,r)||(n.maxOutputTokens=r),r}),dl(),HI(),vs(42,"mat-hint"),WC(43,"Leave empty for model default"),dl()()(),vs(44,"mat-form-field",2)(45,"mat-label"),WC(46,"OpenAI Assistant ID"),dl(),vs(47,"input",13),Jg("ngModelChange",function(r){return KC(n.openaiAssistantId,r)||(n.openaiAssistantId=r),r}),dl(),HI(),vs(48,"mat-hint"),WC(49,"If set, forces aiProvider to openai"),dl()(),vs(50,"div",6)(51,"span"),WC(52,"Integrations"),dl(),vs(53,"button",14),Ag("click",function(){return n.addIntegrationRow()}),vs(54,"mat-icon"),WC(55,"add"),dl()()(),eC(56,ze,2,0,"p",15),oC(57,qe,12,2,"div",16,nC),eC(59,Je,14,5)(60,Qe,2,0,"p",15),eC(61,Xe,25,8),eC(62,Ye,7,5,"div",17),eC(63,$e,5,1,"div",18),dl()(),vs(64,"mat-dialog-actions",19)(65,"button",20),Ag("click",function(){return n.cancel()}),WC(66,"Cancel"),dl(),vs(67,"button",21),Ag("click",function(){return n.save()}),WC(68),dl()()),e&2&&(XE(),Zg(n.isEditMode?"Edit Agent":"Create Agent"),XE(6),Xg("ngModel",n.name),Tg("readonly",n.isEditMode),$I(),XE(6),Xg("ngModel",n.description),$I(),XE(4),Xg("ngModel",n.instructions),$I(),XE(9),Xg("ngModel",n.aiProvider),$I(),XE(4),Xg("ngModel",n.modelName),$I(),XE(5),Xg("ngModel",n.temperature),$I(),XE(6),Xg("ngModel",n.maxOutputTokens),$I(),XE(6),Xg("ngModel",n.openaiAssistantId),$I(),XE(9),tC(n.integrationRows.length===0?56:-1),XE(),iC(n.integrationRows),XE(2),tC(n.isEditMode?59:60),XE(2),tC(n.isEditMode?-1:61),XE(),tC(n.isEditMode?62:-1),XE(),tC(n.errorMessage?63:-1),XE(2),Tg("disabled",n.isSaving),XE(2),Tg("disabled",n.isSaving),XE(),ml(" ",n.isSaving?"Saving...":"Save"," "));},dependencies:[ti,Qn,ei,Ye$1,fn,mn,Zn,gt,$t,Wt,cn,zt,jt,Vt,Nt,hr,pr,Gn,Tn,Sn,nt$2,ae,le,ce,yt,wt,Pt,Xt],styles:[".form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0;min-width:560px}@media(max-width:768px){.form-container[_ngcontent-%COMP%]{min-width:auto}}.full-width[_ngcontent-%COMP%]{width:100%}.section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:1rem;font-weight:600;margin-top:.5rem;margin-bottom:-.25rem}.row-2col[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}@media(max-width:768px){.row-2col[_ngcontent-%COMP%]{grid-template-columns:1fr}}.integration-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.integration-row[_ngcontent-%COMP%] .integration-name[_ngcontent-%COMP%]{flex:0 0 180px}.integration-row[_ngcontent-%COMP%] .integration-tools[_ngcontent-%COMP%]{flex:1}.hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}.source-options[_ngcontent-%COMP%]{display:flex;gap:1rem;margin-bottom:.5rem}@media(max-width:768px){.source-options[_ngcontent-%COMP%]{flex-direction:column}}.source-option[_ngcontent-%COMP%]{flex:1;display:flex;align-items:flex-start;gap:.75rem;padding:1rem;background:var(--color-bg);border:2px solid var(--color-border);border-radius:8px;cursor:pointer;transition:all .2s ease}.source-option[_ngcontent-%COMP%]:hover{border-color:var(--color-primary);background:var(--color-bg-hover)}.source-option.selected[_ngcontent-%COMP%]{border-color:var(--color-primary);background:var(--color-bg-hover);box-shadow:0 0 0 1px var(--color-primary)}.source-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-top:2px;cursor:pointer}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%]{flex:1}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-icon[_ngcontent-%COMP%]{font-size:1.25rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-label[_ngcontent-%COMP%]{font-weight:600;font-size:.95rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-description[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-family:monospace;line-height:1.4}.source-display[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.source-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:6px;font-size:.9rem;font-weight:500}.source-badge.badge-project[_ngcontent-%COMP%]{background:#2196f31a;color:#2196f3;border:1px solid rgba(33,150,243,.3)}.source-badge.badge-colocated[_ngcontent-%COMP%]{background:#4caf501a;color:#4caf50;border:1px solid rgba(76,175,80,.3)}.doc-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.doc-row[_ngcontent-%COMP%] .doc-field[_ngcontent-%COMP%]{flex:1}.upload-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;cursor:pointer;color:var(--color-text-secondary);transition:background .2s}.upload-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);color:var(--color-primary)}.upload-btn.uploading[_ngcontent-%COMP%]{opacity:.5;cursor:wait}.upload-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.doc-upload-error[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-error)}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#f443361a;border:1px solid var(--color-error);border-radius:4px;color:var(--color-error)}.error-message[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}"],changeDetection:1})};var et=()=>[],tt=s=>({id:s});function nt(s,t){if(s&1&&(vs(0,"div",5),WC(1),dl()),s&2){let e=mC();XE(),Zg(e.errorMessage());}}function it(s,t){if(s&1){let e=dC();vs(0,"ds-entity-card",7),Ag("selected",function(a){If(e);let r=mC();return wf(r.onEdit(a))}),hl(1,8),vs(2,"button",9),Ag("click",function(a){return a.stopPropagation()}),vs(3,"mat-icon"),WC(4,"more_vert"),dl()(),gl(),dl();}if(s&2){let e=t.$implicit;mC();let n=TC(9);Tg("id",e.id)("name",e.name)("description",e.description)("badges",e.badges??rT(6,et)),XE(2),Tg("matMenuTriggerFor",n)("matMenuTriggerData",oT(7,tt,e.id));}}function ot(s,t){if(s&1){let e=dC();vs(0,"button",10),Ag("click",function(){let a=If(e).id,r=mC();return wf(r.onEdit(a))}),vs(1,"mat-icon"),WC(2,"edit"),dl(),WC(3," Edit "),dl(),vs(4,"button",11),Ag("click",function(){let a=If(e).id,r=mC();return wf(r.onDelete(a))}),vs(5,"mat-icon"),WC(6,"delete"),dl(),WC(7," Delete "),dl();}}var Ve=class s{agentCrudApi=g(w);location=g(Sm);dialog=g(Re);agents=Hi([]);isLoading=Hi(false);errorMessage=Hi(null);agentItems=mT(()=>this.agents().map(t=>({id:t.name,name:t.name,description:t.description,badges:this.buildBadges(t),groupKey:t.source,groupLabel:t.source==="project"?"Project (~/.coday/)":"Colocated (next to coday.yaml)"})));ngOnInit(){this.loadAgents();}loadAgents(){this.isLoading.set(true),this.errorMessage.set(null),this.agentCrudApi.listEditableAgents().subscribe({next:t=>{this.agents.set(t),this.isLoading.set(false);},error:t=>{this.errorMessage.set(t?.error?.error??"Failed to load agents"),this.isLoading.set(false);}});}onBack(){this.location.back();}onCreate(){this.dialog.open(E,{width:"700px",maxHeight:"90vh",data:{mode:"create"}}).afterClosed().subscribe(e=>{e&&this.loadAgents();});}onEdit(t){this.agentCrudApi.getAgent(t).subscribe({next:e=>{this.dialog.open(E,{width:"700px",maxHeight:"90vh",data:{mode:"edit",agent:e}}).afterClosed().subscribe(a=>{a&&this.loadAgents();});},error:e=>this.errorMessage.set(e?.error?.error??"Failed to load agent")});}onDelete(t){confirm(`Are you sure you want to delete agent "${t}"?`)&&this.agentCrudApi.deleteAgent(t).subscribe({next:()=>this.loadAgents(),error:e=>this.errorMessage.set(e?.error?.error??"Failed to delete agent")});}buildBadges(t){return [t.source==="project"?{label:"project",variant:"info"}:{label:"colocated",variant:"success"}]}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=Aw({type:s,selectors:[["app-agent-list"]],decls:11,vars:4,consts:[["agentCard",""],["cardMenu","matMenu"],[1,"agent-list-page"],["title","Agents","cardMinWidth","260px","contentMaxWidth","1400px","searchPlaceholder","Filter agents\u2026","emptyMessage","No file-based agents found.",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","mat-icon-button","","title","Back",3,"click"],[1,"agent-list__error"],["matMenuContent",""],[3,"selected","id","name","description","badges"],["dsCardActions",""],["mat-icon-button","",3,"click","matMenuTriggerFor","matMenuTriggerData"],["mat-menu-item","",3,"click"],["mat-menu-item","",1,"agent-list__delete-item",3,"click"]],template:function(e,n){if(e&1&&(vs(0,"div",2)(1,"ds-entity-list",3),Ag("createRequested",function(){return n.onCreate()}),vs(2,"button",4),Ag("click",function(){return n.onBack()}),vs(3,"mat-icon"),WC(4,"chevron_left"),dl()()(),eC(5,nt,2,1,"div",5),dl(),Dg(6,it,5,9,"ng-template",null,0,fT),vs(8,"mat-menu",null,1),Dg(10,ot,8,0,"ng-template",6),dl()),e&2){let a=TC(7);XE(),Tg("items",n.agentItems())("showCreate",true)("itemTemplate",a),XE(4),tC(n.errorMessage()?5:-1);}},dependencies:[Wn,it$1,nt$1,hr,Gn,yt,wt,In,De,Be,_a,En],styles:["[_nghost-%COMP%]{display:block;width:100%;min-height:100vh;background:var(--color-bg);overflow-y:auto}.agent-list__delete-item[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.agent-list__delete-item[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit}.agent-list__error[_ngcontent-%COMP%]{margin:1rem auto;max-width:900px;padding:.75rem 1rem;background:#dc262614;border:1px solid rgba(220,38,38,.25);border-radius:8px;color:var(--color-error, #ff3b30);font-size:.875rem}"],changeDetection:1})};export{Ve as AgentListComponent};
|
|
1
|
+
import {f}from'./chunk-C61o-KhY.js';import {g,bl as Sm,R as Re,H as Hi,m as mT,A as Aw,i as hr,j as Gn,v as vs,l as Ag,W as WC,k as fl,n as eC,af as Dg,ag as fT,T as TC,X as XE,r as Tg,t as tC,J as dy,P,aE as A,Y as x,Z as z,_ as Ue,$ as zt,a0 as jt,a1 as Vt,a2 as Nt,p as pr,bm as Xt,ai as Jg,aj as KC,a3 as HI,q as oC,bn as nC,a8 as Zg,ak as Xg,a6 as $I,x as iC,a5 as yl,ac as mC,a9 as dC,aa as If,ab as wf,bo as gl,bp as ml,ah as rT,b3 as oT,y as Hg,a$ as Yg,a4 as rC,C as Cg,o as bg}from'./main-VYETRYCE.js';import {P as Pt}from'./chunk-CgzkgcLp.js';import {T as Tn,S as Sn,n as nt$2,a as ae,l as le,c as ce}from'./chunk-BiIYygHc.js';import {W as Wn,i as it$1,n as nt$1,I as In,D as De,B as Be,_ as _a,E as En}from'./chunk-Djnp-vUI.js';import'./chunk-Dax4e1JZ.js';import {y as yt,w as wt,t as ti,Q as Qn,e as ei,Y as Ye$1,f as fn,m as mn,Z as Zn,g as gt,$ as $t,W as Wt,c as cn}from'./chunk-BbLMzp9k.js';var w=class s{http=g(dy);projectState=g(P);getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/agents`}listEditableAgents(){return this.http.get(`${this.getBaseUrl()}/editable`)}getAgent(t){return this.http.get(`${this.getBaseUrl()}/${encodeURIComponent(t)}`)}createAgent(t,e){return this.http.post(this.getBaseUrl(),{location:e,definition:t})}updateAgent(t,e){return this.http.put(`${this.getBaseUrl()}/${encodeURIComponent(t)}`,{definition:e})}listDocuments(t){return this.http.get(`${this.getBaseUrl()}/documents`,{params:{location:t}})}uploadDocument(t,e){return new A(n=>{let a=new FileReader;a.onload=()=>{let r=a.result.split(",")[1];this.http.post(`${this.getBaseUrl()}/documents`,{filename:e.name,content:r,mimeType:e.type},{params:{location:t}}).subscribe(n);},a.onerror=()=>n.error(a.error),a.readAsDataURL(e);})}deleteAgent(t){return this.http.delete(`${this.getBaseUrl()}/${encodeURIComponent(t)}`)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=x({token:s,factory:s.\u0275fac,providedIn:"root"})};function ze(s,t){s&1&&(vs(0,"p",15),WC(1,"No integrations defined \u2014 agent will have access to all tools."),fl());}function qe(s,t){if(s&1){let e=dC();vs(0,"div",16)(1,"mat-form-field",22)(2,"mat-label"),WC(3,"Integration"),fl(),vs(4,"input",23),Jg("ngModelChange",function(a){let r=If(e).$implicit;return KC(r.integration,a)||(r.integration=a),wf(a)}),fl(),HI(),fl(),vs(5,"mat-form-field",24)(6,"mat-label"),WC(7,"Tools (comma-separated)"),fl(),vs(8,"input",25),Jg("ngModelChange",function(a){let r=If(e).$implicit;return KC(r.tools,a)||(r.tools=a),wf(a)}),fl(),HI(),fl(),vs(9,"button",26),Ag("click",function(){let a=If(e).$index,r=mC();return wf(r.removeIntegrationRow(a))}),vs(10,"mat-icon"),WC(11,"delete"),fl()()();}if(s&2){let e=t.$implicit;XE(4),Xg("ngModel",e.integration),$I(),XE(4),Xg("ngModel",e.tools),$I();}}function He(s,t){if(s&1&&(vs(0,"p",30),WC(1),fl()),s&2){let e=mC(2);XE(),Zg(e.docUploadError);}}function Ge(s,t){s&1&&(vs(0,"p",15),WC(1,"No mandatory documents defined."),fl());}function Ze(s,t){if(s&1&&bg(0,"option",35),s&2){let e=t.$implicit;Tg("value","documents/"+e);}}function Ke(s,t){if(s&1){let e=dC();vs(0,"div",31)(1,"mat-form-field",32)(2,"mat-label"),WC(3,"Document path"),fl(),vs(4,"input",33),Jg("ngModelChange",function(a){let r=If(e).$index,j=mC(2);return KC(j.mandatoryDocs[r],a)||(j.mandatoryDocs[r]=a),wf(a)}),fl(),HI(),vs(5,"datalist",34),oC(6,Ze,1,1,"option",35,rC),fl()(),vs(8,"button",26),Ag("click",function(){let a=If(e).$index,r=mC(2);return wf(r.removeDocRow(a))}),vs(9,"mat-icon"),WC(10,"delete"),fl()()();}if(s&2){let e=t.$index,n=mC(2);XE(4),Xg("ngModel",n.mandatoryDocs[e]),Cg("list","docs-list-"+e),$I(),XE(),Tg("id","docs-list-"+e),XE(),iC(n.availableDocuments);}}function Je(s,t){if(s&1){let e=dC();vs(0,"div",6)(1,"span"),WC(2,"Mandatory Documents"),fl(),vs(3,"button",27),Ag("click",function(){If(e);let a=mC();return wf(a.addDocRow())}),vs(4,"mat-icon"),WC(5,"add"),fl()(),vs(6,"label",28)(7,"mat-icon"),WC(8,"upload_file"),fl(),vs(9,"input",29),Ag("change",function(a){If(e);let r=mC();return wf(r.onDocFileSelected(a))}),fl()()(),eC(10,He,2,1,"p",30),eC(11,Ge,2,0,"p",15),oC(12,Ke,11,3,"div",31,nC);}if(s&2){let e=mC();XE(6),Hg("uploading",e.isUploadingDoc),XE(3),Tg("disabled",e.isUploadingDoc),XE(),tC(e.docUploadError?10:-1),XE(),tC(e.mandatoryDocs.length===0?11:-1),XE(),iC(e.mandatoryDocs);}}function Qe(s,t){s&1&&(vs(0,"p",15),WC(1,"\u{1F4A1} Documents can be added after the agent is created."),fl());}function Xe(s,t){if(s&1){let e=dC();vs(0,"div",6),WC(1,"Save to"),fl(),vs(2,"div",36)(3,"label",37)(4,"input",38),Jg("ngModelChange",function(a){If(e);let r=mC();return KC(r.location,a)||(r.location=a),wf(a)}),fl(),HI(),vs(5,"div",39)(6,"div",40)(7,"span",41),WC(8,"\u{1F464}"),fl(),vs(9,"span",42),WC(10,"Project config"),fl()(),vs(11,"p",43),WC(12),fl()()(),vs(13,"label",37)(14,"input",44),Jg("ngModelChange",function(a){If(e);let r=mC();return KC(r.location,a)||(r.location=a),wf(a)}),fl(),HI(),vs(15,"div",39)(16,"div",40)(17,"span",41),WC(18,"\u{1F4E6}"),fl(),vs(19,"span",42),WC(20,"Colocated"),fl()(),vs(21,"p",43),WC(22,"Next to coday.yaml in ./agents/ (committable)"),fl()()()(),vs(23,"p",15),WC(24,"Storage location is permanent and cannot be changed after creation."),fl();}if(s&2){let e=mC();XE(3),Hg("selected",e.location==="project"),XE(),Xg("ngModel",e.location),$I(),XE(8),Yg("~/.coday/projects/","{","name","}","/agents/ (not committed)"),XE(),Hg("selected",e.location==="colocated"),XE(),Xg("ngModel",e.location),$I();}}function Ye(s,t){if(s&1&&(vs(0,"div",17)(1,"span",6),WC(2,"Storage Location"),fl(),vs(3,"span",45),WC(4),fl(),vs(5,"p",15),WC(6,"Cannot be changed after creation."),fl()()),s&2){let e=mC();XE(3),Hg("badge-project",e.location==="project")("badge-colocated",e.location==="colocated"),XE(),yl(" ",e.location==="project"?"\u{1F464} Project config":"\u{1F4E6} Colocated"," ");}}function $e(s,t){if(s&1&&(vs(0,"div",18)(1,"mat-icon"),WC(2,"error"),fl(),vs(3,"span"),WC(4),fl()()),s&2){let e=mC();XE(4),Zg(e.errorMessage);}}var E=class s{agentCrudApi=g(w);agentApi=g(f);dialogRef=g(z);data=g(Ue);name="";description="";instructions="";aiProvider="";modelName="";temperature=null;maxOutputTokens=null;openaiAssistantId="";integrationRows=[];mandatoryDocs=[];availableDocuments=[];isUploadingDoc=false;docUploadError="";location="project";isSaving=false;errorMessage="";isEditMode=false;ngOnInit(){if(this.isEditMode=this.data.mode==="edit",this.isEditMode&&this.data.agent){let t=this.data.agent.definition;this.name=t.name,this.description=t.description,this.instructions=t.instructions??"",this.aiProvider=t.aiProvider??"",this.modelName=t.modelName??"",this.temperature=t.temperature??null,this.maxOutputTokens=t.maxOutputTokens??null,this.openaiAssistantId=t.openaiAssistantId??"",this.location=this.data.agent.source,t.integrations&&(this.integrationRows=Object.entries(t.integrations).map(([e,n])=>({integration:e,tools:n?.join(", ")??""}))),this.mandatoryDocs=[...t.mandatoryDocs??[]],this.loadAvailableDocuments();}}loadAvailableDocuments(){this.agentCrudApi.listDocuments(this.location).subscribe({next:t=>this.availableDocuments=t,error:()=>this.availableDocuments=[]});}addDocRow(){this.mandatoryDocs.push("");}removeDocRow(t){this.mandatoryDocs.splice(t,1);}onDocFileSelected(t){let e=t.target,n=e.files?.[0];n&&(this.isUploadingDoc=true,this.docUploadError="",this.agentCrudApi.uploadDocument(this.location,n).subscribe({next:a=>{this.isUploadingDoc=false,this.mandatoryDocs.push(a.relativePath),this.loadAvailableDocuments(),e.value="";},error:a=>{this.isUploadingDoc=false,this.docUploadError=a?.error?.error??a?.message??"Upload failed",e.value="";}}));}addIntegrationRow(){this.integrationRows.push({integration:"",tools:""});}removeIntegrationRow(t){this.integrationRows.splice(t,1);}trackByIndex(t){return t}validateForm(){if(!this.name.trim())return this.errorMessage="Name is required",false;if(!/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/.test(this.name.trim()))return this.errorMessage="Name must start with alphanumeric and contain only letters, digits, hyphens or underscores",false;if(!this.description.trim())return this.errorMessage="Description is required",false;for(let t of this.integrationRows)if(!t.integration.trim())return this.errorMessage="Integration name cannot be empty",false;return true}buildDefinition(){let t=this.mandatoryDocs.map(n=>n.trim()).filter(Boolean),e=this.integrationRows.length>0?Object.fromEntries(this.integrationRows.filter(n=>n.integration.trim()).map(n=>[n.integration.trim(),n.tools.split(",").map(a=>a.trim()).filter(Boolean)])):void 0;return {name:this.name.trim(),description:this.description.trim(),instructions:this.instructions.trim()||void 0,aiProvider:this.aiProvider.trim()||void 0,modelName:this.modelName.trim()||void 0,temperature:this.temperature??void 0,maxOutputTokens:this.maxOutputTokens??void 0,openaiAssistantId:this.openaiAssistantId.trim()||void 0,integrations:e,mandatoryDocs:t.length>0?t:void 0}}save(){if(this.errorMessage="",!this.validateForm())return;let t=this.buildDefinition();this.isSaving=true,(this.isEditMode?this.agentCrudApi.updateAgent(this.name.trim(),t):this.agentCrudApi.createAgent(t,this.location)).subscribe({next:()=>{this.isSaving=false,this.agentApi.clearAllCache(),this.dialogRef.close(true);},error:n=>{this.isSaving=false,this.errorMessage=n?.error?.error||n?.message||"Failed to save agent";}});}cancel(){this.dialogRef.close(false);}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=Aw({type:s,selectors:[["app-agent-form"]],decls:69,vars:18,consts:[["mat-dialog-title",""],[1,"form-container"],["appearance","outline",1,"full-width"],["matInput","","placeholder","my-agent","required","",3,"ngModelChange","ngModel","readonly"],["matInput","","placeholder","What does this agent do?","rows","2","required","",3,"ngModelChange","ngModel"],["matInput","","placeholder","System instructions for the agent...","rows","6",3,"ngModelChange","ngModel"],[1,"section-title"],[1,"row-2col"],["appearance","outline"],["matInput","","placeholder","e.g. anthropic, openai",3,"ngModelChange","ngModel"],["matInput","","placeholder","e.g. claude-sonnet-4-5",3,"ngModelChange","ngModel"],["matInput","","type","number","min","0","max","2","step","0.1","placeholder","0.0 \u2013 2.0",3,"ngModelChange","ngModel"],["matInput","","type","number","min","1","placeholder","e.g. 4096",3,"ngModelChange","ngModel"],["matInput","","placeholder","asst_...",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Add integration",3,"click"],[1,"hint"],[1,"integration-row"],[1,"source-display"],[1,"error-message"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["appearance","outline",1,"integration-name"],["matInput","","placeholder","e.g. GITHUB",3,"ngModelChange","ngModel"],["appearance","outline",1,"integration-tools"],["matInput","","placeholder","Leave empty for all tools",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Remove",3,"click"],["mat-icon-button","","type","button","title","Add document path",3,"click"],["title","Upload a document to the pool",1,"upload-btn"],["type","file","hidden","",3,"change","disabled"],[1,"doc-upload-error"],[1,"doc-row"],["appearance","outline",1,"doc-field"],["matInput","","placeholder","documents/guide.md",3,"ngModelChange","ngModel"],[3,"id"],[3,"value"],[1,"source-options"],[1,"source-option"],["type","radio","name","location","value","project",3,"ngModelChange","ngModel"],[1,"source-content"],[1,"source-header"],[1,"source-icon"],[1,"source-label"],[1,"source-description"],["type","radio","name","location","value","colocated",3,"ngModelChange","ngModel"],[1,"source-badge"]],template:function(e,n){e&1&&(vs(0,"h2",0),WC(1),fl(),vs(2,"mat-dialog-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),WC(6,"Name"),fl(),vs(7,"input",3),Jg("ngModelChange",function(r){return KC(n.name,r)||(n.name=r),r}),fl(),HI(),vs(8,"mat-hint"),WC(9,"Alphanumeric, hyphens and underscores only. Cannot be changed after creation."),fl()(),vs(10,"mat-form-field",2)(11,"mat-label"),WC(12,"Description"),fl(),vs(13,"textarea",4),Jg("ngModelChange",function(r){return KC(n.description,r)||(n.description=r),r}),fl(),HI(),fl(),vs(14,"mat-form-field",2)(15,"mat-label"),WC(16,"Instructions"),fl(),vs(17,"textarea",5),Jg("ngModelChange",function(r){return KC(n.instructions,r)||(n.instructions=r),r}),fl(),HI(),vs(18,"mat-hint"),WC(19,"System prompt / instructions sent to the AI model"),fl()(),vs(20,"div",6),WC(21,"AI Configuration"),fl(),vs(22,"div",7)(23,"mat-form-field",8)(24,"mat-label"),WC(25,"AI Provider"),fl(),vs(26,"input",9),Jg("ngModelChange",function(r){return KC(n.aiProvider,r)||(n.aiProvider=r),r}),fl(),HI(),fl(),vs(27,"mat-form-field",8)(28,"mat-label"),WC(29,"Model Name"),fl(),vs(30,"input",10),Jg("ngModelChange",function(r){return KC(n.modelName,r)||(n.modelName=r),r}),fl(),HI(),fl()(),vs(31,"div",7)(32,"mat-form-field",8)(33,"mat-label"),WC(34,"Temperature"),fl(),vs(35,"input",11),Jg("ngModelChange",function(r){return KC(n.temperature,r)||(n.temperature=r),r}),fl(),HI(),vs(36,"mat-hint"),WC(37,"Leave empty for model default"),fl()(),vs(38,"mat-form-field",8)(39,"mat-label"),WC(40,"Max Output Tokens"),fl(),vs(41,"input",12),Jg("ngModelChange",function(r){return KC(n.maxOutputTokens,r)||(n.maxOutputTokens=r),r}),fl(),HI(),vs(42,"mat-hint"),WC(43,"Leave empty for model default"),fl()()(),vs(44,"mat-form-field",2)(45,"mat-label"),WC(46,"OpenAI Assistant ID"),fl(),vs(47,"input",13),Jg("ngModelChange",function(r){return KC(n.openaiAssistantId,r)||(n.openaiAssistantId=r),r}),fl(),HI(),vs(48,"mat-hint"),WC(49,"If set, forces aiProvider to openai"),fl()(),vs(50,"div",6)(51,"span"),WC(52,"Integrations"),fl(),vs(53,"button",14),Ag("click",function(){return n.addIntegrationRow()}),vs(54,"mat-icon"),WC(55,"add"),fl()()(),eC(56,ze,2,0,"p",15),oC(57,qe,12,2,"div",16,nC),eC(59,Je,14,5)(60,Qe,2,0,"p",15),eC(61,Xe,25,8),eC(62,Ye,7,5,"div",17),eC(63,$e,5,1,"div",18),fl()(),vs(64,"mat-dialog-actions",19)(65,"button",20),Ag("click",function(){return n.cancel()}),WC(66,"Cancel"),fl(),vs(67,"button",21),Ag("click",function(){return n.save()}),WC(68),fl()()),e&2&&(XE(),Zg(n.isEditMode?"Edit Agent":"Create Agent"),XE(6),Xg("ngModel",n.name),Tg("readonly",n.isEditMode),$I(),XE(6),Xg("ngModel",n.description),$I(),XE(4),Xg("ngModel",n.instructions),$I(),XE(9),Xg("ngModel",n.aiProvider),$I(),XE(4),Xg("ngModel",n.modelName),$I(),XE(5),Xg("ngModel",n.temperature),$I(),XE(6),Xg("ngModel",n.maxOutputTokens),$I(),XE(6),Xg("ngModel",n.openaiAssistantId),$I(),XE(9),tC(n.integrationRows.length===0?56:-1),XE(),iC(n.integrationRows),XE(2),tC(n.isEditMode?59:60),XE(2),tC(n.isEditMode?-1:61),XE(),tC(n.isEditMode?62:-1),XE(),tC(n.errorMessage?63:-1),XE(2),Tg("disabled",n.isSaving),XE(2),Tg("disabled",n.isSaving),XE(),yl(" ",n.isSaving?"Saving...":"Save"," "));},dependencies:[ti,Qn,ei,Ye$1,fn,mn,Zn,gt,$t,Wt,cn,zt,jt,Vt,Nt,hr,pr,Gn,Tn,Sn,nt$2,ae,le,ce,yt,wt,Pt,Xt],styles:[".form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0;min-width:560px}@media(max-width:768px){.form-container[_ngcontent-%COMP%]{min-width:auto}}.full-width[_ngcontent-%COMP%]{width:100%}.section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:1rem;font-weight:600;margin-top:.5rem;margin-bottom:-.25rem}.row-2col[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}@media(max-width:768px){.row-2col[_ngcontent-%COMP%]{grid-template-columns:1fr}}.integration-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.integration-row[_ngcontent-%COMP%] .integration-name[_ngcontent-%COMP%]{flex:0 0 180px}.integration-row[_ngcontent-%COMP%] .integration-tools[_ngcontent-%COMP%]{flex:1}.hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}.source-options[_ngcontent-%COMP%]{display:flex;gap:1rem;margin-bottom:.5rem}@media(max-width:768px){.source-options[_ngcontent-%COMP%]{flex-direction:column}}.source-option[_ngcontent-%COMP%]{flex:1;display:flex;align-items:flex-start;gap:.75rem;padding:1rem;background:var(--color-bg);border:2px solid var(--color-border);border-radius:8px;cursor:pointer;transition:all .2s ease}.source-option[_ngcontent-%COMP%]:hover{border-color:var(--color-primary);background:var(--color-bg-hover)}.source-option.selected[_ngcontent-%COMP%]{border-color:var(--color-primary);background:var(--color-bg-hover);box-shadow:0 0 0 1px var(--color-primary)}.source-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-top:2px;cursor:pointer}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%]{flex:1}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-icon[_ngcontent-%COMP%]{font-size:1.25rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-label[_ngcontent-%COMP%]{font-weight:600;font-size:.95rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-description[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-family:monospace;line-height:1.4}.source-display[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.source-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:6px;font-size:.9rem;font-weight:500}.source-badge.badge-project[_ngcontent-%COMP%]{background:#2196f31a;color:#2196f3;border:1px solid rgba(33,150,243,.3)}.source-badge.badge-colocated[_ngcontent-%COMP%]{background:#4caf501a;color:#4caf50;border:1px solid rgba(76,175,80,.3)}.doc-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.doc-row[_ngcontent-%COMP%] .doc-field[_ngcontent-%COMP%]{flex:1}.upload-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;cursor:pointer;color:var(--color-text-secondary);transition:background .2s}.upload-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);color:var(--color-primary)}.upload-btn.uploading[_ngcontent-%COMP%]{opacity:.5;cursor:wait}.upload-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.doc-upload-error[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-error)}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#f443361a;border:1px solid var(--color-error);border-radius:4px;color:var(--color-error)}.error-message[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}"],changeDetection:1})};var et=()=>[],tt=s=>({id:s});function nt(s,t){if(s&1&&(vs(0,"div",5),WC(1),fl()),s&2){let e=mC();XE(),Zg(e.errorMessage());}}function it(s,t){if(s&1){let e=dC();vs(0,"ds-entity-card",7),Ag("selected",function(a){If(e);let r=mC();return wf(r.onEdit(a))}),gl(1,8),vs(2,"button",9),Ag("click",function(a){return a.stopPropagation()}),vs(3,"mat-icon"),WC(4,"more_vert"),fl()(),ml(),fl();}if(s&2){let e=t.$implicit;mC();let n=TC(9);Tg("id",e.id)("name",e.name)("description",e.description)("badges",e.badges??rT(6,et)),XE(2),Tg("matMenuTriggerFor",n)("matMenuTriggerData",oT(7,tt,e.id));}}function ot(s,t){if(s&1){let e=dC();vs(0,"button",10),Ag("click",function(){let a=If(e).id,r=mC();return wf(r.onEdit(a))}),vs(1,"mat-icon"),WC(2,"edit"),fl(),WC(3," Edit "),fl(),vs(4,"button",11),Ag("click",function(){let a=If(e).id,r=mC();return wf(r.onDelete(a))}),vs(5,"mat-icon"),WC(6,"delete"),fl(),WC(7," Delete "),fl();}}var Ve=class s{agentCrudApi=g(w);location=g(Sm);dialog=g(Re);agents=Hi([]);isLoading=Hi(false);errorMessage=Hi(null);agentItems=mT(()=>this.agents().map(t=>({id:t.name,name:t.name,description:t.description,badges:this.buildBadges(t),groupKey:t.source,groupLabel:t.source==="project"?"Project (~/.coday/)":"Colocated (next to coday.yaml)"})));ngOnInit(){this.loadAgents();}loadAgents(){this.isLoading.set(true),this.errorMessage.set(null),this.agentCrudApi.listEditableAgents().subscribe({next:t=>{this.agents.set(t),this.isLoading.set(false);},error:t=>{this.errorMessage.set(t?.error?.error??"Failed to load agents"),this.isLoading.set(false);}});}onBack(){this.location.back();}onCreate(){this.dialog.open(E,{width:"700px",maxHeight:"90vh",data:{mode:"create"}}).afterClosed().subscribe(e=>{e&&this.loadAgents();});}onEdit(t){this.agentCrudApi.getAgent(t).subscribe({next:e=>{this.dialog.open(E,{width:"700px",maxHeight:"90vh",data:{mode:"edit",agent:e}}).afterClosed().subscribe(a=>{a&&this.loadAgents();});},error:e=>this.errorMessage.set(e?.error?.error??"Failed to load agent")});}onDelete(t){confirm(`Are you sure you want to delete agent "${t}"?`)&&this.agentCrudApi.deleteAgent(t).subscribe({next:()=>this.loadAgents(),error:e=>this.errorMessage.set(e?.error?.error??"Failed to delete agent")});}buildBadges(t){return [t.source==="project"?{label:"project",variant:"info"}:{label:"colocated",variant:"success"}]}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=Aw({type:s,selectors:[["app-agent-list"]],decls:11,vars:4,consts:[["agentCard",""],["cardMenu","matMenu"],[1,"agent-list-page"],["title","Agents","cardMinWidth","260px","contentMaxWidth","1400px","searchPlaceholder","Filter agents\u2026","emptyMessage","No file-based agents found.",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","mat-icon-button","","title","Back",3,"click"],[1,"agent-list__error"],["matMenuContent",""],[3,"selected","id","name","description","badges"],["dsCardActions",""],["mat-icon-button","",3,"click","matMenuTriggerFor","matMenuTriggerData"],["mat-menu-item","",3,"click"],["mat-menu-item","",1,"agent-list__delete-item",3,"click"]],template:function(e,n){if(e&1&&(vs(0,"div",2)(1,"ds-entity-list",3),Ag("createRequested",function(){return n.onCreate()}),vs(2,"button",4),Ag("click",function(){return n.onBack()}),vs(3,"mat-icon"),WC(4,"chevron_left"),fl()()(),eC(5,nt,2,1,"div",5),fl(),Dg(6,it,5,9,"ng-template",null,0,fT),vs(8,"mat-menu",null,1),Dg(10,ot,8,0,"ng-template",6),fl()),e&2){let a=TC(7);XE(),Tg("items",n.agentItems())("showCreate",true)("itemTemplate",a),XE(4),tC(n.errorMessage()?5:-1);}},dependencies:[Wn,it$1,nt$1,hr,Gn,yt,wt,In,De,Be,_a,En],styles:["[_nghost-%COMP%]{display:block;width:100%;min-height:100vh;background:var(--color-bg);overflow-y:auto}.agent-list__delete-item[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.agent-list__delete-item[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit}.agent-list__error[_ngcontent-%COMP%]{margin:1rem auto;max-width:900px;padding:.75rem 1rem;background:#dc262614;border:1px solid rgba(220,38,38,.25);border-radius:8px;color:var(--color-error, #ff3b30);font-size:.875rem}"],changeDetection:1})};export{Ve as AgentListComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {n}from'./chunk-CfgXrte_.js';import {y}from'./chunk-
|
|
1
|
+
import {n}from'./chunk-CfgXrte_.js';import {y}from'./chunk-CEIj_SQC.js';import {v}from'./chunk-CPtlVKZn.js';import {g,ao as V,G,w as we,H as Hi,u as ue,b as U$1,bR as ma,S as ha,A as Aw,aJ as Nb,v as vs,be as aT,l as Ag,k as fl,af as Dg,T as TC,r as Tg,bf as uT,ah as rT,n as eC,ac as mC,t as tC,W as WC,X as XE,a8 as Zg,a9 as dC,aa as If,ab as wf,ag as fT}from'./main-VYETRYCE.js';import {O}from'./chunk-_rnm3CUz.js';import'./chunk-CjOZDsNf.js';import {W as Wn,S as Se}from'./chunk-Djnp-vUI.js';import'./chunk-Dax4e1JZ.js';import'./chunk-BbLMzp9k.js';import'./chunk-BSTCpwsr.js';import'./chunk-C7O0lv-N.js';var z=()=>[];function W(o,e){if(o&1&&(vs(0,"p",3),WC(1),fl()),o&2){let t=mC().$implicit;XE(),Zg(t.name);}}function U(o,e){if(o&1){let t=dC();vs(0,"agentos-integration-config-item",5),Ag("editRequested",function(){let i=If(t),r=mC(2);return wf(r.onEdit(i))})("deleteRequested",function(){let i=If(t),r=mC(2);return wf(r.onDelete(i))})("duplicateRequested",function(){let i=If(t),r=mC(2);return wf(r.onDuplicate(i))}),fl();}if(o&2){let t=e,n=mC(2);Tg("config",t.config)("scope",t.scope)("readOnly",t.scope==="platform"||t.scope==="namespace"&&!n.isAdmin());}}function X(o,e){if(o&1&&eC(0,W,2,1,"p",3)(1,U,1,3,"agentos-integration-config-item",4),o&2){let t,n=e.$implicit,i=mC();tC(i.isEmptyPlaceholder(n.id)?0:(t=i.resolve(n.id))?1:-1,t);}}var k=Object.freeze({platform:"Configurations plateforme",namespace:"Configurations du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),F="__empty__",j=class o{route=g(V);router=g(G);destroyRef=g(we);state=g(y);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=Hi(false);listItems$=this.state.vm$.pipe(ue(e=>this.toListItems(e)));resolved=new Map;ngOnInit(){this.route.paramMap.pipe(U$1(this.destroyRef)).subscribe(e=>{let t=e.get("namespaceId")??"";t&&t!==this.namespaceId&&(this.namespaceId=t),this.state.setNamespace(t);}),this.route.paramMap.pipe(ue(e=>e.get("namespaceId")??""),ma(e=>e?this.namespaceRole.isAdminOfNamespace$(e):ha(false)),U$1(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(U$1(this.destroyRef)).subscribe(e=>{let t=new Map;e.platform.forEach(n=>{n.id&&t.set(this.itemKey("platform",n.id),{config:n,scope:"platform"});}),e.namespace.forEach(n=>{n.id&&t.set(this.itemKey("namespace",n.id),{config:n,scope:"namespace"});}),e.userOnNs.forEach(n=>{n.id&&t.set(this.itemKey("userOnNs",n.id),{config:n,scope:"userOnNs"});}),e.userGlobal.forEach(n=>{n.id&&t.set(this.itemKey("userGlobal",n.id),{config:n,scope:"userGlobal"});}),this.resolved=t;});}isEmptyPlaceholder(e){return e.startsWith(F)}resolve(e){return this.resolved.get(e)??null}itemKey(e,t){return `${e}:${t}`}goBack(){this.router.navigate(["/agentos","namespaces"]);}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:n(this.isAdmin())}});}onEdit(e){let t=e.config.id??"";this.router.navigate(["/agentos",this.namespaceId,"integrations",t,"edit"],{queryParams:{scope:e.scope}});}onDelete(e){let t=e.config.id;t&&this.state.delete(t,e.scope).pipe(U$1(this.destroyRef)).subscribe({error:n=>{console.error(`[IntegrationsAllScopes] Delete failed for ${e.scope}:${t}:`,n);}});}onDuplicate(e){if(!e.config.id)return;let n=(e.scope==="namespace"||e.scope==="platform")&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:n,template:e.config.id,templateScope:e.scope}});}toListItems(e){let t=[];return t.push(...this.sectionItems("platform",e.platform)),t.push(...this.sectionItems("namespace",e.namespace)),t.push(...this.sectionItems("userOnNs",e.userOnNs)),t.push(...this.sectionItems("userGlobal",e.userGlobal)),t}sectionItems(e,t){return t.length===0?[{id:`${F}${e}`,name:"Aucune configuration",groupKey:e,groupLabel:k[e]}]:t.filter(n=>!!n.id).map(n=>({id:this.itemKey(e,n.id),name:n.name,description:n.integrationType,groupKey:e,groupLabel:k[e]}))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=Aw({type:o,selectors:[["agentos-integrations-all-scopes"]],decls:5,vars:6,consts:[["integrationItemTpl",""],["title","Integrations","emptyMessage","No integrations available.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"integrations-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(t,n){if(t&1&&(vs(0,"ds-entity-list",1),aT(1,"async"),Ag("createRequested",function(){return n.openCreateForm()}),vs(2,"ds-icon-button",2),Ag("action",function(){return n.goBack()}),fl()(),Dg(3,X,2,1,"ng-template",null,0,fT)),t&2){let i=TC(4);Tg("items",uT(1,3,n.listItems$)??rT(5,z))("showCreate",true)("itemTemplate",i);}},dependencies:[Wn,O,Se,Nb],styles:[".integrations-all-scopes__empty[_ngcontent-%COMP%]{margin:0;padding:.65rem 1rem;font-size:.85rem;font-style:italic;color:var(--color-text-secondary)}"]})};export{j as IntegrationsAllScopesComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {g,J as dy,S as
|
|
1
|
+
import {g,J as dy,S as ha,bT as Od,u as ue,Y as x}from'./main-VYETRYCE.js';var f=class s{http=g(dy);agentsCache=new Map;getAgents(e){let t=this.agentsCache.get(e);return t?ha(t):this.http.get(`/api/projects/${e}/agents`).pipe(Od(o=>{this.agentsCache.set(e,o);}))}getAgentsAutocomplete(e,t){return this.getAgents(e).pipe(ue(o=>{if(!t)return o;let i=t.toLowerCase(),a=r=>{let n=r.name.toLowerCase();return n.startsWith(i)?0:n.includes(i)?1:2};return o.filter(r=>{let n=r.name.toLowerCase(),h=r.description?.toLowerCase()||"";return n.includes(i)||h.includes(i)}).sort((r,n)=>a(r)-a(n))}))}clearCache(e){this.agentsCache.delete(e);}clearAllCache(){this.agentsCache.clear();}static \u0275fac=function(t){return new(t||s)};static \u0275prov=x({token:s,factory:s.\u0275fac,providedIn:"root"})};export{f};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as P$1,av as dt$1,z as z$1}from'./main-
|
|
1
|
+
import {a as P$1,av as dt$1,z as z$1}from'./main-VYETRYCE.js';function ct(){return {async:false,breaks:false,extensions:null,gfm:true,hooks:null,pedantic:false,renderer:null,silent:false,tokenizer:null,walkTokens:null}}var re=ct();function rn(n){re=n;}var xe={exec:()=>null};function k(n,e=""){let r=typeof n=="string"?n:n.source,s={replace:(t,a)=>{let l=typeof a=="string"?a:a.source;return l=l.replace(D.caret,"$1"),r=r.replace(t,l),s},getRegex:()=>new RegExp(r,e)};return s}var D={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},Hn=/^(?:[ \t]*(?:\n|$))+/,Gn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Wn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Te=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,pt=/(?:[*+-]|\d{1,9}[.)])/,sn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ln=k(sn).replace(/bull/g,pt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Zn=k(sn).replace(/bull/g,pt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ut=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Yn=/^[^\n]+/,ht=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,jn=k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ht).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Xn=k(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,pt).getRegex(),Fe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ft=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Qn=k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ft).replace("tag",Fe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),an=k(ut).replace("hr",Te).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fe).getRegex(),Vn=k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",an).getRegex(),gt={blockquote:Vn,code:Gn,def:jn,fences:Wn,heading:qn,hr:Te,html:Qn,lheading:ln,list:Xn,newline:Hn,paragraph:an,table:xe,text:Yn},Vt=k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Te).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fe).getRegex(),Kn=z$1(P$1({},gt),{lheading:Zn,table:Vt,paragraph:k(ut).replace("hr",Te).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Vt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fe).getRegex()}),Jn=z$1(P$1({},gt),{html:k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ft).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:xe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:k(ut).replace("hr",Te).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",ln).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),er=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,tr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,on=/^( {2,}|\\)\n(?!\s*$)/,nr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Be=/[\p{P}\p{S}]/u,dt=/[\s\p{P}\p{S}]/u,cn=/[^\s\p{P}\p{S}]/u,rr=k(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,dt).getRegex(),pn=/(?!~)[\p{P}\p{S}]/u,sr=/(?!~)[\s\p{P}\p{S}]/u,ir=/(?:[^\s\p{P}\p{S}]|~)/u,lr=/\[(?:[^\[\]`]|`[^`]*?`)*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,un=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ar=k(un,"u").replace(/punct/g,Be).getRegex(),or=k(un,"u").replace(/punct/g,pn).getRegex(),hn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",cr=k(hn,"gu").replace(/notPunctSpace/g,cn).replace(/punctSpace/g,dt).replace(/punct/g,Be).getRegex(),pr=k(hn,"gu").replace(/notPunctSpace/g,ir).replace(/punctSpace/g,sr).replace(/punct/g,pn).getRegex(),ur=k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,cn).replace(/punctSpace/g,dt).replace(/punct/g,Be).getRegex(),hr=k(/\\(punct)/,"gu").replace(/punct/g,Be).getRegex(),fr=k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),gr=k(ft).replace("(?:-->|$)","-->").getRegex(),dr=k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",gr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ze=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,mr=k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ze).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fn=k(/^!?\[(label)\]\[(ref)\]/).replace("label",ze).replace("ref",ht).getRegex(),gn=k(/^!?\[(ref)\](?:\[\])?/).replace("ref",ht).getRegex(),kr=k("reflink|nolink(?!\\()","g").replace("reflink",fn).replace("nolink",gn).getRegex(),Kt=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,mt={_backpedal:xe,anyPunctuation:hr,autolink:fr,blockSkip:lr,br:on,code:tr,del:xe,emStrongLDelim:ar,emStrongRDelimAst:cr,emStrongRDelimUnd:ur,escape:er,link:mr,nolink:gn,punctuation:rr,reflink:fn,reflinkSearch:kr,tag:dr,text:nr,url:xe},br=z$1(P$1({},mt),{link:k(/^!?\[(label)\]\((.*?)\)/).replace("label",ze).getRegex(),reflink:k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ze).getRegex()}),lt=z$1(P$1({},mt),{emStrongRDelimAst:pr,emStrongLDelim:or,url:k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Kt).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Kt).getRegex()}),xr=z$1(P$1({},lt),{br:k(on).replace("{2,}","*").getRegex(),text:k(lt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),ve={normal:gt,gfm:Kn,pedantic:Jn},me={normal:mt,gfm:lt,breaks:xr,pedantic:br},Tr={"&":"&","<":"<",">":">",'"':""","'":"'"},Jt=n=>Tr[n];function q(n,e){if(e){if(D.escapeTest.test(n))return n.replace(D.escapeReplace,Jt)}else if(D.escapeTestNoEncode.test(n))return n.replace(D.escapeReplaceNoEncode,Jt);return n}function en(n){try{n=encodeURI(n).replace(D.percentDecode,"%");}catch(e){return null}return n}function tn(n,e){let r=n.replace(D.findPipe,(a,l,o)=>{let p=false,u=l;for(;--u>=0&&o[u]==="\\";)p=!p;return p?"|":" |"}),s=r.split(D.splitPipe),t=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;t<s.length;t++)s[t]=s[t].trim().replace(D.slashPipe,"|");return s}function ke(n,e,r){let s=n.length;if(s===0)return "";let t=0;for(;t<s;){let a=n.charAt(s-t-1);if(a===e&&true)t++;else break}return n.slice(0,s-t)}function wr(n,e){if(n.indexOf(e[1])===-1)return -1;let r=0;for(let s=0;s<n.length;s++)if(n[s]==="\\")s++;else if(n[s]===e[0])r++;else if(n[s]===e[1]&&(r--,r<0))return s;return r>0?-2:-1}function nn(n,e,r,s,t){let a=e.href,l=e.title||null,o=n[1].replace(t.other.outputLinkReplace,"$1");s.state.inLink=true;let p={type:n[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:l,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=false,p}function Ar(n,e,r){let s=n.match(r.other.indentCodeCompensation);if(s===null)return e;let t=s[1];return e.split(`
|
|
3
3
|
`).map(a=>{let l=a.match(r.other.beginningSpace);if(l===null)return a;let[o]=l;return o.length>=t.length?a.slice(t.length):a}).join(`
|
|
4
4
|
`)}var $e=class{options;rules;lexer;constructor(n){this.options=n||re;}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return {type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return {type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:ke(r,`
|