@whoz-oss/coday-client 0.144.2 → 0.145.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 (86) hide show
  1. package/browser/apple-touch-icon.png +0 -0
  2. package/browser/{chunk-EYNAABQ3.js → chunk-23T7O4RB.js} +1 -1
  3. package/browser/{chunk-J4KEKL2K.js → chunk-2GHS5VUE.js} +1 -1
  4. package/browser/{chunk-ZT5RKNVA.js → chunk-2LW5VXLB.js} +1 -1
  5. package/browser/{chunk-O7ALTLRI.js → chunk-2NBVMKPO.js} +1 -1
  6. package/browser/{chunk-47EXVHLI.js → chunk-3PF557D6.js} +1 -1
  7. package/browser/{chunk-2NXSUKWO.js → chunk-4HKHCNH5.js} +1 -1
  8. package/browser/{chunk-TPSIRGLZ.js → chunk-4RJ7IPTL.js} +1 -1
  9. package/browser/{chunk-24VYLV4I.js → chunk-4YLSQZJK.js} +1 -1
  10. package/browser/chunk-57LCJDBW.js +1 -0
  11. package/browser/chunk-6AOSL3EI.js +1 -0
  12. package/browser/{chunk-7MTMEAW5.js → chunk-6MYFTPPD.js} +1 -1
  13. package/browser/{chunk-JRNOMFVU.js → chunk-7YDOHTEK.js} +1 -1
  14. package/browser/{chunk-E3G6R3GZ.js → chunk-ADQOXBBW.js} +1 -1
  15. package/browser/chunk-BFSLBE5E.js +1 -0
  16. package/browser/chunk-BJFSTKB3.js +1 -0
  17. package/browser/{chunk-KLUNVGJU.js → chunk-BPGILYXN.js} +1 -1
  18. package/browser/chunk-CPFVLY3T.js +1 -0
  19. package/browser/{chunk-MMKBNIVO.js → chunk-DYANOPHQ.js} +1 -1
  20. package/browser/chunk-E3JFJFIJ.js +1 -0
  21. package/browser/{chunk-LBM2LAI4.js → chunk-EFRFG6GO.js} +1 -1
  22. package/browser/{chunk-JPVNXEXU.js → chunk-EL5IQEU5.js} +1 -1
  23. package/browser/{chunk-M7DIJJQG.js → chunk-F5UWLT3X.js} +1 -1
  24. package/browser/{chunk-Z4XRVREO.js → chunk-FASC6WKR.js} +1 -1
  25. package/browser/{chunk-PZAUOUF2.js → chunk-FEMUXIQ5.js} +1 -1
  26. package/browser/{chunk-U2LEWOUD.js → chunk-FQHQCCYN.js} +1 -1
  27. package/browser/{chunk-BRCCB6H7.js → chunk-G6MC26UY.js} +1 -1
  28. package/browser/{chunk-QILM5UIY.js → chunk-GGNCDOF3.js} +1 -1
  29. package/browser/{chunk-3WSAZ5CJ.js → chunk-I7DNESMT.js} +1 -1
  30. package/browser/{chunk-FE2QUEAE.js → chunk-IDDQUVUO.js} +1 -1
  31. package/browser/{chunk-XOZI7E3H.js → chunk-IEGDP7IZ.js} +1 -1
  32. package/browser/{chunk-JVBN6LZN.js → chunk-IJHAKS36.js} +1 -1
  33. package/browser/{chunk-RPMRNJNU.js → chunk-IREZ3UJ3.js} +1 -1
  34. package/browser/chunk-J65IZXMJ.js +1 -0
  35. package/browser/{chunk-IDSFG476.js → chunk-KLKZMHAD.js} +1 -1
  36. package/browser/{chunk-VWMCMODB.js → chunk-KM7CQJ3E.js} +1 -1
  37. package/browser/{chunk-2PCZ45ML.js → chunk-LHEQ6HXJ.js} +1 -1
  38. package/browser/{chunk-FY7JFXWI.js → chunk-LJOYPBE3.js} +1 -1
  39. package/browser/{chunk-OMPVYEWF.js → chunk-MMPI6RMV.js} +1 -1
  40. package/browser/{chunk-D7NRPJD7.js → chunk-MUQFZY3N.js} +1 -1
  41. package/browser/{chunk-DLU3TQID.js → chunk-N5UH5PRX.js} +1 -1
  42. package/browser/{chunk-G4QDBE4F.js → chunk-NMGDBGR3.js} +1 -1
  43. package/browser/{chunk-IV62G3DN.js → chunk-OHT3DAE2.js} +1 -1
  44. package/browser/{chunk-APQFC6DT.js → chunk-PK3KWLLW.js} +1 -1
  45. package/browser/{chunk-ZJOG2VD7.js → chunk-PKGUR3OJ.js} +1 -1
  46. package/browser/{chunk-IF2A56UI.js → chunk-PMENB5UW.js} +1 -1
  47. package/browser/{chunk-ARMANJS6.js → chunk-PUJBA6OY.js} +1 -1
  48. package/browser/{chunk-C6OO5XU6.js → chunk-Q643KTCY.js} +1 -1
  49. package/browser/{chunk-75DAJTMO.js → chunk-QCGVGCBB.js} +1 -1
  50. package/browser/{chunk-CC5AKB2A.js → chunk-QMQRJWM2.js} +1 -1
  51. package/browser/{chunk-RNXBUYHW.js → chunk-QPN22TF2.js} +2 -2
  52. package/browser/{chunk-SODYVTNM.js → chunk-R2PDKYWK.js} +1 -1
  53. package/browser/{chunk-OI3PIKFL.js → chunk-RSQZM7XG.js} +1 -1
  54. package/browser/{chunk-OSX2KHVN.js → chunk-RWXOWRWR.js} +1 -1
  55. package/browser/{chunk-FAAHG43E.js → chunk-TXXZ4LMH.js} +1 -1
  56. package/browser/{chunk-LTFITYTW.js → chunk-UARV2YUR.js} +1 -1
  57. package/browser/{chunk-LCBWJP6Z.js → chunk-UCFKZZMU.js} +1 -1
  58. package/browser/{chunk-LJNXMPVH.js → chunk-UCQMPA3P.js} +1 -1
  59. package/browser/{chunk-CR7BT2S7.js → chunk-VBXWUQS7.js} +1 -1
  60. package/browser/{chunk-SKVQOMLG.js → chunk-VIPJVFGJ.js} +1 -1
  61. package/browser/{chunk-2WIZNY75.js → chunk-VQHYAE3Z.js} +1 -1
  62. package/browser/{chunk-66Q72EK5.js → chunk-VUMSWC3G.js} +1 -1
  63. package/browser/{chunk-VJA2YUJF.js → chunk-VZTMSCXJ.js} +1 -1
  64. package/browser/{chunk-BOMZXZNH.js → chunk-WER6464F.js} +1 -1
  65. package/browser/chunk-WXZHTKY6.js +1 -0
  66. package/browser/{chunk-YXC5ZRFS.js → chunk-WZ5GZFOX.js} +1 -1
  67. package/browser/{chunk-NLRFBAA2.js → chunk-XDTTR6NK.js} +1 -1
  68. package/browser/chunk-YUXJIFVV.js +1 -0
  69. package/browser/{chunk-4EW3L5UH.js → chunk-YWWGX3OO.js} +1 -1
  70. package/browser/icon-192.png +0 -0
  71. package/browser/icon-512.png +0 -0
  72. package/browser/index.html +11 -3
  73. package/browser/main-ADK3DSZE.js +1 -0
  74. package/browser/manifest.json +22 -0
  75. package/browser/sw.js +13 -0
  76. package/package.json +1 -1
  77. package/browser/chunk-4B6WWUKB.js +0 -1
  78. package/browser/chunk-BISLPWXC.js +0 -1
  79. package/browser/chunk-EL5VFUGV.js +0 -1
  80. package/browser/chunk-FTUXYITR.js +0 -1
  81. package/browser/chunk-G3FLRQOL.js +0 -1
  82. package/browser/chunk-GYZJRAEL.js +0 -1
  83. package/browser/chunk-OQYNSZCT.js +0 -1
  84. package/browser/chunk-RZJGBP6T.js +0 -1
  85. package/browser/chunk-WBRWLEC2.js +0 -1
  86. package/browser/main-TTEPDCGF.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a as tr}from"./chunk-NLRFBAA2.js";import{a as pn,b as mn,e as nr,g as Ye}from"./chunk-CC5AKB2A.js";import{a as vn}from"./chunk-O7ALTLRI.js";import{a as dn,b as Pe,c as jo,g as Yo,h as Go,i as Xo,m as Qo,n as Zo,p as Ko,r as xn,t as Jo,v as er,w as qe,y as _n}from"./chunk-APQFC6DT.js";import{a as ir}from"./chunk-2NXSUKWO.js";import{d as Ro}from"./chunk-LTFITYTW.js";import{a as dr}from"./chunk-SKVQOMLG.js";import{p as lr,r as cr}from"./chunk-BOMZXZNH.js";import{b as Wo,p as or,q as rr,r as ar,v as sr}from"./chunk-JRNOMFVU.js";import{a as qo,b as bn}from"./chunk-LCBWJP6Z.js";import{a as J,b as me}from"./chunk-MMKBNIVO.js";import{C as fn,c as un,g as hn,m as gn}from"./chunk-DLU3TQID.js";import{b as Oe}from"./chunk-G4QDBE4F.js";import{E as Vo,K as Uo,O as je,Q as Bo,R as cn,S as We,i as Fo,j as Lo,p as Ho,s as No,t as zo,z as $o}from"./chunk-24VYLV4I.js";import{$b as Oo,B as Se,Bb as O,D as en,Db as w,Ec as ln,Fb as m,G as bo,Ga as ue,Gc as Do,Ha as Co,Hc as fi,Ja as yo,Jb as ut,Jc as fe,Ka as p,Kb as He,Lb as Ne,Pa as wo,Rb as he,Rc as Me,T as K,Tb as f,Ub as F,Uc as Ee,Vb as ht,Wa as R,Wb as tn,Xa as To,Xb as nn,Ya as So,Yb as on,Z as Y,Za as ko,Zb as rn,_ as xo,_b as Eo,a as j,ac as Po,b as Te,bc as Io,ca as g,d as N,dc as It,ec as Ao,fc as gi,g as Kt,ga as T,h as xe,ha as S,i as Jt,jb as Be,kc as an,la as _o,lb as x,m as mi,mb as _,n as go,oa as H,pa as vo,pb as de,qb as pe,rb as M,sb as c,t as Ve,ta as Ue,tb as d,tc as sn,u as fo,ub as I,va as ke,vb as ui,wb as hi,xb as Mo,ya as mt}from"./chunk-RNXBUYHW.js";var Cn=class i{sanitizer=g(Ee);transform(e,t){if(!t||!e)return e;let n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=new RegExp(`(${n})`,"gi"),r=e.replace(o,"<strong>$1</strong>");return this.sanitizer.bypassSecurityTrustHtml(r)}static \u0275fac=function(t){return new(t||i)};static \u0275pipe=ko({name:"highlight",type:i,pure:!0})};var gt=class i{http=g(Me);projectState=g(Oe);threadState=g(Pe);transcribeAudio(e,t,n){let o=this.projectState.getSelectedProjectIdOrThrow();return this.http.post(`/api/projects/${o}/transcribe`,j({audio:e,mimeType:t},n?{language:n}:{}))}sendVoiceMessage(e,t,n){let o=this.projectState.getSelectedProjectIdOrThrow(),r=this.threadState.getSelectedThreadIdOrThrow();return this.http.post(`/api/projects/${o}/threads/${r}/voice-message`,j({audio:e,mimeType:t},n?{language:n}:{}))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac,providedIn:"root"})};var za=["messageInput"],$a=["fileInput"],Va=(i,e)=>e.name;function Ua(i,e){i&1&&(c(0,"div",3),I(1,"span",8),f(2," Recording... Click mic to stop "),d())}function Ba(i,e){i&1&&(c(0,"div",3),I(1,"span",9),f(2," Transcribing... "),d())}function ja(i,e){if(i&1&&(c(0,"span",14),f(1),d()),i&2){let t=m().$implicit,n=m(2);p(),F(" "+(n.getParameterFormat(t)||""))}}function Wa(i,e){if(i&1){let t=O();c(0,"div",11),w("click",function(){let o=T(t).$index,r=m(2);return S(r.selectAutocompleteItemByClick(o))})("keydown.enter",function(){let o=T(t).$index,r=m(2);return S(r.selectAutocompleteItemByClick(o))})("keydown.space",function(){let o=T(t).$index,r=m(2);return S(r.selectAutocompleteItemByClick(o))})("mouseenter",function(){let o=T(t).$index,r=m(2);return S(r.selectedAutocompleteIndex=o)}),c(1,"div",12),I(2,"span",13),It(3,"highlight"),x(4,ja,2,1,"span",14),d(),I(5,"div",15),It(6,"highlight"),d()}if(i&2){let t=e.$implicit,n=e.$index,o=m(2);he("selected",n===o.selectedAutocompleteIndex),Be("aria-selected",n===o.selectedAutocompleteIndex),p(2),M("innerHTML",gi(3,6,o.autocompleteTrigger+t.name,o.getAutocompleteQuery()),ue),p(2),_(o.hasParameterFormat(t)?4:-1),p(),M("innerHTML",gi(6,9,t.description,o.getAutocompleteQuery()),ue)}}function qa(i,e){if(i&1&&(c(0,"div",4),de(1,Wa,7,12,"div",10,Va),d()),i&2){let t=m();p(),pe(t.autocompleteItems)}}function Ya(i,e){if(i&1){let t=O();c(0,"ds-icon-button",18),w("action",function(){T(t);let o=m(2);return S(o.onStopClick())}),d()}}function Ga(i,e){if(i&1){let t=O();c(0,"ds-icon-button",19),w("action",function(){T(t);let o=m(2);return S(o.sendMessage())}),d()}if(i&2){let t=m(2);he("hidden",t.isDisabled||!t.message.trim())("active",!!t.message.trim()&&!t.isDisabled),M("title",t.getSendButtonTooltip())("disabled",t.isDisabled||!t.message.trim())}}function Xa(i,e){if(i&1){let t=O();c(0,"ds-icon-button",21),w("action",function(){T(t);let o=m(3);return S(o.triggerFileUpload())}),d(),c(1,"input",22,1),w("change",function(o){T(t);let r=m(3);return S(r.onFileInputChange(o))}),d()}if(i&2){let t=m(3);M("disabled",t.isDisabled)}}function Qa(i,e){if(i&1){let t=O();x(0,Xa,3,1),c(1,"ds-icon-button",20),w("action",function(){T(t);let o=m(2);return S(o.toggleRecording())}),d()}if(i&2){let t=m(2);_(!t.showWelcome&&!(t.isVoiceMessageMode&&(t.isRecording||t.isTranscribing))?0:-1),p(),he("hidden",t.message.trim()&&!t.isRecording&&!t.isTranscribing),M("variant",t.isVoiceMessageMode&&(t.isRecording||t.isTranscribing)?"danger":"default")("disabled",t.isVoiceMessageMode&&t.isTranscribing)("title",t.isRecording?"Click to stop recording":t.isTranscribing?"Uploading...":"Click to start recording")}}function Za(i,e){if(i&1&&(c(0,"div",7),x(1,Ya,1,0,"ds-icon-button",16),x(2,Ga,1,6,"ds-icon-button",17),x(3,Qa,2,6),d()),i&2){let t=m();p(),_(t.isThinking?1:-1),p(),_((!t.isThinking||t.message.trim())&&!(t.isVoiceMessageMode&&(t.isRecording||t.isTranscribing))?2:-1),p(),_(t.isThinking?-1:3)}}var yn=class i{isDisabled=!1;showWelcome=!1;isThinking=!1;isStarting=!1;isSessionInitializing=!1;isStopping=!1;filesPasted=new H;messageSubmitted=new H;voiceMessageReady=new H;voiceRecordingToggled=new H;heightChanged=new H;stopRequested=new H;textareaFocused=new H;messageInput;fileInput;message="";isRecording=!1;isTranscribing=!1;isFocused=!1;recognition=null;mediaRecorder=null;audioChunks=[];voiceInputMode="browser";get isVoiceMessageMode(){return this.voiceInputMode==="voice-message"}sessionHadTranscript=!1;pendingLineBreaksTimeout=null;lastProcessedResultIndex=0;useEnterToSend=!1;currentInvite="";subscriptions=[];thinkingPhrases=["Processing request...","Thinking...","Working on it..."];currentThinkingPhrase="Processing request...";thinkingPhraseIndex=0;thinkingInterval=null;autocompleteVisible=!1;autocompleteTrigger=null;autocompleteItems=[];selectedAutocompleteIndex=0;preferencesService=g(qe);codayService=g(Ye);agentApiService=g(tr);promptApiService=g(dr);projectStateService=g(Oe);audioApiService=g(gt);threadStateService=g(Pe);ngOnInit(){this.initializeVoiceInput(),this.useEnterToSend=this.preferencesService.getEnterToSend(),this.subscriptions.push(this.preferencesService.voiceLanguage$.subscribe(()=>this.updateRecognitionLanguage())),this.subscriptions.push(this.preferencesService.voiceInputMode$.subscribe(e=>{this.voiceInputMode=e})),this.subscriptions.push(this.preferencesService.enterToSend$.subscribe(e=>{this.useEnterToSend=e})),this.subscribeToInviteEvents(),this.subscribeToMessageRestore()}ngAfterViewInit(){this.adjustTextareaHeight(),requestAnimationFrame(()=>{setTimeout(()=>this.focusTextarea(),200)})}ngOnChanges(e){e.isThinking&&(e.isThinking.currentValue?this.startThinkingAnimation():(this.stopThinkingAnimation(),this.isStopping=!1,e.isThinking.previousValue&&(console.log("[CHAT-TEXTAREA] Thinking ended, scheduling focus"),requestAnimationFrame(()=>{setTimeout(()=>this.focusTextarea(),100)})))),e.isSessionInitializing&&!e.isSessionInitializing.currentValue&&e.isSessionInitializing.previousValue&&(console.log("[CHAT-TEXTAREA] Session initialization completed, scheduling focus"),requestAnimationFrame(()=>{setTimeout(()=>this.focusTextarea(),100)})),e.isStarting&&!e.isStarting.currentValue&&e.isStarting.previousValue&&this.isThinking&&(this.thinkingPhraseIndex===0?(console.log("[CHAT-TEXTAREA] Transitioning from Starting to Thinking at index 0 - restarting animation"),this.stopThinkingAnimation(),this.startThinkingAnimation()):console.log("[CHAT-TEXTAREA] Transitioning from Starting to Thinking at index",this.thinkingPhraseIndex,"- continuing without restart"))}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=[],this.clearPendingLineBreaks(),this.stopThinkingAnimation()}onKeyDown(e){if(this.autocompleteVisible)switch(e.key){case"ArrowDown":e.preventDefault(),this.selectedAutocompleteIndex=Math.min(this.selectedAutocompleteIndex+1,this.autocompleteItems.length-1),this.scrollSelectedItemIntoView();return;case"ArrowUp":e.preventDefault(),this.selectedAutocompleteIndex=Math.max(this.selectedAutocompleteIndex-1,0),this.scrollSelectedItemIntoView();return;case"Tab":case"Enter":if(!this.message.includes(" ")){e.preventDefault(),this.selectAutocompleteItem();return}break;case"Escape":e.preventDefault(),this.hideAutocomplete();return}e.key==="Enter"&&(this.useEnterToSend?!e.shiftKey&&!e.metaKey&&!e.ctrlKey&&(e.preventDefault(),this.sendMessage(!0)):(navigator.platform.toLowerCase().includes("mac")?e.metaKey:e.ctrlKey)&&!e.shiftKey&&(e.preventDefault(),this.sendMessage(!0)))}onInput(){this.adjustTextareaHeight(),this.checkForAutocomplete()}onPaste(e){let t=e.clipboardData?.items;if(!t)return;let n=Array.from(t).filter(r=>r.kind==="file");if(!n.length)return;e.preventDefault();let o=n.reduce((r,a)=>{let l=a.getAsFile();return l?[...r,l]:r},[]);o.length&&this.filesPasted.emit(o)}triggerFileUpload(){console.log("[CHAT-TEXTAREA] Triggering file upload"),this.fileInput?.nativeElement?.click()}onFileInputChange(e){let t=e.target,n=t.files;if(!n||n.length===0){console.log("[CHAT-TEXTAREA] No files selected");return}console.log("[CHAT-TEXTAREA] Files selected:",n.length);let o=Array.from(n);this.filesPasted.emit(o),t.value=""}onDocumentClick(e){if(!this.autocompleteVisible)return;let t=e.target,n=document.querySelector(".autocomplete-popup"),o=this.messageInput?.nativeElement;n&&!n.contains(t)&&o&&!o.contains(t)&&this.hideAutocomplete()}sendMessage(e=!1){let t=this.message.trim();!this.isDisabled&&(e||t)&&(this.isRecording&&this.recognition&&(this.clearPendingLineBreaks(),this.recognition.stop()),this.messageSubmitted.emit(t),this.message="",setTimeout(()=>this.adjustTextareaHeight(),0))}onStopClick(){this.isStopping=!0,this.stopRequested.emit()}toggleRecording(){this.isRecording?this.voiceInputMode==="whisper"||this.voiceInputMode==="voice-message"?this.stopWhisperRecording():this.stopRecording():this.voiceInputMode==="whisper"||this.voiceInputMode==="voice-message"?this.startWhisperRecording():this.startRecording()}startWhisperRecording(){return N(this,null,function*(){if(!this.isRecording)try{let e=yield navigator.mediaDevices.getUserMedia({audio:!0});this.audioChunks=[],this.mediaRecorder=new MediaRecorder(e),this.mediaRecorder.ondataavailable=t=>{t.data.size>0&&this.audioChunks.push(t.data)},this.mediaRecorder.onstop=()=>{e.getTracks().forEach(t=>t.stop()),this.processWhisperAudio()},this.mediaRecorder.onerror=t=>{console.error("[WHISPER] MediaRecorder error:",t),e.getTracks().forEach(n=>n.stop()),this.isRecording=!1,this.voiceRecordingToggled.emit(!1)},this.mediaRecorder.start(),this.isRecording=!0,this.voiceRecordingToggled.emit(!0),console.log("[WHISPER] Started recording")}catch(e){console.error("[WHISPER] Failed to start recording:",e),this.isRecording=!1,this.voiceRecordingToggled.emit(!1)}})}stopWhisperRecording(){if(!(!this.mediaRecorder||!this.isRecording))try{this.mediaRecorder.stop(),this.isRecording=!1,this.voiceRecordingToggled.emit(!1),console.log("[WHISPER] Stopped recording")}catch(e){console.error("[WHISPER] Failed to stop recording:",e),this.isRecording=!1,this.voiceRecordingToggled.emit(!1)}}processWhisperAudio(){if(this.audioChunks.length===0)return;let e=new Blob(this.audioChunks,{type:this.mediaRecorder?.mimeType||"audio/webm"}),t=e.type.split(";")[0]||"audio/webm";this.audioChunks=[],this.isTranscribing=!0;let n=new FileReader;n.onloadend=()=>{let o=n.result.split(",")[1];if(!o){console.error("[WHISPER] Failed to read audio as base64"),this.isTranscribing=!1;return}let a=this.preferencesService.getVoiceLanguage().split("-")[0];if(this.voiceInputMode==="voice-message"){if(!this.threadStateService.getSelectedThreadId()){console.log("[WHISPER] No thread selected \u2014 emitting voiceMessageReady for thread creation"),this.isTranscribing=!1,this.voiceMessageReady.emit({base64:o,mimeType:t,language:a});return}this.audioApiService.sendVoiceMessage(o,t,a).subscribe({next:l=>{this.isTranscribing=!1,console.log("[WHISPER] Voice message sent, transcription:",l.transcription?.substring(0,50))},error:l=>{console.error("[WHISPER] Voice message error:",l),this.isTranscribing=!1,this.fallbackToTranscription(o,t,a)}})}else this.audioApiService.transcribeAudio(o,t,a).subscribe({next:l=>{this.isTranscribing=!1,l.text&&this.appendToTextarea(l.text+" ")},error:l=>{console.error("[WHISPER] Transcription error:",l),this.isTranscribing=!1}})},n.readAsDataURL(e)}fallbackToTranscription(e,t,n){this.audioApiService.transcribeAudio(e,t,n).subscribe({next:o=>{this.isTranscribing=!1,o.text&&this.appendToTextarea(o.text+" ")},error:o=>{console.error("[WHISPER] Fallback transcription also failed:",o),this.isTranscribing=!1}})}initializeVoiceInput(){let e=window.SpeechRecognition??window.webkitSpeechRecognition;if(console.log("[SPEECH] speechRecognition",e),!e){console.warn("[SPEECH] Speech Recognition API not available");return}this.recognition=new e,this.recognition.continuous=!0,this.recognition.interimResults=!0,this.recognition.maxAlternatives=1,this.recognition.lang=this.getSelectedLanguage();try{"grammars"in this.recognition&&(this.recognition.serviceURI=void 0)}catch(t){console.log("[SPEECH] Advanced speech recognition parameters not supported")}this.recognition.onresult=t=>{let n="",o=Math.max(t.resultIndex,this.lastProcessedResultIndex);for(let r=o;r<t.results.length;r++)t.results[r].isFinal&&(n+=t.results[r][0].transcript,this.lastProcessedResultIndex=r+1);if(n){let r=this.improveTranscriptPunctuation(n.trim());this.sessionHadTranscript=!0,console.log("[SPEECH] onresult ending, appending to textarea",this.isRecording),this.appendToTextarea(r)}},this.recognition.onend=()=>{console.log("[SPEECH] Recognition ended. Was recording:",this.isRecording),this.isRecording=!1,this.lastProcessedResultIndex=0,this.voiceRecordingToggled.emit(this.isRecording)},this.recognition.onerror=t=>{console.error("[SPEECH] Speech recognition error:",t.error),console.log("[SPEECH] Error details:",{error:t.error,message:t.message,timeStamp:t.timeStamp}),this.isRecording=!1,this.lastProcessedResultIndex=0,this.clearPendingLineBreaks(),this.voiceRecordingToggled.emit(this.isRecording)},this.recognition.onstart=()=>{console.log("[SPEECH] Recognition started successfully")},this.recognition.onspeechstart=()=>{console.log("[SPEECH] Speech detected")},this.recognition.onspeechend=()=>{console.log("[SPEECH] Speech ended")}}startRecording(){return N(this,null,function*(){if(!(!this.recognition||this.isRecording))try{this.isRecording=!0,this.sessionHadTranscript=!1,this.lastProcessedResultIndex=0,this.clearPendingLineBreaks(),this.voiceRecordingToggled.emit(this.isRecording),this.recognition.start(),console.log("[SPEECH] Started recording")}catch(e){console.error("[SPEECH] Failed to start recording:",e),this.isRecording=!1,this.voiceRecordingToggled.emit(this.isRecording)}})}stopRecording(){if(!this.recognition||!this.isRecording){console.log("[SPEECH] stopRecording not recording");return}try{console.log("[SPEECH] stopRecording recognition stop"),this.recognition.stop(),this.schedulePendingLineBreaks()}catch(e){console.error("[SPEECH] Failed to stop recording:",e)}}getSelectedLanguage(){return this.preferencesService.getVoiceLanguage()}updateRecognitionLanguage(){if(this.recognition){let e=this.getSelectedLanguage();this.recognition.lang=e,console.log("[SPEECH] Language changed to:",e)}}improveTranscriptPunctuation(e){let t=e;return/[.!?]$/.test(t.trim())||(t=t.trim()+"."),t=t.charAt(0).toUpperCase()+t.slice(1),t=t.replace(/\s+/g," "),t=t+" ",t}appendToTextarea(e){let t=this.message;if(this.message=t?`${t}${e}`:e,this.messageInput?.nativeElement){this.messageInput.nativeElement.focus();let n=this.message.length;this.messageInput.nativeElement.setSelectionRange(n,n)}setTimeout(()=>this.adjustTextareaHeight(),0)}schedulePendingLineBreaks(){this.clearPendingLineBreaks(),this.pendingLineBreaksTimeout=window.setTimeout(()=>{this.sessionHadTranscript&&(console.log("[SPEECH] Adding line breaks after transcript session"),this.appendToTextarea(`
1
+ import{a as tr}from"./chunk-XDTTR6NK.js";import{a as pn,b as mn,e as nr,g as Ye}from"./chunk-QMQRJWM2.js";import{a as vn}from"./chunk-2NBVMKPO.js";import{a as dn,b as Pe,c as jo,g as Yo,h as Go,i as Xo,m as Qo,n as Zo,p as Ko,r as xn,t as Jo,v as er,w as qe,y as _n}from"./chunk-PK3KWLLW.js";import{a as ir}from"./chunk-4HKHCNH5.js";import{d as Ro}from"./chunk-UARV2YUR.js";import{a as dr}from"./chunk-VIPJVFGJ.js";import{p as lr,r as cr}from"./chunk-WER6464F.js";import{b as Wo,p as or,q as rr,r as ar,v as sr}from"./chunk-7YDOHTEK.js";import{a as qo,b as bn}from"./chunk-UCFKZZMU.js";import{a as J,b as me}from"./chunk-DYANOPHQ.js";import{C as fn,c as un,g as hn,m as gn}from"./chunk-N5UH5PRX.js";import{b as Oe}from"./chunk-NMGDBGR3.js";import{E as Vo,K as Uo,O as je,Q as Bo,R as cn,S as We,i as Fo,j as Lo,p as Ho,s as No,t as zo,z as $o}from"./chunk-4YLSQZJK.js";import{$b as Oo,B as Se,Bb as O,D as en,Db as w,Fb as m,Fc as ln,G as bo,Ga as ue,Ha as Co,Hc as Do,Ic as fi,Ja as yo,Jb as ut,Ka as p,Kb as He,Kc as fe,Lb as Ne,Pa as wo,Rb as he,Sc as Me,T as K,Tb as f,Ub as F,Vb as ht,Vc as Ee,Wa as R,Wb as tn,Xa as To,Xb as nn,Ya as So,Yb as on,Z as Y,Za as ko,Zb as rn,_ as xo,_b as Eo,a as j,ac as Po,b as Te,bc as Io,ca as g,d as N,dc as It,ec as Ao,fc as gi,g as Kt,ga as T,h as xe,ha as S,i as Jt,jb as Be,kc as an,la as _o,lb as x,m as mi,mb as _,n as go,oa as H,pa as vo,pb as de,qb as pe,rb as M,sb as c,t as Ve,ta as Ue,tb as d,u as fo,ub as I,uc as sn,va as ke,vb as ui,wb as hi,xb as Mo,ya as mt}from"./chunk-QPN22TF2.js";var Cn=class i{sanitizer=g(Ee);transform(e,t){if(!t||!e)return e;let n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=new RegExp(`(${n})`,"gi"),r=e.replace(o,"<strong>$1</strong>");return this.sanitizer.bypassSecurityTrustHtml(r)}static \u0275fac=function(t){return new(t||i)};static \u0275pipe=ko({name:"highlight",type:i,pure:!0})};var gt=class i{http=g(Me);projectState=g(Oe);threadState=g(Pe);transcribeAudio(e,t,n){let o=this.projectState.getSelectedProjectIdOrThrow();return this.http.post(`/api/projects/${o}/transcribe`,j({audio:e,mimeType:t},n?{language:n}:{}))}sendVoiceMessage(e,t,n){let o=this.projectState.getSelectedProjectIdOrThrow(),r=this.threadState.getSelectedThreadIdOrThrow();return this.http.post(`/api/projects/${o}/threads/${r}/voice-message`,j({audio:e,mimeType:t},n?{language:n}:{}))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac,providedIn:"root"})};var za=["messageInput"],$a=["fileInput"],Va=(i,e)=>e.name;function Ua(i,e){i&1&&(c(0,"div",3),I(1,"span",8),f(2," Recording... Click mic to stop "),d())}function Ba(i,e){i&1&&(c(0,"div",3),I(1,"span",9),f(2," Transcribing... "),d())}function ja(i,e){if(i&1&&(c(0,"span",14),f(1),d()),i&2){let t=m().$implicit,n=m(2);p(),F(" "+(n.getParameterFormat(t)||""))}}function Wa(i,e){if(i&1){let t=O();c(0,"div",11),w("click",function(){let o=T(t).$index,r=m(2);return S(r.selectAutocompleteItemByClick(o))})("keydown.enter",function(){let o=T(t).$index,r=m(2);return S(r.selectAutocompleteItemByClick(o))})("keydown.space",function(){let o=T(t).$index,r=m(2);return S(r.selectAutocompleteItemByClick(o))})("mouseenter",function(){let o=T(t).$index,r=m(2);return S(r.selectedAutocompleteIndex=o)}),c(1,"div",12),I(2,"span",13),It(3,"highlight"),x(4,ja,2,1,"span",14),d(),I(5,"div",15),It(6,"highlight"),d()}if(i&2){let t=e.$implicit,n=e.$index,o=m(2);he("selected",n===o.selectedAutocompleteIndex),Be("aria-selected",n===o.selectedAutocompleteIndex),p(2),M("innerHTML",gi(3,6,o.autocompleteTrigger+t.name,o.getAutocompleteQuery()),ue),p(2),_(o.hasParameterFormat(t)?4:-1),p(),M("innerHTML",gi(6,9,t.description,o.getAutocompleteQuery()),ue)}}function qa(i,e){if(i&1&&(c(0,"div",4),de(1,Wa,7,12,"div",10,Va),d()),i&2){let t=m();p(),pe(t.autocompleteItems)}}function Ya(i,e){if(i&1){let t=O();c(0,"ds-icon-button",18),w("action",function(){T(t);let o=m(2);return S(o.onStopClick())}),d()}}function Ga(i,e){if(i&1){let t=O();c(0,"ds-icon-button",19),w("action",function(){T(t);let o=m(2);return S(o.sendMessage())}),d()}if(i&2){let t=m(2);he("hidden",t.isDisabled||!t.message.trim())("active",!!t.message.trim()&&!t.isDisabled),M("title",t.getSendButtonTooltip())("disabled",t.isDisabled||!t.message.trim())}}function Xa(i,e){if(i&1){let t=O();c(0,"ds-icon-button",21),w("action",function(){T(t);let o=m(3);return S(o.triggerFileUpload())}),d(),c(1,"input",22,1),w("change",function(o){T(t);let r=m(3);return S(r.onFileInputChange(o))}),d()}if(i&2){let t=m(3);M("disabled",t.isDisabled)}}function Qa(i,e){if(i&1){let t=O();x(0,Xa,3,1),c(1,"ds-icon-button",20),w("action",function(){T(t);let o=m(2);return S(o.toggleRecording())}),d()}if(i&2){let t=m(2);_(!t.showWelcome&&!(t.isVoiceMessageMode&&(t.isRecording||t.isTranscribing))?0:-1),p(),he("hidden",t.message.trim()&&!t.isRecording&&!t.isTranscribing),M("variant",t.isVoiceMessageMode&&(t.isRecording||t.isTranscribing)?"danger":"default")("disabled",t.isVoiceMessageMode&&t.isTranscribing)("title",t.isRecording?"Click to stop recording":t.isTranscribing?"Uploading...":"Click to start recording")}}function Za(i,e){if(i&1&&(c(0,"div",7),x(1,Ya,1,0,"ds-icon-button",16),x(2,Ga,1,6,"ds-icon-button",17),x(3,Qa,2,6),d()),i&2){let t=m();p(),_(t.isThinking?1:-1),p(),_((!t.isThinking||t.message.trim())&&!(t.isVoiceMessageMode&&(t.isRecording||t.isTranscribing))?2:-1),p(),_(t.isThinking?-1:3)}}var yn=class i{isDisabled=!1;showWelcome=!1;isThinking=!1;isStarting=!1;isSessionInitializing=!1;isStopping=!1;filesPasted=new H;messageSubmitted=new H;voiceMessageReady=new H;voiceRecordingToggled=new H;heightChanged=new H;stopRequested=new H;textareaFocused=new H;messageInput;fileInput;message="";isRecording=!1;isTranscribing=!1;isFocused=!1;recognition=null;mediaRecorder=null;audioChunks=[];voiceInputMode="browser";get isVoiceMessageMode(){return this.voiceInputMode==="voice-message"}sessionHadTranscript=!1;pendingLineBreaksTimeout=null;lastProcessedResultIndex=0;useEnterToSend=!1;currentInvite="";subscriptions=[];thinkingPhrases=["Processing request...","Thinking...","Working on it..."];currentThinkingPhrase="Processing request...";thinkingPhraseIndex=0;thinkingInterval=null;autocompleteVisible=!1;autocompleteTrigger=null;autocompleteItems=[];selectedAutocompleteIndex=0;preferencesService=g(qe);codayService=g(Ye);agentApiService=g(tr);promptApiService=g(dr);projectStateService=g(Oe);audioApiService=g(gt);threadStateService=g(Pe);ngOnInit(){this.initializeVoiceInput(),this.useEnterToSend=this.preferencesService.getEnterToSend(),this.subscriptions.push(this.preferencesService.voiceLanguage$.subscribe(()=>this.updateRecognitionLanguage())),this.subscriptions.push(this.preferencesService.voiceInputMode$.subscribe(e=>{this.voiceInputMode=e})),this.subscriptions.push(this.preferencesService.enterToSend$.subscribe(e=>{this.useEnterToSend=e})),this.subscribeToInviteEvents(),this.subscribeToMessageRestore()}ngAfterViewInit(){this.adjustTextareaHeight(),requestAnimationFrame(()=>{setTimeout(()=>this.focusTextarea(),200)})}ngOnChanges(e){e.isThinking&&(e.isThinking.currentValue?this.startThinkingAnimation():(this.stopThinkingAnimation(),this.isStopping=!1,e.isThinking.previousValue&&(console.log("[CHAT-TEXTAREA] Thinking ended, scheduling focus"),requestAnimationFrame(()=>{setTimeout(()=>this.focusTextarea(),100)})))),e.isSessionInitializing&&!e.isSessionInitializing.currentValue&&e.isSessionInitializing.previousValue&&(console.log("[CHAT-TEXTAREA] Session initialization completed, scheduling focus"),requestAnimationFrame(()=>{setTimeout(()=>this.focusTextarea(),100)})),e.isStarting&&!e.isStarting.currentValue&&e.isStarting.previousValue&&this.isThinking&&(this.thinkingPhraseIndex===0?(console.log("[CHAT-TEXTAREA] Transitioning from Starting to Thinking at index 0 - restarting animation"),this.stopThinkingAnimation(),this.startThinkingAnimation()):console.log("[CHAT-TEXTAREA] Transitioning from Starting to Thinking at index",this.thinkingPhraseIndex,"- continuing without restart"))}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=[],this.clearPendingLineBreaks(),this.stopThinkingAnimation()}onKeyDown(e){if(this.autocompleteVisible)switch(e.key){case"ArrowDown":e.preventDefault(),this.selectedAutocompleteIndex=Math.min(this.selectedAutocompleteIndex+1,this.autocompleteItems.length-1),this.scrollSelectedItemIntoView();return;case"ArrowUp":e.preventDefault(),this.selectedAutocompleteIndex=Math.max(this.selectedAutocompleteIndex-1,0),this.scrollSelectedItemIntoView();return;case"Tab":case"Enter":if(!this.message.includes(" ")){e.preventDefault(),this.selectAutocompleteItem();return}break;case"Escape":e.preventDefault(),this.hideAutocomplete();return}e.key==="Enter"&&(this.useEnterToSend?!e.shiftKey&&!e.metaKey&&!e.ctrlKey&&(e.preventDefault(),this.sendMessage(!0)):(navigator.platform.toLowerCase().includes("mac")?e.metaKey:e.ctrlKey)&&!e.shiftKey&&(e.preventDefault(),this.sendMessage(!0)))}onInput(){this.adjustTextareaHeight(),this.checkForAutocomplete()}onPaste(e){let t=e.clipboardData?.items;if(!t)return;let n=Array.from(t).filter(r=>r.kind==="file");if(!n.length)return;e.preventDefault();let o=n.reduce((r,a)=>{let l=a.getAsFile();return l?[...r,l]:r},[]);o.length&&this.filesPasted.emit(o)}triggerFileUpload(){console.log("[CHAT-TEXTAREA] Triggering file upload"),this.fileInput?.nativeElement?.click()}onFileInputChange(e){let t=e.target,n=t.files;if(!n||n.length===0){console.log("[CHAT-TEXTAREA] No files selected");return}console.log("[CHAT-TEXTAREA] Files selected:",n.length);let o=Array.from(n);this.filesPasted.emit(o),t.value=""}onDocumentClick(e){if(!this.autocompleteVisible)return;let t=e.target,n=document.querySelector(".autocomplete-popup"),o=this.messageInput?.nativeElement;n&&!n.contains(t)&&o&&!o.contains(t)&&this.hideAutocomplete()}sendMessage(e=!1){let t=this.message.trim();!this.isDisabled&&(e||t)&&(this.isRecording&&this.recognition&&(this.clearPendingLineBreaks(),this.recognition.stop()),this.messageSubmitted.emit(t),this.message="",setTimeout(()=>this.adjustTextareaHeight(),0))}onStopClick(){this.isStopping=!0,this.stopRequested.emit()}toggleRecording(){this.isRecording?this.voiceInputMode==="whisper"||this.voiceInputMode==="voice-message"?this.stopWhisperRecording():this.stopRecording():this.voiceInputMode==="whisper"||this.voiceInputMode==="voice-message"?this.startWhisperRecording():this.startRecording()}startWhisperRecording(){return N(this,null,function*(){if(!this.isRecording)try{let e=yield navigator.mediaDevices.getUserMedia({audio:!0});this.audioChunks=[],this.mediaRecorder=new MediaRecorder(e),this.mediaRecorder.ondataavailable=t=>{t.data.size>0&&this.audioChunks.push(t.data)},this.mediaRecorder.onstop=()=>{e.getTracks().forEach(t=>t.stop()),this.processWhisperAudio()},this.mediaRecorder.onerror=t=>{console.error("[WHISPER] MediaRecorder error:",t),e.getTracks().forEach(n=>n.stop()),this.isRecording=!1,this.voiceRecordingToggled.emit(!1)},this.mediaRecorder.start(),this.isRecording=!0,this.voiceRecordingToggled.emit(!0),console.log("[WHISPER] Started recording")}catch(e){console.error("[WHISPER] Failed to start recording:",e),this.isRecording=!1,this.voiceRecordingToggled.emit(!1)}})}stopWhisperRecording(){if(!(!this.mediaRecorder||!this.isRecording))try{this.mediaRecorder.stop(),this.isRecording=!1,this.voiceRecordingToggled.emit(!1),console.log("[WHISPER] Stopped recording")}catch(e){console.error("[WHISPER] Failed to stop recording:",e),this.isRecording=!1,this.voiceRecordingToggled.emit(!1)}}processWhisperAudio(){if(this.audioChunks.length===0)return;let e=new Blob(this.audioChunks,{type:this.mediaRecorder?.mimeType||"audio/webm"}),t=e.type.split(";")[0]||"audio/webm";this.audioChunks=[],this.isTranscribing=!0;let n=new FileReader;n.onloadend=()=>{let o=n.result.split(",")[1];if(!o){console.error("[WHISPER] Failed to read audio as base64"),this.isTranscribing=!1;return}let a=this.preferencesService.getVoiceLanguage().split("-")[0];if(this.voiceInputMode==="voice-message"){if(!this.threadStateService.getSelectedThreadId()){console.log("[WHISPER] No thread selected \u2014 emitting voiceMessageReady for thread creation"),this.isTranscribing=!1,this.voiceMessageReady.emit({base64:o,mimeType:t,language:a});return}this.audioApiService.sendVoiceMessage(o,t,a).subscribe({next:l=>{this.isTranscribing=!1,console.log("[WHISPER] Voice message sent, transcription:",l.transcription?.substring(0,50))},error:l=>{console.error("[WHISPER] Voice message error:",l),this.isTranscribing=!1,this.fallbackToTranscription(o,t,a)}})}else this.audioApiService.transcribeAudio(o,t,a).subscribe({next:l=>{this.isTranscribing=!1,l.text&&this.appendToTextarea(l.text+" ")},error:l=>{console.error("[WHISPER] Transcription error:",l),this.isTranscribing=!1}})},n.readAsDataURL(e)}fallbackToTranscription(e,t,n){this.audioApiService.transcribeAudio(e,t,n).subscribe({next:o=>{this.isTranscribing=!1,o.text&&this.appendToTextarea(o.text+" ")},error:o=>{console.error("[WHISPER] Fallback transcription also failed:",o),this.isTranscribing=!1}})}initializeVoiceInput(){let e=window.SpeechRecognition??window.webkitSpeechRecognition;if(console.log("[SPEECH] speechRecognition",e),!e){console.warn("[SPEECH] Speech Recognition API not available");return}this.recognition=new e,this.recognition.continuous=!0,this.recognition.interimResults=!0,this.recognition.maxAlternatives=1,this.recognition.lang=this.getSelectedLanguage();try{"grammars"in this.recognition&&(this.recognition.serviceURI=void 0)}catch(t){console.log("[SPEECH] Advanced speech recognition parameters not supported")}this.recognition.onresult=t=>{let n="",o=Math.max(t.resultIndex,this.lastProcessedResultIndex);for(let r=o;r<t.results.length;r++)t.results[r].isFinal&&(n+=t.results[r][0].transcript,this.lastProcessedResultIndex=r+1);if(n){let r=this.improveTranscriptPunctuation(n.trim());this.sessionHadTranscript=!0,console.log("[SPEECH] onresult ending, appending to textarea",this.isRecording),this.appendToTextarea(r)}},this.recognition.onend=()=>{console.log("[SPEECH] Recognition ended. Was recording:",this.isRecording),this.isRecording=!1,this.lastProcessedResultIndex=0,this.voiceRecordingToggled.emit(this.isRecording)},this.recognition.onerror=t=>{console.error("[SPEECH] Speech recognition error:",t.error),console.log("[SPEECH] Error details:",{error:t.error,message:t.message,timeStamp:t.timeStamp}),this.isRecording=!1,this.lastProcessedResultIndex=0,this.clearPendingLineBreaks(),this.voiceRecordingToggled.emit(this.isRecording)},this.recognition.onstart=()=>{console.log("[SPEECH] Recognition started successfully")},this.recognition.onspeechstart=()=>{console.log("[SPEECH] Speech detected")},this.recognition.onspeechend=()=>{console.log("[SPEECH] Speech ended")}}startRecording(){return N(this,null,function*(){if(!(!this.recognition||this.isRecording))try{this.isRecording=!0,this.sessionHadTranscript=!1,this.lastProcessedResultIndex=0,this.clearPendingLineBreaks(),this.voiceRecordingToggled.emit(this.isRecording),this.recognition.start(),console.log("[SPEECH] Started recording")}catch(e){console.error("[SPEECH] Failed to start recording:",e),this.isRecording=!1,this.voiceRecordingToggled.emit(this.isRecording)}})}stopRecording(){if(!this.recognition||!this.isRecording){console.log("[SPEECH] stopRecording not recording");return}try{console.log("[SPEECH] stopRecording recognition stop"),this.recognition.stop(),this.schedulePendingLineBreaks()}catch(e){console.error("[SPEECH] Failed to stop recording:",e)}}getSelectedLanguage(){return this.preferencesService.getVoiceLanguage()}updateRecognitionLanguage(){if(this.recognition){let e=this.getSelectedLanguage();this.recognition.lang=e,console.log("[SPEECH] Language changed to:",e)}}improveTranscriptPunctuation(e){let t=e;return/[.!?]$/.test(t.trim())||(t=t.trim()+"."),t=t.charAt(0).toUpperCase()+t.slice(1),t=t.replace(/\s+/g," "),t=t+" ",t}appendToTextarea(e){let t=this.message;if(this.message=t?`${t}${e}`:e,this.messageInput?.nativeElement){this.messageInput.nativeElement.focus();let n=this.message.length;this.messageInput.nativeElement.setSelectionRange(n,n)}setTimeout(()=>this.adjustTextareaHeight(),0)}schedulePendingLineBreaks(){this.clearPendingLineBreaks(),this.pendingLineBreaksTimeout=window.setTimeout(()=>{this.sessionHadTranscript&&(console.log("[SPEECH] Adding line breaks after transcript session"),this.appendToTextarea(`
2
2
 
3
3
  `),this.sessionHadTranscript=!1),this.pendingLineBreaksTimeout=null},500)}clearPendingLineBreaks(){this.pendingLineBreaksTimeout&&(clearTimeout(this.pendingLineBreaksTimeout),this.pendingLineBreaksTimeout=null)}adjustTextareaHeight(){let e=this.messageInput?.nativeElement;if(!e)return;let t=e.parentElement?.offsetHeight??e.offsetHeight+32;this.heightChanged.emit(t)}getSendButtonShortcut(){return this.useEnterToSend?"Enter":navigator.platform.toLowerCase().includes("mac")?"\u2318+Enter":"Ctrl+Enter"}getSendButtonTooltip(){return this.useEnterToSend?"Send message (Enter) - Shift+Enter for new line":`Send message (${navigator.platform.toLowerCase().includes("mac")?"Cmd+Enter":"Ctrl+Enter"}) - Enter for new line`}getPlaceholder(){return this.isSessionInitializing?"Initializing session...":this.isThinking?this.isStopping?"Stopping...":this.isStarting?"Processing request...":this.currentThinkingPhrase:this.isVoiceMessageMode&&this.isTranscribing?"Uploading...":this.isVoiceMessageMode&&this.isRecording?"Listening...":this.showWelcome?"How can I help you today?":"Type '@' for agents, '/' for commands, or just your message..."}startThinkingAnimation(){this.thinkingPhraseIndex=0,this.currentThinkingPhrase=this.thinkingPhrases[0]??"Thinking...",this.thinkingInterval=window.setInterval(()=>{this.thinkingPhraseIndex<this.thinkingPhrases.length-1&&(this.thinkingPhraseIndex++,this.currentThinkingPhrase=this.thinkingPhrases[this.thinkingPhraseIndex]??"Thinking...")},2e3)}stopThinkingAnimation(){this.thinkingInterval&&(clearInterval(this.thinkingInterval),this.thinkingInterval=null),this.thinkingPhraseIndex=0,this.currentThinkingPhrase="Thinking..."}subscribeToInviteEvents(){this.subscriptions.push(this.codayService.currentInviteEvent$.subscribe(e=>{e?this.handleInviteEvent(e.invite,e.defaultValue):this.currentInvite=""}))}handleInviteEvent(e,t){this.currentInvite=e,t&&(this.message=t,setTimeout(()=>this.adjustTextareaHeight(),0)),setTimeout(()=>{this.messageInput?.nativeElement&&this.messageInput.nativeElement.focus()},50)}subscribeToMessageRestore(){this.subscriptions.push(this.codayService.messageToRestore$.subscribe(e=>{e.trim()&&(console.log("[CHAT-TEXTAREA] Restoring message content:",e.substring(0,50)+"..."),this.restoreMessageContent(e))}))}restoreMessageContent(e){this.message=e,this.messageInput?.nativeElement&&(this.messageInput.nativeElement.focus(),setTimeout(()=>{let t=this.messageInput.nativeElement,n=this.message.length;t.setSelectionRange(n,n)},0)),setTimeout(()=>this.adjustTextareaHeight(),10)}focusTextarea(){let e=this.messageInput?.nativeElement;console.log("[CHAT-TEXTAREA] focusTextarea called",{hasElement:!!e,isDisabled:this.isDisabled,isThinking:this.isThinking,elementDisabled:e?.disabled,isSessionInitializing:this.isSessionInitializing}),e&&!e.disabled?(e.focus(),console.log("[CHAT-TEXTAREA] Textarea focused successfully")):console.log("[CHAT-TEXTAREA] Focus blocked - element disabled or not available")}checkForAutocomplete(){let e=this.message;if(e.startsWith("@")){let t=e.substring(1);if(t.includes(" ")){this.hideAutocomplete();return}this.showAgentAutocomplete(t);return}if(e.startsWith("/")){let t=e.substring(1);if(t.includes(" ")){this.hideAutocomplete();return}this.showPromptAutocomplete(t);return}this.hideAutocomplete()}showAgentAutocomplete(e){this.autocompleteTrigger="@";try{let t=this.projectStateService.getSelectedProjectIdOrThrow();this.agentApiService.getAgentsAutocomplete(t,e).subscribe({next:n=>{this.autocompleteItems=n,this.autocompleteVisible=n.length>0,this.selectedAutocompleteIndex=0},error:n=>{console.error("[AUTOCOMPLETE] Error loading agents:",n),this.hideAutocomplete()}})}catch(t){console.warn("[AUTOCOMPLETE] No project selected, cannot load agents"),this.hideAutocomplete()}}showPromptAutocomplete(e){this.autocompleteTrigger="/";try{let t=this.projectStateService.getSelectedProjectIdOrThrow();this.promptApiService.getPromptsAutocomplete(t,e).subscribe({next:n=>{this.autocompleteItems=n,this.autocompleteVisible=n.length>0,this.selectedAutocompleteIndex=0},error:n=>{console.error("[AUTOCOMPLETE] Error loading prompts:",n),this.hideAutocomplete()}})}catch(t){console.warn("[AUTOCOMPLETE] No project selected, cannot load prompts"),this.hideAutocomplete()}}hideAutocomplete(){this.autocompleteVisible=!1,this.autocompleteItems=[],this.selectedAutocompleteIndex=0}selectAutocompleteItem(){let e=this.autocompleteItems[this.selectedAutocompleteIndex];if(!e)return;let t=null;if(this.autocompleteTrigger==="/"){let n=e,o=n.parameterFormat;if(console.log(n),o===void 0)this.message=`/${e.name}`;else if(o==="")this.message=`/${e.name} `;else{this.message=`/${e.name} ${o}`;let r=this.message.indexOf('=""');r!==-1&&(t=r+2)}}else this.message=`@${e.name} `;this.hideAutocomplete(),setTimeout(()=>{if(this.messageInput?.nativeElement)if(this.messageInput.nativeElement.focus(),t!==null)this.messageInput.nativeElement.setSelectionRange(t,t);else{let n=this.message.length;this.messageInput.nativeElement.setSelectionRange(n,n)}},0)}selectAutocompleteItemByClick(e){this.selectedAutocompleteIndex=e,this.selectAutocompleteItem()}getAutocompleteQuery(){return this.message.substring(1).split(" ")[0]??""}getParameterFormat(e){return e.parameterFormat}hasParameterFormat(e){return this.autocompleteTrigger==="/"&&e.parameterFormat!==void 0}scrollSelectedItemIntoView(){setTimeout(()=>{let e=document.querySelector(".autocomplete-popup");if(!e)return;let t=e.querySelector(".autocomplete-item.selected");t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},0)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["app-chat-textarea"]],viewQuery:function(t,n){if(t&1&&ut(za,7)($a,5),t&2){let o;He(o=Ne())&&(n.messageInput=o.first),He(o=Ne())&&(n.fileInput=o.first)}},hostBindings:function(t,n){t&1&&w("paste",function(r){return n.onPaste(r)})("click",function(r){return n.onDocumentClick(r)},yo)},inputs:{isDisabled:"isDisabled",showWelcome:"showWelcome",isThinking:"isThinking",isStarting:"isStarting",isSessionInitializing:"isSessionInitializing"},outputs:{filesPasted:"filesPasted",messageSubmitted:"messageSubmitted",voiceMessageReady:"voiceMessageReady",voiceRecordingToggled:"voiceRecordingToggled",heightChanged:"heightChanged",stopRequested:"stopRequested",textareaFocused:"textareaFocused"},features:[ke],decls:8,vars:15,consts:[["messageInput",""],["fileInput",""],[1,"chat-input-container"],[1,"recording-indicator"],[1,"autocomplete-popup"],[1,"input-row","grouped-input"],[1,"message-input",3,"ngModelChange","keydown","input","focus","blur","ngModel","placeholder","disabled"],[1,"actions"],[1,"recording-dot"],[1,"transcribing-dot"],["role","option","tabindex","0",1,"autocomplete-item",3,"selected"],["role","option","tabindex","0",1,"autocomplete-item",3,"click","keydown.enter","keydown.space","mouseenter"],[1,"item-name"],[3,"innerHTML"],[1,"parameter-format"],[1,"item-description",3,"innerHTML"],["icon","stop","variant","danger","title","Stop generation",1,"action-btn"],["icon","send","variant","primary",1,"send-btn",3,"title","disabled","hidden","active"],["icon","stop","variant","danger","title","Stop generation",1,"action-btn",3,"action"],["icon","send","variant","primary",1,"send-btn",3,"action","title","disabled"],["icon","mic",1,"voice-btn",3,"action","variant","disabled","title"],["icon","attach_file","variant","default","title","Upload files (images or documents)",1,"upload-btn",3,"action","disabled"],["type","file","multiple","","accept","image/*,application/pdf,.pdf,.doc,.docx,.txt,.md,.json,.yaml,.yml,.csv,.xml,.html",2,"display","none",3,"change"]],template:function(t,n){if(t&1){let o=O();c(0,"div",2),x(1,Ua,3,0,"div",3),x(2,Ba,3,0,"div",3),x(3,qa,3,0,"div",4),c(4,"div",5)(5,"textarea",6,0),rn("ngModelChange",function(a){return T(o),on(n.message,a)||(n.message=a),S(a)}),w("keydown",function(a){return n.onKeyDown(a)})("input",function(){return n.onInput()})("focus",function(){return T(o),n.isFocused=!0,S(n.textareaFocused.emit())})("blur",function(){return n.isFocused=!1}),d(),x(7,Za,4,3,"div",7),d()()}t&2&&(p(),_(!n.isVoiceMessageMode&&n.isRecording?1:-1),p(),_(!n.isVoiceMessageMode&&n.isTranscribing?2:-1),p(),_(n.autocompleteVisible?3:-1),p(),he("focused",n.isFocused)("welcome-mode",n.showWelcome)("is-thinking",n.isThinking)("is-listening",n.isVoiceMessageMode&&(n.isRecording||n.isTranscribing)),p(),nn("ngModel",n.message),M("placeholder",n.getPlaceholder())("disabled",n.isDisabled||n.isVoiceMessageMode&&(n.isRecording||n.isTranscribing)),p(2),_(n.isSessionInitializing?-1:7))},dependencies:[fn,un,hn,gn,lr,Cn],styles:['@keyframes _ngcontent-%COMP%_gradientBorderShift{0%{background-position:0 0}50%{background-position:100% 0}to{background-position:0 0}}.chat-input-container[_ngcontent-%COMP%]{flex-shrink:0;width:100%;position:relative}.thinking-progress[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0;height:3px;z-index:1}.thinking-progress[_ngcontent-%COMP%] .mdc-linear-progress__bar-inner{border-top-width:3px}.input-row.grouped-input[_ngcontent-%COMP%]{display:flex;align-items:stretch;background:var(--glass-bg);border-radius:16px;padding:0 .15rem 0 1.25rem;position:relative;transition:border-color .2s,box-shadow .2s,background .3s}.input-row[_ngcontent-%COMP%]{position:relative;background:var(--glass-bg, #1e1e1e)!important;background-clip:padding-box}.input-row[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:-2px;border-radius:inherit;background-size:200% 100%;background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 100%);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;padding:1px;pointer-events:none;z-index:-1;animation:_ngcontent-%COMP%_gradientBorderShift 3s ease-in-out infinite}.input-row.is-listening[_ngcontent-%COMP%]:before{inset:0;-webkit-mask:none;mask:none;padding:0;opacity:.15;z-index:0;background:linear-gradient(90deg,var(--color-error, #ef4444) 0%,var(--color-accent, #8b5cf6) 50%,var(--color-error, #ef4444) 100%);background-size:200% 100%;animation:_ngcontent-%COMP%_gradientBorderShift 2s ease-in-out infinite}.input-row.is-listening[_ngcontent-%COMP%] .message-input[_ngcontent-%COMP%], .input-row.is-listening[_ngcontent-%COMP%] .action-btn[_ngcontent-%COMP%]{position:relative;z-index:1}.input-row.is-thinking[_ngcontent-%COMP%]:before{inset:0;-webkit-mask:none;mask:none;padding:0;opacity:.15;z-index:0;background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 100%);background-size:200% 100%;animation:_ngcontent-%COMP%_gradientBorderShift 3s ease-in-out infinite}.input-row.is-thinking[_ngcontent-%COMP%] .message-input[_ngcontent-%COMP%], .input-row.is-thinking[_ngcontent-%COMP%] .action-btn[_ngcontent-%COMP%]{position:relative;z-index:1}.input-row.grouped-input.focused[_ngcontent-%COMP%]:not(.is-thinking):before{background:var(--color-primary);animation:none}.input-row.grouped-input.focused[_ngcontent-%COMP%]:not(.is-thinking){box-shadow:0 0 0 4px #007aff1a}.message-input[_ngcontent-%COMP%]{flex:1;border:none;outline:none;background:transparent!important;box-shadow:none;font-size:1rem;padding:1rem 0;color:var(--color-text);resize:none;field-sizing:content;min-height:36px;max-height:70vh;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,SF Pro Display,system-ui,sans-serif;line-height:1.5}.message-input[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px}.message-input[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.message-input[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--color-border);border-radius:4px}.message-input[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--color-text-secondary)}.message-input[_ngcontent-%COMP%]:focus{outline:none;border:none;box-shadow:none}.message-input[_ngcontent-%COMP%]:disabled{background-color:var(--color-bg-secondary);color:var(--color-text-secondary);cursor:not-allowed;opacity:.6}.message-input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary);transition:opacity .3s ease-in-out}.message-input[_ngcontent-%COMP%]:disabled::placeholder{animation:_ngcontent-%COMP%_thinkingPulsate 2s ease-in-out infinite}@keyframes _ngcontent-%COMP%_thinkingPulsate{0%,to{opacity:.6}50%{opacity:1}}.voice-btn[_ngcontent-%COMP%], .send-btn[_ngcontent-%COMP%], .action-btn[_ngcontent-%COMP%], .upload-btn[_ngcontent-%COMP%]{margin:0}.actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:wrap;justify-content:center}.send-btn[_ngcontent-%COMP%]{transition:opacity .4s,margin-left .4s}.send-btn.active[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{opacity:1}.send-btn[_ngcontent-%COMP%]:not(.active) button[_ngcontent-%COMP%]{opacity:0;margin-left:calc(-.5rem - 36px)}.send-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){color:#fff;background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-primary, #3b82f6) 20%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 80%,var(--color-primary, #3b82f6) 100%);background-size:300% auto;animation:sendButtonGradientShift 6s ease-in-out infinite;box-shadow:0 4px 14px #007aff30;transform:scale(1.2)}.send-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active:not(:disabled){transform:scale(1.3);box-shadow:0 4px 24px #007aff30}.recording-indicator[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-top:.2rem;margin-bottom:.2rem;color:var(--color-error, #ff5555);font-size:.9rem;position:absolute;top:-1.5rem}@keyframes _ngcontent-%COMP%_pulse{0%,to{opacity:1}50%{opacity:.5}}.autocomplete-popup[_ngcontent-%COMP%]{position:absolute;bottom:100%;left:0;right:0;margin-bottom:.5rem;background:var(--glass-bg);-webkit-backdrop-filter:var(--glass-backdrop-blur);backdrop-filter:var(--glass-backdrop-blur);border-radius:12px;box-shadow:0 8px 32px #00000026;border:1px solid var(--color-border);max-height:400px;max-width:500px;overflow-y:auto;z-index:100}.autocomplete-popup[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px}.autocomplete-popup[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.autocomplete-popup[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--color-border);border-radius:4px}.autocomplete-popup[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--color-text-secondary)}.autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item[_ngcontent-%COMP%]{padding:.75rem 1rem;cursor:pointer;transition:background .2s;border-left:3px solid transparent}.autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item[_ngcontent-%COMP%]:hover, .autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item.selected[_ngcontent-%COMP%]{background:var(--color-bg-hover)}.autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item.selected[_ngcontent-%COMP%]{border-left-color:var(--color-primary)}.autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item[_ngcontent-%COMP%] .item-name[_ngcontent-%COMP%]{font-weight:600;color:var(--color-text);margin-bottom:.25rem;font-family:SF Mono,Monaco,Menlo,Cascadia Code,Consolas,monospace;font-size:.95rem}.autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item[_ngcontent-%COMP%] .item-name[_ngcontent-%COMP%] strong{font-weight:700;color:var(--color-primary);background:var(--color-primary-light, rgba(99, 102, 241, .1));padding:0 2px;border-radius:2px}.autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item[_ngcontent-%COMP%] .item-name[_ngcontent-%COMP%] .parameter-format[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-weight:400;opacity:.7}.autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item[_ngcontent-%COMP%] .item-description[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);line-height:1.3}.autocomplete-popup[_ngcontent-%COMP%] .autocomplete-item[_ngcontent-%COMP%] .item-description[_ngcontent-%COMP%] strong{font-weight:700;color:var(--color-primary);background:var(--color-primary-light, rgba(99, 102, 241, .1))}@media print{.thinking-progress[_ngcontent-%COMP%], .action-btn[_ngcontent-%COMP%], .voice-btn[_ngcontent-%COMP%], .send-btn[_ngcontent-%COMP%], .upload-btn[_ngcontent-%COMP%], .recording-indicator[_ngcontent-%COMP%], .autocomplete-popup[_ngcontent-%COMP%]{display:none!important}}']})};var ft=class i{unreadCountSubject=new Jt(0);unreadCount$=this.unreadCountSubject.asObservable();constructor(){console.log("[UNREAD] Service initialized")}addUnread(){let t=this.unreadCountSubject.value+1;this.unreadCountSubject.next(t),console.log("[UNREAD] Added unread message, total:",t)}markAllAsRead(){this.unreadCountSubject.value>0&&(this.unreadCountSubject.next(0),console.log("[UNREAD] Marked all messages as read"))}getCurrentCount(){return this.unreadCountSubject.value}reset(){this.unreadCountSubject.next(0),console.log("[UNREAD] Counter reset")}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac,providedIn:"root"})};var wn=class i{ATTENTION_EMOJI="\u{1F534}";isSystemActive=!1;systemActiveTimer=null;SYSTEM_ACTIVE_TIMEOUT=4e3;unreadService=g(ft);project=g(Oe);constructor(){this.initializeTitleUpdates()}initializeTitleUpdates(){fo([this.project.selectedProject$,this.unreadService.unreadCount$]).subscribe(([e,t])=>{this.updateTitle(e?.name??"...",t)})}updateTitle(e,t){let n;this.isSystemActive?n=`\u23F3${t>0?` (${t}) `:" "}${e}`:t>0?n=`${this.ATTENTION_EMOJI} (${t}) ${e}`:n=e,document.title=n,console.log("[TAB-TITLE] Updated to:",n)}setSystemActive(){console.log("[TAB-TITLE] System active - showing hourglass"),this.isSystemActive=!0,this.systemActiveTimer&&clearTimeout(this.systemActiveTimer),this.systemActiveTimer=setTimeout(()=>{console.log("[TAB-TITLE] System active timeout - hiding hourglass"),this.isSystemActive=!1,this.forceUpdateTitle()},this.SYSTEM_ACTIVE_TIMEOUT),this.forceUpdateTitle()}setSystemInactive(){console.log("[TAB-TITLE] System inactive - hiding hourglass"),this.isSystemActive=!1,this.systemActiveTimer&&(clearTimeout(this.systemActiveTimer),this.systemActiveTimer=null),this.forceUpdateTitle()}forceUpdateTitle(){let e=this.project.getSelectedProjectId()??"...",t=this.unreadService.getCurrentCount();this.updateTitle(e,t)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac,providedIn:"root"})};var Tn=class i{pendingFirstMessage=null;pendingVoiceMessage=null;setPendingFirstMessage(e){console.log("[FIRST-MESSAGE-STATE] Storing pending first message:",e.substring(0,50)+"..."),this.pendingFirstMessage=e}consumePendingFirstMessage(){let e=this.pendingFirstMessage;return e?(console.log("[FIRST-MESSAGE-STATE] Consuming pending first message:",e.substring(0,50)+"..."),this.pendingFirstMessage=null):console.log("[FIRST-MESSAGE-STATE] No pending first message to consume"),e}setPendingVoiceMessage(e){console.log("[FIRST-MESSAGE-STATE] Storing pending voice message"),this.pendingVoiceMessage=e}consumePendingVoiceMessage(){let e=this.pendingVoiceMessage;return e&&(console.log("[FIRST-MESSAGE-STATE] Consuming pending voice message"),this.pendingVoiceMessage=null),e}hasPendingFirstMessage(){return this.pendingFirstMessage!==null||this.pendingVoiceMessage!==null}clear(){this.pendingFirstMessage&&(console.log("[FIRST-MESSAGE-STATE] Clearing pending first message"),this.pendingFirstMessage=null),this.pendingVoiceMessage=null}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac,providedIn:"root"})};var Ka=(i,e)=>e.label;function Ja(i,e){if(i&1){let t=O();c(0,"button",2),w("click",function(o){let r=T(t).$implicit,a=m();return S(a.executeAction(r,o))}),c(1,"mat-icon"),f(2),d()()}if(i&2){let t=e.$implicit;Be("title",t.tooltip||t.label),p(),Be("aria-label",t.label),p(),F(t.icon)}}var Sn=class i{actions=[];executeAction(e,t){t.stopPropagation(),e.action()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=R({type:i,selectors:[["app-message-context-menu"]],inputs:{actions:"actions"},decls:3,vars:0,consts:[[1,"context-menu-wrapper"],["mat-icon-button",""],["mat-icon-button","",3,"click"]],template:function(t,n){t&1&&(c(0,"div",0),de(1,Ja,3,3,"button",1,Ka),d()),t&2&&(p(),pe(n.actions))},dependencies:[fe,je,J],styles:[".context-menu-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center}.context-menu-wrapper[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{transform:scale(.75)}"]})};function vi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var nt=vi();function br(i){nt=i}var Ft={exec:()=>null};function A(i,e=""){let t=typeof i=="string"?i:i.source,n={replace:(o,r)=>{let a=typeof r=="string"?r:r.source;return a=a.replace(oe.caret,"$1"),t=t.replace(o,a),n},getRegex:()=>new RegExp(t,e)};return n}var oe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:i=>new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}#`),htmlBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}<(?:[a-z].*>|!--)`,"i")},es=/^(?:[ \t]*(?:\n|$))+/,ts=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ns=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Lt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,is=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ci=/(?:[*+-]|\d{1,9}[.)])/,xr=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_r=A(xr).replace(/bull/g,Ci).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),os=A(xr).replace(/bull/g,Ci).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),yi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rs=/^[^\n]+/,wi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,as=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",wi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ss=A(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ci).getRegex(),On="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ti=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ls=A("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ti).replace("tag",On).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),vr=A(yi).replace("hr",Lt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",On).getRegex(),cs=A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",vr).getRegex(),Si={blockquote:cs,code:ts,def:as,fences:ns,heading:is,hr:Lt,html:ls,lheading:_r,list:ss,newline:es,paragraph:vr,table:Ft,text:rs},pr=A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Lt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",On).getRegex(),ds=Te(j({},Si),{lheading:os,table:pr,paragraph:A(yi).replace("hr",Lt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",pr).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",On).getRegex()}),ps=Te(j({},Si),{html:A(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ti).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ft,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:A(yi).replace("hr",Lt).replace("heading",` *#{1,6} *[^
4
4
  ]`).replace("lheading",_r).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),ms=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,us=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Cr=/^( {2,}|\\)\n(?!\s*$)/,hs=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Pn=/[\p{P}\p{S}]/u,ki=/[\s\p{P}\p{S}]/u,yr=/[^\s\p{P}\p{S}]/u,gs=A(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ki).getRegex(),wr=/(?!~)[\p{P}\p{S}]/u,fs=/(?!~)[\s\p{P}\p{S}]/u,bs=/(?:[^\s\p{P}\p{S}]|~)/u,xs=/\[(?:[^\[\]`]|`[^`]*?`)*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,Tr=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,_s=A(Tr,"u").replace(/punct/g,Pn).getRegex(),vs=A(Tr,"u").replace(/punct/g,wr).getRegex(),Sr="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Cs=A(Sr,"gu").replace(/notPunctSpace/g,yr).replace(/punctSpace/g,ki).replace(/punct/g,Pn).getRegex(),ys=A(Sr,"gu").replace(/notPunctSpace/g,bs).replace(/punctSpace/g,fs).replace(/punct/g,wr).getRegex(),ws=A("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,yr).replace(/punctSpace/g,ki).replace(/punct/g,Pn).getRegex(),Ts=A(/\\(punct)/,"gu").replace(/punct/g,Pn).getRegex(),Ss=A(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ks=A(Ti).replace("(?:-->|$)","-->").getRegex(),Ms=A("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ks).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Mn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Es=A(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Mn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),kr=A(/^!?\[(label)\]\[(ref)\]/).replace("label",Mn).replace("ref",wi).getRegex(),Mr=A(/^!?\[(ref)\](?:\[\])?/).replace("ref",wi).getRegex(),Os=A("reflink|nolink(?!\\()","g").replace("reflink",kr).replace("nolink",Mr).getRegex(),mr=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Mi={_backpedal:Ft,anyPunctuation:Ts,autolink:Ss,blockSkip:xs,br:Cr,code:us,del:Ft,emStrongLDelim:_s,emStrongRDelimAst:Cs,emStrongRDelimUnd:ws,escape:ms,link:Es,nolink:Mr,punctuation:gs,reflink:kr,reflinkSearch:Os,tag:Ms,text:hs,url:Ft},Ps=Te(j({},Mi),{link:A(/^!?\[(label)\]\((.*?)\)/).replace("label",Mn).getRegex(),reflink:A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Mn).getRegex()}),bi=Te(j({},Mi),{emStrongRDelimAst:ys,emStrongLDelim:vs,url:A(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",mr).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:A(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",mr).getRegex()}),Is=Te(j({},bi),{br:A(Cr).replace("{2,}","*").getRegex(),text:A(bi.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),kn={normal:Si,gfm:ds,pedantic:ps},At={normal:Mi,gfm:bi,breaks:Is,pedantic:Ps},As={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ur=i=>As[i];function Ie(i,e){if(e){if(oe.escapeTest.test(i))return i.replace(oe.escapeReplace,ur)}else if(oe.escapeTestNoEncode.test(i))return i.replace(oe.escapeReplaceNoEncode,ur);return i}function hr(i){try{i=encodeURI(i).replace(oe.percentDecode,"%")}catch(e){return null}return i}function gr(i,e){let t=i.replace(oe.findPipe,(r,a,l)=>{let u=!1,b=a;for(;--b>=0&&l[b]==="\\";)u=!u;return u?"|":" |"}),n=t.split(oe.splitPipe),o=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(oe.slashPipe,"|");return n}function Dt(i,e,t){let n=i.length;if(n===0)return"";let o=0;for(;o<n;){let r=i.charAt(n-o-1);if(r===e&&!t)o++;else if(r!==e&&t)o++;else break}return i.slice(0,n-o)}function Ds(i,e){if(i.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<i.length;n++)if(i[n]==="\\")n++;else if(i[n]===e[0])t++;else if(i[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}function fr(i,e,t,n,o){let r=e.href,a=e.title||null,l=i[1].replace(o.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:i[0].charAt(0)==="!"?"image":"link",raw:t,href:r,title:a,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,u}function Rs(i,e,t){let n=i.match(t.other.indentCodeCompensation);if(n===null)return e;let o=n[1];return e.split(`
@@ -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-RNXBUYHW.js";var Mt;try{Mt=typeof Intl<"u"&&Intl.v8BreakIterator}catch(e){Mt=!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||Mt)&&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})();function it(e){return Array.isArray(e)?e:[e]}var xe=new Set,S,rt=(()=>{class e{_platform=r(p);_nonce=r(le,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):ca}matchMedia(t){return(this._platform.WEBKIT||this._platform.BLINK)&&sa(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 sa(e,o){if(!xe.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),xe.add(e))}catch(t){console.error(t)}}function ca(e){return{matches:e==="all"||e==="",media:e,addListener:()=>{},removeListener:()=>{}}}var Dt=(()=>{class e{_mediaMatcher=r(rt);_zone=r(b);_queries=new Map;_destroySubject=new _;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return Ee(it(t)).some(n=>this._registerQuery(n).mql.matches)}observe(t){let n=Ee(it(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 Ee(e){return e.map(o=>o.split(",")).reduce((o,t)=>o.concat(t)).map(o=>o.trim())}var so={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)"};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 kt;function Ie(){if(kt==null){let e=typeof document<"u"?document.head:null;kt=!!(e&&(e.createShadowRoot||e.attachShadow))}return kt}function Ct(e){if(Ie()){let o=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&o instanceof ShadowRoot)return o}return null}function da(){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 $;function we(){if($==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>$=!0}))}finally{$=$||!1}return $}function B(e){return we()?e:!!e.capture}function ma(e,o=0){return Ae(e)?Number(e):arguments.length===2?o:0}function Ae(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function R(e){return e instanceof D?e.nativeElement:e}var Te=new m("cdk-input-modality-detector-options"),Me={ignoreKeys:[18,17,224,91,16]},De=650,Ot={passive:!0,capture:!0},ke=(()=>{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<De||(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(Te,{optional:!0});if(this._options=u(u({},Me),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,Ot),i.listen(a,"mousedown",this._onMousedown,Ot),i.listen(a,"touchstart",this._onTouchstart,Ot)])}}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||{}),Ce=new m("cdk-focus-monitor-default-options"),st=B({passive:!0,capture:!0}),Nt=(()=>{class e{_ngZone=r(b);_platform=r(p);_inputModalityDetector=r(ke);_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(Ce,{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=Ct(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?De: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,st),a.addEventListener("blur",this._rootNodeFocusAndBlurListener,st)}),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,st),a.removeEventListener("blur",this._rootNodeFocusAndBlurListener,st),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 ct=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=ct.get(a);n||(n={loaders:new Set,refs:[]},ct.set(a,n),a.onDestroy(()=>{ct.get(a)?.refs.forEach(i=>i.destroy()),ct.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 mt=(()=>{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,Lc 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,V as re,Vc as ye,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,u as te,ua as ce,uc as N,vb as At,vc as ve,wb as Tt,x as ee,xb as C,xc as ge,ya as D,za as Et}from"./chunk-QPN22TF2.js";var Mt;try{Mt=typeof Intl<"u"&&Intl.v8BreakIterator}catch(e){Mt=!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||Mt)&&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})();function it(e){return Array.isArray(e)?e:[e]}var xe=new Set,S,rt=(()=>{class e{_platform=r(p);_nonce=r(le,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):ca}matchMedia(t){return(this._platform.WEBKIT||this._platform.BLINK)&&sa(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 sa(e,o){if(!xe.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),xe.add(e))}catch(t){console.error(t)}}function ca(e){return{matches:e==="all"||e==="",media:e,addListener:()=>{},removeListener:()=>{}}}var Dt=(()=>{class e{_mediaMatcher=r(rt);_zone=r(b);_queries=new Map;_destroySubject=new _;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return Ee(it(t)).some(n=>this._registerQuery(n).mql.matches)}observe(t){let n=Ee(it(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 Ee(e){return e.map(o=>o.split(",")).reduce((o,t)=>o.concat(t)).map(o=>o.trim())}var so={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)"};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 kt;function Ie(){if(kt==null){let e=typeof document<"u"?document.head:null;kt=!!(e&&(e.createShadowRoot||e.attachShadow))}return kt}function Ct(e){if(Ie()){let o=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&o instanceof ShadowRoot)return o}return null}function da(){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 $;function we(){if($==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>$=!0}))}finally{$=$||!1}return $}function B(e){return we()?e:!!e.capture}function ma(e,o=0){return Ae(e)?Number(e):arguments.length===2?o:0}function Ae(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function R(e){return e instanceof D?e.nativeElement:e}var Te=new m("cdk-input-modality-detector-options"),Me={ignoreKeys:[18,17,224,91,16]},De=650,Ot={passive:!0,capture:!0},ke=(()=>{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<De||(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(Te,{optional:!0});if(this._options=u(u({},Me),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,Ot),i.listen(a,"mousedown",this._onMousedown,Ot),i.listen(a,"touchstart",this._onTouchstart,Ot)])}}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||{}),Ce=new m("cdk-focus-monitor-default-options"),st=B({passive:!0,capture:!0}),Nt=(()=>{class e{_ngZone=r(b);_platform=r(p);_inputModalityDetector=r(ke);_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(Ce,{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=Ct(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?De: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,st),a.addEventListener("blur",this._rootNodeFocusAndBlurListener,st)}),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,st),a.removeEventListener("blur",this._rootNodeFocusAndBlurListener,st),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 ct=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=ct.get(a);n||(n={loaders:new Set,refs:[]},ct.set(a,n),a.onDestroy(()=>{ct.get(a)?.refs.forEach(i=>i.destroy()),ct.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 mt=(()=>{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})(),dt;function la(){if(dt===void 0&&(dt=null,typeof window<"u")){let e=window;e.trustedTypes!==void 0&&(dt=e.trustedTypes.createPolicy("angular#components",{createHTML:o=>o}))}return dt}function ua(e){return la()?.createHTML(e)||e}function Oe(e,o,t){let a=t.sanitize(ue.HTML,o);e.innerHTML=ua(a||"")}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(mt)}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:Oe(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(Dt).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,Vn=(()=>{class e{_platform=r(p);_document=r(h);_messageRegistry=new Map;_messagesContainer=null;_id=`${jt++}`;constructor(){r(M).load(mt),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 qn(){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 Jn(){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 ei(){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 oi(){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 Oa=new m("MATERIAL_ANIMATIONS"),Ge=null;function Na(){return r(Oa,{optional:!0})?.animationsDisabled||r(me,{optional:!0})==="NoopAnimations"?"di-disabled":(Ge??=r(rt).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(Nt);_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}from"./chunk-IDDQUVUO.js";import"./chunk-GGNCDOF3.js";import"./chunk-UARV2YUR.js";import"./chunk-WER6464F.js";import"./chunk-7YDOHTEK.js";import"./chunk-UCFKZZMU.js";import"./chunk-2GHS5VUE.js";import"./chunk-DYANOPHQ.js";import"./chunk-N5UH5PRX.js";import"./chunk-4YLSQZJK.js";import"./chunk-QPN22TF2.js";export{a as CaseChatComponent};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-EFRFG6GO.js";import"./chunk-GGNCDOF3.js";import"./chunk-UARV2YUR.js";import"./chunk-WER6464F.js";import"./chunk-7YDOHTEK.js";import"./chunk-UCFKZZMU.js";import"./chunk-2GHS5VUE.js";import"./chunk-DYANOPHQ.js";import"./chunk-N5UH5PRX.js";import"./chunk-4YLSQZJK.js";import"./chunk-QPN22TF2.js";export{a as CaseHomeComponent};
@@ -1 +1 @@
1
- import{a as L}from"./chunk-JVBN6LZN.js";import{d as T}from"./chunk-LTFITYTW.js";import{p as q,u as E,v as D}from"./chunk-BOMZXZNH.js";import{a as U}from"./chunk-LCBWJP6Z.js";import{Bb as w,Db as a,Fb as m,Ka as d,Pb as R,Tb as C,Ub as h,Wa as c,ab as I,ca as p,ga as y,ha as b,hc as M,kc as S,lb as _,ma as x,mb as f,oa as v,rb as u,sb as r,tb as o}from"./chunk-RNXBUYHW.js";function O(i,e){if(i&1&&(r(0,"span",3),C(1),o()),i&2){let t=m();d(),h(t.subtitle)}}var g=class i{user;editRequested=new v;deleteRequested=new v;menuItems=[{key:"edit",label:"Edit user",icon:"edit"},{key:"delete",label:"Delete user",icon:"delete",variant:"danger"}];get displayName(){let{firstname:e,lastname:t,email:n}=this.user;return[e,t].filter(Boolean).join(" ")||n||"\u2014"}get subtitle(){return this.user.email??this.user.externalId??""}onMenuAction(e){switch(e){case"edit":this.editRequested.emit(this.user);break;case"delete":confirm(`Delete user "${this.displayName}"?`)&&this.deleteRequested.emit(this.user);break}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=c({type:i,selectors:[["agentos-user-item"]],inputs:{user:"user"},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested"},decls:7,vars:3,consts:[["role","listitem",1,"user-item"],[1,"user-item__body"],[1,"user-item__name"],[1,"user-item__subtitle"],[1,"user-item__actions"],[3,"itemSelected","items"]],template:function(t,n){t&1&&(r(0,"div",0)(1,"div",1)(2,"span",2),C(3),o(),_(4,O,2,1,"span",3),o(),r(5,"div",4)(6,"ds-kebab-menu",5),a("itemSelected",function(l){return n.onMenuAction(l)}),o()()()),t&2&&(d(3),h(n.displayName),d(),f(n.subtitle?4:-1),d(2),u("items",n.menuItems))},dependencies:[D],styles:[".user-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%;padding:1rem 1.25rem;background:var(--color-bg-secondary, rgba(255, 255, 255, .7));border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:12px;box-sizing:border-box;overflow:hidden;position:relative}.user-item__body[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:.25rem}.user-item__name[_ngcontent-%COMP%]{font-size:.9375rem;font-weight:600;color:var(--color-text, #1d1d1f);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-item__subtitle[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-item__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;flex-shrink:0}"],changeDetection:0})};function B(i,e){if(i&1){let t=w();r(0,"agentos-user-item",4),a("editRequested",function(s){y(t);let l=m(2);return b(l.navigateToEdit(s))})("deleteRequested",function(s){y(t);let l=m(2);return b(l.deleteUser(s))}),o()}i&2&&u("user",e)}function P(i,e){if(i&1&&_(0,B,1,1,"agentos-user-item",3),i&2){let t,n=e.$implicit,s=m();f((t=s.resolveUser(n.id))?0:-1,t)}}var k=class i{router=p(T);destroyRef=p(x);userAdminState=p(L);isLoading=this.userAdminState.isLoading;userItems=S(()=>this.userAdminState.users().map(e=>({id:e.id??"",name:[e.firstname,e.lastname].filter(Boolean).join(" ")||e.email||"\u2014",description:e.email})));get usersById(){return new Map(this.userAdminState.users().map(e=>[e.id??"",e]))}ngOnInit(){this.userAdminState.loadAll().pipe(U(this.destroyRef)).subscribe()}goBack(){this.router.navigate(["/agentos"])}navigateToCreate(){this.router.navigate(["/agentos/admin/users/new"])}navigateToEdit(e){this.router.navigate(["/agentos/admin/users",e.id??"","edit"])}deleteUser(e){this.userAdminState.deleteUser(e.id??"").pipe(U(this.destroyRef)).subscribe()}resolveUser(e){return this.usersById.get(e)??null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=c({type:i,selectors:[["agentos-user-list"]],decls:4,vars:3,consts:[["userItemTpl",""],["title","Users","emptyMessage","No users found.","cardMinWidth","320px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"user"],[3,"editRequested","deleteRequested","user"]],template:function(t,n){if(t&1&&(r(0,"ds-entity-list",1),a("createRequested",function(){return n.navigateToCreate()}),r(1,"ds-icon-button",2),a("action",function(){return n.goBack()}),o()(),I(2,P,1,1,"ng-template",null,0,M)),t&2){let s=R(3);u("items",n.userItems())("showCreate",!0)("itemTemplate",s)}},dependencies:[E,g,q],encapsulation:2,changeDetection:0})};export{g as a,k as b};
1
+ import{a as L}from"./chunk-IJHAKS36.js";import{d as T}from"./chunk-UARV2YUR.js";import{p as q,u as E,v as D}from"./chunk-WER6464F.js";import{a as U}from"./chunk-UCFKZZMU.js";import{Bb as w,Db as a,Fb as m,Ka as d,Pb as R,Tb as C,Ub as h,Wa as c,ab as I,ca as p,ga as y,ha as b,hc as M,kc as S,lb as _,ma as x,mb as f,oa as v,rb as u,sb as r,tb as o}from"./chunk-QPN22TF2.js";function O(i,e){if(i&1&&(r(0,"span",3),C(1),o()),i&2){let t=m();d(),h(t.subtitle)}}var g=class i{user;editRequested=new v;deleteRequested=new v;menuItems=[{key:"edit",label:"Edit user",icon:"edit"},{key:"delete",label:"Delete user",icon:"delete",variant:"danger"}];get displayName(){let{firstname:e,lastname:t,email:n}=this.user;return[e,t].filter(Boolean).join(" ")||n||"\u2014"}get subtitle(){return this.user.email??this.user.externalId??""}onMenuAction(e){switch(e){case"edit":this.editRequested.emit(this.user);break;case"delete":confirm(`Delete user "${this.displayName}"?`)&&this.deleteRequested.emit(this.user);break}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=c({type:i,selectors:[["agentos-user-item"]],inputs:{user:"user"},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested"},decls:7,vars:3,consts:[["role","listitem",1,"user-item"],[1,"user-item__body"],[1,"user-item__name"],[1,"user-item__subtitle"],[1,"user-item__actions"],[3,"itemSelected","items"]],template:function(t,n){t&1&&(r(0,"div",0)(1,"div",1)(2,"span",2),C(3),o(),_(4,O,2,1,"span",3),o(),r(5,"div",4)(6,"ds-kebab-menu",5),a("itemSelected",function(l){return n.onMenuAction(l)}),o()()()),t&2&&(d(3),h(n.displayName),d(),f(n.subtitle?4:-1),d(2),u("items",n.menuItems))},dependencies:[D],styles:[".user-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%;padding:1rem 1.25rem;background:var(--color-bg-secondary, rgba(255, 255, 255, .7));border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:12px;box-sizing:border-box;overflow:hidden;position:relative}.user-item__body[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:.25rem}.user-item__name[_ngcontent-%COMP%]{font-size:.9375rem;font-weight:600;color:var(--color-text, #1d1d1f);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-item__subtitle[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-item__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;flex-shrink:0}"],changeDetection:0})};function B(i,e){if(i&1){let t=w();r(0,"agentos-user-item",4),a("editRequested",function(s){y(t);let l=m(2);return b(l.navigateToEdit(s))})("deleteRequested",function(s){y(t);let l=m(2);return b(l.deleteUser(s))}),o()}i&2&&u("user",e)}function P(i,e){if(i&1&&_(0,B,1,1,"agentos-user-item",3),i&2){let t,n=e.$implicit,s=m();f((t=s.resolveUser(n.id))?0:-1,t)}}var k=class i{router=p(T);destroyRef=p(x);userAdminState=p(L);isLoading=this.userAdminState.isLoading;userItems=S(()=>this.userAdminState.users().map(e=>({id:e.id??"",name:[e.firstname,e.lastname].filter(Boolean).join(" ")||e.email||"\u2014",description:e.email})));get usersById(){return new Map(this.userAdminState.users().map(e=>[e.id??"",e]))}ngOnInit(){this.userAdminState.loadAll().pipe(U(this.destroyRef)).subscribe()}goBack(){this.router.navigate(["/agentos"])}navigateToCreate(){this.router.navigate(["/agentos/admin/users/new"])}navigateToEdit(e){this.router.navigate(["/agentos/admin/users",e.id??"","edit"])}deleteUser(e){this.userAdminState.deleteUser(e.id??"").pipe(U(this.destroyRef)).subscribe()}resolveUser(e){return this.usersById.get(e)??null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=c({type:i,selectors:[["agentos-user-list"]],decls:4,vars:3,consts:[["userItemTpl",""],["title","Users","emptyMessage","No users found.","cardMinWidth","320px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"user"],[3,"editRequested","deleteRequested","user"]],template:function(t,n){if(t&1&&(r(0,"ds-entity-list",1),a("createRequested",function(){return n.navigateToCreate()}),r(1,"ds-icon-button",2),a("action",function(){return n.goBack()}),o()(),I(2,P,1,1,"ng-template",null,0,M)),t&2){let s=R(3);u("items",n.userItems())("showCreate",!0)("itemTemplate",s)}},dependencies:[E,g,q],encapsulation:2,changeDetection:0})};export{g as a,k as b};