@whoz-oss/coday-client 0.127.0 → 0.129.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.
Files changed (99) hide show
  1. package/browser/chunk-2TT2VS4Q.js +1 -0
  2. package/browser/chunk-2YPR6RKN.js +1 -0
  3. package/browser/{chunk-6LO3ANKL.js → chunk-3CAK3MY2.js} +1 -1
  4. package/browser/{chunk-ZAM3WGZM.js → chunk-3DDLKUVJ.js} +1 -1
  5. package/browser/{chunk-V6CWNYSW.js → chunk-4AYGP75X.js} +1 -1
  6. package/browser/chunk-4KNZ7PUG.js +1 -0
  7. package/browser/{chunk-KYPWHL43.js → chunk-4XDVIAH5.js} +1 -1
  8. package/browser/{chunk-HSNVFCBN.js → chunk-6DNANWSF.js} +1 -1
  9. package/browser/{chunk-AK6F2DC7.js → chunk-6JH2UGTU.js} +1 -1
  10. package/browser/chunk-6MVTL5VJ.js +1 -0
  11. package/browser/chunk-7GBHCDC2.js +1 -0
  12. package/browser/{chunk-CH66E3U2.js → chunk-AHABNNMX.js} +1 -1
  13. package/browser/{chunk-CYLHTE22.js → chunk-AKD5MBRD.js} +1 -1
  14. package/browser/chunk-B6DPIDKI.js +1 -0
  15. package/browser/{chunk-EPA5P2I6.js → chunk-BEKG4CZE.js} +1 -1
  16. package/browser/{chunk-PWDBCAQS.js → chunk-BYSD3PVJ.js} +1 -1
  17. package/browser/{chunk-O2IJMHBE.js → chunk-BZJFZW26.js} +1 -1
  18. package/browser/{chunk-OSNI7IJI.js → chunk-CL3F6CYH.js} +1 -1
  19. package/browser/{chunk-WNNKQ2DH.js → chunk-CND4W2V5.js} +1 -1
  20. package/browser/chunk-CX2W2KP4.js +1 -0
  21. package/browser/{chunk-POHHXEMY.js → chunk-CXN4NTRD.js} +6 -6
  22. package/browser/chunk-DIZZ6MCJ.js +1 -0
  23. package/browser/{chunk-XJUBZLY2.js → chunk-DLU3TQID.js} +1 -1
  24. package/browser/chunk-DPFJ6LFY.js +2 -0
  25. package/browser/{chunk-MWWLTJ77.js → chunk-FAAHG43E.js} +1 -1
  26. package/browser/{chunk-KTPX26DH.js → chunk-FDCPX2YT.js} +1 -1
  27. package/browser/chunk-FJR6WCPX.js +270 -0
  28. package/browser/{chunk-VNCIHM33.js → chunk-FQSDA7SM.js} +1 -1
  29. package/browser/{chunk-IFXDK4GQ.js → chunk-FTMDL4HX.js} +1 -1
  30. package/browser/{chunk-XIQ3L6H6.js → chunk-G4QDBE4F.js} +1 -1
  31. package/browser/chunk-GYZJRAEL.js +1 -0
  32. package/browser/chunk-HCMK67ST.js +1 -0
  33. package/browser/chunk-HUWAPEGQ.js +1 -0
  34. package/browser/{chunk-DRBOHCTP.js → chunk-HY7OYHZF.js} +1 -1
  35. package/browser/chunk-HYNHL5RY.js +4 -0
  36. package/browser/{chunk-3U3QVZEU.js → chunk-I75FDNMK.js} +1 -1
  37. package/browser/{chunk-ECBXPEAC.js → chunk-J6NHAJP2.js} +2 -2
  38. package/browser/chunk-KNY6WJUH.js +2 -0
  39. package/browser/{chunk-AJOXSD6I.js → chunk-LCBWJP6Z.js} +1 -1
  40. package/browser/{chunk-QWMDAFBN.js → chunk-LTFITYTW.js} +1 -1
  41. package/browser/chunk-MLNEYB77.js +3 -0
  42. package/browser/{chunk-OR62LCJX.js → chunk-MO6H3TK3.js} +1 -1
  43. package/browser/{chunk-G2OAJDIX.js → chunk-NEINI73V.js} +1 -1
  44. package/browser/{chunk-UORJVNGU.js → chunk-NLRFBAA2.js} +1 -1
  45. package/browser/chunk-NV3MNDVJ.js +1 -0
  46. package/browser/{chunk-K3XBOMJY.js → chunk-OBMXZUQM.js} +1 -1
  47. package/browser/chunk-OHLGZXEO.js +1 -0
  48. package/browser/chunk-OMENROC2.js +1 -0
  49. package/browser/{chunk-QSQYSFNQ.js → chunk-OSX2KHVN.js} +1 -1
  50. package/browser/{chunk-I5OT3IGD.js → chunk-Q74LPU7S.js} +1 -1
  51. package/browser/{chunk-H7YMYOPC.js → chunk-QDQW667Q.js} +1 -1
  52. package/browser/{chunk-WPC6XC7P.js → chunk-QFSZDRP2.js} +1 -1
  53. package/browser/chunk-R2OQMKB5.js +1 -0
  54. package/browser/{chunk-DE5MXWYR.js → chunk-R3DKNIV5.js} +1 -1
  55. package/browser/chunk-R5RVDZLX.js +1 -0
  56. package/browser/chunk-RAJZGLER.js +1 -0
  57. package/browser/{chunk-3JGMGRXW.js → chunk-RNXBUYHW.js} +2 -2
  58. package/browser/{chunk-B2QA6UZX.js → chunk-SDLTQWY6.js} +1 -1
  59. package/browser/chunk-SHWW6WRB.js +1 -0
  60. package/browser/chunk-SI36SMXC.js +5 -0
  61. package/browser/{chunk-AQ3SEH2N.js → chunk-SKVQOMLG.js} +1 -1
  62. package/browser/{chunk-NAQEVUOV.js → chunk-SQWEKOLS.js} +1 -1
  63. package/browser/chunk-T2JHUF63.js +5 -0
  64. package/browser/chunk-T2LG7TT2.js +1 -0
  65. package/browser/{chunk-U4662WTU.js → chunk-TY4VCUP2.js} +1 -1
  66. package/browser/{chunk-IXD43YQI.js → chunk-UQNMPA5Y.js} +1 -1
  67. package/browser/chunk-WBRWLEC2.js +1 -0
  68. package/browser/{chunk-UKTBOEDG.js → chunk-WC5DQJKZ.js} +1 -1
  69. package/browser/{chunk-IZFHJAEI.js → chunk-YBAY4MP6.js} +1 -1
  70. package/browser/{chunk-H5SXHH6A.js → chunk-ZQJGEWGV.js} +1 -1
  71. package/browser/index.html +1 -1
  72. package/browser/main-XJQHXNY2.js +1 -0
  73. package/package.json +1 -1
  74. package/browser/chunk-3D3KN52V.js +0 -1
  75. package/browser/chunk-53STPEYQ.js +0 -3
  76. package/browser/chunk-7MXZXY4I.js +0 -1
  77. package/browser/chunk-B2FFL2F7.js +0 -1
  78. package/browser/chunk-EKBLXJOJ.js +0 -1
  79. package/browser/chunk-EZOSEC5V.js +0 -7
  80. package/browser/chunk-GAZJZBKP.js +0 -1
  81. package/browser/chunk-H76RJSSA.js +0 -1
  82. package/browser/chunk-HCG45H7O.js +0 -2
  83. package/browser/chunk-I5EEQETN.js +0 -1
  84. package/browser/chunk-JG37UR26.js +0 -270
  85. package/browser/chunk-KC2EKCAS.js +0 -1
  86. package/browser/chunk-KUVTFZWT.js +0 -1
  87. package/browser/chunk-KVR4NGLT.js +0 -1
  88. package/browser/chunk-LPN5AG4A.js +0 -1
  89. package/browser/chunk-LR7LOR4R.js +0 -4
  90. package/browser/chunk-NCBEPUYQ.js +0 -1
  91. package/browser/chunk-O3U2KGCT.js +0 -1
  92. package/browser/chunk-PWF6LYR2.js +0 -1
  93. package/browser/chunk-QXZ6AR76.js +0 -1
  94. package/browser/chunk-R47KFHEX.js +0 -1
  95. package/browser/chunk-TLVTUJPE.js +0 -2
  96. package/browser/chunk-TVFEAMIC.js +0 -1
  97. package/browser/chunk-UKAN3Y3I.js +0 -2
  98. package/browser/chunk-WGDWYJII.js +0 -1
  99. package/browser/main-DARYETMO.js +0 -1
@@ -1,4 +1,4 @@
1
- import{$a as V,Aa as ot,B as ae,Ba as de,Ca as me,Da as le,F as tt,Fa as ue,G as oe,Gb as W,Hb as T,J as ne,Kc as _e,Ma as be,Oa as nt,Pa as pe,Q as et,R as ie,Rb as O,Sb as he,T as at,Uc as ye,V as re,Wa as y,Xa as I,Ya as k,Z as c,_ as E,a as u,aa as m,ca as r,db as It,e as Qt,ea as se,g as Xt,h as _,i as qt,ib as fe,jb as wt,ka as A,la as h,m as Jt,oa as xt,pa as b,t as H,ta as K,tc as N,u as te,ua as ce,uc as ve,vb as At,wb as Tt,wc as ge,x as ee,xb as C,ya as D,za as Et}from"./chunk-3JGMGRXW.js";function G(e){return e.buttons===0||e.detail===0}function Z(e){let o=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!!o&&o.identifier===-1&&(o.radiusX==null||o.radiusX===1)&&(o.radiusY==null||o.radiusY===1)}var Mt;function xe(){if(Mt==null){let e=typeof document<"u"?document.head:null;Mt=!!(e&&(e.createShadowRoot||e.attachShadow))}return Mt}function Dt(e){if(xe()){let o=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&o instanceof ShadowRoot)return o}return null}function sa(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){let o=e.shadowRoot.activeElement;if(o===e)break;e=o}return e}function x(e){return e.composedPath?e.composedPath()[0]:e.target}var kt;try{kt=typeof Intl<"u"&&Intl.v8BreakIterator}catch(e){kt=!1}var p=(()=>{class e{_platformId=r(de);isBrowser=this._platformId?_e(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||kt)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var $;function Ee(){if($==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>$=!0}))}finally{$=$||!1}return $}function B(e){return Ee()?e:!!e.capture}function ca(e,o=0){return Ie(e)?Number(e):arguments.length===2?o:0}function Ie(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function R(e){return e instanceof D?e.nativeElement:e}var we=new m("cdk-input-modality-detector-options"),Ae={ignoreKeys:[18,17,224,91,16]},Te=650,Ct={passive:!0,capture:!0},Me=(()=>{class e{_platform=r(p);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new qt(null);_options;_lastTouchMs=0;_onKeydown=t=>{this._options?.ignoreKeys?.some(a=>a===t.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=x(t))};_onMousedown=t=>{Date.now()-this._lastTouchMs<Te||(this._modality.next(G(t)?"keyboard":"mouse"),this._mostRecentTarget=x(t))};_onTouchstart=t=>{if(Z(t)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=x(t)};constructor(){let t=r(b),a=r(h),n=r(we,{optional:!0});if(this._options=u(u({},Ae),n),this.modalityDetected=this._modality.pipe(et(1)),this.modalityChanged=this.modalityDetected.pipe(ne()),this._platform.isBrowser){let i=r(nt).createRenderer(null,null);this._listenerCleanups=t.runOutsideAngular(()=>[i.listen(a,"keydown",this._onKeydown,Ct),i.listen(a,"mousedown",this._onMousedown,Ct),i.listen(a,"touchstart",this._onTouchstart,Ct)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(t=>t())}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Y=(function(e){return e[e.IMMEDIATE=0]="IMMEDIATE",e[e.EVENTUAL=1]="EVENTUAL",e})(Y||{}),De=new m("cdk-focus-monitor-default-options"),it=B({passive:!0,capture:!0}),Ot=(()=>{class e{_ngZone=r(b);_platform=r(p);_inputModalityDetector=r(Me);_origin=null;_lastFocusOrigin=null;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=r(h);_stopInputModalityDetector=new _;constructor(){let t=r(De,{optional:!0});this._detectionMode=t?.detectionMode||Y.IMMEDIATE}_rootNodeFocusAndBlurListener=t=>{let a=x(t);for(let n=a;n;n=n.parentElement)t.type==="focus"?this._onFocus(t,n):this._onBlur(t,n)};monitor(t,a=!1){let n=R(t);if(!this._platform.isBrowser||n.nodeType!==1)return Jt();let i=Dt(n)||this._document,s=this._elementInfo.get(n);if(s)return a&&(s.checkChildren=!0),s.subject;let d={checkChildren:a,subject:new _,rootNode:i};return this._elementInfo.set(n,d),this._registerGlobalListeners(d),d.subject}stopMonitoring(t){let a=R(t),n=this._elementInfo.get(a);n&&(n.subject.complete(),this._setClasses(a),this._elementInfo.delete(a),this._removeGlobalListeners(n))}focusVia(t,a,n){let i=R(t),s=this._document.activeElement;i===s?this._getClosestElementsInfo(i).forEach(([d,g])=>this._originChanged(d,a,g)):(this._setOrigin(a),typeof i.focus=="function"&&i.focus(n))}ngOnDestroy(){this._elementInfo.forEach((t,a)=>this.stopMonitoring(a))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(t){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(t)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:t&&this._isLastInteractionFromInputLabel(t)?"mouse":"program"}_shouldBeAttributedToTouch(t){return this._detectionMode===Y.EVENTUAL||!!t?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(t,a){t.classList.toggle("cdk-focused",!!a),t.classList.toggle("cdk-touch-focused",a==="touch"),t.classList.toggle("cdk-keyboard-focused",a==="keyboard"),t.classList.toggle("cdk-mouse-focused",a==="mouse"),t.classList.toggle("cdk-program-focused",a==="program")}_setOrigin(t,a=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=t,this._originFromTouchInteraction=t==="touch"&&a,this._detectionMode===Y.IMMEDIATE){clearTimeout(this._originTimeoutId);let n=this._originFromTouchInteraction?Te:1;this._originTimeoutId=setTimeout(()=>this._origin=null,n)}})}_onFocus(t,a){let n=this._elementInfo.get(a),i=x(t);!n||!n.checkChildren&&a!==i||this._originChanged(a,this._getFocusOrigin(i),n)}_onBlur(t,a){let n=this._elementInfo.get(a);!n||n.checkChildren&&t.relatedTarget instanceof Node&&a.contains(t.relatedTarget)||(this._setClasses(a),this._emitOrigin(n,null))}_emitOrigin(t,a){t.subject.observers.length&&this._ngZone.run(()=>t.subject.next(a))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;let a=t.rootNode,n=this._rootNodeFocusListenerCount.get(a)||0;n||this._ngZone.runOutsideAngular(()=>{a.addEventListener("focus",this._rootNodeFocusAndBlurListener,it),a.addEventListener("blur",this._rootNodeFocusAndBlurListener,it)}),this._rootNodeFocusListenerCount.set(a,n+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(at(this._stopInputModalityDetector)).subscribe(i=>{this._setOrigin(i,!0)}))}_removeGlobalListeners(t){let a=t.rootNode;if(this._rootNodeFocusListenerCount.has(a)){let n=this._rootNodeFocusListenerCount.get(a);n>1?this._rootNodeFocusListenerCount.set(a,n-1):(a.removeEventListener("focus",this._rootNodeFocusAndBlurListener,it),a.removeEventListener("blur",this._rootNodeFocusAndBlurListener,it),this._rootNodeFocusListenerCount.delete(a))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(t,a,n){this._setClasses(t,a),this._emitOrigin(n,a),this._lastFocusOrigin=a}_getClosestElementsInfo(t){let a=[];return this._elementInfo.forEach((n,i)=>{(i===t||n.checkChildren&&i.contains(t))&&a.push([i,n])}),a}_isLastInteractionFromInputLabel(t){let{_mostRecentTarget:a,mostRecentModality:n}=this._inputModalityDetector;if(n!=="mouse"||!a||a===t||t.nodeName!=="INPUT"&&t.nodeName!=="TEXTAREA"||t.disabled)return!1;let i=t.labels;if(i){for(let s=0;s<i.length;s++)if(i[s].contains(a))return!0}return!1}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var rt=new WeakMap,M=(()=>{class e{_appRef;_injector=r(A);_environmentInjector=r(se);load(t){let a=this._appRef=this._appRef||this._injector.get(fe),n=rt.get(a);n||(n={loaders:new Set,refs:[]},rt.set(a,n),a.onDestroy(()=>{rt.get(a)?.refs.forEach(i=>i.destroy()),rt.delete(a)})),n.loaders.has(t)||(n.loaders.add(t),n.refs.push(ge(t,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var ct=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275cmp=y({type:e,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(a,n){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
1
+ import{$a as V,Aa as ot,B as ae,Ba as de,Ca as me,Da as le,F as tt,Fa as ue,G as oe,Gb as W,Hb as T,J as ne,Kc as _e,Ma as be,Oa as nt,Pa as pe,Q as et,R as ie,Rb as O,Sb as he,T as at,Uc as ye,V as re,Wa as y,Xa as I,Ya as k,Z as c,_ as E,a as u,aa as m,ca as r,db as It,e as Qt,ea as se,g as Xt,h as _,i as qt,ib as fe,jb as wt,ka as A,la as h,m as Jt,oa as xt,pa as b,t as H,ta as K,tc as N,u as te,ua as ce,uc as ve,vb as At,wb as Tt,wc as ge,x as ee,xb as C,ya as D,za as Et}from"./chunk-RNXBUYHW.js";function G(e){return e.buttons===0||e.detail===0}function Z(e){let o=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!!o&&o.identifier===-1&&(o.radiusX==null||o.radiusX===1)&&(o.radiusY==null||o.radiusY===1)}var Mt;function xe(){if(Mt==null){let e=typeof document<"u"?document.head:null;Mt=!!(e&&(e.createShadowRoot||e.attachShadow))}return Mt}function Dt(e){if(xe()){let o=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&o instanceof ShadowRoot)return o}return null}function sa(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){let o=e.shadowRoot.activeElement;if(o===e)break;e=o}return e}function x(e){return e.composedPath?e.composedPath()[0]:e.target}var kt;try{kt=typeof Intl<"u"&&Intl.v8BreakIterator}catch(e){kt=!1}var p=(()=>{class e{_platformId=r(de);isBrowser=this._platformId?_e(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||kt)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var $;function Ee(){if($==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>$=!0}))}finally{$=$||!1}return $}function B(e){return Ee()?e:!!e.capture}function ca(e,o=0){return Ie(e)?Number(e):arguments.length===2?o:0}function Ie(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function R(e){return e instanceof D?e.nativeElement:e}var we=new m("cdk-input-modality-detector-options"),Ae={ignoreKeys:[18,17,224,91,16]},Te=650,Ct={passive:!0,capture:!0},Me=(()=>{class e{_platform=r(p);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new qt(null);_options;_lastTouchMs=0;_onKeydown=t=>{this._options?.ignoreKeys?.some(a=>a===t.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=x(t))};_onMousedown=t=>{Date.now()-this._lastTouchMs<Te||(this._modality.next(G(t)?"keyboard":"mouse"),this._mostRecentTarget=x(t))};_onTouchstart=t=>{if(Z(t)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=x(t)};constructor(){let t=r(b),a=r(h),n=r(we,{optional:!0});if(this._options=u(u({},Ae),n),this.modalityDetected=this._modality.pipe(et(1)),this.modalityChanged=this.modalityDetected.pipe(ne()),this._platform.isBrowser){let i=r(nt).createRenderer(null,null);this._listenerCleanups=t.runOutsideAngular(()=>[i.listen(a,"keydown",this._onKeydown,Ct),i.listen(a,"mousedown",this._onMousedown,Ct),i.listen(a,"touchstart",this._onTouchstart,Ct)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(t=>t())}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Y=(function(e){return e[e.IMMEDIATE=0]="IMMEDIATE",e[e.EVENTUAL=1]="EVENTUAL",e})(Y||{}),De=new m("cdk-focus-monitor-default-options"),it=B({passive:!0,capture:!0}),Ot=(()=>{class e{_ngZone=r(b);_platform=r(p);_inputModalityDetector=r(Me);_origin=null;_lastFocusOrigin=null;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=r(h);_stopInputModalityDetector=new _;constructor(){let t=r(De,{optional:!0});this._detectionMode=t?.detectionMode||Y.IMMEDIATE}_rootNodeFocusAndBlurListener=t=>{let a=x(t);for(let n=a;n;n=n.parentElement)t.type==="focus"?this._onFocus(t,n):this._onBlur(t,n)};monitor(t,a=!1){let n=R(t);if(!this._platform.isBrowser||n.nodeType!==1)return Jt();let i=Dt(n)||this._document,s=this._elementInfo.get(n);if(s)return a&&(s.checkChildren=!0),s.subject;let d={checkChildren:a,subject:new _,rootNode:i};return this._elementInfo.set(n,d),this._registerGlobalListeners(d),d.subject}stopMonitoring(t){let a=R(t),n=this._elementInfo.get(a);n&&(n.subject.complete(),this._setClasses(a),this._elementInfo.delete(a),this._removeGlobalListeners(n))}focusVia(t,a,n){let i=R(t),s=this._document.activeElement;i===s?this._getClosestElementsInfo(i).forEach(([d,g])=>this._originChanged(d,a,g)):(this._setOrigin(a),typeof i.focus=="function"&&i.focus(n))}ngOnDestroy(){this._elementInfo.forEach((t,a)=>this.stopMonitoring(a))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(t){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(t)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:t&&this._isLastInteractionFromInputLabel(t)?"mouse":"program"}_shouldBeAttributedToTouch(t){return this._detectionMode===Y.EVENTUAL||!!t?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(t,a){t.classList.toggle("cdk-focused",!!a),t.classList.toggle("cdk-touch-focused",a==="touch"),t.classList.toggle("cdk-keyboard-focused",a==="keyboard"),t.classList.toggle("cdk-mouse-focused",a==="mouse"),t.classList.toggle("cdk-program-focused",a==="program")}_setOrigin(t,a=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=t,this._originFromTouchInteraction=t==="touch"&&a,this._detectionMode===Y.IMMEDIATE){clearTimeout(this._originTimeoutId);let n=this._originFromTouchInteraction?Te:1;this._originTimeoutId=setTimeout(()=>this._origin=null,n)}})}_onFocus(t,a){let n=this._elementInfo.get(a),i=x(t);!n||!n.checkChildren&&a!==i||this._originChanged(a,this._getFocusOrigin(i),n)}_onBlur(t,a){let n=this._elementInfo.get(a);!n||n.checkChildren&&t.relatedTarget instanceof Node&&a.contains(t.relatedTarget)||(this._setClasses(a),this._emitOrigin(n,null))}_emitOrigin(t,a){t.subject.observers.length&&this._ngZone.run(()=>t.subject.next(a))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;let a=t.rootNode,n=this._rootNodeFocusListenerCount.get(a)||0;n||this._ngZone.runOutsideAngular(()=>{a.addEventListener("focus",this._rootNodeFocusAndBlurListener,it),a.addEventListener("blur",this._rootNodeFocusAndBlurListener,it)}),this._rootNodeFocusListenerCount.set(a,n+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(at(this._stopInputModalityDetector)).subscribe(i=>{this._setOrigin(i,!0)}))}_removeGlobalListeners(t){let a=t.rootNode;if(this._rootNodeFocusListenerCount.has(a)){let n=this._rootNodeFocusListenerCount.get(a);n>1?this._rootNodeFocusListenerCount.set(a,n-1):(a.removeEventListener("focus",this._rootNodeFocusAndBlurListener,it),a.removeEventListener("blur",this._rootNodeFocusAndBlurListener,it),this._rootNodeFocusListenerCount.delete(a))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(t,a,n){this._setClasses(t,a),this._emitOrigin(n,a),this._lastFocusOrigin=a}_getClosestElementsInfo(t){let a=[];return this._elementInfo.forEach((n,i)=>{(i===t||n.checkChildren&&i.contains(t))&&a.push([i,n])}),a}_isLastInteractionFromInputLabel(t){let{_mostRecentTarget:a,mostRecentModality:n}=this._inputModalityDetector;if(n!=="mouse"||!a||a===t||t.nodeName!=="INPUT"&&t.nodeName!=="TEXTAREA"||t.disabled)return!1;let i=t.labels;if(i){for(let s=0;s<i.length;s++)if(i[s].contains(a))return!0}return!1}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var rt=new WeakMap,M=(()=>{class e{_appRef;_injector=r(A);_environmentInjector=r(se);load(t){let a=this._appRef=this._appRef||this._injector.get(fe),n=rt.get(a);n||(n={loaders:new Set,refs:[]},rt.set(a,n),a.onDestroy(()=>{rt.get(a)?.refs.forEach(i=>i.destroy()),rt.delete(a)})),n.loaders.has(t)||(n.loaders.add(t),n.refs.push(ge(t,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var ct=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275cmp=y({type:e,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(a,n){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
2
2
  `],encapsulation:2,changeDetection:0})}return e})(),st;function da(){if(st===void 0&&(st=null,typeof window<"u")){let e=window;e.trustedTypes!==void 0&&(st=e.trustedTypes.createPolicy("angular#components",{createHTML:o=>o}))}return st}function ma(e){return da()?.createHTML(e)||e}function ke(e,o,t){let a=t.sanitize(ue.HTML,o);e.innerHTML=ma(a||"")}function dt(e){return Array.isArray(e)?e:[e]}var Ce=new Set,S,mt=(()=>{class e{_platform=r(p);_nonce=r(le,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):ua}matchMedia(t){return(this._platform.WEBKIT||this._platform.BLINK)&&la(t,this._nonce),this._matchMedia(t)}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function la(e,o){if(!Ce.has(e))try{S||(S=document.createElement("style"),o&&S.setAttribute("nonce",o),S.setAttribute("type","text/css"),document.head.appendChild(S)),S.sheet&&(S.sheet.insertRule(`@media ${e} {body{ }}`,0),Ce.add(e))}catch(t){console.error(t)}}function ua(e){return{matches:e==="all"||e==="",media:e,addListener:()=>{},removeListener:()=>{}}}var Nt=(()=>{class e{_mediaMatcher=r(mt);_zone=r(b);_queries=new Map;_destroySubject=new _;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return Oe(dt(t)).some(n=>this._registerQuery(n).mql.matches)}observe(t){let n=Oe(dt(t)).map(s=>this._registerQuery(s).observable),i=te(n);return i=ee(i.pipe(oe(1)),i.pipe(et(1),tt(0))),i.pipe(H(s=>{let d={matches:!1,breakpoints:{}};return s.forEach(({matches:g,query:w})=>{d.matches=d.matches||g,d.breakpoints[w]=g}),d}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);let a=this._mediaMatcher.matchMedia(t),i={observable:new Xt(s=>{let d=g=>this._zone.run(()=>s.next(g));return a.addListener(d),()=>{a.removeListener(d)}}).pipe(ie(a),H(({matches:s})=>({query:t,matches:s})),at(this._destroySubject)),mql:a};return this._queries.set(t,i),i}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Oe(e){return e.map(o=>o.split(",")).reduce((o,t)=>o.concat(t)).map(o=>o.trim())}var ba=(()=>{class e{create(t){return typeof MutationObserver>"u"?null:new MutationObserver(t)}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var Ne=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275mod=I({type:e});static \u0275inj=E({providers:[ba]})}return e})();var Se=(()=>{class e{_platform=r(p);constructor(){}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return fa(t)&&getComputedStyle(t).visibility==="visible"}isTabbable(t){if(!this._platform.isBrowser)return!1;let a=pa(Ia(t));if(a&&(Re(a)===-1||!this.isVisible(a)))return!1;let n=t.nodeName.toLowerCase(),i=Re(t);return t.hasAttribute("contenteditable")?i!==-1:n==="iframe"||n==="object"||this._platform.WEBKIT&&this._platform.IOS&&!xa(t)?!1:n==="audio"?t.hasAttribute("controls")?i!==-1:!1:n==="video"?i===-1?!1:i!==null?!0:this._platform.FIREFOX||t.hasAttribute("controls"):t.tabIndex>=0}isFocusable(t,a){return Ea(t)&&!this.isDisabled(t)&&(a?.ignoreVisibility||this.isVisible(t))}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function pa(e){try{return e.frameElement}catch(o){return null}}function fa(e){return!!(e.offsetWidth||e.offsetHeight||typeof e.getClientRects=="function"&&e.getClientRects().length)}function ha(e){let o=e.nodeName.toLowerCase();return o==="input"||o==="select"||o==="button"||o==="textarea"}function va(e){return _a(e)&&e.type=="hidden"}function ga(e){return ya(e)&&e.hasAttribute("href")}function _a(e){return e.nodeName.toLowerCase()=="input"}function ya(e){return e.nodeName.toLowerCase()=="a"}function Pe(e){if(!e.hasAttribute("tabindex")||e.tabIndex===void 0)return!1;let o=e.getAttribute("tabindex");return!!(o&&!isNaN(parseInt(o,10)))}function Re(e){if(!Pe(e))return null;let o=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(o)?-1:o}function xa(e){let o=e.nodeName.toLowerCase(),t=o==="input"&&e.type;return t==="text"||t==="password"||o==="select"||o==="textarea"}function Ea(e){return va(e)?!1:ha(e)||ga(e)||e.hasAttribute("contenteditable")||Pe(e)}function Ia(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}var lt=class{_element;_checker;_ngZone;_document;_injector;_startAnchor=null;_endAnchor=null;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(o){this._enabled=o,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(o,this._startAnchor),this._toggleAnchorTabIndex(o,this._endAnchor))}_enabled=!0;constructor(o,t,a,n,i=!1,s){this._element=o,this._checker=t,this._ngZone=a,this._document=n,this._injector=s,i||this.attachAnchors()}destroy(){let o=this._startAnchor,t=this._endAnchor;o&&(o.removeEventListener("focus",this.startAnchorListener),o.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(o){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(o)))})}focusFirstTabbableElementWhenReady(o){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(o)))})}focusLastTabbableElementWhenReady(o){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(o)))})}_getRegionBoundary(o){let t=this._element.querySelectorAll(`[cdk-focus-region-${o}], [cdkFocusRegion${o}], [cdk-focus-${o}]`);return o=="start"?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(o){let t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){let a=this._getFirstTabbableElement(t);return a?.focus(o),!!a}return t.focus(o),!0}return this.focusFirstTabbableElement(o)}focusFirstTabbableElement(o){let t=this._getRegionBoundary("start");return t&&t.focus(o),!!t}focusLastTabbableElement(o){let t=this._getRegionBoundary("end");return t&&t.focus(o),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(o){if(this._checker.isFocusable(o)&&this._checker.isTabbable(o))return o;let t=o.children;for(let a=0;a<t.length;a++){let n=t[a].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(t[a]):null;if(n)return n}return null}_getLastTabbableElement(o){if(this._checker.isFocusable(o)&&this._checker.isTabbable(o))return o;let t=o.children;for(let a=t.length-1;a>=0;a--){let n=t[a].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[a]):null;if(n)return n}return null}_createAnchor(){let o=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,o),o.classList.add("cdk-visually-hidden"),o.classList.add("cdk-focus-trap-anchor"),o.setAttribute("aria-hidden","true"),o}_toggleAnchorTabIndex(o,t){o?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(o){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(o,this._startAnchor),this._toggleAnchorTabIndex(o,this._endAnchor))}_executeOnStable(o){this._injector?be(o,{injector:this._injector}):setTimeout(o)}},wa=(()=>{class e{_checker=r(Se);_ngZone=r(b);_document=r(h);_injector=r(A);constructor(){r(M).load(ct)}create(t,a=!1){return new lt(t,this._checker,this._ngZone,this._document,a,this._injector)}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var Be=new m("liveAnnouncerElement",{providedIn:"root",factory:()=>null}),je=new m("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),Aa=0,Ta=(()=>{class e{_ngZone=r(b);_defaultOptions=r(je,{optional:!0});_liveElement;_document=r(h);_sanitizer=r(ye);_previousTimeout;_currentPromise;_currentResolve;constructor(){let t=r(Be,{optional:!0});this._liveElement=t||this._createLiveElement()}announce(t,...a){let n=this._defaultOptions,i,s;return a.length===1&&typeof a[0]=="number"?s=a[0]:[i,s]=a,this.clear(),clearTimeout(this._previousTimeout),i||(i=n&&n.politeness?n.politeness:"polite"),s==null&&n&&(s=n.duration),this._liveElement.setAttribute("aria-live",i),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(d=>this._currentResolve=d)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{!t||typeof t=="string"?this._liveElement.textContent=t:ke(this._liveElement,t,this._sanitizer),typeof s=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),s)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let t="cdk-live-announcer-element",a=this._document.getElementsByClassName(t),n=this._document.createElement("div");for(let i=0;i<a.length;i++)a[i].remove();return n.classList.add(t),n.classList.add("cdk-visually-hidden"),n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live","polite"),n.id=`cdk-live-announcer-${Aa++}`,this._document.body.appendChild(n),n}_exposeAnnouncerToModals(t){let a=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let n=0;n<a.length;n++){let i=a[n],s=i.getAttribute("aria-owns");s?s.indexOf(t)===-1&&i.setAttribute("aria-owns",s+" "+t):i.setAttribute("aria-owns",t)}}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var F=(function(e){return e[e.NONE=0]="NONE",e[e.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",e[e.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",e})(F||{}),Fe="cdk-high-contrast-black-on-white",Le="cdk-high-contrast-white-on-black",Rt="cdk-high-contrast-active",Ue=(()=>{class e{_platform=r(p);_hasCheckedHighContrastMode=!1;_document=r(h);_breakpointSubscription;constructor(){this._breakpointSubscription=r(Nt).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return F.NONE;let t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);let a=this._document.defaultView||window,n=a&&a.getComputedStyle?a.getComputedStyle(t):null,i=(n&&n.backgroundColor||"").replace(/ /g,"");switch(t.remove(),i){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return F.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return F.BLACK_ON_WHITE}return F.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let t=this._document.body.classList;t.remove(Rt,Fe,Le),this._hasCheckedHighContrastMode=!0;let a=this.getHighContrastMode();a===F.BLACK_ON_WHITE?t.add(Rt,Fe):a===F.WHITE_ON_BLACK&&t.add(Rt,Le)}}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Ma=(()=>{class e{constructor(){r(Ue)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(a){return new(a||e)};static \u0275mod=I({type:e});static \u0275inj=E({imports:[Ne]})}return e})();var Ft={},Lt=class e{_appId=r(ot);static _infix=`a${Math.floor(Math.random()*1e5).toString()}`;getId(o,t=!1){return this._appId!=="ng"&&(o+=this._appId),Ft.hasOwnProperty(o)||(Ft[o]=0),`${o}${t?e._infix+"-":""}${Ft[o]++}`}static \u0275fac=function(t){return new(t||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})};var Da=200,ut=class{_letterKeyStream=new _;_items=[];_selectedItemIndex=-1;_pressedLetters=[];_skipPredicateFn;_selectedItem=new _;selectedItem=this._selectedItem;constructor(o,t){let a=typeof t?.debounceInterval=="number"?t.debounceInterval:Da;t?.skipPredicate&&(this._skipPredicateFn=t.skipPredicate),this.setItems(o),this._setupKeyHandler(a)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(o){this._selectedItemIndex=o}setItems(o){this._items=o}handleKey(o){let t=o.keyCode;o.key&&o.key.length===1?this._letterKeyStream.next(o.key.toLocaleUpperCase()):(t>=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(o){this._letterKeyStream.pipe(re(t=>this._pressedLetters.push(t)),tt(o),ae(()=>this._pressedLetters.length>0),H(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(t=>{for(let a=1;a<this._items.length+1;a++){let n=(this._selectedItemIndex+a)%this._items.length,i=this._items[n];if(!this._skipPredicateFn?.(i)&&i.getLabel?.().toLocaleUpperCase().trim().indexOf(t)===0){this._selectedItem.next(i);break}}this._pressedLetters=[]})}};function ze(e,...o){return o.length?o.some(t=>e[t]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}var j=class{_items;_activeItemIndex=K(-1);_activeItem=K(null);_wrap=!1;_typeaheadSubscription=Qt.EMPTY;_itemChangesSubscription;_vertical=!0;_horizontal=null;_allowedModifierKeys=[];_homeAndEnd=!1;_pageUpAndDown={enabled:!1,delta:10};_effectRef;_typeahead;_skipPredicateFn=o=>o.disabled;constructor(o,t){this._items=o,o instanceof Et?this._itemChangesSubscription=o.changes.subscribe(a=>this._itemsChanged(a.toArray())):It(o)&&(this._effectRef=ce(()=>this._itemsChanged(o()),{injector:t}))}tabOut=new _;change=new _;skipPredicate(o){return this._skipPredicateFn=o,this}withWrap(o=!0){return this._wrap=o,this}withVerticalOrientation(o=!0){return this._vertical=o,this}withHorizontalOrientation(o){return this._horizontal=o,this}withAllowedModifierKeys(o){return this._allowedModifierKeys=o,this}withTypeAhead(o=200){this._typeaheadSubscription.unsubscribe();let t=this._getItemsArray();return this._typeahead=new ut(t,{debounceInterval:typeof o=="number"?o:void 0,skipPredicate:a=>this._skipPredicateFn(a)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(a=>{this.setActiveItem(a)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(o=!0){return this._homeAndEnd=o,this}withPageUpDown(o=!0,t=10){return this._pageUpAndDown={enabled:o,delta:t},this}setActiveItem(o){let t=this._activeItem();this.updateActiveItem(o),this._activeItem()!==t&&this.change.next(this._activeItemIndex())}onKeydown(o){let t=o.keyCode,n=["altKey","ctrlKey","metaKey","shiftKey"].every(i=>!o[i]||this._allowedModifierKeys.indexOf(i)>-1);switch(t){case 9:this.tabOut.next();return;case 40:if(this._vertical&&n){this.setNextItemActive();break}else return;case 38:if(this._vertical&&n){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&n){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&n){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&n){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&n){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&n){let i=this._activeItemIndex()-this._pageUpAndDown.delta;this._setActiveItemByIndex(i>0?i:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&n){let i=this._activeItemIndex()+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(i<s?i:s-1,-1);break}else return;default:(n||ze(o,"shiftKey"))&&this._typeahead?.handleKey(o);return}this._typeahead?.reset(),o.preventDefault()}get activeItemIndex(){return this._activeItemIndex()}get activeItem(){return this._activeItem()}isTyping(){return!!this._typeahead&&this._typeahead.isTyping()}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._getItemsArray().length-1,-1)}setNextItemActive(){this._activeItemIndex()<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex()<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(o){let t=this._getItemsArray(),a=typeof o=="number"?o:t.indexOf(o),n=t[a];this._activeItem.set(n??null),this._activeItemIndex.set(a),this._typeahead?.setCurrentSelectedItemIndex(a)}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._effectRef?.destroy(),this._typeahead?.destroy(),this.tabOut.complete(),this.change.complete()}_setActiveItemByDelta(o){this._wrap?this._setActiveInWrapMode(o):this._setActiveInDefaultMode(o)}_setActiveInWrapMode(o){let t=this._getItemsArray();for(let a=1;a<=t.length;a++){let n=(this._activeItemIndex()+o*a+t.length)%t.length,i=t[n];if(!this._skipPredicateFn(i)){this.setActiveItem(n);return}}}_setActiveInDefaultMode(o){this._setActiveItemByIndex(this._activeItemIndex()+o,o)}_setActiveItemByIndex(o,t){let a=this._getItemsArray();if(a[o]){for(;this._skipPredicateFn(a[o]);)if(o+=t,!a[o])return;this.setActiveItem(o)}}_getItemsArray(){return It(this._items)?this._items():this._items instanceof Et?this._items.toArray():this._items}_itemsChanged(o){this._typeahead?.setItems(o);let t=this._activeItem();if(t){let a=o.indexOf(t);a>-1&&a!==this._activeItemIndex()&&(this._activeItemIndex.set(a),this._typeahead?.setCurrentSelectedItemIndex(a))}}};var St=class extends j{setActiveItem(o){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(o),this.activeItem&&this.activeItem.setActiveStyles()}};var Pt=class extends j{_origin="program";setFocusOrigin(o){return this._origin=o,this}setActiveItem(o){super.setActiveItem(o),this.activeItem&&this.activeItem.focus(this._origin)}};var Ke=" ";function ka(e,o,t){let a=pt(e,o);t=t.trim(),!a.some(n=>n.trim()===t)&&(a.push(t),e.setAttribute(o,a.join(Ke)))}function Ca(e,o,t){let a=pt(e,o);t=t.trim();let n=a.filter(i=>i!==t);n.length?e.setAttribute(o,n.join(Ke)):e.removeAttribute(o)}function pt(e,o){return e.getAttribute(o)?.match(/\S+/g)??[]}var Ve="cdk-describedby-message",bt="cdk-describedby-host",jt=0,zn=(()=>{class e{_platform=r(p);_document=r(h);_messageRegistry=new Map;_messagesContainer=null;_id=`${jt++}`;constructor(){r(M).load(ct),this._id=r(ot)+"-"+jt++}describe(t,a,n){if(!this._canBeDescribed(t,a))return;let i=Bt(a,n);typeof a!="string"?(He(a,this._id),this._messageRegistry.set(i,{messageElement:a,referenceCount:0})):this._messageRegistry.has(i)||this._createMessageElement(a,n),this._isElementDescribedByMessage(t,i)||this._addMessageReference(t,i)}removeDescription(t,a,n){if(!a||!this._isElementNode(t))return;let i=Bt(a,n);if(this._isElementDescribedByMessage(t,i)&&this._removeMessageReference(t,i),typeof a=="string"){let s=this._messageRegistry.get(i);s&&s.referenceCount===0&&this._deleteMessageElement(i)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let t=this._document.querySelectorAll(`[${bt}="${this._id}"]`);for(let a=0;a<t.length;a++)this._removeCdkDescribedByReferenceIds(t[a]),t[a].removeAttribute(bt);this._messagesContainer?.remove(),this._messagesContainer=null,this._messageRegistry.clear()}_createMessageElement(t,a){let n=this._document.createElement("div");He(n,this._id),n.textContent=t,a&&n.setAttribute("role",a),this._createMessagesContainer(),this._messagesContainer.appendChild(n),this._messageRegistry.set(Bt(t,a),{messageElement:n,referenceCount:0})}_deleteMessageElement(t){this._messageRegistry.get(t)?.messageElement?.remove(),this._messageRegistry.delete(t)}_createMessagesContainer(){if(this._messagesContainer)return;let t="cdk-describedby-message-container",a=this._document.querySelectorAll(`.${t}[platform="server"]`);for(let i=0;i<a.length;i++)a[i].remove();let n=this._document.createElement("div");n.style.visibility="hidden",n.classList.add(t),n.classList.add("cdk-visually-hidden"),this._platform.isBrowser||n.setAttribute("platform","server"),this._document.body.appendChild(n),this._messagesContainer=n}_removeCdkDescribedByReferenceIds(t){let a=pt(t,"aria-describedby").filter(n=>n.indexOf(Ve)!=0);t.setAttribute("aria-describedby",a.join(" "))}_addMessageReference(t,a){let n=this._messageRegistry.get(a);ka(t,"aria-describedby",n.messageElement.id),t.setAttribute(bt,this._id),n.referenceCount++}_removeMessageReference(t,a){let n=this._messageRegistry.get(a);n.referenceCount--,Ca(t,"aria-describedby",n.messageElement.id),t.removeAttribute(bt)}_isElementDescribedByMessage(t,a){let n=pt(t,"aria-describedby"),i=this._messageRegistry.get(a),s=i&&i.messageElement.id;return!!s&&n.indexOf(s)!=-1}_canBeDescribed(t,a){if(!this._isElementNode(t))return!1;if(a&&typeof a=="object")return!0;let n=a==null?"":`${a}`.trim(),i=t.getAttribute("aria-label");return n?!i||i.trim()!==n:!1}_isElementNode(t){return t.nodeType===this._document.ELEMENT_NODE}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Bt(e,o){return typeof e=="string"?`${o||""}/${e}`:e}function He(e,o){e.id||(e.id=`${Ve}-${o}-${jt++}`)}var Q=(function(e){return e[e.NORMAL=0]="NORMAL",e[e.NEGATED=1]="NEGATED",e[e.INVERTED=2]="INVERTED",e})(Q||{}),ft,P;function Yn(){if(P==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return P=!1,P;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)P=!0;else{let e=Element.prototype.scrollTo;e?P=!/\{\s*\[native code\]\s*\}/.test(e.toString()):P=!1}}return P}function Qn(){if(typeof document!="object"||!document)return Q.NORMAL;if(ft==null){let e=document.createElement("div"),o=e.style;e.dir="rtl",o.width="1px",o.overflow="auto",o.visibility="hidden",o.pointerEvents="none",o.position="absolute";let t=document.createElement("div"),a=t.style;a.width="2px",a.height="1px",e.appendChild(t),document.body.appendChild(e),ft=Q.NORMAL,e.scrollLeft===0&&(e.scrollLeft=1,ft=e.scrollLeft===0?Q.NEGATED:Q.INVERTED),e.remove()}return ft}function qn(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var U,We=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function ti(){if(U)return U;if(typeof document!="object"||!document)return U=new Set(We),U;let e=document.createElement("input");return U=new Set(We.filter(o=>(e.setAttribute("type",o),e.type===o))),U}var ii={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};var Oa=new m("MATERIAL_ANIMATIONS"),Ge=null;function Na(){return r(Oa,{optional:!0})?.animationsDisabled||r(me,{optional:!0})==="NoopAnimations"?"di-disabled":(Ge??=r(mt).matchMedia("(prefers-reduced-motion)").matches,Ge?"reduced-motion":"enabled")}function z(){return Na()!=="enabled"}function li(e){return e==null?"":typeof e=="string"?e:`${e}px`}function bi(e){return e!=null&&`${e}`!="false"}var v=(function(e){return e[e.FADING_IN=0]="FADING_IN",e[e.VISIBLE=1]="VISIBLE",e[e.FADING_OUT=2]="FADING_OUT",e[e.HIDDEN=3]="HIDDEN",e})(v||{}),Ut=class{_renderer;element;config;_animationForciblyDisabledThroughCss;state=v.HIDDEN;constructor(o,t,a,n=!1){this._renderer=o,this.element=t,this.config=a,this._animationForciblyDisabledThroughCss=n}fadeOut(){this._renderer.fadeOutRipple(this)}},Ze=B({passive:!0,capture:!0}),zt=class{_events=new Map;addHandler(o,t,a,n){let i=this._events.get(t);if(i){let s=i.get(a);s?s.add(n):i.set(a,new Set([n]))}else this._events.set(t,new Map([[a,new Set([n])]])),o.runOutsideAngular(()=>{document.addEventListener(t,this._delegateEventHandler,Ze)})}removeHandler(o,t,a){let n=this._events.get(o);if(!n)return;let i=n.get(t);i&&(i.delete(a),i.size===0&&n.delete(t),n.size===0&&(this._events.delete(o),document.removeEventListener(o,this._delegateEventHandler,Ze)))}_delegateEventHandler=o=>{let t=x(o);t&&this._events.get(o.type)?.forEach((a,n)=>{(n===t||n.contains(t))&&a.forEach(i=>i.handleEvent(o))})}},X={enterDuration:225,exitDuration:150},Ra=800,$e=B({passive:!0,capture:!0}),Ye=["mousedown","touchstart"],Qe=["mouseup","mouseleave","touchend","touchcancel"],Fa=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275cmp=y({type:e,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],decls:0,vars:0,template:function(a,n){},styles:[`.mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale3d(0, 0, 0);background-color:var(--mat-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface) 10%, transparent))}@media(forced-colors: active){.mat-ripple-element{display:none}}.cdk-drag-preview .mat-ripple-element,.cdk-drag-placeholder .mat-ripple-element{display:none}
3
3
  `],encapsulation:2,changeDetection:0})}return e})(),q=class e{_target;_ngZone;_platform;_containerElement;_triggerElement=null;_isPointerDown=!1;_activeRipples=new Map;_mostRecentTransientRipple=null;_lastTouchStartEvent;_pointerUpEventsRegistered=!1;_containerRect=null;static _eventManager=new zt;constructor(o,t,a,n,i){this._target=o,this._ngZone=t,this._platform=n,n.isBrowser&&(this._containerElement=R(a)),i&&i.get(M).load(Fa)}fadeInRipple(o,t,a={}){let n=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),i=u(u({},X),a.animation);a.centered&&(o=n.left+n.width/2,t=n.top+n.height/2);let s=a.radius||La(o,t,n),d=o-n.left,g=t-n.top,w=i.enterDuration,f=document.createElement("div");f.classList.add("mat-ripple-element"),f.style.left=`${d-s}px`,f.style.top=`${g-s}px`,f.style.height=`${s*2}px`,f.style.width=`${s*2}px`,a.color!=null&&(f.style.backgroundColor=a.color),f.style.transitionDuration=`${w}ms`,this._containerElement.appendChild(f);let Gt=window.getComputedStyle(f),ra=Gt.transitionProperty,Zt=Gt.transitionDuration,_t=ra==="none"||Zt==="0s"||Zt==="0s, 0s"||n.width===0&&n.height===0,L=new Ut(this,f,a,_t);f.style.transform="scale3d(1, 1, 1)",L.state=v.FADING_IN,a.persistent||(this._mostRecentTransientRipple=L);let J=null;return!_t&&(w||i.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let $t=()=>{J&&(J.fallbackTimer=null),clearTimeout(Yt),this._finishRippleTransition(L)},yt=()=>this._destroyRipple(L),Yt=setTimeout(yt,w+100);f.addEventListener("transitionend",$t),f.addEventListener("transitioncancel",yt),J={onTransitionEnd:$t,onTransitionCancel:yt,fallbackTimer:Yt}}),this._activeRipples.set(L,J),(_t||!w)&&this._finishRippleTransition(L),L}fadeOutRipple(o){if(o.state===v.FADING_OUT||o.state===v.HIDDEN)return;let t=o.element,a=u(u({},X),o.config.animation);t.style.transitionDuration=`${a.exitDuration}ms`,t.style.opacity="0",o.state=v.FADING_OUT,(o._animationForciblyDisabledThroughCss||!a.exitDuration)&&this._finishRippleTransition(o)}fadeOutAll(){this._getActiveRipples().forEach(o=>o.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(o=>{o.config.persistent||o.fadeOut()})}setupTriggerEvents(o){let t=R(o);!this._platform.isBrowser||!t||t===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=t,Ye.forEach(a=>{e._eventManager.addHandler(this._ngZone,a,t,this)}))}handleEvent(o){o.type==="mousedown"?this._onMousedown(o):o.type==="touchstart"?this._onTouchStart(o):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{Qe.forEach(t=>{this._triggerElement.addEventListener(t,this,$e)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(o){o.state===v.FADING_IN?this._startFadeOutTransition(o):o.state===v.FADING_OUT&&this._destroyRipple(o)}_startFadeOutTransition(o){let t=o===this._mostRecentTransientRipple,{persistent:a}=o.config;o.state=v.VISIBLE,!a&&(!t||!this._isPointerDown)&&o.fadeOut()}_destroyRipple(o){let t=this._activeRipples.get(o)??null;this._activeRipples.delete(o),this._activeRipples.size||(this._containerRect=null),o===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),o.state=v.HIDDEN,t!==null&&(o.element.removeEventListener("transitionend",t.onTransitionEnd),o.element.removeEventListener("transitioncancel",t.onTransitionCancel),t.fallbackTimer!==null&&clearTimeout(t.fallbackTimer)),o.element.remove()}_onMousedown(o){let t=G(o),a=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+Ra;!this._target.rippleDisabled&&!t&&!a&&(this._isPointerDown=!0,this.fadeInRipple(o.clientX,o.clientY,this._target.rippleConfig))}_onTouchStart(o){if(!this._target.rippleDisabled&&!Z(o)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;let t=o.changedTouches;if(t)for(let a=0;a<t.length;a++)this.fadeInRipple(t[a].clientX,t[a].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._getActiveRipples().forEach(o=>{let t=o.state===v.VISIBLE||o.config.terminateOnPointerUp&&o.state===v.FADING_IN;!o.config.persistent&&t&&o.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let o=this._triggerElement;o&&(Ye.forEach(t=>e._eventManager.removeHandler(t,o,this)),this._pointerUpEventsRegistered&&(Qe.forEach(t=>o.removeEventListener(t,this,$e)),this._pointerUpEventsRegistered=!1))}};function La(e,o,t){let a=Math.max(Math.abs(e-t.left),Math.abs(e-t.right)),n=Math.max(Math.abs(o-t.top),Math.abs(o-t.bottom));return Math.sqrt(a*a+n*n)}var Ht=new m("mat-ripple-global-options"),Di=(()=>{class e{_elementRef=r(D);_animationsDisabled=z();color;unbounded=!1;centered=!1;radius=0;animation;get disabled(){return this._disabled}set disabled(t){t&&this.fadeOutAllNonPersistent(),this._disabled=t,this._setupTriggerEventsIfEnabled()}_disabled=!1;get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}_trigger;_rippleRenderer;_globalOptions;_isInitialized=!1;constructor(){let t=r(b),a=r(p),n=r(Ht,{optional:!0}),i=r(A);this._globalOptions=n||{},this._rippleRenderer=new q(this,t,this._elementRef,a,i)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:u(u(u({},this._globalOptions.animation),this._animationsDisabled?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,a=0,n){return typeof t=="number"?this._rippleRenderer.fadeInRipple(t,a,u(u({},this.rippleConfig),n)):this._rippleRenderer.fadeInRipple(0,0,u(u({},this.rippleConfig),t))}static \u0275fac=function(a){return new(a||e)};static \u0275dir=k({type:e,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(a,n){a&2&&O("mat-ripple-unbounded",n.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"]})}return e})();var Sa={capture:!0},Pa=["focus","mousedown","mouseenter","touchstart"],Kt="mat-ripple-loader-uninitialized",Vt="mat-ripple-loader-class-name",Xe="mat-ripple-loader-centered",ht="mat-ripple-loader-disabled",qe=(()=>{class e{_document=r(h);_animationsDisabled=z();_globalRippleOptions=r(Ht,{optional:!0});_platform=r(p);_ngZone=r(b);_injector=r(A);_eventCleanups;_hosts=new Map;constructor(){let t=r(nt).createRenderer(null,null);this._eventCleanups=this._ngZone.runOutsideAngular(()=>Pa.map(a=>t.listen(this._document,a,this._onInteraction,Sa)))}ngOnDestroy(){let t=this._hosts.keys();for(let a of t)this.destroyRipple(a);this._eventCleanups.forEach(a=>a())}configureRipple(t,a){t.setAttribute(Kt,this._globalRippleOptions?.namespace??""),(a.className||!t.hasAttribute(Vt))&&t.setAttribute(Vt,a.className||""),a.centered&&t.setAttribute(Xe,""),a.disabled&&t.setAttribute(ht,"")}setDisabled(t,a){let n=this._hosts.get(t);n?(n.target.rippleDisabled=a,!a&&!n.hasSetUpEvents&&(n.hasSetUpEvents=!0,n.renderer.setupTriggerEvents(t))):a?t.setAttribute(ht,""):t.removeAttribute(ht)}_onInteraction=t=>{let a=x(t);if(a instanceof HTMLElement){let n=a.closest(`[${Kt}="${this._globalRippleOptions?.namespace??""}"]`);n&&this._createRipple(n)}};_createRipple(t){if(!this._document||this._hosts.has(t))return;t.querySelector(".mat-ripple")?.remove();let a=this._document.createElement("span");a.classList.add("mat-ripple",t.getAttribute(Vt)),t.append(a);let n=this._globalRippleOptions,i=this._animationsDisabled?0:n?.animation?.enterDuration??X.enterDuration,s=this._animationsDisabled?0:n?.animation?.exitDuration??X.exitDuration,d={rippleDisabled:this._animationsDisabled||n?.disabled||t.hasAttribute(ht),rippleConfig:{centered:t.hasAttribute(Xe),terminateOnPointerUp:n?.terminateOnPointerUp,animation:{enterDuration:i,exitDuration:s}}},g=new q(d,this._ngZone,a,this._platform,this._injector),w=!d.rippleDisabled;w&&g.setupTriggerEvents(t),this._hosts.set(t,{target:d,renderer:g,hasSetUpEvents:w}),t.removeAttribute(Kt)}destroyRipple(t){let a=this._hosts.get(t);a&&(a.renderer._removeTriggerEvents(),this._hosts.delete(t))}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var Je=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275cmp=y({type:e,selectors:[["structural-styles"]],decls:0,vars:0,template:function(a,n){},styles:[`.mat-focus-indicator{position:relative}.mat-focus-indicator::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border-width:var(--mat-focus-indicator-border-width, 3px);border-style:var(--mat-focus-indicator-border-style, solid);border-color:var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus-visible::before{content:""}@media(forced-colors: active){html{--mat-focus-indicator-display: block}}
4
4
  `],encapsulation:2,changeDetection:0})}return e})();var Ba=["mat-icon-button",""],ja=["*"],Ua=new m("MAT_BUTTON_CONFIG");function ta(e){return e==null?void 0:ve(e)}var vt=(()=>{class e{_elementRef=r(D);_ngZone=r(b);_animationsDisabled=z();_config=r(Ua,{optional:!0});_focusMonitor=r(Ot);_cleanupClick;_renderer=r(pe);_rippleLoader=r(qe);_isAnchor;_isFab=!1;color;get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=t,this._updateRippleDisabled()}_disableRipple=!1;get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._updateRippleDisabled()}_disabled=!1;ariaDisabled;disabledInteractive;tabIndex;set _tabindex(t){this.tabIndex=t}constructor(){r(M).load(Je);let t=this._elementRef.nativeElement;this._isAnchor=t.tagName==="A",this.disabledInteractive=this._config?.disabledInteractive??!1,this.color=this._config?.color??null,this._rippleLoader?.configureRipple(t,{className:"mat-mdc-button-ripple"})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0),this._isAnchor&&this._setupAsAnchor()}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(t="program",a){t?this._focusMonitor.focusVia(this._elementRef.nativeElement,t,a):this._elementRef.nativeElement.focus(a)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this._isAnchor?this.disabled||null:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}_getTabIndex(){return this._isAnchor?this.disabled&&!this.disabledInteractive?-1:this.tabIndex:this.tabIndex}_setupAsAnchor(){this._cleanupClick=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"click",t=>{this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}))}static \u0275fac=function(a){return new(a||e)};static \u0275dir=k({type:e,hostAttrs:[1,"mat-mdc-button-base"],hostVars:13,hostBindings:function(a,n){a&2&&(wt("disabled",n._getDisabledAttribute())("aria-disabled",n._getAriaDisabled())("tabindex",n._getTabIndex()),he(n.color?"mat-"+n.color:""),O("mat-mdc-button-disabled",n.disabled)("mat-mdc-button-disabled-interactive",n.disabledInteractive)("mat-unthemed",!n.color)("_mat-animation-noopable",n._animationsDisabled))},inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",N],disabled:[2,"disabled","disabled",N],ariaDisabled:[2,"aria-disabled","ariaDisabled",N],disabledInteractive:[2,"disabledInteractive","disabledInteractive",N],tabIndex:[2,"tabIndex","tabIndex",ta],_tabindex:[2,"tabindex","_tabindex",ta]}})}return e})(),za=(()=>{class e extends vt{constructor(){super(),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=y({type:e,selectors:[["button","mat-icon-button",""],["a","mat-icon-button",""],["button","matIconButton",""],["a","matIconButton",""]],hostAttrs:[1,"mdc-icon-button","mat-mdc-icon-button"],exportAs:["matButton","matAnchor"],features:[V],attrs:Ba,ngContentSelectors:ja,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(a,n){a&1&&(W(),C(0,"span",0),T(1),C(2,"span",1)(3,"span",2))},styles:[`.mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:var(--mat-icon-button-container-shape, var(--mat-sys-corner-full, 50%));flex-shrink:0;text-align:center;width:var(--mat-icon-button-state-layer-size, 40px);height:var(--mat-icon-button-state-layer-size, 40px);padding:calc(calc(var(--mat-icon-button-state-layer-size, 40px) - var(--mat-icon-button-icon-size, 24px)) / 2);font-size:var(--mat-icon-button-icon-size, 24px);color:var(--mat-icon-button-icon-color, var(--mat-sys-on-surface-variant));-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit}.mat-mdc-icon-button:focus-visible>.mat-focus-indicator::before{content:"";border-radius:inherit}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface-variant) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-icon-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-icon-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-icon-button-touch-target-size, 48px);display:var(--mat-icon-button-touch-target-display, block);left:50%;width:var(--mat-icon-button-touch-target-size, 48px);transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-icon-button-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mat-icon-button-icon-size, 24px);height:var(--mat-icon-button-icon-size, 24px);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:var(--mat-icon-button-container-shape, var(--mat-sys-corner-full, 50%))}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}
@@ -0,0 +1 @@
1
+ import{a as re,b as ne,c as V}from"./chunk-OHLGZXEO.js";import{a as ie,b as oe}from"./chunk-T2JHUF63.js";import{a as C}from"./chunk-2YPR6RKN.js";import{a as Q,b as X}from"./chunk-SI36SMXC.js";import{a as G,b as B,e as Z,p as ee,u as te}from"./chunk-FJR6WCPX.js";import{d as K}from"./chunk-LTFITYTW.js";import"./chunk-DPFJ6LFY.js";import"./chunk-3DDLKUVJ.js";import"./chunk-6JH2UGTU.js";import{a as _,b as f}from"./chunk-LCBWJP6Z.js";import"./chunk-HY7OYHZF.js";import"./chunk-UQNMPA5Y.js";import{a as H,b as W}from"./chunk-QFSZDRP2.js";import"./chunk-DLU3TQID.js";import{a as Y,b as M}from"./chunk-G4QDBE4F.js";import{Q as U,S as J}from"./chunk-SDLTQWY6.js";import{Bb as S,Db as h,Fb as l,Ka as p,Rb as j,T as L,Tb as c,Ub as k,Vb as z,Wa as N,Z as w,ca as d,ga as u,h as A,ha as g,jb as E,kc as v,lb as b,ma as $,mb as y,pb as x,qb as T,rb as P,sb as a,t as I,ta as O,tb as s,ub as D}from"./chunk-RNXBUYHW.js";var R=class n{threadState=d(C);codayService=d(ie);threadList=f(this.threadState.threadList$,{initialValue:[]});selectedThread=f(this.threadState.selectedThread$,{initialValue:null});isThinking=f(this.codayService.isThinking$,{initialValue:!1});inviteEvent=f(this.codayService.currentInviteEvent$.pipe(I(t=>t?.invite===Z?null:t)),{initialValue:null});tasks=v(()=>{let t=this.threadList(),e=this.selectedThread(),r=this.isThinking(),o=this.inviteEvent();return t.filter(i=>!i.parentThreadId).map(i=>{let m=!!e&&i.id===e.id;return{id:i.id,name:i.name,summary:i.summary,modifiedDate:i.modifiedDate,starring:i.starring??[],users:i.users??[],status:this.deriveStatus(i,m,r,!!o),isActive:m,worktreeProject:i.worktreeProject}}).sort((i,m)=>{let q=V[i.status]-V[m.status];return q!==0?q:i.modifiedDate>m.modifiedDate?-1:1})});deriveStatus(t,e,r,o){let i=Date.now()-new Date(t.modifiedDate).getTime();return t.closedByUser?"done":t.pendingInvite?"waiting-you":e?r?"in-progress":"paused":i<ne?"in-progress":"paused"}static \u0275fac=function(e){return new(e||n)};static \u0275prov=w({token:n,factory:n.\u0275fac,providedIn:"root"})};var F=class n{projectState=d(M);threadState=d(C);destroy$=new A;eventSource=null;currentProject=null;constructor(){this.projectState.selectedProject$.pipe(L(this.destroy$)).subscribe(t=>{let e=t?.name??null;e!==this.currentProject&&(this.disconnect(),e&&this.connect(e))})}connect(t,e=5e3){this.currentProject=t;let r=`/api/projects/${encodeURIComponent(t)}/event-stream`;console.log(`[PROJECT_SSE] Connecting to ${r}`),this.eventSource=new EventSource(r),this.eventSource.onmessage=o=>{try{let i=JSON.parse(o.data),m=te(i);if(!m)return;m instanceof ee&&(console.log("[PROJECT_SSE] ThreadUpdateEvent \u2014 refreshing thread list"),this.threadState.refreshThreadList())}catch(i){console.warn("[PROJECT_SSE] Failed to parse event:",i)}},this.eventSource.onerror=()=>{this.eventSource?.readyState===EventSource.CLOSED&&(console.warn(`[PROJECT_SSE] Connection closed for ${t}, reconnecting in ${e}ms`),this.eventSource=null,setTimeout(()=>{this.currentProject===t&&this.connect(t,Math.min(e*2,6e4))},e))}}disconnect(){this.eventSource&&(this.eventSource.close(),this.eventSource=null,console.log(`[PROJECT_SSE] Disconnected from project ${this.currentProject}`)),this.currentProject=null}ngOnDestroy(){this.disconnect(),this.destroy$.next(),this.destroy$.complete()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=w({token:n,factory:n.\u0275fac,providedIn:"root"})};var ce=(n,t)=>t.key,de=(n,t)=>t.status,le=(n,t)=>t.id;function pe(n,t){n&1&&D(0,"mat-spinner",6)}function me(n,t){n&1&&(a(0,"mat-icon"),c(1,"add"),s())}function ue(n,t){if(n&1&&(a(0,"span",16),c(1),s()),n&2){let e=l().$implicit,r=l();p(),k(r.filterCounts()[e.key])}}function ge(n,t){if(n&1){let e=S();a(0,"button",15),h("click",function(){let o=u(e).$implicit,i=l();return g(i.setFilter(o.key))}),a(1,"mat-icon",10),c(2),s(),a(3,"span"),c(4),s(),b(5,ue,2,1,"span",16),s()}if(n&2){let e=t.$implicit,r=l();j("active",r.activeFilter()===e.key),E("aria-selected",r.activeFilter()===e.key),p(2),k(e.icon),p(2),k(e.label),p(),y(r.filterCounts()[e.key]>0?5:-1)}}function _e(n,t){n&1&&(a(0,"div",12),D(1,"mat-spinner",17),a(2,"p"),c(3,"Loading tasks\u2026"),s()())}function fe(n,t){if(n&1){let e=S();a(0,"p"),c(1,"No tasks yet. Start your first one!"),s(),a(2,"button",19),h("click",function(){u(e);let o=l(2);return g(o.createTask())}),a(3,"mat-icon"),c(4,"add"),s(),c(5," New Task "),s()}}function he(n,t){n&1&&(a(0,"p"),c(1,"No tasks in this category."),s())}function ke(n,t){if(n&1&&(a(0,"div",13)(1,"mat-icon",18),c(2,"rocket_launch"),s(),b(3,fe,6,0)(4,he,2,0,"p"),s()),n&2){let e=l();p(3),y(e.activeFilter()==="all"?3:4)}}function ve(n,t){if(n&1){let e=S();a(0,"app-task-card",25),h("stopRequested",function(o){u(e);let i=l(3);return g(i.onStopRequested(o))})("deleteRequested",function(o){u(e);let i=l(3);return g(i.onDeleteRequested(o))})("starToggled",function(o){u(e);let i=l(3);return g(i.onStarToggled(o))})("markDoneRequested",function(o){u(e);let i=l(3);return g(i.onMarkDoneRequested(o))})("markActiveRequested",function(o){u(e);let i=l(3);return g(i.onMarkActiveRequested(o))}),s()}if(n&2){let e=t.$implicit;P("task",e)}}function Ce(n,t){if(n&1&&(a(0,"section",20)(1,"h2",21)(2,"mat-icon",22),c(3),s(),c(4),a(5,"span",23),c(6),s()(),a(7,"div",14),x(8,ve,1,1,"app-task-card",24,le),s()()),n&2){let e=t.$implicit;p(3),k(e.icon),p(),z(" ",e.label," "),p(2),k(e.tasks.length),p(2),T(e.tasks)}}function be(n,t){if(n&1&&x(0,Ce,10,3,"section",20,de),n&2){let e=l();T(e.taskGroups())}}function ye(n,t){if(n&1){let e=S();a(0,"app-task-card",25),h("stopRequested",function(o){u(e);let i=l(2);return g(i.onStopRequested(o))})("deleteRequested",function(o){u(e);let i=l(2);return g(i.onDeleteRequested(o))})("starToggled",function(o){u(e);let i=l(2);return g(i.onStarToggled(o))})("markDoneRequested",function(o){u(e);let i=l(2);return g(i.onMarkDoneRequested(o))})("markActiveRequested",function(o){u(e);let i=l(2);return g(i.onMarkActiveRequested(o))}),s()}if(n&2){let e=t.$implicit;P("task",e)}}function xe(n,t){if(n&1&&(a(0,"div",14),x(1,ye,1,1,"app-task-card",24,le),s()),n&2){let e=l();p(),T(e.filteredTasks())}}var Te=[{key:"all",label:"All",icon:"grid_view"},{key:"waiting-you",label:"Waiting for you",icon:"mark_unread_chat_alt"},{key:"in-progress",label:"In progress",icon:"pending"},{key:"paused",label:"Paused",icon:"pause_circle"},{key:"done",label:"Done",icon:"check_circle"}],se=class n{router=d(K);projectState=d(M);threadState=d(C);threadApi=d(G);taskStatus=d(R);userService=d(B);projectApi=d(Y);destroyRef=d($);_projectEventStream=d(F);filters=Te;activeFilter=O("all");starredOnly=O(!1);isCreating=O(!1);isLoadingList=f(this.threadState.isLoadingThreadList$,{initialValue:!1});username=f(this.userService.username$,{initialValue:null});allTasks=this.taskStatus.tasks;filteredTasks=v(()=>{let t=this.activeFilter(),e=this.username(),r=this.allTasks();return this.starredOnly()&&e&&(r=r.filter(o=>o.starring.includes(e))),t==="all"?r:r.filter(o=>o.status===t)});filterCounts=v(()=>{let t=this.username(),e=this.allTasks();return this.starredOnly()&&t&&(e=e.filter(r=>r.starring.includes(t))),{all:e.length,"waiting-you":e.filter(r=>r.status==="waiting-you").length,"in-progress":e.filter(r=>r.status==="in-progress").length,paused:e.filter(r=>r.status==="paused").length,done:e.filter(r=>r.status==="done").length}});taskGroups=v(()=>{let t=this.username(),e=this.allTasks();this.starredOnly()&&t&&(e=e.filter(o=>o.starring.includes(t)));let r=[{status:"waiting-you",label:"Waiting for you",icon:"mark_unread_chat_alt",tasks:[]},{status:"in-progress",label:"In progress",icon:"pending",tasks:[]},{status:"done",label:"Done",icon:"check_circle",tasks:[]},{status:"paused",label:"Paused",icon:"pause_circle",tasks:[]},{status:"error",label:"Error",icon:"error",tasks:[]}];for(let o of e){let i=r.find(m=>m.status===o.status);i&&i.tasks.push(o)}return r.filter(o=>o.tasks.length>0)});ngOnInit(){this.userService.fetchCurrentUser().pipe(_(this.destroyRef)).subscribe({error:t=>console.warn("[TASK-CONTROL] Could not fetch user:",t)})}setFilter(t){this.activeFilter.set(t)}toggleStarredFilter(){this.starredOnly.update(t=>!t)}createTask(){let t=this.projectState.getSelectedProjectId();!t||this.isCreating()||(this.isCreating.set(!0),this.threadApi.createThread().pipe(_(this.destroyRef)).subscribe({next:e=>{this.isCreating.set(!1),this.router.navigate(["project",t,"thread",e.thread.id])},error:e=>{console.error("[TASK-CONTROL] Failed to create thread:",e),this.isCreating.set(!1)}}))}onStopRequested(t){this.threadApi.stopThread(t).pipe(_(this.destroyRef)).subscribe({error:e=>console.error("[TASK-CONTROL] Failed to stop thread:",e)})}onDeleteRequested(t){this.threadApi.deleteThread(t).pipe(_(this.destroyRef)).subscribe({next:()=>this.threadState.refreshThreadList(),error:e=>console.error("[TASK-CONTROL] Failed to delete thread:",e)})}onStarToggled(t){let e=this.username();if(!e)return;let r=this.allTasks().find(m=>m.id===t);if(!r)return;let o=r.starring.includes(e),i=o?this.threadApi.unstarThread(t):this.threadApi.starThread(t);this.threadState.updateStarLocal(t,!o,e),i.pipe(_(this.destroyRef)).subscribe({error:m=>{console.error("[TASK-CONTROL] Failed to toggle star:",m),this.threadState.refreshThreadList()}})}onMarkDoneRequested(t){let e=this.projectState.getSelectedProjectId();e&&this.projectApi.markThreadDone(e,t).pipe(_(this.destroyRef)).subscribe({next:()=>this.threadState.refreshThreadList(),error:r=>console.error("[TASK-CONTROL] Failed to mark task as done:",r)})}onMarkActiveRequested(t){let e=this.projectState.getSelectedProjectId();e&&this.projectApi.markThreadActive(e,t).pipe(_(this.destroyRef)).subscribe({next:()=>this.threadState.refreshThreadList(),error:r=>console.error("[TASK-CONTROL] Failed to mark task as active:",r)})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-task-control"]],decls:25,vars:6,consts:[[1,"task-control"],[1,"tc-header"],[1,"tc-title-row"],[1,"tc-title"],[1,"title-icon"],["mat-flat-button","","aria-label","Start a new task",1,"new-task-btn",3,"click","disabled"],["diameter","16"],["role","tablist","aria-label","Filter tasks",1,"tc-filters"],["role","tab",1,"filter-chip",3,"active"],["role","switch","aria-label","Show starred tasks only",1,"filter-chip","starred-filter",3,"click"],[1,"filter-icon"],[1,"tc-grid-wrapper"],[1,"tc-loading"],[1,"tc-empty"],[1,"tc-grid"],["role","tab",1,"filter-chip",3,"click"],[1,"filter-badge"],["diameter","40"],[1,"empty-icon"],["mat-flat-button","",1,"new-task-btn",3,"click"],[1,"tc-group"],[1,"tc-group-title"],[1,"group-icon"],[1,"group-count"],[3,"task"],[3,"stopRequested","deleteRequested","starToggled","markDoneRequested","markActiveRequested","task"]],template:function(e,r){e&1&&(a(0,"app-sidenav")(1,"div",0)(2,"header",1)(3,"div",2)(4,"h1",3)(5,"mat-icon",4),c(6,"rocket_launch"),s(),c(7," Task Control "),s(),a(8,"button",5),h("click",function(){return r.createTask()}),b(9,pe,1,0,"mat-spinner",6)(10,me,2,0,"mat-icon"),c(11," New Task "),s()(),a(12,"nav",7),x(13,ge,6,6,"button",8,ce),a(15,"button",9),h("click",function(){return r.toggleStarredFilter()}),a(16,"mat-icon",10),c(17,"star"),s(),a(18,"span"),c(19,"Starred"),s()()()(),a(20,"main",11),b(21,_e,4,0,"div",12)(22,ke,5,1,"div",13)(23,be,2,0)(24,xe,3,0,"div",14),s()()()),e&2&&(p(8),P("disabled",r.isCreating()),p(),y(r.isCreating()?9:10),p(4),T(r.filters),p(2),j("active",r.starredOnly()),E("aria-checked",r.starredOnly()),p(6),y(r.isLoadingList()?21:r.filteredTasks().length===0?22:r.activeFilter()==="all"?23:24))},dependencies:[re,oe,W,H,J,U,X,Q],styles:[".glass-panel[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow)}.glass-interactive[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);transition:all .3s cubic-bezier(.4,0,.2,1)}.glass-interactive[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 12px 40px #00000026}.glass-interactive[_ngcontent-%COMP%]:active{transform:translateY(0)}.glass-card[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);border-radius:20px;padding:1.5rem}.glass-button[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);transition:all .3s cubic-bezier(.4,0,.2,1)}.glass-button[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 12px 40px #00000026}.glass-button[_ngcontent-%COMP%]:active{transform:translateY(0)}.glass-button[_ngcontent-%COMP%]{border-radius:12px;padding:.75rem 1.5rem;font-weight:600;cursor:pointer}.glass-button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed;transform:none}.glass-button[_ngcontent-%COMP%]:disabled:hover{transform:none}.smooth-theme-transition[_ngcontent-%COMP%]{transition:background .3s ease,color .3s ease,border-color .3s ease,box-shadow .3s ease}[_nghost-%COMP%]{display:flex;height:100vh;width:100%;overflow:hidden}.task-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden;padding:1.5rem;gap:1.25rem;box-sizing:border-box}.tc-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;flex-shrink:0}.tc-title-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem}.tc-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text)}.tc-title[_ngcontent-%COMP%] .title-icon[_ngcontent-%COMP%]{font-size:1.5rem;width:1.5rem;height:1.5rem;color:var(--color-primary)}.new-task-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;background:var(--color-primary);color:var(--color-text-inverse);border-radius:12px;font-weight:600;padding:0 1rem;height:36px;flex-shrink:0}.new-task-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.1rem;width:1.1rem;height:1.1rem}.new-task-btn[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{display:inline-block}.tc-filters[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-wrap:wrap}.filter-chip[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);display:flex;align-items:center;gap:.375rem;padding:.375rem .875rem;border-radius:100px;font-size:.8rem;font-weight:500;color:var(--color-text-secondary);cursor:pointer;border:1px solid var(--color-border);transition:background .15s ease,color .15s ease,border-color .15s ease;white-space:nowrap}.filter-chip[_ngcontent-%COMP%] .filter-icon[_ngcontent-%COMP%]{font-size:.9rem;width:.9rem;height:.9rem}.filter-chip[_ngcontent-%COMP%] .filter-badge[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-text-inverse);border-radius:100px;padding:0 .375rem;font-size:.7rem;font-weight:700;min-width:18px;text-align:center;line-height:18px}.filter-chip.active[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-text-inverse);border-color:var(--color-primary)}.filter-chip.active[_ngcontent-%COMP%] .filter-icon[_ngcontent-%COMP%]{color:var(--color-text-inverse)}.filter-chip.active[_ngcontent-%COMP%] .filter-badge[_ngcontent-%COMP%]{background:#ffffff4d;color:var(--color-text-inverse)}.filter-chip[_ngcontent-%COMP%]:hover:not(.active){background:var(--color-bg-hover);color:var(--color-text)}.starred-filter.active[_ngcontent-%COMP%]{background:#f5a62326;border-color:#f5a623;color:#f5a623}.starred-filter.active[_ngcontent-%COMP%] .filter-icon[_ngcontent-%COMP%]{color:#f5a623}.tc-group[_ngcontent-%COMP%]{margin-bottom:1.5rem}.tc-group[_ngcontent-%COMP%]:last-child{margin-bottom:0}.tc-group-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin:0 0 .75rem;font-size:.85rem;font-weight:600;color:var(--color-text-secondary);text-transform:uppercase;letter-spacing:.05em}.tc-group-title[_ngcontent-%COMP%] .group-icon[_ngcontent-%COMP%]{font-size:1rem;width:1rem;height:1rem}.tc-group-title[_ngcontent-%COMP%] .group-count[_ngcontent-%COMP%]{background:var(--color-bg-hover);border-radius:100px;padding:0 .375rem;font-size:.75rem;font-weight:700;min-width:18px;text-align:center;line-height:18px}.tc-grid-wrapper[_ngcontent-%COMP%]{flex:1;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--color-border) transparent}.tc-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1rem;padding-bottom:1rem}@media(max-width:600px){.tc-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}.tc-loading[_ngcontent-%COMP%], .tc-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;height:100%;min-height:240px;color:var(--color-text-secondary);text-align:center}.tc-loading[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .tc-empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:.95rem}.empty-icon[_ngcontent-%COMP%]{font-size:3rem;width:3rem;height:3rem;opacity:.3}"],changeDetection:0})};export{se as TaskControlComponent};
@@ -0,0 +1,5 @@
1
+ import{v as D,w as ye}from"./chunk-FJR6WCPX.js";import{a as Me}from"./chunk-DPFJ6LFY.js";import{a as de,b as pe,e as ge,f as me,g as he}from"./chunk-HY7OYHZF.js";import{a as R}from"./chunk-QFSZDRP2.js";import{C as B,c as L,g as A,m as F,p as _e,q as ve,v as be,w as Ce,x as Se}from"./chunk-DLU3TQID.js";import{E as W,H,J as le,O as ue,Q as fe}from"./chunk-SDLTQWY6.js";import{Ab as V,Db as d,Fb as x,Fc as se,Jb as ee,Jc as ce,Ka as l,Kb as te,Lb as ne,Pb as ie,Qb as k,Rb as I,Sb as oe,T as h,Tb as s,Vb as S,Wa as v,Wb as re,Xa as T,Xb as p,Yb as g,Z as K,Zb as m,_ as P,aa as Q,ab as X,ca as _,d as C,h as O,hc as ae,i as q,ia as $,ja as Y,jb as b,lb as y,mb as M,pb as U,qb as J,rb as u,sb as a,tb as r,ub as f,uc as N,ya as Z}from"./chunk-RNXBUYHW.js";var Pe=["determinateSpinner"];function Te(c,t){if(c&1&&($(),a(0,"svg",11),f(1,"circle",12),r()),c&2){let o=x();b("viewBox",o._viewBox()),l(),k("stroke-dasharray",o._strokeCircumference(),"px")("stroke-dashoffset",o._strokeCircumference()/2,"px")("stroke-width",o._circleStrokeWidth(),"%"),b("r",o._circleRadius())}}var Ve=new Q("mat-progress-spinner-default-options",{providedIn:"root",factory:()=>({diameter:Ee})}),Ee=100,xe=10,Ze=(()=>{class c{_elementRef=_(Z);_noopAnimations;get color(){return this._color||this._defaultColor}set color(o){this._color=o}_color;_defaultColor="primary";_determinateCircle;constructor(){let o=_(Ve),e=le(),n=this._elementRef.nativeElement;this._noopAnimations=e==="di-disabled"&&!!o&&!o._forceAnimations,this.mode=n.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&e==="reduced-motion"&&n.classList.add("mat-progress-spinner-reduced-motion"),o&&(o.color&&(this.color=this._defaultColor=o.color),o.diameter&&(this.diameter=o.diameter),o.strokeWidth&&(this.strokeWidth=o.strokeWidth))}mode;get value(){return this.mode==="determinate"?this._value:0}set value(o){this._value=Math.max(0,Math.min(100,o||0))}_value=0;get diameter(){return this._diameter}set diameter(o){this._diameter=o||0}_diameter=Ee;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(o){this._strokeWidth=o||0}_strokeWidth;_circleRadius(){return(this.diameter-xe)/2}_viewBox(){let o=this._circleRadius()*2+this.strokeWidth;return`0 0 ${o} ${o}`}_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(e){return new(e||c)};static \u0275cmp=v({type:c,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(e&1&&ee(Pe,5),e&2){let i;te(i=ne())&&(n._determinateCircle=i.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(e,n){e&2&&(b("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",n.mode==="determinate"?n.value:null)("mode",n.mode),oe("mat-"+n.color),k("width",n.diameter,"px")("height",n.diameter,"px")("--mat-progress-spinner-size",n.diameter+"px")("--mat-progress-spinner-active-indicator-width",n.diameter+"px"),I("_mat-animation-noopable",n._noopAnimations)("mdc-circular-progress--indeterminate",n.mode==="indeterminate"))},inputs:{color:"color",mode:"mode",value:[2,"value","value",N],diameter:[2,"diameter","diameter",N],strokeWidth:[2,"strokeWidth","strokeWidth",N]},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(e,n){if(e&1&&(X(0,Te,2,8,"ng-template",null,0,ae),a(2,"div",2,1),$(),a(4,"svg",3),f(5,"circle",4),r()(),Y(),a(6,"div",5)(7,"div",6)(8,"div",7),V(9,8),r(),a(10,"div",9),V(11,8),r(),a(12,"div",10),V(13,8),r()()()),e&2){let i=ie(1);l(4),b("viewBox",n._viewBox()),l(),k("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),b("r",n._circleRadius()),l(4),u("ngTemplateOutlet",i),l(2),u("ngTemplateOutlet",i),l(2),u("ngTemplateOutlet",i)}},dependencies:[se],styles:[`.mat-mdc-progress-spinner{--mat-progress-spinner-animation-multiplier: 1;display:block;overflow:hidden;line-height:0;position:relative;direction:ltr;transition:opacity 250ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-progress-spinner circle{stroke-width:var(--mat-progress-spinner-active-indicator-width, 4px)}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}}.mat-progress-spinner-reduced-motion{--mat-progress-spinner-animation-multiplier: 1.25}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1;animation:mdc-circular-progress-container-rotate calc(1568.2352941176ms*var(--mat-progress-spinner-animation-multiplier)) linear infinite}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mat-progress-spinner-active-indicator-color, var(--mat-sys-primary))}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin calc(1333ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin calc(1333ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate calc(5332ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}
2
+ `],encapsulation:2,changeDetection:0})}return c})();var Xe=(()=>{class c{static \u0275fac=function(e){return new(e||c)};static \u0275mod=T({type:c});static \u0275inj=P({imports:[W]})}return c})();var it=(()=>{class c{get vertical(){return this._vertical}set vertical(o){this._vertical=H(o)}_vertical=!1;get inset(){return this._inset}set inset(o){this._inset=H(o)}_inset=!1;static \u0275fac=function(e){return new(e||c)};static \u0275cmp=v({type:c,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){e&2&&(b("aria-orientation",n.vertical?"vertical":"horizontal"),I("mat-divider-vertical",n.vertical)("mat-divider-horizontal",!n.vertical)("mat-divider-inset",n.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(e,n){},styles:[`.mat-divider{display:block;margin:0;border-top-style:solid;border-top-color:var(--mat-divider-color, var(--mat-sys-outline-variant));border-top-width:var(--mat-divider-width, 1px)}.mat-divider.mat-divider-vertical{border-top:0;border-right-style:solid;border-right-color:var(--mat-divider-color, var(--mat-sys-outline-variant));border-right-width:var(--mat-divider-width, 1px)}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}
3
+ `],encapsulation:2,changeDetection:0})}return c})(),ot=(()=>{class c{static \u0275fac=function(e){return new(e||c)};static \u0275mod=T({type:c});static \u0275inj=P({imports:[W]})}return c})();var z=class c{destroy$=new O;voices;currentUtterance=null;currentOnEndCallback=null;speakingSubject=new q(!1);speaking$=this.speakingSubject.asObservable();volume=.8;rate=1.2;language="en-US";selectedVoice;preferencesService=_(D);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(t=>t([]));return}this.voices=new Promise((t,o)=>{let e=speechSynthesis.getVoices();if(e.length)t(e);else{let n=setTimeout(()=>{o("no voices found")},2e3);speechSynthesis.addEventListener("voiceschanged",()=>{let i=speechSynthesis.getVoices();i.length&&(clearTimeout(n),t(i))})}}),console.log("[VOICE-SERVICE] Speech synthesis initialized")}subscribeToPreferences(){this.preferencesService.voiceVolume$.pipe(h(this.destroy$)).subscribe(t=>{this.volume=t,console.log("[VOICE-SERVICE] Volume updated to:",t)}),this.preferencesService.voiceRate$.pipe(h(this.destroy$)).subscribe(t=>{this.rate=t,console.log("[VOICE-SERVICE] Rate updated to:",t)}),this.preferencesService.voiceLanguage$.pipe(h(this.destroy$)).subscribe(t=>{this.language=t,console.log("[VOICE-SERVICE] Language updated to:",t),this.updateSelectedVoiceForLanguage()}),this.preferencesService.selectedVoice$.pipe(h(this.destroy$)).subscribe(t=>{this.setSelectedVoice(t)}),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(t,o){return C(this,null,function*(){if(!this.selectedVoice)return console.warn("[VOICE-SERVICE] No voice selected"),!1;if(!t.trim())return console.warn("[VOICE-SERVICE] No text to speak"),!1;let e=this.extractPlainText(t);if(!e.trim())return console.warn("[VOICE-SERVICE] No text to speak after markdown cleaning"),!1;this.stopSpeech();try{let n=new SpeechSynthesisUtterance(e);n.voice=this.selectedVoice,n.lang=this.selectedVoice.lang,n.volume=this.volume,n.rate=this.rate,this.currentOnEndCallback=o||null,o&&(n.onend=()=>{this.currentOnEndCallback===o&&(this.currentOnEndCallback=null,o())},n.onerror=()=>{this.currentOnEndCallback===o&&(this.currentOnEndCallback=null,o())}),this.currentUtterance=n,this.speakingSubject.next(!0);let i=n.onend,w=n.onerror;return n.onend=E=>{this.speakingSubject.next(!1),i&&i.call(n,E)},n.onerror=E=>{this.speakingSubject.next(!1),w&&w.call(n,E)},speechSynthesis.speak(n),console.log("[VOICE-SERVICE] Started speaking:",t.substring(0,50)+"..."),!0}catch(n){return console.error("[VOICE-SERVICE] Error speaking:",n),!1}})}stopSpeech(){if(this.currentUtterance||speechSynthesis.speaking){if(speechSynthesis.cancel(),this.currentUtterance=null,this.currentOnEndCallback){let t=this.currentOnEndCallback;this.currentOnEndCallback=null,t()}this.speakingSubject.next(!1),console.log("[VOICE-SERVICE] Speech stopped")}}ding(){try{let t=new(window.AudioContext||window.webkitAudioContext),o=t.createOscillator(),e=t.createGain();o.connect(e),e.connect(t.destination),o.frequency.setValueAtTime(800,t.currentTime),e.gain.setValueAtTime(.1,t.currentTime),e.gain.exponentialRampToValueAtTime(.01,t.currentTime+.1),o.start(t.currentTime),o.stop(t.currentTime+.1),console.log("[VOICE-SERVICE] Notification sound played")}catch(t){console.error("[VOICE-SERVICE] Notification sound failed:",t)}}getVoicesForLanguage(){return C(this,null,function*(){try{let t=this.language.slice(0,2),o=yield this.voices;if(!o||o.length===0)return console.warn("[VOICE-SERVICE] No voices available on system"),[];let e=o.filter(n=>n.lang.toLowerCase().startsWith(t)).sort((n,i)=>n.localService&&!i.localService?-1:!n.localService&&i.localService?1:n.name.localeCompare(i.name));return console.log("[VOICE-SERVICE] Found matching voices:",e.length,"for language:",t),e.map(n=>({name:n.name,lang:n.lang,localService:n.localService,default:n.default,displayName:this.formatVoiceDisplayName(n)}))}catch(t){return console.error("[VOICE-SERVICE] Error getting voices for language:",t),[]}})}formatVoiceDisplayName(t){let o=t.localService?"\u{1F3E0}":"\u2601\uFE0F",e=t.default?" \u2B50":"";return`${o} ${t.name} (${t.lang})${e}`}setSelectedVoice(t){return C(this,null,function*(){if(!t){this.selectedVoice=void 0;return}let[o,e]=t.split("|");if(!o||!e){this.selectedVoice=void 0;return}let n=(yield this.voices)?.find(i=>i.name===o&&i.lang===e);n?(this.selectedVoice=n,console.log("[VOICE-SERVICE] Selected voice:",n.name,n.lang)):(this.selectedVoice=void 0,console.warn("[VOICE-SERVICE] Voice not found:",o,e))})}updateSelectedVoiceForLanguage(){return C(this,null,function*(){let t=yield this.getVoicesForLanguage();if(t.length===0){console.warn("[VOICE-SERVICE] No voices available for language:",this.language),this.selectedVoice=void 0,this.preferencesService.setSelectedVoice(null);return}let o=this.preferencesService.getSelectedVoice();if(o){let[n,i]=o.split("|"),w=i?.slice(0,2),E=this.language.slice(0,2);if(w===E&&t.some(G=>G.name===n&&G.lang===i)){console.log("[VOICE-SERVICE] Keeping current voice for language:",o);return}}let e=t[0];if(e){let n=`${e.name}|${e.lang}`;this.preferencesService.setSelectedVoice(n),console.log("[VOICE-SERVICE] Auto-selected voice for language change:",e.displayName)}})}testSelectedVoice(){setTimeout(()=>{if(!this.selectedVoice){console.log("[VOICE-SERVICE] No voice selected for test");return}this.stopSpeech();let t=this.getTestText();t&&this.speak(t)},100)}getTestText(){let t=this.language.slice(0,2),o={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 o[t]||o.en||"Hello, this is a test."}extractPlainText(t){let o=t.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(/&nbsp;/g," ").replace(/&amp;/g,"and").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"');return o=this.addNaturalPunctuation(o),o.replace(/\s+/g," ").trim()}addNaturalPunctuation(t){return t.replace(/\n+/g,`
4
+ `).split(`
5
+ `).map(o=>this.addPeriodIfNeeded(o.trim())).filter(o=>o.length>0).join(" ")}addPeriodIfNeeded(t){return t?/[.!?;:]$/.test(t)?t:t+".":""}static \u0275fac=function(o){return new(o||c)};static \u0275prov=K({token:c,factory:c.\u0275fac,providedIn:"root"})};var Ne=(c,t)=>t.code,We=(c,t)=>t.name+t.lang;function Re(c,t){c&1&&(a(0,"div",15)(1,"mat-icon",37),s(2,"warning"),r(),a(3,"span",38),s(4," Browser notifications have been blocked. To enable them, please reset the site permissions in your browser settings. "),r()())}function Le(c,t){if(c&1&&(a(0,"option",23),s(1),r()),c&2){let o=t.$implicit;u("value",o.code),l(),re("",o.flag," ",o.label)}}function Ae(c,t){c&1&&(a(0,"option",30),s(1,"Loading voices..."),r())}function Fe(c,t){c&1&&(a(0,"option",30),s(1,"No voice available"),r())}function Be(c,t){if(c&1&&(a(0,"option",23),s(1),r()),c&2){let o=t.$implicit;u("value",o.name+"|"+o.lang),l(),S(" ",o.displayName," ")}}var we=class c{destroy$=new O;selectedTheme="light";selectedVoiceLanguage="en-US";useEnterToSend=!1;printTechnicalMessages=!1;showTechnicalMessages=!0;showWarningMessages=!0;voiceInputMode="browser";voiceAnnounceEnabled=!1;voiceMode="speech";voiceReadFullText=!1;voiceVolume=80;voiceRate=120;agentNotificationEnabled=!1;notificationSoundEnabled=!0;browserNotificationEnabled=!1;browserNotificationDenied=!1;availableVoices=[];selectedVoiceId=null;loadingVoices=!1;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=_(D);voiceSynthesisService=_(z);themeService=_(ye);ngOnInit(){this.selectedTheme=this.themeService.getCurrentTheme(),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.loadAvailableVoices(),this.themeService.currentTheme$.pipe(h(this.destroy$)).subscribe(t=>{this.selectedTheme=t}),this.preferencesService.voiceLanguage$.pipe(h(this.destroy$)).subscribe(t=>{this.selectedVoiceLanguage=t}),this.preferencesService.enterToSend$.pipe(h(this.destroy$)).subscribe(t=>{this.useEnterToSend=t}),this.preferencesService.printTechnicalMessages$.pipe(h(this.destroy$)).subscribe(t=>{this.printTechnicalMessages=t}),this.preferencesService.hideTechnicalMessages$.pipe(h(this.destroy$)).subscribe(t=>{this.showTechnicalMessages=!t}),this.preferencesService.hideWarningMessages$.pipe(h(this.destroy$)).subscribe(t=>{this.showWarningMessages=!t}),this.preferencesService.voiceInputMode$.pipe(h(this.destroy$)).subscribe(t=>{this.voiceInputMode=t}),this.preferencesService.voiceAnnounceEnabled$.pipe(h(this.destroy$)).subscribe(t=>{this.voiceAnnounceEnabled=t}),this.preferencesService.voiceMode$.pipe(h(this.destroy$)).subscribe(t=>{this.voiceMode=t}),this.preferencesService.voiceReadFullText$.pipe(h(this.destroy$)).subscribe(t=>{this.voiceReadFullText=t}),this.preferencesService.voiceVolume$.pipe(h(this.destroy$)).subscribe(t=>{this.voiceVolume=Math.round(t*100)}),this.preferencesService.voiceRate$.pipe(h(this.destroy$)).subscribe(t=>{this.voiceRate=Math.round(t*100)}),this.preferencesService.selectedVoice$.pipe(h(this.destroy$)).subscribe(t=>{this.selectedVoiceId=t}),this.preferencesService.voiceLanguage$.pipe(h(this.destroy$)).subscribe(()=>{this.loadAvailableVoices()}),this.preferencesService.agentNotificationEnabled$.pipe(h(this.destroy$)).subscribe(t=>{this.agentNotificationEnabled=t}),this.preferencesService.notificationSoundEnabled$.pipe(h(this.destroy$)).subscribe(t=>{this.notificationSoundEnabled=t}),this.preferencesService.browserNotificationEnabled$.pipe(h(this.destroy$)).subscribe(t=>{this.browserNotificationEnabled=t,this.checkNotificationPermission()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onThemeChange(){console.log("[OPTIONS] Theme changed to:",this.selectedTheme),this.themeService.setTheme(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 t=!this.showTechnicalMessages;console.log("[OPTIONS] Show technical messages changed to:",this.showTechnicalMessages,"(hide:",t,")"),this.preferencesService.setHideTechnicalMessages(t)}onShowWarningMessagesChange(){let t=!this.showWarningMessages;console.log("[OPTIONS] Show warning messages changed to:",this.showWarningMessages,"(hide:",t,")"),this.preferencesService.setHideWarningMessages(t)}onVoiceInputModeChange(t){let o=t.target.value;console.log("[OPTIONS] Voice input mode changed to:",o),this.preferencesService.setVoiceInputMode(o)}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 t=this.voiceVolume/100;console.log("[OPTIONS] Voice volume changed to:",t),this.preferencesService.setVoiceVolume(t)}onVoiceRateChange(){let t=this.voiceRate/100;console.log("[OPTIONS] Voice rate changed to:",t),this.preferencesService.setVoiceRate(t)}loadAvailableVoices(){return C(this,null,function*(){this.loadingVoices=!0;try{this.availableVoices=yield this.voiceSynthesisService.getVoicesForLanguage(),console.log("[OPTIONS] Loaded",this.availableVoices.length,"voices for current language")}catch(t){console.error("[OPTIONS] Error loading voices:",t),this.availableVoices=[]}finally{this.loadingVoices=!1}})}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)}checkNotificationPermission(){"Notification"in window&&(this.browserNotificationDenied=Notification.permission==="denied",console.log("[OPTIONS] Notification permission status:",Notification.permission))}static \u0275fac=function(o){return new(o||c)};static \u0275cmp=v({type:c,selectors:[["app-options-panel"]],decls:154,vars:36,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"],["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(o,e){o&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-icon"),s(4,"palette"),r(),a(5,"span"),s(6,"Appearance"),r()(),a(7,"div",3)(8,"div",4)(9,"label",5)(10,"input",6),m("ngModelChange",function(i){return g(e.selectedTheme,i)||(e.selectedTheme=i),i}),d("change",function(){return e.onThemeChange()}),r(),f(11,"span",7),s(12," Light "),r(),a(13,"label",5)(14,"input",8),m("ngModelChange",function(i){return g(e.selectedTheme,i)||(e.selectedTheme=i),i}),d("change",function(){return e.onThemeChange()}),r(),f(15,"span",7),s(16," Dark "),r(),a(17,"label",5)(18,"input",9),m("ngModelChange",function(i){return g(e.selectedTheme,i)||(e.selectedTheme=i),i}),d("change",function(){return e.onThemeChange()}),r(),f(19,"span",7),s(20," System "),r()()()(),a(21,"div",1)(22,"div",2)(23,"mat-icon"),s(24,"chat_bubble_outline"),r(),a(25,"span"),s(26,"Messaging"),r()(),a(27,"div",3)(28,"span",10),s(29,"Send message behavior:"),r(),a(30,"div",4)(31,"label",5)(32,"input",11),m("ngModelChange",function(i){return g(e.useEnterToSend,i)||(e.useEnterToSend=i),i}),d("change",function(){return e.onEnterToSendChange()}),r(),f(33,"span",7),s(34," Enter to send "),r(),a(35,"label",5)(36,"input",11),m("ngModelChange",function(i){return g(e.useEnterToSend,i)||(e.useEnterToSend=i),i}),d("change",function(){return e.onEnterToSendChange()}),r(),f(37,"span",7),s(38," Enter for new line "),r()()(),a(39,"div",3)(40,"div",12)(41,"span",10),s(42,"Show technical messages"),r(),a(43,"mat-slide-toggle",13),m("ngModelChange",function(i){return g(e.showTechnicalMessages,i)||(e.showTechnicalMessages=i),i}),d("change",function(){return e.onShowTechnicalMessagesChange()}),r()()(),a(44,"div",3)(45,"div",12)(46,"span",10),s(47,"Show warning messages"),r(),a(48,"mat-slide-toggle",13),m("ngModelChange",function(i){return g(e.showWarningMessages,i)||(e.showWarningMessages=i),i}),d("change",function(){return e.onShowWarningMessagesChange()}),r()()(),a(49,"div",3)(50,"div",12)(51,"span",10),s(52,"Include technical messages in print"),r(),a(53,"mat-slide-toggle",13),m("ngModelChange",function(i){return g(e.printTechnicalMessages,i)||(e.printTechnicalMessages=i),i}),d("change",function(){return e.onPrintTechnicalMessagesChange()}),r()()()(),a(54,"div",1)(55,"div",2)(56,"mat-icon"),s(57,"notifications"),r(),a(58,"span"),s(59,"Notifications"),r()(),a(60,"div",3)(61,"div",12)(62,"span",10),s(63,"Notify when the agent answers or requests input"),r(),a(64,"mat-slide-toggle",13),m("ngModelChange",function(i){return g(e.agentNotificationEnabled,i)||(e.agentNotificationEnabled=i),i}),d("change",function(){return e.onAgentNotificationEnabledChange()}),r()()(),a(65,"div",3)(66,"div",12)(67,"span",10),s(68,"Notification sound"),r(),a(69,"mat-slide-toggle",14),m("ngModelChange",function(i){return g(e.notificationSoundEnabled,i)||(e.notificationSoundEnabled=i),i}),d("change",function(){return e.onNotificationSoundEnabledChange()}),r()()(),a(70,"div",3)(71,"div",12)(72,"span",10),s(73,"Browser notification"),r(),a(74,"mat-slide-toggle",14),m("ngModelChange",function(i){return g(e.browserNotificationEnabled,i)||(e.browserNotificationEnabled=i),i}),d("change",function(){return e.onBrowserNotificationEnabledChange()}),r()(),y(75,Re,5,0,"div",15),r()(),a(76,"div",1)(77,"div",2)(78,"mat-icon"),s(79,"record_voice_over"),r(),a(80,"span"),s(81,"Voice & Speech"),r()(),a(82,"div",3)(83,"label",16),s(84,"Voice input method:"),r(),a(85,"select",17),d("change",function(i){return e.onVoiceInputModeChange(i)}),a(86,"option",18),s(87,"Browser (real-time)"),r(),a(88,"option",19),s(89,"Whisper (higher accuracy)"),r(),a(90,"option",20),s(91,"Voice message (send audio)"),r()()(),a(92,"div",3)(93,"label",21),s(94,"Voice recognition language:"),r(),a(95,"select",22),m("ngModelChange",function(i){return g(e.selectedVoiceLanguage,i)||(e.selectedVoiceLanguage=i),i}),d("change",function(){return e.onVoiceLanguageChange()}),U(96,Le,2,3,"option",23,Ne),r()(),a(98,"div",3)(99,"span",10),s(100,"Automatic announcement:"),r(),a(101,"div",4)(102,"label",5)(103,"input",24),m("ngModelChange",function(i){return g(e.voiceAnnounceEnabled,i)||(e.voiceAnnounceEnabled=i),i}),d("change",function(){return e.onVoiceAnnounceEnabledChange()}),r(),f(104,"span",7),s(105," Enabled "),r(),a(106,"label",5)(107,"input",24),m("ngModelChange",function(i){return g(e.voiceAnnounceEnabled,i)||(e.voiceAnnounceEnabled=i),i}),d("change",function(){return e.onVoiceAnnounceEnabledChange()}),r(),f(108,"span",7),s(109," Disabled "),r()()(),a(110,"div",3)(111,"span",10),s(112,"Voice mode:"),r(),a(113,"div",4)(114,"label",5)(115,"input",25),m("ngModelChange",function(i){return g(e.voiceMode,i)||(e.voiceMode=i),i}),d("change",function(){return e.onVoiceModeChange()}),r(),f(116,"span",7),s(117," Voice synthesis "),r(),a(118,"label",5)(119,"input",26),m("ngModelChange",function(i){return g(e.voiceMode,i)||(e.voiceMode=i),i}),d("change",function(){return e.onVoiceModeChange()}),r(),f(120,"span",7),s(121," Sound notification "),r()()(),a(122,"div",3)(123,"span",10),s(124,"Message reading:"),r(),a(125,"div",4)(126,"label",5)(127,"input",27),m("ngModelChange",function(i){return g(e.voiceReadFullText,i)||(e.voiceReadFullText=i),i}),d("change",function(){return e.onVoiceReadFullTextChange()}),r(),f(128,"span",7),s(129," Full message "),r(),a(130,"label",5)(131,"input",27),m("ngModelChange",function(i){return g(e.voiceReadFullText,i)||(e.voiceReadFullText=i),i}),d("change",function(){return e.onVoiceReadFullTextChange()}),r(),f(132,"span",7),s(133," First paragraphs only "),r()()(),a(134,"div",3)(135,"label",28),s(136,"Selected voice:"),r(),a(137,"select",29),m("ngModelChange",function(i){return g(e.selectedVoiceId,i)||(e.selectedVoiceId=i),i}),d("change",function(){return e.onSelectedVoiceChange()}),y(138,Ae,2,0,"option",30),y(139,Fe,2,0,"option",30),U(140,Be,2,2,"option",23,We),r(),f(142,"div",10),a(143,"a",31),d("click",function(){return e.testVoice()}),a(144,"span",32),s(145,"Test voice"),r()()(),a(146,"div",3)(147,"label",33),s(148),r(),a(149,"input",34),m("ngModelChange",function(i){return g(e.voiceVolume,i)||(e.voiceVolume=i),i}),d("input",function(){return e.onVoiceVolumeChange()}),r()(),a(150,"div",3)(151,"label",35),s(152),r(),a(153,"input",36),m("ngModelChange",function(i){return g(e.voiceRate,i)||(e.voiceRate=i),i}),d("input",function(){return e.onVoiceRateChange()}),r()()()()),o&2&&(l(10),p("ngModel",e.selectedTheme),l(4),p("ngModel",e.selectedTheme),l(4),p("ngModel",e.selectedTheme),l(14),u("value",!0),p("ngModel",e.useEnterToSend),l(4),u("value",!1),p("ngModel",e.useEnterToSend),l(7),p("ngModel",e.showTechnicalMessages),l(5),p("ngModel",e.showWarningMessages),l(5),p("ngModel",e.printTechnicalMessages),l(11),p("ngModel",e.agentNotificationEnabled),l(5),p("ngModel",e.notificationSoundEnabled),u("disabled",!e.agentNotificationEnabled),l(5),p("ngModel",e.browserNotificationEnabled),u("disabled",!e.agentNotificationEnabled||e.browserNotificationDenied),l(),M(e.browserNotificationDenied?75:-1),l(10),u("value",e.voiceInputMode),l(10),p("ngModel",e.selectedVoiceLanguage),l(),J(e.voiceLanguageOptions),l(7),u("value",!0),p("ngModel",e.voiceAnnounceEnabled),l(4),u("value",!1),p("ngModel",e.voiceAnnounceEnabled),l(8),p("ngModel",e.voiceMode),l(4),p("ngModel",e.voiceMode),l(8),u("value",!0),p("ngModel",e.voiceReadFullText),l(4),u("value",!1),p("ngModel",e.voiceReadFullText),l(6),p("ngModel",e.selectedVoiceId),u("disabled",e.loadingVoices||e.availableVoices.length===0),l(),M(e.loadingVoices?138:-1),l(),M(!e.loadingVoices&&e.availableVoices.length===0?139:-1),l(),J(e.availableVoices),l(8),S("Volume: ",e.voiceVolume,"%"),l(),p("ngModel",e.voiceVolume),l(3),S("Speed: ",e.voiceRate,"%"),l(),p("ngModel",e.voiceRate))},dependencies:[B,Ce,Se,L,ve,be,_e,A,F,R,Me],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-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}']})};function De(c,t){if(c&1&&(a(0,"div",3),s(1),r()),c&2){let o=x();l(),S("\u274C ",o.errorMessage)}}var Oe=class c{dialogRef=_(de);data=_(pe);jsonContent;errorMessage="";title;constructor(){this.jsonContent=this.data.initialContent,this.title=this.data.title||this.getDefaultTitle(this.data.configType,this.data.projectName)}getDefaultTitle(t,o){return t==="user"?"User Configuration":`Project Configuration: ${o||"Unknown"}`}onSave(){this.errorMessage="";let t;try{t=JSON.parse(this.jsonContent)}catch(o){this.errorMessage=`Invalid JSON syntax: ${o instanceof Error?o.message:"Unknown error"}`;return}this.dialogRef.close(t)}onCancel(){this.dialogRef.close()}static \u0275fac=function(o){return new(o||c)};static \u0275cmp=v({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(o,e){o&1&&(a(0,"div",0),s(1),a(2,"button",1),d("click",function(){return e.onCancel()}),a(3,"mat-icon"),s(4,"close"),r()()(),a(5,"mat-dialog-content")(6,"textarea",2),m("ngModelChange",function(i){return g(e.jsonContent,i)||(e.jsonContent=i),i}),r(),y(7,De,2,1,"div",3),r(),a(8,"mat-dialog-actions",4)(9,"button",5),d("click",function(){return e.onCancel()}),s(10,"Cancel"),r(),a(11,"button",6),d("click",function(){return e.onSave()}),s(12,"Save"),r()()),o&2&&(l(),S(" ",e.title," "),l(5),p("ngModel",e.jsonContent),l(),M(e.errorMessage?7:-1))},dependencies:[ce,B,L,A,F,R,ue,fe,ge,me,he],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)}"]})};export{Ze as a,Xe as b,it as c,ot as d,z as e,we as f,Oe as g};
@@ -1 +1 @@
1
- import{b as l}from"./chunk-XIQ3L6H6.js";import{Rc as m,Z as c,ca as a,m as n,t as s}from"./chunk-3JGMGRXW.js";var d=class i{http=a(m);projectState=a(l);promptsCache=new Map;getBaseUrl(){return`/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/prompts`}listPrompts(){return this.http.get(this.getBaseUrl())}getPromptsAutocomplete(t,e){let r=this.promptsCache.get(t);return r?n(this.filterPromptsForAutocomplete(r,e)):this.http.get(`/api/projects/${t}/prompts`).pipe(s(p=>(this.promptsCache.set(t,p),this.filterPromptsForAutocomplete(p,e))))}filterPromptsForAutocomplete(t,e){let r=e.toLowerCase();return t.filter(o=>o.name.toLowerCase().includes(r)||o.description.toLowerCase().includes(r)).map(o=>({name:o.name,description:o.description,parameterFormat:o.parameterFormat}))}clearCache(t){t?this.promptsCache.delete(t):this.promptsCache.clear()}getPrompt(t){return this.http.get(`${this.getBaseUrl()}/${t}`)}createPrompt(t){return this.http.post(this.getBaseUrl(),t).pipe(s(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}updatePrompt(t,e){return this.http.put(`${this.getBaseUrl()}/${t}`,e).pipe(s(r=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),r)))}deletePrompt(t){return this.http.delete(`${this.getBaseUrl()}/${t}`).pipe(s(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}enableWebhook(t){return this.http.post(`${this.getBaseUrl()}/${t}/webhook`,{})}disableWebhook(t){return this.http.delete(`${this.getBaseUrl()}/${t}/webhook`)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})};export{d as a};
1
+ import{b as l}from"./chunk-G4QDBE4F.js";import{Rc as m,Z as c,ca as a,m as n,t as s}from"./chunk-RNXBUYHW.js";var d=class i{http=a(m);projectState=a(l);promptsCache=new Map;getBaseUrl(){return`/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/prompts`}listPrompts(){return this.http.get(this.getBaseUrl())}getPromptsAutocomplete(t,e){let r=this.promptsCache.get(t);return r?n(this.filterPromptsForAutocomplete(r,e)):this.http.get(`/api/projects/${t}/prompts`).pipe(s(p=>(this.promptsCache.set(t,p),this.filterPromptsForAutocomplete(p,e))))}filterPromptsForAutocomplete(t,e){let r=e.toLowerCase();return t.filter(o=>o.name.toLowerCase().includes(r)||o.description.toLowerCase().includes(r)).map(o=>({name:o.name,description:o.description,parameterFormat:o.parameterFormat}))}clearCache(t){t?this.promptsCache.delete(t):this.promptsCache.clear()}getPrompt(t){return this.http.get(`${this.getBaseUrl()}/${t}`)}createPrompt(t){return this.http.post(this.getBaseUrl(),t).pipe(s(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}updatePrompt(t,e){return this.http.put(`${this.getBaseUrl()}/${t}`,e).pipe(s(r=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),r)))}deletePrompt(t){return this.http.delete(`${this.getBaseUrl()}/${t}`).pipe(s(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}enableWebhook(t){return this.http.post(`${this.getBaseUrl()}/${t}/webhook`,{})}disableWebhook(t){return this.http.delete(`${this.getBaseUrl()}/${t}/webhook`)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})};export{d as a};
@@ -1 +1 @@
1
- import{g as D}from"./chunk-GAZJZBKP.js";import{b as E,d as w}from"./chunk-QWMDAFBN.js";import{a as v}from"./chunk-AJOXSD6I.js";import{D as G,c as F,e as C,g as V,h as I,i as z,l as _,n as L,s as R,u as B}from"./chunk-XJUBZLY2.js";import{Bb as S,Db as u,Fb as g,Ka as a,Tb as o,Ub as k,Vb as O,Wa as N,a as p,b as x,ca as c,ga as b,ha as h,lb as M,ma as y,mb as P,rb as m,sb as n,ta as d,tb as t,ub as f}from"./chunk-3JGMGRXW.js";function A(i,r){i&1&&(n(0,"p",5),o(1,"Loading\u2026"),t())}function $(i,r){if(i&1){let e=S();n(0,"form",7),u("ngSubmit",function(){b(e);let l=g();return h(l.submit())}),n(1,"div",8)(2,"label",9),o(3,"Name "),n(4,"span",10),o(5,"*"),t()(),f(6,"input",11),t(),n(7,"div",8)(8,"label",12),o(9,"Description"),t(),f(10,"input",13),t(),n(11,"div",8)(12,"label",14),o(13,"Config path"),t(),f(14,"input",15),t(),n(15,"div",16)(16,"button",17),o(17),t(),n(18,"button",18),u("click",function(){b(e);let l=g();return h(l.cancel())}),o(19,"Cancel"),t()()()}if(i&2){let e=g();m("formGroup",e.form),a(6),m("formControl",e.nameControl),a(4),m("formControl",e.descriptionControl),a(4),m("formControl",e.configPathControl),a(2),m("disabled",e.nameControl.invalid||e.isSubmitting()),a(),O(" ",e.isEditMode()?"Save changes":"Create"," ")}}var T=class i{route=c(E);router=c(w);namespaceController=c(D);destroyRef=c(y);form=new z({name:new _("",{nonNullable:!0,validators:[C.required,C.minLength(1)]}),description:new _("",{nonNullable:!0}),configPath:new _("",{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get configPathControl(){return this.form.controls.configPath}isEditMode=d(!1);isSubmitting=d(!1);isLoading=d(!1);existingNamespace=null;ngOnInit(){let r=this.route.snapshot.paramMap.get("namespaceId");r&&(this.isEditMode.set(!0),this.loadNamespace(r))}loadNamespace(r){this.isLoading.set(!0),this.namespaceController.getByIdNamespace(r).pipe(v(this.destroyRef)).subscribe({next:e=>{this.existingNamespace=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??""),this.configPathControl.setValue(e.configPath??""),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(!0),(this.isEditMode()?this.namespaceController.updateNamespace(this.existingNamespace.id??"",x(p({},this.existingNamespace),{name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim()||void 0,configPath:this.configPathControl.value.trim()||void 0})):this.namespaceController.createNamespace(p(p({name:this.nameControl.value.trim()},this.descriptionControl.value.trim()?{description:this.descriptionControl.value.trim()}:{}),this.configPathControl.value.trim()?{configPath:this.configPathControl.value.trim()}:{}))).pipe(v(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos/namespaces"])}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=N({type:i,selectors:[["agentos-namespace-form"]],decls:10,vars:2,consts:[[1,"namespace-form"],[1,"namespace-form__header"],["type","button","title","Back to namespaces",1,"namespace-form__back",3,"click"],[1,"namespace-form__back-icon"],[1,"namespace-form__title"],[1,"namespace-form__loading"],[1,"namespace-form__form",3,"formGroup"],[1,"namespace-form__form",3,"ngSubmit","formGroup"],[1,"namespace-form__field"],["for","ns-name",1,"namespace-form__label"],["aria-hidden","true"],["id","ns-name","type","text","placeholder","Namespace name","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-description",1,"namespace-form__label"],["id","ns-description","type","text","placeholder","Optional description","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-config-path",1,"namespace-form__label"],["id","ns-config-path","type","text","placeholder","Optional path to base configuration directory","autocomplete","off",1,"namespace-form__input",3,"formControl"],[1,"namespace-form__actions"],["type","submit",1,"namespace-form__btn","namespace-form__btn--primary",3,"disabled"],["type","button",1,"namespace-form__btn",3,"click"]],template:function(e,s){e&1&&(n(0,"div",0)(1,"header",1)(2,"button",2),u("click",function(){return s.cancel()}),n(3,"span",3),o(4,"\u2190"),t(),o(5," Namespaces "),t(),n(6,"h1",4),o(7),t()(),M(8,A,2,0,"p",5)(9,$,20,6,"form",6),t()),e&2&&(a(7),k(s.isEditMode()?"Edit namespace":"New namespace"),a(),P(s.isLoading()?8:9))},dependencies:[G,L,F,V,I,R,B],styles:[".namespace-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.namespace-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-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-primary, #007aff);font-family:inherit}.namespace-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.namespace-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.namespace-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.namespace-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.namespace-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.namespace-form__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.namespace-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.namespace-form__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.namespace-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.namespace-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.namespace-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.namespace-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.namespace-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.namespace-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{T as NamespaceFormComponent};
1
+ import{h as D}from"./chunk-R5RVDZLX.js";import{b as E,d as w}from"./chunk-LTFITYTW.js";import{a as v}from"./chunk-LCBWJP6Z.js";import{D as G,c as F,e as C,g as V,h as I,i as z,l as _,n as L,s as R,u as B}from"./chunk-DLU3TQID.js";import{Bb as S,Db as u,Fb as g,Ka as a,Tb as o,Ub as k,Vb as O,Wa as N,a as p,b as x,ca as c,ga as b,ha as h,lb as M,ma as y,mb as P,rb as m,sb as n,ta as d,tb as t,ub as f}from"./chunk-RNXBUYHW.js";function A(i,r){i&1&&(n(0,"p",5),o(1,"Loading\u2026"),t())}function $(i,r){if(i&1){let e=S();n(0,"form",7),u("ngSubmit",function(){b(e);let l=g();return h(l.submit())}),n(1,"div",8)(2,"label",9),o(3,"Name "),n(4,"span",10),o(5,"*"),t()(),f(6,"input",11),t(),n(7,"div",8)(8,"label",12),o(9,"Description"),t(),f(10,"input",13),t(),n(11,"div",8)(12,"label",14),o(13,"Config path"),t(),f(14,"input",15),t(),n(15,"div",16)(16,"button",17),o(17),t(),n(18,"button",18),u("click",function(){b(e);let l=g();return h(l.cancel())}),o(19,"Cancel"),t()()()}if(i&2){let e=g();m("formGroup",e.form),a(6),m("formControl",e.nameControl),a(4),m("formControl",e.descriptionControl),a(4),m("formControl",e.configPathControl),a(2),m("disabled",e.nameControl.invalid||e.isSubmitting()),a(),O(" ",e.isEditMode()?"Save changes":"Create"," ")}}var T=class i{route=c(E);router=c(w);namespaceController=c(D);destroyRef=c(y);form=new z({name:new _("",{nonNullable:!0,validators:[C.required,C.minLength(1)]}),description:new _("",{nonNullable:!0}),configPath:new _("",{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get configPathControl(){return this.form.controls.configPath}isEditMode=d(!1);isSubmitting=d(!1);isLoading=d(!1);existingNamespace=null;ngOnInit(){let r=this.route.snapshot.paramMap.get("namespaceId");r&&(this.isEditMode.set(!0),this.loadNamespace(r))}loadNamespace(r){this.isLoading.set(!0),this.namespaceController.getByIdNamespace(r).pipe(v(this.destroyRef)).subscribe({next:e=>{this.existingNamespace=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??""),this.configPathControl.setValue(e.configPath??""),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(!0),(this.isEditMode()?this.namespaceController.updateNamespace(this.existingNamespace.id??"",x(p({},this.existingNamespace),{name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim()||void 0,configPath:this.configPathControl.value.trim()||void 0})):this.namespaceController.createNamespace(p(p({name:this.nameControl.value.trim()},this.descriptionControl.value.trim()?{description:this.descriptionControl.value.trim()}:{}),this.configPathControl.value.trim()?{configPath:this.configPathControl.value.trim()}:{}))).pipe(v(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos/namespaces"])}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=N({type:i,selectors:[["agentos-namespace-form"]],decls:10,vars:2,consts:[[1,"namespace-form"],[1,"namespace-form__header"],["type","button","title","Back to namespaces",1,"namespace-form__back",3,"click"],[1,"namespace-form__back-icon"],[1,"namespace-form__title"],[1,"namespace-form__loading"],[1,"namespace-form__form",3,"formGroup"],[1,"namespace-form__form",3,"ngSubmit","formGroup"],[1,"namespace-form__field"],["for","ns-name",1,"namespace-form__label"],["aria-hidden","true"],["id","ns-name","type","text","placeholder","Namespace name","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-description",1,"namespace-form__label"],["id","ns-description","type","text","placeholder","Optional description","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-config-path",1,"namespace-form__label"],["id","ns-config-path","type","text","placeholder","Optional path to base configuration directory","autocomplete","off",1,"namespace-form__input",3,"formControl"],[1,"namespace-form__actions"],["type","submit",1,"namespace-form__btn","namespace-form__btn--primary",3,"disabled"],["type","button",1,"namespace-form__btn",3,"click"]],template:function(e,s){e&1&&(n(0,"div",0)(1,"header",1)(2,"button",2),u("click",function(){return s.cancel()}),n(3,"span",3),o(4,"\u2190"),t(),o(5," Namespaces "),t(),n(6,"h1",4),o(7),t()(),M(8,A,2,0,"p",5)(9,$,20,6,"form",6),t()),e&2&&(a(7),k(s.isEditMode()?"Edit namespace":"New namespace"),a(),P(s.isLoading()?8:9))},dependencies:[G,L,F,V,I,R,B],styles:[".namespace-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.namespace-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-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-primary, #007aff);font-family:inherit}.namespace-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.namespace-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.namespace-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.namespace-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.namespace-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.namespace-form__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.namespace-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.namespace-form__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.namespace-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.namespace-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.namespace-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.namespace-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.namespace-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.namespace-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{T as NamespaceFormComponent};