@whoz-oss/coday-client 3.10.0 → 3.12.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/browser/{chunk-DyD311Os.js → chunk-2R-L-8TB.js} +1 -1
- package/browser/{chunk-EUKNlco8.js → chunk-B64oBHQ_.js} +1 -1
- package/browser/{chunk-YSBUI5Fn.js → chunk-B6GXI9z-.js} +1 -1
- package/browser/{chunk-Cksl5AD8.js → chunk-B9IQiMog.js} +1 -1
- package/browser/{chunk-8Uub9JWj.js → chunk-BESIk8ll.js} +6 -6
- package/browser/{chunk-Cm1-CoCU.js → chunk-BM9I1k6S.js} +1 -1
- package/browser/{chunk-BJzVFbX0.js → chunk-BOq6QumJ.js} +5 -5
- package/browser/{chunk-BdHdehhQ.js → chunk-BQ7Z34pK.js} +1 -1
- package/browser/{chunk-BJWqi_bR.js → chunk-BR4Pl8xo.js} +1 -1
- package/browser/{chunk-Bd2CH26d.js → chunk-BSY9MBD-.js} +6 -6
- package/browser/{chunk-CUISPpfB.js → chunk-BUALjXbx.js} +1 -1
- package/browser/{chunk-loSw75E5.js → chunk-BUJvZgLu.js} +1 -1
- package/browser/{chunk-D5aCMhSf.js → chunk-BUpmxKd8.js} +1 -1
- package/browser/{chunk-wlytGgOb.js → chunk-BWqySSd7.js} +1 -1
- package/browser/chunk-Bf1Bttqy.js +9 -0
- package/browser/chunk-Bsv9CCXL.js +1 -0
- package/browser/{chunk-Cdb2CX2Q.js → chunk-BxnUTBZC.js} +1 -1
- package/browser/{chunk-Bampatce.js → chunk-Bz081WAa.js} +3 -3
- package/browser/{chunk-CThSpKxi.js → chunk-BzcZylVP.js} +3 -3
- package/browser/{chunk-C6ZQFaHV.js → chunk-CCFtehVS.js} +2 -2
- package/browser/{chunk-Dkhotd2g.js → chunk-CCQglZL5.js} +1 -1
- package/browser/{chunk-DqUBpSwH.js → chunk-CGJJDRqH.js} +1 -1
- package/browser/{chunk-7R07nDPZ.js → chunk-CJIcHr4L.js} +1 -1
- package/browser/{chunk-BIM6FY9C.js → chunk-CNRDeQvk.js} +1 -1
- package/browser/{chunk-nhFfwaIm.js → chunk-CS_CmKL0.js} +1 -1
- package/browser/{chunk-DR_6ChV2.js → chunk-CSa65gP2.js} +1 -1
- package/browser/{chunk-BGWBjvwQ.js → chunk-CZutweoy.js} +2 -2
- package/browser/{chunk-TVb3vD1X.js → chunk-CaAK8DtC.js} +1 -1
- package/browser/{chunk-CiUdI8_s.js → chunk-CfO-PCnU.js} +1 -1
- package/browser/{chunk-DxZvzVYB.js → chunk-CkXXby9d.js} +2 -2
- package/browser/{chunk-BZz5YcIe.js → chunk-CkwB4YzM.js} +1 -1
- package/browser/{chunk-Bc0GuFnm.js → chunk-CnFhM0Nt.js} +1 -1
- package/browser/{chunk-DJEez-Yg.js → chunk-Co3aK_ug.js} +1 -1
- package/browser/chunk-Cqva3eF5.js +2 -0
- package/browser/{chunk-B0MWdje6.js → chunk-Cqy-kSp8.js} +1 -1
- package/browser/{chunk-D-WJGEwY.js → chunk-D2wlWOWp.js} +1 -1
- package/browser/{chunk-BJAZmQ7l.js → chunk-DEr2MMdQ.js} +1 -1
- package/browser/{chunk-DlBSfQiR.js → chunk-DGbegOkt.js} +1 -1
- package/browser/{chunk-Ba945z-E.js → chunk-DJtRPrJe.js} +1 -1
- package/browser/{chunk-LGfFQHFU.js → chunk-DKfZ0J0-.js} +1 -1
- package/browser/{chunk-B66h5RwF.js → chunk-DMo8nEUq.js} +1 -1
- package/browser/{chunk-Bsfux6Ph.js → chunk-DQj9SXnH.js} +1 -1
- package/browser/chunk-DfyXf4Lw.js +1 -0
- package/browser/{chunk-D7ubXpF6.js → chunk-Di5brgj6.js} +1 -1
- package/browser/{chunk-QtmhX0X1.js → chunk-DoW9c054.js} +1 -1
- package/browser/{chunk-CWKiaMQh.js → chunk-Duz7aHYs.js} +2 -2
- package/browser/chunk-DzSHyN8O.js +1 -0
- package/browser/chunk-DzXp5mWz.js +1 -0
- package/browser/{chunk-DLGt0phX.js → chunk-E-XRHTIB.js} +1 -1
- package/browser/{chunk-C516j1og.js → chunk-GHUL_MFq.js} +1 -1
- package/browser/{chunk-BwivPJC3.js → chunk-HHbcGqdi.js} +1 -1
- package/browser/{chunk-GAwnZGMd.js → chunk-Hhxvnnlp.js} +1 -1
- package/browser/{chunk-DbP7sgsG.js → chunk-LgALnta4.js} +2 -2
- package/browser/{chunk-ybjAFl7I.js → chunk-Lt-5ZOWn.js} +1 -1
- package/browser/{chunk-CGBTxglZ.js → chunk-MtaKFhdm.js} +1 -1
- package/browser/{chunk-Dvnd0JmL.js → chunk-N-tYgqQC.js} +1 -1
- package/browser/{chunk-CfqdY4Mw.js → chunk-NLyO0ldw.js} +1 -1
- package/browser/{chunk-CC3VBVuU.js → chunk-QDqqdtZx.js} +1 -1
- package/browser/{chunk-tOt8zs3G.js → chunk-RPuzC8Su.js} +1 -1
- package/browser/{chunk-DIahKei4.js → chunk-UX95uV76.js} +1 -1
- package/browser/{chunk-CnlsBi4s.js → chunk-Wd2dgg4g.js} +5 -5
- package/browser/chunk-b9_We0yK.js +1 -0
- package/browser/{chunk-DNFP1xT9.js → chunk-iUyWeEFy.js} +1 -1
- package/browser/{chunk-CIgFq37k.js → chunk-iamu8zs_.js} +1 -1
- package/browser/{chunk-Y92IHTQj.js → chunk-nRV2u7bW.js} +2 -2
- package/browser/{chunk-CjRw0M6d.js → chunk-rjkvu4Y6.js} +3 -3
- package/browser/index.html +1 -1
- package/browser/main-4SCUMPDY.js +1811 -0
- package/package.json +1 -1
- package/browser/chunk-5c_jmV57.js +0 -1
- package/browser/chunk-Brb8CVHb.js +0 -1
- package/browser/chunk-BrxgjRsW.js +0 -1
- package/browser/chunk-CaXQnKEW.js +0 -1
- package/browser/chunk-Cc8mup8X.js +0 -2
- package/browser/chunk-DWsrvadK.js +0 -1
- package/browser/chunk-MIRdYHA6.js +0 -9
- package/browser/main-SY6UM2GV.js +0 -1811
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {an as ce,g,L,ci as me,ap as Vy,av as dt$1,
|
|
1
|
+
import {an as ce,g,L,ci as me,ap as Vy,av as dt$1,h as Rw,I as Is,q as qC,m as pl,ai as Jg,aj as XC,A as Ag,a3 as UI,n as bg,t as tC,o as iC,J as JE,ak as Xg,a6 as zI,T as Tg,v as nC,x as sC,a5 as vl,aL as Eo,aM as qn,aO as wt$1,az as Kt,aW as w,cj as Pn,ce as _b,c8 as KT,af as Dg,ag as pT,c9 as kf,ck as Ff,ch as Mg,r as bC,C as Cg,ad as Vg,b$ as PC,H as Hg,D as Fg,E as wC,K as CC,aJ as Tr,aG as fe,cl as be,p as pe,l as le,bU as Od,b9 as T,b8 as B,be as A,b7 as u,bd as h,cm as M,e as O,ba as v,bb as m,d as b,cn as F,f,V,bc as R,co as H,cp as K,ca as _e,Y as x,Z as z$1,_ as Ue,am as Gm,k as Gn,j as pr,a0 as jt,a2 as Nt,a1 as Vt,b0 as Yg,ac as yC}from'./main-4SCUMPDY.js';import {s as se}from'./chunk-CCFtehVS.js';import {t as ti,Q as Qn,e as ei,Y as Ye$1,h as _n,A as At,m as mn,Z as Zn,c as cn,w as wt}from'./chunk-LgALnta4.js';var Xe=["determinateSpinner"];function et(c,e){if(c&1&&(kf(),Is(0,"svg",11),bg(1,"circle",12),pl()),c&2){let t=yC();Cg("viewBox",t._viewBox()),JE(),Vg("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),Cg("r",t._circleRadius());}}var tt=new w("mat-progress-spinner-default-options",{providedIn:"root",factory:()=>({diameter:qe})}),qe=100,nt=10,yt=(()=>{class c{_elementRef=g(Kt);_noopAnimations;get color(){return this._color||this._defaultColor}set color(t){this._color=t;}_color;_defaultColor="primary";_determinateCircle;constructor(){let t=g(tt),n=Pn(),i=this._elementRef.nativeElement;this._noopAnimations=n==="di-disabled"&&!!t&&!t._forceAnimations,this.mode=i.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&n==="reduced-motion"&&i.classList.add("mat-progress-spinner-reduced-motion"),t&&(t.color&&(this.color=this._defaultColor=t.color),t.diameter&&(this.diameter=t.diameter),t.strokeWidth&&(this.strokeWidth=t.strokeWidth));}mode;get value(){return this.mode==="determinate"?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,t||0));}_value=0;get diameter(){return this._diameter}set diameter(t){this._diameter=t||0;}_diameter=qe;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(t){this._strokeWidth=t||0;}_strokeWidth;_circleRadius(){return (this.diameter-nt)/2}_viewBox(){let t=this._circleRadius()*2+this.strokeWidth;return `0 0 ${t} ${t}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static \u0275fac=function(n){return new(n||c)};static \u0275cmp=Rw({type:c,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(n,i){if(n&1&&Fg(Xe,5),n&2){let o;wC(o=CC())&&(i._determinateCircle=o.first);}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(n,i){n&2&&(Cg("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",i.mode==="determinate"?i.value:null)("mode",i.mode),PC("mat-"+i.color),Vg("width",i.diameter,"px")("height",i.diameter,"px")("--mat-progress-spinner-size",i.diameter+"px")("--mat-progress-spinner-active-indicator-width",i.diameter+"px"),Hg("_mat-animation-noopable",i._noopAnimations)("mdc-circular-progress--indeterminate",i.mode==="indeterminate"));},inputs:{color:"color",mode:"mode",value:[2,"value","value",KT],diameter:[2,"diameter","diameter",KT],strokeWidth:[2,"strokeWidth","strokeWidth",KT]},exportAs:["matProgressSpinner"],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(n,i){if(n&1&&(Dg(0,et,2,8,"ng-template",null,0,pT),Is(2,"div",2,1),kf(),Is(4,"svg",3),bg(5,"circle",4),pl()(),Ff(),Is(6,"div",5)(7,"div",6)(8,"div",7),Mg(9,8),pl(),Is(10,"div",9),Mg(11,8),pl(),Is(12,"div",10),Mg(13,8),pl()()()),n&2){let o=bC(1);JE(4),Cg("viewBox",i._viewBox()),JE(),Vg("stroke-dasharray",i._strokeCircumference(),"px")("stroke-dashoffset",i._strokeDashOffset(),"px")("stroke-width",i._circleStrokeWidth(),"%"),Cg("r",i._circleRadius()),JE(4),Tg("ngTemplateOutlet",o),JE(2),Tg("ngTemplateOutlet",o),JE(2),Tg("ngTemplateOutlet",o);}},dependencies:[_b],styles:[`.mat-mdc-progress-spinner {
|
|
2
2
|
--mat-progress-spinner-animation-multiplier: 1;
|
|
3
3
|
display: block;
|
|
4
4
|
overflow: hidden;
|
|
@@ -173,10 +173,10 @@ import {an as ce,g,L,ci as me,ap as Vy,av as dt$1,A as Aw,v as vs,W as WC,j as f
|
|
|
173
173
|
transform: rotate(-265deg);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
`],encapsulation:2})}return c})();var Et=(()=>{class c{static \u0275fac=function(n){return new(n||c)};static \u0275mod=
|
|
176
|
+
`],encapsulation:2})}return c})();var Et=(()=>{class c{static \u0275fac=function(n){return new(n||c)};static \u0275mod=Eo({type:c});static \u0275inj=qn({imports:[wt$1]})}return c})();var z=class c{destroy$=new ce;voices;currentUtterance=null;currentOnEndCallback=null;speakingSubject=new Tr(false);speaking$=this.speakingSubject.asObservable();volume=.8;rate=1.2;language="en-US";selectedVoice;preferencesService=g(L);constructor(){this.initializeSpeechSynthesis(),this.subscribeToPreferences();}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.stopSpeech();}initializeSpeechSynthesis(){if(!("speechSynthesis"in window)){console.warn("[VOICE-SERVICE] Speech synthesis not available"),this.voices=new Promise(e=>e([]));return}this.voices=new Promise((e,t)=>{let n=speechSynthesis.getVoices();if(n.length)e(n);else {let i=setTimeout(()=>{t("no voices found");},2e3);speechSynthesis.addEventListener("voiceschanged",()=>{let o=speechSynthesis.getVoices();o.length&&(clearTimeout(i),e(o));});}}),console.log("[VOICE-SERVICE] Speech synthesis initialized");}subscribeToPreferences(){this.preferencesService.voiceVolume$.pipe(Vy(this.destroy$)).subscribe(e=>{this.volume=e,console.log("[VOICE-SERVICE] Volume updated to:",e);}),this.preferencesService.voiceRate$.pipe(Vy(this.destroy$)).subscribe(e=>{this.rate=e,console.log("[VOICE-SERVICE] Rate updated to:",e);}),this.preferencesService.voiceLanguage$.pipe(Vy(this.destroy$)).subscribe(e=>{this.language=e,console.log("[VOICE-SERVICE] Language updated to:",e),this.updateSelectedVoiceForLanguage();}),this.preferencesService.selectedVoice$.pipe(Vy(this.destroy$)).subscribe(e=>{this.setSelectedVoice(e);}),this.volume=this.preferencesService.getVoiceVolume(),this.rate=this.preferencesService.getVoiceRate(),this.language=this.preferencesService.getVoiceLanguage(),this.setSelectedVoice(this.preferencesService.getSelectedVoice());}isReady(){return "speechSynthesis"in window&&this.selectedVoice!==void 0}isSpeaking(){return speechSynthesis.speaking}speak(e,t){return dt$1(this,null,function*(){if(!this.selectedVoice)return console.warn("[VOICE-SERVICE] No voice selected"),false;if(!e.trim())return console.warn("[VOICE-SERVICE] No text to speak"),false;let n=this.extractPlainText(e);if(!n.trim())return console.warn("[VOICE-SERVICE] No text to speak after markdown cleaning"),false;this.stopSpeech();try{let i=new SpeechSynthesisUtterance(n);i.voice=this.selectedVoice,i.lang=this.selectedVoice.lang,i.volume=this.volume,i.rate=this.rate,this.currentOnEndCallback=t||null,t&&(i.onend=()=>{this.currentOnEndCallback===t&&(this.currentOnEndCallback=null,t());},i.onerror=()=>{this.currentOnEndCallback===t&&(this.currentOnEndCallback=null,t());}),this.currentUtterance=i,this.speakingSubject.next(!0);let o=i.onend,E=i.onerror;return i.onend=C=>{this.speakingSubject.next(!1),o&&o.call(i,C);},i.onerror=C=>{this.speakingSubject.next(!1),E&&E.call(i,C);},speechSynthesis.speak(i),console.log("[VOICE-SERVICE] Started speaking:",e.substring(0,50)+"..."),!0}catch(i){return console.error("[VOICE-SERVICE] Error speaking:",i),false}})}stopSpeech(){if(this.currentUtterance||speechSynthesis.speaking){if(speechSynthesis.cancel(),this.currentUtterance=null,this.currentOnEndCallback){let e=this.currentOnEndCallback;this.currentOnEndCallback=null,e();}this.speakingSubject.next(false),console.log("[VOICE-SERVICE] Speech stopped");}}ding(){try{let e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),n=e.createGain();t.connect(n),n.connect(e.destination),t.frequency.setValueAtTime(800,e.currentTime),n.gain.setValueAtTime(.1,e.currentTime),n.gain.exponentialRampToValueAtTime(.01,e.currentTime+.1),t.start(e.currentTime),t.stop(e.currentTime+.1),console.log("[VOICE-SERVICE] Notification sound played");}catch(e){console.error("[VOICE-SERVICE] Notification sound failed:",e);}}getVoicesForLanguage(){return dt$1(this,null,function*(){try{let e=this.language.slice(0,2),t=yield this.voices;if(!t||t.length===0)return console.warn("[VOICE-SERVICE] No voices available on system"),[];let n=t.filter(i=>i.lang.toLowerCase().startsWith(e)).sort((i,o)=>i.localService&&!o.localService?-1:!i.localService&&o.localService?1:i.name.localeCompare(o.name));return console.log("[VOICE-SERVICE] Found matching voices:",n.length,"for language:",e),n.map(i=>({name:i.name,lang:i.lang,localService:i.localService,default:i.default,displayName:this.formatVoiceDisplayName(i)}))}catch(e){return console.error("[VOICE-SERVICE] Error getting voices for language:",e),[]}})}formatVoiceDisplayName(e){let t=e.localService?"\u{1F3E0}":"\u2601\uFE0F",n=e.default?" \u2B50":"";return `${t} ${e.name} (${e.lang})${n}`}setSelectedVoice(e){return dt$1(this,null,function*(){if(!e){this.selectedVoice=void 0;return}let[t,n]=e.split("|");if(!t||!n){this.selectedVoice=void 0;return}let i=(yield this.voices)?.find(o=>o.name===t&&o.lang===n);i?(this.selectedVoice=i,console.log("[VOICE-SERVICE] Selected voice:",i.name,i.lang)):(this.selectedVoice=void 0,console.warn("[VOICE-SERVICE] Voice not found:",t,n));})}updateSelectedVoiceForLanguage(){return dt$1(this,null,function*(){let e=yield this.getVoicesForLanguage();if(e.length===0){console.warn("[VOICE-SERVICE] No voices available for language:",this.language),this.selectedVoice=void 0,this.preferencesService.setSelectedVoice(null);return}let t=this.preferencesService.getSelectedVoice();if(t){let[i,o]=t.split("|"),E=o?.slice(0,2),C=this.language.slice(0,2);if(E===C&&e.some(q=>q.name===i&&q.lang===o)){console.log("[VOICE-SERVICE] Keeping current voice for language:",t);return}}let n=e[0];if(n){let i=`${n.name}|${n.lang}`;this.preferencesService.setSelectedVoice(i),console.log("[VOICE-SERVICE] Auto-selected voice for language change:",n.displayName);}})}testSelectedVoice(){setTimeout(()=>{if(!this.selectedVoice){console.log("[VOICE-SERVICE] No voice selected for test");return}this.stopSpeech();let e=this.getTestText();e&&this.speak(e);},100);}getTestText(){let e=this.language.slice(0,2),t={fr:"Bonjour, ceci est un test de la voix s\xE9lectionn\xE9e.",en:"Hello, this is a test of the selected voice.",es:"Hola, esta es una prueba de la voz seleccionada.",de:"Hallo, dies ist ein Test der ausgew\xE4hlten Stimme.",it:"Ciao, questo \xE8 un test della voce selezionata.",pt:"Ol\xE1, este \xE9 um teste da voz selecionada.",ja:"\u3053\u3093\u306B\u3061\u306F\u3001\u3053\u308C\u306F\u9078\u629E\u3055\u308C\u305F\u97F3\u58F0\u306E\u30C6\u30B9\u30C8\u3067\u3059\u3002",ko:"\uC548\uB155\uD558\uC138\uC694, \uC774\uAC83\uC740 \uC120\uD0DD\uB41C \uC74C\uC131\uC758 \uD14C\uC2A4\uD2B8\uC785\uB2C8\uB2E4.",zh:"\u4F60\u597D\uFF0C\u8FD9\u662F\u6240\u9009\u8BED\u97F3\u7684\u6D4B\u8BD5\u3002",ru:"\u041F\u0440\u0438\u0432\u0435\u0442, \u044D\u0442\u043E \u0442\u0435\u0441\u0442 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u0433\u043E\u043B\u043E\u0441\u0430.",ar:"\u0645\u0631\u062D\u0628\u0627\u060C \u0647\u0630\u0627 \u0627\u062E\u062A\u0628\u0627\u0631 \u0644\u0644\u0635\u0648\u062A \u0627\u0644\u0645\u062D\u062F\u062F."};return t[e]||t.en}extractPlainText(e){let t=e.replace(/[\u{1F600}-\u{1F64F}]|[\u{1F300}-\u{1F5FF}]|[\u{1F680}-\u{1F6FF}]|[\u{1F1E0}-\u{1F1FF}]|[\u{2600}-\u{26FF}]|[\u{2700}-\u{27BF}]|⭐/gu,"").replace(/```[\s\S]*?```/g,"code block").replace(/`([^`]+)`/g,"$1").replace(/\*\*\*(.*?)\*\*\*/g,"$1").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/~~(.*?)~~/g,"$1").replace(/#{1,6}\s*(.*)/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/https?:\/\/[^\s]+/g,"link").replace(/ /g," ").replace(/&/g,"and").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"');return t=this.addNaturalPunctuation(t),t.replace(/\s+/g," ").trim()}addNaturalPunctuation(e){return e.replace(/\n+/g,`
|
|
177
177
|
`).split(`
|
|
178
|
-
`).map(t=>this.addPeriodIfNeeded(t.trim())).filter(t=>t.length>0).join(" ")}addPeriodIfNeeded(e){return e?/[.!?;:]$/.test(e)?e:e+".":""}static \u0275fac=function(t){return new(t||c)};static \u0275prov=x({token:c,factory:c.\u0275fac,providedIn:"root"})};var ot=(c,e)=>e.code,rt=(c,e)=>e.name+e.lang;function at(c,e){c&1&&(vs(0,"div",17)(1,"mat-icon",39),WC(2,"warning"),fl(),vs(3,"span",40),WC(4," Browser notifications have been blocked. To enable them, please reset the site permissions in your browser settings. "),fl()());}function st(c,e){if(c&1&&(vs(0,"option",25),WC(1),fl()),c&2){let t=e.$implicit;Tg("value",t.code),XE(),Yg("",t.flag," ",t.label);}}function ct(c,e){c&1&&(vs(0,"option",32),WC(1,"Loading voices..."),fl());}function lt(c,e){c&1&&(vs(0,"option",32),WC(1,"No voice available"),fl());}function dt(c,e){if(c&1&&(vs(0,"option",25),WC(1),fl()),c&2){let t=e.$implicit;Tg("value",t.name+"|"+t.lang),XE(),yl(" ",t.displayName," ");}}var Ye=class c{destroy$=new ce;selectedTheme="light";selectedThemeVariant="industry";selectedVoiceLanguage="en-US";useEnterToSend=false;printTechnicalMessages=false;showTechnicalMessages=true;showWarningMessages=true;voiceInputMode="browser";voiceAnnounceEnabled=false;voiceMode="speech";voiceReadFullText=false;voiceVolume=80;voiceRate=120;agentNotificationEnabled=false;notificationSoundEnabled=true;browserNotificationEnabled=false;browserNotificationDenied=false;missionPreviewEnabled=false;availableVoices=[];selectedVoiceId=null;loadingVoices=false;voiceLanguageOptions=[{code:"fr-FR",label:"Fran\xE7ais",flag:"\u{1F1EB}\u{1F1F7}"},{code:"en-US",label:"English (US)",flag:"\u{1F1FA}\u{1F1F8}"},{code:"en-GB",label:"English (UK)",flag:"\u{1F1EC}\u{1F1E7}"},{code:"es-ES",label:"Espa\xF1ol",flag:"\u{1F1EA}\u{1F1F8}"},{code:"de-DE",label:"Deutsch",flag:"\u{1F1E9}\u{1F1EA}"},{code:"it-IT",label:"Italiano",flag:"\u{1F1EE}\u{1F1F9}"},{code:"pt-BR",label:"Portugu\xEAs",flag:"\u{1F1E7}\u{1F1F7}"},{code:"ja-JP",label:"\u65E5\u672C\u8A9E",flag:"\u{1F1EF}\u{1F1F5}"},{code:"ko-KR",label:"\uD55C\uAD6D\uC5B4",flag:"\u{1F1F0}\u{1F1F7}"},{code:"zh-CN",label:"\u4E2D\u6587 (\u7B80\u4F53)",flag:"\u{1F1E8}\u{1F1F3}"},{code:"ru-RU",label:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",flag:"\u{1F1F7}\u{1F1FA}"},{code:"ar-SA",label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",flag:"\u{1F1F8}\u{1F1E6}"}];preferencesService=g(L);voiceSynthesisService=g($);themeService=g(me);ngOnInit(){let e=this.themeService.getCurrentTheme();this.selectedTheme=e.mode,this.selectedThemeVariant=e.variant,this.selectedVoiceLanguage=this.preferencesService.getVoiceLanguage(),this.useEnterToSend=this.preferencesService.getEnterToSend(),this.printTechnicalMessages=this.preferencesService.getPrintTechnicalMessages(),this.showTechnicalMessages=!this.preferencesService.getHideTechnicalMessages(),this.showWarningMessages=!this.preferencesService.getHideWarningMessages(),this.voiceInputMode=this.preferencesService.getVoiceInputMode(),this.voiceAnnounceEnabled=this.preferencesService.getVoiceAnnounceEnabled(),this.voiceMode=this.preferencesService.getVoiceMode(),this.voiceReadFullText=this.preferencesService.getVoiceReadFullText(),this.voiceVolume=Math.round(this.preferencesService.getVoiceVolume()*100),this.voiceRate=Math.round(this.preferencesService.getVoiceRate()*100),this.selectedVoiceId=this.preferencesService.getSelectedVoice(),this.agentNotificationEnabled=this.preferencesService.getAgentNotificationEnabled(),this.notificationSoundEnabled=this.preferencesService.getNotificationSoundEnabled(),this.browserNotificationEnabled=this.preferencesService.getBrowserNotificationEnabled(),this.missionPreviewEnabled=this.preferencesService.getMissionPreviewEnabled(),this.loadAvailableVoices(),this.themeService.currentTheme$.pipe(Vy(this.destroy$)).subscribe(t=>{this.selectedTheme=t.mode,this.selectedThemeVariant=t.variant;}),this.preferencesService.voiceLanguage$.pipe(Vy(this.destroy$)).subscribe(t=>{this.selectedVoiceLanguage=t;}),this.preferencesService.enterToSend$.pipe(Vy(this.destroy$)).subscribe(t=>{this.useEnterToSend=t;}),this.preferencesService.printTechnicalMessages$.pipe(Vy(this.destroy$)).subscribe(t=>{this.printTechnicalMessages=t;}),this.preferencesService.hideTechnicalMessages$.pipe(Vy(this.destroy$)).subscribe(t=>{this.showTechnicalMessages=!t;}),this.preferencesService.hideWarningMessages$.pipe(Vy(this.destroy$)).subscribe(t=>{this.showWarningMessages=!t;}),this.preferencesService.voiceInputMode$.pipe(Vy(this.destroy$)).subscribe(t=>{this.voiceInputMode=t;}),this.preferencesService.voiceAnnounceEnabled$.pipe(Vy(this.destroy$)).subscribe(t=>{this.voiceAnnounceEnabled=t;}),this.preferencesService.voiceMode$.pipe(Vy(this.destroy$)).subscribe(t=>{this.voiceMode=t;}),this.preferencesService.voiceReadFullText$.pipe(Vy(this.destroy$)).subscribe(t=>{this.voiceReadFullText=t;}),this.preferencesService.voiceVolume$.pipe(Vy(this.destroy$)).subscribe(t=>{this.voiceVolume=Math.round(t*100);}),this.preferencesService.voiceRate$.pipe(Vy(this.destroy$)).subscribe(t=>{this.voiceRate=Math.round(t*100);}),this.preferencesService.selectedVoice$.pipe(Vy(this.destroy$)).subscribe(t=>{this.selectedVoiceId=t;}),this.preferencesService.voiceLanguage$.pipe(Vy(this.destroy$)).subscribe(()=>{this.loadAvailableVoices();}),this.preferencesService.agentNotificationEnabled$.pipe(Vy(this.destroy$)).subscribe(t=>{this.agentNotificationEnabled=t;}),this.preferencesService.notificationSoundEnabled$.pipe(Vy(this.destroy$)).subscribe(t=>{this.notificationSoundEnabled=t;}),this.preferencesService.browserNotificationEnabled$.pipe(Vy(this.destroy$)).subscribe(t=>{this.browserNotificationEnabled=t,this.checkNotificationPermission();}),this.preferencesService.missionPreviewEnabled$.pipe(Vy(this.destroy$)).subscribe(t=>{this.missionPreviewEnabled=t;});}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete();}onThemeChange(){console.log("[OPTIONS] Theme changed to:",this.selectedTheme),this.themeService.setTheme({variant:this.selectedThemeVariant,mode:this.selectedTheme});}onVoiceLanguageChange(){console.log("[OPTIONS] Voice language changed to:",this.selectedVoiceLanguage),this.preferencesService.setVoiceLanguage(this.selectedVoiceLanguage);}onEnterToSendChange(){console.log("[OPTIONS] Enter to send changed to:",this.useEnterToSend),this.preferencesService.setEnterToSend(this.useEnterToSend);}onPrintTechnicalMessagesChange(){console.log("[OPTIONS] Print technical messages changed to:",this.printTechnicalMessages),this.preferencesService.setPrintTechnicalMessages(this.printTechnicalMessages);}onShowTechnicalMessagesChange(){let e=!this.showTechnicalMessages;console.log("[OPTIONS] Show technical messages changed to:",this.showTechnicalMessages,"(hide:",e,")"),this.preferencesService.setHideTechnicalMessages(e);}onShowWarningMessagesChange(){let e=!this.showWarningMessages;console.log("[OPTIONS] Show warning messages changed to:",this.showWarningMessages,"(hide:",e,")"),this.preferencesService.setHideWarningMessages(e);}onVoiceInputModeChange(e){let t=e.target.value;console.log("[OPTIONS] Voice input mode changed to:",t),this.preferencesService.setVoiceInputMode(t);}onVoiceAnnounceEnabledChange(){console.log("[OPTIONS] Voice announce enabled changed to:",this.voiceAnnounceEnabled),this.preferencesService.setVoiceAnnounceEnabled(this.voiceAnnounceEnabled);}onVoiceModeChange(){console.log("[OPTIONS] Voice mode changed to:",this.voiceMode),this.preferencesService.setVoiceMode(this.voiceMode);}onVoiceReadFullTextChange(){console.log("[OPTIONS] Voice read full text changed to:",this.voiceReadFullText),this.preferencesService.setVoiceReadFullText(this.voiceReadFullText);}onVoiceVolumeChange(){let e=this.voiceVolume/100;console.log("[OPTIONS] Voice volume changed to:",e),this.preferencesService.setVoiceVolume(e);}onVoiceRateChange(){let e=this.voiceRate/100;console.log("[OPTIONS] Voice rate changed to:",e),this.preferencesService.setVoiceRate(e);}loadAvailableVoices(){return dt$1(this,null,function*(){this.loadingVoices=true;try{this.availableVoices=yield this.voiceSynthesisService.getVoicesForLanguage(),console.log("[OPTIONS] Loaded",this.availableVoices.length,"voices for current language");}catch(e){console.error("[OPTIONS] Error loading voices:",e),this.availableVoices=[];}finally{this.loadingVoices=false;}})}onSelectedVoiceChange(){console.log("[OPTIONS] Selected voice changed to:",this.selectedVoiceId),this.preferencesService.setSelectedVoice(this.selectedVoiceId);}testVoice(){console.log("[OPTIONS] Testing voice with current settings"),this.voiceSynthesisService.testSelectedVoice();}onAgentNotificationEnabledChange(){console.log("[OPTIONS] Agent notification enabled changed to:",this.agentNotificationEnabled),this.preferencesService.setAgentNotificationEnabled(this.agentNotificationEnabled);}onNotificationSoundEnabledChange(){console.log("[OPTIONS] Notification sound enabled changed to:",this.notificationSoundEnabled),this.preferencesService.setNotificationSoundEnabled(this.notificationSoundEnabled);}onBrowserNotificationEnabledChange(){console.log("[OPTIONS] Browser notification enabled changed to:",this.browserNotificationEnabled),this.preferencesService.setBrowserNotificationEnabled(this.browserNotificationEnabled);}onMissionPreviewEnabledChange(){console.log("[OPTIONS] Mission preview panel enabled changed to:",this.missionPreviewEnabled),this.preferencesService.setMissionPreviewEnabled(this.missionPreviewEnabled);}checkNotificationPermission(){"Notification"in window&&(this.browserNotificationDenied=Notification.permission==="denied",console.log("[OPTIONS] Notification permission status:",Notification.permission));}static \u0275fac=function(t){return new(t||c)};static \u0275cmp=Aw({type:c,selectors:[["app-options-panel"]],decls:168,vars:37,consts:[[1,"options-content"],[1,"option-section"],[1,"section-title"],[1,"option-group"],[1,"radio-group"],[1,"option-radio"],["type","radio","name","theme","value","light",3,"ngModelChange","change","ngModel"],[1,"radio-mark"],["type","radio","name","theme","value","dark",3,"ngModelChange","change","ngModel"],["type","radio","name","theme","value","system",3,"ngModelChange","change","ngModel"],[1,"option-label"],["type","radio","name","enterBehavior",3,"ngModelChange","change","value","ngModel"],[1,"toggle-option"],["color","primary",3,"ngModelChange","change","ngModel"],[1,"option-label-with-hint"],[1,"option-hint"],["color","primary",3,"ngModelChange","change","ngModel","disabled"],[1,"notification-error"],["for","voice-input-mode-select",1,"option-label"],["id","voice-input-mode-select",1,"option-select",3,"change","value"],["value","browser"],["value","whisper"],["value","voice-message"],["for","voice-language-select",1,"option-label"],["id","voice-language-select",1,"option-select",3,"ngModelChange","change","ngModel"],[3,"value"],["type","radio","name","voiceAnnounce",3,"ngModelChange","change","value","ngModel"],["type","radio","name","voiceMode","value","speech",3,"ngModelChange","change","ngModel"],["type","radio","name","voiceMode","value","notification",3,"ngModelChange","change","ngModel"],["type","radio","name","voiceReadFull",3,"ngModelChange","change","value","ngModel"],["for","voice-select",1,"option-label"],["id","voice-select",1,"option-select",3,"ngModelChange","change","ngModel","disabled"],["value",""],["role","button","tabindex","0","title","Test voice with current settings",1,"test-voice-link",3,"click"],[1,"thread-name"],["for","voice-volume-slider",1,"option-label"],["id","voice-volume-slider","type","range","min","0","max","100","step","5",1,"option-slider",3,"ngModelChange","input","ngModel"],["for","voice-rate-slider",1,"option-label"],["id","voice-rate-slider","type","range","min","50","max","200","step","10",1,"option-slider",3,"ngModelChange","input","ngModel"],[1,"error-icon"],[1,"error-message"]],template:function(t,n){t&1&&(vs(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-icon"),WC(4,"palette"),fl(),vs(5,"span"),WC(6,"Appearance"),fl()(),vs(7,"div",3)(8,"div",4)(9,"label",5)(10,"input",6),Jg("ngModelChange",function(o){return KC(n.selectedTheme,o)||(n.selectedTheme=o),o}),Ag("change",function(){return n.onThemeChange()}),fl(),HI(),bg(11,"span",7),WC(12," Light "),fl(),vs(13,"label",5)(14,"input",8),Jg("ngModelChange",function(o){return KC(n.selectedTheme,o)||(n.selectedTheme=o),o}),Ag("change",function(){return n.onThemeChange()}),fl(),HI(),bg(15,"span",7),WC(16," Dark "),fl(),vs(17,"label",5)(18,"input",9),Jg("ngModelChange",function(o){return KC(n.selectedTheme,o)||(n.selectedTheme=o),o}),Ag("change",function(){return n.onThemeChange()}),fl(),HI(),bg(19,"span",7),WC(20," System "),fl()()()(),vs(21,"div",1)(22,"div",2)(23,"mat-icon"),WC(24,"chat_bubble_outline"),fl(),vs(25,"span"),WC(26,"Messaging"),fl()(),vs(27,"div",3)(28,"span",10),WC(29,"Send message behavior:"),fl(),vs(30,"div",4)(31,"label",5)(32,"input",11),Jg("ngModelChange",function(o){return KC(n.useEnterToSend,o)||(n.useEnterToSend=o),o}),Ag("change",function(){return n.onEnterToSendChange()}),fl(),HI(),bg(33,"span",7),WC(34," Enter to send "),fl(),vs(35,"label",5)(36,"input",11),Jg("ngModelChange",function(o){return KC(n.useEnterToSend,o)||(n.useEnterToSend=o),o}),Ag("change",function(){return n.onEnterToSendChange()}),fl(),HI(),bg(37,"span",7),WC(38," Enter for new line "),fl()()(),vs(39,"div",3)(40,"div",12)(41,"span",10),WC(42,"Show technical messages"),fl(),vs(43,"mat-slide-toggle",13),Jg("ngModelChange",function(o){return KC(n.showTechnicalMessages,o)||(n.showTechnicalMessages=o),o}),Ag("change",function(){return n.onShowTechnicalMessagesChange()}),fl(),HI(),fl()(),vs(44,"div",3)(45,"div",12)(46,"span",10),WC(47,"Show warning messages"),fl(),vs(48,"mat-slide-toggle",13),Jg("ngModelChange",function(o){return KC(n.showWarningMessages,o)||(n.showWarningMessages=o),o}),Ag("change",function(){return n.onShowWarningMessagesChange()}),fl(),HI(),fl()(),vs(49,"div",3)(50,"div",12)(51,"span",10),WC(52,"Include technical messages in print"),fl(),vs(53,"mat-slide-toggle",13),Jg("ngModelChange",function(o){return KC(n.printTechnicalMessages,o)||(n.printTechnicalMessages=o),o}),Ag("change",function(){return n.onPrintTechnicalMessagesChange()}),fl(),HI(),fl()()(),vs(54,"div",1)(55,"div",2)(56,"mat-icon"),WC(57,"rocket_launch"),fl(),vs(58,"span"),WC(59,"Mission Control"),fl()(),vs(60,"div",3)(61,"div",12)(62,"div",14)(63,"span",10),WC(64,"Side-by-side thread preview"),fl(),vs(65,"span",15),WC(66,"Click a mission card to open a preview panel. Recommended for large screens."),fl()(),vs(67,"mat-slide-toggle",13),Jg("ngModelChange",function(o){return KC(n.missionPreviewEnabled,o)||(n.missionPreviewEnabled=o),o}),Ag("change",function(){return n.onMissionPreviewEnabledChange()}),fl(),HI(),fl()()(),vs(68,"div",1)(69,"div",2)(70,"mat-icon"),WC(71,"notifications"),fl(),vs(72,"span"),WC(73,"Notifications"),fl()(),vs(74,"div",3)(75,"div",12)(76,"span",10),WC(77,"Notify when the agent answers or requests input"),fl(),vs(78,"mat-slide-toggle",13),Jg("ngModelChange",function(o){return KC(n.agentNotificationEnabled,o)||(n.agentNotificationEnabled=o),o}),Ag("change",function(){return n.onAgentNotificationEnabledChange()}),fl(),HI(),fl()(),vs(79,"div",3)(80,"div",12)(81,"span",10),WC(82,"Notification sound"),fl(),vs(83,"mat-slide-toggle",16),Jg("ngModelChange",function(o){return KC(n.notificationSoundEnabled,o)||(n.notificationSoundEnabled=o),o}),Ag("change",function(){return n.onNotificationSoundEnabledChange()}),fl(),HI(),fl()(),vs(84,"div",3)(85,"div",12)(86,"span",10),WC(87,"Browser notification"),fl(),vs(88,"mat-slide-toggle",16),Jg("ngModelChange",function(o){return KC(n.browserNotificationEnabled,o)||(n.browserNotificationEnabled=o),o}),Ag("change",function(){return n.onBrowserNotificationEnabledChange()}),fl(),HI(),fl(),eC(89,at,5,0,"div",17),fl()(),vs(90,"div",1)(91,"div",2)(92,"mat-icon"),WC(93,"record_voice_over"),fl(),vs(94,"span"),WC(95,"Voice & Speech"),fl()(),vs(96,"div",3)(97,"label",18),WC(98,"Voice input method:"),fl(),vs(99,"select",19),Ag("change",function(o){return n.onVoiceInputModeChange(o)}),vs(100,"option",20),WC(101,"Browser (real-time)"),fl(),vs(102,"option",21),WC(103,"Whisper (higher accuracy)"),fl(),vs(104,"option",22),WC(105,"Voice message (send audio)"),fl()()(),vs(106,"div",3)(107,"label",23),WC(108,"Voice recognition language:"),fl(),vs(109,"select",24),Jg("ngModelChange",function(o){return KC(n.selectedVoiceLanguage,o)||(n.selectedVoiceLanguage=o),o}),Ag("change",function(){return n.onVoiceLanguageChange()}),oC(110,st,2,3,"option",25,ot),fl(),HI(),fl(),vs(112,"div",3)(113,"span",10),WC(114,"Automatic announcement:"),fl(),vs(115,"div",4)(116,"label",5)(117,"input",26),Jg("ngModelChange",function(o){return KC(n.voiceAnnounceEnabled,o)||(n.voiceAnnounceEnabled=o),o}),Ag("change",function(){return n.onVoiceAnnounceEnabledChange()}),fl(),HI(),bg(118,"span",7),WC(119," Enabled "),fl(),vs(120,"label",5)(121,"input",26),Jg("ngModelChange",function(o){return KC(n.voiceAnnounceEnabled,o)||(n.voiceAnnounceEnabled=o),o}),Ag("change",function(){return n.onVoiceAnnounceEnabledChange()}),fl(),HI(),bg(122,"span",7),WC(123," Disabled "),fl()()(),vs(124,"div",3)(125,"span",10),WC(126,"Voice mode:"),fl(),vs(127,"div",4)(128,"label",5)(129,"input",27),Jg("ngModelChange",function(o){return KC(n.voiceMode,o)||(n.voiceMode=o),o}),Ag("change",function(){return n.onVoiceModeChange()}),fl(),HI(),bg(130,"span",7),WC(131," Voice synthesis "),fl(),vs(132,"label",5)(133,"input",28),Jg("ngModelChange",function(o){return KC(n.voiceMode,o)||(n.voiceMode=o),o}),Ag("change",function(){return n.onVoiceModeChange()}),fl(),HI(),bg(134,"span",7),WC(135," Sound notification "),fl()()(),vs(136,"div",3)(137,"span",10),WC(138,"Message reading:"),fl(),vs(139,"div",4)(140,"label",5)(141,"input",29),Jg("ngModelChange",function(o){return KC(n.voiceReadFullText,o)||(n.voiceReadFullText=o),o}),Ag("change",function(){return n.onVoiceReadFullTextChange()}),fl(),HI(),bg(142,"span",7),WC(143," Full message "),fl(),vs(144,"label",5)(145,"input",29),Jg("ngModelChange",function(o){return KC(n.voiceReadFullText,o)||(n.voiceReadFullText=o),o}),Ag("change",function(){return n.onVoiceReadFullTextChange()}),fl(),HI(),bg(146,"span",7),WC(147," First paragraphs only "),fl()()(),vs(148,"div",3)(149,"label",30),WC(150,"Selected voice:"),fl(),vs(151,"select",31),Jg("ngModelChange",function(o){return KC(n.selectedVoiceId,o)||(n.selectedVoiceId=o),o}),Ag("change",function(){return n.onSelectedVoiceChange()}),eC(152,ct,2,0,"option",32),eC(153,lt,2,0,"option",32),oC(154,dt,2,2,"option",25,rt),fl(),HI(),bg(156,"div",10),vs(157,"a",33),Ag("click",function(){return n.testVoice()}),vs(158,"span",34),WC(159,"Test voice"),fl()()(),vs(160,"div",3)(161,"label",35),WC(162),fl(),vs(163,"input",36),Jg("ngModelChange",function(o){return KC(n.voiceVolume,o)||(n.voiceVolume=o),o}),Ag("input",function(){return n.onVoiceVolumeChange()}),fl(),HI(),fl(),vs(164,"div",3)(165,"label",37),WC(166),fl(),vs(167,"input",38),Jg("ngModelChange",function(o){return KC(n.voiceRate,o)||(n.voiceRate=o),o}),Ag("input",function(){return n.onVoiceRateChange()}),fl(),HI(),fl()()()),t&2&&(XE(10),Xg("ngModel",n.selectedTheme),$I(),XE(4),Xg("ngModel",n.selectedTheme),$I(),XE(4),Xg("ngModel",n.selectedTheme),$I(),XE(14),Tg("value",true),Xg("ngModel",n.useEnterToSend),$I(),XE(4),Tg("value",false),Xg("ngModel",n.useEnterToSend),$I(),XE(7),Xg("ngModel",n.showTechnicalMessages),$I(),XE(5),Xg("ngModel",n.showWarningMessages),$I(),XE(5),Xg("ngModel",n.printTechnicalMessages),$I(),XE(14),Xg("ngModel",n.missionPreviewEnabled),$I(),XE(11),Xg("ngModel",n.agentNotificationEnabled),$I(),XE(5),Xg("ngModel",n.notificationSoundEnabled),Tg("disabled",!n.agentNotificationEnabled),$I(),XE(5),Xg("ngModel",n.browserNotificationEnabled),Tg("disabled",!n.agentNotificationEnabled||n.browserNotificationDenied),$I(),XE(),tC(n.browserNotificationDenied?89:-1),XE(10),Tg("value",n.voiceInputMode),XE(10),Xg("ngModel",n.selectedVoiceLanguage),$I(),XE(),iC(n.voiceLanguageOptions),XE(7),Tg("value",true),Xg("ngModel",n.voiceAnnounceEnabled),$I(),XE(4),Tg("value",false),Xg("ngModel",n.voiceAnnounceEnabled),$I(),XE(8),Xg("ngModel",n.voiceMode),$I(),XE(4),Xg("ngModel",n.voiceMode),$I(),XE(8),Tg("value",true),Xg("ngModel",n.voiceReadFullText),$I(),XE(4),Tg("value",false),Xg("ngModel",n.voiceReadFullText),$I(),XE(6),Xg("ngModel",n.selectedVoiceId),Tg("disabled",n.loadingVoices||n.availableVoices.length===0),$I(),XE(),tC(n.loadingVoices?152:-1),XE(),tC(!n.loadingVoices&&n.availableVoices.length===0?153:-1),XE(),iC(n.availableVoices),XE(8),yl("Volume: ",n.voiceVolume,"%"),XE(),Xg("ngModel",n.voiceVolume),$I(),XE(3),yl("Speed: ",n.voiceRate,"%"),XE(),Xg("ngModel",n.voiceRate),$I());},dependencies:[ti,Qn,ei,Ye$1,_n,At,mn,Zn,cn,wt,se],styles:['.options-content[_ngcontent-%COMP%]{padding:0;width:100%}.option-group[_ngcontent-%COMP%]{padding:0 1rem 1rem;margin-bottom:1rem;border-bottom:1px solid var(--color-border-light)}.option-group[_ngcontent-%COMP%]:last-child{margin-bottom:0;padding-bottom:0;border-bottom:none}.option-label[_ngcontent-%COMP%]{display:block;margin-bottom:.5rem;font-weight:500;color:var(--color-text);font-size:.875rem}.toggle-option[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:1rem}.toggle-option[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{margin-bottom:0;flex:1}.toggle-option[_ngcontent-%COMP%] mat-slide-toggle[_ngcontent-%COMP%]{flex-shrink:0}.option-label-with-hint[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1}.option-label-with-hint[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{margin-bottom:0}.option-label-with-hint[_ngcontent-%COMP%] .option-hint[_ngcontent-%COMP%]{font-size:.775rem;color:var(--color-text-secondary);line-height:1.4}.option-select[_ngcontent-%COMP%]{width:100%;padding:.5rem;border:1px solid var(--color-border);border-radius:4px;background:var(--color-input-bg);color:var(--color-text);font-size:.875rem;cursor:pointer}.option-select[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--color-primary);box-shadow:0 0 0 3px #7064fb1a}.option-select[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.option-select[_ngcontent-%COMP%] option[_ngcontent-%COMP%]{padding:.5rem}.option-checkbox[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;font-size:.875rem;color:var(--color-text);-webkit-user-select:none;user-select:none}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.option-checkbox[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{width:18px;height:18px;border:2px solid var(--color-border);border-radius:3px;margin-right:.75rem;display:flex;align-items:center;justify-content:center;transition:all .2s ease;flex-shrink:0}.option-checkbox[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]:after{content:"";width:10px;height:6px;border-left:2px solid transparent;border-bottom:2px solid transparent;transform:rotate(-45deg);transition:all .2s ease;opacity:0}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + .checkmark[_ngcontent-%COMP%]{background-color:var(--color-primary);border-color:var(--color-primary)}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + .checkmark[_ngcontent-%COMP%]:after{border-left-color:#fff;border-bottom-color:#fff;opacity:1}.option-checkbox[_ngcontent-%COMP%]:hover .checkmark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-checkbox[_ngcontent-%COMP%]:focus-within .checkmark[_ngcontent-%COMP%]{box-shadow:0 0 0 3px #7064fb1a}.option-section[_ngcontent-%COMP%]{padding-top:1rem;margin-top:1rem;border-top:2px solid var(--color-border)}.option-section[_ngcontent-%COMP%]:first-child{border-top:none;padding-top:0;margin-top:0}.section-title[_ngcontent-%COMP%]{margin:0 0 1rem;padding:0 1rem;font-size:.9rem;font-weight:600;color:var(--color-text);display:flex;align-items:center;gap:.5rem}.section-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.option-radio[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;font-size:.875rem;color:var(--color-text);-webkit-user-select:none;user-select:none}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{display:none}.option-radio[_ngcontent-%COMP%] .radio-mark[_ngcontent-%COMP%]{width:16px;height:16px;border:2px solid var(--color-border);border-radius:50%;margin-right:.5rem;display:flex;align-items:center;justify-content:center;transition:all .2s ease;flex-shrink:0;position:relative}.option-radio[_ngcontent-%COMP%] .radio-mark[_ngcontent-%COMP%]:after{content:"";width:8px;height:8px;border-radius:50%;background-color:var(--color-primary);transition:all .2s ease;opacity:0;transform:scale(0)}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .radio-mark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .radio-mark[_ngcontent-%COMP%]:after{opacity:1;transform:scale(1)}.option-radio[_ngcontent-%COMP%]:hover .radio-mark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-radio[_ngcontent-%COMP%]:focus-within .radio-mark[_ngcontent-%COMP%]{box-shadow:0 0 0 3px #7064fb1a}.option-slider[_ngcontent-%COMP%]{width:100%;height:6px;border-radius:3px;background:var(--color-bg-solid);outline:none;cursor:pointer;-webkit-appearance:none;appearance:none}.option-slider[_ngcontent-%COMP%]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;border-radius:50%;background:var(--color-primary);cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003;transition:all .2s ease}.option-slider[_ngcontent-%COMP%]::-webkit-slider-thumb:hover{transform:scale(1.1);box-shadow:0 2px 8px #0000004d}.option-slider[_ngcontent-%COMP%]::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:var(--color-primary);cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003;transition:all .2s ease}.option-slider[_ngcontent-%COMP%]::-moz-range-thumb:hover{transform:scale(1.1);box-shadow:0 2px 8px #0000004d}.option-slider[_ngcontent-%COMP%]::-webkit-slider-track{height:6px;border-radius:3px;background:var(--color-bg-secondary)}.option-slider[_ngcontent-%COMP%]::-moz-range-track{height:6px;border-radius:3px;background:var(--color-bg-secondary);border:none}.option-slider[_ngcontent-%COMP%]:focus{outline:none}.option-slider[_ngcontent-%COMP%]:focus::-webkit-slider-thumb{box-shadow:0 0 0 3px #7064fb4d,0 2px 6px #0003}.option-slider[_ngcontent-%COMP%]:focus::-moz-range-thumb{box-shadow:0 0 0 3px #7064fb4d,0 2px 6px #0003}.test-voice-btn[_ngcontent-%COMP%]{width:100%;padding:.75rem 1rem;background:var(--color-primary);color:#fff;border:none;border-radius:6px;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center;gap:.5rem}.test-voice-btn[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover);transform:translateY(-1px);box-shadow:0 2px 8px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:active{transform:translateY(0);box-shadow:0 1px 4px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:focus{outline:none;box-shadow:0 0 0 3px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:disabled{background:var(--color-bg-secondary);color:var(--color-text-secondary);cursor:not-allowed;transform:none;box-shadow:none}.test-voice-link[_ngcontent-%COMP%]{text-decoration-thickness:1.5px;text-underline-offset:3px;background:transparent;border:none;padding:0;font-size:.775rem;font-weight:400;cursor:pointer;transition:all .2s ease;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;text-decoration:underline}.test-voice-link[_ngcontent-%COMP%]:hover{color:var(--color-primary-hover, var(--color-primary));text-decoration-thickness:2px}.test-voice-link[_ngcontent-%COMP%]:active{opacity:.8}.test-voice-link[_ngcontent-%COMP%]:focus{outline:2px solid var(--color-primary);outline-offset:2px}.test-voice-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.notification-error[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;padding:.75rem;margin-top:.75rem;background-color:#d32f2f1a;border:1px solid rgba(211,47,47,.3);border-radius:6px;font-size:.8125rem;line-height:1.5}.notification-error[_ngcontent-%COMP%] .error-icon[_ngcontent-%COMP%]{color:#d32f2f;font-size:20px;width:20px;height:20px;flex-shrink:0;margin-top:2px}.notification-error[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{color:var(--color-text);flex:1}.notification-error[_ngcontent-%COMP%]{margin-top:.75rem;padding:.75rem;background-color:#f443361a;border:1px solid rgba(244,67,54,.3);border-radius:6px;display:flex;align-items:flex-start;gap:.5rem}.notification-error[_ngcontent-%COMP%] .error-icon[_ngcontent-%COMP%]{color:#f44336;font-size:20px;width:20px;height:20px;flex-shrink:0;margin-top:2px}.notification-error[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text);line-height:1.5;flex:1}'],changeDetection:1})};function Ke(c){let e=c.args??"",t;try{let n=JSON.parse(e);t=JSON.stringify(n,null,2);}catch(n){t=e;}return `\u{1F527} ${c.name}
|
|
178
|
+
`).map(t=>this.addPeriodIfNeeded(t.trim())).filter(t=>t.length>0).join(" ")}addPeriodIfNeeded(e){return e?/[.!?;:]$/.test(e)?e:e+".":""}static \u0275fac=function(t){return new(t||c)};static \u0275prov=x({token:c,factory:c.\u0275fac,providedIn:"root"})};var rt=(c,e)=>e.code,at=(c,e)=>e.name+e.lang;function st(c,e){c&1&&(Is(0,"div",17)(1,"mat-icon",39),qC(2,"warning"),pl(),Is(3,"span",40),qC(4," Browser notifications have been blocked. To enable them, please reset the site permissions in your browser settings. "),pl()());}function ct(c,e){if(c&1&&(Is(0,"option",25),qC(1),pl()),c&2){let t=e.$implicit;Tg("value",t.code),JE(),Yg("",t.flag," ",t.label);}}function lt(c,e){c&1&&(Is(0,"option",32),qC(1,"Loading voices..."),pl());}function dt(c,e){c&1&&(Is(0,"option",32),qC(1,"No voice available"),pl());}function pt(c,e){if(c&1&&(Is(0,"option",25),qC(1),pl()),c&2){let t=e.$implicit;Tg("value",t.name+"|"+t.lang),JE(),vl(" ",t.displayName," ");}}var Ye=class c{destroy$=new ce;selectedTheme="light";selectedThemeVariant="industry";selectedVoiceLanguage="en-US";useEnterToSend=false;printTechnicalMessages=false;showTechnicalMessages=true;showWarningMessages=true;voiceInputMode="browser";voiceAnnounceEnabled=false;voiceMode="speech";voiceReadFullText=false;voiceVolume=80;voiceRate=120;agentNotificationEnabled=false;notificationSoundEnabled=true;browserNotificationEnabled=false;browserNotificationDenied=false;missionPreviewEnabled=false;availableVoices=[];selectedVoiceId=null;loadingVoices=false;voiceLanguageOptions=[{code:"fr-FR",label:"Fran\xE7ais",flag:"\u{1F1EB}\u{1F1F7}"},{code:"en-US",label:"English (US)",flag:"\u{1F1FA}\u{1F1F8}"},{code:"en-GB",label:"English (UK)",flag:"\u{1F1EC}\u{1F1E7}"},{code:"es-ES",label:"Espa\xF1ol",flag:"\u{1F1EA}\u{1F1F8}"},{code:"de-DE",label:"Deutsch",flag:"\u{1F1E9}\u{1F1EA}"},{code:"it-IT",label:"Italiano",flag:"\u{1F1EE}\u{1F1F9}"},{code:"pt-BR",label:"Portugu\xEAs",flag:"\u{1F1E7}\u{1F1F7}"},{code:"ja-JP",label:"\u65E5\u672C\u8A9E",flag:"\u{1F1EF}\u{1F1F5}"},{code:"ko-KR",label:"\uD55C\uAD6D\uC5B4",flag:"\u{1F1F0}\u{1F1F7}"},{code:"zh-CN",label:"\u4E2D\u6587 (\u7B80\u4F53)",flag:"\u{1F1E8}\u{1F1F3}"},{code:"ru-RU",label:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",flag:"\u{1F1F7}\u{1F1FA}"},{code:"ar-SA",label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",flag:"\u{1F1F8}\u{1F1E6}"}];preferencesService=g(L);voiceSynthesisService=g(z);themeService=g(me);ngOnInit(){let e=this.themeService.getCurrentTheme();this.selectedTheme=e.mode,this.selectedThemeVariant=e.variant,this.selectedVoiceLanguage=this.preferencesService.getVoiceLanguage(),this.useEnterToSend=this.preferencesService.getEnterToSend(),this.printTechnicalMessages=this.preferencesService.getPrintTechnicalMessages(),this.showTechnicalMessages=!this.preferencesService.getHideTechnicalMessages(),this.showWarningMessages=!this.preferencesService.getHideWarningMessages(),this.voiceInputMode=this.preferencesService.getVoiceInputMode(),this.voiceAnnounceEnabled=this.preferencesService.getVoiceAnnounceEnabled(),this.voiceMode=this.preferencesService.getVoiceMode(),this.voiceReadFullText=this.preferencesService.getVoiceReadFullText(),this.voiceVolume=Math.round(this.preferencesService.getVoiceVolume()*100),this.voiceRate=Math.round(this.preferencesService.getVoiceRate()*100),this.selectedVoiceId=this.preferencesService.getSelectedVoice(),this.agentNotificationEnabled=this.preferencesService.getAgentNotificationEnabled(),this.notificationSoundEnabled=this.preferencesService.getNotificationSoundEnabled(),this.browserNotificationEnabled=this.preferencesService.getBrowserNotificationEnabled(),this.missionPreviewEnabled=this.preferencesService.getMissionPreviewEnabled(),this.loadAvailableVoices(),this.themeService.currentTheme$.pipe(Vy(this.destroy$)).subscribe(t=>{this.selectedTheme=t.mode,this.selectedThemeVariant=t.variant;}),this.preferencesService.voiceLanguage$.pipe(Vy(this.destroy$)).subscribe(t=>{this.selectedVoiceLanguage=t;}),this.preferencesService.enterToSend$.pipe(Vy(this.destroy$)).subscribe(t=>{this.useEnterToSend=t;}),this.preferencesService.printTechnicalMessages$.pipe(Vy(this.destroy$)).subscribe(t=>{this.printTechnicalMessages=t;}),this.preferencesService.hideTechnicalMessages$.pipe(Vy(this.destroy$)).subscribe(t=>{this.showTechnicalMessages=!t;}),this.preferencesService.hideWarningMessages$.pipe(Vy(this.destroy$)).subscribe(t=>{this.showWarningMessages=!t;}),this.preferencesService.voiceInputMode$.pipe(Vy(this.destroy$)).subscribe(t=>{this.voiceInputMode=t;}),this.preferencesService.voiceAnnounceEnabled$.pipe(Vy(this.destroy$)).subscribe(t=>{this.voiceAnnounceEnabled=t;}),this.preferencesService.voiceMode$.pipe(Vy(this.destroy$)).subscribe(t=>{this.voiceMode=t;}),this.preferencesService.voiceReadFullText$.pipe(Vy(this.destroy$)).subscribe(t=>{this.voiceReadFullText=t;}),this.preferencesService.voiceVolume$.pipe(Vy(this.destroy$)).subscribe(t=>{this.voiceVolume=Math.round(t*100);}),this.preferencesService.voiceRate$.pipe(Vy(this.destroy$)).subscribe(t=>{this.voiceRate=Math.round(t*100);}),this.preferencesService.selectedVoice$.pipe(Vy(this.destroy$)).subscribe(t=>{this.selectedVoiceId=t;}),this.preferencesService.voiceLanguage$.pipe(Vy(this.destroy$)).subscribe(()=>{this.loadAvailableVoices();}),this.preferencesService.agentNotificationEnabled$.pipe(Vy(this.destroy$)).subscribe(t=>{this.agentNotificationEnabled=t;}),this.preferencesService.notificationSoundEnabled$.pipe(Vy(this.destroy$)).subscribe(t=>{this.notificationSoundEnabled=t;}),this.preferencesService.browserNotificationEnabled$.pipe(Vy(this.destroy$)).subscribe(t=>{this.browserNotificationEnabled=t,this.checkNotificationPermission();}),this.preferencesService.missionPreviewEnabled$.pipe(Vy(this.destroy$)).subscribe(t=>{this.missionPreviewEnabled=t;});}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete();}onThemeChange(){console.log("[OPTIONS] Theme changed to:",this.selectedTheme),this.themeService.setTheme({variant:this.selectedThemeVariant,mode:this.selectedTheme});}onVoiceLanguageChange(){console.log("[OPTIONS] Voice language changed to:",this.selectedVoiceLanguage),this.preferencesService.setVoiceLanguage(this.selectedVoiceLanguage);}onEnterToSendChange(){console.log("[OPTIONS] Enter to send changed to:",this.useEnterToSend),this.preferencesService.setEnterToSend(this.useEnterToSend);}onPrintTechnicalMessagesChange(){console.log("[OPTIONS] Print technical messages changed to:",this.printTechnicalMessages),this.preferencesService.setPrintTechnicalMessages(this.printTechnicalMessages);}onShowTechnicalMessagesChange(){let e=!this.showTechnicalMessages;console.log("[OPTIONS] Show technical messages changed to:",this.showTechnicalMessages,"(hide:",e,")"),this.preferencesService.setHideTechnicalMessages(e);}onShowWarningMessagesChange(){let e=!this.showWarningMessages;console.log("[OPTIONS] Show warning messages changed to:",this.showWarningMessages,"(hide:",e,")"),this.preferencesService.setHideWarningMessages(e);}onVoiceInputModeChange(e){let t=e.target.value;console.log("[OPTIONS] Voice input mode changed to:",t),this.preferencesService.setVoiceInputMode(t);}onVoiceAnnounceEnabledChange(){console.log("[OPTIONS] Voice announce enabled changed to:",this.voiceAnnounceEnabled),this.preferencesService.setVoiceAnnounceEnabled(this.voiceAnnounceEnabled);}onVoiceModeChange(){console.log("[OPTIONS] Voice mode changed to:",this.voiceMode),this.preferencesService.setVoiceMode(this.voiceMode);}onVoiceReadFullTextChange(){console.log("[OPTIONS] Voice read full text changed to:",this.voiceReadFullText),this.preferencesService.setVoiceReadFullText(this.voiceReadFullText);}onVoiceVolumeChange(){let e=this.voiceVolume/100;console.log("[OPTIONS] Voice volume changed to:",e),this.preferencesService.setVoiceVolume(e);}onVoiceRateChange(){let e=this.voiceRate/100;console.log("[OPTIONS] Voice rate changed to:",e),this.preferencesService.setVoiceRate(e);}loadAvailableVoices(){return dt$1(this,null,function*(){this.loadingVoices=true;try{this.availableVoices=yield this.voiceSynthesisService.getVoicesForLanguage(),console.log("[OPTIONS] Loaded",this.availableVoices.length,"voices for current language");}catch(e){console.error("[OPTIONS] Error loading voices:",e),this.availableVoices=[];}finally{this.loadingVoices=false;}})}onSelectedVoiceChange(){console.log("[OPTIONS] Selected voice changed to:",this.selectedVoiceId),this.preferencesService.setSelectedVoice(this.selectedVoiceId);}testVoice(){console.log("[OPTIONS] Testing voice with current settings"),this.voiceSynthesisService.testSelectedVoice();}onAgentNotificationEnabledChange(){console.log("[OPTIONS] Agent notification enabled changed to:",this.agentNotificationEnabled),this.preferencesService.setAgentNotificationEnabled(this.agentNotificationEnabled);}onNotificationSoundEnabledChange(){console.log("[OPTIONS] Notification sound enabled changed to:",this.notificationSoundEnabled),this.preferencesService.setNotificationSoundEnabled(this.notificationSoundEnabled);}onBrowserNotificationEnabledChange(){console.log("[OPTIONS] Browser notification enabled changed to:",this.browserNotificationEnabled),this.preferencesService.setBrowserNotificationEnabled(this.browserNotificationEnabled);}onMissionPreviewEnabledChange(){console.log("[OPTIONS] Mission preview panel enabled changed to:",this.missionPreviewEnabled),this.preferencesService.setMissionPreviewEnabled(this.missionPreviewEnabled);}checkNotificationPermission(){"Notification"in window&&(this.browserNotificationDenied=Notification.permission==="denied",console.log("[OPTIONS] Notification permission status:",Notification.permission));}static \u0275fac=function(t){return new(t||c)};static \u0275cmp=Rw({type:c,selectors:[["app-options-panel"]],decls:168,vars:37,consts:[[1,"options-content"],[1,"option-section"],[1,"section-title"],[1,"option-group"],[1,"radio-group"],[1,"option-radio"],["type","radio","name","theme","value","light",3,"ngModelChange","change","ngModel"],[1,"radio-mark"],["type","radio","name","theme","value","dark",3,"ngModelChange","change","ngModel"],["type","radio","name","theme","value","system",3,"ngModelChange","change","ngModel"],[1,"option-label"],["type","radio","name","enterBehavior",3,"ngModelChange","change","value","ngModel"],[1,"toggle-option"],["color","primary",3,"ngModelChange","change","ngModel"],[1,"option-label-with-hint"],[1,"option-hint"],["color","primary",3,"ngModelChange","change","ngModel","disabled"],[1,"notification-error"],["for","voice-input-mode-select",1,"option-label"],["id","voice-input-mode-select",1,"option-select",3,"change","value"],["value","browser"],["value","whisper"],["value","voice-message"],["for","voice-language-select",1,"option-label"],["id","voice-language-select",1,"option-select",3,"ngModelChange","change","ngModel"],[3,"value"],["type","radio","name","voiceAnnounce",3,"ngModelChange","change","value","ngModel"],["type","radio","name","voiceMode","value","speech",3,"ngModelChange","change","ngModel"],["type","radio","name","voiceMode","value","notification",3,"ngModelChange","change","ngModel"],["type","radio","name","voiceReadFull",3,"ngModelChange","change","value","ngModel"],["for","voice-select",1,"option-label"],["id","voice-select",1,"option-select",3,"ngModelChange","change","ngModel","disabled"],["value",""],["role","button","tabindex","0","title","Test voice with current settings",1,"test-voice-link",3,"click"],[1,"thread-name"],["for","voice-volume-slider",1,"option-label"],["id","voice-volume-slider","type","range","min","0","max","100","step","5",1,"option-slider",3,"ngModelChange","input","ngModel"],["for","voice-rate-slider",1,"option-label"],["id","voice-rate-slider","type","range","min","50","max","200","step","10",1,"option-slider",3,"ngModelChange","input","ngModel"],[1,"error-icon"],[1,"error-message"]],template:function(t,n){t&1&&(Is(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-icon"),qC(4,"palette"),pl(),Is(5,"span"),qC(6,"Appearance"),pl()(),Is(7,"div",3)(8,"div",4)(9,"label",5)(10,"input",6),Jg("ngModelChange",function(o){return XC(n.selectedTheme,o)||(n.selectedTheme=o),o}),Ag("change",function(){return n.onThemeChange()}),pl(),UI(),bg(11,"span",7),qC(12," Light "),pl(),Is(13,"label",5)(14,"input",8),Jg("ngModelChange",function(o){return XC(n.selectedTheme,o)||(n.selectedTheme=o),o}),Ag("change",function(){return n.onThemeChange()}),pl(),UI(),bg(15,"span",7),qC(16," Dark "),pl(),Is(17,"label",5)(18,"input",9),Jg("ngModelChange",function(o){return XC(n.selectedTheme,o)||(n.selectedTheme=o),o}),Ag("change",function(){return n.onThemeChange()}),pl(),UI(),bg(19,"span",7),qC(20," System "),pl()()()(),Is(21,"div",1)(22,"div",2)(23,"mat-icon"),qC(24,"chat_bubble_outline"),pl(),Is(25,"span"),qC(26,"Messaging"),pl()(),Is(27,"div",3)(28,"span",10),qC(29,"Send message behavior:"),pl(),Is(30,"div",4)(31,"label",5)(32,"input",11),Jg("ngModelChange",function(o){return XC(n.useEnterToSend,o)||(n.useEnterToSend=o),o}),Ag("change",function(){return n.onEnterToSendChange()}),pl(),UI(),bg(33,"span",7),qC(34," Enter to send "),pl(),Is(35,"label",5)(36,"input",11),Jg("ngModelChange",function(o){return XC(n.useEnterToSend,o)||(n.useEnterToSend=o),o}),Ag("change",function(){return n.onEnterToSendChange()}),pl(),UI(),bg(37,"span",7),qC(38," Enter for new line "),pl()()(),Is(39,"div",3)(40,"div",12)(41,"span",10),qC(42,"Show technical messages"),pl(),Is(43,"mat-slide-toggle",13),Jg("ngModelChange",function(o){return XC(n.showTechnicalMessages,o)||(n.showTechnicalMessages=o),o}),Ag("change",function(){return n.onShowTechnicalMessagesChange()}),pl(),UI(),pl()(),Is(44,"div",3)(45,"div",12)(46,"span",10),qC(47,"Show warning messages"),pl(),Is(48,"mat-slide-toggle",13),Jg("ngModelChange",function(o){return XC(n.showWarningMessages,o)||(n.showWarningMessages=o),o}),Ag("change",function(){return n.onShowWarningMessagesChange()}),pl(),UI(),pl()(),Is(49,"div",3)(50,"div",12)(51,"span",10),qC(52,"Include technical messages in print"),pl(),Is(53,"mat-slide-toggle",13),Jg("ngModelChange",function(o){return XC(n.printTechnicalMessages,o)||(n.printTechnicalMessages=o),o}),Ag("change",function(){return n.onPrintTechnicalMessagesChange()}),pl(),UI(),pl()()(),Is(54,"div",1)(55,"div",2)(56,"mat-icon"),qC(57,"rocket_launch"),pl(),Is(58,"span"),qC(59,"Mission Control"),pl()(),Is(60,"div",3)(61,"div",12)(62,"div",14)(63,"span",10),qC(64,"Side-by-side thread preview"),pl(),Is(65,"span",15),qC(66,"Click a mission card to open a preview panel. Recommended for large screens."),pl()(),Is(67,"mat-slide-toggle",13),Jg("ngModelChange",function(o){return XC(n.missionPreviewEnabled,o)||(n.missionPreviewEnabled=o),o}),Ag("change",function(){return n.onMissionPreviewEnabledChange()}),pl(),UI(),pl()()(),Is(68,"div",1)(69,"div",2)(70,"mat-icon"),qC(71,"notifications"),pl(),Is(72,"span"),qC(73,"Notifications"),pl()(),Is(74,"div",3)(75,"div",12)(76,"span",10),qC(77,"Notify when the agent answers or requests input"),pl(),Is(78,"mat-slide-toggle",13),Jg("ngModelChange",function(o){return XC(n.agentNotificationEnabled,o)||(n.agentNotificationEnabled=o),o}),Ag("change",function(){return n.onAgentNotificationEnabledChange()}),pl(),UI(),pl()(),Is(79,"div",3)(80,"div",12)(81,"span",10),qC(82,"Notification sound"),pl(),Is(83,"mat-slide-toggle",16),Jg("ngModelChange",function(o){return XC(n.notificationSoundEnabled,o)||(n.notificationSoundEnabled=o),o}),Ag("change",function(){return n.onNotificationSoundEnabledChange()}),pl(),UI(),pl()(),Is(84,"div",3)(85,"div",12)(86,"span",10),qC(87,"Browser notification"),pl(),Is(88,"mat-slide-toggle",16),Jg("ngModelChange",function(o){return XC(n.browserNotificationEnabled,o)||(n.browserNotificationEnabled=o),o}),Ag("change",function(){return n.onBrowserNotificationEnabledChange()}),pl(),UI(),pl(),tC(89,st,5,0,"div",17),pl()(),Is(90,"div",1)(91,"div",2)(92,"mat-icon"),qC(93,"record_voice_over"),pl(),Is(94,"span"),qC(95,"Voice & Speech"),pl()(),Is(96,"div",3)(97,"label",18),qC(98,"Voice input method:"),pl(),Is(99,"select",19),Ag("change",function(o){return n.onVoiceInputModeChange(o)}),Is(100,"option",20),qC(101,"Browser (real-time)"),pl(),Is(102,"option",21),qC(103,"Whisper (higher accuracy)"),pl(),Is(104,"option",22),qC(105,"Voice message (send audio)"),pl()()(),Is(106,"div",3)(107,"label",23),qC(108,"Voice recognition language:"),pl(),Is(109,"select",24),Jg("ngModelChange",function(o){return XC(n.selectedVoiceLanguage,o)||(n.selectedVoiceLanguage=o),o}),Ag("change",function(){return n.onVoiceLanguageChange()}),iC(110,ct,2,3,"option",25,rt),pl(),UI(),pl(),Is(112,"div",3)(113,"span",10),qC(114,"Automatic announcement:"),pl(),Is(115,"div",4)(116,"label",5)(117,"input",26),Jg("ngModelChange",function(o){return XC(n.voiceAnnounceEnabled,o)||(n.voiceAnnounceEnabled=o),o}),Ag("change",function(){return n.onVoiceAnnounceEnabledChange()}),pl(),UI(),bg(118,"span",7),qC(119," Enabled "),pl(),Is(120,"label",5)(121,"input",26),Jg("ngModelChange",function(o){return XC(n.voiceAnnounceEnabled,o)||(n.voiceAnnounceEnabled=o),o}),Ag("change",function(){return n.onVoiceAnnounceEnabledChange()}),pl(),UI(),bg(122,"span",7),qC(123," Disabled "),pl()()(),Is(124,"div",3)(125,"span",10),qC(126,"Voice mode:"),pl(),Is(127,"div",4)(128,"label",5)(129,"input",27),Jg("ngModelChange",function(o){return XC(n.voiceMode,o)||(n.voiceMode=o),o}),Ag("change",function(){return n.onVoiceModeChange()}),pl(),UI(),bg(130,"span",7),qC(131," Voice synthesis "),pl(),Is(132,"label",5)(133,"input",28),Jg("ngModelChange",function(o){return XC(n.voiceMode,o)||(n.voiceMode=o),o}),Ag("change",function(){return n.onVoiceModeChange()}),pl(),UI(),bg(134,"span",7),qC(135," Sound notification "),pl()()(),Is(136,"div",3)(137,"span",10),qC(138,"Message reading:"),pl(),Is(139,"div",4)(140,"label",5)(141,"input",29),Jg("ngModelChange",function(o){return XC(n.voiceReadFullText,o)||(n.voiceReadFullText=o),o}),Ag("change",function(){return n.onVoiceReadFullTextChange()}),pl(),UI(),bg(142,"span",7),qC(143," Full message "),pl(),Is(144,"label",5)(145,"input",29),Jg("ngModelChange",function(o){return XC(n.voiceReadFullText,o)||(n.voiceReadFullText=o),o}),Ag("change",function(){return n.onVoiceReadFullTextChange()}),pl(),UI(),bg(146,"span",7),qC(147," First paragraphs only "),pl()()(),Is(148,"div",3)(149,"label",30),qC(150,"Selected voice:"),pl(),Is(151,"select",31),Jg("ngModelChange",function(o){return XC(n.selectedVoiceId,o)||(n.selectedVoiceId=o),o}),Ag("change",function(){return n.onSelectedVoiceChange()}),tC(152,lt,2,0,"option",32),tC(153,dt,2,0,"option",32),iC(154,pt,2,2,"option",25,at),pl(),UI(),bg(156,"div",10),Is(157,"a",33),Ag("click",function(){return n.testVoice()}),Is(158,"span",34),qC(159,"Test voice"),pl()()(),Is(160,"div",3)(161,"label",35),qC(162),pl(),Is(163,"input",36),Jg("ngModelChange",function(o){return XC(n.voiceVolume,o)||(n.voiceVolume=o),o}),Ag("input",function(){return n.onVoiceVolumeChange()}),pl(),UI(),pl(),Is(164,"div",3)(165,"label",37),qC(166),pl(),Is(167,"input",38),Jg("ngModelChange",function(o){return XC(n.voiceRate,o)||(n.voiceRate=o),o}),Ag("input",function(){return n.onVoiceRateChange()}),pl(),UI(),pl()()()),t&2&&(JE(10),Xg("ngModel",n.selectedTheme),zI(),JE(4),Xg("ngModel",n.selectedTheme),zI(),JE(4),Xg("ngModel",n.selectedTheme),zI(),JE(14),Tg("value",true),Xg("ngModel",n.useEnterToSend),zI(),JE(4),Tg("value",false),Xg("ngModel",n.useEnterToSend),zI(),JE(7),Xg("ngModel",n.showTechnicalMessages),zI(),JE(5),Xg("ngModel",n.showWarningMessages),zI(),JE(5),Xg("ngModel",n.printTechnicalMessages),zI(),JE(14),Xg("ngModel",n.missionPreviewEnabled),zI(),JE(11),Xg("ngModel",n.agentNotificationEnabled),zI(),JE(5),Xg("ngModel",n.notificationSoundEnabled),Tg("disabled",!n.agentNotificationEnabled),zI(),JE(5),Xg("ngModel",n.browserNotificationEnabled),Tg("disabled",!n.agentNotificationEnabled||n.browserNotificationDenied),zI(),JE(),nC(n.browserNotificationDenied?89:-1),JE(10),Tg("value",n.voiceInputMode),JE(10),Xg("ngModel",n.selectedVoiceLanguage),zI(),JE(),sC(n.voiceLanguageOptions),JE(7),Tg("value",true),Xg("ngModel",n.voiceAnnounceEnabled),zI(),JE(4),Tg("value",false),Xg("ngModel",n.voiceAnnounceEnabled),zI(),JE(8),Xg("ngModel",n.voiceMode),zI(),JE(4),Xg("ngModel",n.voiceMode),zI(),JE(8),Tg("value",true),Xg("ngModel",n.voiceReadFullText),zI(),JE(4),Tg("value",false),Xg("ngModel",n.voiceReadFullText),zI(),JE(6),Xg("ngModel",n.selectedVoiceId),Tg("disabled",n.loadingVoices||n.availableVoices.length===0),zI(),JE(),nC(n.loadingVoices?152:-1),JE(),nC(!n.loadingVoices&&n.availableVoices.length===0?153:-1),JE(),sC(n.availableVoices),JE(8),vl("Volume: ",n.voiceVolume,"%"),JE(),Xg("ngModel",n.voiceVolume),zI(),JE(3),vl("Speed: ",n.voiceRate,"%"),JE(),Xg("ngModel",n.voiceRate),zI());},dependencies:[ti,Qn,ei,Ye$1,_n,At,mn,Zn,cn,wt,se],styles:['.options-content[_ngcontent-%COMP%]{padding:0;width:100%}.option-group[_ngcontent-%COMP%]{padding:0 1rem 1rem;margin-bottom:1rem;border-bottom:1px solid var(--color-border-light)}.option-group[_ngcontent-%COMP%]:last-child{margin-bottom:0;padding-bottom:0;border-bottom:none}.option-label[_ngcontent-%COMP%]{display:block;margin-bottom:.5rem;font-weight:500;color:var(--color-text);font-size:.875rem}.toggle-option[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:1rem}.toggle-option[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{margin-bottom:0;flex:1}.toggle-option[_ngcontent-%COMP%] mat-slide-toggle[_ngcontent-%COMP%]{flex-shrink:0}.option-label-with-hint[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1}.option-label-with-hint[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{margin-bottom:0}.option-label-with-hint[_ngcontent-%COMP%] .option-hint[_ngcontent-%COMP%]{font-size:.775rem;color:var(--color-text-secondary);line-height:1.4}.option-select[_ngcontent-%COMP%]{width:100%;padding:.5rem;border:1px solid var(--color-border);border-radius:4px;background:var(--color-input-bg);color:var(--color-text);font-size:.875rem;cursor:pointer}.option-select[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--color-primary);box-shadow:0 0 0 3px #7064fb1a}.option-select[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.option-select[_ngcontent-%COMP%] option[_ngcontent-%COMP%]{padding:.5rem}.option-checkbox[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;font-size:.875rem;color:var(--color-text);-webkit-user-select:none;user-select:none}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.option-checkbox[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{width:18px;height:18px;border:2px solid var(--color-border);border-radius:3px;margin-right:.75rem;display:flex;align-items:center;justify-content:center;transition:all .2s ease;flex-shrink:0}.option-checkbox[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]:after{content:"";width:10px;height:6px;border-left:2px solid transparent;border-bottom:2px solid transparent;transform:rotate(-45deg);transition:all .2s ease;opacity:0}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + .checkmark[_ngcontent-%COMP%]{background-color:var(--color-primary);border-color:var(--color-primary)}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + .checkmark[_ngcontent-%COMP%]:after{border-left-color:#fff;border-bottom-color:#fff;opacity:1}.option-checkbox[_ngcontent-%COMP%]:hover .checkmark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-checkbox[_ngcontent-%COMP%]:focus-within .checkmark[_ngcontent-%COMP%]{box-shadow:0 0 0 3px #7064fb1a}.option-section[_ngcontent-%COMP%]{padding-top:1rem;margin-top:1rem;border-top:2px solid var(--color-border)}.option-section[_ngcontent-%COMP%]:first-child{border-top:none;padding-top:0;margin-top:0}.section-title[_ngcontent-%COMP%]{margin:0 0 1rem;padding:0 1rem;font-size:.9rem;font-weight:600;color:var(--color-text);display:flex;align-items:center;gap:.5rem}.section-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.option-radio[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;font-size:.875rem;color:var(--color-text);-webkit-user-select:none;user-select:none}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{display:none}.option-radio[_ngcontent-%COMP%] .radio-mark[_ngcontent-%COMP%]{width:16px;height:16px;border:2px solid var(--color-border);border-radius:50%;margin-right:.5rem;display:flex;align-items:center;justify-content:center;transition:all .2s ease;flex-shrink:0;position:relative}.option-radio[_ngcontent-%COMP%] .radio-mark[_ngcontent-%COMP%]:after{content:"";width:8px;height:8px;border-radius:50%;background-color:var(--color-primary);transition:all .2s ease;opacity:0;transform:scale(0)}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .radio-mark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .radio-mark[_ngcontent-%COMP%]:after{opacity:1;transform:scale(1)}.option-radio[_ngcontent-%COMP%]:hover .radio-mark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-radio[_ngcontent-%COMP%]:focus-within .radio-mark[_ngcontent-%COMP%]{box-shadow:0 0 0 3px #7064fb1a}.option-slider[_ngcontent-%COMP%]{width:100%;height:6px;border-radius:3px;background:var(--color-bg-solid);outline:none;cursor:pointer;-webkit-appearance:none;appearance:none}.option-slider[_ngcontent-%COMP%]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;border-radius:50%;background:var(--color-primary);cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003;transition:all .2s ease}.option-slider[_ngcontent-%COMP%]::-webkit-slider-thumb:hover{transform:scale(1.1);box-shadow:0 2px 8px #0000004d}.option-slider[_ngcontent-%COMP%]::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:var(--color-primary);cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003;transition:all .2s ease}.option-slider[_ngcontent-%COMP%]::-moz-range-thumb:hover{transform:scale(1.1);box-shadow:0 2px 8px #0000004d}.option-slider[_ngcontent-%COMP%]::-webkit-slider-track{height:6px;border-radius:3px;background:var(--color-bg-secondary)}.option-slider[_ngcontent-%COMP%]::-moz-range-track{height:6px;border-radius:3px;background:var(--color-bg-secondary);border:none}.option-slider[_ngcontent-%COMP%]:focus{outline:none}.option-slider[_ngcontent-%COMP%]:focus::-webkit-slider-thumb{box-shadow:0 0 0 3px #7064fb4d,0 2px 6px #0003}.option-slider[_ngcontent-%COMP%]:focus::-moz-range-thumb{box-shadow:0 0 0 3px #7064fb4d,0 2px 6px #0003}.test-voice-btn[_ngcontent-%COMP%]{width:100%;padding:.75rem 1rem;background:var(--color-primary);color:#fff;border:none;border-radius:6px;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center;gap:.5rem}.test-voice-btn[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover);transform:translateY(-1px);box-shadow:0 2px 8px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:active{transform:translateY(0);box-shadow:0 1px 4px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:focus{outline:none;box-shadow:0 0 0 3px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:disabled{background:var(--color-bg-secondary);color:var(--color-text-secondary);cursor:not-allowed;transform:none;box-shadow:none}.test-voice-link[_ngcontent-%COMP%]{text-decoration-thickness:1.5px;text-underline-offset:3px;background:transparent;border:none;padding:0;font-size:.775rem;font-weight:400;cursor:pointer;transition:all .2s ease;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;text-decoration:underline}.test-voice-link[_ngcontent-%COMP%]:hover{color:var(--color-primary-hover, var(--color-primary));text-decoration-thickness:2px}.test-voice-link[_ngcontent-%COMP%]:active{opacity:.8}.test-voice-link[_ngcontent-%COMP%]:focus{outline:2px solid var(--color-primary);outline-offset:2px}.test-voice-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.notification-error[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;padding:.75rem;margin-top:.75rem;background-color:#d32f2f1a;border:1px solid rgba(211,47,47,.3);border-radius:6px;font-size:.8125rem;line-height:1.5}.notification-error[_ngcontent-%COMP%] .error-icon[_ngcontent-%COMP%]{color:#d32f2f;font-size:20px;width:20px;height:20px;flex-shrink:0;margin-top:2px}.notification-error[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{color:var(--color-text);flex:1}.notification-error[_ngcontent-%COMP%]{margin-top:.75rem;padding:.75rem;background-color:#f443361a;border:1px solid rgba(244,67,54,.3);border-radius:6px;display:flex;align-items:flex-start;gap:.5rem}.notification-error[_ngcontent-%COMP%] .error-icon[_ngcontent-%COMP%]{color:#f44336;font-size:20px;width:20px;height:20px;flex-shrink:0;margin-top:2px}.notification-error[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text);line-height:1.5;flex:1}'],changeDetection:1})};function Qe(c){let e=c.args??"",t;try{let n=JSON.parse(e);t=JSON.stringify(n,null,2);}catch(n){t=e;}return `\u{1F527} ${c.name}
|
|
179
179
|
|
|
180
|
-
${t}`}var Ge=class c{destroy$=new ce;currentProject=null;currentThread=null;messagesSubject=new Tr([]);isThinkingSubject=new Tr(false);currentChoiceSubject=new Tr(null);projectTitleSubject=new Tr("Coday");currentInviteEventSubject=new Tr(null);messageToRestoreSubject=new Tr("");threadUpdateEventSubject=new Tr(null);currentChoiceEvent=null;thinkingTimeout=null;accumulatedChunks="";streamingTextSubject=new Tr("");subThreadEventsSubject=new ce;subThreadEvents$=this.subThreadEventsSubject.asObservable();subThreadEventBuffers=new Map;getBufferedSubThreadEvents(e){return this.subThreadEventBuffers.get(e)??[]}messages$=this.messagesSubject.asObservable();streamingText$=this.streamingTextSubject.asObservable();isThinking$=this.isThinkingSubject.asObservable();currentChoice$=this.currentChoiceSubject.asObservable();currentInviteEvent$=this.currentInviteEventSubject.asObservable();messageToRestore$=this.messageToRestoreSubject.asObservable();threadUpdateEvent$=this.threadUpdateEventSubject.asObservable();connectionStatus$;tabTitleService=null;eventStream=g(fe);messageApi=g(be);userService=g(pe);constructor(){this.connectionStatus$=this.eventStream.connectionStatus$,this.initializeEventHandling();}setTabTitleService(e){this.tabTitleService=e;}connectToThread(e,t){this.currentProject=e,this.currentThread=t,this.eventStream.connectToThread(e,t);}loadHistoryFromRest(e){for(let t of e){let n=le(t);n&&this.handleEvent(n);}}resetMessages(){this.messagesSubject.next([]),this.currentChoiceSubject.next(null),this.currentInviteEventSubject.next(null),this.currentChoiceEvent=null,this.accumulatedChunks="",this.streamingTextSubject.next(""),this.subThreadEventBuffers.clear(),this.stopThinking();}sendMessage(e){if(!this.currentProject||!this.currentThread){console.error("[CODAY] Cannot send message: no project or thread selected");return}let t=this.currentInviteEventSubject.value;if(t){this.isThinkingSubject.next(true),this.tabTitleService?.setSystemActive(),this.currentInviteEventSubject.next(null);let n=t.buildAnswer(e);this.messageApi.sendMessage(n).subscribe({error:i=>{console.error("[CODAY] Send invite answer error:",i),this.currentInviteEventSubject.next(t),this.stopThinking();}});}else this.messageApi.sendFreeMessage(e).subscribe({error:n=>{console.error("[CODAY] Send error:",n);}});}sendChoice(e){if(!this.currentProject||!this.currentThread){console.error("[CODAY] Cannot send choice: no project or thread selected");return}if(this.currentChoiceEvent){this.isThinkingSubject.next(true),this.tabTitleService?.setSystemActive();let t=this.currentChoiceEvent.buildAnswer(e);this.currentChoiceSubject.next(null),this.currentChoiceEvent=null,this.messageApi.sendMessage(t).subscribe({next:()=>{},error:n=>{console.error("[CODAY-CHOICE] Choice error:",n),this.stopThinking();}});}else console.error("[CODAY-CHOICE] No choice event available for choice:",e);}deleteMessage(e){let t=this.messagesSubject.value.find(i=>i.id===e),n=this.extractTextContentFromMessage(t);return this.messageApi.deleteMessage(e).pipe(Od(i=>{i.success&&(this.removeMessagesFromIndex(e),n.trim()&&this.messageToRestoreSubject.next(n));}))}getCurrentProjectTitle(){return this.projectTitleSubject.value}getCurrentInviteEvent(){return this.currentInviteEventSubject.value}setThinkingForPendingMessage(){this.isThinkingSubject.next(true),this.tabTitleService?.setSystemActive();}initializeEventHandling(){this.eventStream.events$.pipe(Vy(this.destroy$)).subscribe({next:e=>this.handleEvent(e),error:e=>console.error("[CODAY] Event stream error:",e),complete:()=>console.log("[CODAY] Event stream completed")});}handleEvent(e){if(e.threadId&&e.threadId!==this.currentThread){let
|
|
180
|
+
${t}`}var Ge=class c{destroy$=new ce;currentProject=null;currentThread=null;messagesSubject=new Tr([]);isThinkingSubject=new Tr(false);currentChoiceSubject=new Tr(null);projectTitleSubject=new Tr("Coday");currentInviteEventSubject=new Tr(null);messageToRestoreSubject=new Tr("");threadUpdateEventSubject=new Tr(null);currentChoiceEvent=null;thinkingTimeout=null;accumulatedChunks="";streamingTextSubject=new Tr("");subThreadEventsSubject=new ce;subThreadEvents$=this.subThreadEventsSubject.asObservable();subThreadEventBuffers=new Map;getBufferedSubThreadEvents(e){return this.subThreadEventBuffers.get(e)??[]}messages$=this.messagesSubject.asObservable();streamingText$=this.streamingTextSubject.asObservable();isThinking$=this.isThinkingSubject.asObservable();currentChoice$=this.currentChoiceSubject.asObservable();currentInviteEvent$=this.currentInviteEventSubject.asObservable();messageToRestore$=this.messageToRestoreSubject.asObservable();threadUpdateEvent$=this.threadUpdateEventSubject.asObservable();connectionStatus$;tabTitleService=null;eventStream=g(fe);messageApi=g(be);userService=g(pe);constructor(){this.connectionStatus$=this.eventStream.connectionStatus$,this.initializeEventHandling();}setTabTitleService(e){this.tabTitleService=e;}connectToThread(e,t){this.currentProject=e,this.currentThread=t,this.eventStream.connectToThread(e,t);}loadHistoryFromRest(e){for(let t of e){let n=le(t);n&&this.handleEvent(n,true);}}resetMessages(){this.messagesSubject.next([]),this.currentChoiceSubject.next(null),this.currentInviteEventSubject.next(null),this.currentChoiceEvent=null,this.accumulatedChunks="",this.streamingTextSubject.next(""),this.subThreadEventBuffers.clear(),this.stopThinking();}sendMessage(e){if(!this.currentProject||!this.currentThread){console.error("[CODAY] Cannot send message: no project or thread selected");return}let t=this.currentInviteEventSubject.value;if(t){this.clearThinkingTimeout(),this.isThinkingSubject.next(true),this.thinkingTimeout=setTimeout(()=>{this.thinkingTimeout=null,this.stopThinking(),console.warn("[CODAY] Safety timeout: no server response after 30 s, releasing thinking state");},3e4),this.tabTitleService?.setSystemActive(),this.currentInviteEventSubject.next(null);let n=t.buildAnswer(e);this.messageApi.sendMessage(n).subscribe({error:i=>{console.error("[CODAY] Send invite answer error:",i),this.currentInviteEventSubject.next(t),this.stopThinking();}});}else this.messageApi.sendFreeMessage(e).subscribe({error:n=>{console.error("[CODAY] Send error:",n);}});}sendChoice(e){if(!this.currentProject||!this.currentThread){console.error("[CODAY] Cannot send choice: no project or thread selected");return}if(this.currentChoiceEvent){this.clearThinkingTimeout(),this.isThinkingSubject.next(true),this.thinkingTimeout=setTimeout(()=>{this.thinkingTimeout=null,this.stopThinking(),console.warn("[CODAY] Safety timeout: no server response after 30 s, releasing thinking state");},3e4),this.tabTitleService?.setSystemActive();let t=this.currentChoiceEvent.buildAnswer(e);this.currentChoiceSubject.next(null),this.currentChoiceEvent=null,this.messageApi.sendMessage(t).subscribe({next:()=>{},error:n=>{console.error("[CODAY-CHOICE] Choice error:",n),this.stopThinking();}});}else console.error("[CODAY-CHOICE] No choice event available for choice:",e);}deleteMessage(e){let t=this.messagesSubject.value.find(i=>i.id===e),n=this.extractTextContentFromMessage(t);return this.messageApi.deleteMessage(e).pipe(Od(i=>{i.success&&(this.removeMessagesFromIndex(e),n.trim()&&this.messageToRestoreSubject.next(n));}))}getCurrentProjectTitle(){return this.projectTitleSubject.value}getCurrentInviteEvent(){return this.currentInviteEventSubject.value}setThinkingForPendingMessage(){this.isThinkingSubject.next(true),this.tabTitleService?.setSystemActive();}initializeEventHandling(){this.eventStream.events$.pipe(Vy(this.destroy$)).subscribe({next:e=>this.handleEvent(e),error:e=>console.error("[CODAY] Event stream error:",e),complete:()=>console.log("[CODAY] Event stream completed")});}handleEvent(e,t=false){if(e.threadId&&e.threadId!==this.currentThread){let n=this.subThreadEventBuffers.get(e.threadId);n?n.push(e):this.subThreadEventBuffers.set(e.threadId,[e]),this.subThreadEventsSubject.next(e);return}e instanceof T?this.handleMessageEvent(e):e instanceof B?this.handleTextChunkEvent(e):e instanceof A?this.handleTextEvent(e):e instanceof u?this.handleAnswerEvent(e):e instanceof h?this.handleErrorEvent(e):e instanceof M?this.handleWarnEvent(e):e instanceof O?this.handleThinkingEvent(e):e instanceof v?this.handleToolRequestEvent(e):e instanceof m?this.handleToolResponseEvent(e):e instanceof b?this.handleChoiceEvent(e,t):e instanceof F?this.handleHeartBeatEvent(e):e instanceof f?this.handleInviteEvent(e,t):e instanceof V?this.handleThreadUpdateEvent(e):e instanceof R?this.handleDelegationEvent(e):e instanceof H||e instanceof K||console.warn("[CODAY] Unhandled event type:",e.type);}handleDelegationEvent(e){if(console.log("[CODAY] DelegationEvent received:",e.subThreadId,e.agentName),this.messagesSubject.value.findIndex(i=>i.subThreadId===e.subThreadId)===-1){let i={id:e.timestamp,role:"system",speaker:e.agentName,content:[{type:"text",content:""}],timestamp:new Date,type:"delegation",subThreadId:e.subThreadId,delegationAgentName:e.agentName};this.addMessage(i);}}handleThreadUpdateEvent(e){this.threadUpdateEventSubject.next(e);}handleMessageEvent(e){e.role==="assistant"&&this.accumulatedChunks&&(this.accumulatedChunks="",this.streamingTextSubject.next(""));let t={id:e.timestamp,role:e.role,speaker:e.name,content:e.content,timestamp:e.date,type:"text"};this.addMessage(t);}handleTextChunkEvent(e){this.accumulatedChunks+=e.chunk,this.streamingTextSubject.next(this.accumulatedChunks);}handleTextEvent(e){let t={id:e.timestamp,role:e.speaker?"assistant":"system",speaker:e.speaker??"System",content:[{type:"text",content:e.text}],timestamp:e.date,type:e.speaker?"text":"technical"};this.addMessage(t);}handleAnswerEvent(e){let t=this.currentInviteEventSubject.value;if(t){let i=!!e.parentKey&&e.parentKey===t.timestamp,o=!e.parentKey&&e.date>=t.date;(i||o)&&this.currentInviteEventSubject.next(null);}if(this.currentChoiceEvent){let i=!!e.parentKey&&e.parentKey===this.currentChoiceEvent.timestamp,o=!e.parentKey&&e.date>=this.currentChoiceEvent.date;(i||o)&&(this.currentChoiceEvent=null,this.currentChoiceSubject.next(null));}if(e.silent)return;let n={id:e.timestamp,role:"user",speaker:e.name??this.userService.getUsername()??"User",content:[{type:"text",content:e.answer}],timestamp:e.date,type:"text",parentKey:e.parentKey,invite:e.invite};this.addMessage(n);}handleErrorEvent(e){let t={id:e.timestamp,role:"system",speaker:"System",content:[{type:"text",content:`Error: ${JSON.stringify(e.error)}`}],timestamp:e.date,type:"error"};this.addMessage(t);}handleWarnEvent(e){let t={id:e.timestamp,role:"system",speaker:"System",content:[{type:"text",content:`Warning: ${JSON.stringify(e.warning)}`}],timestamp:e.date,type:"warning"};this.addMessage(t);}handleThinkingEvent(e){this.currentInviteEventSubject.value||this.currentChoiceEvent||(this.clearThinkingTimeout(),this.isThinkingSubject.next(true),this.tabTitleService?.setSystemActive(),this.thinkingTimeout=setTimeout(()=>{this.isThinkingSubject.next(false),this.thinkingTimeout=null,this.tabTitleService?.setSystemInactive();},O.debounce+1e3));}handleToolRequestEvent(e){let t={id:e.timestamp,role:"system",speaker:"System",content:[{type:"text",content:e.toSingleLineString()}],timestamp:e.date,type:"technical",eventId:e.timestamp,fullContent:Qe(e)};this.addMessage(t);}handleToolResponseEvent(e){let t={id:e.timestamp,role:"system",speaker:"System",content:[{type:"text",content:e.toSingleLineString()}],timestamp:e.date,type:"technical",eventId:e.timestamp};this.addMessage(t);}handleChoiceEvent(e,t=false){this.stopThinking();let n={id:e.timestamp,role:"assistant",speaker:"Assistant",content:[{type:"text",content:e.optionalQuestion?`${e.optionalQuestion} ${e.invite}`:e.invite}],timestamp:e.date,type:"text"};if(this.addMessage(n),t||this.messagesSubject.value.some(y=>y.parentKey===e.timestamp||y.role==="user"&&y.timestamp>e.date||y.role==="assistant"&&y.timestamp>e.date))return;this.currentChoiceEvent=e,this.tabTitleService?.setSystemInactive();let E=e.options.map(y=>({value:y,label:y})),C=e.optionalQuestion?`${e.optionalQuestion} ${e.invite}`:e.invite;this.currentChoiceSubject.next({options:E,label:C,allowFreeText:e.allowFreeText});}handleHeartBeatEvent(e){}handleInviteEvent(e,t=false){if(this.stopThinking(),e.invite===_e)t||(this.currentInviteEventSubject.next(e),this.tabTitleService?.setSystemInactive());else {let i={id:e.timestamp,role:"assistant",speaker:"Assistant",content:[{type:"text",content:e.invite}],timestamp:e.date,type:"text"};this.addMessage(i),this.messagesSubject.value.some(C=>C.parentKey===e.timestamp||C.role==="user"&&C.timestamp>e.date||C.role==="assistant"&&C.timestamp>e.date)||t||(this.currentInviteEventSubject.next(e),this.tabTitleService?.setSystemInactive());}}addMessage(e){let t=this.messagesSubject.value;t.some(n=>n.id===e.id)||this.messagesSubject.next([...t,e]);}removeMessagesFromIndex(e){let t=this.messagesSubject.value,n=t.findIndex(o=>o.id===e);if(n===-1||n===0)return;let i=t.slice(0,n);this.messagesSubject.next(i),this.stopThinking();}extractTextContentFromMessage(e){return e?e.content.filter(t=>t.type==="text").map(t=>t.content).join(`
|
|
181
181
|
|
|
182
|
-
`):""}clearThinkingTimeout(){this.thinkingTimeout&&(clearTimeout(this.thinkingTimeout),this.thinkingTimeout=null);}stopThinking(){this.clearThinkingTimeout(),this.isThinkingSubject.next(false),this.tabTitleService&&this.tabTitleService.setSystemInactive();}ngOnDestroy(){this.clearThinkingTimeout(),this.destroy$.next(),this.destroy$.complete(),this.currentInviteEventSubject.complete(),this.messageToRestoreSubject.complete(),this.threadUpdateEventSubject.complete(),this.streamingTextSubject.complete(),this.eventStream.disconnect();}static \u0275fac=function(t){return new(t||c)};static \u0275prov=x({token:c,factory:c.\u0275fac,providedIn:"root"})};function
|
|
182
|
+
`):""}clearThinkingTimeout(){this.thinkingTimeout&&(clearTimeout(this.thinkingTimeout),this.thinkingTimeout=null);}stopThinking(){this.clearThinkingTimeout(),this.isThinkingSubject.next(false),this.tabTitleService&&this.tabTitleService.setSystemInactive();}ngOnDestroy(){this.clearThinkingTimeout(),this.destroy$.next(),this.destroy$.complete(),this.currentInviteEventSubject.complete(),this.messageToRestoreSubject.complete(),this.threadUpdateEventSubject.complete(),this.streamingTextSubject.complete(),this.eventStream.disconnect();}static \u0275fac=function(t){return new(t||c)};static \u0275prov=x({token:c,factory:c.\u0275fac,providedIn:"root"})};function gt(c,e){if(c&1&&(Is(0,"div",3),qC(1),pl()),c&2){let t=yC();JE(),vl("\u274C ",t.errorMessage);}}var Ze=class c{dialogRef=g(z$1);data=g(Ue);jsonContent;errorMessage="";title;constructor(){this.jsonContent=this.data.initialContent,this.title=this.data.title||this.getDefaultTitle(this.data.configType,this.data.projectName);}getDefaultTitle(e,t){return e==="user"?"User Configuration":`Project Configuration: ${t||"Unknown"}`}onSave(){this.errorMessage="";let e;try{e=JSON.parse(this.jsonContent);}catch(t){this.errorMessage=`Invalid JSON syntax: ${t instanceof Error?t.message:"Unknown error"}`;return}this.dialogRef.close(e);}onCancel(){this.dialogRef.close();}static \u0275fac=function(t){return new(t||c)};static \u0275cmp=Rw({type:c,selectors:[["app-json-editor"]],decls:13,vars:3,consts:[["mat-dialog-title",""],["mat-icon-button","","title","Close",1,"close-button",3,"click"],["spellcheck","false","placeholder","Enter JSON configuration...",1,"json-textarea",3,"ngModelChange","ngModel"],[1,"error-message"],["align","end"],["matButton","",3,"click"],["matButton","filled","color","primary",3,"click"]],template:function(t,n){t&1&&(Is(0,"div",0),qC(1),Is(2,"button",1),Ag("click",function(){return n.onCancel()}),Is(3,"mat-icon"),qC(4,"close"),pl()()(),Is(5,"mat-dialog-content")(6,"textarea",2),Jg("ngModelChange",function(o){return XC(n.jsonContent,o)||(n.jsonContent=o),o}),pl(),UI(),tC(7,gt,2,1,"div",3),pl(),Is(8,"mat-dialog-actions",4)(9,"button",5),Ag("click",function(){return n.onCancel()}),qC(10,"Cancel"),pl(),Is(11,"button",6),Ag("click",function(){return n.onSave()}),qC(12,"Save"),pl()()),t&2&&(JE(),vl(" ",n.title," "),JE(5),Xg("ngModel",n.jsonContent),zI(),JE(),nC(n.errorMessage?7:-1));},dependencies:[Gm,ti,Ye$1,Zn,cn,wt,Gn,pr,jt,Nt,Vt],styles:["[mat-dialog-title][_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}[mat-dialog-title][_ngcontent-%COMP%] .close-button[_ngcontent-%COMP%]{margin-left:auto}mat-dialog-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;min-height:400px}.json-textarea[_ngcontent-%COMP%]{flex:1;min-height:300px;max-height:80vh;padding:1rem;font-family:Monaco,Menlo,Ubuntu Mono,Consolas,monospace;font-size:.875rem;line-height:1.5;background:var(--color-code-bg);color:var(--color-text);border:1px solid var(--color-border);border-radius:4px;resize:vertical;outline:none;transition:border-color .2s}.json-textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.json-textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary);opacity:.6}.error-message[_ngcontent-%COMP%]{padding:.75rem 1rem;border-radius:4px;font-size:.875rem;line-height:1.4;background:#dc26261a;color:#dc2626;border:1px solid rgba(220,38,38,.3)}"],changeDetection:1})};export{Et as E,Ge as G,Qe as Q,Ye as Y,Ze as Z,yt as y,z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {l}from'./chunk-Bf1Bttqy.js';import {g,df as Q,dg as T,X as br,bS as va,u as ue,a7 as ya,cE as Rd,Y as x}from'./main-4SCUMPDY.js';var v=class i{userState=g(l);membership=g(Q);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(va(a=>a?a.isAdmin?br(true):this.membership.getMembersNamespaceMembership(e).pipe(ue(d=>d.some(n=>n.id===a.id&&n.role==="ADMIN")),ya(()=>br(false))):br(false)),Rd({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 +1 @@
|
|
|
1
|
-
import {S as S$1}from'./chunk-
|
|
1
|
+
import {S as S$1}from'./chunk-CCQglZL5.js';import {g,G,w as we,dd as $,aJ as Tr,z as zi,bS as va,u as ue,c as U,h as Rw,aK as xb,I as Is,bf as cT,A as Ag,m as pl,af as Dg,r as bC,T as Tg,bg as lT,ah as oT,t as tC,ac as yC,v as nC,a9 as fC,aa as If,ab as wf,ag as pT}from'./main-4SCUMPDY.js';import {W as Wn,S as Se}from'./chunk-BESIk8ll.js';import'./chunk-BSY9MBD-.js';import'./chunk-LgALnta4.js';var S=()=>[];function V(r,e){if(r&1){let t=fC();Is(0,"agentos-ai-provider-item",4),Ag("editRequested",function(i){If(t);let p=yC(2);return wf(p.onEdit(i))})("deleteRequested",function(i){If(t);let p=yC(2);return wf(p.onDelete(i))}),pl();}r&2&&Tg("config",e)("showBadge",false);}function F(r,e){if(r&1&&tC(0,V,1,2,"agentos-ai-provider-item",3),r&2){let t,o=e.$implicit,i=yC();nC((t=i.resolveProvider(o.id))?0:-1,t);}}var E=class r{router=g(G);destroyRef=g(we);aiProviderController=g($);refresh$=new Tr(void 0);isLoading=zi(true);providers$=this.refresh$.pipe(va(()=>(this.isLoading.set(true),this.aiProviderController.listAiProvider("none"))));providerItems$=this.providers$.pipe(ue(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.apiType}))));providersById=new Map;constructor(){this.providers$.pipe(U(this.destroyRef)).subscribe({next:e=>{this.providersById=new Map(e.map(t=>[t.id??"",t])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","ai-providers","new"]);}onEdit(e){e.id&&this.router.navigate(["/agentos","admin","ai-providers",e.id,"edit"]);}onDelete(e){e.id&&this.aiProviderController.deleteAiProvider(e.id).pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveProvider(e){return this.providersById.get(e)??null}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=Rw({type:r,selectors:[["agentos-platform-ai-providers"]],decls:5,vars:7,consts:[["aiProviderItemTpl",""],["title","Platform AI Providers","emptyMessage","No platform AI providers defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],["scope","namespace",3,"config","showBadge"],["scope","namespace",3,"editRequested","deleteRequested","config","showBadge"]],template:function(t,o){if(t&1&&(Is(0,"ds-entity-list",1),cT(1,"async"),Ag("createRequested",function(){return o.openCreateForm()}),Is(2,"ds-icon-button",2),Ag("action",function(){return o.goBack()}),pl()(),Dg(3,F,1,1,"ng-template",null,0,pT)),t&2){let i=bC(4);Tg("items",lT(1,4,o.providerItems$)??oT(6,S))("loading",o.isLoading())("showCreate",true)("itemTemplate",i);}},dependencies:[Wn,S$1,Se,xb],styles:[".platform-ai-providers__back[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font-family:inherit;font-size:.875rem;color:var(--color-text-secondary, #6e6e73);padding:.25rem .5rem;border-radius:4px;transition:color .15s ease}.platform-ai-providers__back[_ngcontent-%COMP%]:hover{color:var(--color-primary, #007aff)}"]})};export{E as PlatformAiProvidersComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {N}from'./chunk-Ba945z-E.js';import {g,ao as V,G,w as we,d8 as B,dl as k,d6 as F,H as Hi,Q as By,S as ha,b as U,u as ue$1,a7 as ga,z as z$1,a as P,A as Aw,s as si,v as vs,k as Ag,W as WC,j as fl,n as eC,X as XE,a8 as Zg,t as tC,ac as mC,r as Tg,a9 as dC,o as bg,a3 as HI,a6 as $I,a5 as yl,q as oC,x as iC,bo as nC,aa as If,ab as wf,C as Cg}from'./main-SY6UM2GV.js';import'./chunk-MIRdYHA6.js';import {o as z,k as _t,b as _e$1,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,a as wt,Z as Zn,l as Xn,C as Cn,E as En}from'./chunk-DbP7sgsG.js';import'./chunk-DWsrvadK.js';import'./chunk-Cdb2CX2Q.js';import'./chunk-8Uub9JWj.js';import'./chunk-Bd2CH26d.js';var le=(r,t)=>t.config.id,ce=(r,t)=>t.type;function ge(r,t){if(r&1&&(vs(0,"a",5),WC(1,"View resolved definition \u2192"),fl()),r&2){let e=mC();Tg("routerLink",e.inspectRoute());}}function se(r,t){r&1&&(vs(0,"span",6),WC(1,"Platform level"),fl());}function de(r,t){r&1&&(vs(0,"p",7),WC(1,"Loading\u2026"),fl());}function me(r,t){if(r&1&&(vs(0,"span",41),WC(1),fl()),r&2){let e=mC().$implicit;XE(),Zg(e.config.integrationType);}}function fe(r,t){if(r&1&&(bg(0,"input",42),HI()),r&2){let e=mC().$implicit;Tg("formControl",e.toolsControl),$I();}}function pe(r,t){if(r&1){let e=dC();vs(0,"div",37)(1,"label",38)(2,"input",39),Ag("change",function(){let l=If(e).$implicit,g=mC(3);return wf(g.toggleIntegration(l))}),fl(),vs(3,"span",40),WC(4),fl(),eC(5,me,2,1,"span",41),fl(),eC(6,fe,1,1,"input",42),fl();}if(r&2){let e=t.$implicit;XE(2),Tg("checked",e.enabled()),XE(2),Zg(e.config.name),XE(),tC(e.config.integrationType?5:-1),XE(),tC(e.enabled()?6:-1);}}function _e(r,t){if(r&1&&(vs(0,"p",48),WC(1),fl()),r&2){let e=mC().$implicit;XE(),yl(" Restricted to: ",e.restrictedTools.join(", ")," (set outside this form, preserved on save) ");}}function ue(r,t){if(r&1){let e=dC();vs(0,"div",37)(1,"label",38)(2,"span",40),WC(3),fl(),vs(4,"span",41),WC(5,"built-in"),fl()(),vs(6,"select",44),Ag("change",function(l){let g=If(e).$implicit,m=mC(4);return wf(m.setBuiltInState(g,l.target.value))}),vs(7,"option",45),WC(8),fl(),vs(9,"option",46),WC(10,"Enabled"),fl(),vs(11,"option",47),WC(12,"Disabled"),fl()(),eC(13,_e,2,1,"p",48),vs(14,"p",49),WC(15),fl()();}if(r&2){let e=t.$implicit,o=mC(4);XE(),Cg("for","built-in-"+e.type),XE(2),Zg(e.displayName),XE(3),Tg("id","built-in-"+e.type)("value",e.state()),XE(2),Zg(o.builtInDefaultLabel(e)),XE(5),tC(e.state()==="on"&&e.restrictedTools?13:-1),XE(2),Zg(e.description);}}function be(r,t){if(r&1&&(vs(0,"p",43),WC(1,"Built-in integrations"),fl(),oC(2,ue,16,7,"div",37,ce)),r&2){let e=mC(3);XE(2),iC(e.builtInRows());}}function Ce(r,t){if(r&1&&(vs(0,"fieldset",20)(1,"legend",25),WC(2,"Integrations"),fl(),vs(3,"p",36),WC(4," Select which integrations this agent can use. Leave tool names empty to allow all tools from an integration. "),fl(),oC(5,pe,7,4,"div",37,le),eC(7,be,4,0),fl()),r&2){let e=mC(2);XE(5),iC(e.integrationRows()),XE(2),tC(e.builtInRows().length>0?7:-1);}}function xe(r,t){if(r&1){let e=dC();vs(0,"li",50),bg(1,"input",51),HI(),vs(2,"button",52),Ag("click",function(){let l=If(e).$implicit,g=mC(3);return wf(g.removeSubAgent(l))}),WC(3," \u{1F5D1} "),fl()();}if(r&2){let e=t.$implicit;XE(),Tg("formControl",e.control),$I();}}function ye(r,t){if(r&1&&(vs(0,"ul",28),oC(1,xe,4,1,"li",50,nC),fl()),r&2){let e=mC(2);XE(),iC(e.subAgentRows());}}function he(r,t){if(r&1){let e=dC();vs(0,"button",53),Ag("click",function(){If(e);let l=mC(2);return wf(l.exportYaml())}),WC(1),fl();}if(r&2){let e=mC(2);Tg("disabled",e.isExporting()),XE(),yl(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function ve(r,t){if(r&1){let e=dC();vs(0,"form",9),Ag("ngSubmit",function(){If(e);let l=mC();return wf(l.submit())}),vs(1,"div",10)(2,"label",11),WC(3,"Name "),vs(4,"span",12),WC(5,"*"),fl()(),bg(6,"input",13),HI(),fl(),vs(7,"div",10)(8,"label",14),WC(9,"Description"),fl(),bg(10,"input",15),HI(),fl(),vs(11,"div",10)(12,"label",16),WC(13,"Model name"),fl(),bg(14,"input",17),HI(),fl(),vs(15,"div",10)(16,"label",18),WC(17,"Instructions"),fl(),bg(18,"textarea",19),HI(),fl(),eC(19,Ce,8,1,"fieldset",20),vs(20,"div",10)(21,"label",21),bg(22,"input",22),HI(),vs(23,"span",23),WC(24,"Advanced mode"),fl()(),vs(25,"p",24),WC(26," When enabled, this agent uses a multi-step reasoning loop instead of a single LLM call. "),fl()(),vs(27,"div",10)(28,"label",21),bg(29,"input",22),HI(),vs(30,"span",23),WC(31,"Enabled"),fl()(),vs(32,"p",24),WC(33,"Disabled agents are excluded from namespace resolution."),fl()(),vs(34,"div",10)(35,"span",25),WC(36,"Sub-agents"),fl(),vs(37,"p",26),WC(38," Glob patterns for agents this agent may delegate to. "),vs(39,"code",27),WC(40,"*"),fl(),WC(41," matches any sequence of characters (e.g.\xA0"),vs(42,"code",27),WC(43,"*Fixer"),fl(),WC(44,", "),vs(45,"code",27),WC(46,"*"),fl(),WC(47," for all). Leave empty to disable delegation. "),fl(),eC(48,ye,3,0,"ul",28),vs(49,"div",29)(50,"input",30),Ag("keydown.enter",function(){If(e);let l=mC();return wf(l.addSubAgent())}),fl(),HI(),vs(51,"button",31),Ag("click",function(){If(e);let l=mC();return wf(l.addSubAgent())}),WC(52," + "),fl()()(),vs(53,"div",32)(54,"button",33),WC(55),fl(),eC(56,he,2,2,"button",34),vs(57,"button",35),Ag("click",function(){If(e);let l=mC();return wf(l.cancel())}),WC(58,"Cancel"),fl()()();}if(r&2){let e=mC();Tg("formGroup",e.form),XE(6),Tg("formControl",e.nameControl),$I(),XE(4),Tg("formControl",e.descriptionControl),$I(),XE(4),Tg("formControl",e.modelNameControl),$I(),XE(4),Tg("formControl",e.instructionsControl),$I(),XE(),tC(e.integrationRows().length>0||e.builtInRows().length>0?19:-1),XE(3),Tg("formControl",e.advancedExecutionControl),$I(),XE(7),Tg("formControl",e.enabledControl),$I(),XE(19),tC(e.subAgentRows().length>0?48:-1),XE(2),Tg("formControl",e.newSubAgentControl),$I(),XE(),Tg("disabled",!e.newSubAgentControl.value.trim()),XE(3),Tg("disabled",e.form.invalid||e.isSubmitting()),XE(),yl(" ",e.isEditMode()?"Save changes":"Create"," "),XE(),tC(e.isEditMode()?56:-1);}}var ae=class r{route=g(V);router=g(G);destroyRef=g(we);agentConfigController=g(B);exportService=g(k);integrationConfigState=g(N);integrationTypeController=g(F);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;form=new z({name:new _t("",{nonNullable:true,validators:[_e$1.required,_e$1.minLength(1)]}),description:new _t(null),modelName:new _t(null),instructions:new _t(null),advancedExecution:new _t(false,{nonNullable:true}),enabled:new _t(false,{nonNullable:true})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get modelNameControl(){return this.form.controls.modelName}get instructionsControl(){return this.form.controls.instructions}get advancedExecutionControl(){return this.form.controls.advancedExecution}get enabledControl(){return this.form.controls.enabled}subAgentRows=Hi([]);newSubAgentControl=new _t("",{nonNullable:true});isEditMode=Hi(false);isSubmitting=Hi(false);isLoading=Hi(false);isExporting=Hi(false);builtInRows=Hi([]);inspectRoute(){let t=this.route.snapshot.paramMap.get("agentConfigId")??"";return this.isPlatformMode?["/agentos","admin","agent-configs",t,"inspect"]:["/agentos",this.namespaceId,"agent-configs",t,"inspect"]}integrationRows=Hi([]);existingConfig=null;ngOnInit(){let t=this.route.snapshot.paramMap.get("agentConfigId");t?(this.isEditMode.set(true),this.loadConfigAndIntegrations(t)):this.loadIntegrations(void 0);}loadConfigAndIntegrations(t){this.isLoading.set(true),By({config:this.agentConfigController.getByIdAgentConfig(t),namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):ha([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes()}).pipe(U(this.destroyRef)).subscribe({next:({config:e,namespaceIntegrations:o,platformIntegrations:l,builtInTypes:g})=>{this.existingConfig=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.modelNameControl.setValue(e.modelName??null),this.instructionsControl.setValue(e.instructions??null),this.advancedExecutionControl.setValue(e.advancedExecution??false),this.enabledControl.setValue(e.enabled??true);let m=[...l,...o];this.integrationRows.set(this.buildIntegrationRows(m,e.integrations??void 0)),this.builtInRows.set(this.buildBuiltInRows(g,e.integrations??void 0)),this.subAgentRows.set((e.subAgents??[]).map(P=>({control:new _t(P,{nonNullable:true})}))),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}loadIntegrations(t){By({namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):ha([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes()}).pipe(U(this.destroyRef)).subscribe({next:({namespaceIntegrations:e,platformIntegrations:o,builtInTypes:l})=>{let g=[...o,...e];this.integrationRows.set(this.buildIntegrationRows(g,t??void 0)),this.builtInRows.set(this.buildBuiltInRows(l,t??void 0));}});}loadBuiltInTypes(){return this.integrationTypeController.listTypesIntegrationType().pipe(ue$1(t=>t.filter(e=>!e.configSchema)),ga(t=>(console.error("[agent-config-form] failed to load integration types",t),ha([]))))}buildIntegrationRows(t,e){return t.map(o=>{let l=o.name??"",g=e?.[l],m=e!=null&&l in e,P=Array.isArray(g)?g.join(", "):"";return {config:o,enabled:Hi(m),toolsControl:new _t(P,{nonNullable:true})}})}buildBuiltInRows(t,e){return t.map(o=>{let l=e!=null&&o.type in e,g=e?.[o.type],m=l?Array.isArray(g)&&g.length===0?"off":"on":"default";return {type:o.type,displayName:o.displayName,description:o.description,enabledByDefault:o.enabledByDefault===true,state:Hi(m),restrictedTools:Array.isArray(g)&&g.length>0?g:null}})}toggleIntegration(t){t.enabled.update(e=>!e);}setBuiltInState(t,e){t.state.set(e);}builtInDefaultLabel(t){return t.enabledByDefault?"Platform default (enabled)":"Platform default (disabled)"}addSubAgent(){let t=this.newSubAgentControl.value.trim();t&&(this.subAgentRows.update(e=>[...e,{control:new _t(t,{nonNullable:true})}]),this.newSubAgentControl.reset(""));}removeSubAgent(t){this.subAgentRows.update(e=>e.filter(o=>o!==t));}buildSubAgentsPayload(){let t=this.subAgentRows().map(e=>e.control.value.trim()).filter(e=>e.length>0);return t.length>0?t:void 0}buildIntegrationsPayload(){let t={};for(let o of this.integrationRows().filter(l=>l.enabled())){let l=o.config.name??"",g=o.toolsControl.value.trim();t[l]=g===""?null:g.split(",").map(m=>m.trim()).filter(m=>m.length>0);}for(let o of this.builtInRows()){let l=o.state();l==="on"?t[o.type]=o.restrictedTools??null:l==="off"&&(t[o.type]=[]);}let e=new Set([...this.integrationRows().map(o=>o.config.name??""),...this.builtInRows().map(o=>o.type)]);for(let[o,l]of Object.entries(this.existingConfig?.integrations??{}))e.has(o)||(t[o]=l);return Object.keys(t).length>0?t:void 0}submit(){if(this.form.invalid||this.isSubmitting())return;this.addSubAgent(),this.isSubmitting.set(true);let t=z$1(P({},this.existingConfig??{}),{createdOn:this.existingConfig?.createdOn,updatedOn:this.existingConfig?.updatedOn,namespaceId:this.namespaceId,name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,modelName:this.modelNameControl.value?.trim()||void 0,instructions:this.instructionsControl.value?.trim()||void 0,integrations:this.buildIntegrationsPayload(),advancedExecution:this.advancedExecutionControl.value,enabled:this.enabledControl.value,subAgents:this.buildSubAgentsPayload()});(this.isEditMode()?this.agentConfigController.updateAgentConfig(this.existingConfig.id??"",t):this.agentConfigController.createAgentConfig(t)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}exportYaml(){let t=this.existingConfig?.id;!t||this.isExporting()||(this.isExporting.set(true),this.exportService.exportAsYaml(t).pipe(U(this.destroyRef)).subscribe({next:e=>{let o=new Blob([e],{type:"application/yaml"}),l=URL.createObjectURL(o),g=document.createElement("a");g.href=l,g.download=`${this.existingConfig?.name??"agent"}.yaml`,g.click(),URL.revokeObjectURL(l),this.isExporting.set(false);},error:()=>this.isExporting.set(false)}));}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","agent-configs"]):this.router.navigate(["/agentos",this.namespaceId,"agent-configs"]);}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=Aw({type:r,selectors:[["agentos-agent-config-form"]],decls:12,vars:4,consts:[[1,"agent-config-form"],[1,"agent-config-form__header"],["type","button","title","Back to agent configs",1,"agent-config-form__back",3,"click"],[1,"agent-config-form__back-icon"],[1,"agent-config-form__title"],[1,"agent-config-form__sibling-link",3,"routerLink"],[1,"agent-config-form__platform-badge"],[1,"agent-config-form__loading"],[1,"agent-config-form__form",3,"formGroup"],[1,"agent-config-form__form",3,"ngSubmit","formGroup"],[1,"agent-config-form__field"],["for","agent-config-name",1,"agent-config-form__label"],["aria-hidden","true"],["id","agent-config-name","type","text","placeholder","e.g. Support agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-description",1,"agent-config-form__label"],["id","agent-config-description","type","text","placeholder","Optional \u2014 short description of this agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-model-name",1,"agent-config-form__label"],["id","agent-config-model-name","type","text","placeholder","Optional \u2014 model alias or name to use","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-instructions",1,"agent-config-form__label"],["id","agent-config-instructions","rows","6","placeholder","Optional \u2014 system instructions for this agent",1,"agent-config-form__textarea",3,"formControl"],[1,"agent-config-form__integrations"],[1,"agent-config-form__toggle-label"],["type","checkbox",1,"agent-config-form__toggle-checkbox",3,"formControl"],[1,"agent-config-form__toggle-text"],[1,"agent-config-form__toggle-hint"],[1,"agent-config-form__label"],[1,"agent-config-form__field-hint"],[1,"agent-config-form__code"],[1,"agent-config-form__sub-agent-list"],[1,"agent-config-form__sub-agent-add"],["type","text","placeholder","e.g. *Fixer or *","autocomplete","off",1,"agent-config-form__input","agent-config-form__sub-agent-input",3,"keydown.enter","formControl"],["type","button","title","Add pattern",1,"agent-config-form__sub-agent-btn","agent-config-form__sub-agent-btn--add",3,"click","disabled"],[1,"agent-config-form__actions"],["type","submit",1,"agent-config-form__btn","agent-config-form__btn--primary",3,"disabled"],["type","button",1,"agent-config-form__btn","agent-config-form__btn--export",3,"disabled"],["type","button",1,"agent-config-form__btn",3,"click"],[1,"agent-config-form__integrations-hint"],[1,"agent-config-form__integration-row"],[1,"agent-config-form__integration-toggle"],["type","checkbox",1,"agent-config-form__integration-checkbox",3,"change","checked"],[1,"agent-config-form__integration-name"],[1,"agent-config-form__integration-type"],["type","text","placeholder","Tool names, comma-separated (empty = all tools)","autocomplete","off",1,"agent-config-form__input","agent-config-form__integration-tools",3,"formControl"],[1,"agent-config-form__integrations-separator"],[1,"agent-config-form__integration-state",3,"change","id","value"],["value","default"],["value","on"],["value","off"],[1,"agent-config-form__integration-restriction"],[1,"agent-config-form__integration-builtin-desc"],[1,"agent-config-form__sub-agent-row"],["type","text","autocomplete","off",1,"agent-config-form__input","agent-config-form__sub-agent-input",3,"formControl"],["type","button","title","Remove",1,"agent-config-form__sub-agent-btn","agent-config-form__sub-agent-btn--danger",3,"click"],["type","button",1,"agent-config-form__btn","agent-config-form__btn--export",3,"click","disabled"]],template:function(e,o){e&1&&(vs(0,"div",0)(1,"header",1)(2,"button",2),Ag("click",function(){return o.cancel()}),vs(3,"span",3),WC(4,"\u2190"),fl(),WC(5," Agent Configs "),fl(),vs(6,"h1",4),WC(7),fl(),eC(8,ge,2,1,"a",5),eC(9,se,2,0,"span",6),fl(),eC(10,de,2,0,"p",7)(11,ve,59,14,"form",8),fl()),e&2&&(XE(7),Zg(o.isEditMode()?"Edit agent config":"New agent config"),XE(),tC(o.isEditMode()?8:-1),XE(),tC(o.isPlatformMode?9:-1),XE(),tC(o.isLoading()?10:11));},dependencies:[ni,Jn,Qn,ei,Ye,wt,Zn,Xn,Cn,En,si],styles:[".agent-config-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.agent-config-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.agent-config-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.agent-config-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.agent-config-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.agent-config-form__sibling-link[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-accent);text-decoration:none}.agent-config-form__sibling-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-form__platform-badge[_ngcontent-%COMP%]{display:inline-block;font-size:.75rem;font-weight:500;color:var(--color-text-secondary);background:var(--color-surface);border:1px solid var(--color-divider);border-radius:0;padding:.125rem .5rem;letter-spacing:.02em;align-self:flex-start}.agent-config-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.agent-config-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.agent-config-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.agent-config-form__input[_ngcontent-%COMP%], .agent-config-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.agent-config-form__input[_ngcontent-%COMP%]:focus, .agent-config-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.agent-config-form__input[_ngcontent-%COMP%]::placeholder, .agent-config-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.agent-config-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:120px;line-height:1.5}.agent-config-form__integrations[_ngcontent-%COMP%]{border:1px solid var(--color-divider);border-radius:0;padding:1rem;margin:0;display:flex;flex-direction:column;gap:.75rem}.agent-config-form__integrations-hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__integration-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__integration-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__integration-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-accent);cursor:pointer}.agent-config-form__integration-name[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text)}.agent-config-form__integration-type[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:monospace}.agent-config-form__integration-tools[_ngcontent-%COMP%]{margin-left:1.5rem;font-size:.875rem}.agent-config-form__integrations-separator[_ngcontent-%COMP%]{margin:.25rem 0 0;padding-top:.5rem;border-top:1px solid var(--color-divider);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);font-family:var(--font-heading)}.agent-config-form__integration-state[_ngcontent-%COMP%]{margin-left:1.5rem;padding:.375rem .625rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.875rem;font-family:inherit;outline:none;transition:border-color .15s ease}.agent-config-form__integration-state[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.agent-config-form__integration-restriction[_ngcontent-%COMP%]{margin:0 0 0 1.5rem;font-size:.8rem;font-style:italic;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.agent-config-form__integration-builtin-desc[_ngcontent-%COMP%]{margin:0 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__field-hint[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__code[_ngcontent-%COMP%]{font-family:monospace;font-size:.85em;background:var(--color-surface-muted, rgba(0, 0, 0, .06));padding:.1em .3em;border-radius:0}.agent-config-form__sub-agent-list[_ngcontent-%COMP%]{list-style:none;margin:.5rem 0 0;padding:0;display:flex;flex-direction:column;gap:.375rem}.agent-config-form__sub-agent-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem}.agent-config-form__sub-agent-input[_ngcontent-%COMP%]{flex:1;min-width:0}.agent-config-form__sub-agent-add[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;margin-top:.5rem}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]{flex-shrink:0;width:2rem;height:2rem;padding:0;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text-secondary);font-size:.9rem;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s ease,border-color .15s ease,color .15s ease}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500);color:var(--color-text)}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]:disabled{opacity:.35;cursor:not-allowed}.agent-config-form__sub-agent-btn--add[_ngcontent-%COMP%]{width:2rem;height:2rem;font-size:1.25rem;font-weight:300;border-color:var(--color-accent);color:var(--color-accent)}.agent-config-form__sub-agent-btn--add[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent);color:#fff}.agent-config-form__sub-agent-btn--danger[_ngcontent-%COMP%]{border:1px solid transparent;color:var(--color-neutral-500)}.agent-config-form__sub-agent-btn--danger[_ngcontent-%COMP%]:hover:not(:disabled){border-color:var(--red);color:var(--red);background:color-mix(in srgb,var(--red) 10%,transparent)}.agent-config-form__toggle-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__toggle-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-accent);cursor:pointer}.agent-config-form__toggle-text[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text)}.agent-config-form__toggle-hint[_ngcontent-%COMP%]{margin:.25rem 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.agent-config-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease}.agent-config-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.agent-config-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.agent-config-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.agent-config-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"]})};export{ae as AgentConfigFormComponent};
|
|
1
|
+
import {N}from'./chunk-DJtRPrJe.js';import {g,ao as V,G,w as we,d8 as B,dl as k,d6 as F,z as zi,S as By,X as br,c as U,u as ue$1,a7 as ya,a as z$1,b as P,h as Rw,s as si,I as Is,A as Ag,q as qC,m as pl,t as tC,J as JE,a8 as Zg,v as nC,ac as yC,T as Tg,a9 as fC,n as bg,a3 as UI,a6 as zI,a5 as vl,o as iC,x as sC,bo as rC,aa as If,ab as wf,C as Cg}from'./main-4SCUMPDY.js';import'./chunk-Bf1Bttqy.js';import {o as z,k as _t,b as _e$1,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,a as wt,Z as Zn,l as Xn,C as Cn,E as En}from'./chunk-LgALnta4.js';import'./chunk-Bsv9CCXL.js';import'./chunk-BxnUTBZC.js';import'./chunk-BESIk8ll.js';import'./chunk-BSY9MBD-.js';var le=(r,t)=>t.config.id,ce=(r,t)=>t.type;function ge(r,t){if(r&1&&(Is(0,"a",5),qC(1,"View resolved definition \u2192"),pl()),r&2){let e=yC();Tg("routerLink",e.inspectRoute());}}function se(r,t){r&1&&(Is(0,"span",6),qC(1,"Platform level"),pl());}function de(r,t){r&1&&(Is(0,"p",7),qC(1,"Loading\u2026"),pl());}function me(r,t){if(r&1&&(Is(0,"span",41),qC(1),pl()),r&2){let e=yC().$implicit;JE(),Zg(e.config.integrationType);}}function fe(r,t){if(r&1&&(bg(0,"input",42),UI()),r&2){let e=yC().$implicit;Tg("formControl",e.toolsControl),zI();}}function pe(r,t){if(r&1){let e=fC();Is(0,"div",37)(1,"label",38)(2,"input",39),Ag("change",function(){let l=If(e).$implicit,g=yC(3);return wf(g.toggleIntegration(l))}),pl(),Is(3,"span",40),qC(4),pl(),tC(5,me,2,1,"span",41),pl(),tC(6,fe,1,1,"input",42),pl();}if(r&2){let e=t.$implicit;JE(2),Tg("checked",e.enabled()),JE(2),Zg(e.config.name),JE(),nC(e.config.integrationType?5:-1),JE(),nC(e.enabled()?6:-1);}}function _e(r,t){if(r&1&&(Is(0,"p",48),qC(1),pl()),r&2){let e=yC().$implicit;JE(),vl(" Restricted to: ",e.restrictedTools.join(", ")," (set outside this form, preserved on save) ");}}function ue(r,t){if(r&1){let e=fC();Is(0,"div",37)(1,"label",38)(2,"span",40),qC(3),pl(),Is(4,"span",41),qC(5,"built-in"),pl()(),Is(6,"select",44),Ag("change",function(l){let g=If(e).$implicit,m=yC(4);return wf(m.setBuiltInState(g,l.target.value))}),Is(7,"option",45),qC(8),pl(),Is(9,"option",46),qC(10,"Enabled"),pl(),Is(11,"option",47),qC(12,"Disabled"),pl()(),tC(13,_e,2,1,"p",48),Is(14,"p",49),qC(15),pl()();}if(r&2){let e=t.$implicit,o=yC(4);JE(),Cg("for","built-in-"+e.type),JE(2),Zg(e.displayName),JE(3),Tg("id","built-in-"+e.type)("value",e.state()),JE(2),Zg(o.builtInDefaultLabel(e)),JE(5),nC(e.state()==="on"&&e.restrictedTools?13:-1),JE(2),Zg(e.description);}}function be(r,t){if(r&1&&(Is(0,"p",43),qC(1,"Built-in integrations"),pl(),iC(2,ue,16,7,"div",37,ce)),r&2){let e=yC(3);JE(2),sC(e.builtInRows());}}function Ce(r,t){if(r&1&&(Is(0,"fieldset",20)(1,"legend",25),qC(2,"Integrations"),pl(),Is(3,"p",36),qC(4," Select which integrations this agent can use. Leave tool names empty to allow all tools from an integration. "),pl(),iC(5,pe,7,4,"div",37,le),tC(7,be,4,0),pl()),r&2){let e=yC(2);JE(5),sC(e.integrationRows()),JE(2),nC(e.builtInRows().length>0?7:-1);}}function xe(r,t){if(r&1){let e=fC();Is(0,"li",50),bg(1,"input",51),UI(),Is(2,"button",52),Ag("click",function(){let l=If(e).$implicit,g=yC(3);return wf(g.removeSubAgent(l))}),qC(3," \u{1F5D1} "),pl()();}if(r&2){let e=t.$implicit;JE(),Tg("formControl",e.control),zI();}}function ye(r,t){if(r&1&&(Is(0,"ul",28),iC(1,xe,4,1,"li",50,rC),pl()),r&2){let e=yC(2);JE(),sC(e.subAgentRows());}}function he(r,t){if(r&1){let e=fC();Is(0,"button",53),Ag("click",function(){If(e);let l=yC(2);return wf(l.exportYaml())}),qC(1),pl();}if(r&2){let e=yC(2);Tg("disabled",e.isExporting()),JE(),vl(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function ve(r,t){if(r&1){let e=fC();Is(0,"form",9),Ag("ngSubmit",function(){If(e);let l=yC();return wf(l.submit())}),Is(1,"div",10)(2,"label",11),qC(3,"Name "),Is(4,"span",12),qC(5,"*"),pl()(),bg(6,"input",13),UI(),pl(),Is(7,"div",10)(8,"label",14),qC(9,"Description"),pl(),bg(10,"input",15),UI(),pl(),Is(11,"div",10)(12,"label",16),qC(13,"Model name"),pl(),bg(14,"input",17),UI(),pl(),Is(15,"div",10)(16,"label",18),qC(17,"Instructions"),pl(),bg(18,"textarea",19),UI(),pl(),tC(19,Ce,8,1,"fieldset",20),Is(20,"div",10)(21,"label",21),bg(22,"input",22),UI(),Is(23,"span",23),qC(24,"Advanced mode"),pl()(),Is(25,"p",24),qC(26," When enabled, this agent uses a multi-step reasoning loop instead of a single LLM call. "),pl()(),Is(27,"div",10)(28,"label",21),bg(29,"input",22),UI(),Is(30,"span",23),qC(31,"Enabled"),pl()(),Is(32,"p",24),qC(33,"Disabled agents are excluded from namespace resolution."),pl()(),Is(34,"div",10)(35,"span",25),qC(36,"Sub-agents"),pl(),Is(37,"p",26),qC(38," Glob patterns for agents this agent may delegate to. "),Is(39,"code",27),qC(40,"*"),pl(),qC(41," matches any sequence of characters (e.g.\xA0"),Is(42,"code",27),qC(43,"*Fixer"),pl(),qC(44,", "),Is(45,"code",27),qC(46,"*"),pl(),qC(47," for all). Leave empty to disable delegation. "),pl(),tC(48,ye,3,0,"ul",28),Is(49,"div",29)(50,"input",30),Ag("keydown.enter",function(){If(e);let l=yC();return wf(l.addSubAgent())}),pl(),UI(),Is(51,"button",31),Ag("click",function(){If(e);let l=yC();return wf(l.addSubAgent())}),qC(52," + "),pl()()(),Is(53,"div",32)(54,"button",33),qC(55),pl(),tC(56,he,2,2,"button",34),Is(57,"button",35),Ag("click",function(){If(e);let l=yC();return wf(l.cancel())}),qC(58,"Cancel"),pl()()();}if(r&2){let e=yC();Tg("formGroup",e.form),JE(6),Tg("formControl",e.nameControl),zI(),JE(4),Tg("formControl",e.descriptionControl),zI(),JE(4),Tg("formControl",e.modelNameControl),zI(),JE(4),Tg("formControl",e.instructionsControl),zI(),JE(),nC(e.integrationRows().length>0||e.builtInRows().length>0?19:-1),JE(3),Tg("formControl",e.advancedExecutionControl),zI(),JE(7),Tg("formControl",e.enabledControl),zI(),JE(19),nC(e.subAgentRows().length>0?48:-1),JE(2),Tg("formControl",e.newSubAgentControl),zI(),JE(),Tg("disabled",!e.newSubAgentControl.value.trim()),JE(3),Tg("disabled",e.form.invalid||e.isSubmitting()),JE(),vl(" ",e.isEditMode()?"Save changes":"Create"," "),JE(),nC(e.isEditMode()?56:-1);}}var ae=class r{route=g(V);router=g(G);destroyRef=g(we);agentConfigController=g(B);exportService=g(k);integrationConfigState=g(N);integrationTypeController=g(F);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;form=new z({name:new _t("",{nonNullable:true,validators:[_e$1.required,_e$1.minLength(1)]}),description:new _t(null),modelName:new _t(null),instructions:new _t(null),advancedExecution:new _t(false,{nonNullable:true}),enabled:new _t(false,{nonNullable:true})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get modelNameControl(){return this.form.controls.modelName}get instructionsControl(){return this.form.controls.instructions}get advancedExecutionControl(){return this.form.controls.advancedExecution}get enabledControl(){return this.form.controls.enabled}subAgentRows=zi([]);newSubAgentControl=new _t("",{nonNullable:true});isEditMode=zi(false);isSubmitting=zi(false);isLoading=zi(false);isExporting=zi(false);builtInRows=zi([]);inspectRoute(){let t=this.route.snapshot.paramMap.get("agentConfigId")??"";return this.isPlatformMode?["/agentos","admin","agent-configs",t,"inspect"]:["/agentos",this.namespaceId,"agent-configs",t,"inspect"]}integrationRows=zi([]);existingConfig=null;ngOnInit(){let t=this.route.snapshot.paramMap.get("agentConfigId");t?(this.isEditMode.set(true),this.loadConfigAndIntegrations(t)):this.loadIntegrations(void 0);}loadConfigAndIntegrations(t){this.isLoading.set(true),By({config:this.agentConfigController.getByIdAgentConfig(t),namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):br([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes()}).pipe(U(this.destroyRef)).subscribe({next:({config:e,namespaceIntegrations:o,platformIntegrations:l,builtInTypes:g})=>{this.existingConfig=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.modelNameControl.setValue(e.modelName??null),this.instructionsControl.setValue(e.instructions??null),this.advancedExecutionControl.setValue(e.advancedExecution??false),this.enabledControl.setValue(e.enabled??true);let m=[...l,...o];this.integrationRows.set(this.buildIntegrationRows(m,e.integrations??void 0)),this.builtInRows.set(this.buildBuiltInRows(g,e.integrations??void 0)),this.subAgentRows.set((e.subAgents??[]).map(P=>({control:new _t(P,{nonNullable:true})}))),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}loadIntegrations(t){By({namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):br([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes()}).pipe(U(this.destroyRef)).subscribe({next:({namespaceIntegrations:e,platformIntegrations:o,builtInTypes:l})=>{let g=[...o,...e];this.integrationRows.set(this.buildIntegrationRows(g,t??void 0)),this.builtInRows.set(this.buildBuiltInRows(l,t??void 0));}});}loadBuiltInTypes(){return this.integrationTypeController.listTypesIntegrationType().pipe(ue$1(t=>t.filter(e=>!e.configSchema)),ya(t=>(console.error("[agent-config-form] failed to load integration types",t),br([]))))}buildIntegrationRows(t,e){return t.map(o=>{let l=o.name??"",g=e?.[l],m=e!=null&&l in e,P=Array.isArray(g)?g.join(", "):"";return {config:o,enabled:zi(m),toolsControl:new _t(P,{nonNullable:true})}})}buildBuiltInRows(t,e){return t.map(o=>{let l=e!=null&&o.type in e,g=e?.[o.type],m=l?Array.isArray(g)&&g.length===0?"off":"on":"default";return {type:o.type,displayName:o.displayName,description:o.description,enabledByDefault:o.enabledByDefault===true,state:zi(m),restrictedTools:Array.isArray(g)&&g.length>0?g:null}})}toggleIntegration(t){t.enabled.update(e=>!e);}setBuiltInState(t,e){t.state.set(e);}builtInDefaultLabel(t){return t.enabledByDefault?"Platform default (enabled)":"Platform default (disabled)"}addSubAgent(){let t=this.newSubAgentControl.value.trim();t&&(this.subAgentRows.update(e=>[...e,{control:new _t(t,{nonNullable:true})}]),this.newSubAgentControl.reset(""));}removeSubAgent(t){this.subAgentRows.update(e=>e.filter(o=>o!==t));}buildSubAgentsPayload(){let t=this.subAgentRows().map(e=>e.control.value.trim()).filter(e=>e.length>0);return t.length>0?t:void 0}buildIntegrationsPayload(){let t={};for(let o of this.integrationRows().filter(l=>l.enabled())){let l=o.config.name??"",g=o.toolsControl.value.trim();t[l]=g===""?null:g.split(",").map(m=>m.trim()).filter(m=>m.length>0);}for(let o of this.builtInRows()){let l=o.state();l==="on"?t[o.type]=o.restrictedTools??null:l==="off"&&(t[o.type]=[]);}let e=new Set([...this.integrationRows().map(o=>o.config.name??""),...this.builtInRows().map(o=>o.type)]);for(let[o,l]of Object.entries(this.existingConfig?.integrations??{}))e.has(o)||(t[o]=l);return Object.keys(t).length>0?t:void 0}submit(){if(this.form.invalid||this.isSubmitting())return;this.addSubAgent(),this.isSubmitting.set(true);let t=z$1(P({},this.existingConfig??{}),{createdOn:this.existingConfig?.createdOn,updatedOn:this.existingConfig?.updatedOn,namespaceId:this.namespaceId,name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,modelName:this.modelNameControl.value?.trim()||void 0,instructions:this.instructionsControl.value?.trim()||void 0,integrations:this.buildIntegrationsPayload(),advancedExecution:this.advancedExecutionControl.value,enabled:this.enabledControl.value,subAgents:this.buildSubAgentsPayload()});(this.isEditMode()?this.agentConfigController.updateAgentConfig(this.existingConfig.id??"",t):this.agentConfigController.createAgentConfig(t)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}exportYaml(){let t=this.existingConfig?.id;!t||this.isExporting()||(this.isExporting.set(true),this.exportService.exportAsYaml(t).pipe(U(this.destroyRef)).subscribe({next:e=>{let o=new Blob([e],{type:"application/yaml"}),l=URL.createObjectURL(o),g=document.createElement("a");g.href=l,g.download=`${this.existingConfig?.name??"agent"}.yaml`,g.click(),URL.revokeObjectURL(l),this.isExporting.set(false);},error:()=>this.isExporting.set(false)}));}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","agent-configs"]):this.router.navigate(["/agentos",this.namespaceId,"agent-configs"]);}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=Rw({type:r,selectors:[["agentos-agent-config-form"]],decls:12,vars:4,consts:[[1,"agent-config-form"],[1,"agent-config-form__header"],["type","button","title","Back to agent configs",1,"agent-config-form__back",3,"click"],[1,"agent-config-form__back-icon"],[1,"agent-config-form__title"],[1,"agent-config-form__sibling-link",3,"routerLink"],[1,"agent-config-form__platform-badge"],[1,"agent-config-form__loading"],[1,"agent-config-form__form",3,"formGroup"],[1,"agent-config-form__form",3,"ngSubmit","formGroup"],[1,"agent-config-form__field"],["for","agent-config-name",1,"agent-config-form__label"],["aria-hidden","true"],["id","agent-config-name","type","text","placeholder","e.g. Support agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-description",1,"agent-config-form__label"],["id","agent-config-description","type","text","placeholder","Optional \u2014 short description of this agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-model-name",1,"agent-config-form__label"],["id","agent-config-model-name","type","text","placeholder","Optional \u2014 model alias or name to use","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-instructions",1,"agent-config-form__label"],["id","agent-config-instructions","rows","6","placeholder","Optional \u2014 system instructions for this agent",1,"agent-config-form__textarea",3,"formControl"],[1,"agent-config-form__integrations"],[1,"agent-config-form__toggle-label"],["type","checkbox",1,"agent-config-form__toggle-checkbox",3,"formControl"],[1,"agent-config-form__toggle-text"],[1,"agent-config-form__toggle-hint"],[1,"agent-config-form__label"],[1,"agent-config-form__field-hint"],[1,"agent-config-form__code"],[1,"agent-config-form__sub-agent-list"],[1,"agent-config-form__sub-agent-add"],["type","text","placeholder","e.g. *Fixer or *","autocomplete","off",1,"agent-config-form__input","agent-config-form__sub-agent-input",3,"keydown.enter","formControl"],["type","button","title","Add pattern",1,"agent-config-form__sub-agent-btn","agent-config-form__sub-agent-btn--add",3,"click","disabled"],[1,"agent-config-form__actions"],["type","submit",1,"agent-config-form__btn","agent-config-form__btn--primary",3,"disabled"],["type","button",1,"agent-config-form__btn","agent-config-form__btn--export",3,"disabled"],["type","button",1,"agent-config-form__btn",3,"click"],[1,"agent-config-form__integrations-hint"],[1,"agent-config-form__integration-row"],[1,"agent-config-form__integration-toggle"],["type","checkbox",1,"agent-config-form__integration-checkbox",3,"change","checked"],[1,"agent-config-form__integration-name"],[1,"agent-config-form__integration-type"],["type","text","placeholder","Tool names, comma-separated (empty = all tools)","autocomplete","off",1,"agent-config-form__input","agent-config-form__integration-tools",3,"formControl"],[1,"agent-config-form__integrations-separator"],[1,"agent-config-form__integration-state",3,"change","id","value"],["value","default"],["value","on"],["value","off"],[1,"agent-config-form__integration-restriction"],[1,"agent-config-form__integration-builtin-desc"],[1,"agent-config-form__sub-agent-row"],["type","text","autocomplete","off",1,"agent-config-form__input","agent-config-form__sub-agent-input",3,"formControl"],["type","button","title","Remove",1,"agent-config-form__sub-agent-btn","agent-config-form__sub-agent-btn--danger",3,"click"],["type","button",1,"agent-config-form__btn","agent-config-form__btn--export",3,"click","disabled"]],template:function(e,o){e&1&&(Is(0,"div",0)(1,"header",1)(2,"button",2),Ag("click",function(){return o.cancel()}),Is(3,"span",3),qC(4,"\u2190"),pl(),qC(5," Agent Configs "),pl(),Is(6,"h1",4),qC(7),pl(),tC(8,ge,2,1,"a",5),tC(9,se,2,0,"span",6),pl(),tC(10,de,2,0,"p",7)(11,ve,59,14,"form",8),pl()),e&2&&(JE(7),Zg(o.isEditMode()?"Edit agent config":"New agent config"),JE(),nC(o.isEditMode()?8:-1),JE(),nC(o.isPlatformMode?9:-1),JE(),nC(o.isLoading()?10:11));},dependencies:[ni,Jn,Qn,ei,Ye,wt,Zn,Xn,Cn,En,si],styles:[".agent-config-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.agent-config-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.agent-config-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.agent-config-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.agent-config-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.agent-config-form__sibling-link[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-accent);text-decoration:none}.agent-config-form__sibling-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-form__platform-badge[_ngcontent-%COMP%]{display:inline-block;font-size:.75rem;font-weight:500;color:var(--color-text-secondary);background:var(--color-surface);border:1px solid var(--color-divider);border-radius:0;padding:.125rem .5rem;letter-spacing:.02em;align-self:flex-start}.agent-config-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.agent-config-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.agent-config-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.agent-config-form__input[_ngcontent-%COMP%], .agent-config-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.agent-config-form__input[_ngcontent-%COMP%]:focus, .agent-config-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.agent-config-form__input[_ngcontent-%COMP%]::placeholder, .agent-config-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.agent-config-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:120px;line-height:1.5}.agent-config-form__integrations[_ngcontent-%COMP%]{border:1px solid var(--color-divider);border-radius:0;padding:1rem;margin:0;display:flex;flex-direction:column;gap:.75rem}.agent-config-form__integrations-hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__integration-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__integration-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__integration-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-accent);cursor:pointer}.agent-config-form__integration-name[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text)}.agent-config-form__integration-type[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:monospace}.agent-config-form__integration-tools[_ngcontent-%COMP%]{margin-left:1.5rem;font-size:.875rem}.agent-config-form__integrations-separator[_ngcontent-%COMP%]{margin:.25rem 0 0;padding-top:.5rem;border-top:1px solid var(--color-divider);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);font-family:var(--font-heading)}.agent-config-form__integration-state[_ngcontent-%COMP%]{margin-left:1.5rem;padding:.375rem .625rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.875rem;font-family:inherit;outline:none;transition:border-color .15s ease}.agent-config-form__integration-state[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.agent-config-form__integration-restriction[_ngcontent-%COMP%]{margin:0 0 0 1.5rem;font-size:.8rem;font-style:italic;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.agent-config-form__integration-builtin-desc[_ngcontent-%COMP%]{margin:0 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__field-hint[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__code[_ngcontent-%COMP%]{font-family:monospace;font-size:.85em;background:var(--color-surface-muted, rgba(0, 0, 0, .06));padding:.1em .3em;border-radius:0}.agent-config-form__sub-agent-list[_ngcontent-%COMP%]{list-style:none;margin:.5rem 0 0;padding:0;display:flex;flex-direction:column;gap:.375rem}.agent-config-form__sub-agent-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem}.agent-config-form__sub-agent-input[_ngcontent-%COMP%]{flex:1;min-width:0}.agent-config-form__sub-agent-add[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;margin-top:.5rem}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]{flex-shrink:0;width:2rem;height:2rem;padding:0;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text-secondary);font-size:.9rem;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s ease,border-color .15s ease,color .15s ease}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500);color:var(--color-text)}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]:disabled{opacity:.35;cursor:not-allowed}.agent-config-form__sub-agent-btn--add[_ngcontent-%COMP%]{width:2rem;height:2rem;font-size:1.25rem;font-weight:300;border-color:var(--color-accent);color:var(--color-accent)}.agent-config-form__sub-agent-btn--add[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent);color:#fff}.agent-config-form__sub-agent-btn--danger[_ngcontent-%COMP%]{border:1px solid transparent;color:var(--color-neutral-500)}.agent-config-form__sub-agent-btn--danger[_ngcontent-%COMP%]:hover:not(:disabled){border-color:var(--red);color:var(--red);background:color-mix(in srgb,var(--red) 10%,transparent)}.agent-config-form__toggle-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__toggle-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-accent);cursor:pointer}.agent-config-form__toggle-text[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text)}.agent-config-form__toggle-hint[_ngcontent-%COMP%]{margin:.25rem 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.agent-config-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease}.agent-config-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.agent-config-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.agent-config-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.agent-config-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"]})};export{ae as AgentConfigFormComponent};
|