@whoz-oss/coday-client 3.25.0 → 3.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdpartylicenses.txt +234 -0
- package/browser/{chunk-B6pr9Now.js → chunk-1xKCP6gl.js} +1 -1
- package/browser/{chunk-OqElmTmR.js → chunk-B1gTtKFG.js} +1 -1
- package/browser/{chunk-Cc6av_kK.js → chunk-BIdH1XJF.js} +2 -2
- package/browser/chunk-BSAXfS2x.js +1 -0
- package/browser/{chunk-B2UoGfZ3.js → chunk-Bbb2Oy9I.js} +6 -6
- package/browser/{chunk-CmWqV8dc.js → chunk-BjBW1d-u.js} +6 -6
- package/browser/{chunk-DEUnwPWC.js → chunk-BlUiCEeR.js} +1 -1
- package/browser/{chunk-BH0AuKDN.js → chunk-BloWX02p.js} +1 -1
- package/browser/{chunk-sI2K91LE.js → chunk-BmHNWYuZ.js} +1 -1
- package/browser/{chunk-CXFeBkf0.js → chunk-Bo1DjeiW.js} +1 -1
- package/browser/{chunk-DT0j_Tak.js → chunk-Boc0RvBR.js} +1 -1
- package/browser/{chunk-BWE4takb.js → chunk-Bol7PdRu.js} +1 -1
- package/browser/{chunk-BUi4VbRk.js → chunk-BtBbv-Bf.js} +1 -1
- package/browser/{chunk-DuGczpUf.js → chunk-BvO---8Y.js} +2 -2
- package/browser/chunk-Bv_n_Pea.js +141 -0
- package/browser/chunk-C-VoWDOg.js +10 -0
- package/browser/chunk-C0DMx9CU.js +1 -0
- package/browser/chunk-C3cvHmBJ.js +1 -0
- package/browser/chunk-C5mPb_F4.js +1 -0
- package/browser/chunk-C6x9SBjG.js +1 -0
- package/browser/{chunk-ByqToPFV.js → chunk-CBwpP2V0.js} +1 -1
- package/browser/{chunk-DyyifT6r.js → chunk-CCEiNYBj.js} +1 -1
- package/browser/chunk-CCQAu0MS.js +1 -0
- package/browser/chunk-CE5rgBGE.js +182 -0
- package/browser/{chunk-iT-BBh_o.js → chunk-CERsD1uZ.js} +1 -1
- package/browser/chunk-CFY3CFkD.js +1 -0
- package/browser/{chunk-CWfLK-02.js → chunk-CFfiJ53b.js} +1 -1
- package/browser/{chunk-Bsd6cfhc.js → chunk-CG4buEjj.js} +1 -1
- package/browser/{chunk-OZvSiKvx.js → chunk-CGL1Leue.js} +1 -1
- package/browser/{chunk-DpWl8Hmh.js → chunk-CGlvdEI7.js} +1 -1
- package/browser/chunk-CHSLALZZ.js +111 -0
- package/browser/chunk-CRrjfkUg.js +5 -0
- package/browser/{chunk-CfZ8rkw0.js → chunk-CdkqXKu3.js} +1 -1
- package/browser/{chunk-pyvVjc-9.js → chunk-ChTqQ8HQ.js} +1 -1
- package/browser/chunk-CjKxvXTd.js +1 -0
- package/browser/{chunk-iiREShnX.js → chunk-Cmp8otOQ.js} +1 -1
- package/browser/{chunk-Ce6h2FeE.js → chunk-CpGwP-5T.js} +1 -1
- package/browser/{chunk--j9cf9d6.js → chunk-CrYRdxC9.js} +2 -2
- package/browser/chunk-CrZEE1qa.js +1 -0
- package/browser/chunk-Cw62GRPX.js +1 -0
- package/browser/{chunk-C0cIJD6B.js → chunk-CxozF4Vf.js} +1 -1
- package/browser/{chunk-CDteNbQE.js → chunk-D-vld_6F.js} +1 -1
- package/browser/{chunk-CU9SkJlG.js → chunk-D2pgQ9ii.js} +1 -1
- package/browser/{chunk-Ccwn8U1w.js → chunk-D5UGtM5T.js} +1 -1
- package/browser/{chunk-D62ekcvB.js → chunk-DG8M0PqZ.js} +1 -1
- package/browser/chunk-DKg7p59a.js +1 -0
- package/browser/chunk-DOV6c8DN.js +4 -0
- package/browser/{chunk-BAyZlfDb.js → chunk-DX05HUs9.js} +1 -1
- package/browser/{chunk-D26Rjl-2.js → chunk-DZe-m4Sd.js} +1 -1
- package/browser/chunk-D_aTK145.js +37 -0
- package/browser/chunk-DczzZnS1.js +1 -0
- package/browser/{chunk-Bv19t8Yr.js → chunk-Ddpg0y75.js} +1 -1
- package/browser/chunk-DgmZwFcU.js +2 -0
- package/browser/chunk-DpKLsgM9.js +1 -0
- package/browser/chunk-DuNMllH-.js +2 -0
- package/browser/{chunk-GWd9G-Nj.js → chunk-Dz1wgxrF.js} +1 -1
- package/browser/{chunk-rWPj3GdK.js → chunk-Fh0Lvh-K.js} +1 -1
- package/browser/{chunk-6ZQ87jQV.js → chunk-G_l8BMaJ.js} +3 -3
- package/browser/{chunk-RFOuzDB-.js → chunk-Ov4I3GYD.js} +1 -1
- package/browser/{chunk-BRAKs_V4.js → chunk-RUBMO7Yb.js} +3 -3
- package/browser/{chunk-BorcVzNx.js → chunk-WuZ8xi__.js} +1 -1
- package/browser/chunk-_2qKLbuS.js +1 -0
- package/browser/{chunk-2dXF6kxO.js → chunk-a4RWgm8g.js} +1 -1
- package/browser/{chunk-ComIIQUU.js → chunk-bIJnspzL.js} +1 -1
- package/browser/{chunk-CIFgO2HT.js → chunk-cNEt2yX6.js} +1 -1
- package/browser/{chunk-AfeufHde.js → chunk-cg5smJeu.js} +1 -1
- package/browser/{chunk-ehgi4mB8.js → chunk-q9uyoVUw.js} +1 -1
- package/browser/chunk-sqjr_Ky0.js +1 -0
- package/browser/{chunk-C3uyXZ11.js → chunk-u3jxNXQ8.js} +1 -1
- package/browser/chunk-vQXZQsZC.js +1 -0
- package/browser/index.html +1 -1
- package/browser/main-2GG5NZ4C.js +1811 -0
- package/package.json +1 -1
- package/browser/chunk-BP7WYYNR.js +0 -1
- package/browser/chunk-BSmtz5y3.js +0 -2
- package/browser/chunk-BZIfffSY.js +0 -1
- package/browser/chunk-BaAG5SRs.js +0 -9
- package/browser/chunk-BkZ4nMy0.js +0 -1
- package/browser/chunk-Bkl_Vpe1.js +0 -1
- package/browser/chunk-Btjdv26a.js +0 -1
- package/browser/chunk-C4kiVp0I.js +0 -1
- package/browser/chunk-CBsoAXBW.js +0 -1
- package/browser/chunk-CCSxTkZ-.js +0 -1
- package/browser/chunk-CKdscASQ.js +0 -1
- package/browser/chunk-CPuMGlfm.js +0 -37
- package/browser/chunk-CgtOp5dr.js +0 -5
- package/browser/chunk-Cyh4DuAi.js +0 -1
- package/browser/chunk-DIKc_N9D.js +0 -1
- package/browser/chunk-DIY-0Lon.js +0 -1
- package/browser/chunk-DaphJW96.js +0 -1
- package/browser/chunk-Dgr7xggj.js +0 -4
- package/browser/chunk-DrcS-IIH.js +0 -182
- package/browser/chunk-DwD-3Qe0.js +0 -1
- package/browser/chunk-Dx97073t.js +0 -141
- package/browser/chunk-L0O9mlbO.js +0 -2
- package/browser/chunk-OpIcFxMt.js +0 -1
- package/browser/chunk-bEyVnMri.js +0 -1
- package/browser/main-4LGWVPVH.js +0 -1811
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {v}from'./chunk-OpIcFxMt.js';import {R,q,J}from'./chunk-BkZ4nMy0.js';import {g,ao as V,G,C as Ce$1,W as Wi,F,T as TT,cd as Wf,b as U,z as z$1,a as P$1,j as jw,k as Cs,n as Lg,J as JC,m as hl,o as aC,u as sI,a8 as em,v as cC,a9 as vC,q as dC,a4 as lC,a3 as ZI,A as Ag,ac as CC,x as xg,a6 as QI,w as fC,a5 as Dl,cH as iC,aa as Sf,ab as _f,b$ as UC,N as Ng}from'./main-4LGWVPVH.js';import'./chunk-BaAG5SRs.js';import {k as _t,b as _e$1,o as z,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,A as At,m as mn,Z as Zn,l as Xn,C as Cn,E as En}from'./chunk-CPuMGlfm.js';import'./chunk-CCSxTkZ-.js';import'./chunk-6ZQ87jQV.js';import'./chunk-CmWqV8dc.js';import'./chunk-B2UoGfZ3.js';function se(i,t){i&1&&(Cs(0,"p",5),JC(1,"Loading\u2026"),hl());}function ce(i,t){if(i&1&&(Cs(0,"label",23),Ag(1,"input",24),ZI(),Cs(2,"span"),JC(3),hl()()),i&2){let e=t.$implicit,o=CC(3);sI(),xg("formControl",o.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!o.isAdmin()),QI(),sI(2),em(e.label);}}function de(i,t){if(i&1&&(Cs(0,"fieldset",8)(1,"legend",22),JC(2,"Configuration scope"),hl(),dC(3,ce,4,4,"label",23,iC().trackByScope,true),hl()),i&2){let e=CC(2);xg("disabled",e.isEditMode()),sI(3),fC(e.scopeOptions);}}function ue(i,t){if(i&1&&(Cs(0,"option",13),JC(1),hl()),i&2){let e=t.$implicit,o=CC(2);xg("value",e),sI(),em(o.authTypeLabel[e]);}}function pe(i,t){i&1&&JC(0," Leave a field unchanged to keep the stored credential. ");}function he(i,t){i&1&&(Cs(0,"span",11),JC(1,"*"),hl());}function me(i,t){if(i&1&&(Cs(0,"p",28),JC(1),hl()),i&2){let e=CC(2).$implicit;xg("id","as-hint-"+e.key),sI(),em(e.hint);}}function ge(i,t){if(i&1&&(Ag(0,"input",27),ZI(),aC(1,me,2,2,"p",28)),i&2){let e=CC().$implicit;UC("auth-setting-form__input"+(e.secret?" auth-setting-form__input--secret":"")),xg("id","as-cred-"+e.key)("type",e.secret?"password":"text")("placeholder",e.placeholder)("formControl",t)("autocomplete",e.secret?"new-password":"off"),Ng("aria-describedby",e.hint?"as-hint-"+e.key:null),QI(),sI(),cC(e.hint?1:-1);}}function Ce(i,t){if(i&1&&(Cs(0,"div",9)(1,"label",26),JC(2),aC(3,he,2,0,"span",11),hl(),aC(4,ge,2,9),hl()),i&2){let e,o=t.$implicit,l=CC(3);sI(),xg("for","as-cred-"+o.key),sI(),Dl(" ",o.label," "),sI(),cC(o.required?3:-1),sI(),cC((e=l.controlForField(o.key))?4:-1,e);}}function fe(i,t){if(i&1&&(Cs(0,"fieldset",18)(1,"legend",22),JC(2,"Credentials"),hl(),Cs(3,"p",25),JC(4," Values are stored encrypted and masked on read. "),aC(5,pe,1,0),hl(),dC(6,Ce,5,4,"div",9,iC().trackByField,true),hl()),i&2){let e=CC(2);sI(5),cC(e.isEditMode()?5:-1),sI(),fC(e.credentialFields());}}function ye(i,t){if(i&1){let e=vC();Cs(0,"form",7),Lg("ngSubmit",function(){Sf(e);let l=CC();return _f(l.submit())}),aC(1,de,5,1,"fieldset",8),Cs(2,"div",9)(3,"label",10),JC(4,"Auth type "),Cs(5,"span",11),JC(6,"*"),hl()(),Cs(7,"select",12),dC(8,ue,2,2,"option",13,lC),hl(),ZI(),hl(),Cs(10,"div",9)(11,"label",14),JC(12,"Name "),Cs(13,"span",11),JC(14,"*"),hl()(),Ag(15,"input",15),ZI(),hl(),Cs(16,"div",9)(17,"label",16),JC(18,"Description"),hl(),Ag(19,"input",17),ZI(),hl(),aC(20,fe,8,1,"fieldset",18),Cs(21,"div",19)(22,"button",20),JC(23),hl(),Cs(24,"button",21),Lg("click",function(){Sf(e);let l=CC();return _f(l.cancel())}),JC(25,"Cancel"),hl()()();}if(i&2){let e=CC();xg("formGroup",e.form),sI(),cC(e.isPlatformMode?-1:1),sI(6),xg("formControl",e.authTypeControl),QI(),sI(),fC(e.authTypeOptions),sI(7),xg("formControl",e.nameControl),QI(),sI(4),xg("formControl",e.descriptionControl),QI(),sI(),cC(e.credentialFields().length>0?20:-1),sI(2),xg("disabled",e.form.invalid||e.isSubmitting()),sI(),Dl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var _e=new Set(["namespace","userOnNs","userGlobal"]),P=Object.freeze({platform:"Platform (read-only)",namespace:"Namespace configuration",userOnNs:"Personal \u2014 this namespace only",userGlobal:"Personal \u2014 all namespaces"}),Se={ApiKeyAuthSetting:[{key:"apiKey",label:"API Key",placeholder:"sk-\u2026",secret:true,required:false}],BasicAuthAuthSetting:[{key:"username",label:"Username",placeholder:"user@example.com",secret:false,required:false},{key:"password",label:"Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",secret:true,required:false}],BearerTokenAuthSetting:[{key:"token",label:"Bearer token",placeholder:"eyJ\u2026",secret:true,required:false}],OAuthDiscoverableAuthSetting:[{key:"discoveryUrl",label:"Discovery URL",placeholder:"https://\u2026/.well-known/openid-configuration",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthCustomAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthRegisteredAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthMcpDiscoverableAuthSetting:[{key:"resourceUrl",label:"Resource URL",placeholder:"https://mcp.example.com",hint:"Use the base URL exactly as documented by your provider \u2014 do not append a path suffix. Examples: https://mcp.hubspot.com (HubSpot), https://mcp.atlassian.com/v1/mcp (Atlassian).",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",hint:"Leave empty to let the server register an OAuth client automatically (RFC 7591 dynamic registration). Fill in only if you have a pre-registered client ID from your provider.",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Leave empty in most cases \u2014 the MCP server declares the required scopes itself. Fill in only if your provider explicitly requires client-declared scopes.",secret:false,required:false}]},le=class i{route=g(V);router=g(G);destroyRef=g(Ce$1);state=g(R);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?Wi(true):F(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:false});authTypeOptions=q;authTypeLabel=J;scopeOptions=[{value:"namespace",label:P.namespace},{value:"userOnNs",label:P.userOnNs},{value:"userGlobal",label:P.userGlobal}];nameControl=new _t("",{nonNullable:true,validators:[_e$1.required,_e$1.minLength(1)]});descriptionControl=new _t(null);authTypeControl=new _t("ApiKeyAuthSetting",{nonNullable:true,validators:[_e$1.required]});scopeControl=new _t("namespace",{nonNullable:true});form=new z({name:this.nameControl,description:this.descriptionControl,authType:this.authTypeControl,scope:this.scopeControl});apiKeyControl=new _t("",{nonNullable:true});usernameControl=new _t("",{nonNullable:true});passwordControl=new _t("",{nonNullable:true});tokenControl=new _t("",{nonNullable:true});discoveryUrlControl=new _t("",{nonNullable:true});authorizationUrlControl=new _t("",{nonNullable:true});tokenUrlControl=new _t("",{nonNullable:true});clientIdControl=new _t("",{nonNullable:true});clientSecretControl=new _t("",{nonNullable:true});scopesControl=new _t("",{nonNullable:true});resourceUrlControl=new _t("",{nonNullable:true});selectedAuthType=F(this.authTypeControl.valueChanges,{initialValue:this.authTypeControl.value});credentialFields=TT(()=>Se[this.selectedAuthType()]);isEditMode=Wi(false);isSubmitting=Wi(false);isLoading=Wi(false);existingConfig=null;initialCredentials={};constructor(){this.isPlatformMode||Wf(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let t=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,o=t.get("authSettingId");if(o){this.isEditMode.set(true),this.scopeControl.disable(),this.authTypeControl.disable(),this.loadConfig(o);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let l=this.parseScope(e.get("scope"));this.scopeControl.setValue(l);let v=e.get("template");v&&this.hydrateFromTemplate(v);}parseScope(t){return t&&_e.has(t)?t:"namespace"}deriveScopeFromConfig(t){return !t.userId&&!t.namespaceId?"platform":t.userId?t.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[AuthSettingForm] Could not load auth setting '${t}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.authTypeControl.setValue(e.authType),this.clearCredentialControls(),this.initialCredentials={},this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AuthSettingForm] Could not hydrate from template ${t}:`,e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(t){switch(this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.authTypeControl.setValue(t.authType),this.clearCredentialControls(),this.initialCredentials={},t.authType){case "ApiKeyAuthSetting":{let e=t.apiKey??"";this.apiKeyControl.setValue(e),this.initialCredentials.apiKey=e;break}case "BasicAuthAuthSetting":{let e=t,o=e.username??"",l=e.password??"";this.usernameControl.setValue(o),this.passwordControl.setValue(l),this.initialCredentials.username=o,this.initialCredentials.password=l;break}case "BearerTokenAuthSetting":{let e=t.token??"";this.tokenControl.setValue(e),this.initialCredentials.token=e;break}case "OAuthDiscoverableAuthSetting":{let e=t;this.discoveryUrlControl.setValue(e.discoveryUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.discoveryUrl=e.discoveryUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthCustomAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthRegisteredAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthMcpDiscoverableAuthSetting":{let e=t;this.resourceUrlControl.setValue(e.resourceUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.resourceUrl=e.resourceUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}}}clearCredentialControls(){this.apiKeyControl.setValue(""),this.usernameControl.setValue(""),this.passwordControl.setValue(""),this.tokenControl.setValue(""),this.discoveryUrlControl.setValue(""),this.authorizationUrlControl.setValue(""),this.tokenUrlControl.setValue(""),this.clientIdControl.setValue(""),this.clientSecretControl.setValue(""),this.scopesControl.setValue(""),this.resourceUrlControl.setValue("");}credentialValue(t,e){if(!(this.isEditMode()&&e===this.initialCredentials[t]))return e||void 0}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.nameControl.value.trim(),e=this.descriptionControl.value?.trim()||void 0,o=this.authTypeControl.value,l=this.form.getRawValue().scope,v=this.isPlatformMode?null:this.namespaceId??null,w=this.buildTypedPayload(o,t,e);(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,w,this.existingConfig):this.state.create(w,l,v)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}buildTypedPayload(t,e,o){let l={name:e,description:o};switch(t){case "ApiKeyAuthSetting":return z$1(P$1({},l),{authType:"ApiKeyAuthSetting",apiKey:this.credentialValue("apiKey",this.apiKeyControl.value)});case "BasicAuthAuthSetting":return z$1(P$1({},l),{authType:"BasicAuthAuthSetting",username:this.credentialValue("username",this.usernameControl.value),password:this.credentialValue("password",this.passwordControl.value)});case "BearerTokenAuthSetting":return z$1(P$1({},l),{authType:"BearerTokenAuthSetting",token:this.credentialValue("token",this.tokenControl.value)});case "OAuthDiscoverableAuthSetting":return z$1(P$1({},l),{authType:"OAuthDiscoverableAuthSetting",discoveryUrl:this.credentialValue("discoveryUrl",this.discoveryUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthCustomAuthSetting":return z$1(P$1({},l),{authType:"OAuthCustomAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthRegisteredAuthSetting":return z$1(P$1({},l),{authType:"OAuthRegisteredAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthMcpDiscoverableAuthSetting":return z$1(P$1({},l),{authType:"OAuthMcpDiscoverableAuthSetting",resourceUrl:this.credentialValue("resourceUrl",this.resourceUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)})}}controlForField(t){return {apiKey:this.apiKeyControl,username:this.usernameControl,password:this.passwordControl,token:this.tokenControl,discoveryUrl:this.discoveryUrlControl,authorizationUrl:this.authorizationUrlControl,tokenUrl:this.tokenUrlControl,clientId:this.clientIdControl,clientSecret:this.clientSecretControl,scopes:this.scopesControl,resourceUrl:this.resourceUrlControl}[t]}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","auth-settings"]):this.router.navigate(["/agentos",this.namespaceId,"auth-settings"]);}trackByScope(t,e){return e.value}trackByField(t,e){return e.key}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=jw({type:i,selectors:[["agentos-auth-setting-form"]],decls:10,vars:2,consts:[[1,"auth-setting-form"],[1,"auth-setting-form__header"],["type","button","title","Back to auth settings",1,"auth-setting-form__back",3,"click"],[1,"auth-setting-form__back-icon"],[1,"auth-setting-form__title"],[1,"auth-setting-form__loading"],[1,"auth-setting-form__form",3,"formGroup"],[1,"auth-setting-form__form",3,"ngSubmit","formGroup"],[1,"auth-setting-form__scope",3,"disabled"],[1,"auth-setting-form__field"],["for","as-auth-type",1,"auth-setting-form__label"],["aria-hidden","true"],["id","as-auth-type",1,"auth-setting-form__select",3,"formControl"],[3,"value"],["for","as-name",1,"auth-setting-form__label"],["id","as-name","type","text","placeholder","e.g. GitHub OAuth App","autocomplete","off",1,"auth-setting-form__input",3,"formControl"],["for","as-description",1,"auth-setting-form__label"],["id","as-description","type","text","placeholder","Optional \u2014 short description of this auth setting","autocomplete","off",1,"auth-setting-form__input",3,"formControl"],[1,"auth-setting-form__credentials"],[1,"auth-setting-form__actions"],["type","submit",1,"auth-setting-form__btn","auth-setting-form__btn--primary",3,"disabled"],["type","button",1,"auth-setting-form__btn",3,"click"],[1,"auth-setting-form__label"],[1,"auth-setting-form__scope-option"],["type","radio",3,"formControl","value","disabled"],[1,"auth-setting-form__credentials-hint"],[1,"auth-setting-form__label",3,"for"],[3,"id","type","placeholder","formControl","autocomplete"],[1,"auth-setting-form__field-hint",3,"id"]],template:function(e,o){e&1&&(Cs(0,"div",0)(1,"header",1)(2,"button",2),Lg("click",function(){return o.cancel()}),Cs(3,"span",3),JC(4,"\u2190"),hl(),JC(5," Auth Settings "),hl(),Cs(6,"h1",4),JC(7),hl()(),aC(8,se,2,0,"p",5)(9,ye,26,8,"form",6),hl()),e&2&&(sI(7),em(o.isEditMode()?"Edit auth setting":"New auth setting"),sI(),cC(o.isLoading()?8:9));},dependencies:[ni,Jn,Qn,ei,Ye,At,mn,Zn,Xn,Cn,En],styles:[".auth-setting-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem;max-width:640px}.auth-setting-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.auth-setting-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.4rem;background:none;border:none;cursor:pointer;color:var(--color-text-secondary);font-size:.85rem;padding:0}.auth-setting-form__back[_ngcontent-%COMP%]:hover{color:var(--color-primary)}.auth-setting-form__back-icon[_ngcontent-%COMP%]{font-size:1rem}.auth-setting-form__title[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:600;color:var(--color-text);margin:0}.auth-setting-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem}.auth-setting-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.auth-setting-form__scope[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem;display:flex;flex-direction:column;gap:.5rem}.auth-setting-form__scope[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{padding:0 .25rem}.auth-setting-form__scope-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;font-size:.9rem;color:var(--color-text)}.auth-setting-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem}.auth-setting-form__field-hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);margin:0;line-height:1.4}.auth-setting-form__label[_ngcontent-%COMP%]{font-size:.85rem;font-weight:500;color:var(--color-text-secondary)}.auth-setting-form__input[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem .75rem;background:var(--color-bg-secondary);color:var(--color-text);font-size:.9rem;outline:none;transition:border-color .15s ease;width:100%;box-sizing:border-box}.auth-setting-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.auth-setting-form__input--secret[_ngcontent-%COMP%]{font-family:monospace;letter-spacing:.05em}.auth-setting-form__select[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem .75rem;background:var(--color-bg-secondary);color:var(--color-text);font-size:.9rem;outline:none;cursor:pointer;transition:border-color .15s ease}.auth-setting-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.auth-setting-form__credentials[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem 1rem;display:flex;flex-direction:column;gap:.75rem;margin:0}.auth-setting-form__credentials[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{padding:0 .25rem}.auth-setting-form__credentials-hint[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);margin:0}.auth-setting-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:center;padding-top:.5rem}.auth-setting-form__btn[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem 1.25rem;cursor:pointer;font-size:.9rem;font-weight:500;background:var(--color-bg-secondary);color:var(--color-text);transition:background .15s ease}.auth-setting-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.auth-setting-form__btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.auth-setting-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-on-primary, #fff);border-color:var(--color-primary)}.auth-setting-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, var(--color-primary))}"]})};
|
|
2
|
-
export{le as AuthSettingFormComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {l}from'./chunk-BaAG5SRs.js';import {g,dg as ee,dh as T,X as br,bS as Da,r as re,a7 as va,cE as Pd,Y as x}from'./main-4LGWVPVH.js';var v=class i{userState=g(l);membership=g(ee);currentUser$=T(this.userState.currentUser);cache=new Map;isAdminOfNamespace$(e){if(!e)return br(false);let t=this.cache.get(e);if(t)return t;let s=this.currentUser$.pipe(Da(a=>a?a.isAdmin?br(true):this.membership.getMembersNamespaceMembership(e).pipe(re(d=>d.some(n=>n.id===a.id&&n.role==="ADMIN")),va(()=>br(false))):br(false)),Pd({bufferSize:1,refCount:false}));return this.cache.set(e,s),s}static \u0275fac=function(t){return new(t||i)};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})};export{v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {S as St}from'./chunk-CgtOp5dr.js';import {an as ue,g,L,ao as V,G,I as N$1,ap as _d,j as jw,aq as a,ar as S,as as F,at as c,k as Cs,n as Lg,o as aC,m as hl,x as xg,u as sI,v as cC,H as Hg,M as MC,B as NC,au as uv,ae as kt,av as dt,Y as x,aw as gl,J as JC,ax as ml,a8 as em,a9 as vC,aa as Sf,ac as CC,ab as _f,A as Ag}from'./main-4LGWVPVH.js';import {a as at,s as st,r as rt,_ as _i}from'./chunk-Dx97073t.js';import'./chunk-BWE4takb.js';import {G as Ge}from'./chunk-DrcS-IIH.js';import'./chunk-6ZQ87jQV.js';import'./chunk-Bsd6cfhc.js';import'./chunk-sI2K91LE.js';import'./chunk-DuGczpUf.js';import'./chunk-BRAKs_V4.js';import'./chunk-CmWqV8dc.js';import'./chunk-B2UoGfZ3.js';import'./chunk-CPuMGlfm.js';var T=class o{welcomeMessages=["Welcome to Coday","Bienvenue sur Coday","Bienvenido a Coday","Willkommen bei Coday","Benvenuto su Coday","Bem-vindo ao Coday","Welkom bij Coday","\u0414\u043E\u0431\u0440\u043E \u043F\u043E\u0436\u0430\u043B\u043E\u0432\u0430\u0442\u044C \u0432 Coday","Coday \u3078\u3088\u3046\u3053\u305D","\u6B22\u8FCE\u6765\u5230 Coday","Coday \uC5D0 \uC624\uC2E0 \uAC83\uC744 \uD658\uC601\uD569\uB2C8\uB2E4","\u0645\u0631\u062D\u0628\u064B\u0627 \u0628\u0643 \u0641\u064A Coday"];currentWelcomeIndex=0;currentWelcomeMessage=this.welcomeMessages[0];welcomeRotationInterval;ngOnInit(){this.startWelcomeRotation();}ngOnDestroy(){this.stopWelcomeRotation();}startWelcomeRotation(){this.welcomeRotationInterval=window.setInterval(()=>{this.currentWelcomeIndex=(this.currentWelcomeIndex+1)%this.welcomeMessages.length,this.currentWelcomeMessage=this.welcomeMessages[this.currentWelcomeIndex];},3e3);}stopWelcomeRotation(){this.welcomeRotationInterval&&(clearInterval(this.welcomeRotationInterval),this.welcomeRotationInterval=void 0);}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=jw({type:o,selectors:[["app-welcome-message"]],decls:2,vars:1,consts:[[1,"welcome-title"]],template:function(t,i){t&1&&(gl(0,"h1",0),JC(1),ml()),t&2&&(sI(),em(i.currentWelcomeMessage));},styles:[".welcome-title[_ngcontent-%COMP%]{font-size:clamp(1.5rem,4vw,4rem);font-weight:700;background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 100%);background-size:200% auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:_ngcontent-%COMP%_gradientShift 3s ease-in-out infinite;margin:0;padding:0;line-height:1.2;transition:opacity .5s ease-in-out;display:block;min-height:1.2em;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@keyframes _ngcontent-%COMP%_gradientShift{0%{background-position:0% center}50%{background-position:100% center}to{background-position:0% center}}"],changeDetection:1})};var N=class o{destroy$=new ue;isSetup=false;codayService=g(Ge);preferencesService=g(L);setup(){if(this.isSetup){console.warn("[AGENT-NOTIFICATION] Service already set up");return}console.log("[AGENT-NOTIFICATION] Setting up agent notification service"),this.codayService.isThinking$.pipe(_d(this.destroy$),uv(),kt(([e,t])=>e===true&&t===false)).subscribe(()=>{console.log("[AGENT-NOTIFICATION] Agent stopped thinking, notifying task finished"),this.notifyTaskFinishedIfEnabled();}),this.preferencesService.browserNotificationEnabled$.pipe(_d(this.destroy$),uv(),kt(([e,t])=>e===false&&t===true)).subscribe(()=>{console.log("[AGENT-NOTIFICATION] Browser notifications enabled, checking permission"),this.handleBrowserNotificationEnabled();}),this.isSetup=true;}notifyTaskFinishedIfEnabled(){this.preferencesService.getAgentNotificationEnabled()&&(this.preferencesService.getNotificationSoundEnabled()&&this.playCompletionSound(),this.preferencesService.getBrowserNotificationEnabled()&&this.sendBrowserNotification());}playCompletionSound(){try{let e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),i=e.createGain();t.connect(i),i.connect(e.destination),t.frequency.setValueAtTime(700,e.currentTime),i.gain.setValueAtTime(.1,e.currentTime),i.gain.exponentialRampToValueAtTime(.01,e.currentTime+.08),t.start(e.currentTime),t.stop(e.currentTime+.08);let n=e.createOscillator(),r=e.createGain();n.connect(r),r.connect(e.destination);let l=e.currentTime+.11;n.frequency.setValueAtTime(950,l),r.gain.setValueAtTime(.1,l),r.gain.exponentialRampToValueAtTime(.01,l+.09),n.start(l),n.stop(l+.09),console.log("[AGENT-NOTIFICATION] Completion sound played");}catch(e){console.error("[AGENT-NOTIFICATION] Failed to play completion sound:",e);}}handleBrowserNotificationEnabled(){return dt(this,null,function*(){if(!("Notification"in window)){console.warn("[AGENT-NOTIFICATION] Browser does not support notifications"),this.preferencesService.setBrowserNotificationEnabled(false);return}if(Notification.permission==="denied"){console.warn("[AGENT-NOTIFICATION] Permission denied, disabling browser notifications"),this.preferencesService.setBrowserNotificationEnabled(false);return}if(Notification.permission==="granted"){console.log("[AGENT-NOTIFICATION] Permission already granted, showing confirmation"),this.createConfirmationNotification();return}try{(yield Notification.requestPermission())==="granted"?(console.log("[AGENT-NOTIFICATION] Permission granted, showing confirmation"),this.createConfirmationNotification()):(console.log("[AGENT-NOTIFICATION] Permission denied or dismissed"),this.preferencesService.setBrowserNotificationEnabled(!1));}catch(e){console.error("[AGENT-NOTIFICATION] Error requesting permission:",e),this.preferencesService.setBrowserNotificationEnabled(false);}})}sendBrowserNotification(){if(!("Notification"in window)){console.warn("[AGENT-NOTIFICATION] Browser does not support notifications");return}if(document.hasFocus()){console.warn("[AGENT-NOTIFICATION] Document is focused, skipping browser notification");return}Notification.permission==="granted"?this.createTaskCompleteNotification():console.warn("[AGENT-NOTIFICATION] Permission not granted, cannot send notification");}createConfirmationNotification(){let e=new Notification("Coday - Notifications Enabled",{body:"You will be notified when the agent completes tasks",icon:"/favicon.ico",tag:"coday-notifications-enabled",requireInteraction:false});setTimeout(()=>e.close(),4e3),e.onclick=()=>{window.focus(),e.close();},console.log("[AGENT-NOTIFICATION] Confirmation notification sent");}createTaskCompleteNotification(){let e=new Notification("Coday - Task Complete",{body:"The agent has finished and is waiting for your input",icon:"/favicon.ico",tag:"coday-task-complete",requireInteraction:false});setTimeout(()=>e.close(),5e3),e.onclick=()=>{window.focus(),e.close();},console.log("[AGENT-NOTIFICATION] Task complete notification sent");}ngOnDestroy(){console.log("[AGENT-NOTIFICATION] Service destroyed"),this.destroy$.next(),this.destroy$.complete();}static \u0275fac=function(t){return new(t||o)};static \u0275prov=x({token:o,factory:o.\u0275fac,providedIn:"root"})};var Z=["inputSection"];function ee(o,e){if(o&1){let t=vC();Cs(0,"app-thread",4),Lg("chatFocused",function(){Sf(t);let n=CC();return _f(n.onChatFocusedOnMobile())})("drawerStateChange",function(n){Sf(t);let r=CC();return _f(r.onDrawerStateChange(n))}),hl();}if(o&2){let t=CC();xg("projectName",t.projectName)("threadId",t.threadId);}}function te(o,e){if(o&1){let t=vC();Cs(0,"div",5),Ag(1,"app-welcome-message"),hl(),Cs(2,"div",6,0)(4,"div",7)(5,"div",8)(6,"app-chat-textarea",9),Lg("messageSubmitted",function(n){Sf(t);let r=CC();return _f(r.onMessageSubmitted(n))})("voiceMessageReady",function(n){Sf(t);let r=CC();return _f(r.onVoiceMessageReady(n))})("voiceRecordingToggled",function(n){Sf(t);let r=CC();return _f(r.onVoiceToggled(n))})("heightChanged",function(n){Sf(t);let r=CC();return _f(r.onInputHeightChanged(n))})("textareaFocused",function(){Sf(t);let n=CC();return _f(n.onChatFocusedOnMobile())}),hl()()()();}if(o&2){let t=CC();sI(6),xg("isDisabled",t.isSessionInitializing)("isSessionInitializing",t.isSessionInitializing)("showWelcome",true)("isThinking",false)("isStarting",t.isStartingFirstMessage);}}var K=class o{destroy$=new ue;inputSection;sidenav;projectName="";threadId=null;isSessionInitializing=false;isStartingFirstMessage=false;inputSectionHeight=80;codayService=g(Ge);titleService=g(at);preferencesService=g(L);route=g(V);router=g(G);threadApiService=g(N$1);agentNotificationService=g(N);firstMessageState=g(st);constructor(){console.log("[MAIN-APP] Using new thread-based architecture (no clientId needed)");}ngOnInit(){this.agentNotificationService.setup(),this.setupPrintHandlers(),this.route.params.pipe(_d(this.destroy$)).subscribe(e=>{let t=e.projectName,i=e.threadId||null;console.log("[MAIN-APP] Route params updated:",{project:t,thread:i,previousProject:this.projectName,previousThread:this.threadId}),this.projectName=t,this.threadId=i,this.threadId?console.log("[MAIN-APP] Thread selected - ThreadComponent will display"):(console.log("[MAIN-APP] No thread selected - showing welcome view"),this.initializeWelcomeView());});}initializeWelcomeView(){this.codayService.setTabTitleService(this.titleService);}ngAfterViewInit(){setTimeout(()=>this.updateInputSectionHeight(),100);}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),window.removeEventListener("beforeprint",this.handleBeforePrint),window.removeEventListener("afterprint",this.handleAfterPrint);}onMessageSubmitted(e){console.log("[MAIN-APP] First message submitted from welcome view:",e),this.isSessionInitializing=true,this.isStartingFirstMessage=true,this.threadApiService.createThread().subscribe({next:t=>{console.log("[MAIN-APP] Thread created:",t.thread.id),this.firstMessageState.setPendingFirstMessage(e),this.router.navigate(["project",this.projectName,"thread",t.thread.id]);},error:t=>{console.error("[MAIN-APP] Failed to create thread:",t),this.isSessionInitializing=false,this.isStartingFirstMessage=false,alert("Failed to create conversation: "+(t.message||"Unknown error"));}});}onVoiceToggled(e){console.log("[VOICE] Recording in welcome view:",e);}onVoiceMessageReady(e){console.log("[MAIN-APP] Voice message ready from welcome view"),this.isSessionInitializing=true,this.isStartingFirstMessage=true,this.threadApiService.createThread().subscribe({next:t=>{console.log("[MAIN-APP] Thread created for voice message:",t.thread.id),this.firstMessageState.setPendingVoiceMessage(e),this.router.navigate(["project",this.projectName,"thread",t.thread.id]);},error:t=>{console.error("[MAIN-APP] Failed to create thread for voice message:",t),this.isSessionInitializing=false,this.isStartingFirstMessage=false,alert("Failed to create conversation: "+(t.message||"Unknown error"));}});}isDrawerOpen=false;onDrawerStateChange(e){this.isDrawerOpen=e;}onChatFocusedOnMobile(){window.innerWidth<1024&&this.sidenav?.close();}onInputHeightChanged(e){console.log("[MAIN-APP] Input height changed:",e),this.inputSectionHeight=e;}updateInputSectionHeight(){if(this.inputSection?.nativeElement){let e=this.inputSection.nativeElement.offsetHeight;e!==this.inputSectionHeight&&(console.log("[MAIN-APP] Input section height updated:",e),this.inputSectionHeight=e);}}setupPrintHandlers(){window.addEventListener("beforeprint",this.handleBeforePrint),window.addEventListener("afterprint",this.handleAfterPrint);}handleBeforePrint=()=>{console.log("[PRINT] Before print event triggered");let e=this.preferencesService.getPrintTechnicalMessages();console.log("[PRINT] Print technical messages:",e),e?document.body.classList.add("print-include-technical"):document.body.classList.remove("print-include-technical");};handleAfterPrint=()=>{console.log("[PRINT] After print event triggered"),document.body.classList.remove("print-include-technical");};static \u0275fac=function(t){return new(t||o)};static \u0275cmp=jw({type:o,selectors:[["app-main"]],viewQuery:function(t,i){if(t&1&&Hg(Z,5)(St,5),t&2){let n;MC(n=NC())&&(i.inputSection=n.first),MC(n=NC())&&(i.sidenav=n.first);}},decls:4,vars:2,consts:[["inputSection",""],[3,"drawerOpen"],[1,"app",3,"mousedown","touchstart"],[3,"projectName","threadId"],[3,"chatFocused","drawerStateChange","projectName","threadId"],[1,"welcome-section"],[1,"input-section"],[1,"input-center"],[1,"input-glass"],[3,"messageSubmitted","voiceMessageReady","voiceRecordingToggled","heightChanged","textareaFocused","isDisabled","isSessionInitializing","showWelcome","isThinking","isStarting"]],template:function(t,i){t&1&&(Cs(0,"app-sidenav",1)(1,"div",2),Lg("mousedown",function(){return i.onChatFocusedOnMobile()})("touchstart",function(){return i.onChatFocusedOnMobile()}),aC(2,ee,1,2,"app-thread",3)(3,te,7,5),hl()()),t&2&&(xg("drawerOpen",i.isDrawerOpen),sI(2),cC(i.threadId?2:3));},dependencies:[rt,_i,T,St],styles:["[_nghost-%COMP%]{display:flex;height:100vh;width:100%;overflow:hidden;justify-content:center}.app[_ngcontent-%COMP%]{width:100%;max-width:100%;min-width:0;height:100%;display:flex;flex-direction:column;background:var(--color-bg);color:var(--color-text);transition:all .3s ease;position:relative;justify-content:center;overflow:hidden}.chat-wrapper[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;background:transparent;width:100%;padding:2.5rem 0 1.5rem;display:flex;justify-content:center}.chat-wrapper[_ngcontent-%COMP%] .chat-center[_ngcontent-%COMP%]{max-width:760px;width:100%;margin:0;padding:0 2rem}@media(max-width:768px){.chat-wrapper[_ngcontent-%COMP%] .chat-center[_ngcontent-%COMP%]{padding:0 1rem}}.welcome-section[_ngcontent-%COMP%]{flex-shrink:0;text-align:center;padding:2rem 1rem;animation:_ngcontent-%COMP%_fadeInUp .8s ease-out;display:flex;justify-content:center;align-items:center;width:100%;min-width:0;overflow:hidden}@keyframes _ngcontent-%COMP%_fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.input-section[_ngcontent-%COMP%]{flex-shrink:0;position:relative;border-top:none;background:transparent;box-shadow:none;padding:2.5rem 0 2rem;overflow-y:visible;max-height:none;width:100%;z-index:10;pointer-events:none;display:flex;justify-content:center}.input-center[_ngcontent-%COMP%]{max-width:760px;width:100%;margin:0;padding:0 2rem;display:flex;justify-content:center;align-items:end;position:relative;pointer-events:auto}@media(max-width:768px){.input-center[_ngcontent-%COMP%]{padding:0 1rem}}.input-glass[_ngcontent-%COMP%]{background:none;box-shadow:none;width:100%;min-height:64px;display:flex;align-items:stretch;gap:0;pointer-events:auto;position:relative;overflow:visible}.input-glass[_ngcontent-%COMP%] app-chat-textarea[_ngcontent-%COMP%]{width:100%;min-width:0;flex:1 1 auto;align-self:stretch;display:flex}body.dark[_nghost-%COMP%], body.dark [_nghost-%COMP%], [_ngcontent-%COMP%]:root[data-theme=dark] .input-glass[_ngcontent-%COMP%]{background:#24283073;border-color:#b4c8ff17;box-shadow:0 8px 32px #0000002b,0 1.5px 8px #00000012}.choice-overlay[_ngcontent-%COMP%]{z-index:10;width:100%;display:flex;justify-content:center;align-items:center}.upload-status[_ngcontent-%COMP%]{position:fixed;bottom:100px;left:50%;transform:translate(-50%);z-index:1000;display:flex;align-items:center;padding:12px 20px;background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);border-radius:16px;font-size:.9em;color:var(--color-text);box-shadow:var(--glass-shadow);max-width:300px;text-align:center}.upload-status.error[_ngcontent-%COMP%]{background:#ff3b3026;color:var(--color-error);border-color:#ff3b304d}@media(max-width:768px){.welcome-section[_ngcontent-%COMP%]{padding:1.5rem 1rem}.input-section[_ngcontent-%COMP%]{padding:1.5rem .75rem 1rem}.input-center[_ngcontent-%COMP%]{padding:0 .5rem}}@media print{[_nghost-%COMP%]{display:block!important;height:auto!important;overflow:visible!important}.app[_ngcontent-%COMP%]{height:auto!important;overflow:visible!important;display:block!important}.input-section[_ngcontent-%COMP%], .welcome-section[_ngcontent-%COMP%]{display:none!important}}"],data:{animation:[a("slideIn",[S(":enter",[F({transform:"translateY(100%)",opacity:0}),c("300ms ease-out",F({transform:"translateY(0)",opacity:1}))]),S(":leave",[c("200ms ease-in",F({transform:"translateY(100%)",opacity:0}))])])]},changeDetection:1})};export{K as MainAppComponent};
|