@whoz-oss/coday-client 3.15.1 → 3.17.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 (80) hide show
  1. package/browser/{chunk-CUmS2-ak.js → chunk-0njD_aMa.js} +1 -1
  2. package/browser/{chunk-CNIfOUla.js → chunk-6WIaUDav.js} +1 -1
  3. package/browser/{chunk-9CSRlx74.js → chunk-B1OTuTxt.js} +1 -1
  4. package/browser/{chunk-CyUmCedx.js → chunk-B3-4EW3s.js} +1 -1
  5. package/browser/{chunk-K-fhwl_z.js → chunk-B626-rya.js} +1 -1
  6. package/browser/{chunk-Bnic_hdt.js → chunk-B6BZBDSv.js} +5 -5
  7. package/browser/{chunk-Cf3l2UgA.js → chunk-B7kKWG4P.js} +1 -1
  8. package/browser/chunk-B7yga-a4.js +1 -0
  9. package/browser/{chunk-DYE131qf.js → chunk-BAWubWk8.js} +1 -1
  10. package/browser/chunk-BDaTUrH4.js +1 -0
  11. package/browser/{chunk-BKlwFrFB.js → chunk-BHvLB-pV.js} +1 -1
  12. package/browser/{chunk-Dg6QAZUw.js → chunk-BJ5G7Y-a.js} +2 -2
  13. package/browser/{chunk-B5_o_qhk.js → chunk-BPfJALqU.js} +1 -1
  14. package/browser/{chunk-DzicJow4.js → chunk-BTX631I3.js} +3 -3
  15. package/browser/{chunk-Jv7RGmnK.js → chunk-BVAD9f9s.js} +1 -1
  16. package/browser/{chunk-fP29MqaN.js → chunk-BXkvjekT.js} +1 -1
  17. package/browser/chunk-BYyTBqh4.js +37 -0
  18. package/browser/chunk-B_49KV6W.js +1 -0
  19. package/browser/{chunk-l0HLnBLv.js → chunk-BaO2vi_O.js} +6 -6
  20. package/browser/{chunk-Bgy3uCgK.js → chunk-BcT0wYqu.js} +1 -1
  21. package/browser/chunk-BdJzYh5V.js +190 -0
  22. package/browser/{chunk-Dd2dq7xg.js → chunk-Bgd8Jkga.js} +1 -1
  23. package/browser/chunk-BkN5jb4J.js +1 -0
  24. package/browser/{chunk-CysW_ro-.js → chunk-Brx_KbnM.js} +1 -1
  25. package/browser/{chunk-C5wr-vqf.js → chunk-BtEXE3Xz.js} +1 -1
  26. package/browser/{chunk-BhfpLr7-.js → chunk-Bu5Xq3QT.js} +1 -1
  27. package/browser/{chunk-DxxECdrg.js → chunk-BwDJA6_r.js} +2 -2
  28. package/browser/{chunk-mHtuxvLs.js → chunk-C2VdQfMJ.js} +1 -1
  29. package/browser/{chunk-BZMAEe_X.js → chunk-C49BBPGm.js} +1 -1
  30. package/browser/{chunk-BfD1F12k.js → chunk-C5WD0UQE.js} +3 -3
  31. package/browser/{chunk-C4U0w8cP.js → chunk-CI760KmO.js} +1 -1
  32. package/browser/{chunk-BqKdrvcS.js → chunk-CI7wYBKk.js} +1 -1
  33. package/browser/{chunk-BhM0bmJW.js → chunk-CKhGzoqa.js} +1 -1
  34. package/browser/{chunk-Dj9y_5pr.js → chunk-CNAj5Eon.js} +1 -1
  35. package/browser/{chunk-BIMT-HvS.js → chunk-CUz5MHdA.js} +1 -1
  36. package/browser/{chunk-DG2FCeMu.js → chunk-CXTwGKdl.js} +1 -1
  37. package/browser/{chunk-HSc9fwVS.js → chunk-Ci9l-k84.js} +1 -1
  38. package/browser/{chunk-D_vvo2qx.js → chunk-ClEmA_ih.js} +1 -1
  39. package/browser/{chunk-nWqZHM4o.js → chunk-ClSDInQq.js} +1 -1
  40. package/browser/{chunk-BVCQOGLR.js → chunk-CpZK7G-Q.js} +2 -2
  41. package/browser/{chunk-5LRyprMF.js → chunk-CxUcyBb9.js} +1 -1
  42. package/browser/{chunk-C6RPhP4t.js → chunk-D-jBfPIO.js} +1 -1
  43. package/browser/{chunk-n1eKIk8H.js → chunk-D202v_ff.js} +1 -1
  44. package/browser/{chunk-B11WEBEl.js → chunk-DCwEaE_b.js} +1 -1
  45. package/browser/{chunk-Ce03Ba0V.js → chunk-DFQuWS_F.js} +1 -1
  46. package/browser/{chunk-ZvcyZV3G.js → chunk-DHb3-uKf.js} +1 -1
  47. package/browser/{chunk-CcLheUaL.js → chunk-DKllQ3Ve.js} +1 -1
  48. package/browser/chunk-DMRb150M.js +2 -0
  49. package/browser/{chunk-5t7zJzqM.js → chunk-DMtXGu5h.js} +1 -1
  50. package/browser/{chunk-XgEfnfT0.js → chunk-DO3lSvop.js} +1 -1
  51. package/browser/{chunk-DYUMiAN8.js → chunk-DQtoh8wv.js} +1 -1
  52. package/browser/{chunk-DTIhOEG_.js → chunk-DjMtxVWg.js} +6 -6
  53. package/browser/{chunk-C7MXO6BQ.js → chunk-DjoW6kqa.js} +5 -5
  54. package/browser/{chunk-BgHTiTG2.js → chunk-DpHEu7EG.js} +1 -1
  55. package/browser/{chunk-CYMQSJz6.js → chunk-DqC8XT4v.js} +1 -1
  56. package/browser/{chunk-qARg6ese.js → chunk-DqioJb1X.js} +1 -1
  57. package/browser/chunk-DrzvCb86.js +1 -0
  58. package/browser/{chunk-BlWlE-Cq.js → chunk-DwFGK2iu.js} +1 -1
  59. package/browser/{chunk-DvzNS1Bs.js → chunk-DxrynR3o.js} +1 -1
  60. package/browser/chunk-DxvmpOv5.js +1 -0
  61. package/browser/{chunk-CyxhAtE7.js → chunk-EBW8PloQ.js} +1 -1
  62. package/browser/{chunk-CHrmSvQM.js → chunk-LVItL87L.js} +1 -1
  63. package/browser/{chunk-RxHlNJ_t.js → chunk-P8B5rz7L.js} +1 -1
  64. package/browser/chunk-R-GmZrHu.js +9 -0
  65. package/browser/{chunk-Bh1p6jDj.js → chunk-b6g-uBR5.js} +1 -1
  66. package/browser/{chunk-BUEM7g7F.js → chunk-bfpuueWC.js} +3 -3
  67. package/browser/{chunk-DX2ZzvT5.js → chunk-mrKeqPKc.js} +1 -1
  68. package/browser/index.html +1 -1
  69. package/browser/{main-6K2UFGD2.js → main-LBRSRTYI.js} +19 -19
  70. package/package.json +1 -1
  71. package/browser/chunk-BC0acSZF.js +0 -1
  72. package/browser/chunk-BLa2Gx7h.js +0 -190
  73. package/browser/chunk-B_2kLXvG.js +0 -1
  74. package/browser/chunk-C9tuHQmZ.js +0 -37
  75. package/browser/chunk-CebS4RAf.js +0 -1
  76. package/browser/chunk-CnnGSYzi.js +0 -2
  77. package/browser/chunk-DEsz0fzs.js +0 -1
  78. package/browser/chunk-DTZ7N3wC.js +0 -1
  79. package/browser/chunk-DXDohTwX.js +0 -1
  80. package/browser/chunk-uPxETzZs.js +0 -9
@@ -1 +1 @@
1
- import {g,bm as Sm,R as Re,z as zi,y as yT,h as Rw,i as hr,k as Gn,I as Is,A as Ag,q as qC,m as pl,a3 as UI,t as tC,af as Dg,ag as pT,r as bC,J as JE,T as Tg,a6 as zI,v as nC,Z as z,bl as Mt,_ as Ue$1,am as Gm,$ as zt,a0 as jt,a1 as Vt,a2 as Nt,j as pr,bn as Xt,ai as Jg,aj as XC,o as iC,bo as rC,a8 as Zg,ak as Xg,x as sC,a5 as vl,ac as yC,a9 as fC,aa as If,ab as wf,bp as ml,bq as yl,ah as oT,b4 as iT,H as Hg}from'./main-6K2UFGD2.js';import {d}from'./chunk-BhM0bmJW.js';import {W,k as ke,s as se}from'./chunk-BVCQOGLR.js';import {T as Tn,S as Sn,n as nt,a as ae,l as le,c as ce}from'./chunk-BUEM7g7F.js';import {W as Wn,o as ot,i as it,I as In,D as De,B as Be,y as ya,E as En}from'./chunk-l0HLnBLv.js';import'./chunk-DTIhOEG_.js';import {y as yt,w as wt,t as ti,Z as Zn,c as cn,Y as Ye$1,a as wt$1,m as mn,g as gt}from'./chunk-C9tuHQmZ.js';function Ue(s,i){if(s&1){let e=fC();Is(0,"div",9)(1,"mat-form-field",18)(2,"mat-label"),qC(3),pl(),Is(4,"textarea",19),Jg("ngModelChange",function(r){let m=If(e).$index,D=yC();return XC(D.commands[m],r)||(D.commands[m]=r),wf(r)}),pl(),UI(),Is(5,"mat-hint"),qC(6,"Use placeholder for dynamic values"),pl()(),Is(7,"button",20),Ag("click",function(){let r=If(e).$index,m=yC();return wf(m.removeCommand(r))}),Is(8,"mat-icon"),qC(9,"delete"),pl()()();}if(s&2){let e=i.$index,t=yC();JE(3),vl("Prompt ",e+1),JE(),Xg("ngModel",t.commands[e]),zI(),JE(3),Tg("disabled",t.commands.length===1);}}function Ne(s,i){if(s&1){let e=fC();Is(0,"div",10)(1,"h3"),qC(2,"Save to"),pl(),Is(3,"div",21)(4,"label",22)(5,"input",23),Jg("ngModelChange",function(r){If(e);let m=yC();return XC(m.source,r)||(m.source=r),wf(r)}),pl(),UI(),Is(6,"div",24)(7,"div",25)(8,"span",26),qC(9,"\u{1F464}"),pl(),Is(10,"span",27),qC(11,"Local"),pl()(),Is(12,"p",28),qC(13,"Personal prompt in ~/.coday/... (not committed)"),pl()()(),Is(14,"label",22)(15,"input",29),Jg("ngModelChange",function(r){If(e);let m=yC();return XC(m.source,r)||(m.source=r),wf(r)}),pl(),UI(),Is(16,"div",24)(17,"div",25)(18,"span",26),qC(19,"\u{1F4E6}"),pl(),Is(20,"span",27),qC(21,"Project"),pl()(),Is(22,"p",28),qC(23,"Shared prompt in ./prompts/ (committable)"),pl()()()(),Is(24,"p",30),qC(25,"Storage location is permanent and cannot be changed after creation"),pl()();}if(s&2){let e=yC();JE(4),Hg("selected",e.source==="local"),JE(),Xg("ngModel",e.source),zI(),JE(9),Hg("selected",e.source==="project"),JE(),Xg("ngModel",e.source),zI();}}function je(s,i){if(s&1&&(Is(0,"div",11)(1,"h3"),qC(2,"Storage Location"),pl(),Is(3,"div",31)(4,"span",26),qC(5),pl(),Is(6,"span",27),qC(7),pl()(),Is(8,"p",30),qC(9,"Cannot be changed after creation"),pl()()),s&2){let e=yC();JE(3),Hg("badge-local",e.source==="local")("badge-project",e.source==="project"),JE(2),Zg(e.source==="local"?"\u{1F464}":"\u{1F4E6}"),JE(2),Zg(e.source==="local"?"Local":"Project");}}function qe(s,i){if(s&1){let e=fC();Is(0,"div",12)(1,"label",32)(2,"input",33),Jg("ngModelChange",function(r){If(e);let m=yC();return XC(m.webhookEnabled,r)||(m.webhookEnabled=r),wf(r)}),pl(),UI(),Is(3,"span"),qC(4,"Enable webhook"),pl()(),Is(5,"p",30),qC(6,"Enable webhook to trigger this prompt via HTTP POST"),pl()();}if(s&2){let e=yC();JE(2),Xg("ngModel",e.webhookEnabled),zI();}}function He(s,i){if(s&1){let e=fC();Is(0,"div",13)(1,"div",34)(2,"mat-icon",35),qC(3,"link"),pl(),Is(4,"h4"),qC(5,"Webhook URL"),pl()(),Is(6,"div",36)(7,"p",37),qC(8),pl(),Is(9,"button",38),Ag("click",function(){If(e);let r=yC();return wf(r.copyWebhookUrl())}),Is(10,"mat-icon"),qC(11,"content_copy"),pl(),Is(12,"span"),qC(13,"Copy URL"),pl()()(),Is(14,"p",30),qC(15,"Use this URL to trigger the prompt via HTTP POST"),pl()();}if(s&2){let e=yC();JE(8),Zg(e.getWebhookUrl());}}function Ye(s,i){if(s&1&&(Is(0,"div",14)(1,"mat-icon"),qC(2,"error"),pl(),Is(3,"span"),qC(4),pl()()),s&2){let e=yC();JE(4),Zg(e.errorMessage);}}var S=class s{promptApi=g(d);dialogRef=g(z);configApi=g(W);snackBar=g(Mt);name="";description="";commands=[""];webhookEnabled=false;threadLifetime="";source="local";isSaving=false;errorMessage="";isAdmin=false;isEditMode=false;promptId="";data=g(Ue$1);constructor(){this.isEditMode=this.data.mode==="edit";}ngOnInit(){this.configApi.getUserConfig().subscribe({next:i=>{this.isAdmin=i.groups?.includes("CODAY_ADMIN")??false;},error:i=>{console.error("[PROMPT_FORM] Error loading user config:",i),this.isAdmin=false;}}),this.isEditMode&&this.data.prompt&&(this.promptId=this.data.prompt.id,this.name=this.data.prompt.name,this.description=this.data.prompt.description,this.commands=[...this.data.prompt.commands],this.webhookEnabled=this.data.prompt.webhookEnabled,this.source=this.data.prompt.source);}addCommand(){this.commands.push("");}removeCommand(i){this.commands.length>1&&this.commands.splice(i,1);}trackByIndex(i){return i}normalizeName(){this.name=this.name.replace(/[\s_.,;:!?()[\]{}]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase();}validateForm(){return this.name.trim()?this.description.trim()?this.commands.filter(e=>e.trim()).length===0?(this.errorMessage="At least one command is required",false):true:(this.errorMessage="Description is required",false):(this.errorMessage="Name is required",false)}save(){if(this.errorMessage="",!this.validateForm())return;let i=this.commands.filter(e=>e.trim());if(this.isSaving=true,this.isEditMode&&this.data.prompt){let e={name:this.name.trim(),description:this.description.trim(),commands:i,webhookEnabled:this.webhookEnabled};this.promptApi.updatePrompt(this.data.prompt.id,e).subscribe({next:()=>{this.isSaving=false,this.dialogRef.close(true);},error:t=>{console.error("Error updating prompt:",t),this.errorMessage=t?.error?.error||t?.message||"Failed to update prompt",this.isSaving=false;}});}else {let e={name:this.name.trim(),description:this.description.trim(),commands:i,webhookEnabled:this.webhookEnabled,source:this.source};this.promptApi.createPrompt(e).subscribe({next:()=>{this.isSaving=false,this.dialogRef.close(true);},error:t=>{console.error("Error creating prompt:",t),this.errorMessage=t?.error?.error||t?.message||"Failed to create prompt",this.isSaving=false;}});}}cancel(){this.dialogRef.close(false);}getWebhookUrl(){return `${window.location.origin}/api/webhooks/${this.promptId}/execute`}copyWebhookUrl(){if(!this.webhookEnabled){this.snackBar.open("Webhook is not enabled","Close",{duration:3e3});return}if(!this.promptId){this.snackBar.open("Prompt must be saved before getting webhook URL","Close",{duration:3e3});return}let i=this.getWebhookUrl();navigator.clipboard.writeText(i).then(()=>{this.snackBar.open("Webhook URL copied to clipboard!","Close",{duration:3e3});}).catch(e=>{console.error("Failed to copy webhook URL:",e),this.snackBar.open("Failed to copy URL","Close",{duration:3e3});});}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=Rw({type:s,selectors:[["app-prompt-form"]],decls:36,vars:11,consts:[["mat-dialog-title",""],[1,"form-container"],["appearance","outline",1,"full-width"],["matInput","","placeholder","my-prompt","required","",3,"ngModelChange","blur","ngModel"],["matInput","","placeholder","What does this prompt do?","rows","3","required","",3,"ngModelChange","ngModel"],[1,"commands-section"],[1,"section-header"],["mat-icon-button","","type","button","title","Add command",3,"click"],[1,"commands-list"],[1,"command-item"],[1,"source-section"],[1,"source-display"],[1,"webhook-section"],[1,"webhook-url-section"],[1,"error-message"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["appearance","outline",1,"command-field"],["matInput","","placeholder","Enter command with placeholders like \\{\\{key\\}\\}","rows","2",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Remove command",1,"remove-btn",3,"click","disabled"],[1,"source-options"],[1,"source-option"],["type","radio","name","source","value","local",3,"ngModelChange","ngModel"],[1,"source-content"],[1,"source-header"],[1,"source-icon"],[1,"source-label"],[1,"source-description"],["type","radio","name","source","value","project",3,"ngModelChange","ngModel"],[1,"hint"],[1,"source-badge"],[1,"checkbox-label"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"webhook-url-header"],[1,"webhook-icon"],[1,"webhook-url-content"],[1,"url-text"],["mat-raised-button","","color","accent","type","button",3,"click"]],template:function(e,t){e&1&&(Is(0,"h2",0),qC(1),pl(),Is(2,"mat-dialog-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),qC(6,"Name"),pl(),Is(7,"input",3),Jg("ngModelChange",function(m){return XC(t.name,m)||(t.name=m),m}),Ag("blur",function(){return t.normalizeName()}),pl(),UI(),Is(8,"mat-hint"),qC(9,"A descriptive name (spaces and punctuation will be replaced with hyphens), will be used as command name"),pl()(),Is(10,"mat-form-field",2)(11,"mat-label"),qC(12,"Description"),pl(),Is(13,"textarea",4),Jg("ngModelChange",function(m){return XC(t.description,m)||(t.description=m),m}),pl(),UI(),Is(14,"mat-hint"),qC(15,"Explain the purpose of this prompt, helps for searchability"),pl()(),Is(16,"div",5)(17,"div",6)(18,"h3"),qC(19,"Prompts"),pl(),Is(20,"button",7),Ag("click",function(){return t.addCommand()}),Is(21,"mat-icon"),qC(22,"add"),pl()()(),Is(23,"div",8),iC(24,Ue,10,3,"div",9,rC),pl()(),tC(26,Ne,26,6,"div",10),tC(27,je,10,6,"div",11),tC(28,qe,7,1,"div",12),tC(29,He,16,1,"div",13),tC(30,Ye,5,1,"div",14),pl()(),Is(31,"mat-dialog-actions",15)(32,"button",16),Ag("click",function(){return t.cancel()}),qC(33,"Cancel"),pl(),Is(34,"button",17),Ag("click",function(){return t.save()}),qC(35),pl()()),e&2&&(JE(),Zg(t.isEditMode?"Edit Prompt":"Create Prompt"),JE(6),Xg("ngModel",t.name),zI(),JE(6),Xg("ngModel",t.description),zI(),JE(11),sC(t.commands),JE(2),nC(t.isEditMode?-1:26),JE(),nC(t.isEditMode?27:-1),JE(),nC(t.isAdmin?28:-1),JE(),nC(t.isEditMode&&t.webhookEnabled&&t.isAdmin?29:-1),JE(),nC(t.errorMessage?30:-1),JE(2),Tg("disabled",t.isSaving),JE(2),Tg("disabled",t.isSaving),JE(),vl(" ",t.isSaving?"Saving...":"Save"," "));},dependencies:[Gm,ti,Ye$1,wt$1,mn,Zn,gt,cn,zt,jt,Vt,Nt,hr,pr,Gn,Tn,Sn,nt,ae,le,ce,yt,wt,Xt],styles:[".form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0;min-width:500px}@media(max-width:768px){.form-container[_ngcontent-%COMP%]{min-width:auto}}.full-width[_ngcontent-%COMP%]{width:100%}.commands-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.commands-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600}.commands-section[_ngcontent-%COMP%] .commands-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%] .command-field[_ngcontent-%COMP%]{flex:1}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{margin-top:8px}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]:disabled{opacity:.3;cursor:not-allowed}.webhook-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.webhook-section[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.webhook-section[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{width:18px;height:18px;cursor:pointer}.webhook-section[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.95rem}.webhook-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:.5rem 0 0;font-size:.85rem;color:var(--color-text-secondary)}.webhook-url-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-header[_ngcontent-%COMP%] .webhook-icon[_ngcontent-%COMP%]{color:var(--color-primary)}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-content[_ngcontent-%COMP%] .url-text[_ngcontent-%COMP%]{flex:1;margin:0;padding:.75rem;background:var(--color-bg);border:1px solid var(--color-border);border-radius:4px;font-family:monospace;font-size:.85rem;word-break:break-all;color:var(--color-text)}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap;display:flex;align-items:center;gap:.5rem}.webhook-url-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary)}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#f443361a;border:1px solid var(--color-error);border-radius:4px;color:var(--color-error)}.error-message[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}.source-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.source-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 1rem;font-size:1rem;font-weight:600}.source-section[_ngcontent-%COMP%] .source-options[_ngcontent-%COMP%]{display:flex;gap:1rem;margin-bottom:.75rem}@media(max-width:768px){.source-section[_ngcontent-%COMP%] .source-options[_ngcontent-%COMP%]{flex-direction:column}}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%]{flex:1;display:flex;align-items:flex-start;gap:.75rem;padding:1rem;background:var(--color-bg);border:2px solid var(--color-border);border-radius:8px;cursor:pointer;transition:all .2s ease}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%]:hover{border-color:var(--color-primary);background:var(--color-bg-hover)}.source-section[_ngcontent-%COMP%] .source-option.selected[_ngcontent-%COMP%]{border-color:var(--color-primary);background:var(--color-bg-hover);box-shadow:0 0 0 1px var(--color-primary)}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-top:2px;cursor:pointer}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%]{flex:1}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-icon[_ngcontent-%COMP%]{font-size:1.25rem}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-label[_ngcontent-%COMP%]{font-weight:600;font-size:.95rem}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-description[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);line-height:1.4}.source-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}.thread-lifetime-disabled[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.75rem;padding:1rem;background:#2196f30d;border:1px solid rgba(33,150,243,.2);border-radius:8px;margin-bottom:1rem}.thread-lifetime-disabled[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#2196f3cc;font-size:1.25rem;width:1.25rem;height:1.25rem;margin-top:2px}.thread-lifetime-disabled[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;flex:1}.thread-lifetime-disabled[_ngcontent-%COMP%] p[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:.95rem;color:var(--color-text)}.thread-lifetime-disabled[_ngcontent-%COMP%] p[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{display:block;margin-top:.25rem;font-size:.85rem;color:var(--color-text-secondary);line-height:1.4}.source-display[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.source-display[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:1rem;font-weight:600}.source-display[_ngcontent-%COMP%] .source-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:6px;font-size:.9rem;font-weight:500;margin-bottom:.5rem}.source-display[_ngcontent-%COMP%] .source-badge[_ngcontent-%COMP%] .source-icon[_ngcontent-%COMP%]{font-size:1.1rem}.source-display[_ngcontent-%COMP%] .source-badge.badge-local[_ngcontent-%COMP%]{background:#2196f31a;color:#2196f3;border:1px solid rgba(33,150,243,.3)}.source-display[_ngcontent-%COMP%] .source-badge.badge-project[_ngcontent-%COMP%]{background:#4caf501a;color:#4caf50;border:1px solid rgba(76,175,80,.3)}.source-display[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}"],changeDetection:1})};var Ge=()=>[],Ke=s=>({id:s});function Je(s,i){if(s&1&&(Is(0,"div",6),qC(1),pl()),s&2){let e=yC();JE(),Zg(e.errorMessage());}}function Qe(s,i){if(s&1){let e=fC();Is(0,"ds-entity-card",8),Ag("selected",function(r){If(e);let m=yC();return wf(m.onEdit(r))}),ml(1,9),Is(2,"button",10),Ag("click",function(r){return r.stopPropagation()}),Is(3,"mat-icon"),qC(4,"more_vert"),pl()(),yl(),pl();}if(s&2){let e=i.$implicit;yC();let t=bC(11);Tg("id",e.id)("name",e.name)("description",e.description)("badges",e.badges??oT(6,Ge)),JE(2),Tg("matMenuTriggerFor",t)("matMenuTriggerData",iT(7,Ke,e.id));}}function Xe(s,i){if(s&1){let e=fC();Is(0,"button",11),Ag("click",function(){If(e);let r=yC().id,m=yC();return wf(m.onToggleWebhook(r))}),Is(1,"mat-icon"),qC(2),pl(),qC(3),pl();}if(s&2){let e=yC().id,t=yC();JE(2),Zg(t.isWebhookEnabled(e)?"link_off":"link"),JE(),vl(" ",t.isWebhookEnabled(e)?"Disable webhook":"Enable webhook"," ");}}function Ze(s,i){if(s&1){let e=fC();Is(0,"button",11),Ag("click",function(){let r=If(e).id,m=yC();return wf(m.onEdit(r))}),Is(1,"mat-icon"),qC(2,"edit"),pl(),qC(3," Edit "),pl(),tC(4,Xe,4,2,"button",12),Is(5,"button",13),Ag("click",function(){let r=If(e).id,m=yC();return wf(m.onDelete(r))}),Is(6,"mat-icon"),qC(7,"delete"),pl(),qC(8," Delete "),pl();}if(s&2){let e=yC();JE(4),nC(e.isAdmin()?4:-1);}}var Le="system",Ie=class s{promptApi=g(d);configApi=g(W);location=g(Sm);dialog=g(Re);prompts=zi([]);isLoading=zi(false);errorMessage=zi(null);showOnlyMine=zi(true);isAdmin=zi(false);currentUsername=zi("");promptItems=yT(()=>{let i=this.prompts(),e=this.currentUsername(),r=this.showOnlyMine()&&e?i.filter(p=>this.isMyPrompt(p)):i,D=[...new Set(r.map(p=>p.createdBy))].sort((p,k)=>p===e&&k!==e?-1:k===e&&p!==e||p===Le?1:k===Le?-1:p.localeCompare(k)),H=[];for(let p of D){let k=p===e?`${p} (you)`:p;for(let F of r.filter(Ae=>Ae.createdBy===p))H.push({id:F.id,name:F.name,description:F.description,badges:this.buildBadges(F),groupKey:p,groupLabel:k});}return H});ngOnInit(){this.configApi.getUserConfig().subscribe({next:i=>{this.isAdmin.set(i.groups?.includes("CODAY_ADMIN")??false),this.currentUsername.set(i.username??"");},error:()=>this.isAdmin.set(false)}),this.loadPrompts();}loadPrompts(){this.isLoading.set(true),this.promptApi.listPrompts().subscribe({next:i=>{this.prompts.set(i.filter(e=>!e.id.startsWith("builtin"))),this.isLoading.set(false);},error:i=>{this.errorMessage.set(i?.error?.error??"Failed to load prompts"),this.isLoading.set(false);}});}onBack(){this.location.back();}onCreate(){this.dialog.open(S,{width:"700px",maxHeight:"90vh",data:{mode:"create"}}).afterClosed().subscribe(e=>{e&&this.loadPrompts();});}onEdit(i){this.promptApi.getPrompt(i).subscribe({next:e=>{this.dialog.open(S,{width:"700px",maxHeight:"90vh",data:{mode:"edit",prompt:e}}).afterClosed().subscribe(r=>{r&&this.loadPrompts();});},error:e=>this.errorMessage.set(e?.error?.error??"Failed to load prompt")});}onDelete(i){confirm("Are you sure you want to delete this prompt?")&&this.promptApi.deletePrompt(i).subscribe({next:()=>this.loadPrompts(),error:e=>this.errorMessage.set(e?.error?.error??"Failed to delete prompt")});}onToggleWebhook(i){let e=this.prompts().find(r=>r.id===i);if(!e)return;(e.webhookEnabled?this.promptApi.disableWebhook(i):this.promptApi.enableWebhook(i)).subscribe({next:()=>this.loadPrompts(),error:r=>this.errorMessage.set(r?.error?.error??"Failed to toggle webhook")});}isWebhookEnabled(i){return this.prompts().find(e=>e.id===i)?.webhookEnabled??false}isMyPrompt(i){let e=t=>t.replace(/[.\s]+/g,"_").toLowerCase();return e(i.createdBy)===e(this.currentUsername())}buildBadges(i){let e=[];return i.source==="local"?e.push({label:"local",variant:"info"}):e.push({label:"project",variant:"success"}),i.webhookEnabled&&e.push({label:"webhook",variant:"warning"}),e}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=Rw({type:s,selectors:[["app-prompt-list"]],decls:13,vars:6,consts:[["promptCard",""],["cardMenu","matMenu"],[1,"prompt-list-page"],["title","Prompts","cardMinWidth","320px","contentMaxWidth","1400px","searchPlaceholder","Filter prompts\u2026","emptyMessage","No prompts found.",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","mat-icon-button","","title","Back",3,"click"],["toolbar-extras","","color","primary",1,"prompt-list__mine-toggle",3,"ngModelChange","ngModel"],[1,"prompt-list__error"],["matMenuContent",""],[3,"selected","id","name","description","badges"],["dsCardActions",""],["mat-icon-button","",3,"click","matMenuTriggerFor","matMenuTriggerData"],["mat-menu-item","",3,"click"],["mat-menu-item",""],["mat-menu-item","",1,"prompt-list__delete-item",3,"click"]],template:function(e,t){if(e&1&&(Is(0,"div",2)(1,"ds-entity-list",3),Ag("createRequested",function(){return t.onCreate()}),Is(2,"button",4),Ag("click",function(){return t.onBack()}),Is(3,"mat-icon"),qC(4,"chevron_left"),pl()(),Is(5,"mat-slide-toggle",5),Ag("ngModelChange",function(m){return t.showOnlyMine.set(m)}),qC(6," Mine "),pl(),UI(),pl(),tC(7,Je,2,1,"div",6),pl(),Dg(8,Qe,5,9,"ng-template",null,0,pT),Is(10,"mat-menu",null,1),Dg(12,Ze,9,1,"ng-template",7),pl()),e&2){let r=bC(9);JE(),Tg("items",t.promptItems())("loading",t.isLoading())("showCreate",true)("itemTemplate",r),JE(4),Tg("ngModel",t.showOnlyMine()),zI(),JE(2),nC(t.errorMessage()?7:-1);}},dependencies:[Wn,ot,it,hr,Gn,yt,wt,ke,se,In,De,Be,ya,En,ti,Zn,cn],styles:["[_nghost-%COMP%]{display:block;width:100%;min-height:100vh;background:var(--color-bg);overflow-y:auto}.prompt-list__mine-toggle[_ngcontent-%COMP%]{flex-shrink:0;font-size:.875rem}.prompt-list__delete-item[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.prompt-list__delete-item[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit}.prompt-list__error[_ngcontent-%COMP%]{margin:1rem auto;max-width:900px;padding:.75rem 1rem;background:#dc262614;border:1px solid rgba(220,38,38,.25);border-radius:8px;color:var(--color-error, #ff3b30);font-size:.875rem}"],changeDetection:1})};export{Ie as PromptListComponent};
1
+ import {g,bm as _m,R as Re,a as Gi,E as ET,h as Fw,i as hr,k as Gn,m as ws,o as Rg,Q as QC,n as hl,a3 as GI,q as oC,af as Eg,ag as mT,M as MC,t as nI,v as bg,a6 as qI,x as iC,Z as z,bl as Mt,_ as Ue$1,am as Wm,$ as zt,a0 as jt,a1 as Vt,a2 as Nt,j as pr,bn as Xt,ai as em,aj as tT,r as cC,bo as sC,a8 as Yg,ak as Jg,y as uC,a5 as Dl,ac as EC,a9 as gC,aa as wf,ab as Cf,bp as yl,bq as vl,ah as aT,b4 as cT,A as Ug}from'./main-LBRSRTYI.js';import {d}from'./chunk-CKhGzoqa.js';import {W,k as ke,s as se}from'./chunk-CpZK7G-Q.js';import {T as Tn,S as Sn,n as nt,a as ae,l as le,c as ce}from'./chunk-bfpuueWC.js';import {W as Wn,o as ot,i as it,I as In,D as De,B as Be,y as ya,E as En}from'./chunk-BaO2vi_O.js';import'./chunk-DjMtxVWg.js';import {y as yt,w as wt,t as ti,Z as Zn,c as cn,Y as Ye$1,a as wt$1,m as mn,g as gt}from'./chunk-BYyTBqh4.js';function Ue(s,i){if(s&1){let e=gC();ws(0,"div",9)(1,"mat-form-field",18)(2,"mat-label"),QC(3),hl(),ws(4,"textarea",19),em("ngModelChange",function(r){let m=wf(e).$index,D=EC();return tT(D.commands[m],r)||(D.commands[m]=r),Cf(r)}),hl(),GI(),ws(5,"mat-hint"),QC(6,"Use placeholder for dynamic values"),hl()(),ws(7,"button",20),Rg("click",function(){let r=wf(e).$index,m=EC();return Cf(m.removeCommand(r))}),ws(8,"mat-icon"),QC(9,"delete"),hl()()();}if(s&2){let e=i.$index,t=EC();nI(3),Dl("Prompt ",e+1),nI(),Jg("ngModel",t.commands[e]),qI(),nI(3),bg("disabled",t.commands.length===1);}}function Ne(s,i){if(s&1){let e=gC();ws(0,"div",10)(1,"h3"),QC(2,"Save to"),hl(),ws(3,"div",21)(4,"label",22)(5,"input",23),em("ngModelChange",function(r){wf(e);let m=EC();return tT(m.source,r)||(m.source=r),Cf(r)}),hl(),GI(),ws(6,"div",24)(7,"div",25)(8,"span",26),QC(9,"\u{1F464}"),hl(),ws(10,"span",27),QC(11,"Local"),hl()(),ws(12,"p",28),QC(13,"Personal prompt in ~/.coday/... (not committed)"),hl()()(),ws(14,"label",22)(15,"input",29),em("ngModelChange",function(r){wf(e);let m=EC();return tT(m.source,r)||(m.source=r),Cf(r)}),hl(),GI(),ws(16,"div",24)(17,"div",25)(18,"span",26),QC(19,"\u{1F4E6}"),hl(),ws(20,"span",27),QC(21,"Project"),hl()(),ws(22,"p",28),QC(23,"Shared prompt in ./prompts/ (committable)"),hl()()()(),ws(24,"p",30),QC(25,"Storage location is permanent and cannot be changed after creation"),hl()();}if(s&2){let e=EC();nI(4),Ug("selected",e.source==="local"),nI(),Jg("ngModel",e.source),qI(),nI(9),Ug("selected",e.source==="project"),nI(),Jg("ngModel",e.source),qI();}}function je(s,i){if(s&1&&(ws(0,"div",11)(1,"h3"),QC(2,"Storage Location"),hl(),ws(3,"div",31)(4,"span",26),QC(5),hl(),ws(6,"span",27),QC(7),hl()(),ws(8,"p",30),QC(9,"Cannot be changed after creation"),hl()()),s&2){let e=EC();nI(3),Ug("badge-local",e.source==="local")("badge-project",e.source==="project"),nI(2),Yg(e.source==="local"?"\u{1F464}":"\u{1F4E6}"),nI(2),Yg(e.source==="local"?"Local":"Project");}}function qe(s,i){if(s&1){let e=gC();ws(0,"div",12)(1,"label",32)(2,"input",33),em("ngModelChange",function(r){wf(e);let m=EC();return tT(m.webhookEnabled,r)||(m.webhookEnabled=r),Cf(r)}),hl(),GI(),ws(3,"span"),QC(4,"Enable webhook"),hl()(),ws(5,"p",30),QC(6,"Enable webhook to trigger this prompt via HTTP POST"),hl()();}if(s&2){let e=EC();nI(2),Jg("ngModel",e.webhookEnabled),qI();}}function He(s,i){if(s&1){let e=gC();ws(0,"div",13)(1,"div",34)(2,"mat-icon",35),QC(3,"link"),hl(),ws(4,"h4"),QC(5,"Webhook URL"),hl()(),ws(6,"div",36)(7,"p",37),QC(8),hl(),ws(9,"button",38),Rg("click",function(){wf(e);let r=EC();return Cf(r.copyWebhookUrl())}),ws(10,"mat-icon"),QC(11,"content_copy"),hl(),ws(12,"span"),QC(13,"Copy URL"),hl()()(),ws(14,"p",30),QC(15,"Use this URL to trigger the prompt via HTTP POST"),hl()();}if(s&2){let e=EC();nI(8),Yg(e.getWebhookUrl());}}function Ye(s,i){if(s&1&&(ws(0,"div",14)(1,"mat-icon"),QC(2,"error"),hl(),ws(3,"span"),QC(4),hl()()),s&2){let e=EC();nI(4),Yg(e.errorMessage);}}var S=class s{promptApi=g(d);dialogRef=g(z);configApi=g(W);snackBar=g(Mt);name="";description="";commands=[""];webhookEnabled=false;threadLifetime="";source="local";isSaving=false;errorMessage="";isAdmin=false;isEditMode=false;promptId="";data=g(Ue$1);constructor(){this.isEditMode=this.data.mode==="edit";}ngOnInit(){this.configApi.getUserConfig().subscribe({next:i=>{this.isAdmin=i.groups?.includes("CODAY_ADMIN")??false;},error:i=>{console.error("[PROMPT_FORM] Error loading user config:",i),this.isAdmin=false;}}),this.isEditMode&&this.data.prompt&&(this.promptId=this.data.prompt.id,this.name=this.data.prompt.name,this.description=this.data.prompt.description,this.commands=[...this.data.prompt.commands],this.webhookEnabled=this.data.prompt.webhookEnabled,this.source=this.data.prompt.source);}addCommand(){this.commands.push("");}removeCommand(i){this.commands.length>1&&this.commands.splice(i,1);}trackByIndex(i){return i}normalizeName(){this.name=this.name.replace(/[\s_.,;:!?()[\]{}]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase();}validateForm(){return this.name.trim()?this.description.trim()?this.commands.filter(e=>e.trim()).length===0?(this.errorMessage="At least one command is required",false):true:(this.errorMessage="Description is required",false):(this.errorMessage="Name is required",false)}save(){if(this.errorMessage="",!this.validateForm())return;let i=this.commands.filter(e=>e.trim());if(this.isSaving=true,this.isEditMode&&this.data.prompt){let e={name:this.name.trim(),description:this.description.trim(),commands:i,webhookEnabled:this.webhookEnabled};this.promptApi.updatePrompt(this.data.prompt.id,e).subscribe({next:()=>{this.isSaving=false,this.dialogRef.close(true);},error:t=>{console.error("Error updating prompt:",t),this.errorMessage=t?.error?.error||t?.message||"Failed to update prompt",this.isSaving=false;}});}else {let e={name:this.name.trim(),description:this.description.trim(),commands:i,webhookEnabled:this.webhookEnabled,source:this.source};this.promptApi.createPrompt(e).subscribe({next:()=>{this.isSaving=false,this.dialogRef.close(true);},error:t=>{console.error("Error creating prompt:",t),this.errorMessage=t?.error?.error||t?.message||"Failed to create prompt",this.isSaving=false;}});}}cancel(){this.dialogRef.close(false);}getWebhookUrl(){return `${window.location.origin}/api/webhooks/${this.promptId}/execute`}copyWebhookUrl(){if(!this.webhookEnabled){this.snackBar.open("Webhook is not enabled","Close",{duration:3e3});return}if(!this.promptId){this.snackBar.open("Prompt must be saved before getting webhook URL","Close",{duration:3e3});return}let i=this.getWebhookUrl();navigator.clipboard.writeText(i).then(()=>{this.snackBar.open("Webhook URL copied to clipboard!","Close",{duration:3e3});}).catch(e=>{console.error("Failed to copy webhook URL:",e),this.snackBar.open("Failed to copy URL","Close",{duration:3e3});});}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=Fw({type:s,selectors:[["app-prompt-form"]],decls:36,vars:11,consts:[["mat-dialog-title",""],[1,"form-container"],["appearance","outline",1,"full-width"],["matInput","","placeholder","my-prompt","required","",3,"ngModelChange","blur","ngModel"],["matInput","","placeholder","What does this prompt do?","rows","3","required","",3,"ngModelChange","ngModel"],[1,"commands-section"],[1,"section-header"],["mat-icon-button","","type","button","title","Add command",3,"click"],[1,"commands-list"],[1,"command-item"],[1,"source-section"],[1,"source-display"],[1,"webhook-section"],[1,"webhook-url-section"],[1,"error-message"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["appearance","outline",1,"command-field"],["matInput","","placeholder","Enter command with placeholders like \\{\\{key\\}\\}","rows","2",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Remove command",1,"remove-btn",3,"click","disabled"],[1,"source-options"],[1,"source-option"],["type","radio","name","source","value","local",3,"ngModelChange","ngModel"],[1,"source-content"],[1,"source-header"],[1,"source-icon"],[1,"source-label"],[1,"source-description"],["type","radio","name","source","value","project",3,"ngModelChange","ngModel"],[1,"hint"],[1,"source-badge"],[1,"checkbox-label"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"webhook-url-header"],[1,"webhook-icon"],[1,"webhook-url-content"],[1,"url-text"],["mat-raised-button","","color","accent","type","button",3,"click"]],template:function(e,t){e&1&&(ws(0,"h2",0),QC(1),hl(),ws(2,"mat-dialog-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),QC(6,"Name"),hl(),ws(7,"input",3),em("ngModelChange",function(m){return tT(t.name,m)||(t.name=m),m}),Rg("blur",function(){return t.normalizeName()}),hl(),GI(),ws(8,"mat-hint"),QC(9,"A descriptive name (spaces and punctuation will be replaced with hyphens), will be used as command name"),hl()(),ws(10,"mat-form-field",2)(11,"mat-label"),QC(12,"Description"),hl(),ws(13,"textarea",4),em("ngModelChange",function(m){return tT(t.description,m)||(t.description=m),m}),hl(),GI(),ws(14,"mat-hint"),QC(15,"Explain the purpose of this prompt, helps for searchability"),hl()(),ws(16,"div",5)(17,"div",6)(18,"h3"),QC(19,"Prompts"),hl(),ws(20,"button",7),Rg("click",function(){return t.addCommand()}),ws(21,"mat-icon"),QC(22,"add"),hl()()(),ws(23,"div",8),cC(24,Ue,10,3,"div",9,sC),hl()(),oC(26,Ne,26,6,"div",10),oC(27,je,10,6,"div",11),oC(28,qe,7,1,"div",12),oC(29,He,16,1,"div",13),oC(30,Ye,5,1,"div",14),hl()(),ws(31,"mat-dialog-actions",15)(32,"button",16),Rg("click",function(){return t.cancel()}),QC(33,"Cancel"),hl(),ws(34,"button",17),Rg("click",function(){return t.save()}),QC(35),hl()()),e&2&&(nI(),Yg(t.isEditMode?"Edit Prompt":"Create Prompt"),nI(6),Jg("ngModel",t.name),qI(),nI(6),Jg("ngModel",t.description),qI(),nI(11),uC(t.commands),nI(2),iC(t.isEditMode?-1:26),nI(),iC(t.isEditMode?27:-1),nI(),iC(t.isAdmin?28:-1),nI(),iC(t.isEditMode&&t.webhookEnabled&&t.isAdmin?29:-1),nI(),iC(t.errorMessage?30:-1),nI(2),bg("disabled",t.isSaving),nI(2),bg("disabled",t.isSaving),nI(),Dl(" ",t.isSaving?"Saving...":"Save"," "));},dependencies:[Wm,ti,Ye$1,wt$1,mn,Zn,gt,cn,zt,jt,Vt,Nt,hr,pr,Gn,Tn,Sn,nt,ae,le,ce,yt,wt,Xt],styles:[".form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0;min-width:500px}@media(max-width:768px){.form-container[_ngcontent-%COMP%]{min-width:auto}}.full-width[_ngcontent-%COMP%]{width:100%}.commands-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.commands-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600}.commands-section[_ngcontent-%COMP%] .commands-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%] .command-field[_ngcontent-%COMP%]{flex:1}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{margin-top:8px}.commands-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]:disabled{opacity:.3;cursor:not-allowed}.webhook-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.webhook-section[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.webhook-section[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{width:18px;height:18px;cursor:pointer}.webhook-section[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.95rem}.webhook-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:.5rem 0 0;font-size:.85rem;color:var(--color-text-secondary)}.webhook-url-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-header[_ngcontent-%COMP%] .webhook-icon[_ngcontent-%COMP%]{color:var(--color-primary)}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-content[_ngcontent-%COMP%] .url-text[_ngcontent-%COMP%]{flex:1;margin:0;padding:.75rem;background:var(--color-bg);border:1px solid var(--color-border);border-radius:4px;font-family:monospace;font-size:.85rem;word-break:break-all;color:var(--color-text)}.webhook-url-section[_ngcontent-%COMP%] .webhook-url-content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap;display:flex;align-items:center;gap:.5rem}.webhook-url-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary)}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#f443361a;border:1px solid var(--color-error);border-radius:4px;color:var(--color-error)}.error-message[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}.source-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.source-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 1rem;font-size:1rem;font-weight:600}.source-section[_ngcontent-%COMP%] .source-options[_ngcontent-%COMP%]{display:flex;gap:1rem;margin-bottom:.75rem}@media(max-width:768px){.source-section[_ngcontent-%COMP%] .source-options[_ngcontent-%COMP%]{flex-direction:column}}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%]{flex:1;display:flex;align-items:flex-start;gap:.75rem;padding:1rem;background:var(--color-bg);border:2px solid var(--color-border);border-radius:8px;cursor:pointer;transition:all .2s ease}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%]:hover{border-color:var(--color-primary);background:var(--color-bg-hover)}.source-section[_ngcontent-%COMP%] .source-option.selected[_ngcontent-%COMP%]{border-color:var(--color-primary);background:var(--color-bg-hover);box-shadow:0 0 0 1px var(--color-primary)}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-top:2px;cursor:pointer}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%]{flex:1}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-icon[_ngcontent-%COMP%]{font-size:1.25rem}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-label[_ngcontent-%COMP%]{font-weight:600;font-size:.95rem}.source-section[_ngcontent-%COMP%] .source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-description[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);line-height:1.4}.source-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}.thread-lifetime-disabled[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.75rem;padding:1rem;background:#2196f30d;border:1px solid rgba(33,150,243,.2);border-radius:8px;margin-bottom:1rem}.thread-lifetime-disabled[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#2196f3cc;font-size:1.25rem;width:1.25rem;height:1.25rem;margin-top:2px}.thread-lifetime-disabled[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;flex:1}.thread-lifetime-disabled[_ngcontent-%COMP%] p[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:.95rem;color:var(--color-text)}.thread-lifetime-disabled[_ngcontent-%COMP%] p[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{display:block;margin-top:.25rem;font-size:.85rem;color:var(--color-text-secondary);line-height:1.4}.source-display[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.source-display[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:1rem;font-weight:600}.source-display[_ngcontent-%COMP%] .source-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:6px;font-size:.9rem;font-weight:500;margin-bottom:.5rem}.source-display[_ngcontent-%COMP%] .source-badge[_ngcontent-%COMP%] .source-icon[_ngcontent-%COMP%]{font-size:1.1rem}.source-display[_ngcontent-%COMP%] .source-badge.badge-local[_ngcontent-%COMP%]{background:#2196f31a;color:#2196f3;border:1px solid rgba(33,150,243,.3)}.source-display[_ngcontent-%COMP%] .source-badge.badge-project[_ngcontent-%COMP%]{background:#4caf501a;color:#4caf50;border:1px solid rgba(76,175,80,.3)}.source-display[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}"],changeDetection:1})};var Ge=()=>[],Ke=s=>({id:s});function Je(s,i){if(s&1&&(ws(0,"div",6),QC(1),hl()),s&2){let e=EC();nI(),Yg(e.errorMessage());}}function Qe(s,i){if(s&1){let e=gC();ws(0,"ds-entity-card",8),Rg("selected",function(r){wf(e);let m=EC();return Cf(m.onEdit(r))}),yl(1,9),ws(2,"button",10),Rg("click",function(r){return r.stopPropagation()}),ws(3,"mat-icon"),QC(4,"more_vert"),hl()(),vl(),hl();}if(s&2){let e=i.$implicit;EC();let t=MC(11);bg("id",e.id)("name",e.name)("description",e.description)("badges",e.badges??aT(6,Ge)),nI(2),bg("matMenuTriggerFor",t)("matMenuTriggerData",cT(7,Ke,e.id));}}function Xe(s,i){if(s&1){let e=gC();ws(0,"button",11),Rg("click",function(){wf(e);let r=EC().id,m=EC();return Cf(m.onToggleWebhook(r))}),ws(1,"mat-icon"),QC(2),hl(),QC(3),hl();}if(s&2){let e=EC().id,t=EC();nI(2),Yg(t.isWebhookEnabled(e)?"link_off":"link"),nI(),Dl(" ",t.isWebhookEnabled(e)?"Disable webhook":"Enable webhook"," ");}}function Ze(s,i){if(s&1){let e=gC();ws(0,"button",11),Rg("click",function(){let r=wf(e).id,m=EC();return Cf(m.onEdit(r))}),ws(1,"mat-icon"),QC(2,"edit"),hl(),QC(3," Edit "),hl(),oC(4,Xe,4,2,"button",12),ws(5,"button",13),Rg("click",function(){let r=wf(e).id,m=EC();return Cf(m.onDelete(r))}),ws(6,"mat-icon"),QC(7,"delete"),hl(),QC(8," Delete "),hl();}if(s&2){let e=EC();nI(4),iC(e.isAdmin()?4:-1);}}var Le="system",Ie=class s{promptApi=g(d);configApi=g(W);location=g(_m);dialog=g(Re);prompts=Gi([]);isLoading=Gi(false);errorMessage=Gi(null);showOnlyMine=Gi(true);isAdmin=Gi(false);currentUsername=Gi("");promptItems=ET(()=>{let i=this.prompts(),e=this.currentUsername(),r=this.showOnlyMine()&&e?i.filter(p=>this.isMyPrompt(p)):i,D=[...new Set(r.map(p=>p.createdBy))].sort((p,k)=>p===e&&k!==e?-1:k===e&&p!==e||p===Le?1:k===Le?-1:p.localeCompare(k)),H=[];for(let p of D){let k=p===e?`${p} (you)`:p;for(let F of r.filter(Ae=>Ae.createdBy===p))H.push({id:F.id,name:F.name,description:F.description,badges:this.buildBadges(F),groupKey:p,groupLabel:k});}return H});ngOnInit(){this.configApi.getUserConfig().subscribe({next:i=>{this.isAdmin.set(i.groups?.includes("CODAY_ADMIN")??false),this.currentUsername.set(i.username??"");},error:()=>this.isAdmin.set(false)}),this.loadPrompts();}loadPrompts(){this.isLoading.set(true),this.promptApi.listPrompts().subscribe({next:i=>{this.prompts.set(i.filter(e=>!e.id.startsWith("builtin"))),this.isLoading.set(false);},error:i=>{this.errorMessage.set(i?.error?.error??"Failed to load prompts"),this.isLoading.set(false);}});}onBack(){this.location.back();}onCreate(){this.dialog.open(S,{width:"700px",maxHeight:"90vh",data:{mode:"create"}}).afterClosed().subscribe(e=>{e&&this.loadPrompts();});}onEdit(i){this.promptApi.getPrompt(i).subscribe({next:e=>{this.dialog.open(S,{width:"700px",maxHeight:"90vh",data:{mode:"edit",prompt:e}}).afterClosed().subscribe(r=>{r&&this.loadPrompts();});},error:e=>this.errorMessage.set(e?.error?.error??"Failed to load prompt")});}onDelete(i){confirm("Are you sure you want to delete this prompt?")&&this.promptApi.deletePrompt(i).subscribe({next:()=>this.loadPrompts(),error:e=>this.errorMessage.set(e?.error?.error??"Failed to delete prompt")});}onToggleWebhook(i){let e=this.prompts().find(r=>r.id===i);if(!e)return;(e.webhookEnabled?this.promptApi.disableWebhook(i):this.promptApi.enableWebhook(i)).subscribe({next:()=>this.loadPrompts(),error:r=>this.errorMessage.set(r?.error?.error??"Failed to toggle webhook")});}isWebhookEnabled(i){return this.prompts().find(e=>e.id===i)?.webhookEnabled??false}isMyPrompt(i){let e=t=>t.replace(/[.\s]+/g,"_").toLowerCase();return e(i.createdBy)===e(this.currentUsername())}buildBadges(i){let e=[];return i.source==="local"?e.push({label:"local",variant:"info"}):e.push({label:"project",variant:"success"}),i.webhookEnabled&&e.push({label:"webhook",variant:"warning"}),e}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=Fw({type:s,selectors:[["app-prompt-list"]],decls:13,vars:6,consts:[["promptCard",""],["cardMenu","matMenu"],[1,"prompt-list-page"],["title","Prompts","cardMinWidth","320px","contentMaxWidth","1400px","searchPlaceholder","Filter prompts\u2026","emptyMessage","No prompts found.",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","mat-icon-button","","title","Back",3,"click"],["toolbar-extras","","color","primary",1,"prompt-list__mine-toggle",3,"ngModelChange","ngModel"],[1,"prompt-list__error"],["matMenuContent",""],[3,"selected","id","name","description","badges"],["dsCardActions",""],["mat-icon-button","",3,"click","matMenuTriggerFor","matMenuTriggerData"],["mat-menu-item","",3,"click"],["mat-menu-item",""],["mat-menu-item","",1,"prompt-list__delete-item",3,"click"]],template:function(e,t){if(e&1&&(ws(0,"div",2)(1,"ds-entity-list",3),Rg("createRequested",function(){return t.onCreate()}),ws(2,"button",4),Rg("click",function(){return t.onBack()}),ws(3,"mat-icon"),QC(4,"chevron_left"),hl()(),ws(5,"mat-slide-toggle",5),Rg("ngModelChange",function(m){return t.showOnlyMine.set(m)}),QC(6," Mine "),hl(),GI(),hl(),oC(7,Je,2,1,"div",6),hl(),Eg(8,Qe,5,9,"ng-template",null,0,mT),ws(10,"mat-menu",null,1),Eg(12,Ze,9,1,"ng-template",7),hl()),e&2){let r=MC(9);nI(),bg("items",t.promptItems())("loading",t.isLoading())("showCreate",true)("itemTemplate",r),nI(4),bg("ngModel",t.showOnlyMine()),qI(),nI(2),iC(t.errorMessage()?7:-1);}},dependencies:[Wn,ot,it,hr,Gn,yt,wt,ke,se,In,De,Be,ya,En,ti,Zn,cn],styles:["[_nghost-%COMP%]{display:block;width:100%;min-height:100vh;background:var(--color-bg);overflow-y:auto}.prompt-list__mine-toggle[_ngcontent-%COMP%]{flex-shrink:0;font-size:.875rem}.prompt-list__delete-item[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.prompt-list__delete-item[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit}.prompt-list__error[_ngcontent-%COMP%]{margin:1rem auto;max-width:900px;padding:.75rem 1rem;background:#dc262614;border:1px solid rgba(220,38,38,.25);border-radius:8px;color:var(--color-error, #ff3b30);font-size:.875rem}"],changeDetection:1})};export{Ie as PromptListComponent};
@@ -1 +1 @@
1
- import {Z as Zn,S as Se}from'./chunk-l0HLnBLv.js';import {cb as TB,cc as CB,z as zi,y as yT,h as Rw,I as Is,q as qC,m as pl,t as tC,J as JE,a8 as Zg,v as nC,ac as yC,C as Cg,a5 as vl,a9 as fC,A as Ag,T as Tg,aa as If,ab as wf}from'./main-6K2UFGD2.js';function k(t,r){if(t&1&&(Is(0,"span",4),qC(1),pl()),t&2){let e=yC();Cg("data-variant",e.badge().variant)("aria-label",e.badge().ariaLabel),JE(),vl(" ",e.badge().label," ");}}function I(t,r){if(t&1){let e=fC();Is(0,"span",7),qC(1,"Delete?"),pl(),Is(2,"ds-icon-button",8),Ag("action",function(){If(e);let l=yC();return wf(l.onDeleteConfirmed())}),pl(),Is(3,"ds-icon-button",9),Ag("action",function(){If(e);let l=yC();return wf(l.onDeleteCancelled())}),pl();}}function P(t,r){if(t&1){let e=fC();Is(0,"ds-kebab-menu",12),Ag("itemSelected",function(l){If(e);let A=yC(2);return wf(A.onMenuAction(l))}),pl();}if(t&2){let e=yC(2);Tg("items",e.menuItems());}}function R(t,r){if(t&1){let e=fC();Is(0,"ds-icon-button",10),Ag("action",function(){If(e);let l=yC();return wf(l.onDuplicate())}),pl(),tC(1,P,1,1,"ds-kebab-menu",11);}if(t&2){let e=yC();JE(),nC(e.readOnly()?-1:1);}}var E=Object.freeze({platform:{label:"PLATFORM",ariaLabel:"Configuration plateforme (lecture seule)",variant:"neutral"},namespace:{label:"NS",ariaLabel:"Configuration partag\xE9e du namespace",variant:"neutral"},userOnNs:{label:"USER \xD7 NS",ariaLabel:"Configuration utilisateur sur ce namespace",variant:"info"},userGlobal:{label:"USER GLOBAL",ariaLabel:"Configuration utilisateur globale",variant:"warning"}}),O=class t{config=TB.required();scope=TB.required();readOnly=TB(false);showBadge=TB(true);editRequested=CB();deleteRequested=CB();duplicateRequested=CB();pendingDelete=zi(false);badge=yT(()=>E[this.scope()]);menuItems=yT(()=>[{key:"edit",label:"Edit auth setting",icon:"edit"},{key:"delete",label:"Delete auth setting",icon:"delete",variant:"danger"}]);onMenuAction(r){switch(r){case "edit":this.editRequested.emit(this.config());break;case "delete":this.pendingDelete.set(true);break}}onDuplicate(){this.duplicateRequested.emit(this.config());}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.config());}onDeleteCancelled(){this.pendingDelete.set(false);}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=Rw({type:t,selectors:[["agentos-auth-setting-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"],showBadge:[1,"showBadge"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:11,vars:4,consts:[["role","listitem",1,"auth-setting-item"],[1,"auth-setting-item__body"],[1,"auth-setting-item__heading"],[1,"auth-setting-item__name"],[1,"auth-setting-item__badge"],[1,"auth-setting-item__type"],[1,"auth-setting-item__actions"],[1,"auth-setting-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],["icon","content_copy","title","Duplicate this auth setting",3,"action"],[3,"items"],[3,"itemSelected","items"]],template:function(e,o){e&1&&(Is(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),qC(4),pl(),tC(5,k,2,3,"span",4),pl(),Is(6,"span",5),qC(7),pl()(),Is(8,"div",6),tC(9,I,4,0)(10,R,2,1),pl()()),e&2&&(JE(4),Zg(o.config().name),JE(),nC(o.showBadge()?5:-1),JE(2),Zg(o.config().authType),JE(2),nC(o.pendingDelete()?9:10));},dependencies:[Zn,Se],styles:[".auth-setting-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border);background:var(--glass-bg);-webkit-backdrop-filter:var(--glass-backdrop-blur);backdrop-filter:var(--glass-backdrop-blur);transition:background .15s ease,border-color .15s ease}.auth-setting-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-primary)}.auth-setting-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.auth-setting-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.auth-setting-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.auth-setting-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-size:.65rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:.1rem .4rem;border-radius:4px;line-height:1.2}.auth-setting-item__badge[data-variant=neutral][_ngcontent-%COMP%]{background:var(--color-bg-secondary);color:var(--color-text-secondary)}.auth-setting-item__badge[data-variant=info][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-info) 15%,transparent);color:var(--color-info)}.auth-setting-item__badge[data-variant=warning][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-warning) 15%,transparent);color:var(--color-warning)}.auth-setting-item__type[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.auth-setting-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.auth-setting-item[_ngcontent-%COMP%]:hover .auth-setting-item__actions[_ngcontent-%COMP%], .auth-setting-item[_ngcontent-%COMP%]:focus-within .auth-setting-item__actions[_ngcontent-%COMP%]{opacity:1}.auth-setting-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error);margin-right:.25rem;white-space:nowrap}"]})};export{O};
1
+ import {Z as Zn,S as Se}from'./chunk-BaO2vi_O.js';import {cb as LB,cc as PB,a as Gi,E as ET,h as Fw,m as ws,Q as QC,n as hl,q as oC,t as nI,a8 as Yg,x as iC,ac as EC,T as Tg,a5 as Dl,a9 as gC,o as Rg,v as bg,aa as wf,ab as Cf}from'./main-LBRSRTYI.js';function k(t,r){if(t&1&&(ws(0,"span",4),QC(1),hl()),t&2){let e=EC();Tg("data-variant",e.badge().variant)("aria-label",e.badge().ariaLabel),nI(),Dl(" ",e.badge().label," ");}}function I(t,r){if(t&1){let e=gC();ws(0,"span",7),QC(1,"Delete?"),hl(),ws(2,"ds-icon-button",8),Rg("action",function(){wf(e);let l=EC();return Cf(l.onDeleteConfirmed())}),hl(),ws(3,"ds-icon-button",9),Rg("action",function(){wf(e);let l=EC();return Cf(l.onDeleteCancelled())}),hl();}}function P(t,r){if(t&1){let e=gC();ws(0,"ds-kebab-menu",12),Rg("itemSelected",function(l){wf(e);let A=EC(2);return Cf(A.onMenuAction(l))}),hl();}if(t&2){let e=EC(2);bg("items",e.menuItems());}}function R(t,r){if(t&1){let e=gC();ws(0,"ds-icon-button",10),Rg("action",function(){wf(e);let l=EC();return Cf(l.onDuplicate())}),hl(),oC(1,P,1,1,"ds-kebab-menu",11);}if(t&2){let e=EC();nI(),iC(e.readOnly()?-1:1);}}var E=Object.freeze({platform:{label:"PLATFORM",ariaLabel:"Configuration plateforme (lecture seule)",variant:"neutral"},namespace:{label:"NS",ariaLabel:"Configuration partag\xE9e du namespace",variant:"neutral"},userOnNs:{label:"USER \xD7 NS",ariaLabel:"Configuration utilisateur sur ce namespace",variant:"info"},userGlobal:{label:"USER GLOBAL",ariaLabel:"Configuration utilisateur globale",variant:"warning"}}),O=class t{config=LB.required();scope=LB.required();readOnly=LB(false);showBadge=LB(true);editRequested=PB();deleteRequested=PB();duplicateRequested=PB();pendingDelete=Gi(false);badge=ET(()=>E[this.scope()]);menuItems=ET(()=>[{key:"edit",label:"Edit auth setting",icon:"edit"},{key:"delete",label:"Delete auth setting",icon:"delete",variant:"danger"}]);onMenuAction(r){switch(r){case "edit":this.editRequested.emit(this.config());break;case "delete":this.pendingDelete.set(true);break}}onDuplicate(){this.duplicateRequested.emit(this.config());}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.config());}onDeleteCancelled(){this.pendingDelete.set(false);}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=Fw({type:t,selectors:[["agentos-auth-setting-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"],showBadge:[1,"showBadge"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:11,vars:4,consts:[["role","listitem",1,"auth-setting-item"],[1,"auth-setting-item__body"],[1,"auth-setting-item__heading"],[1,"auth-setting-item__name"],[1,"auth-setting-item__badge"],[1,"auth-setting-item__type"],[1,"auth-setting-item__actions"],[1,"auth-setting-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],["icon","content_copy","title","Duplicate this auth setting",3,"action"],[3,"items"],[3,"itemSelected","items"]],template:function(e,o){e&1&&(ws(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),QC(4),hl(),oC(5,k,2,3,"span",4),hl(),ws(6,"span",5),QC(7),hl()(),ws(8,"div",6),oC(9,I,4,0)(10,R,2,1),hl()()),e&2&&(nI(4),Yg(o.config().name),nI(),iC(o.showBadge()?5:-1),nI(2),Yg(o.config().authType),nI(2),iC(o.pendingDelete()?9:10));},dependencies:[Zn,Se],styles:[".auth-setting-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border);background:var(--glass-bg);-webkit-backdrop-filter:var(--glass-backdrop-blur);backdrop-filter:var(--glass-backdrop-blur);transition:background .15s ease,border-color .15s ease}.auth-setting-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-primary)}.auth-setting-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.auth-setting-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.auth-setting-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.auth-setting-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-size:.65rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:.1rem .4rem;border-radius:4px;line-height:1.2}.auth-setting-item__badge[data-variant=neutral][_ngcontent-%COMP%]{background:var(--color-bg-secondary);color:var(--color-text-secondary)}.auth-setting-item__badge[data-variant=info][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-info) 15%,transparent);color:var(--color-info)}.auth-setting-item__badge[data-variant=warning][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-warning) 15%,transparent);color:var(--color-warning)}.auth-setting-item__type[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.auth-setting-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.auth-setting-item[_ngcontent-%COMP%]:hover .auth-setting-item__actions[_ngcontent-%COMP%], .auth-setting-item[_ngcontent-%COMP%]:focus-within .auth-setting-item__actions[_ngcontent-%COMP%]{opacity:1}.auth-setting-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error);margin-right:.25rem;white-space:nowrap}"]})};export{O};
@@ -0,0 +1,2 @@
1
+ import {n as ne}from'./chunk-BXkvjekT.js';import {g,Z as z$1,_ as Ue,h as Fw,$ as zt,a0 as jt,a1 as Vt,a2 as Nt,i as hr,j as pr,m as ws,Q as QC,n as hl,q as oC,o as Rg,t as nI,A as Ug,a5 as Dl,a8 as Yg,x as iC,v as bg,a9 as gC,ai as em,aa as wf,ac as EC,aj as tT,ab as Cf,a3 as GI,ak as Jg,a6 as qI}from'./main-LBRSRTYI.js';import {y as yt,w as wt,t as ti,Z as Zn,c as cn}from'./chunk-BYyTBqh4.js';function G(c,p){if(c&1){let t=gC();ws(0,"mat-checkbox",5),em("ngModelChange",function(l){wf(t);let f=EC();return tT(f.checkboxChecked,l)||(f.checkboxChecked=l),Cf(l)}),QC(1),hl(),GI();}if(c&2){let t=EC();Jg("ngModel",t.checkboxChecked),qI(),nI(),Yg(t.data.checkboxLabel);}}var z=class c{dialogRef=g(z$1);data=g(Ue);checkboxChecked=false;confirm(){this.dialogRef.close({confirmed:true,checkboxChecked:this.checkboxChecked});}cancel(){this.dialogRef.close({confirmed:false});}static \u0275fac=function(t){return new(t||c)};static \u0275cmp=Fw({type:c,selectors:[["app-confirm-dialog"]],decls:13,vars:8,consts:[["mat-dialog-title",""],[3,"ngModel"],["align","end"],["mat-button","",3,"click"],["mat-flat-button","",3,"click","color"],[3,"ngModelChange","ngModel"]],template:function(t,e){t&1&&(ws(0,"h2",0)(1,"mat-icon"),QC(2,"warning"),hl(),QC(3),hl(),ws(4,"mat-dialog-content")(5,"p"),QC(6),hl(),oC(7,G,2,2,"mat-checkbox",1),hl(),ws(8,"mat-dialog-actions",2)(9,"button",3),Rg("click",function(){return e.cancel()}),QC(10),hl(),ws(11,"button",4),Rg("click",function(){return e.confirm()}),QC(12),hl()()),t&2&&(nI(),Ug("destructive",!!e.data.isDestructive),nI(2),Dl(" ",e.data.title,`
2
+ `),nI(3),Yg(e.data.message),nI(),iC(e.data.checkboxLabel?7:-1),nI(3),Yg(e.data.cancelLabel??"Cancel"),nI(),bg("color",e.data.isDestructive?"warn":"primary"),nI(),Dl(" ",e.data.confirmLabel??"Confirm"," "));},dependencies:[zt,jt,Vt,Nt,hr,pr,yt,wt,ne,ti,Zn,cn],styles:["h2[mat-dialog-title][_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}h2[mat-dialog-title][_ngcontent-%COMP%] mat-icon.destructive[_ngcontent-%COMP%]{color:var(--color-error, #f44336)}mat-dialog-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--color-text-secondary);line-height:1.5}mat-dialog-content[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{display:block;margin-top:8px;font-size:.875rem}"]})};export{z};
@@ -1 +1 @@
1
- import {I}from'./chunk-HSc9fwVS.js';import {g,G,w as we,de as M,dd as $,aJ as Tr,z as zi,bS as va,aD as Ly,u as ue,c as U,h as Rw,aK as xb,I as Is,bf as cT,A as Ag,m as pl,af as Dg,r as bC,T as Tg,bg as lT,ah as oT,t as tC,ac as yC,v as nC,a9 as fC,aa as If,ab as wf,ag as pT}from'./main-6K2UFGD2.js';import {W as Wn,S as Se}from'./chunk-l0HLnBLv.js';import'./chunk-DTIhOEG_.js';import'./chunk-C9tuHQmZ.js';var V=()=>[];function F(n,t){if(n&1){let o=fC();Is(0,"agentos-ai-model-item",4),Ag("editRequested",function(e){If(o);let s=yC(2);return wf(s.onEdit(e))})("deleteRequested",function(e){If(o);let s=yC(2);return wf(s.deleteModel(e))}),pl();}n&2&&Tg("model",t);}function O(n,t){if(n&1&&tC(0,F,1,1,"agentos-ai-model-item",3),n&2){let o,i=t.$implicit,e=yC();nC((o=e.resolveModel(i.id))?0:-1,o);}}var S=class n{router=g(G);destroyRef=g(we);aiModelController=g(M);aiProviderController=g($);refresh$=new Tr(void 0);isLoading=zi(true);data$=this.refresh$.pipe(va(()=>(this.isLoading.set(true),Ly([this.aiModelController.listPlatformLevelAiModel(),this.aiProviderController.listAiProvider("none")]))));modelItems$=this.data$.pipe(ue(([t,o])=>{let i=new Map(o.map(e=>[e.id??"",e.name]));return t.map(e=>({id:e.id??"",name:e.alias??e.apiModelName,description:e.apiModelName,groupKey:e.aiProviderId,groupLabel:i.get(e.aiProviderId)??e.aiProviderId}))}));modelsById=new Map;constructor(){this.data$.pipe(U(this.destroyRef)).subscribe({next:([t])=>{this.modelsById=new Map(t.map(o=>[o.id??"",o])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","ai-models","new"]);}deleteModel(t){this.aiModelController.deleteAiModel(t.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}onEdit(t){t.id&&this.router.navigate(["/agentos","admin","ai-models",t.id,"edit"]);}resolveModel(t){return this.modelsById.get(t)??null}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=Rw({type:n,selectors:[["agentos-platform-ai-models"]],decls:5,vars:7,consts:[["aiModelItemTpl",""],["title","Platform AI Models","emptyMessage","No platform AI models defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"model"],[3,"editRequested","deleteRequested","model"]],template:function(o,i){if(o&1&&(Is(0,"ds-entity-list",1),cT(1,"async"),Ag("createRequested",function(){return i.openCreateForm()}),Is(2,"ds-icon-button",2),Ag("action",function(){return i.goBack()}),pl()(),Dg(3,O,1,1,"ng-template",null,0,pT)),o&2){let e=bC(4);Tg("items",lT(1,4,i.modelItems$)??oT(6,V))("loading",i.isLoading())("showCreate",true)("itemTemplate",e);}},dependencies:[Wn,I,Se,xb],styles:[".platform-ai-models__back[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font-family:inherit;font-size:.875rem;color:var(--color-text-secondary, #6e6e73);padding:.25rem .5rem;border-radius:4px;transition:color .15s ease}.platform-ai-models__back[_ngcontent-%COMP%]:hover{color:var(--color-primary, #007aff)}"]})};export{S as PlatformAiModelsComponent};
1
+ import {I}from'./chunk-Ci9l-k84.js';import {g,G,w as we,de as B,dd as $,aJ as Tr,a as Gi,bS as Da,aD as jy,u as ue,c as U,h as Fw,aK as Ob,m as ws,bf as dT,o as Rg,n as hl,af as Eg,M as MC,v as bg,bg as pT,ah as aT,q as oC,ac as EC,x as iC,a9 as gC,aa as wf,ab as Cf,ag as mT}from'./main-LBRSRTYI.js';import {W as Wn,S as Se}from'./chunk-BaO2vi_O.js';import'./chunk-DjMtxVWg.js';import'./chunk-BYyTBqh4.js';var V=()=>[];function F(n,t){if(n&1){let o=gC();ws(0,"agentos-ai-model-item",4),Rg("editRequested",function(e){wf(o);let s=EC(2);return Cf(s.onEdit(e))})("deleteRequested",function(e){wf(o);let s=EC(2);return Cf(s.deleteModel(e))}),hl();}n&2&&bg("model",t);}function O(n,t){if(n&1&&oC(0,F,1,1,"agentos-ai-model-item",3),n&2){let o,i=t.$implicit,e=EC();iC((o=e.resolveModel(i.id))?0:-1,o);}}var S=class n{router=g(G);destroyRef=g(we);aiModelController=g(B);aiProviderController=g($);refresh$=new Tr(void 0);isLoading=Gi(true);data$=this.refresh$.pipe(Da(()=>(this.isLoading.set(true),jy([this.aiModelController.listPlatformLevelAiModel(),this.aiProviderController.listAiProvider("none")]))));modelItems$=this.data$.pipe(ue(([t,o])=>{let i=new Map(o.map(e=>[e.id??"",e.name]));return t.map(e=>({id:e.id??"",name:e.alias??e.apiModelName,description:e.apiModelName,groupKey:e.aiProviderId,groupLabel:i.get(e.aiProviderId)??e.aiProviderId}))}));modelsById=new Map;constructor(){this.data$.pipe(U(this.destroyRef)).subscribe({next:([t])=>{this.modelsById=new Map(t.map(o=>[o.id??"",o])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","ai-models","new"]);}deleteModel(t){this.aiModelController.deleteAiModel(t.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}onEdit(t){t.id&&this.router.navigate(["/agentos","admin","ai-models",t.id,"edit"]);}resolveModel(t){return this.modelsById.get(t)??null}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=Fw({type:n,selectors:[["agentos-platform-ai-models"]],decls:5,vars:7,consts:[["aiModelItemTpl",""],["title","Platform AI Models","emptyMessage","No platform AI models defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"model"],[3,"editRequested","deleteRequested","model"]],template:function(o,i){if(o&1&&(ws(0,"ds-entity-list",1),dT(1,"async"),Rg("createRequested",function(){return i.openCreateForm()}),ws(2,"ds-icon-button",2),Rg("action",function(){return i.goBack()}),hl()(),Eg(3,O,1,1,"ng-template",null,0,mT)),o&2){let e=MC(4);bg("items",pT(1,4,i.modelItems$)??aT(6,V))("loading",i.isLoading())("showCreate",true)("itemTemplate",e);}},dependencies:[Wn,I,Se,Ob],styles:[".platform-ai-models__back[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font-family:inherit;font-size:.875rem;color:var(--color-text-secondary, #6e6e73);padding:.25rem .5rem;border-radius:4px;transition:color .15s ease}.platform-ai-models__back[_ngcontent-%COMP%]:hover{color:var(--color-primary, #007aff)}"]})};export{S as PlatformAiModelsComponent};
@@ -1 +1 @@
1
- import {g,bl as Mt,Y as x}from'./main-6K2UFGD2.js';var s=class n{snackBar=g(Mt);success(t,o=2e3){this.snackBar.open(t,"",{duration:o,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-success"]});}error(t,o=3e3){this.snackBar.open(t,"",{duration:o,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-error"]});}info(t,o=2e3){this.snackBar.open(t,"",{duration:o,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-info"]});}static \u0275fac=function(o){return new(o||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};export{s};
1
+ import {g,bl as Mt,Y as x}from'./main-LBRSRTYI.js';var s=class n{snackBar=g(Mt);success(t,o=2e3){this.snackBar.open(t,"",{duration:o,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-success"]});}error(t,o=3e3){this.snackBar.open(t,"",{duration:o,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-error"]});}info(t,o=2e3){this.snackBar.open(t,"",{duration:o,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-info"]});}static \u0275fac=function(o){return new(o||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};export{s};
@@ -1 +1 @@
1
- import {S as St}from'./chunk-DzicJow4.js';import {an as ce,g,L,ao as V,G,N as N$1,ap as Vy,h as Rw,aq as a,ar as S,as as F,at as c,I as Is,A as Ag,t as tC,m as pl,T as Tg,J as JE,v as nC,D as Fg,E as wC,K as CC,au as nv,ae as Ot,av as dt,Y as x,aw as hl,q as qC,ax as gl,a8 as Zg,a9 as fC,aa as If,ac as yC,ab as wf,n as bg}from'./main-6K2UFGD2.js';import {a as at,s as st,r as rt,_ as _i}from'./chunk-Bnic_hdt.js';import'./chunk-BKlwFrFB.js';import {G as Ge}from'./chunk-C7MXO6BQ.js';import'./chunk-nWqZHM4o.js';import'./chunk-XgEfnfT0.js';import'./chunk-BhM0bmJW.js';import'./chunk-BVCQOGLR.js';import'./chunk-BUEM7g7F.js';import'./chunk-l0HLnBLv.js';import'./chunk-DTIhOEG_.js';import'./chunk-C9tuHQmZ.js';var T=class o{welcomeMessages=["Welcome to Coday","Bienvenue sur Coday","Bienvenido a Coday","Willkommen bei Coday","Benvenuto su Coday","Bem-vindo ao Coday","Welkom bij Coday","\u0414\u043E\u0431\u0440\u043E \u043F\u043E\u0436\u0430\u043B\u043E\u0432\u0430\u0442\u044C \u0432 Coday","Coday \u3078\u3088\u3046\u3053\u305D","\u6B22\u8FCE\u6765\u5230 Coday","Coday \uC5D0 \uC624\uC2E0 \uAC83\uC744 \uD658\uC601\uD569\uB2C8\uB2E4","\u0645\u0631\u062D\u0628\u064B\u0627 \u0628\u0643 \u0641\u064A Coday"];currentWelcomeIndex=0;currentWelcomeMessage=this.welcomeMessages[0];welcomeRotationInterval;ngOnInit(){this.startWelcomeRotation();}ngOnDestroy(){this.stopWelcomeRotation();}startWelcomeRotation(){this.welcomeRotationInterval=window.setInterval(()=>{this.currentWelcomeIndex=(this.currentWelcomeIndex+1)%this.welcomeMessages.length,this.currentWelcomeMessage=this.welcomeMessages[this.currentWelcomeIndex];},3e3);}stopWelcomeRotation(){this.welcomeRotationInterval&&(clearInterval(this.welcomeRotationInterval),this.welcomeRotationInterval=void 0);}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=Rw({type:o,selectors:[["app-welcome-message"]],decls:2,vars:1,consts:[[1,"welcome-title"]],template:function(t,i){t&1&&(hl(0,"h1",0),qC(1),gl()),t&2&&(JE(),Zg(i.currentWelcomeMessage));},styles:[".welcome-title[_ngcontent-%COMP%]{font-size:clamp(1.5rem,4vw,4rem);font-weight:700;background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 100%);background-size:200% auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:_ngcontent-%COMP%_gradientShift 3s ease-in-out infinite;margin:0;padding:0;line-height:1.2;transition:opacity .5s ease-in-out;display:block;min-height:1.2em;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@keyframes _ngcontent-%COMP%_gradientShift{0%{background-position:0% center}50%{background-position:100% center}to{background-position:0% center}}"],changeDetection:1})};var N=class o{destroy$=new ce;isSetup=false;codayService=g(Ge);preferencesService=g(L);setup(){if(this.isSetup){console.warn("[AGENT-NOTIFICATION] Service already set up");return}console.log("[AGENT-NOTIFICATION] Setting up agent notification service"),this.codayService.isThinking$.pipe(Vy(this.destroy$),nv(),Ot(([e,t])=>e===true&&t===false)).subscribe(()=>{console.log("[AGENT-NOTIFICATION] Agent stopped thinking, notifying task finished"),this.notifyTaskFinishedIfEnabled();}),this.preferencesService.browserNotificationEnabled$.pipe(Vy(this.destroy$),nv(),Ot(([e,t])=>e===false&&t===true)).subscribe(()=>{console.log("[AGENT-NOTIFICATION] Browser notifications enabled, checking permission"),this.handleBrowserNotificationEnabled();}),this.isSetup=true;}notifyTaskFinishedIfEnabled(){this.preferencesService.getAgentNotificationEnabled()&&(this.preferencesService.getNotificationSoundEnabled()&&this.playCompletionSound(),this.preferencesService.getBrowserNotificationEnabled()&&this.sendBrowserNotification());}playCompletionSound(){try{let e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),i=e.createGain();t.connect(i),i.connect(e.destination),t.frequency.setValueAtTime(700,e.currentTime),i.gain.setValueAtTime(.1,e.currentTime),i.gain.exponentialRampToValueAtTime(.01,e.currentTime+.08),t.start(e.currentTime),t.stop(e.currentTime+.08);let n=e.createOscillator(),r=e.createGain();n.connect(r),r.connect(e.destination);let l=e.currentTime+.11;n.frequency.setValueAtTime(950,l),r.gain.setValueAtTime(.1,l),r.gain.exponentialRampToValueAtTime(.01,l+.09),n.start(l),n.stop(l+.09),console.log("[AGENT-NOTIFICATION] Completion sound played");}catch(e){console.error("[AGENT-NOTIFICATION] Failed to play completion sound:",e);}}handleBrowserNotificationEnabled(){return dt(this,null,function*(){if(!("Notification"in window)){console.warn("[AGENT-NOTIFICATION] Browser does not support notifications"),this.preferencesService.setBrowserNotificationEnabled(false);return}if(Notification.permission==="denied"){console.warn("[AGENT-NOTIFICATION] Permission denied, disabling browser notifications"),this.preferencesService.setBrowserNotificationEnabled(false);return}if(Notification.permission==="granted"){console.log("[AGENT-NOTIFICATION] Permission already granted, showing confirmation"),this.createConfirmationNotification();return}try{(yield Notification.requestPermission())==="granted"?(console.log("[AGENT-NOTIFICATION] Permission granted, showing confirmation"),this.createConfirmationNotification()):(console.log("[AGENT-NOTIFICATION] Permission denied or dismissed"),this.preferencesService.setBrowserNotificationEnabled(!1));}catch(e){console.error("[AGENT-NOTIFICATION] Error requesting permission:",e),this.preferencesService.setBrowserNotificationEnabled(false);}})}sendBrowserNotification(){if(!("Notification"in window)){console.warn("[AGENT-NOTIFICATION] Browser does not support notifications");return}if(document.hasFocus()){console.warn("[AGENT-NOTIFICATION] Document is focused, skipping browser notification");return}Notification.permission==="granted"?this.createTaskCompleteNotification():console.warn("[AGENT-NOTIFICATION] Permission not granted, cannot send notification");}createConfirmationNotification(){let e=new Notification("Coday - Notifications Enabled",{body:"You will be notified when the agent completes tasks",icon:"/favicon.ico",tag:"coday-notifications-enabled",requireInteraction:false});setTimeout(()=>e.close(),4e3),e.onclick=()=>{window.focus(),e.close();},console.log("[AGENT-NOTIFICATION] Confirmation notification sent");}createTaskCompleteNotification(){let e=new Notification("Coday - Task Complete",{body:"The agent has finished and is waiting for your input",icon:"/favicon.ico",tag:"coday-task-complete",requireInteraction:false});setTimeout(()=>e.close(),5e3),e.onclick=()=>{window.focus(),e.close();},console.log("[AGENT-NOTIFICATION] Task complete notification sent");}ngOnDestroy(){console.log("[AGENT-NOTIFICATION] Service destroyed"),this.destroy$.next(),this.destroy$.complete();}static \u0275fac=function(t){return new(t||o)};static \u0275prov=x({token:o,factory:o.\u0275fac,providedIn:"root"})};var Z=["inputSection"];function ee(o,e){if(o&1){let t=fC();Is(0,"app-thread",4),Ag("chatFocused",function(){If(t);let n=yC();return wf(n.onChatFocusedOnMobile())})("drawerStateChange",function(n){If(t);let r=yC();return wf(r.onDrawerStateChange(n))}),pl();}if(o&2){let t=yC();Tg("projectName",t.projectName)("threadId",t.threadId);}}function te(o,e){if(o&1){let t=fC();Is(0,"div",5),bg(1,"app-welcome-message"),pl(),Is(2,"div",6,0)(4,"div",7)(5,"div",8)(6,"app-chat-textarea",9),Ag("messageSubmitted",function(n){If(t);let r=yC();return wf(r.onMessageSubmitted(n))})("voiceMessageReady",function(n){If(t);let r=yC();return wf(r.onVoiceMessageReady(n))})("voiceRecordingToggled",function(n){If(t);let r=yC();return wf(r.onVoiceToggled(n))})("heightChanged",function(n){If(t);let r=yC();return wf(r.onInputHeightChanged(n))})("textareaFocused",function(){If(t);let n=yC();return wf(n.onChatFocusedOnMobile())}),pl()()()();}if(o&2){let t=yC();JE(6),Tg("isDisabled",t.isSessionInitializing)("isSessionInitializing",t.isSessionInitializing)("showWelcome",true)("isThinking",false)("isStarting",t.isStartingFirstMessage);}}var K=class o{destroy$=new ce;inputSection;sidenav;projectName="";threadId=null;isSessionInitializing=false;isStartingFirstMessage=false;inputSectionHeight=80;codayService=g(Ge);titleService=g(at);preferencesService=g(L);route=g(V);router=g(G);threadApiService=g(N$1);agentNotificationService=g(N);firstMessageState=g(st);constructor(){console.log("[MAIN-APP] Using new thread-based architecture (no clientId needed)");}ngOnInit(){this.agentNotificationService.setup(),this.setupPrintHandlers(),this.route.params.pipe(Vy(this.destroy$)).subscribe(e=>{let t=e.projectName,i=e.threadId||null;console.log("[MAIN-APP] Route params updated:",{project:t,thread:i,previousProject:this.projectName,previousThread:this.threadId}),this.projectName=t,this.threadId=i,this.threadId?console.log("[MAIN-APP] Thread selected - ThreadComponent will display"):(console.log("[MAIN-APP] No thread selected - showing welcome view"),this.initializeWelcomeView());});}initializeWelcomeView(){this.codayService.setTabTitleService(this.titleService);}ngAfterViewInit(){setTimeout(()=>this.updateInputSectionHeight(),100);}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),window.removeEventListener("beforeprint",this.handleBeforePrint),window.removeEventListener("afterprint",this.handleAfterPrint);}onMessageSubmitted(e){console.log("[MAIN-APP] First message submitted from welcome view:",e),this.isSessionInitializing=true,this.isStartingFirstMessage=true,this.threadApiService.createThread().subscribe({next:t=>{console.log("[MAIN-APP] Thread created:",t.thread.id),this.firstMessageState.setPendingFirstMessage(e),this.router.navigate(["project",this.projectName,"thread",t.thread.id]);},error:t=>{console.error("[MAIN-APP] Failed to create thread:",t),this.isSessionInitializing=false,this.isStartingFirstMessage=false,alert("Failed to create conversation: "+(t.message||"Unknown error"));}});}onVoiceToggled(e){console.log("[VOICE] Recording in welcome view:",e);}onVoiceMessageReady(e){console.log("[MAIN-APP] Voice message ready from welcome view"),this.isSessionInitializing=true,this.isStartingFirstMessage=true,this.threadApiService.createThread().subscribe({next:t=>{console.log("[MAIN-APP] Thread created for voice message:",t.thread.id),this.firstMessageState.setPendingVoiceMessage(e),this.router.navigate(["project",this.projectName,"thread",t.thread.id]);},error:t=>{console.error("[MAIN-APP] Failed to create thread for voice message:",t),this.isSessionInitializing=false,this.isStartingFirstMessage=false,alert("Failed to create conversation: "+(t.message||"Unknown error"));}});}isDrawerOpen=false;onDrawerStateChange(e){this.isDrawerOpen=e;}onChatFocusedOnMobile(){window.innerWidth<1024&&this.sidenav?.close();}onInputHeightChanged(e){console.log("[MAIN-APP] Input height changed:",e),this.inputSectionHeight=e;}updateInputSectionHeight(){if(this.inputSection?.nativeElement){let e=this.inputSection.nativeElement.offsetHeight;e!==this.inputSectionHeight&&(console.log("[MAIN-APP] Input section height updated:",e),this.inputSectionHeight=e);}}setupPrintHandlers(){window.addEventListener("beforeprint",this.handleBeforePrint),window.addEventListener("afterprint",this.handleAfterPrint);}handleBeforePrint=()=>{console.log("[PRINT] Before print event triggered");let e=this.preferencesService.getPrintTechnicalMessages();console.log("[PRINT] Print technical messages:",e),e?document.body.classList.add("print-include-technical"):document.body.classList.remove("print-include-technical");};handleAfterPrint=()=>{console.log("[PRINT] After print event triggered"),document.body.classList.remove("print-include-technical");};static \u0275fac=function(t){return new(t||o)};static \u0275cmp=Rw({type:o,selectors:[["app-main"]],viewQuery:function(t,i){if(t&1&&Fg(Z,5)(St,5),t&2){let n;wC(n=CC())&&(i.inputSection=n.first),wC(n=CC())&&(i.sidenav=n.first);}},decls:4,vars:2,consts:[["inputSection",""],[3,"drawerOpen"],[1,"app",3,"mousedown","touchstart"],[3,"projectName","threadId"],[3,"chatFocused","drawerStateChange","projectName","threadId"],[1,"welcome-section"],[1,"input-section"],[1,"input-center"],[1,"input-glass"],[3,"messageSubmitted","voiceMessageReady","voiceRecordingToggled","heightChanged","textareaFocused","isDisabled","isSessionInitializing","showWelcome","isThinking","isStarting"]],template:function(t,i){t&1&&(Is(0,"app-sidenav",1)(1,"div",2),Ag("mousedown",function(){return i.onChatFocusedOnMobile()})("touchstart",function(){return i.onChatFocusedOnMobile()}),tC(2,ee,1,2,"app-thread",3)(3,te,7,5),pl()()),t&2&&(Tg("drawerOpen",i.isDrawerOpen),JE(2),nC(i.threadId?2:3));},dependencies:[rt,_i,T,St],styles:["[_nghost-%COMP%]{display:flex;height:100vh;width:100%;overflow:hidden;justify-content:center}.app[_ngcontent-%COMP%]{width:100%;max-width:100%;min-width:0;height:100%;display:flex;flex-direction:column;background:var(--color-bg);color:var(--color-text);transition:all .3s ease;position:relative;justify-content:center;overflow:hidden}.chat-wrapper[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;background:transparent;width:100%;padding:2.5rem 0 1.5rem;display:flex;justify-content:center}.chat-wrapper[_ngcontent-%COMP%] .chat-center[_ngcontent-%COMP%]{max-width:760px;width:100%;margin:0;padding:0 2rem}@media(max-width:768px){.chat-wrapper[_ngcontent-%COMP%] .chat-center[_ngcontent-%COMP%]{padding:0 1rem}}.welcome-section[_ngcontent-%COMP%]{flex-shrink:0;text-align:center;padding:2rem 1rem;animation:_ngcontent-%COMP%_fadeInUp .8s ease-out;display:flex;justify-content:center;align-items:center;width:100%;min-width:0;overflow:hidden}@keyframes _ngcontent-%COMP%_fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.input-section[_ngcontent-%COMP%]{flex-shrink:0;position:relative;border-top:none;background:transparent;box-shadow:none;padding:2.5rem 0 2rem;overflow-y:visible;max-height:none;width:100%;z-index:10;pointer-events:none;display:flex;justify-content:center}.input-center[_ngcontent-%COMP%]{max-width:760px;width:100%;margin:0;padding:0 2rem;display:flex;justify-content:center;align-items:end;position:relative;pointer-events:auto}@media(max-width:768px){.input-center[_ngcontent-%COMP%]{padding:0 1rem}}.input-glass[_ngcontent-%COMP%]{background:none;box-shadow:none;width:100%;min-height:64px;display:flex;align-items:stretch;gap:0;pointer-events:auto;position:relative;overflow:visible}.input-glass[_ngcontent-%COMP%] app-chat-textarea[_ngcontent-%COMP%]{width:100%;min-width:0;flex:1 1 auto;align-self:stretch;display:flex}body.dark[_nghost-%COMP%], body.dark [_nghost-%COMP%], [_ngcontent-%COMP%]:root[data-theme=dark] .input-glass[_ngcontent-%COMP%]{background:#24283073;border-color:#b4c8ff17;box-shadow:0 8px 32px #0000002b,0 1.5px 8px #00000012}.choice-overlay[_ngcontent-%COMP%]{z-index:10;width:100%;display:flex;justify-content:center;align-items:center}.upload-status[_ngcontent-%COMP%]{position:fixed;bottom:100px;left:50%;transform:translate(-50%);z-index:1000;display:flex;align-items:center;padding:12px 20px;background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);border-radius:16px;font-size:.9em;color:var(--color-text);box-shadow:var(--glass-shadow);max-width:300px;text-align:center}.upload-status.error[_ngcontent-%COMP%]{background:#ff3b3026;color:var(--color-error);border-color:#ff3b304d}@media(max-width:768px){.welcome-section[_ngcontent-%COMP%]{padding:1.5rem 1rem}.input-section[_ngcontent-%COMP%]{padding:1.5rem .75rem 1rem}.input-center[_ngcontent-%COMP%]{padding:0 .5rem}}@media print{[_nghost-%COMP%]{display:block!important;height:auto!important;overflow:visible!important}.app[_ngcontent-%COMP%]{height:auto!important;overflow:visible!important;display:block!important}.input-section[_ngcontent-%COMP%], .welcome-section[_ngcontent-%COMP%]{display:none!important}}"],data:{animation:[a("slideIn",[S(":enter",[F({transform:"translateY(100%)",opacity:0}),c("300ms ease-out",F({transform:"translateY(0)",opacity:1}))]),S(":leave",[c("200ms ease-in",F({transform:"translateY(100%)",opacity:0}))])])]},changeDetection:1})};export{K as MainAppComponent};
1
+ import {S as St}from'./chunk-BTX631I3.js';import {an as ce,g,L,ao as V,G,N as N$1,ap as Hy,h as Fw,aq as a,ar as S,as as F,at as c,m as ws,o as Rg,q as oC,n as hl,v as bg,t as nI,x as iC,C as Pg,D as bC,H as SC,au as ov,ae as Ot,av as dt,Y as x,aw as gl,Q as QC,ax as ml,a8 as Yg,a9 as gC,aa as wf,ac as EC,ab as Cf,S as Sg}from'./main-LBRSRTYI.js';import {a as at,s as st,r as rt,_ as _i}from'./chunk-B6BZBDSv.js';import'./chunk-BHvLB-pV.js';import {G as Ge}from'./chunk-DjoW6kqa.js';import'./chunk-ClSDInQq.js';import'./chunk-DO3lSvop.js';import'./chunk-CKhGzoqa.js';import'./chunk-CpZK7G-Q.js';import'./chunk-bfpuueWC.js';import'./chunk-BaO2vi_O.js';import'./chunk-DjMtxVWg.js';import'./chunk-BYyTBqh4.js';var T=class o{welcomeMessages=["Welcome to Coday","Bienvenue sur Coday","Bienvenido a Coday","Willkommen bei Coday","Benvenuto su Coday","Bem-vindo ao Coday","Welkom bij Coday","\u0414\u043E\u0431\u0440\u043E \u043F\u043E\u0436\u0430\u043B\u043E\u0432\u0430\u0442\u044C \u0432 Coday","Coday \u3078\u3088\u3046\u3053\u305D","\u6B22\u8FCE\u6765\u5230 Coday","Coday \uC5D0 \uC624\uC2E0 \uAC83\uC744 \uD658\uC601\uD569\uB2C8\uB2E4","\u0645\u0631\u062D\u0628\u064B\u0627 \u0628\u0643 \u0641\u064A Coday"];currentWelcomeIndex=0;currentWelcomeMessage=this.welcomeMessages[0];welcomeRotationInterval;ngOnInit(){this.startWelcomeRotation();}ngOnDestroy(){this.stopWelcomeRotation();}startWelcomeRotation(){this.welcomeRotationInterval=window.setInterval(()=>{this.currentWelcomeIndex=(this.currentWelcomeIndex+1)%this.welcomeMessages.length,this.currentWelcomeMessage=this.welcomeMessages[this.currentWelcomeIndex];},3e3);}stopWelcomeRotation(){this.welcomeRotationInterval&&(clearInterval(this.welcomeRotationInterval),this.welcomeRotationInterval=void 0);}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=Fw({type:o,selectors:[["app-welcome-message"]],decls:2,vars:1,consts:[[1,"welcome-title"]],template:function(t,i){t&1&&(gl(0,"h1",0),QC(1),ml()),t&2&&(nI(),Yg(i.currentWelcomeMessage));},styles:[".welcome-title[_ngcontent-%COMP%]{font-size:clamp(1.5rem,4vw,4rem);font-weight:700;background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 100%);background-size:200% auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:_ngcontent-%COMP%_gradientShift 3s ease-in-out infinite;margin:0;padding:0;line-height:1.2;transition:opacity .5s ease-in-out;display:block;min-height:1.2em;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@keyframes _ngcontent-%COMP%_gradientShift{0%{background-position:0% center}50%{background-position:100% center}to{background-position:0% center}}"],changeDetection:1})};var N=class o{destroy$=new ce;isSetup=false;codayService=g(Ge);preferencesService=g(L);setup(){if(this.isSetup){console.warn("[AGENT-NOTIFICATION] Service already set up");return}console.log("[AGENT-NOTIFICATION] Setting up agent notification service"),this.codayService.isThinking$.pipe(Hy(this.destroy$),ov(),Ot(([e,t])=>e===true&&t===false)).subscribe(()=>{console.log("[AGENT-NOTIFICATION] Agent stopped thinking, notifying task finished"),this.notifyTaskFinishedIfEnabled();}),this.preferencesService.browserNotificationEnabled$.pipe(Hy(this.destroy$),ov(),Ot(([e,t])=>e===false&&t===true)).subscribe(()=>{console.log("[AGENT-NOTIFICATION] Browser notifications enabled, checking permission"),this.handleBrowserNotificationEnabled();}),this.isSetup=true;}notifyTaskFinishedIfEnabled(){this.preferencesService.getAgentNotificationEnabled()&&(this.preferencesService.getNotificationSoundEnabled()&&this.playCompletionSound(),this.preferencesService.getBrowserNotificationEnabled()&&this.sendBrowserNotification());}playCompletionSound(){try{let e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),i=e.createGain();t.connect(i),i.connect(e.destination),t.frequency.setValueAtTime(700,e.currentTime),i.gain.setValueAtTime(.1,e.currentTime),i.gain.exponentialRampToValueAtTime(.01,e.currentTime+.08),t.start(e.currentTime),t.stop(e.currentTime+.08);let n=e.createOscillator(),r=e.createGain();n.connect(r),r.connect(e.destination);let l=e.currentTime+.11;n.frequency.setValueAtTime(950,l),r.gain.setValueAtTime(.1,l),r.gain.exponentialRampToValueAtTime(.01,l+.09),n.start(l),n.stop(l+.09),console.log("[AGENT-NOTIFICATION] Completion sound played");}catch(e){console.error("[AGENT-NOTIFICATION] Failed to play completion sound:",e);}}handleBrowserNotificationEnabled(){return dt(this,null,function*(){if(!("Notification"in window)){console.warn("[AGENT-NOTIFICATION] Browser does not support notifications"),this.preferencesService.setBrowserNotificationEnabled(false);return}if(Notification.permission==="denied"){console.warn("[AGENT-NOTIFICATION] Permission denied, disabling browser notifications"),this.preferencesService.setBrowserNotificationEnabled(false);return}if(Notification.permission==="granted"){console.log("[AGENT-NOTIFICATION] Permission already granted, showing confirmation"),this.createConfirmationNotification();return}try{(yield Notification.requestPermission())==="granted"?(console.log("[AGENT-NOTIFICATION] Permission granted, showing confirmation"),this.createConfirmationNotification()):(console.log("[AGENT-NOTIFICATION] Permission denied or dismissed"),this.preferencesService.setBrowserNotificationEnabled(!1));}catch(e){console.error("[AGENT-NOTIFICATION] Error requesting permission:",e),this.preferencesService.setBrowserNotificationEnabled(false);}})}sendBrowserNotification(){if(!("Notification"in window)){console.warn("[AGENT-NOTIFICATION] Browser does not support notifications");return}if(document.hasFocus()){console.warn("[AGENT-NOTIFICATION] Document is focused, skipping browser notification");return}Notification.permission==="granted"?this.createTaskCompleteNotification():console.warn("[AGENT-NOTIFICATION] Permission not granted, cannot send notification");}createConfirmationNotification(){let e=new Notification("Coday - Notifications Enabled",{body:"You will be notified when the agent completes tasks",icon:"/favicon.ico",tag:"coday-notifications-enabled",requireInteraction:false});setTimeout(()=>e.close(),4e3),e.onclick=()=>{window.focus(),e.close();},console.log("[AGENT-NOTIFICATION] Confirmation notification sent");}createTaskCompleteNotification(){let e=new Notification("Coday - Task Complete",{body:"The agent has finished and is waiting for your input",icon:"/favicon.ico",tag:"coday-task-complete",requireInteraction:false});setTimeout(()=>e.close(),5e3),e.onclick=()=>{window.focus(),e.close();},console.log("[AGENT-NOTIFICATION] Task complete notification sent");}ngOnDestroy(){console.log("[AGENT-NOTIFICATION] Service destroyed"),this.destroy$.next(),this.destroy$.complete();}static \u0275fac=function(t){return new(t||o)};static \u0275prov=x({token:o,factory:o.\u0275fac,providedIn:"root"})};var Z=["inputSection"];function ee(o,e){if(o&1){let t=gC();ws(0,"app-thread",4),Rg("chatFocused",function(){wf(t);let n=EC();return Cf(n.onChatFocusedOnMobile())})("drawerStateChange",function(n){wf(t);let r=EC();return Cf(r.onDrawerStateChange(n))}),hl();}if(o&2){let t=EC();bg("projectName",t.projectName)("threadId",t.threadId);}}function te(o,e){if(o&1){let t=gC();ws(0,"div",5),Sg(1,"app-welcome-message"),hl(),ws(2,"div",6,0)(4,"div",7)(5,"div",8)(6,"app-chat-textarea",9),Rg("messageSubmitted",function(n){wf(t);let r=EC();return Cf(r.onMessageSubmitted(n))})("voiceMessageReady",function(n){wf(t);let r=EC();return Cf(r.onVoiceMessageReady(n))})("voiceRecordingToggled",function(n){wf(t);let r=EC();return Cf(r.onVoiceToggled(n))})("heightChanged",function(n){wf(t);let r=EC();return Cf(r.onInputHeightChanged(n))})("textareaFocused",function(){wf(t);let n=EC();return Cf(n.onChatFocusedOnMobile())}),hl()()()();}if(o&2){let t=EC();nI(6),bg("isDisabled",t.isSessionInitializing)("isSessionInitializing",t.isSessionInitializing)("showWelcome",true)("isThinking",false)("isStarting",t.isStartingFirstMessage);}}var K=class o{destroy$=new ce;inputSection;sidenav;projectName="";threadId=null;isSessionInitializing=false;isStartingFirstMessage=false;inputSectionHeight=80;codayService=g(Ge);titleService=g(at);preferencesService=g(L);route=g(V);router=g(G);threadApiService=g(N$1);agentNotificationService=g(N);firstMessageState=g(st);constructor(){console.log("[MAIN-APP] Using new thread-based architecture (no clientId needed)");}ngOnInit(){this.agentNotificationService.setup(),this.setupPrintHandlers(),this.route.params.pipe(Hy(this.destroy$)).subscribe(e=>{let t=e.projectName,i=e.threadId||null;console.log("[MAIN-APP] Route params updated:",{project:t,thread:i,previousProject:this.projectName,previousThread:this.threadId}),this.projectName=t,this.threadId=i,this.threadId?console.log("[MAIN-APP] Thread selected - ThreadComponent will display"):(console.log("[MAIN-APP] No thread selected - showing welcome view"),this.initializeWelcomeView());});}initializeWelcomeView(){this.codayService.setTabTitleService(this.titleService);}ngAfterViewInit(){setTimeout(()=>this.updateInputSectionHeight(),100);}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),window.removeEventListener("beforeprint",this.handleBeforePrint),window.removeEventListener("afterprint",this.handleAfterPrint);}onMessageSubmitted(e){console.log("[MAIN-APP] First message submitted from welcome view:",e),this.isSessionInitializing=true,this.isStartingFirstMessage=true,this.threadApiService.createThread().subscribe({next:t=>{console.log("[MAIN-APP] Thread created:",t.thread.id),this.firstMessageState.setPendingFirstMessage(e),this.router.navigate(["project",this.projectName,"thread",t.thread.id]);},error:t=>{console.error("[MAIN-APP] Failed to create thread:",t),this.isSessionInitializing=false,this.isStartingFirstMessage=false,alert("Failed to create conversation: "+(t.message||"Unknown error"));}});}onVoiceToggled(e){console.log("[VOICE] Recording in welcome view:",e);}onVoiceMessageReady(e){console.log("[MAIN-APP] Voice message ready from welcome view"),this.isSessionInitializing=true,this.isStartingFirstMessage=true,this.threadApiService.createThread().subscribe({next:t=>{console.log("[MAIN-APP] Thread created for voice message:",t.thread.id),this.firstMessageState.setPendingVoiceMessage(e),this.router.navigate(["project",this.projectName,"thread",t.thread.id]);},error:t=>{console.error("[MAIN-APP] Failed to create thread for voice message:",t),this.isSessionInitializing=false,this.isStartingFirstMessage=false,alert("Failed to create conversation: "+(t.message||"Unknown error"));}});}isDrawerOpen=false;onDrawerStateChange(e){this.isDrawerOpen=e;}onChatFocusedOnMobile(){window.innerWidth<1024&&this.sidenav?.close();}onInputHeightChanged(e){console.log("[MAIN-APP] Input height changed:",e),this.inputSectionHeight=e;}updateInputSectionHeight(){if(this.inputSection?.nativeElement){let e=this.inputSection.nativeElement.offsetHeight;e!==this.inputSectionHeight&&(console.log("[MAIN-APP] Input section height updated:",e),this.inputSectionHeight=e);}}setupPrintHandlers(){window.addEventListener("beforeprint",this.handleBeforePrint),window.addEventListener("afterprint",this.handleAfterPrint);}handleBeforePrint=()=>{console.log("[PRINT] Before print event triggered");let e=this.preferencesService.getPrintTechnicalMessages();console.log("[PRINT] Print technical messages:",e),e?document.body.classList.add("print-include-technical"):document.body.classList.remove("print-include-technical");};handleAfterPrint=()=>{console.log("[PRINT] After print event triggered"),document.body.classList.remove("print-include-technical");};static \u0275fac=function(t){return new(t||o)};static \u0275cmp=Fw({type:o,selectors:[["app-main"]],viewQuery:function(t,i){if(t&1&&Pg(Z,5)(St,5),t&2){let n;bC(n=SC())&&(i.inputSection=n.first),bC(n=SC())&&(i.sidenav=n.first);}},decls:4,vars:2,consts:[["inputSection",""],[3,"drawerOpen"],[1,"app",3,"mousedown","touchstart"],[3,"projectName","threadId"],[3,"chatFocused","drawerStateChange","projectName","threadId"],[1,"welcome-section"],[1,"input-section"],[1,"input-center"],[1,"input-glass"],[3,"messageSubmitted","voiceMessageReady","voiceRecordingToggled","heightChanged","textareaFocused","isDisabled","isSessionInitializing","showWelcome","isThinking","isStarting"]],template:function(t,i){t&1&&(ws(0,"app-sidenav",1)(1,"div",2),Rg("mousedown",function(){return i.onChatFocusedOnMobile()})("touchstart",function(){return i.onChatFocusedOnMobile()}),oC(2,ee,1,2,"app-thread",3)(3,te,7,5),hl()()),t&2&&(bg("drawerOpen",i.isDrawerOpen),nI(2),iC(i.threadId?2:3));},dependencies:[rt,_i,T,St],styles:["[_nghost-%COMP%]{display:flex;height:100vh;width:100%;overflow:hidden;justify-content:center}.app[_ngcontent-%COMP%]{width:100%;max-width:100%;min-width:0;height:100%;display:flex;flex-direction:column;background:var(--color-bg);color:var(--color-text);transition:all .3s ease;position:relative;justify-content:center;overflow:hidden}.chat-wrapper[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;background:transparent;width:100%;padding:2.5rem 0 1.5rem;display:flex;justify-content:center}.chat-wrapper[_ngcontent-%COMP%] .chat-center[_ngcontent-%COMP%]{max-width:760px;width:100%;margin:0;padding:0 2rem}@media(max-width:768px){.chat-wrapper[_ngcontent-%COMP%] .chat-center[_ngcontent-%COMP%]{padding:0 1rem}}.welcome-section[_ngcontent-%COMP%]{flex-shrink:0;text-align:center;padding:2rem 1rem;animation:_ngcontent-%COMP%_fadeInUp .8s ease-out;display:flex;justify-content:center;align-items:center;width:100%;min-width:0;overflow:hidden}@keyframes _ngcontent-%COMP%_fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.input-section[_ngcontent-%COMP%]{flex-shrink:0;position:relative;border-top:none;background:transparent;box-shadow:none;padding:2.5rem 0 2rem;overflow-y:visible;max-height:none;width:100%;z-index:10;pointer-events:none;display:flex;justify-content:center}.input-center[_ngcontent-%COMP%]{max-width:760px;width:100%;margin:0;padding:0 2rem;display:flex;justify-content:center;align-items:end;position:relative;pointer-events:auto}@media(max-width:768px){.input-center[_ngcontent-%COMP%]{padding:0 1rem}}.input-glass[_ngcontent-%COMP%]{background:none;box-shadow:none;width:100%;min-height:64px;display:flex;align-items:stretch;gap:0;pointer-events:auto;position:relative;overflow:visible}.input-glass[_ngcontent-%COMP%] app-chat-textarea[_ngcontent-%COMP%]{width:100%;min-width:0;flex:1 1 auto;align-self:stretch;display:flex}body.dark[_nghost-%COMP%], body.dark [_nghost-%COMP%], [_ngcontent-%COMP%]:root[data-theme=dark] .input-glass[_ngcontent-%COMP%]{background:#24283073;border-color:#b4c8ff17;box-shadow:0 8px 32px #0000002b,0 1.5px 8px #00000012}.choice-overlay[_ngcontent-%COMP%]{z-index:10;width:100%;display:flex;justify-content:center;align-items:center}.upload-status[_ngcontent-%COMP%]{position:fixed;bottom:100px;left:50%;transform:translate(-50%);z-index:1000;display:flex;align-items:center;padding:12px 20px;background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);border-radius:16px;font-size:.9em;color:var(--color-text);box-shadow:var(--glass-shadow);max-width:300px;text-align:center}.upload-status.error[_ngcontent-%COMP%]{background:#ff3b3026;color:var(--color-error);border-color:#ff3b304d}@media(max-width:768px){.welcome-section[_ngcontent-%COMP%]{padding:1.5rem 1rem}.input-section[_ngcontent-%COMP%]{padding:1.5rem .75rem 1rem}.input-center[_ngcontent-%COMP%]{padding:0 .5rem}}@media print{[_nghost-%COMP%]{display:block!important;height:auto!important;overflow:visible!important}.app[_ngcontent-%COMP%]{height:auto!important;overflow:visible!important;display:block!important}.input-section[_ngcontent-%COMP%], .welcome-section[_ngcontent-%COMP%]{display:none!important}}"],data:{animation:[a("slideIn",[S(":enter",[F({transform:"translateY(100%)",opacity:0}),c("300ms ease-out",F({transform:"translateY(0)",opacity:1}))]),S(":leave",[c("200ms ease-in",F({transform:"translateY(100%)",opacity:0}))])])]},changeDetection:1})};export{K as MainAppComponent};
@@ -1,4 +1,4 @@
1
- import {ct as vi,h as Rw,C as Cg,H as Hg,aL as Eo,aM as qn,bE as vt,aO as wt,cZ as fn,cT as Gp,c_ as he$1,cV as yg,bA as DC,I as Is,bB as EC,m as pl,b5 as rT,ad as Vg,t as tC,v as nC,J as JE,aW as w,bv as kg,E as wC,K as CC,g,az as Kt$1,c$ as kn,bw as St,bG as p,aP as G,aR as ks,aU as Ue,aV as U,z as zi,an as ce$1,al as yt,ae as Ot,u as ue,d0 as Ea,bL as pe,bs as Tl,ap as Vy,bu as Ve$1,c2 as NE,aA as an,D as Fg,bt as Qn,aS as K,cO as cs,bN as F,bR as Sd,cL as wd,bP as Yy,a9 as fC,A as Ag,ac as yC,bV as Ky,aN as Nn,bD as ge,aQ as $a,bM as mr,d1 as lt,d2 as wt$1,d3 as I,b_ as xt,bX as Pt,b as P,aZ as Ls,aw as hl,cJ as Rg,q as qC,ax as gl,b$ as PC,a8 as Zg,c3 as kt,cD as Ce,cz as Jr,aa as If,ab as wf}from'./main-6K2UFGD2.js';var Xt=["tooltip"],Ut=20;var qt=new w("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let n=g(pe);return ()=>kt(n,{scrollThrottle:Ut})}}),$t=new w("mat-tooltip-default-options",{providedIn:"root",factory:()=>({showDelay:0,hideDelay:0,touchendHideDelay:1500})});var Ht="tooltip-panel",Kt={passive:true},Jt=8,te=8,ee=24,ie=200,ne=(()=>{class n{_elementRef=g(Kt$1);_ngZone=g(G);_platform=g(p);_ariaDescriber=g($a);_focusMonitor=g(St);_dir=g(Qn);_injector=g(pe);_viewContainerRef=g(mr);_mediaMatcher=g(lt);_document=g(U);_renderer=g(ks);_animationsDisabled=K();_defaultOptions=g($t,{optional:true});_overlayRef=null;_tooltipInstance=null;_overlayPanelClass;_portal;_position="below";_positionAtOrigin=false;_disabled=false;_tooltipClass;_viewInitialized=false;_pointerExitEventsInitialized=false;_tooltipComponent=Gt;_viewportMargin=8;_currentPosition;_cssClassPrefix="mat-mdc";_ariaDescriptionPending=false;_dirSubscribed=false;get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()));}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(t){this._positionAtOrigin=vi(t),this._detach(),this._overlayRef=null;}get disabled(){return this._disabled}set disabled(t){let e=vi(t);this._disabled!==e&&(this._disabled=e,e?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message));}get showDelay(){return this._showDelay}set showDelay(t){this._showDelay=fn(t);}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(t){this._hideDelay=fn(t),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay);}_hideDelay;touchGestures="auto";get message(){return this._message}set message(t){let e=this._message;this._message=t!=null?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(e);}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass);}_eventCleanups=[];_touchstartTimeout=null;_destroyed=new ce$1;_isDestroyed=false;constructor(){let t=this._defaultOptions;t&&(this._showDelay=t.showDelay,this._hideDelay=t.hideDelay,t.position&&(this.position=t.position),t.positionAtOrigin&&(this.positionAtOrigin=t.positionAtOrigin),t.touchGestures&&(this.touchGestures=t.touchGestures),t.tooltipClass&&(this.tooltipClass=t.tooltipClass)),this._viewportMargin=Jt;}ngAfterViewInit(){this._viewInitialized=true,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Vy(this._destroyed)).subscribe(t=>{t?t==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0));});}ngOnDestroy(){let t=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._eventCleanups.forEach(e=>e()),this._eventCleanups.length=0,this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=true,this._ariaDescriber.removeDescription(t,this.message,"tooltip"),this._focusMonitor.stopMonitoring(t);}show(t=this.showDelay,e){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let i=this._createOverlay(e);this._detach(),this._portal=this._portal||new wt$1(this._tooltipComponent,this._viewContainerRef);let r=this._tooltipInstance=i.attach(this._portal).instance;r._triggerElement=this._elementRef.nativeElement,r._mouseLeaveHideDelay=this._hideDelay,r.afterHidden().pipe(Vy(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),r.show(t);}hide(t=this.hideDelay){let e=this._tooltipInstance;e&&(e.isVisible()?e.hide(t):(e._cancelPendingAnimations(),this._detach()));}toggle(t){this._isTooltipVisible()?this.hide():this.show(void 0,t);}_isTooltipVisible(){return !!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(t){if(this._overlayRef){let a=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!t)&&a._origin instanceof Kt$1)return this._overlayRef;this._detach();}let e=this._injector.get(I).getAncestorScrollContainers(this._elementRef),i=`${this._cssClassPrefix}-${Ht}`,r=xt(this._injector,this.positionAtOrigin?t||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(false).withViewportMargin(this._viewportMargin).withScrollableContainers(e).withPopoverLocation("global");return r.positionChanges.pipe(Vy(this._destroyed)).subscribe(a=>{this._updateCurrentPositionClass(a.connectionPair),this._tooltipInstance&&a.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0));}),this._overlayRef=Pt(this._injector,{direction:this._dir,positionStrategy:r,panelClass:this._overlayPanelClass?[...this._overlayPanelClass,i]:i,scrollStrategy:this._injector.get(qt)(),disableAnimations:this._animationsDisabled,eventPredicate:this._overlayEventPredicate}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Vy(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Vy(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Vy(this._destroyed)).subscribe(a=>{a.preventDefault(),a.stopPropagation(),this._ngZone.run(()=>this.hide(0));}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._dirSubscribed||(this._dirSubscribed=true,this._dir.change.pipe(Vy(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef);})),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null;}_updatePosition(t){let e=t.getConfig().positionStrategy,i=this._getOrigin(),r=this._getOverlayPosition();e.withPositions([this._addOffset(P(P({},i.main),r.main)),this._addOffset(P(P({},i.fallback),r.fallback))]);}_addOffset(t){let e=te,i=!this._dir||this._dir.value=="ltr";return t.originY==="top"?t.offsetY=-e:t.originY==="bottom"?t.offsetY=e:t.originX==="start"?t.offsetX=i?-e:e:t.originX==="end"&&(t.offsetX=i?e:-e),t}_getOrigin(){let t=!this._dir||this._dir.value=="ltr",e=this.position,i;e=="above"||e=="below"?i={originX:"center",originY:e=="above"?"top":"bottom"}:e=="before"||e=="left"&&t||e=="right"&&!t?i={originX:"start",originY:"center"}:(e=="after"||e=="right"&&t||e=="left"&&!t)&&(i={originX:"end",originY:"center"});let{x:r,y:a}=this._invertPosition(i.originX,i.originY);return {main:i,fallback:{originX:r,originY:a}}}_getOverlayPosition(){let t=!this._dir||this._dir.value=="ltr",e=this.position,i;e=="above"?i={overlayX:"center",overlayY:"bottom"}:e=="below"?i={overlayX:"center",overlayY:"top"}:e=="before"||e=="left"&&t||e=="right"&&!t?i={overlayX:"end",overlayY:"center"}:(e=="after"||e=="right"&&t||e=="left"&&!t)&&(i={overlayX:"start",overlayY:"center"});let{x:r,y:a}=this._invertPosition(i.overlayX,i.overlayY);return {main:i,fallback:{overlayX:r,overlayY:a}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),NE(()=>{this._tooltipInstance&&this._overlayRef.updatePosition();},{injector:this._injector}));}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t instanceof Set?Array.from(t):t,this._tooltipInstance._markForCheck());}_invertPosition(t,e){return this.position==="above"||this.position==="below"?e==="top"?e="bottom":e==="bottom"&&(e="top"):t==="end"?t="start":t==="start"&&(t="end"),{x:t,y:e}}_updateCurrentPositionClass(t){let{overlayY:e,originX:i,originY:r}=t,a;if(e==="center"?this._dir&&this._dir.value==="rtl"?a=i==="end"?"left":"right":a=i==="start"?"left":"right":a=e==="bottom"&&r==="top"?"above":"below",a!==this._currentPosition){let A=this._overlayRef;if(A){let ut=`${this._cssClassPrefix}-${Ht}-`;A.removePanelClass(ut+this._currentPosition),A.addPanelClass(ut+a);}this._currentPosition=a;}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._eventCleanups.length||(this._isTouchPlatform()?this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._addListener("touchstart",t=>{let e=t.targetTouches?.[0],i=e?{x:e.clientX,y:e.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let r=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,i);},this._defaultOptions?.touchLongPressShowDelay??r);})):this._addListener("mouseenter",t=>{this._setupPointerExitEventsIfNeeded();let e;t.x!==void 0&&t.y!==void 0&&(e=t),this.show(void 0,e);}));}_setupPointerExitEventsIfNeeded(){if(!this._pointerExitEventsInitialized){if(this._pointerExitEventsInitialized=true,!this._isTouchPlatform())this._addListener("mouseleave",t=>{let e=t.relatedTarget;(!e||!this._overlayRef?.overlayElement.contains(e))&&this.hide();}),this._addListener("wheel",t=>{if(this._isTooltipVisible()){let e=this._document.elementFromPoint(t.clientX,t.clientY),i=this._elementRef.nativeElement;e!==i&&!i.contains(e)&&this.hide();}});else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let t=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay);};this._addListener("touchend",t),this._addListener("touchcancel",t);}}}_addListener(t,e){this._eventCleanups.push(this._renderer.listen(this._elementRef.nativeElement,t,e,Kt));}_isTouchPlatform(){let t=this._defaultOptions?.detectHoverCapability;return typeof t=="function"?!t():this._platform.IOS||this._platform.ANDROID?true:this._platform.isBrowser?!!t&&this._mediaMatcher.matchMedia("(any-hover: none)").matches:false}_disableNativeGesturesIfNecessary(){let t=this.touchGestures;if(t!=="off"){let e=this._elementRef.nativeElement,i=e.style;(t==="on"||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA")&&(i.userSelect=i.msUserSelect=i.webkitUserSelect=i.MozUserSelect="none"),(t==="on"||!e.draggable)&&(i.webkitUserDrag="none"),i.touchAction="none",i.webkitTapHighlightColor="transparent";}}_syncAriaDescription(t){this._ariaDescriptionPending||(this._ariaDescriptionPending=true,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,t,"tooltip"),this._isDestroyed||NE({write:()=>{this._ariaDescriptionPending=false,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip");}},{injector:this._injector}));}_overlayEventPredicate=t=>t.type==="keydown"?this._isTooltipVisible()&&t.keyCode===27&&!Ve$1(t):true;static \u0275fac=function(e){return new(e||n)};static \u0275dir=Ls({type:n,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(e,i){e&2&&Hg("mat-mdc-tooltip-disabled",i.disabled);},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]})}return n})(),Gt=(()=>{class n{_changeDetectorRef=g(Tl);_elementRef=g(Kt$1);_isMultiline=false;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled=K();_tooltip;_closeOnInteraction=false;_isVisible=false;_onHide=new ce$1;_showAnimation="mat-mdc-tooltip-show";_hideAnimation="mat-mdc-tooltip-hide";show(t){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(true),this._showTimeoutId=void 0;},t);}hide(t){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(false),this._hideTimeoutId=void 0;},t);}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null;}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0);}_markForCheck(){this._changeDetectorRef.markForCheck();}_handleMouseLeave({relatedTarget:t}){(!t||!this._triggerElement.contains(t))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(false));}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck();}_isTooltipMultiline(){let t=this._elementRef.nativeElement.getBoundingClientRect();return t.height>ee&&t.width>=ie}_handleAnimationEnd({animationName:t}){(t===this._showAnimation||t===this._hideAnimation)&&this._finalizeAnimation(t===this._showAnimation);}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0;}_finalizeAnimation(t){t?this._closeOnInteraction=true:this.isVisible()||this._onHide.next();}_toggleVisibility(t){let e=this._tooltip.nativeElement,i=this._showAnimation,r=this._hideAnimation;if(e.classList.remove(t?r:i),e.classList.add(t?i:r),this._isVisible!==t&&(this._isVisible=t,this._changeDetectorRef.markForCheck()),t&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let a=getComputedStyle(e);(a.getPropertyValue("animation-duration")==="0s"||a.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=true);}t&&this._onShow(),this._animationsDisabled&&(e.classList.add("_mat-animation-noopable"),this._finalizeAnimation(t));}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Rw({type:n,selectors:[["mat-tooltip-component"]],viewQuery:function(e,i){if(e&1&&Fg(Xt,7),e&2){let r;wC(r=CC())&&(i._tooltip=r.first);}},hostAttrs:["aria-hidden","true"],hostBindings:function(e,i){e&1&&Ag("mouseleave",function(a){return i._handleMouseLeave(a)});},decls:4,vars:5,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(e,i){e&1&&(hl(0,"div",1,0),Rg("animationend",function(a){return i._handleAnimationEnd(a)}),hl(2,"div",2),qC(3),gl()()),e&2&&(PC(i.tooltipClass),Hg("mdc-tooltip--multiline",i._isMultiline),JE(3),Zg(i.message));},styles:[`.mat-mdc-tooltip {
1
+ import {ct as vi,h as Fw,T as Tg,A as Ug,aL as Eo,aM as qn,bE as vt,aO as wt,cZ as fn,cT as Wp,c_ as he$1,cV as vg,bA as wC,m as ws,bB as CC,n as hl,b5 as sT,ad as Hg,q as oC,x as iC,t as nI,aW as w,bv as Fg,D as bC,H as SC,g,az as Kt$1,c$ as kn,bw as St,bG as p,aP as G,aR as Fs,aU as Ue,aV as U,a as Gi,an as ce$1,al as yt,ae as Ot,u as ue,d0 as Ia,bL as pe,bs as bl,ap as Hy,bu as Ve$1,c2 as RE,aA as an,C as Pg,bt as Qn,aS as K,cO as us,bN as F,bR as Sd,cL as Cd,bP as Qy,a9 as gC,o as Rg,ac as EC,bV as Xy,aN as Nn,bD as ge,aQ as $a,bM as mr,d1 as lt,d2 as wt$1,d3 as I,b_ as xt,bX as Pt,b as P,aZ as js,aw as gl,cJ as Og,Q as QC,ax as ml,b$ as BC,a8 as Yg,c3 as kt,cD as Ce,cz as Jr,aa as wf,ab as Cf}from'./main-LBRSRTYI.js';var Xt=["tooltip"],Ut=20;var qt=new w("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let n=g(pe);return ()=>kt(n,{scrollThrottle:Ut})}}),$t=new w("mat-tooltip-default-options",{providedIn:"root",factory:()=>({showDelay:0,hideDelay:0,touchendHideDelay:1500})});var Ht="tooltip-panel",Kt={passive:true},Jt=8,te=8,ee=24,ie=200,ne=(()=>{class n{_elementRef=g(Kt$1);_ngZone=g(G);_platform=g(p);_ariaDescriber=g($a);_focusMonitor=g(St);_dir=g(Qn);_injector=g(pe);_viewContainerRef=g(mr);_mediaMatcher=g(lt);_document=g(U);_renderer=g(Fs);_animationsDisabled=K();_defaultOptions=g($t,{optional:true});_overlayRef=null;_tooltipInstance=null;_overlayPanelClass;_portal;_position="below";_positionAtOrigin=false;_disabled=false;_tooltipClass;_viewInitialized=false;_pointerExitEventsInitialized=false;_tooltipComponent=Gt;_viewportMargin=8;_currentPosition;_cssClassPrefix="mat-mdc";_ariaDescriptionPending=false;_dirSubscribed=false;get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()));}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(t){this._positionAtOrigin=vi(t),this._detach(),this._overlayRef=null;}get disabled(){return this._disabled}set disabled(t){let e=vi(t);this._disabled!==e&&(this._disabled=e,e?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message));}get showDelay(){return this._showDelay}set showDelay(t){this._showDelay=fn(t);}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(t){this._hideDelay=fn(t),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay);}_hideDelay;touchGestures="auto";get message(){return this._message}set message(t){let e=this._message;this._message=t!=null?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(e);}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass);}_eventCleanups=[];_touchstartTimeout=null;_destroyed=new ce$1;_isDestroyed=false;constructor(){let t=this._defaultOptions;t&&(this._showDelay=t.showDelay,this._hideDelay=t.hideDelay,t.position&&(this.position=t.position),t.positionAtOrigin&&(this.positionAtOrigin=t.positionAtOrigin),t.touchGestures&&(this.touchGestures=t.touchGestures),t.tooltipClass&&(this.tooltipClass=t.tooltipClass)),this._viewportMargin=Jt;}ngAfterViewInit(){this._viewInitialized=true,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Hy(this._destroyed)).subscribe(t=>{t?t==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0));});}ngOnDestroy(){let t=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._eventCleanups.forEach(e=>e()),this._eventCleanups.length=0,this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=true,this._ariaDescriber.removeDescription(t,this.message,"tooltip"),this._focusMonitor.stopMonitoring(t);}show(t=this.showDelay,e){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let i=this._createOverlay(e);this._detach(),this._portal=this._portal||new wt$1(this._tooltipComponent,this._viewContainerRef);let r=this._tooltipInstance=i.attach(this._portal).instance;r._triggerElement=this._elementRef.nativeElement,r._mouseLeaveHideDelay=this._hideDelay,r.afterHidden().pipe(Hy(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),r.show(t);}hide(t=this.hideDelay){let e=this._tooltipInstance;e&&(e.isVisible()?e.hide(t):(e._cancelPendingAnimations(),this._detach()));}toggle(t){this._isTooltipVisible()?this.hide():this.show(void 0,t);}_isTooltipVisible(){return !!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(t){if(this._overlayRef){let a=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!t)&&a._origin instanceof Kt$1)return this._overlayRef;this._detach();}let e=this._injector.get(I).getAncestorScrollContainers(this._elementRef),i=`${this._cssClassPrefix}-${Ht}`,r=xt(this._injector,this.positionAtOrigin?t||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(false).withViewportMargin(this._viewportMargin).withScrollableContainers(e).withPopoverLocation("global");return r.positionChanges.pipe(Hy(this._destroyed)).subscribe(a=>{this._updateCurrentPositionClass(a.connectionPair),this._tooltipInstance&&a.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0));}),this._overlayRef=Pt(this._injector,{direction:this._dir,positionStrategy:r,panelClass:this._overlayPanelClass?[...this._overlayPanelClass,i]:i,scrollStrategy:this._injector.get(qt)(),disableAnimations:this._animationsDisabled,eventPredicate:this._overlayEventPredicate}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Hy(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Hy(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Hy(this._destroyed)).subscribe(a=>{a.preventDefault(),a.stopPropagation(),this._ngZone.run(()=>this.hide(0));}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._dirSubscribed||(this._dirSubscribed=true,this._dir.change.pipe(Hy(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef);})),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null;}_updatePosition(t){let e=t.getConfig().positionStrategy,i=this._getOrigin(),r=this._getOverlayPosition();e.withPositions([this._addOffset(P(P({},i.main),r.main)),this._addOffset(P(P({},i.fallback),r.fallback))]);}_addOffset(t){let e=te,i=!this._dir||this._dir.value=="ltr";return t.originY==="top"?t.offsetY=-e:t.originY==="bottom"?t.offsetY=e:t.originX==="start"?t.offsetX=i?-e:e:t.originX==="end"&&(t.offsetX=i?e:-e),t}_getOrigin(){let t=!this._dir||this._dir.value=="ltr",e=this.position,i;e=="above"||e=="below"?i={originX:"center",originY:e=="above"?"top":"bottom"}:e=="before"||e=="left"&&t||e=="right"&&!t?i={originX:"start",originY:"center"}:(e=="after"||e=="right"&&t||e=="left"&&!t)&&(i={originX:"end",originY:"center"});let{x:r,y:a}=this._invertPosition(i.originX,i.originY);return {main:i,fallback:{originX:r,originY:a}}}_getOverlayPosition(){let t=!this._dir||this._dir.value=="ltr",e=this.position,i;e=="above"?i={overlayX:"center",overlayY:"bottom"}:e=="below"?i={overlayX:"center",overlayY:"top"}:e=="before"||e=="left"&&t||e=="right"&&!t?i={overlayX:"end",overlayY:"center"}:(e=="after"||e=="right"&&t||e=="left"&&!t)&&(i={overlayX:"start",overlayY:"center"});let{x:r,y:a}=this._invertPosition(i.overlayX,i.overlayY);return {main:i,fallback:{overlayX:r,overlayY:a}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),RE(()=>{this._tooltipInstance&&this._overlayRef.updatePosition();},{injector:this._injector}));}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t instanceof Set?Array.from(t):t,this._tooltipInstance._markForCheck());}_invertPosition(t,e){return this.position==="above"||this.position==="below"?e==="top"?e="bottom":e==="bottom"&&(e="top"):t==="end"?t="start":t==="start"&&(t="end"),{x:t,y:e}}_updateCurrentPositionClass(t){let{overlayY:e,originX:i,originY:r}=t,a;if(e==="center"?this._dir&&this._dir.value==="rtl"?a=i==="end"?"left":"right":a=i==="start"?"left":"right":a=e==="bottom"&&r==="top"?"above":"below",a!==this._currentPosition){let A=this._overlayRef;if(A){let ut=`${this._cssClassPrefix}-${Ht}-`;A.removePanelClass(ut+this._currentPosition),A.addPanelClass(ut+a);}this._currentPosition=a;}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._eventCleanups.length||(this._isTouchPlatform()?this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._addListener("touchstart",t=>{let e=t.targetTouches?.[0],i=e?{x:e.clientX,y:e.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let r=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,i);},this._defaultOptions?.touchLongPressShowDelay??r);})):this._addListener("mouseenter",t=>{this._setupPointerExitEventsIfNeeded();let e;t.x!==void 0&&t.y!==void 0&&(e=t),this.show(void 0,e);}));}_setupPointerExitEventsIfNeeded(){if(!this._pointerExitEventsInitialized){if(this._pointerExitEventsInitialized=true,!this._isTouchPlatform())this._addListener("mouseleave",t=>{let e=t.relatedTarget;(!e||!this._overlayRef?.overlayElement.contains(e))&&this.hide();}),this._addListener("wheel",t=>{if(this._isTooltipVisible()){let e=this._document.elementFromPoint(t.clientX,t.clientY),i=this._elementRef.nativeElement;e!==i&&!i.contains(e)&&this.hide();}});else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let t=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay);};this._addListener("touchend",t),this._addListener("touchcancel",t);}}}_addListener(t,e){this._eventCleanups.push(this._renderer.listen(this._elementRef.nativeElement,t,e,Kt));}_isTouchPlatform(){let t=this._defaultOptions?.detectHoverCapability;return typeof t=="function"?!t():this._platform.IOS||this._platform.ANDROID?true:this._platform.isBrowser?!!t&&this._mediaMatcher.matchMedia("(any-hover: none)").matches:false}_disableNativeGesturesIfNecessary(){let t=this.touchGestures;if(t!=="off"){let e=this._elementRef.nativeElement,i=e.style;(t==="on"||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA")&&(i.userSelect=i.msUserSelect=i.webkitUserSelect=i.MozUserSelect="none"),(t==="on"||!e.draggable)&&(i.webkitUserDrag="none"),i.touchAction="none",i.webkitTapHighlightColor="transparent";}}_syncAriaDescription(t){this._ariaDescriptionPending||(this._ariaDescriptionPending=true,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,t,"tooltip"),this._isDestroyed||RE({write:()=>{this._ariaDescriptionPending=false,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip");}},{injector:this._injector}));}_overlayEventPredicate=t=>t.type==="keydown"?this._isTooltipVisible()&&t.keyCode===27&&!Ve$1(t):true;static \u0275fac=function(e){return new(e||n)};static \u0275dir=js({type:n,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(e,i){e&2&&Ug("mat-mdc-tooltip-disabled",i.disabled);},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]})}return n})(),Gt=(()=>{class n{_changeDetectorRef=g(bl);_elementRef=g(Kt$1);_isMultiline=false;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled=K();_tooltip;_closeOnInteraction=false;_isVisible=false;_onHide=new ce$1;_showAnimation="mat-mdc-tooltip-show";_hideAnimation="mat-mdc-tooltip-hide";show(t){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(true),this._showTimeoutId=void 0;},t);}hide(t){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(false),this._hideTimeoutId=void 0;},t);}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null;}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0);}_markForCheck(){this._changeDetectorRef.markForCheck();}_handleMouseLeave({relatedTarget:t}){(!t||!this._triggerElement.contains(t))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(false));}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck();}_isTooltipMultiline(){let t=this._elementRef.nativeElement.getBoundingClientRect();return t.height>ee&&t.width>=ie}_handleAnimationEnd({animationName:t}){(t===this._showAnimation||t===this._hideAnimation)&&this._finalizeAnimation(t===this._showAnimation);}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0;}_finalizeAnimation(t){t?this._closeOnInteraction=true:this.isVisible()||this._onHide.next();}_toggleVisibility(t){let e=this._tooltip.nativeElement,i=this._showAnimation,r=this._hideAnimation;if(e.classList.remove(t?r:i),e.classList.add(t?i:r),this._isVisible!==t&&(this._isVisible=t,this._changeDetectorRef.markForCheck()),t&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let a=getComputedStyle(e);(a.getPropertyValue("animation-duration")==="0s"||a.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=true);}t&&this._onShow(),this._animationsDisabled&&(e.classList.add("_mat-animation-noopable"),this._finalizeAnimation(t));}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Fw({type:n,selectors:[["mat-tooltip-component"]],viewQuery:function(e,i){if(e&1&&Pg(Xt,7),e&2){let r;bC(r=SC())&&(i._tooltip=r.first);}},hostAttrs:["aria-hidden","true"],hostBindings:function(e,i){e&1&&Rg("mouseleave",function(a){return i._handleMouseLeave(a)});},decls:4,vars:5,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(e,i){e&1&&(gl(0,"div",1,0),Og("animationend",function(a){return i._handleAnimationEnd(a)}),gl(2,"div",2),QC(3),ml()()),e&2&&(BC(i.tooltipClass),Ug("mdc-tooltip--multiline",i._isMultiline),nI(3),Yg(i.message));},styles:[`.mat-mdc-tooltip {
2
2
  position: relative;
3
3
  transform: scale(0);
4
4
  display: inline-flex;
@@ -103,7 +103,7 @@ import {ct as vi,h as Rw,C as Cg,H as Hg,aL as Eo,aM as qn,bE as vt,aO as wt,cZ
103
103
  .mat-mdc-tooltip-hide {
104
104
  animation: mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards;
105
105
  }
106
- `],encapsulation:2})}return n})();var Ve=(()=>{class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=Eo({type:n});static \u0275inj=qn({imports:[Nn,ge,wt,vt]})}return n})();var Ne=(()=>{class n{get vertical(){return this._vertical}set vertical(t){this._vertical=vi(t);}_vertical=false;get inset(){return this._inset}set inset(t){this._inset=vi(t);}_inset=false;static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Rw({type:n,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,i){e&2&&(Cg("aria-orientation",i.vertical?"vertical":"horizontal"),Hg("mat-divider-vertical",i.vertical)("mat-divider-horizontal",!i.vertical)("mat-divider-inset",i.inset));},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(e,i){},styles:[`.mat-divider {
106
+ `],encapsulation:2})}return n})();var Ve=(()=>{class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=Eo({type:n});static \u0275inj=qn({imports:[Nn,ge,wt,vt]})}return n})();var Ne=(()=>{class n{get vertical(){return this._vertical}set vertical(t){this._vertical=vi(t);}_vertical=false;get inset(){return this._inset}set inset(t){this._inset=vi(t);}_inset=false;static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Fw({type:n,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,i){e&2&&(Tg("aria-orientation",i.vertical?"vertical":"horizontal"),Ug("mat-divider-vertical",i.vertical)("mat-divider-horizontal",!i.vertical)("mat-divider-inset",i.inset));},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(e,i){},styles:[`.mat-divider {
107
107
  display: block;
108
108
  margin: 0;
109
109
  border-top-style: solid;
@@ -123,7 +123,7 @@ import {ct as vi,h as Rw,C as Cg,H as Hg,aL as Eo,aM as qn,bE as vt,aO as wt,cZ
123
123
  margin-left: auto;
124
124
  margin-right: 80px;
125
125
  }
126
- `],encapsulation:2})}return n})(),He=(()=>{class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=Eo({type:n});static \u0275inj=qn({imports:[wt]})}return n})();var re=["*"],Qe=(()=>{class n{labelPosition="after";static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Rw({type:n,selectors:[["","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(e,i){e&2&&Hg("mdc-form-field--align-end",i.labelPosition==="before");},inputs:{labelPosition:"labelPosition"},ngContentSelectors:re,decls:1,vars:0,template:function(e,i){e&1&&(DC(),EC(0));},styles:[`.mat-internal-form-field {
126
+ `],encapsulation:2})}return n})(),He=(()=>{class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=Eo({type:n});static \u0275inj=qn({imports:[wt]})}return n})();var re=["*"],Qe=(()=>{class n{labelPosition="after";static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Fw({type:n,selectors:[["","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(e,i){e&2&&Ug("mdc-form-field--align-end",i.labelPosition==="before");},inputs:{labelPosition:"labelPosition"},ngContentSelectors:re,decls:1,vars:0,template:function(e,i){e&1&&(wC(),CC(0));},styles:[`.mat-internal-form-field {
127
127
  -moz-osx-font-smoothing: grayscale;
128
128
  -webkit-font-smoothing: antialiased;
129
129
  display: inline-flex;
@@ -157,7 +157,7 @@ import {ct as vi,h as Rw,C as Cg,H as Hg,aL as Eo,aM as qn,bE as vt,aO as wt,cZ
157
157
  padding-left: 4px;
158
158
  padding-right: 0;
159
159
  }
160
- `],encapsulation:2})}return n})();var We=(()=>{class n{isErrorState(t,e){return !!(t&&t.invalid&&(t.touched||e&&e.submitted))}isSignalErrorState(t){if(!t)return false;let e=t().invalid(),i=t().touched();return e&&i}static \u0275fac=function(e){return new(e||n)};static \u0275prov=Ce({token:n,factory:n.\u0275fac})}return n})();var Qt=class{_defaultMatcher;_parentFormGroup;_parentForm;_stateChanges;errorState=false;matcher;ngControl;formField;constructor(m,t,e,i,r){this._defaultMatcher=m,this._parentFormGroup=e,this._parentForm=i,this._stateChanges=r,t?Jr(t.field)&&!t.updateValueAndValidity?(this.formField=t,this.ngControl=null):(this.formField=null,this.ngControl=t):this.ngControl=this.formField=null;}updateErrorState(){let m=this.errorState,t=this._getCurrentErrorState(this.matcher||this._defaultMatcher);t!==m&&(this.errorState=t,this._stateChanges.next());}_getCurrentErrorState(m){if(this.formField&&m?.isSignalErrorState)return m.isSignalErrorState(this.formField.field())??false;let t=this._parentFormGroup||this._parentForm,e=this.ngControl?this.ngControl.control:null;return m?.isErrorState(e,t)??false}};var et=["*"],oe=["content"],Wt=[[["mat-drawer"],["mat-sidenav"]],[["mat-drawer-content"],["mat-sidenav-content"]],"*"],Zt=["mat-drawer, mat-sidenav","mat-drawer-content, mat-sidenav-content","*"];function ae(n,m){if(n&1){let t=fC();Is(0,"div",1),Ag("click",function(){If(t);let i=yC();return wf(i._onBackdropClicked())}),pl();}if(n&2){let t=yC();Hg("mat-drawer-shown",t._isShowingBackdrop());}}function se(n,m){n&1&&(Is(0,"mat-drawer-content"),EC(1,2),pl());}function de(n,m){if(n&1){let t=fC();Is(0,"div",1),Ag("click",function(){If(t);let i=yC();return wf(i._onBackdropClicked())}),pl();}if(n&2){let t=yC();Hg("mat-drawer-shown",t._isShowingBackdrop());}}function le(n,m){n&1&&(Is(0,"mat-sidenav-content"),EC(1,2),pl());}var ce=`.mat-drawer-container {
160
+ `],encapsulation:2})}return n})();var We=(()=>{class n{isErrorState(t,e){return !!(t&&t.invalid&&(t.touched||e&&e.submitted))}isSignalErrorState(t){if(!t)return false;let e=t().invalid(),i=t().touched();return e&&i}static \u0275fac=function(e){return new(e||n)};static \u0275prov=Ce({token:n,factory:n.\u0275fac})}return n})();var Qt=class{_defaultMatcher;_parentFormGroup;_parentForm;_stateChanges;errorState=false;matcher;ngControl;formField;constructor(m,t,e,i,r){this._defaultMatcher=m,this._parentFormGroup=e,this._parentForm=i,this._stateChanges=r,t?Jr(t.field)&&!t.updateValueAndValidity?(this.formField=t,this.ngControl=null):(this.formField=null,this.ngControl=t):this.ngControl=this.formField=null;}updateErrorState(){let m=this.errorState,t=this._getCurrentErrorState(this.matcher||this._defaultMatcher);t!==m&&(this.errorState=t,this._stateChanges.next());}_getCurrentErrorState(m){if(this.formField&&m?.isSignalErrorState)return m.isSignalErrorState(this.formField.field())??false;let t=this._parentFormGroup||this._parentForm,e=this.ngControl?this.ngControl.control:null;return m?.isErrorState(e,t)??false}};var et=["*"],oe=["content"],Wt=[[["mat-drawer"],["mat-sidenav"]],[["mat-drawer-content"],["mat-sidenav-content"]],"*"],Zt=["mat-drawer, mat-sidenav","mat-drawer-content, mat-sidenav-content","*"];function ae(n,m){if(n&1){let t=gC();ws(0,"div",1),Rg("click",function(){wf(t);let i=EC();return Cf(i._onBackdropClicked())}),hl();}if(n&2){let t=EC();Ug("mat-drawer-shown",t._isShowingBackdrop());}}function se(n,m){n&1&&(ws(0,"mat-drawer-content"),CC(1,2),hl());}function de(n,m){if(n&1){let t=gC();ws(0,"div",1),Rg("click",function(){wf(t);let i=EC();return Cf(i._onBackdropClicked())}),hl();}if(n&2){let t=EC();Ug("mat-drawer-shown",t._isShowingBackdrop());}}function le(n,m){n&1&&(ws(0,"mat-sidenav-content"),CC(1,2),hl());}var ce=`.mat-drawer-container {
161
161
  position: relative;
162
162
  z-index: 1;
163
163
  color: var(--mat-sidenav-content-text-color, var(--mat-sys-on-background));
@@ -331,7 +331,7 @@ import {ct as vi,h as Rw,C as Cg,H as Hg,aL as Eo,aM as qn,bE as vt,aO as wt,cZ
331
331
  .mat-sidenav-fixed {
332
332
  position: fixed;
333
333
  }
334
- `;var he=new w("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:()=>false}),ft=new w("MAT_DRAWER_CONTAINER"),Z=(()=>{class n extends he$1{_platform=g(p);_changeDetectorRef=g(Tl);_element=g(Kt$1);_ngZone=g(G);_isInert=false;_container=g(pt);ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>this._changeDetectorRef.markForCheck());}_drawerToggled(t){t.opened?this._ngZone.runOutsideAngular(()=>{t._animationEnd.pipe(Ky(50),an(1)).subscribe(()=>this._updateInert());}):this._updateInert();}_drawerModeChanged(){this._updateInert();}_updateInert(){let t=this._container._isShowingBackdrop();if(t!==this._isInert){let e=this._element.nativeElement;this._isInert=t,t?e.setAttribute("inert","true"):e.removeAttribute("inert");}}_shouldBeHidden(){if(this._platform.isBrowser)return false;let{start:t,end:e}=this._container;return t!=null&&t.mode!=="over"&&t.opened||e!=null&&e.mode!=="over"&&e.opened}static \u0275fac=(()=>{let t;return function(i){return (t||(t=Gp(n)))(i||n)}})();static \u0275cmp=Rw({type:n,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:6,hostBindings:function(e,i){e&2&&(Vg("margin-left",i._container._contentMargins.left,"px")("margin-right",i._container._contentMargins.right,"px"),Hg("mat-drawer-content-hidden",i._shouldBeHidden()));},features:[rT([{provide:he$1,useExisting:n}]),yg],ngContentSelectors:et,decls:1,vars:0,template:function(e,i){e&1&&(DC(),EC(0));},encapsulation:2})}return n})(),mt=(()=>{class n{_elementRef=g(Kt$1);_focusTrapFactory=g(kn);_focusMonitor=g(St);_platform=g(p);_ngZone=g(G);_renderer=g(ks);_interactivityChecker=g(Ue);_doc=g(U);_container=g(ft,{optional:true});_focusTrap=null;_elementFocusedBeforeDrawerWasOpened=null;_eventCleanups;_isAttached=false;_anchor=null;get position(){return this._position}set position(t){t=t==="end"?"end":"start",t!==this._position&&(this._isAttached&&this._updatePositionInParent(t),this._position=t,this.onPositionChanged.emit());}_position="start";get mode(){return this._mode}set mode(t){this._mode=t,this._updateFocusTrapState(),this._modeChanged.next(),this._getContent()?._drawerModeChanged();}_mode="over";get disableClose(){return this._disableClose}set disableClose(t){this._disableClose=vi(t);}_disableClose=false;get autoFocus(){let t=this._autoFocus;return t??(this.mode==="side"?"dialog":"first-tabbable")}set autoFocus(t){(t==="true"||t==="false"||t==null)&&(t=vi(t)),this._autoFocus=t;}_autoFocus;get opened(){return this._opened()}set opened(t){this.toggle(vi(t));}_opened=zi(false);_openedVia=null;_animationStarted=new ce$1;_animationEnd=new ce$1;openedChange=new yt(true);_openedStream=this.openedChange.pipe(Ot(t=>t),ue(()=>{}));openedStart=this._animationStarted.pipe(Ot(()=>this.opened),Ea(void 0));_closedStream=this.openedChange.pipe(Ot(t=>!t),ue(()=>{}));closedStart=this._animationStarted.pipe(Ot(()=>!this.opened),Ea(void 0));_destroyed=new ce$1;onPositionChanged=new yt;_content;_modeChanged=new ce$1;_injector=g(pe);_changeDetectorRef=g(Tl);constructor(){this.openedChange.pipe(Vy(this._destroyed)).subscribe(t=>{t?(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement,this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus(this._openedVia||"program");}),this._eventCleanups=this._ngZone.runOutsideAngular(()=>{let t=this._renderer,e=this._elementRef.nativeElement;return [t.listen(e,"keydown",i=>{i.keyCode===27&&!this.disableClose&&!Ve$1(i)&&this._ngZone.run(()=>{this.close(),i.stopPropagation(),i.preventDefault();});}),t.listen(e,"transitionend",this._handleTransitionEvent),t.listen(e,"transitioncancel",this._handleTransitionEvent)]}),this._animationEnd.subscribe(()=>{this.openedChange.emit(this.opened);});}_focusByCssSelector(t,e){let i=this._elementRef.nativeElement.querySelector(t);i&&(this._interactivityChecker.isFocusable(i)||(i.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let r=()=>{a(),A(),i.removeAttribute("tabindex");},a=this._renderer.listen(i,"blur",r),A=this._renderer.listen(i,"mousedown",r);})),i.focus(e));}_takeFocus(){if(!this._focusTrap)return;let t=this._elementRef.nativeElement;switch(this.autoFocus){case false:case "dialog":return;case true:case "first-tabbable":NE(()=>{!this._focusTrap.focusInitialElement()&&typeof t.focus=="function"&&t.focus();},{injector:this._injector});break;case "first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this.autoFocus);break}}_restoreFocus(t){this.autoFocus!=="dialog"&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,t):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null);}_isFocusWithinDrawer(){let t=this._doc.activeElement;return !!t&&this._elementRef.nativeElement.contains(t)}ngAfterViewInit(){this._isAttached=true,this._position==="end"&&this._updatePositionInParent("end"),this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState());}ngOnDestroy(){this._eventCleanups.forEach(t=>t()),this._focusTrap?.destroy(),this._anchor?.remove(),this._anchor=null,this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete();}open(t){return this.toggle(true,t)}close(){return this.toggle(false)}_closeViaBackdropClick(){return this._setOpen(false,true,"mouse")}toggle(t=!this.opened,e){t&&e&&(this._openedVia=e);let i=this._setOpen(t,!t&&this._isFocusWithinDrawer(),this._openedVia||"program");return t||(this._openedVia=null),i}_setOpen(t,e,i){return t===this.opened?Promise.resolve(t?"open":"close"):(this._opened.set(t),this._getContent()?._drawerToggled(this),this._container?._transitionsEnabled?(this._setIsAnimating(true),setTimeout(()=>this._animationStarted.next())):setTimeout(()=>{this._animationStarted.next(),this._animationEnd.next();}),this._elementRef.nativeElement.classList.toggle("mat-drawer-opened",t),!t&&e&&this._restoreFocus(i),this._changeDetectorRef.markForCheck(),this._updateFocusTrapState(),new Promise(r=>{this.openedChange.pipe(an(1)).subscribe(a=>r(a?"open":"close"));}))}_getContent(){return this._container?._content||this._container?._userContent}_setIsAnimating(t){this._elementRef.nativeElement.classList.toggle("mat-drawer-animating",t);}_getWidth(){return this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=this.opened&&!!this._container?._isShowingBackdrop());}_updatePositionInParent(t){if(!this._platform.isBrowser)return;let e=this._elementRef.nativeElement,i=e.parentNode;t==="end"?(this._anchor||(this._anchor=this._doc.createComment("mat-drawer-anchor"),i.insertBefore(this._anchor,e)),i.appendChild(e)):this._anchor&&this._anchor.parentNode.insertBefore(e,this._anchor);}_handleTransitionEvent=t=>{let e=this._elementRef.nativeElement;t.target===e&&this._ngZone.run(()=>{t.type==="transitionend"&&this._setIsAnimating(false),this._animationEnd.next(t);});};static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Rw({type:n,selectors:[["mat-drawer"]],viewQuery:function(e,i){if(e&1&&Fg(oe,5),e&2){let r;wC(r=CC())&&(i._content=r.first);}},hostAttrs:[1,"mat-drawer"],hostVars:12,hostBindings:function(e,i){e&2&&(Cg("align",null)("tabIndex",i.mode!=="side"?"-1":null),Vg("visibility",!i._container&&!i.opened?"hidden":null),Hg("mat-drawer-end",i.position==="end")("mat-drawer-over",i.mode==="over")("mat-drawer-push",i.mode==="push")("mat-drawer-side",i.mode==="side"));},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],ngContentSelectors:et,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(e,i){e&1&&(DC(),Is(0,"div",1,0),EC(2),pl());},dependencies:[he$1],encapsulation:2})}return n})(),pt=(()=>{class n{_dir=g(Qn,{optional:true});_element=g(Kt$1);_ngZone=g(G);_changeDetectorRef=g(Tl);_animationDisabled=K();_transitionsEnabled=false;_allDrawers;_drawers=new cs;_content;_userContent;get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(t){this._autosize=vi(t);}_autosize=g(he);get hasBackdrop(){return this._drawerHasBackdrop(this._start)||this._drawerHasBackdrop(this._end)}set hasBackdrop(t){this._backdropOverride=t==null?null:vi(t);}_backdropOverride=null;backdropClick=new yt;_start=null;_end=null;_left=null;_right=null;_destroyed=new ce$1;_doCheckSubject=new ce$1;_contentMargins={left:null,right:null};_contentMarginChanges=new ce$1;get scrollable(){return this._userContent||this._content}_injector=g(pe);constructor(){let t=g(p),e=g(F);this._dir?.change.pipe(Vy(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins();}),e.change().pipe(Vy(this._destroyed)).subscribe(()=>this.updateContentMargins()),!this._animationDisabled&&t.isBrowser&&this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._element.nativeElement.classList.add("mat-drawer-transition"),this._transitionsEnabled=true;},200);});}ngAfterContentInit(){this._allDrawers.changes.pipe(Sd(this._allDrawers),Vy(this._destroyed)).subscribe(t=>{this._drawers.reset(t.filter(e=>!e._container||e._container===this)),this._drawers.notifyOnChanges();}),this._drawers.changes.pipe(Sd(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(t=>{this._watchDrawerToggle(t),this._watchDrawerPosition(t),this._watchDrawerMode(t);}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck();}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(wd(10),Vy(this._destroyed)).subscribe(()=>this.updateContentMargins());});}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete();}open(){this._drawers.forEach(t=>t.open());}close(){this._drawers.forEach(t=>t.close());}updateContentMargins(){let t=0,e=0;if(this._left&&this._left.opened){if(this._left.mode=="side")t+=this._left._getWidth();else if(this._left.mode=="push"){let i=this._left._getWidth();t+=i,e-=i;}}if(this._right&&this._right.opened){if(this._right.mode=="side")e+=this._right._getWidth();else if(this._right.mode=="push"){let i=this._right._getWidth();e+=i,t-=i;}}t=t||null,e=e||null,(t!==this._contentMargins.left||e!==this._contentMargins.right)&&(this._contentMargins={left:t,right:e},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)));}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next());}_watchDrawerToggle(t){t._animationStarted.pipe(Vy(this._drawers.changes)).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck();}),t.mode!=="side"&&t.openedChange.pipe(Vy(this._drawers.changes)).subscribe(()=>this._setContainerClass(t.opened));}_watchDrawerPosition(t){t.onPositionChanged.pipe(Vy(this._drawers.changes)).subscribe(()=>{NE({read:()=>this._validateDrawers()},{injector:this._injector});});}_watchDrawerMode(t){t._modeChanged.pipe(Vy(Yy(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck();});}_setContainerClass(t){let e=this._element.nativeElement.classList,i="mat-drawer-container-has-open";t?e.add(i):e.remove(i);}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(t=>{t.position=="end"?(this._end!=null,this._end=t):(this._start!=null,this._start=t);}),this._right=this._left=null,this._dir&&this._dir.value==="rtl"?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end);}_isPushed(){return this._isDrawerOpen(this._start)&&this._start.mode!="over"||this._isDrawerOpen(this._end)&&this._end.mode!="over"}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop();}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(t=>t&&!t.disableClose&&this._drawerHasBackdrop(t)).forEach(t=>t._closeViaBackdropClick());}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._drawerHasBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._drawerHasBackdrop(this._end)}_isDrawerOpen(t){return t!=null&&t.opened}_drawerHasBackdrop(t){return this._backdropOverride==null?!!t&&t.mode!=="side":this._backdropOverride}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Rw({type:n,selectors:[["mat-drawer-container"]],contentQueries:function(e,i,r){if(e&1&&kg(r,Z,5)(r,mt,5),e&2){let a;wC(a=CC())&&(i._content=a.first),wC(a=CC())&&(i._allDrawers=a);}},viewQuery:function(e,i){if(e&1&&Fg(Z,5),e&2){let r;wC(r=CC())&&(i._userContent=r.first);}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(e,i){e&2&&Hg("mat-drawer-container-explicit-backdrop",i._backdropOverride);},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],features:[rT([{provide:ft,useExisting:n}])],ngContentSelectors:Zt,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(e,i){e&1&&(DC(Wt),tC(0,ae,1,2,"div",0),EC(1),EC(2,1),tC(3,se,2,0,"mat-drawer-content")),e&2&&(nC(i.hasBackdrop?0:-1),JE(3),nC(i._content?-1:3));},dependencies:[Z],styles:[`.mat-drawer-container {
334
+ `;var he=new w("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:()=>false}),ft=new w("MAT_DRAWER_CONTAINER"),Z=(()=>{class n extends he$1{_platform=g(p);_changeDetectorRef=g(bl);_element=g(Kt$1);_ngZone=g(G);_isInert=false;_container=g(pt);ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>this._changeDetectorRef.markForCheck());}_drawerToggled(t){t.opened?this._ngZone.runOutsideAngular(()=>{t._animationEnd.pipe(Xy(50),an(1)).subscribe(()=>this._updateInert());}):this._updateInert();}_drawerModeChanged(){this._updateInert();}_updateInert(){let t=this._container._isShowingBackdrop();if(t!==this._isInert){let e=this._element.nativeElement;this._isInert=t,t?e.setAttribute("inert","true"):e.removeAttribute("inert");}}_shouldBeHidden(){if(this._platform.isBrowser)return false;let{start:t,end:e}=this._container;return t!=null&&t.mode!=="over"&&t.opened||e!=null&&e.mode!=="over"&&e.opened}static \u0275fac=(()=>{let t;return function(i){return (t||(t=Wp(n)))(i||n)}})();static \u0275cmp=Fw({type:n,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:6,hostBindings:function(e,i){e&2&&(Hg("margin-left",i._container._contentMargins.left,"px")("margin-right",i._container._contentMargins.right,"px"),Ug("mat-drawer-content-hidden",i._shouldBeHidden()));},features:[sT([{provide:he$1,useExisting:n}]),vg],ngContentSelectors:et,decls:1,vars:0,template:function(e,i){e&1&&(wC(),CC(0));},encapsulation:2})}return n})(),mt=(()=>{class n{_elementRef=g(Kt$1);_focusTrapFactory=g(kn);_focusMonitor=g(St);_platform=g(p);_ngZone=g(G);_renderer=g(Fs);_interactivityChecker=g(Ue);_doc=g(U);_container=g(ft,{optional:true});_focusTrap=null;_elementFocusedBeforeDrawerWasOpened=null;_eventCleanups;_isAttached=false;_anchor=null;get position(){return this._position}set position(t){t=t==="end"?"end":"start",t!==this._position&&(this._isAttached&&this._updatePositionInParent(t),this._position=t,this.onPositionChanged.emit());}_position="start";get mode(){return this._mode}set mode(t){this._mode=t,this._updateFocusTrapState(),this._modeChanged.next(),this._getContent()?._drawerModeChanged();}_mode="over";get disableClose(){return this._disableClose}set disableClose(t){this._disableClose=vi(t);}_disableClose=false;get autoFocus(){let t=this._autoFocus;return t??(this.mode==="side"?"dialog":"first-tabbable")}set autoFocus(t){(t==="true"||t==="false"||t==null)&&(t=vi(t)),this._autoFocus=t;}_autoFocus;get opened(){return this._opened()}set opened(t){this.toggle(vi(t));}_opened=Gi(false);_openedVia=null;_animationStarted=new ce$1;_animationEnd=new ce$1;openedChange=new yt(true);_openedStream=this.openedChange.pipe(Ot(t=>t),ue(()=>{}));openedStart=this._animationStarted.pipe(Ot(()=>this.opened),Ia(void 0));_closedStream=this.openedChange.pipe(Ot(t=>!t),ue(()=>{}));closedStart=this._animationStarted.pipe(Ot(()=>!this.opened),Ia(void 0));_destroyed=new ce$1;onPositionChanged=new yt;_content;_modeChanged=new ce$1;_injector=g(pe);_changeDetectorRef=g(bl);constructor(){this.openedChange.pipe(Hy(this._destroyed)).subscribe(t=>{t?(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement,this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus(this._openedVia||"program");}),this._eventCleanups=this._ngZone.runOutsideAngular(()=>{let t=this._renderer,e=this._elementRef.nativeElement;return [t.listen(e,"keydown",i=>{i.keyCode===27&&!this.disableClose&&!Ve$1(i)&&this._ngZone.run(()=>{this.close(),i.stopPropagation(),i.preventDefault();});}),t.listen(e,"transitionend",this._handleTransitionEvent),t.listen(e,"transitioncancel",this._handleTransitionEvent)]}),this._animationEnd.subscribe(()=>{this.openedChange.emit(this.opened);});}_focusByCssSelector(t,e){let i=this._elementRef.nativeElement.querySelector(t);i&&(this._interactivityChecker.isFocusable(i)||(i.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let r=()=>{a(),A(),i.removeAttribute("tabindex");},a=this._renderer.listen(i,"blur",r),A=this._renderer.listen(i,"mousedown",r);})),i.focus(e));}_takeFocus(){if(!this._focusTrap)return;let t=this._elementRef.nativeElement;switch(this.autoFocus){case false:case "dialog":return;case true:case "first-tabbable":RE(()=>{!this._focusTrap.focusInitialElement()&&typeof t.focus=="function"&&t.focus();},{injector:this._injector});break;case "first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this.autoFocus);break}}_restoreFocus(t){this.autoFocus!=="dialog"&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,t):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null);}_isFocusWithinDrawer(){let t=this._doc.activeElement;return !!t&&this._elementRef.nativeElement.contains(t)}ngAfterViewInit(){this._isAttached=true,this._position==="end"&&this._updatePositionInParent("end"),this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState());}ngOnDestroy(){this._eventCleanups.forEach(t=>t()),this._focusTrap?.destroy(),this._anchor?.remove(),this._anchor=null,this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete();}open(t){return this.toggle(true,t)}close(){return this.toggle(false)}_closeViaBackdropClick(){return this._setOpen(false,true,"mouse")}toggle(t=!this.opened,e){t&&e&&(this._openedVia=e);let i=this._setOpen(t,!t&&this._isFocusWithinDrawer(),this._openedVia||"program");return t||(this._openedVia=null),i}_setOpen(t,e,i){return t===this.opened?Promise.resolve(t?"open":"close"):(this._opened.set(t),this._getContent()?._drawerToggled(this),this._container?._transitionsEnabled?(this._setIsAnimating(true),setTimeout(()=>this._animationStarted.next())):setTimeout(()=>{this._animationStarted.next(),this._animationEnd.next();}),this._elementRef.nativeElement.classList.toggle("mat-drawer-opened",t),!t&&e&&this._restoreFocus(i),this._changeDetectorRef.markForCheck(),this._updateFocusTrapState(),new Promise(r=>{this.openedChange.pipe(an(1)).subscribe(a=>r(a?"open":"close"));}))}_getContent(){return this._container?._content||this._container?._userContent}_setIsAnimating(t){this._elementRef.nativeElement.classList.toggle("mat-drawer-animating",t);}_getWidth(){return this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=this.opened&&!!this._container?._isShowingBackdrop());}_updatePositionInParent(t){if(!this._platform.isBrowser)return;let e=this._elementRef.nativeElement,i=e.parentNode;t==="end"?(this._anchor||(this._anchor=this._doc.createComment("mat-drawer-anchor"),i.insertBefore(this._anchor,e)),i.appendChild(e)):this._anchor&&this._anchor.parentNode.insertBefore(e,this._anchor);}_handleTransitionEvent=t=>{let e=this._elementRef.nativeElement;t.target===e&&this._ngZone.run(()=>{t.type==="transitionend"&&this._setIsAnimating(false),this._animationEnd.next(t);});};static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Fw({type:n,selectors:[["mat-drawer"]],viewQuery:function(e,i){if(e&1&&Pg(oe,5),e&2){let r;bC(r=SC())&&(i._content=r.first);}},hostAttrs:[1,"mat-drawer"],hostVars:12,hostBindings:function(e,i){e&2&&(Tg("align",null)("tabIndex",i.mode!=="side"?"-1":null),Hg("visibility",!i._container&&!i.opened?"hidden":null),Ug("mat-drawer-end",i.position==="end")("mat-drawer-over",i.mode==="over")("mat-drawer-push",i.mode==="push")("mat-drawer-side",i.mode==="side"));},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],ngContentSelectors:et,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(e,i){e&1&&(wC(),ws(0,"div",1,0),CC(2),hl());},dependencies:[he$1],encapsulation:2})}return n})(),pt=(()=>{class n{_dir=g(Qn,{optional:true});_element=g(Kt$1);_ngZone=g(G);_changeDetectorRef=g(bl);_animationDisabled=K();_transitionsEnabled=false;_allDrawers;_drawers=new us;_content;_userContent;get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(t){this._autosize=vi(t);}_autosize=g(he);get hasBackdrop(){return this._drawerHasBackdrop(this._start)||this._drawerHasBackdrop(this._end)}set hasBackdrop(t){this._backdropOverride=t==null?null:vi(t);}_backdropOverride=null;backdropClick=new yt;_start=null;_end=null;_left=null;_right=null;_destroyed=new ce$1;_doCheckSubject=new ce$1;_contentMargins={left:null,right:null};_contentMarginChanges=new ce$1;get scrollable(){return this._userContent||this._content}_injector=g(pe);constructor(){let t=g(p),e=g(F);this._dir?.change.pipe(Hy(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins();}),e.change().pipe(Hy(this._destroyed)).subscribe(()=>this.updateContentMargins()),!this._animationDisabled&&t.isBrowser&&this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._element.nativeElement.classList.add("mat-drawer-transition"),this._transitionsEnabled=true;},200);});}ngAfterContentInit(){this._allDrawers.changes.pipe(Sd(this._allDrawers),Hy(this._destroyed)).subscribe(t=>{this._drawers.reset(t.filter(e=>!e._container||e._container===this)),this._drawers.notifyOnChanges();}),this._drawers.changes.pipe(Sd(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(t=>{this._watchDrawerToggle(t),this._watchDrawerPosition(t),this._watchDrawerMode(t);}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck();}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(Cd(10),Hy(this._destroyed)).subscribe(()=>this.updateContentMargins());});}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete();}open(){this._drawers.forEach(t=>t.open());}close(){this._drawers.forEach(t=>t.close());}updateContentMargins(){let t=0,e=0;if(this._left&&this._left.opened){if(this._left.mode=="side")t+=this._left._getWidth();else if(this._left.mode=="push"){let i=this._left._getWidth();t+=i,e-=i;}}if(this._right&&this._right.opened){if(this._right.mode=="side")e+=this._right._getWidth();else if(this._right.mode=="push"){let i=this._right._getWidth();e+=i,t-=i;}}t=t||null,e=e||null,(t!==this._contentMargins.left||e!==this._contentMargins.right)&&(this._contentMargins={left:t,right:e},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)));}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next());}_watchDrawerToggle(t){t._animationStarted.pipe(Hy(this._drawers.changes)).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck();}),t.mode!=="side"&&t.openedChange.pipe(Hy(this._drawers.changes)).subscribe(()=>this._setContainerClass(t.opened));}_watchDrawerPosition(t){t.onPositionChanged.pipe(Hy(this._drawers.changes)).subscribe(()=>{RE({read:()=>this._validateDrawers()},{injector:this._injector});});}_watchDrawerMode(t){t._modeChanged.pipe(Hy(Qy(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck();});}_setContainerClass(t){let e=this._element.nativeElement.classList,i="mat-drawer-container-has-open";t?e.add(i):e.remove(i);}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(t=>{t.position=="end"?(this._end!=null,this._end=t):(this._start!=null,this._start=t);}),this._right=this._left=null,this._dir&&this._dir.value==="rtl"?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end);}_isPushed(){return this._isDrawerOpen(this._start)&&this._start.mode!="over"||this._isDrawerOpen(this._end)&&this._end.mode!="over"}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop();}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(t=>t&&!t.disableClose&&this._drawerHasBackdrop(t)).forEach(t=>t._closeViaBackdropClick());}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._drawerHasBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._drawerHasBackdrop(this._end)}_isDrawerOpen(t){return t!=null&&t.opened}_drawerHasBackdrop(t){return this._backdropOverride==null?!!t&&t.mode!=="side":this._backdropOverride}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Fw({type:n,selectors:[["mat-drawer-container"]],contentQueries:function(e,i,r){if(e&1&&Fg(r,Z,5)(r,mt,5),e&2){let a;bC(a=SC())&&(i._content=a.first),bC(a=SC())&&(i._allDrawers=a);}},viewQuery:function(e,i){if(e&1&&Pg(Z,5),e&2){let r;bC(r=SC())&&(i._userContent=r.first);}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(e,i){e&2&&Ug("mat-drawer-container-explicit-backdrop",i._backdropOverride);},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],features:[sT([{provide:ft,useExisting:n}])],ngContentSelectors:Zt,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(e,i){e&1&&(wC(Wt),oC(0,ae,1,2,"div",0),CC(1),CC(2,1),oC(3,se,2,0,"mat-drawer-content")),e&2&&(iC(i.hasBackdrop?0:-1),nI(3),iC(i._content?-1:3));},dependencies:[Z],styles:[`.mat-drawer-container {
335
335
  position: relative;
336
336
  z-index: 1;
337
337
  color: var(--mat-sidenav-content-text-color, var(--mat-sys-on-background));
@@ -505,4 +505,4 @@ import {ct as vi,h as Rw,C as Cg,H as Hg,aL as Eo,aM as qn,bE as vt,aO as wt,cZ
505
505
  .mat-sidenav-fixed {
506
506
  position: fixed;
507
507
  }
508
- `],encapsulation:2})}return n})(),Yt=(()=>{class n extends Z{static \u0275fac=(()=>{let t;return function(i){return (t||(t=Gp(n)))(i||n)}})();static \u0275cmp=Rw({type:n,selectors:[["mat-sidenav-content"]],hostAttrs:[1,"mat-drawer-content","mat-sidenav-content"],features:[rT([{provide:he$1,useExisting:n},{provide:Z,useExisting:n}]),yg],ngContentSelectors:et,decls:1,vars:0,template:function(e,i){e&1&&(DC(),EC(0));},encapsulation:2})}return n})(),me=(()=>{class n extends mt{get fixedInViewport(){return this._fixedInViewport}set fixedInViewport(t){this._fixedInViewport=vi(t);}_fixedInViewport=false;get fixedTopGap(){return this._fixedTopGap}set fixedTopGap(t){this._fixedTopGap=fn(t);}_fixedTopGap=0;get fixedBottomGap(){return this._fixedBottomGap}set fixedBottomGap(t){this._fixedBottomGap=fn(t);}_fixedBottomGap=0;static \u0275fac=(()=>{let t;return function(i){return (t||(t=Gp(n)))(i||n)}})();static \u0275cmp=Rw({type:n,selectors:[["mat-sidenav"]],hostAttrs:[1,"mat-drawer","mat-sidenav"],hostVars:16,hostBindings:function(e,i){e&2&&(Cg("tabIndex",i.mode!=="side"?"-1":null)("align",null),Vg("top",i.fixedInViewport?i.fixedTopGap:null,"px")("bottom",i.fixedInViewport?i.fixedBottomGap:null,"px"),Hg("mat-drawer-end",i.position==="end")("mat-drawer-over",i.mode==="over")("mat-drawer-push",i.mode==="push")("mat-drawer-side",i.mode==="side")("mat-sidenav-fixed",i.fixedInViewport));},inputs:{fixedInViewport:"fixedInViewport",fixedTopGap:"fixedTopGap",fixedBottomGap:"fixedBottomGap"},exportAs:["matSidenav"],features:[rT([{provide:mt,useExisting:n}]),yg],ngContentSelectors:et,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(e,i){e&1&&(DC(),Is(0,"div",1,0),EC(2),pl());},dependencies:[he$1],encapsulation:2})}return n})(),fi=(()=>{class n extends pt{_allDrawers=void 0;_content=void 0;static \u0275fac=(()=>{let t;return function(i){return (t||(t=Gp(n)))(i||n)}})();static \u0275cmp=Rw({type:n,selectors:[["mat-sidenav-container"]],contentQueries:function(e,i,r){if(e&1&&kg(r,Yt,5)(r,me,5),e&2){let a;wC(a=CC())&&(i._content=a.first),wC(a=CC())&&(i._allDrawers=a);}},hostAttrs:[1,"mat-drawer-container","mat-sidenav-container"],hostVars:2,hostBindings:function(e,i){e&2&&Hg("mat-drawer-container-explicit-backdrop",i._backdropOverride);},exportAs:["matSidenavContainer"],features:[rT([{provide:ft,useExisting:n},{provide:pt,useExisting:n}]),yg],ngContentSelectors:Zt,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(e,i){e&1&&(DC(Wt),tC(0,de,1,2,"div",0),EC(1),EC(2,1),tC(3,le,2,0,"mat-sidenav-content")),e&2&&(nC(i.hasBackdrop?0:-1),JE(3),nC(i._content?-1:3));},dependencies:[Yt],styles:[ce],encapsulation:2})}return n})(),ui=(()=>{class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=Eo({type:n});static \u0275inj=qn({imports:[vt,wt,vt]})}return n})();export{He as H,Ne as N,Qt as Q,Ve as V,We as W,Yt as Y,Z,me as a,Qe as b,fi as f,mt as m,ne as n,pt as p,ui as u};
508
+ `],encapsulation:2})}return n})(),Yt=(()=>{class n extends Z{static \u0275fac=(()=>{let t;return function(i){return (t||(t=Wp(n)))(i||n)}})();static \u0275cmp=Fw({type:n,selectors:[["mat-sidenav-content"]],hostAttrs:[1,"mat-drawer-content","mat-sidenav-content"],features:[sT([{provide:he$1,useExisting:n},{provide:Z,useExisting:n}]),vg],ngContentSelectors:et,decls:1,vars:0,template:function(e,i){e&1&&(wC(),CC(0));},encapsulation:2})}return n})(),me=(()=>{class n extends mt{get fixedInViewport(){return this._fixedInViewport}set fixedInViewport(t){this._fixedInViewport=vi(t);}_fixedInViewport=false;get fixedTopGap(){return this._fixedTopGap}set fixedTopGap(t){this._fixedTopGap=fn(t);}_fixedTopGap=0;get fixedBottomGap(){return this._fixedBottomGap}set fixedBottomGap(t){this._fixedBottomGap=fn(t);}_fixedBottomGap=0;static \u0275fac=(()=>{let t;return function(i){return (t||(t=Wp(n)))(i||n)}})();static \u0275cmp=Fw({type:n,selectors:[["mat-sidenav"]],hostAttrs:[1,"mat-drawer","mat-sidenav"],hostVars:16,hostBindings:function(e,i){e&2&&(Tg("tabIndex",i.mode!=="side"?"-1":null)("align",null),Hg("top",i.fixedInViewport?i.fixedTopGap:null,"px")("bottom",i.fixedInViewport?i.fixedBottomGap:null,"px"),Ug("mat-drawer-end",i.position==="end")("mat-drawer-over",i.mode==="over")("mat-drawer-push",i.mode==="push")("mat-drawer-side",i.mode==="side")("mat-sidenav-fixed",i.fixedInViewport));},inputs:{fixedInViewport:"fixedInViewport",fixedTopGap:"fixedTopGap",fixedBottomGap:"fixedBottomGap"},exportAs:["matSidenav"],features:[sT([{provide:mt,useExisting:n}]),vg],ngContentSelectors:et,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(e,i){e&1&&(wC(),ws(0,"div",1,0),CC(2),hl());},dependencies:[he$1],encapsulation:2})}return n})(),fi=(()=>{class n extends pt{_allDrawers=void 0;_content=void 0;static \u0275fac=(()=>{let t;return function(i){return (t||(t=Wp(n)))(i||n)}})();static \u0275cmp=Fw({type:n,selectors:[["mat-sidenav-container"]],contentQueries:function(e,i,r){if(e&1&&Fg(r,Yt,5)(r,me,5),e&2){let a;bC(a=SC())&&(i._content=a.first),bC(a=SC())&&(i._allDrawers=a);}},hostAttrs:[1,"mat-drawer-container","mat-sidenav-container"],hostVars:2,hostBindings:function(e,i){e&2&&Ug("mat-drawer-container-explicit-backdrop",i._backdropOverride);},exportAs:["matSidenavContainer"],features:[sT([{provide:ft,useExisting:n},{provide:pt,useExisting:n}]),vg],ngContentSelectors:Zt,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(e,i){e&1&&(wC(Wt),oC(0,de,1,2,"div",0),CC(1),CC(2,1),oC(3,le,2,0,"mat-sidenav-content")),e&2&&(iC(i.hasBackdrop?0:-1),nI(3),iC(i._content?-1:3));},dependencies:[Yt],styles:[ce],encapsulation:2})}return n})(),ui=(()=>{class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=Eo({type:n});static \u0275inj=qn({imports:[vt,wt,vt]})}return n})();export{He as H,Ne as N,Qt as Q,Ve as V,We as W,Yt as Y,Z,me as a,Qe as b,fi as f,mt as m,ne as n,pt as p,ui as u};