@veltdev/sdk-staging 6.0.12 → 6.0.13

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 (75) hide show
  1. package/app/models/data/config.data.model.d.ts +18 -0
  2. package/app/models/data/user.data.model.d.ts +13 -0
  3. package/{chunk-5QRNDPMH.js → chunk-2LJHR77K.js} +1 -1
  4. package/chunk-4BAHMWIE.js +2 -0
  5. package/{chunk-7WO33FST.js → chunk-4VEJIKFU.js} +1 -1
  6. package/{chunk-JNSX6ALY.js → chunk-4YEJYNMX.js} +1 -1
  7. package/chunk-5XJDGVGO.js +1 -0
  8. package/chunk-6YGRELTV.js +2 -0
  9. package/{chunk-MJ2UHGNE.js → chunk-7TNGPXR5.js} +1 -1
  10. package/{chunk-LAPY2IGZ.js → chunk-A4HLP4VU.js} +1 -1
  11. package/{chunk-SGVDVSBF.js → chunk-A6I23DJF.js} +1 -1
  12. package/chunk-DAUJEOMM.js +193 -0
  13. package/{chunk-4RMON7GG.js → chunk-DZYVUUMS.js} +1 -1
  14. package/{chunk-FDTMKWPR.js → chunk-EMCGVIKG.js} +2 -2
  15. package/chunk-GHWFNVK2.js +1 -0
  16. package/chunk-IEOSSENF.js +1 -0
  17. package/chunk-IKXUU4LK.js +1 -0
  18. package/chunk-IQIWMWKJ.js +1 -0
  19. package/chunk-KJN6PDWN.js +93 -0
  20. package/chunk-KKKGHIG4.js +1 -0
  21. package/{chunk-2TTZAEAX.js → chunk-LOLURD74.js} +1 -1
  22. package/chunk-MUMFBRNH.js +2 -0
  23. package/{chunk-BVT5OSMI.js → chunk-NFQ33NZA.js} +1 -1
  24. package/{chunk-UW45SPLT.js → chunk-NYRQTKJA.js} +1 -1
  25. package/{chunk-MUYDAXFY.js → chunk-Q2XHYKCH.js} +1 -1
  26. package/chunk-RSCWN2VG.js +1 -0
  27. package/chunk-STNBRDN3.js +1 -0
  28. package/chunk-SYWOQU23.js +174 -0
  29. package/{chunk-WASG3GA7.js → chunk-SZUD6M7J.js} +2 -2
  30. package/chunk-TE4S24VF.js +2 -0
  31. package/chunk-TG2UOHTU.js +1 -0
  32. package/chunk-UY5BYX47.js +1 -0
  33. package/chunk-V32SISMC.js +1 -0
  34. package/{chunk-KTSX5UPA.js → chunk-XXU7YXMF.js} +1 -1
  35. package/{chunk-S5R4NUEK.js → chunk-YTVKKNRL.js} +1 -1
  36. package/{chunk-UI5F5IQU.js → chunk-ZUQTUSHK.js} +1 -1
  37. package/package.json +1 -1
  38. package/velt-activity-log.js +1 -1
  39. package/velt-area.js +1 -1
  40. package/velt-arrow.js +1 -1
  41. package/velt-comment.js +6 -6
  42. package/velt-crdt.js +1 -1
  43. package/velt-cursor.js +1 -1
  44. package/velt-huddle.js +1 -1
  45. package/velt-live-state-sync.js +1 -1
  46. package/velt-notification.js +1 -1
  47. package/velt-portable.js +1 -0
  48. package/velt-presence.js +1 -1
  49. package/velt-reaction.js +1 -1
  50. package/velt-recorder.js +1 -1
  51. package/velt-rewriter.js +1 -1
  52. package/velt-selection.js +1 -1
  53. package/velt-tag.js +1 -1
  54. package/velt-user-invite.js +1 -1
  55. package/velt-user-request.js +1 -1
  56. package/velt-video-player.js +1 -1
  57. package/velt-views.js +3 -3
  58. package/velt.js +2 -2
  59. package/chunk-3KTIE7HV.js +0 -2
  60. package/chunk-3T4C47NJ.js +0 -1
  61. package/chunk-6IT34HSZ.js +0 -1
  62. package/chunk-6YWJCXYF.js +0 -1
  63. package/chunk-A4JS2VN5.js +0 -1
  64. package/chunk-BONBMEV3.js +0 -1
  65. package/chunk-ELF6PPR2.js +0 -2
  66. package/chunk-FC5NQAL4.js +0 -2
  67. package/chunk-JWWUK2VE.js +0 -1
  68. package/chunk-KQMIVRAC.js +0 -1
  69. package/chunk-L7ZARA4D.js +0 -193
  70. package/chunk-NSNHSRHX.js +0 -1
  71. package/chunk-O7XCI74W.js +0 -1
  72. package/chunk-ORPUXE2Y.js +0 -93
  73. package/chunk-QT7Z7KCA.js +0 -1
  74. package/chunk-UKSG7LZP.js +0 -2
  75. package/chunk-Z3CHFM5M.js +0 -167
package/chunk-A4JS2VN5.js DELETED
@@ -1 +0,0 @@
1
- import{a as At,b as Oe}from"./chunk-O7XCI74W.js";import{b as Ie}from"./chunk-3KTIE7HV.js";import{ca as xt,da as _,ea as Ht,fa as lt,ga as ke}from"./chunk-WASG3GA7.js";import{$ as nt,Aa as Bt,Bc as pe,Bh as Ce,Ca as Lt,Cf as he,Ee as ge,Fa as g,Ib as H,Ii as ye,Kb as wt,L as ie,La as zt,Nb as N,Ob as Ct,Pa as O,Pb as X,Qb as Gt,Ra as $t,T as gt,U as ae,Ua as P,Wa as Vt,Xh as ut,Ya as j,Yh as _e,_a as p,_b as F,a as m,ac as Ft,b as f,ba as le,bb as se,bc as R,be as Zt,c as re,ca as G,cc as D,da as Q,db as A,dc as rt,ec as _t,fa as ce,fb as w,fc as z,g as pt,gb as T,gc as de,ha as yt,hc as me,ia as kt,ja as dt,k as It,kc as B,l as Nt,la as mt,lb as d,lc as L,li as Tt,mb as S,nb as I,ni as U,ob as Y,oi as be,p as St,pa as ot,pc as W,qa as M,qh as at,rf as ue,sb as y,sc as it,tb as k,tc as bt,th as fe,ti as xe,ub as $,vb as Ot,vc as Xt,vi as Se,w as Ut,wa as tt,wi as Et,xb as Dt,xc as ve,zb as l}from"./chunk-Z3CHFM5M.js";var De=(()=>{let r=class r{constructor(t){this.loggingService=t,this.autocompleteDataMap$=new Nt({}),this.onAutocompleteChipClick$=new It;try{this.loggingService.log("%c[WB] Creating CLASS: AutocompleteService","color: blue;"),this.create({hotkey:"@",type:"contact",data:[]})}catch(e){this.loggingService.catch("Error in AutocompleteService constructor: ",e)}}create(t){try{if(this.loggingService.log("%c[WB] Calling AutocompleteService FUNCTION: create","color: green;"),t?.hotkey){let e=this.autocompleteDataMap$.value;e[t.hotkey]=t,this.autocompleteDataMap$.next(e)}}catch(e){this.loggingService.catch("Error in AutocompleteService create: ",e)}}remove(t){try{this.loggingService.log("%c[WB] Calling AutocompleteService FUNCTION: remove","color: green;");let e=this.autocompleteDataMap$.value;delete e[t],this.autocompleteDataMap$.next(e)}catch(e){this.loggingService.catch("Error in AutocompleteService remove: ",e)}}getAutocompleteDataMap$(){return this.autocompleteDataMap$.asObservable()}getAutocompleteDataMap(){return this.autocompleteDataMap$.value}setOnAutocompleteChipClick(t){this.onAutocompleteChipClick$.next(t)}getOnAutocompleteChipClick$(){return this.onAutocompleteChipClick$.asObservable()}};r.\u0275fac=function(e){return new(e||r)(G(U))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var we=(()=>{let r=class r{constructor(t,e,i,a){this.docService=t,this.loggingService=e,this.authService=i,this.configService=a;try{this.loggingService.log("%c[WB] Creating CLASS: MetadataService","color: blue;")}catch(c){this.loggingService.catch("Error in MetadataService constructor: ",c)}}getGlobalMetadata(){return pt(this,null,function*(){try{let t=this.authService.getUser();if(!t)return this.loggingService.catch("User not found. Ensure Identify method is called.",void 0,void 0,!0),{};let e=this.docService.getOrganizationMetadata(t?.organizationId),i=this.docService.getDocumentMetadataOfAvailableDocuments(),a=this.docService.getLocation();e&&(e=JSON.parse(JSON.stringify(e)),delete e?.organizationId,e.organizationId=e?.clientOrganizationId,delete e?.clientOrganizationId,delete e?.pageInfo),i&&(i=JSON.parse(JSON.stringify(i)),i.forEach(h=>{delete h?.locations,delete h?.location,delete h?.locationId,delete h?.pageInfo,delete h?.documentId,h.documentId=h?.clientDocumentId,delete h?.clientDocumentId,delete h?.veltFolderId,h?.clientOrganizationId&&(h.organizationId=h?.clientOrganizationId,delete h?.clientOrganizationId)}));let c=[];a&&(a=JSON.parse(JSON.stringify(a)),a?.location&&c.push(a?.location));let v=this.docService.getLocations();v&&Object.values(v).forEach(h=>{h?.location&&c.push(h?.location)});let s=this.docService.getDocumentPaths()?.folderId;return{organization:e,documents:i,locations:c,folderId:s}}catch(t){return this.loggingService.catch("Error in MetadataService getGlobalMetadata: ",t),{}}})}getDebugInfo(){return pt(this,null,function*(){try{let t=this.authService.getUser();if(!t)return null;let e,i;t&&(e=Ce(t)??void 0,i=JSON.parse(JSON.stringify(t)),delete i?.contacts);let a=this.configService.getApiKey(),c=window?.Velt?.version,v=this.docService.getOrganizationMetadata(t?.organizationId),s,u;v&&(s=JSON.parse(JSON.stringify(v)),delete s?.organizationId,s.organizationId=s?.clientOrganizationId,delete s?.clientOrganizationId,delete s?.pageInfo,delete s?.apiKey,u=JSON.parse(JSON.stringify(v)),delete u?.clientOrganizationId,delete u?.pageInfo,delete u?.apiKey);let h=this.docService.getDocumentMetadataOfAvailableDocuments(),E=this.docService.getLocation(),x=[],b=[];E&&(x.push(E),E?.location&&b.push(E?.location));let C=this.docService.getLocations();C&&Object.values(C).forEach(V=>{x.push(V),V?.location&&b.push(V?.location)});let K=[],Z=[];h&&(K=JSON.parse(JSON.stringify(h)),K.forEach(V=>{delete V?.apiKey,delete V?.locations,delete V?.location,delete V?.locationId,delete V?.pageInfo,delete V?.documentId,V.documentId=V?.clientDocumentId,delete V?.clientDocumentId,delete V?.veltFolderId,V?.clientOrganizationId&&(V.organizationId=V?.clientOrganizationId,delete V?.clientOrganizationId)}),Z=JSON.parse(JSON.stringify(h)),Z.forEach(V=>{delete V?.apiKey,delete V?.locations,delete V?.location,delete V?.locationId,delete V?.pageInfo,delete V?.clientDocumentId,V.folderId=V?.veltFolderId,delete V?.veltFolderId,delete V?.clientOrganizationId}));let st,jt=this.docService.getDocumentPaths();jt?.folderId&&jt?.veltFolderId&&(st={folderId:jt?.folderId,veltFolderId:jt?.veltFolderId});let Yt,Mt;st&&(Yt=JSON.parse(JSON.stringify(st)),delete Yt?.veltFolderId,Mt=JSON.parse(JSON.stringify(st)),Mt.folderId=Mt.veltFolderId,delete Mt?.veltFolderId);let Pt={};return Pt.veltVersion=c,Pt.apiKey=a,Pt.serverMap={organization:u??void 0,documents:Z,locations:x??void 0,folder:Mt??void 0,user:i??void 0,accessFields:this.docService.getProcessedDocContext()??void 0},Pt.clientMap={organization:s??void 0,documents:K,locations:b??void 0,folder:Yt??void 0,user:e??void 0,context:this.docService.getDocContext()??void 0},Pt}catch(t){return this.loggingService.catch("Error in MetadataService getDebugInfo: ",t),null}})}getDebugInfo$(){return Ut([this.authService.getUser$(),this.docService.getOrganizationConfig$(),this.docService.getOrganizationMetadataMap$(),this.docService.getAllDocumentMetadataMap$(),this.docService.getDocContext$()]).pipe(gt(()=>pt(this,null,function*(){return yield this.getDebugInfo()})),ie(fe))}};r.\u0275fac=function(e){return new(e||r)(G(ye),G(U),G(Et),G(be))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var vt=class{constructor(){this.isGroupHeader=!1,this.isGroupMember=!1,this.isNewContact=!1,this.disabled=!1}},Rt=class{constructor(){this.appState={user:null,darkMode:!1},this.featureState={customAutocompleteSearch:!1,expandMentionGroups:!1,showMentionGroupsFirst:!1,showMentionGroupsOnly:!1,customGroupsEnabled:!1,paginatedContactList:!1,atHereEnabled:!1,showAtHere:!1},this.data={userContacts:[],organizationGroups:[],userDocumentContacts:[],flattenedItems:[],hereUserContact:{name:"here",email:"",userId:"here",visibility:"here"},atHereDescription:null,autocompleteDataMap:{},selectedAutocompleteData:void 0,newUserContact:void 0,newUserContactError:void 0},this.uiState={variant:void 0,autoCompleteScrollConfig:{itemSize:55,minBufferPx:350,maxBufferPx:600,templateCacheSize:350}},this.trackByFlattenedItem=(r,o)=>{try{return o?.id||r.toString()}catch{return r.toString()}},this.onOptionClick=()=>{}}};function qt(){return{panelOpen:!1,filterText:"",highlightedIndex:-1,autocompleteDisabledPositions:new Set,darkMode:!1,variant:void 0}}var Te=new le("AutocompleteLocalUIStateSignal");var Wt=(()=>{let r=class r{constructor(t,e,i,a,c,v){this.authService=t,this.contactService=e,this.autocompleteService=i,this.serviceBook=a,this.themeService=c,this.loggingService=v,this.contextMap=new Map,this.registryMap=new Map,this.serviceSubscriptions=[],this.currentUser=null,this.currentDarkMode=!1,this.currentUserContacts=[],this.currentOrganizationGroups=[],this.currentUserDocumentContacts=[],this.currentAutocompleteDataMap={},this.currentAtHereEnabled=!1,this.currentAtHereLabel="here",this.currentAtHereDescription=null,this.currentCustomAutocompleteSearch=!1,this.currentExpandMentionGroups=!1,this.currentShowMentionGroupsFirst=!1,this.currentShowMentionGroupsOnly=!1,this.currentPaginatedContactList=!1,this.currentAutoCompleteScrollConfig={itemSize:55,minBufferPx:350,maxBufferPx:600,templateCacheSize:350},this.setupSubscriptions()}setupSubscriptions(){try{this.serviceSubscriptions.push(this.authService.getUser$().subscribe(t=>{t&&(this.currentUser=t,this.updateAllContexts(e=>f(m({},e),{appState:f(m({},e.appState),{user:t})})))})),this.serviceSubscriptions.push(this.themeService.getDarkMode$().subscribe(t=>{this.currentDarkMode=t,this.updateAllContexts(e=>f(m({},e),{appState:f(m({},e.appState),{darkMode:t})}))})),this.serviceSubscriptions.push(this.contactService.getUserContacts$().subscribe(t=>{this.currentUserContacts=t?.slice()||[],this.updateAllContexts(e=>f(m({},e),{data:f(m({},e.data),{userContacts:this.buildUserContactsWithHere(this.currentUserContacts)})}))})),this.serviceSubscriptions.push(this.contactService.getOrganizationGroups$().subscribe(t=>{this.currentOrganizationGroups=t||[],this.updateAllContexts(e=>f(m({},e),{data:f(m({},e.data),{organizationGroups:this.currentOrganizationGroups})}))})),this.serviceSubscriptions.push(this.contactService.getUserDocumentContacts$().subscribe(t=>{this.currentUserDocumentContacts=t||[],this.updateAllContexts(e=>f(m({},e),{data:f(m({},e.data),{userDocumentContacts:this.currentUserDocumentContacts})}))})),this.serviceSubscriptions.push(this.autocompleteService.getAutocompleteDataMap$().subscribe(t=>{this.currentAutocompleteDataMap=t||{},this.updateAllContexts(e=>f(m({},e),{data:f(m({},e.data),{autocompleteDataMap:this.currentAutocompleteDataMap})}))})),this.serviceSubscriptions.push(this.contactService.getAtHereEnabled$().subscribe(t=>{this.currentAtHereEnabled=t,this.updateAllContexts(e=>f(m({},e),{featureState:f(m({},e.featureState),{atHereEnabled:t}),data:f(m({},e.data),{userContacts:this.buildUserContactsWithHere(this.currentUserContacts)})}))})),this.serviceSubscriptions.push(this.contactService.getAtHereLabel().subscribe(t=>{this.currentAtHereLabel=t,this.updateAllContexts(e=>f(m({},e),{data:f(m({},e.data),{hereUserContact:f(m({},e.data.hereUserContact),{name:t})})}))})),this.serviceSubscriptions.push(this.contactService.getAtHereDescription().subscribe(t=>{this.currentAtHereDescription=t,this.updateAllContexts(e=>f(m({},e),{data:f(m({},e.data),{atHereDescription:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getCustomAutocompleteSearch$():St)).subscribe(t=>{this.currentCustomAutocompleteSearch=t,this.updateAllContexts(e=>f(m({},e),{featureState:f(m({},e.featureState),{customAutocompleteSearch:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getExpandMentionGroups$():St)).subscribe(t=>{this.currentExpandMentionGroups=t,this.updateAllContexts(e=>f(m({},e),{featureState:f(m({},e.featureState),{expandMentionGroups:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getShowMentionGroupsFirst$():St)).subscribe(t=>{this.currentShowMentionGroupsFirst=t,this.updateAllContexts(e=>f(m({},e),{featureState:f(m({},e.featureState),{showMentionGroupsFirst:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getShowMentionGroupsOnly$():St)).subscribe(t=>{this.currentShowMentionGroupsOnly=t,this.updateAllContexts(e=>f(m({},e),{featureState:f(m({},e.featureState),{showMentionGroupsOnly:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getPaginatedContactList$():St)).subscribe(t=>{this.currentPaginatedContactList=t,this.updateAllContexts(e=>f(m({},e),{featureState:f(m({},e.featureState),{paginatedContactList:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getAutoCompleteScrollConfig$():St)).subscribe(t=>{this.currentAutoCompleteScrollConfig=t,this.updateAllContexts(e=>f(m({},e),{uiState:f(m({},e.uiState),{autoCompleteScrollConfig:t})}))}))}catch(t){this.loggingService.catch("Error in AutocompleteCoreService setupSubscriptions:",t)}}buildUserContactsWithHere(t){try{let e=t?.slice()||[];if(this.currentAtHereEnabled){let i={name:this.currentAtHereLabel,email:"",userId:"here",visibility:"here"};e.find(a=>a?.visibility==="here")||e.unshift(i)}return e}catch(e){return this.loggingService.catch("Error in AutocompleteCoreService buildUserContactsWithHere:",e),t||[]}}getOrCreateContextConfig(t){try{let e=this.contextMap.get(t);if(!e){let i=new Rt;i.appState.user=this.currentUser,i.appState.darkMode=this.currentDarkMode,i.data.userContacts=this.buildUserContactsWithHere(this.currentUserContacts),i.data.organizationGroups=this.currentOrganizationGroups,i.data.userDocumentContacts=this.currentUserDocumentContacts,i.data.autocompleteDataMap=this.currentAutocompleteDataMap,i.data.hereUserContact.name=this.currentAtHereLabel,i.data.atHereDescription=this.currentAtHereDescription,i.featureState.customAutocompleteSearch=this.currentCustomAutocompleteSearch,i.featureState.expandMentionGroups=this.currentExpandMentionGroups,i.featureState.showMentionGroupsFirst=this.currentShowMentionGroupsFirst,i.featureState.showMentionGroupsOnly=this.currentShowMentionGroupsOnly,i.featureState.paginatedContactList=this.currentPaginatedContactList,i.featureState.atHereEnabled=this.currentAtHereEnabled,i.uiState.autoCompleteScrollConfig=this.currentAutoCompleteScrollConfig,e=M(i),this.contextMap.set(t,e)}return e}catch(e){return this.loggingService.catch("Error in AutocompleteCoreService getOrCreateContextConfig:",e),M(new Rt)}}getContextConfig(t){try{return this.contextMap.get(t)}catch(e){this.loggingService.catch("Error in AutocompleteCoreService getContextConfig:",e);return}}setContextConfig(t,e){try{this.contextMap.set(t,e)}catch(i){this.loggingService.catch("Error in AutocompleteCoreService setContextConfig:",i)}}clearContextConfig(t){try{this.contextMap.delete(t),this.registryMap.delete(t)}catch(e){this.loggingService.catch("Error in AutocompleteCoreService clearContextConfig:",e)}}setRegistry(t,e){try{this.registryMap.set(t,e)}catch(i){this.loggingService.catch("Error in AutocompleteCoreService setRegistry:",i)}}getRegistry(t){try{return this.registryMap.get(t)}catch(e){this.loggingService.catch("Error in AutocompleteCoreService getRegistry:",e);return}}findParentAutocompleteId(t){try{let e=t?.nativeElement;if(!e)return;let i=e.parentElement;for(;i;){let a=i.getAttribute?.("autocomplete-id");if(a)return a;if(i.tagName?.toLowerCase()==="velt-autocomplete-context-wrapper"){let c=i.getAttribute?.("autocomplete-id");if(c)return c}i=i.parentElement}return}catch(e){this.loggingService.catch("Error in AutocompleteCoreService findParentAutocompleteId:",e);return}}updateAllContexts(t){try{this.contextMap.forEach(e=>{let i=e();e.set(t(i))})}catch(e){this.loggingService.catch("Error in AutocompleteCoreService updateAllContexts:",e)}}};r.\u0275fac=function(e){return new(e||r)(G(Et),G(xt),G(De),G(Tt),G(Ht),G(U))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var Ee=(()=>{let r=class r{constructor(t,e,i,a){this.coreService=t,this.contactService=e,this.loggingService=i,this.serviceBook=a,this.componentId="velt-autocomplete-panel",this.commentActionsService=null,this.serviceBook.observe(_e).subscribe(c=>this.commentActionsService=c)}filterOptions(t,e,i){try{let c=t().data.selectedAutocompleteData;c&&(c.type==="contact"?this.filterContactOptions(t,e,i):this.filterCustomOptions(t,e))}catch(a){this.loggingService.catch("Error in AutocompleteActionService filterOptions:",a)}}filterContactOptions(t,e,i){try{let a=t(),c=e?.toLowerCase()?.trim()||"",v=new ue;v.email=c;let s=new RegExp(ge.REGEX_EMAIL).test("@"+v?.email),u=a.data.userContacts.slice();a.featureState.customAutocompleteSearch||e&&(u=this.filterContacts(u,v),a.featureState.paginatedContactList&&u.length<3&&this.fetchFilteredUsersFromDb(e).then(()=>{})),a.featureState.atHereEnabled&&a.data.hereUserContact?.name?.includes(c)&&(u?.find(C=>C?.userId==="here")||(u=[a.data.hereUserContact,...u])),i?.length&&(u=u.filter(C=>!i.find(K=>K?.email===C?.email)));let h=e?this.filterGroups(a.data.organizationGroups,e):a.data.organizationGroups,E=u.map(C=>{if(C.visibility==="here"){if(a.data.atHereDescription)C=f(m({},C),{email:a.data.atHereDescription}),C.description=a.data.atHereDescription;else if(a.appState.user&&a.appState.user?.organizationId){let K=a.data.userDocumentContacts?.length||0;C=f(m({},C),{email:`${K} members`}),C.description=`${K} members`}}return{type:"contact",contact:C,disabled:!1}}),x=h.map(C=>({type:"group",group:C})),b=[...E,...x];if(a.featureState.expandMentionGroups)this.buildExpandedGroupItems(t,b,a,v,s);else{let C=b.length?void 0:{type:"contact",contact:v},K=this.createFlattenedItems({allItems:b,newUserContact:C,isExpandedGroups:!1,isCustomGroups:!1,showMentionGroupsOnly:a.featureState.showMentionGroupsOnly,showMentionGroupsFirst:a.featureState.showMentionGroupsFirst});t.update(Z=>f(m({},Z),{data:f(m({},Z.data),{flattenedItems:K,newUserContactError:s?void 0:"Invalid email",newUserContact:C})}))}}catch(a){this.loggingService.catch("Error in AutocompleteActionService filterContactOptions:",a)}}buildExpandedGroupItems(t,e,i,a,c){try{let v=[],s={},u=new Map;e.forEach(C=>{if(C.contact?.userId){let K=he(C.contact.userId);u.set(K,C),s[C.contact.userId]=!1}});let h=new Map;i.data.organizationGroups.forEach(C=>{h.set(C.metadata.clientGroupId,{id:C.metadata.clientGroupId,name:C.metadata.groupName,members:[],userIds:Object.keys(C.users||{})})}),h.forEach(C=>{C.userIds.forEach(K=>{let Z=u.get(K);Z&&(C.members.push(Z),Z.contact?.userId&&(s[Z.contact.userId]=!0))})}),e.forEach(C=>{C.type==="contact"&&C.contact?.userId&&!s[C.contact.userId]&&v.push(C)});let E=Array.from(h.values()),x=e.length?void 0:{type:"contact",contact:a},b=this.createFlattenedItems({allItems:e,contactsWithoutGroup:v,groups:E,newUserContact:x,isExpandedGroups:!0,isCustomGroups:!1,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(C=>f(m({},C),{data:f(m({},C.data),{flattenedItems:b,newUserContactError:c?void 0:"Invalid email",newUserContact:x,contactsWithoutGroup:v,groups:E})}))}catch(v){this.loggingService.catch("Error in AutocompleteActionService buildExpandedGroupItems:",v)}}filterCustomOptions(t,e){try{let i=t(),a=i.data.selectedAutocompleteData,c=i.data.autocompleteDataMap?.[a?.hotkey],v=c?.data?.slice()||[];if(i.featureState.customAutocompleteSearch||(e?v=v.filter(u=>u.name?.toLowerCase()?.includes(e?.toLowerCase())):v=a?.data?.slice()||[]),c?.groups&&c.groups.length>0){let u=[],h=new Map;c.groups?.forEach(b=>{h.set(b.id,{id:b.id,name:b.name,members:[]})}),v.forEach(b=>{let C={type:"custom",custom:b};b.groupId&&h.has(b.groupId)?h.get(b.groupId)?.members.push(C):u.push(C)});let E=Array.from(h.values()).filter(b=>b.members.length>0),x=this.createFlattenedItems({allItems:[],contactsWithoutGroup:u,groups:E,isExpandedGroups:!1,isCustomGroups:!0,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(b=>f(m({},b),{featureState:f(m({},b.featureState),{customGroupsEnabled:!0}),data:f(m({},b.data),{flattenedItems:x,contactsWithoutGroup:u,groups:E})}))}else{let u=v.map(E=>({type:"custom",custom:E})),h=this.createFlattenedItems({allItems:u,isExpandedGroups:!1,isCustomGroups:!1,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(E=>f(m({},E),{featureState:f(m({},E.featureState),{customGroupsEnabled:!1}),data:f(m({},E.data),{flattenedItems:h})}))}}catch(i){this.loggingService.catch("Error in AutocompleteActionService filterCustomOptions:",i)}}createFlattenedItems(t){try{let{allItems:e,contactsWithoutGroup:i,groups:a,newUserContact:c,isExpandedGroups:v=!1,isCustomGroups:s=!1,showMentionGroupsOnly:u=!1,showMentionGroupsFirst:h=!1}=t,E=[];if(v||s){if(!u&&!h&&i?.forEach((x,b)=>{let C=new vt;C.originalItem=x,C.disabled=!!x.disabled,C.id=s?`velt-option-custom-ungrouped-${b}`:`velt-option-user-${b}`,C.testId=s?`${this.componentId}-custom-ungrouped-${b}`:`${this.componentId}-user-${b}`,E.push(C)}),a?.forEach((x,b)=>{if(x?.members?.length){let C=new vt;C.originalItem={type:"group",group:x},C.isGroupHeader=!0,C.disabled=!0,C.group=x,C.id=s?`velt-option-custom-group-${b}`:`velt-option-group-${b}`,C.testId=s?`${this.componentId}-custom-group-${b}`:`${this.componentId}-group-${b}`,E.push(C),x.members.forEach((K,Z)=>{let st=new vt;st.originalItem=K,st.isGroupMember=!0,st.disabled=K.disabled||!1,st.id=s?`velt-option-custom-group-${b}-member-${Z}`:`velt-option-group-${b}-member-${Z}`,st.testId=s?`${this.componentId}-custom-group-${b}-member-${Z}`:`${this.componentId}-group-${b}-member-${Z}`,E.push(st)})}}),!u&&h&&i?.length){let x=new vt;x.originalItem={type:"group"},x.isGroupHeader=!0,x.disabled=!0,x.groupName="Ungrouped",x.id="velt-option-ungrouped",x.testId=`${this.componentId}-ungrouped`,E.push(x),i.forEach((b,C)=>{let K=new vt;K.originalItem=b,K.isGroupMember=!0,K.disabled=b.disabled||!1,K.id=`velt-option-user-${C}`,K.testId=`${this.componentId}-user-${C}`,E.push(K)})}}else e.forEach((x,b)=>{let C=new vt;C.originalItem=x,C.disabled=x.disabled||!1,C.id=`velt-option-${b}`,C.testId=`${this.componentId}-${b}`,E.push(C)});if(c?.contact?.email){let x=new vt;x.originalItem=c,x.isNewContact=!0,x.id="velt-new-contact-option",x.testId=`${this.componentId}-new-contact`,E.push(x)}return E}catch(e){return this.loggingService.catch("Error in AutocompleteActionService createFlattenedItems:",e),[]}}addContact(t){try{let e=t();e.data.newUserContact?.contact&&(this.contactService.addUserContact(e.data.newUserContact.contact),t.update(i=>f(m({},i),{data:f(m({},i.data),{newUserContact:void 0})})))}catch(e){this.loggingService.catch("Error in AutocompleteActionService addContact:",e)}}callbackOnOptionSelected(t){try{this.contactService.onContactSelected(t)}catch(e){this.loggingService.catch("Error in AutocompleteActionService callbackOnOptionSelected:",e)}}triggerAutocompleteSearch(t,e,i){try{let a={event:t,searchText:e,type:i};this.commentActionsService?.autocompleteSearch(a)}catch(a){this.loggingService.catch("Error in AutocompleteActionService triggerAutocompleteSearch:",a)}}toggleSelection(t,e){try{let a=t().data.multiSelectItems||[],c=a.findIndex(s=>this.isSameItem(s,e)),v;return c>=0?v=[...a.slice(0,c),...a.slice(c+1)]:v=[...a,e],t.update(s=>f(m({},s),{data:f(m({},s.data),{multiSelectItems:v})})),v}catch(i){return this.loggingService.catch("Error in AutocompleteActionService toggleSelection:",i),[]}}confirmSelection(t){try{let i=t().data.multiSelectItems||[];return t.update(a=>f(m({},a),{data:f(m({},a.data),{multiSelectItems:[]})})),[...i]}catch(e){return this.loggingService.catch("Error in AutocompleteActionService confirmSelection:",e),[]}}isSameItem(t,e){try{return t.type!==e.type?!1:t.type==="contact"&&e.type==="contact"?t.contact?.userId&&e.contact?.userId?t.contact.userId===e.contact.userId:t.contact?.email&&e.contact?.email?t.contact.email===e.contact.email:!1:t.type==="custom"&&e.type==="custom"?t.custom?.id&&e.custom?.id?t.custom.id===e.custom.id:!1:t.type==="group"&&e.type==="group"&&t.group?.metadata?.groupId&&e.group?.metadata?.groupId?t.group.metadata.groupId===e.group.metadata.groupId:!1}catch{return!1}}filterContacts(t,e){try{let i=e.email?.toLowerCase();return t?.filter(a=>a?.email?.includes(i)||a?.name?.toLowerCase()?.includes(i)||a?.organizationName?.toLowerCase()?.includes(i))}catch(i){return this.loggingService.catch("Error in AutocompleteActionService _filterContacts:",i),[]}}filterGroups(t,e){try{return t?.filter(i=>i?.metadata?.groupName?.toLowerCase()?.includes(e?.toLowerCase()))}catch(i){return this.loggingService.catch("Error in AutocompleteActionService _filterGroups:",i),[]}}filterCustomItems(t,e){try{return t?.filter(i=>i.name?.toLowerCase()?.includes(e?.toLowerCase()))||[]}catch(i){return this.loggingService.catch("Error in AutocompleteActionService filterCustomItems:",i),[]}}fetchFilteredUsersFromDb(t){return pt(this,null,function*(){try{yield this.contactService.searchUsers(t)}catch(e){this.loggingService.catch("Error in AutocompleteActionService fetchFilteredUsersFromDb:",e)}})}};r.\u0275fac=function(e){return new(e||r)(G(Wt),G(xt),G(U),G(Tt))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var Jt=(()=>{let r=class r{constructor(t){this.loggingService=t,this.subscribers=new Set}register(t){try{if(this.subscribers.add(t),this.lastPayload)try{t(this.lastPayload)}catch(e){this.loggingService.catch("[AUTOCOMPLETE REGISTRY] Error initializing subscriber:",e)}}catch(e){this.loggingService.catch("[AUTOCOMPLETE REGISTRY] Error in register:",e)}}unregister(t){try{this.subscribers.delete(t)}catch(e){this.loggingService.catch("[AUTOCOMPLETE REGISTRY] Error in unregister:",e)}}broadcast(t){try{this.lastPayload=t,this.subscribers.forEach(e=>{try{e(t)}catch(i){this.loggingService.catch("[AUTOCOMPLETE REGISTRY] Error in subscriber:",i)}})}catch(e){this.loggingService.catch("[AUTOCOMPLETE REGISTRY] Error in broadcast:",e)}}getLastPayload(){try{return this.lastPayload}catch(t){this.loggingService.catch("[AUTOCOMPLETE REGISTRY] Error in getLastPayload:",t);return}}};r.\u0275fac=function(e){return new(e||r)(G(U))},r.\u0275prov=nt({token:r,factory:r.\u0275fac});let n=r;return n})();function Ae(n,r){try{let o=r?.trim();return o?(n||[]).find(t=>t?.userId===o):void 0}catch{return}}function Me(n,r,o){try{let t=o?.trim();return t?n||(r?.userId===t?r:void 0):void 0}catch{return}}var q=(()=>{let r=class r extends ke{set parentLocalUIState(t){t&&(this.localUIStateSignal=t,this.isLocalUIStateOwner=!1)}get elementRef(){return this.hostElementRef}constructor(){let t=Q(tt),e=Q(Ht),i=Q(ve),a=Q(Tt).get(ut),c=Q(_),v=Q(U);super(t,e,i,a??void 0,void 0,c,v),this.autocompleteId=Xt(),this.defaultCondition=Xt(!0,{transform:s=>{try{return typeof s=="string"?s==="true"||s==="":s}catch{return!0}}}),this._contextData={},this.isLocalUIStateOwner=!1,this.isContextInitialized=!1,this.registryCheckAttempts=0,this.MAX_REGISTRY_CHECK_ATTEMPTS=50,this.onContextPayload=s=>{try{this.isContextInitialized||(this.isContextInitialized=!0),this._autocompleteId=s.autocompleteId,this._contextData=s.contextData||{};let u=this.coreService.getContextConfig(s.autocompleteId);u&&(this.componentConfigSignal.update(h=>m({},h)),this.componentConfigSignal=u,this.cd.markForCheck())}catch(u){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent onContextPayload:",u)}},this.hostElementRef=t,this.themeService=e,this.dynamicDataService=c,this.loggingService=v,this.coreService=Q(Wt),this.actionService=Q(Ee),this.cd=i,this.commentService=a??void 0,this.registry=Q(Jt,{optional:!0})??void 0,this._userIdContactService=Q(xt),this._userIdAuthService=Q(Et),this.initializeLocalUIState()}resolveUserIdToContact(t,e){try{this._userIdValue=t,this._userIdApply=e,this._userIdSub?.unsubscribe(),this._userIdSub=void 0;let i=t?.trim();if(!i){e(void 0),this.flushChangeDetection();return}let a=this._userIdContactService.getInternalUserContacts()??[],c=Ae(a,i);if(c){e(c),this.flushChangeDetection();return}this._userIdSub=Ut([this._userIdContactService.getUserByUserId$(i),this._userIdAuthService.getUser$()]).subscribe(([v,s])=>{try{let u=Me(v,s,i);e(u),this.flushChangeDetection()}catch(u){this.loggingService.catch("Error resolving userId user:",u)}})}catch(i){this.loggingService.catch("Error looking up userId:",i)}}flushChangeDetection(){try{this.cd?.detectChanges?.()}catch{try{this.cd?.markForCheck?.()}catch{}}}cancelUserIdResolution(){this._userIdSub?.unsubscribe(),this._userIdSub=void 0}resolveUserObjectToContact(t,e){try{if(!t){this._userIdValue?.trim()?this.resolveUserIdToContact(this._userIdValue,this._userIdApply??e):(e(void 0),this.flushChangeDetection());return}this.cancelUserIdResolution();let i=typeof t=="string"?JSON.parse(t):t;e(i),this.flushChangeDetection()}catch(i){this.loggingService.catch("Error parsing userObject:",i)}}initializeLocalUIState(){try{let t=Q(Te,{optional:!0,skipSelf:!0});t?(this.localUIStateSignal=t,this.isLocalUIStateOwner=!1):(this.localUIStateSignal=M(qt()),this.isLocalUIStateOwner=!0)}catch{this.localUIStateSignal=M(qt()),this.isLocalUIStateOwner=!0}}ngOnInit(){try{super.ngOnInit();let t=this.autocompleteId();if(!t){let i=this.hostElementRef?.nativeElement?.getAttribute?.("autocomplete-id");i&&(t=i)}if(this.componentConfigSignal&&this.componentConfigSignal()&&Object.keys(this.componentConfigSignal()).length>0){this.initializeFromConfigSignal(this.componentConfigSignal),this.setupA11yAttributes(),this.setupDarkModeSync();return}if(t){this._autocompleteId=t,this.initializeFromAutocompleteId(t),this.setupA11yAttributes(),this.setupDarkModeSync();return}let e=this.findNearestParentWrapperRegistry();if(e){this.registry=e,this.registry.register(this.onContextPayload);let i=this.registry.getLastPayload?.();i&&this.onContextPayload(i),this.setupA11yAttributes(),this.setupDarkModeSync();return}if(this.registry){this.registry.register(this.onContextPayload);let i=this.registry.getLastPayload?.();i&&this.onContextPayload(i),this.setupA11yAttributes(),this.setupDarkModeSync();return}this.tryRegisterWithContext(),this.setupA11yAttributes(),this.setupDarkModeSync()}catch(t){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent ngOnInit:",t)}}ngOnDestroy(){try{this.registryCheckTimer&&(clearTimeout(this.registryCheckTimer),this.registryCheckTimer=void 0),this.registry&&this.registry.unregister(this.onContextPayload),this.darkModeConfigSyncSubscription&&this.darkModeConfigSyncSubscription.unsubscribe(),this._userIdSub?.unsubscribe(),this._userIdSub=void 0,super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent ngOnDestroy:",t)}}setupA11yAttributes(){}setupDarkModeSync(){try{this.darkModeConfigSyncSubscription=this.onDarkModeChange().subscribe(t=>{try{if(this.componentConfigSignal&&typeof this.componentConfigSignal=="function"){let e=this.componentConfigSignal();e&&e.appState&&e.appState.darkMode!==t&&this.componentConfigSignal.update(i=>f(m({},i),{appState:f(m({},i.appState),{darkMode:t})}))}}catch(e){this.loggingService.catch("Error in darkMode sync subscription:",e)}})}catch(t){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent setupDarkModeSync:",t)}}findNearestParentWrapperRegistry(){try{let t=this.hostElementRef?.nativeElement;if(!t)return;let e=t.parentElement;for(;e;){if(e.tagName?.toLowerCase()==="velt-autocomplete-context-wrapper"){let i=e.__veltContext;if(i?.registry instanceof Jt)return i.contextData&&(this._contextData=i.contextData),i.registry;let a=window.ng;if(a?.getComponent){let v=a.getComponent(e);if(v?.registry)return v.registry}let c=e.__ngContext__;if(c&&Array.isArray(c))for(let v=0;v<c.length;v++){let s=c[v];if(s&&typeof s=="object"&&s.registry instanceof Jt)return s.registry}}e=e.parentElement}}catch(t){this.loggingService.catch("[AUTOCOMPLETE PRIMITIVE BASE] Error finding parent wrapper registry:",t)}}tryRegisterWithContext(){try{let t=this.coreService.findParentAutocompleteId(this.hostElementRef);if(!t){this.registryCheckAttempts<this.MAX_REGISTRY_CHECK_ATTEMPTS&&(this.registryCheckAttempts++,this.registryCheckTimer=setTimeout(()=>this.tryRegisterWithContext(),10));return}this.registry=this.coreService.getRegistry(t),this.registry?this.registry.register(this.onContextPayload):this.registryCheckAttempts<this.MAX_REGISTRY_CHECK_ATTEMPTS?(this.registryCheckAttempts++,this.registryCheckTimer=setTimeout(()=>this.tryRegisterWithContext(),10)):this.initializeFromDOM(t)}catch(t){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent tryRegisterWithContext:",t)}}initializeFromDOM(t){try{this._autocompleteId=t;let e=this.coreService.getContextConfig(t);e&&(this.componentConfigSignal.update(i=>m({},i)),this.componentConfigSignal=e,this.isContextInitialized=!0,this.cd.markForCheck())}catch(e){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent initializeFromDOM:",e)}}initializeFromAutocompleteId(t){try{this._autocompleteId=t;let e=this.coreService.getOrCreateContextConfig(t);this.componentConfigSignal.update(i=>m({},i)),this.componentConfigSignal=e,this.isContextInitialized=!0,this.cd.markForCheck()}catch(e){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent initializeFromAutocompleteId:",e)}}initializeFromConfigSignal(t){try{this.isContextInitialized=!0,this.cd.markForCheck()}catch(e){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent initializeFromConfigSignal:",e)}}getContextValue(t){try{let e=this._contextData[t];if(e!=null)return e;let i=this.hostElementRef?.nativeElement?.getAttribute(t);return i!==null?i:void 0}catch(e){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent getContextValue:",e);return}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["app-autocomplete-primitive-themed-base"]],inputs:{autocompleteId:[1,"autocompleteId"],defaultCondition:[1,"defaultCondition"],parentLocalUIState:"parentLocalUIState"},standalone:!1,features:[j],decls:0,vars:0,template:function(e,i){},encapsulation:2});let n=r;return n})();var un=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),hn=(n,r)=>({condition:n,data:r}),fn=n=>({componentConfigSignal:n}),Cn=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-description-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),_n=()=>({});function bn(n,r){n&1&&$(0)}function xn(n,r){if(n&1&&p(0,bn,1,0,"ng-container",5),n&2){l(2);let o=H(3);d("ngTemplateOutlet",o)}}function Sn(n,r){n&1&&$(0)}function yn(n,r){if(n&1&&p(0,Sn,1,0,"ng-container",5),n&2){l(2);let o=H(5);d("ngTemplateOutlet",o)}}function kn(n,r){n&1&&$(0)}function In(n,r){if(n&1&&p(0,kn,1,0,"ng-container",5),n&2){l(2);let o=H(7);d("ngTemplateOutlet",o)}}function On(n,r){if(n&1&&(y(0),w(1,xn,1,1,"ng-container")(2,yn,1,1,"ng-container")(3,In,1,1,"ng-container"),k()),n&2){let o=l(2);g(),T((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function Dn(n,r){if(n&1&&(N(0),B(1,"translate")),n&2){let o=l(2);X(" ",L(1,1,(o==null||o.contact==null?null:o.contact.email)||(o==null?null:o.email))," ")}}function wn(n,r){if(n&1&&(N(0),B(1,"translate")),n&2){let o=l(2);X(" ",L(1,1,o==null||o.custom==null||o.custom.custom==null?null:o.custom.custom.description)," ")}}function Tn(n,r){if(n&1&&(N(0),B(1,"translate")),n&2){let o,t=l(3),e=l();Gt(" ",(o=e.objectKeys((t==null||t.group==null||t.group.group==null?null:t.group.group.users)||Ft(4,_n)))==null?null:o.length," ",L(1,2,"members")," ")}}function En(n,r){if(n&1&&w(0,Tn,2,5),n&2){let o=l(2);T(!(o==null||o.group==null)&&o.group.group?0:-1)}}function An(n,r){if(n&1&&(y(0),p(1,On,4,1,"ng-container",4)(2,Dn,2,3,"ng-template",null,0,W)(4,wn,2,3,"ng-template",null,1,W)(6,En,1,1,"ng-template",null,2,W),k()),n&2){let o=l(),t=l();g(),d("veltDynamicTemplate",z(3,Cn,t.template,R(1,fn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Mn(n,r){if(n&1&&p(0,An,8,9,"ng-container",3),n&2){let o=l();d("veltIf",D(4,hn,o.conditionSignal(),D(1,un,o.componentConfigSignal,o.localUIStateSignal)))}}var Pe=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.componentConfigSignal.update(i=>f(m({},i),{type:"contact",contact:e}))})}set userId(t){this.resolveUserIdToContact(t,e=>{this.componentConfigSignal.update(i=>f(m({},i),{type:"contact",contact:e}))})}constructor(){super(),this.componentId="velt-autocomplete-chip-tooltip-description",this.objectKeys=Object.keys,this.componentConfigSignal=M({})}ngOnInit(){try{super.ngOnInit()}catch(t){this.loggingService.catch("Error in AutocompleteChipTooltipDescriptionComponent ngOnInit:",t)}}ngOnDestroy(){try{this._userIdSub?.unsubscribe(),super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteChipTooltipDescriptionComponent ngOnDestroy:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-chip-tooltip-description-internal"]],inputs:{userObject:"userObject",userId:"userId"},standalone:!1,features:[F([_]),j],decls:1,vars:1,consts:[["contacEmailRef",""],["customDescriptionRef",""],["groupDescriptionRef",""],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngTemplateOutlet"]],template:function(e,i){if(e&1&&w(0,Mn,1,7,"ng-container"),e&2){let a;T((a=i.componentConfigSignal())?0:-1,a)}},styles:["[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let n=r;return n})();function ht(n,r){n&&(n.setAttribute("role","presentation"),n.setAttribute("data-testid",r+"-container"))}var Pn=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),Fn=(n,r)=>({condition:n,data:r}),Rn=n=>({componentConfigSignal:n}),jn=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Nn(n,r){n&1&&$(0)}function Un(n,r){if(n&1&&p(0,Nn,1,0,"ng-container",5),n&2){l(2);let o=H(3);d("ngTemplateOutlet",o)}}function Bn(n,r){n&1&&$(0)}function Ln(n,r){if(n&1&&p(0,Bn,1,0,"ng-container",5),n&2){l(2);let o=H(5);d("ngTemplateOutlet",o)}}function zn(n,r){n&1&&$(0)}function $n(n,r){if(n&1&&p(0,zn,1,0,"ng-container",5),n&2){l(2);let o=H(7);d("ngTemplateOutlet",o)}}function Vn(n,r){if(n&1&&(y(0),w(1,Un,1,1,"ng-container")(2,Ln,1,1,"ng-container")(3,$n,1,1,"ng-container"),k()),n&2){let o=l(2);g(),T((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function Gn(n,r){if(n&1&&Y(0,"snippyly-user-avatar",6),n&2){let o=l(2);d("size",32)("user",o==null?null:o.contact)}}function Hn(n,r){if(n&1&&(Y(0,"div",7),B(1,"safeSvg")),n&2){let o=l(3);d("innerHtml",L(1,1,o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null?null:o.custom.custom.icon.svg),Bt)}}function Wn(n,r){if(n&1&&(S(0,"div",8),Y(1,"img",9),I()),n&2){let o=l(3);g(),d("src",o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null?null:o.custom.custom.icon.url,Lt)}}function Jn(n,r){if(n&1&&(w(0,Hn,2,3,"div",7),w(1,Wn,2,1,"div",8)),n&2){let o=l(2);T(!(o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null)&&o.custom.custom.icon.svg?0:-1),g(),T(!(o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null)&&o.custom.custom.icon.url?1:-1)}}function Kn(n,r){n&1&&(S(0,"div",10),dt(),S(1,"svg",11),Y(2,"path",12),I()())}function Yn(n,r){if(n&1&&(y(0),p(1,Vn,4,1,"ng-container",4)(2,Gn,1,2,"ng-template",null,0,W)(4,Jn,2,2,"ng-template",null,1,W)(6,Kn,3,0,"ng-template",null,2,W),k()),n&2){let o=l(),t=l();g(),d("veltDynamicTemplate",z(3,jn,t.template,R(1,Rn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Xn(n,r){if(n&1&&p(0,Yn,8,9,"ng-container",3),n&2){let o=l();d("veltIf",D(4,Fn,o.conditionSignal(),D(1,Pn,o.componentConfigSignal,o.localUIStateSignal)))}}var Re=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.componentConfigSignal.update(i=>f(m({},i),{type:"contact",contact:e}))})}set userId(t){this.resolveUserIdToContact(t,e=>{this.componentConfigSignal.update(i=>f(m({},i),{type:"contact",contact:e}))})}constructor(){super(),this.componentId="velt-autocomplete-chip-tooltip-icon",this.componentConfigSignal=M({})}ngOnInit(){try{super.ngOnInit()}catch(t){this.loggingService.catch("Error in AutocompleteChipTooltipIconComponent ngOnInit:",t)}}ngOnDestroy(){try{this._userIdSub?.unsubscribe(),super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteChipTooltipIconComponent ngOnDestroy:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-chip-tooltip-icon-internal"]],inputs:{userObject:"userObject",userId:"userId"},standalone:!1,features:[F([_]),j],decls:1,vars:1,consts:[["contactAvatarRef",""],["customIconRef",""],["groupIconRef",""],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngTemplateOutlet"],[1,"comment-dialog-user-avatar",3,"size","user"],[1,"velt-autocomplete-chip-tooltip--icon-svg",3,"innerHtml"],[1,"velt-autocomplete-chip-tooltip--icon-img"],[3,"src"],[1,"velt-autocomplete-chip-tooltip--group-icon","velt-autocomplete-chip-tooltip--icon-svg"],["xmlns","http://www.w3.org/2000/svg","fill","rgb(233, 242, 255)","width","16","height","16","viewBox","0 0 16 16",1,"bi","bi-people-fill"],["d","M7 14s-1 0-1-1 1-4 5-4 5 3 5 4-1 1-1 1zm4-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6m-5.784 6A2.24 2.24 0 0 1 5 13c0-1.355.68-2.75 1.936-3.72A6.3 6.3 0 0 0 5 9c-4 0-5 3-5 4s1 1 1 1zM4.5 8a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5"]],template:function(e,i){if(e&1&&w(0,Xn,1,7,"ng-container"),e&2){let a;T((a=i.componentConfigSignal())?0:-1,a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[_nghost-%COMP%]:empty{display:none}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-autocomplete-chip-tooltip--group-icon[_ngcontent-%COMP%]{width:100%;height:100%;padding:var(--velt-spacing-xs);display:flex;align-items:center;justify-content:center;background:linear-gradient(0deg,#ffffff0a,#ffffff0a),linear-gradient(0deg,#3772ff14,#3772ff14);box-sizing:border-box}.velt-autocomplete-chip-tooltip--icon-svg[_ngcontent-%COMP%]{display:flex;width:100%;height:100%;align-items:center;justify-content:center;color:var(--velt-text-0)}.velt-autocomplete-chip-tooltip--icon-img[_ngcontent-%COMP%]{display:flex;width:100%;height:100%;align-items:center;justify-content:center}.velt-autocomplete-chip-tooltip--icon-img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:16px;height:16px;object-fit:cover}"],changeDetection:0});let n=r;return n})();var Zn=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),qn=(n,r)=>({condition:n,data:r}),Qn=n=>({componentConfigSignal:n}),to=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-name-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function eo(n,r){n&1&&$(0)}function no(n,r){if(n&1&&p(0,eo,1,0,"ng-container",5),n&2){l(2);let o=H(3);d("ngTemplateOutlet",o)}}function oo(n,r){n&1&&$(0)}function ro(n,r){if(n&1&&p(0,oo,1,0,"ng-container",5),n&2){l(2);let o=H(5);d("ngTemplateOutlet",o)}}function io(n,r){n&1&&$(0)}function ao(n,r){if(n&1&&p(0,io,1,0,"ng-container",5),n&2){l(2);let o=H(7);d("ngTemplateOutlet",o)}}function lo(n,r){if(n&1&&(y(0),w(1,no,1,1,"ng-container")(2,ro,1,1,"ng-container")(3,ao,1,1,"ng-container"),k()),n&2){let o=l(2);g(),T((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function co(n,r){if(n&1&&(N(0),B(1,"translate")),n&2){let o=l(2);X(" ",L(1,1,o==null||o.contact==null?null:o.contact.name)," ")}}function so(n,r){if(n&1&&(N(0),B(1,"translate")),n&2){let o=l(2);X(" ",L(1,1,o==null||o.custom==null||o.custom.custom==null?null:o.custom.custom.name)," ")}}function mo(n,r){if(n&1&&(N(0),B(1,"translate")),n&2){let o=l(2);X(" ",L(1,1,(o==null||o.group==null||o.group.group==null||o.group.group.metadata==null?null:o.group.group.metadata.groupName)||(o==null||o.group==null?null:o.group.text))," ")}}function vo(n,r){if(n&1&&(y(0),p(1,lo,4,1,"ng-container",4)(2,co,2,3,"ng-template",null,0,W)(4,so,2,3,"ng-template",null,1,W)(6,mo,2,3,"ng-template",null,2,W),k()),n&2){let o=l(),t=l();g(),d("veltDynamicTemplate",z(3,to,t.template,R(1,Qn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function po(n,r){if(n&1&&p(0,vo,8,9,"ng-container",3),n&2){let o=l();d("veltIf",D(4,qn,o.conditionSignal(),D(1,Zn,o.componentConfigSignal,o.localUIStateSignal)))}}var je=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.componentConfigSignal.update(i=>f(m({},i),{type:"contact",contact:e}))})}set userId(t){this.resolveUserIdToContact(t,e=>{this.componentConfigSignal.update(i=>f(m({},i),{type:"contact",contact:e}))})}constructor(){super(),this.componentId="velt-autocomplete-chip-tooltip-name",this.componentConfigSignal=M({})}ngOnInit(){try{super.ngOnInit()}catch(t){this.loggingService.catch("Error in AutocompleteChipTooltipNameComponent ngOnInit:",t)}}ngOnDestroy(){try{this._userIdSub?.unsubscribe(),super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteChipTooltipNameComponent ngOnDestroy:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-chip-tooltip-name-internal"]],inputs:{userObject:"userObject",userId:"userId"},standalone:!1,features:[F([_]),j],decls:1,vars:1,consts:[["contactNameRef",""],["customNameRef",""],["groupNameRef",""],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngTemplateOutlet"]],template:function(e,i){if(e&1&&w(0,po,1,7,"ng-container"),e&2){let a;T((a=i.componentConfigSignal())?0:-1,a)}},styles:["[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let n=r;return n})();var go=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),uo=(n,r)=>({condition:n,data:r}),ho=n=>({componentConfigSignal:n}),fo=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Co(n,r){n&1&&$(0)}function _o(n,r){if(n&1&&(S(0,"velt-shadow-dom-internal"),p(1,Co,1,0,"ng-container",2),I()),n&2){l();let o=H(4);g(),d("ngTemplateOutlet",o)}}function bo(n,r){n&1&&$(0)}function xo(n,r){if(n&1&&p(0,bo,1,0,"ng-container",2),n&2){l();let o=H(4);d("ngTemplateOutlet",o)}}function So(n,r){if(n&1&&(S(0,"div",4)(1,"div",5),Y(2,"velt-autocomplete-chip-tooltip-icon-internal",6),I(),S(3,"div",7)(4,"div",8),Y(5,"velt-autocomplete-chip-tooltip-name-internal",6),I(),S(6,"div",9),Y(7,"velt-autocomplete-chip-tooltip-description-internal",6),I()()()),n&2){let o=l(4);g(2),d("componentConfigSignal",o.componentConfigSignal),g(3),d("componentConfigSignal",o.componentConfigSignal),g(2),d("componentConfigSignal",o.componentConfigSignal)}}function yo(n,r){if(n&1&&p(0,So,8,3,"div",3),n&2){let o=l(2),t=l();d("veltDynamicTemplate",z(3,fo,t.template,R(1,ho,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function ko(n,r){if(n&1&&(y(0),w(1,_o,2,1,"velt-shadow-dom-internal")(2,xo,1,1,"ng-container"),p(3,yo,1,9,"ng-template",null,0,W),k()),n&2){let o=l(2);g(),T(o.shadowDom&&!o.template||o.template&&o.isExplicitShadowDom?1:2)}}function Io(n,r){if(n&1&&p(0,ko,5,1,"ng-container",1),n&2){let o=l();d("veltIf",D(4,uo,o.conditionSignal(),D(1,go,o.componentConfigSignal,o.localUIStateSignal)))}}var Ne=(()=>{let r=class r extends q{set shadowDom(t){this._shadowDom=t}get shadowDom(){return this._shadowDom}set userObject(t){this.resolveUserObjectToContact(t,e=>{this.componentConfigSignal.update(i=>f(m({},i),{type:"contact",contact:e}))})}set userId(t){this.resolveUserIdToContact(t,e=>{this.componentConfigSignal.update(i=>f(m({},i),{type:"contact",contact:e}))})}constructor(){super(),this.componentId="velt-autocomplete-chip-tooltip",this._shadowDom=!1,this.isExplicitShadowDom=!1,this.componentConfigSignal=M({}),this.subscriptions=[],this.wireframeService=Q(At)}ngOnInit(){try{super.ngOnInit();let t=this.elementRef.nativeElement,e=t.getAttribute("shadow-dom")??t.getAttribute("shadowdom");this.isExplicitShadowDom=e!==null&&e!=="false",this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),this.subscriptions.push(this.wireframeService.getWireframe$("velt-autocomplete-chip-tooltip-wireframe").subscribe(a=>{if(a){let c=document.createElement(a.tagName);c.innerHTML=a.innerHTML,this.template=c}}))}catch(t){this.loggingService.catch("Error in AutocompleteChipTooltipComponent OnInit: ",t)}}ngOnDestroy(){try{this._userIdSub?.unsubscribe(),super.ngOnDestroy(),this.subscriptions.forEach(t=>{t.unsubscribe()})}catch{}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-chip-tooltip-internal"]],inputs:{shadowDom:"shadowDom",variant:"variant",userObject:"userObject",userId:"userId"},standalone:!1,features:[F([_]),j],decls:1,vars:1,consts:[["tooltipContainerRef",""],[4,"veltIf"],[4,"ngTemplateOutlet"],["class","velt-autocomplete-chip-tooltip",4,"veltDynamicTemplate"],[1,"velt-autocomplete-chip-tooltip"],[1,"velt-autocomplete-chip-tooltip--icon"],[3,"componentConfigSignal"],[1,"velt-autocomplete-chip-tooltip--content"],[1,"velt-autocomplete-chip-tooltip--name"],[1,"velt-autocomplete-chip-tooltip--description"]],template:function(e,i){if(e&1&&w(0,Io,1,7,"ng-container"),e&2){let a;T((a=i.componentConfigSignal())?0:-1,a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[_nghost-%COMP%]:empty{display:none}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%]{display:flex;background:var(--velt-background-0);border-radius:var(--velt-border-radius-sm);padding:var(--velt-spacing-md);margin:var(--velt-spacing-xs) 0;box-shadow:0 4px 21px #00000014;gap:var(--velt-spacing-md);max-width:256px;line-height:1.3;align-items:center}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:var(--velt-border-radius-full);overflow:hidden;flex-shrink:0}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon[_ngcontent-%COMP%] snippyly-user-avatar[_ngcontent-%COMP%]{display:flex}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon-svg[_ngcontent-%COMP%]{width:100%;height:100%;padding:var(--velt-spacing-xs);display:flex;align-items:center;justify-content:center;background:linear-gradient(0deg,#ffffff0a,#ffffff0a),linear-gradient(0deg,#3772ff14,#3772ff14);box-sizing:border-box}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon-svg[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:100%;height:100%}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--content[_ngcontent-%COMP%]{display:flex;flex-direction:column}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--content[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--name[_ngcontent-%COMP%]{font-size:var(--velt-font-size-sm);font-weight:400;line-height:21px;text-align:left;word-break:break-word;color:var(--velt-text-0)}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--content[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--description[_ngcontent-%COMP%]{font-size:var(--velt-font-size-xs);font-weight:400;line-height:17px;letter-spacing:.01em;text-align:left;color:var(--velt-text-5);word-break:break-word}"],changeDetection:0});let n=r;return n})();var Do=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),wo=(n,r)=>({condition:n,data:r}),Qt=n=>({$implicit:n}),To=(n,r)=>({componentConfigSignal:n,userContact:r}),te=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-description-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),Eo=(n,r)=>({componentConfigSignal:n,custom:r}),Ao=(n,r)=>({componentConfigSignal:n,group:r}),Ue=()=>({});function Mo(n,r){n&1&&$(0)}function Po(n,r){if(n&1&&p(0,Mo,1,0,"ng-container",4),n&2){l();let o=H(5),t=l(2);d("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,Qt,t.selectorItem==null?null:t.selectorItem.contact))}}function Fo(n,r){n&1&&$(0)}function Ro(n,r){if(n&1&&p(0,Fo,1,0,"ng-container",4),n&2){l();let o=H(7),t=l(2);d("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,Qt,t.selectorItem==null?null:t.selectorItem.custom))}}function jo(n,r){n&1&&$(0)}function No(n,r){if(n&1&&p(0,jo,1,0,"ng-container",4),n&2){l();let o=H(9),t=l(2);d("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,Qt,t.selectorItem==null?null:t.selectorItem.group))}}function Uo(n,r){if(n&1&&(S(0,"p",7),N(1),B(2,"translate"),I()),n&2){let o=l(2).$implicit,t=l(3);wt("velt-autocomplete-option-description--secondary",(o.name==null?null:o.name.length)>0),A("aria-label",t.field?o[t.field]:o.email),g(),X(" ",t.field?o[t.field]:L(2,4,o.email)," ")}}function Bo(n,r){if(n&1&&p(0,Uo,3,6,"p",6),n&2){let o=l().$implicit,t=l(2),e=l();d("veltDynamicTemplate",z(4,te,e.template,D(1,To,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function Lo(n,r){if(n&1&&w(0,Bo,1,10,"p",5),n&2){let o=r.$implicit,t=l(3);T((t.field?o!=null&&o[t.field]:(o.email==null?null:o.email.length)>0&&(o.name==null?null:o.name.length)>0)?0:-1)}}function zo(n,r){if(n&1&&(S(0,"p",7),N(1),B(2,"translate"),I()),n&2){let o=l(2).$implicit;A("aria-label",o.description),g(),X(" ",L(2,2,o.description)," ")}}function $o(n,r){if(n&1&&p(0,zo,3,4,"p",8),n&2){let o=l().$implicit,t=l(2),e=l();d("veltDynamicTemplate",z(4,te,e.template,D(1,Eo,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function Vo(n,r){if(n&1&&w(0,$o,1,10,"p",7),n&2){let o=r.$implicit;T((o.description==null?null:o.description.length)>0?0:-1)}}function Go(n,r){if(n&1&&(S(0,"p",7),N(1),B(2,"translate"),I()),n&2){let o,t,e=l().$implicit,i=l(3);A("aria-label",((o=i.objectKeys((e==null?null:e.users)||Ft(5,Ue)))==null?null:o.length)+" members"),g(),Gt(" ",(t=i.objectKeys((e==null?null:e.users)||Ft(6,Ue)))==null?null:t.length," ",L(2,3,"members")," ")}}function Ho(n,r){if(n&1&&p(0,Go,3,7,"p",8),n&2){let o=r.$implicit,t=l(2),e=l();d("veltDynamicTemplate",z(4,te,e.template,D(1,Ao,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function Wo(n,r){if(n&1&&(y(0),w(1,Po,1,4,"ng-container")(2,Ro,1,4,"ng-container")(3,No,1,4,"ng-container"),p(4,Lo,1,1,"ng-template",null,0,W)(6,Vo,1,1,"ng-template",null,1,W)(8,Ho,1,10,"ng-template",null,2,W),k()),n&2){let o=l(2);g(),T((o.selectorItem==null?null:o.selectorItem.type)==="contact"?1:(o.selectorItem==null?null:o.selectorItem.type)==="custom"?2:(o.selectorItem==null?null:o.selectorItem.type)==="group"?3:-1)}}function Jo(n,r){if(n&1&&p(0,Wo,10,1,"ng-container",3),n&2){let o=l();d("veltIf",D(5,wo,o.conditionSignal(),rt(1,Do,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var Be=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}set userId(t){this.resolveUserIdToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}constructor(){super(),this.objectKeys=Object.keys,this.componentConfigSignal=M({}),this.componentId="velt-autocomplete-option-description"}ngOnInit(){try{super.ngOnInit(),this.dynamicDataService.applyConditionalClasses(this.hostElementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,selectorItem:this.selectorItem})}catch(t){this.loggingService.catch("Error in AutocompleteOptionDescriptionComponent ngOnInit:",t)}}ngOnDestroy(){try{this._userIdSub?.unsubscribe(),super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteOptionDescriptionComponent ngOnDestroy:",t)}}setupA11yAttributes(){try{ht(this.hostElementRef.nativeElement,this.componentId)}catch(t){this.loggingService.catch("Error in AutocompleteOptionDescriptionComponent setupA11yAttributes:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-option-description-internal"]],inputs:{selectorItem:"selectorItem",field:"field",userObject:"userObject",userId:"userId"},standalone:!1,features:[F([_]),j],decls:1,vars:1,consts:[["contactEmailRef",""],["customDescriptionRef",""],["groupDescriptionRef",""],[4,"veltIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"line-height-1","velt-autocomplete-option-description",3,"velt-autocomplete-option-description--secondary"],["class","line-height-1 velt-autocomplete-option-description",3,"velt-autocomplete-option-description--secondary",4,"veltDynamicTemplate"],[1,"line-height-1","velt-autocomplete-option-description"],["class","line-height-1 velt-autocomplete-option-description",4,"veltDynamicTemplate"]],template:function(e,i){if(e&1&&w(0,Jo,1,8,"ng-container"),e&2){let a;T((a=i.componentConfigSignal())?0:-1,a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent);display:block}[_nghost-%COMP%]:empty{display:none}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-autocomplete-option-description[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--velt-text-8);font-size:var(--velt-font-size-xs);margin:0;line-height:18px}"],changeDetection:0});let n=r;return n})();var Ko=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),Yo=(n,r)=>({condition:n,data:r}),Xo=n=>({componentConfigSignal:n}),Le=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-error-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),Zo=n=>({$implicit:n}),qo=(n,r,o)=>({componentConfigSignal:n,isNewContact:r,userContact:o});function Qo(n,r){if(n&1&&(S(0,"div",4)(1,"div",5),dt(),S(2,"svg",6),Y(3,"path",7)(4,"path",8),I()()()),n&2){let o=l(4);g(),A("data-testid",o.componentId+"-icon"),g(),A("data-testid",o.componentId+"-svg")}}function tr(n,r){if(n&1&&(S(0,"div",2),B(1,"translate"),p(2,Qo,5,2,"div",3),I()),n&2){let o=l(2),t=l();A("aria-label",L(1,3,"Invalid contact"))("data-testid",t.componentId),g(2),d("veltDynamicTemplate",z(7,Le,t.template,R(5,Xo,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function er(n,r){n&1&&$(0)}function nr(n,r){if(n&1&&p(0,er,1,0,"ng-container",9),n&2){l();let o=H(4),t=l(2);d("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,Zo,t.selectorItem==null?null:t.selectorItem.contact))}}function or(n,r){if(n&1&&(S(0,"div",4)(1,"div",10),dt(),S(2,"svg",6),Y(3,"path",7)(4,"path",8),I()()()),n&2){let o=l(4),t=l();g(),d("title",o.newUserContactError),A("title",o.newUserContactError)("data-testid",t.componentId+"-icon"),g(),A("data-testid",t.componentId+"-svg")}}function rr(n,r){if(n&1&&(S(0,"div",2),B(1,"translate"),p(2,or,5,4,"div",3),I()),n&2){let o=l().$implicit,t=l(2),e=l();A("aria-label",L(1,3,(t==null?null:t.newUserContactError)||"Invalid contact"))("data-testid",e.componentId),g(2),d("veltDynamicTemplate",z(9,Le,e.template,rt(5,qo,e.componentConfigSignal,e.isNewContact,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function ir(n,r){if(n&1&&w(0,rr,3,15,"div",2),n&2){let o=l(2),t=l();T(t.isNewContact&&o.newUserContactError?0:-1)}}function ar(n,r){if(n&1&&(y(0),w(1,tr,3,13,"div",2)(2,nr,1,4,"ng-container"),p(3,ir,1,1,"ng-template",null,0,W),k()),n&2){let o=l(2);g(),T(o.defaultCondition()?(o.selectorItem==null?null:o.selectorItem.type)==="contact"?2:-1:1)}}function lr(n,r){if(n&1&&p(0,ar,5,1,"ng-container",1),n&2){let o=l();d("veltIf",D(5,Yo,o.conditionSignal(),rt(1,Ko,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var ze=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}set userId(t){this.resolveUserIdToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}constructor(){super(),this.componentConfigSignal=M({}),this.componentId="velt-autocomplete-error-icon"}ngOnInit(){try{super.ngOnInit(),this.dynamicDataService.applyConditionalClasses(this.hostElementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,selectorItem:this.selectorItem,isNewContact:this.isNewContact})}catch(t){this.loggingService.catch("Error in AutocompleteOptionErrorIconComponent ngOnInit:",t)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteOptionErrorIconComponent ngOnDestroy:",t)}}setupA11yAttributes(){try{ht(this.hostElementRef.nativeElement,this.componentId)}catch(t){this.loggingService.catch("Error in AutocompleteOptionErrorIconComponent setupA11yAttributes:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-option-error-icon-internal"]],inputs:{selectorItem:"selectorItem",isNewContact:"isNewContact",userObject:"userObject",userId:"userId"},standalone:!1,features:[F([_]),j],decls:1,vars:1,consts:[["errorIconRef",""],[4,"veltIf"],["role","alert"],["class","velt-autocomplete-option-error-icon",4,"veltDynamicTemplate"],[1,"velt-autocomplete-option-error-icon"],[1,"s-flex"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16","aria-hidden","true","focusable","false",1,"bi","bi-exclamation-triangle"],["fill","red","d","M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016.146.146 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.163.163 0 0 1-.054.06.116.116 0 0 1-.066.017H1.146a.115.115 0 0 1-.066-.017.163.163 0 0 1-.054-.06.176.176 0 0 1 .002-.183L7.884 2.073a.147.147 0 0 1 .054-.057zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z"],["fill","red","d","M7.002 12a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995z"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"s-flex",3,"title"]],template:function(e,i){if(e&1&&w(0,lr,1,8,"ng-container"),e&2){let a;T((a=i.componentConfigSignal())?0:-1,a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[_nghost-%COMP%]:empty{display:none}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-autocomplete-option-error-icon[_ngcontent-%COMP%]{margin-inline:var(--velt-spacing-lg)}.velt-autocomplete-option-error-icon[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:transparent;border:none;padding:0;margin:0;cursor:pointer;outline:none;color:var(--velt-text-1)}"],changeDetection:0});let n=r;return n})();var cr=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),sr=(n,r)=>({condition:n,data:r}),dr=(n,r)=>({componentConfigSignal:n,selectorItem:r}),mr=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),ee=n=>({$implicit:n});function vr(n,r){n&1&&$(0)}function pr(n,r){if(n&1&&p(0,vr,1,0,"ng-container",6),n&2){l(2);let o=H(3),t=l(2);d("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ee,t.selectorItem==null?null:t.selectorItem.contact))}}function gr(n,r){n&1&&$(0)}function ur(n,r){if(n&1&&p(0,gr,1,0,"ng-container",6),n&2){l(2);let o=H(5),t=l(2);d("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ee,t.selectorItem==null?null:t.selectorItem.custom))}}function hr(n,r){n&1&&$(0)}function fr(n,r){if(n&1&&p(0,hr,1,0,"ng-container",6),n&2){l(2);let o=H(7),t=l(2);d("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ee,t.selectorItem==null?null:t.selectorItem.group))}}function Cr(n,r){if(n&1&&(S(0,"div",5),w(1,pr,1,4,"ng-container")(2,ur,1,4,"ng-container")(3,fr,1,4,"ng-container"),I()),n&2){let o=l(3);A("data-testid",o.componentId)("aria-label","Option icon"),g(),T((o.selectorItem==null?null:o.selectorItem.type)==="contact"?1:(o.selectorItem==null?null:o.selectorItem.type)==="custom"?2:(o.selectorItem==null?null:o.selectorItem.type)==="group"?3:-1)}}function _r(n,r){if(n&1&&(dt(),S(0,"svg",7),Y(1,"path",9),I()),n&2){let o=l(4);A("data-testid",o.componentId+"-contact-at")}}function br(n,r){if(n&1&&Y(0,"snippyly-user-avatar",8),n&2){let o=l().$implicit,t=l(3);d("size",32)("user",o),A("data-testid",t.componentId+"-contact-avatar")}}function xr(n,r){if(n&1&&w(0,_r,2,1,":svg:svg",7)(1,br,1,3,"snippyly-user-avatar",8),n&2){let o=r.$implicit;T((o==null?null:o.visibility)==="here"?0:1)}}function Sr(n,r){if(n&1&&(Y(0,"div",10),B(1,"safeSvg")),n&2){let o=l().$implicit,t=l(3);d("innerHTML",L(1,2,o.icon.svg),Bt),A("data-testid",t.componentId+"-custom-svg")}}function yr(n,r){if(n&1&&Y(0,"img",11),n&2){let o=l().$implicit,t=l(3);d("src",o.icon.url,Lt),A("alt",(o==null?null:o.description)||"Custom icon")("data-testid",t.componentId+"-custom-img")}}function kr(n,r){if(n&1&&(w(0,Sr,2,4,"div",10),w(1,yr,1,3,"img",11)),n&2){let o=r.$implicit;T(!(o==null||o.icon==null)&&o.icon.svg?0:-1),g(),T(!(o==null||o.icon==null)&&o.icon.url?1:-1)}}function Ir(n,r){if(n&1&&(dt(),S(0,"svg",12),Y(1,"path",13),I()),n&2){let o=l(3);A("data-testid",o.componentId+"-group-icon")}}function Or(n,r){if(n&1&&(y(0),p(1,Cr,4,3,"div",4)(2,xr,2,1,"ng-template",null,0,W)(4,kr,2,2,"ng-template",null,1,W)(6,Ir,2,1,"ng-template",null,2,W),k()),n&2){let o=l(),t=l();g(),d("veltDynamicTemplate",z(4,mr,t.template,D(1,dr,t.componentConfigSignal,t.selectorItem),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Dr(n,r){if(n&1&&p(0,Or,8,10,"ng-container",3),n&2){let o=l();d("veltIf",D(5,sr,o.conditionSignal(),rt(1,cr,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var $e=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}set userId(t){this.resolveUserIdToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}constructor(){super(),this.componentConfigSignal=M({}),this.componentId="velt-autocomplete-icon"}ngOnInit(){try{super.ngOnInit(),this.dynamicDataService.applyConditionalClasses(this.hostElementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,selectorItem:this.selectorItem})}catch(t){this.loggingService.catch("Error in AutocompleteOptionIconComponent ngOnInit:",t)}}ngOnDestroy(){try{this._userIdSub?.unsubscribe(),super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteOptionIconComponent ngOnDestroy:",t)}}setupA11yAttributes(){try{let t=this.hostElementRef.nativeElement;t.setAttribute("role","presentation"),t.setAttribute("data-testid",this.componentId+"-container")}catch(t){this.loggingService.catch("Error in AutocompleteOptionIconComponent setupA11yAttributes:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-option-icon-internal"]],inputs:{selectorItem:"selectorItem",userObject:"userObject",userId:"userId"},standalone:!1,features:[F([_]),j],decls:1,vars:1,consts:[["contactAvatarRef",""],["customAvatarRef",""],["groupAvatarRef",""],[4,"veltIf"],["class","velt-autocomplete-option-icon","role","img",4,"veltDynamicTemplate"],["role","img",1,"velt-autocomplete-option-icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","fill","none","viewBox","0 0 16 16","aria-hidden","true","focusable","false",1,"bi","bi-at"],[3,"size","user"],["fill","currentColor","d","M13.106 7.222c0-2.967-2.249-5.032-5.482-5.032-3.35 0-5.646 2.318-5.646 5.702 0 3.493 2.235 5.708 5.762 5.708.862 0 1.689-.123 2.304-.335v-.862c-.43.199-1.354.328-2.29.328-2.926 0-4.813-1.88-4.813-4.798 0-2.844 1.921-4.881 4.594-4.881 2.735 0 4.608 1.688 4.608 4.156 0 1.682-.554 2.769-1.416 2.769-.492 0-.772-.28-.772-.76V5.206H8.923v.834h-.11c-.266-.595-.881-.964-1.6-.964-1.4 0-2.378 1.162-2.378 2.823 0 1.737.957 2.906 2.379 2.906.8 0 1.415-.39 1.709-1.087h.11c.081.67.703 1.148 1.503 1.148 1.572 0 2.57-1.415 2.57-3.643zm-7.177.704c0-1.197.54-1.907 1.456-1.907.93 0 1.524.738 1.524 1.907S8.308 9.84 7.371 9.84c-.895 0-1.442-.725-1.442-1.914z"],[1,"velt-autocomplete-option-icon--custom-svg",3,"innerHTML"],[1,"velt-autocomplete-option-icon--custom-img",3,"src"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16","aria-hidden","true","focusable","false",1,"bi","bi-people-fill"],["d","M7 14s-1 0-1-1 1-4 5-4 5 3 5 4-1 1-1 1zm4-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6m-5.784 6A2.24 2.24 0 0 1 5 13c0-1.355.68-2.75 1.936-3.72A6.3 6.3 0 0 0 5 9c-4 0-5 3-5 4s1 1 1 1zM4.5 8a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5"]],template:function(e,i){if(e&1&&w(0,Dr,1,8,"ng-container"),e&2){let a;T((a=i.componentConfigSignal())?0:-1,a)}},styles:['html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[_nghost-%COMP%]:empty{display:none}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-autocomplete-option-icon--placeholder[_ngcontent-%COMP%]{z-index:2;opacity:.8}.velt-autocomplete-option-icon[_ngcontent-%COMP%]{min-width:calc((2.25rem + 0px) * var(--velt-base-rem-unit));width:calc((2.25rem + 0px) * var(--velt-base-rem-unit));min-height:calc((2.25rem + 0px) * var(--velt-base-rem-unit));height:calc((2.25rem + 0px) * var(--velt-base-rem-unit));box-sizing:border-box;background-clip:padding-box;border:solid 2px transparent;display:flex;align-items:center;justify-content:center;position:relative;margin-right:var(--velt-spacing-md)}.velt-autocomplete-option-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:var(--velt-border-radius-full);z-index:2;object-fit:cover}.velt-autocomplete-option-icon[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:0;z-index:1;border-radius:inherit;background:inherit}.velt-autocomplete-option-icon[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{color:var(--velt-text-1)}'],changeDetection:0});let n=r;return n})();var wr=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),Tr=(n,r)=>({condition:n,data:r}),ne=n=>({$implicit:n}),Er=(n,r)=>({componentConfigSignal:n,userContact:r}),oe=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-name-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),Ar=(n,r)=>({componentConfigSignal:n,custom:r}),Mr=(n,r)=>({componentConfigSignal:n,group:r});function Pr(n,r){n&1&&$(0)}function Fr(n,r){if(n&1&&p(0,Pr,1,0,"ng-container",4),n&2){l();let o=H(5),t=l(2);d("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ne,t.selectorItem==null?null:t.selectorItem.contact))}}function Rr(n,r){n&1&&$(0)}function jr(n,r){if(n&1&&p(0,Rr,1,0,"ng-container",4),n&2){l();let o=H(7),t=l(2);d("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ne,t.selectorItem==null?null:t.selectorItem.custom))}}function Nr(n,r){n&1&&$(0)}function Ur(n,r){if(n&1&&p(0,Nr,1,0,"ng-container",4),n&2){l();let o=H(9),t=l(2);d("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ne,t.selectorItem==null?null:t.selectorItem.group))}}function Br(n,r){if(n&1&&(S(0,"p",5),N(1),B(2,"translate"),I()),n&2){let o=l(2).$implicit,t=l(3);A("data-testid",t.componentId+"-contact-text")("aria-label",o.name||o.email),g(),X(" ",L(2,3,o.name||o.email)," ")}}function Lr(n,r){if(n&1&&p(0,Br,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();d("veltDynamicTemplate",z(4,oe,e.template,D(1,Er,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function zr(n,r){n&1&&Y(0,"velt-skeleton-loader-internal",6)}function $r(n,r){if(n&1&&w(0,Lr,1,10,"p",5)(1,zr,1,0,"velt-skeleton-loader-internal",6),n&2){let o=r.$implicit;T((o.name==null?null:o.name.length)>0||(o==null||o.email==null?null:o.email.length)>0?0:1)}}function Vr(n,r){if(n&1&&(S(0,"p",5),N(1),B(2,"translate"),I()),n&2){let o=l(2).$implicit,t=l(3);A("data-testid",t.componentId+"-custom-text")("aria-label",o.name),g(),X(" ",L(2,3,o.name)," ")}}function Gr(n,r){if(n&1&&p(0,Vr,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();d("veltDynamicTemplate",z(4,oe,e.template,D(1,Ar,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function Hr(n,r){if(n&1&&w(0,Gr,1,10,"p",5),n&2){let o=r.$implicit;T((o.name==null?null:o.name.length)>0?0:-1)}}function Wr(n,r){if(n&1&&(S(0,"p",5),N(1),B(2,"translate"),I()),n&2){let o=l(2).$implicit,t=l(3);A("data-testid",t.componentId+"-group-text")("aria-label",o==null||o.metadata==null?null:o.metadata.groupName),g(),X(" ",L(2,3,o==null||o.metadata==null?null:o.metadata.groupName)," ")}}function Jr(n,r){if(n&1&&p(0,Wr,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();d("veltDynamicTemplate",z(4,oe,e.template,D(1,Mr,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function Kr(n,r){if(n&1&&w(0,Jr,1,10,"p",5),n&2){let o=r.$implicit;T((o==null||o.metadata==null||o.metadata.groupName==null?null:o.metadata.groupName.length)>0?0:-1)}}function Yr(n,r){if(n&1&&(y(0),w(1,Fr,1,4,"ng-container")(2,jr,1,4,"ng-container")(3,Ur,1,4,"ng-container"),p(4,$r,2,1,"ng-template",null,0,W)(6,Hr,1,1,"ng-template",null,1,W)(8,Kr,1,1,"ng-template",null,2,W),k()),n&2){let o=l(2);g(),T((o.selectorItem==null?null:o.selectorItem.type)==="contact"?1:(o.selectorItem==null?null:o.selectorItem.type)==="custom"?2:(o.selectorItem==null?null:o.selectorItem.type)==="group"?3:-1)}}function Xr(n,r){if(n&1&&p(0,Yr,10,1,"ng-container",3),n&2){let o=l();d("veltIf",D(5,Tr,o.conditionSignal(),rt(1,wr,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var Ve=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}set userId(t){this.resolveUserIdToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}constructor(){super(),this.componentConfigSignal=M({}),this.componentId="velt-autocomplete-name"}ngOnInit(){try{super.ngOnInit(),this.dynamicDataService.applyConditionalClasses(this.hostElementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,selectorItem:this.selectorItem})}catch(t){this.loggingService.catch("Error in AutocompleteOptionNameComponent ngOnInit:",t)}}ngOnDestroy(){try{this._userIdSub?.unsubscribe(),super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteOptionNameComponent ngOnDestroy:",t)}}setupA11yAttributes(){try{let t=this.hostElementRef.nativeElement;t.setAttribute("role","presentation"),t.setAttribute("data-testid",this.componentId+"-container")}catch(t){this.loggingService.catch("Error in AutocompleteOptionNameComponent setupA11yAttributes:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-option-name-internal"]],inputs:{selectorItem:"selectorItem",userObject:"userObject",userId:"userId"},standalone:!1,features:[F([_]),j],decls:1,vars:1,consts:[["contactNameRef",""],["customNameRef",""],["groupNameRef",""],[4,"veltIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["role","option",1,"line-height-1","velt-autocomplete-option-name"],["height","21px","width","80px","borderRadius","20px"],["class","line-height-1 velt-autocomplete-option-name","role","option",4,"veltDynamicTemplate"]],template:function(e,i){if(e&1&&w(0,Xr,1,8,"ng-container"),e&2){let a;T((a=i.componentConfigSignal())?0:-1,a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[_nghost-%COMP%]:empty{display:none}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-autocomplete-option-name[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;color:var(--velt-text-1);font-size:var(--velt-font-size-sm);margin:0;line-height:21px;white-space:nowrap}"],changeDetection:0});let n=r;return n})();var Zr=(n,r,o,t,e,i,a)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o,isNewContact:t,multiSelect:e,isSelected:i,readOnly:a}),qr=(n,r)=>({condition:n,data:r}),Qr=(n,r,o,t,e,i)=>({componentConfigSignal:n,isNewContact:r,selectorItem:o,multiSelect:t,isSelected:e,readOnly:i}),ti=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function ei(n,r){if(n&1&&(S(0,"div",3),Y(1,"velt-autocomplete-option-icon-internal",4),S(2,"div",5),Y(3,"velt-autocomplete-option-name-internal",4)(4,"velt-autocomplete-option-description-internal",4),I(),Y(5,"velt-autocomplete-option-error-icon-internal",6),I()),n&2){let o=l(2),t=l();wt("velt-autocomplete-option--multi-select",t.multiSelect)("velt-autocomplete-option--selected",t.isSelected),A("data-testid",t.componentId)("aria-selected",t.isSelected)("aria-disabled",!!(o!=null&&o.newUserContactError)),g(),d("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),g(),A("data-testid",t.componentId+"-details"),g(),d("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),g(),d("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),g(),d("selectorItem",t.selectorItem)("isNewContact",t.isNewContact)("componentConfigSignal",t.componentConfigSignal)}}function ni(n,r){n&1&&(S(0,"div",2),dt(),S(1,"svg",7),Y(2,"path",8),I()())}function oi(n,r){if(n&1&&(y(0),p(1,ei,6,17,"div",1),w(2,ni,3,0,"div",2),k()),n&2){let o=l(),t=l();g(),d("veltDynamicTemplate",z(9,ti,t.template,de(2,Qr,t.componentConfigSignal,t.isNewContact,t.selectorItem,t.multiSelect,t.isSelected,t.readOnly),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef)),g(),T(t.multiSelect&&!t.readOnly&&t.isSelected?2:-1)}}function ri(n,r){if(n&1&&p(0,oi,3,15,"ng-container",0),n&2){let o=l();d("veltIf",D(9,qr,o.conditionSignal(),me(1,Zr,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem,o.isNewContact,o.multiSelect,o.isSelected,o.readOnly)))}}var Ge=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}set userId(t){this.resolveUserIdToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}constructor(){super(),this.multiSelect=!1,this.isSelected=!1,this.readOnly=!1,this.componentConfigSignal=M({}),this.subscriptions=[],this.wireframeService=Q(At),this.componentId="velt-autocomplete-option"}ngOnInit(){try{this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),super.ngOnInit();let t="velt-autocomplete-option-wireframe";this.dynamicDataService.applyConditionalClasses(this.hostElementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,selectorItem:this.selectorItem,isNewContact:this.isNewContact}),this.variant&&(t+=`---${this.variant}`),this.subscriptions.push(this.wireframeService.getWireframe$(t).subscribe(e=>{if(e){let i=document.createElement(e.tagName);i.innerHTML=e.innerHTML,this.template=i}}))}catch(t){this.loggingService.catch("Error in AutocompleteOptionComponent OnInit: ",t)}}setupA11yAttributes(){try{let t=this.hostElementRef.nativeElement;t.setAttribute("role","option"),t.setAttribute("data-testid",this.componentId+"-container"),t.setAttribute("aria-label",this.getOptionLabel())}catch(t){this.loggingService.catch("Error in AutocompleteOptionComponent setupA11yAttributes:",t)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: red;"),super.ngOnDestroy(),this._userIdSub?.unsubscribe(),this.subscriptions.forEach(t=>t?.unsubscribe())}catch(t){this.loggingService.catch("Error in AutocompleteOptionComponent OnDestroy: ",t)}}getOptionLabel(){try{switch(this.selectorItem?.type){case"contact":return this.getContactLabel();case"custom":return this.selectorItem.custom?.name||"Custom option";case"group":return this.selectorItem.group?.metadata?.groupName||"Group option";default:return"Option"}}catch(t){return this.loggingService.catch("Error in AutocompleteOptionComponent getOptionLabel:",t),"Option"}}getContactLabel(){try{let t=this.selectorItem?.contact,e=t?.name||t?.email||"Contact";return this.isNewContact?`New contact: ${e}`:e}catch(t){return this.loggingService.catch("Error in AutocompleteOptionComponent getContactLabel:",t),"Contact"}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-option-internal"]],inputs:{selectorItem:"selectorItem",isNewContact:"isNewContact",variant:"variant",multiSelect:"multiSelect",isSelected:"isSelected",readOnly:"readOnly",userObject:"userObject",userId:"userId"},standalone:!1,features:[F([_]),j],decls:1,vars:1,consts:[[4,"veltIf"],["class","velt-autocomplete-option--container","role","option",3,"velt-autocomplete-option--multi-select","velt-autocomplete-option--selected",4,"veltDynamicTemplate"],[1,"velt-autocomplete-option--check"],["role","option",1,"velt-autocomplete-option--container"],[3,"selectorItem","componentConfigSignal"],[1,"velt-autocomplete-option--details"],[3,"selectorItem","isNewContact","componentConfigSignal"],["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M11.6667 3.5L5.25 9.91667L2.33333 7","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"]],template:function(e,i){if(e&1&&w(0,ri,1,12,"ng-container"),e&2){let a;T((a=i.componentConfigSignal())?0:-1,a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent);width:100%;display:flex;align-items:center;min-width:0;overflow:hidden;box-sizing:border-box}[_nghost-%COMP%]:empty{display:none}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-autocomplete-option--container[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1;min-width:0}.velt-autocomplete-option--details[_ngcontent-%COMP%]{overflow:hidden;flex-grow:1}.velt-autocomplete-option--check[_ngcontent-%COMP%]{flex-shrink:0;width:24px;height:24px;border-radius:50%;background:var(--velt-accent-transparent, rgba(0, 168, 112, .15));display:flex;align-items:center;justify-content:center;color:var(--velt-accent, #00a870);margin-left:8px}"],changeDetection:0});let n=r;return n})();var He=(()=>{let r=class r{constructor(t,e,i){this.loggingService=t,this.dynamicDataService=e,this.injector=i,this.path="",this.field="",this.extractedProps={},this.valueSignal=M(void 0),this.dataComponentConfigSignal=M({}),this.subscription=[];try{this.subscription.push(this.dynamicDataService.getCommonData().subscribe(a=>{this.dataComponentConfigSignal.update(c=>(c=m(m({},c),a),c)),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps)}))}catch(a){this.loggingService.catch("Error in DataComponent constructor: ",a)}}ngOnInit(){try{(this.path||this.field)&&(this.extractProps(),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps))}catch(t){this.loggingService.catch("Error in DataComponent ngOnInit: ",t)}}ngOnDestroy(){try{this.subscription.forEach(t=>t.unsubscribe())}catch(t){this.loggingService.catch("Error in DataComponent ngOnDestroy: ",t)}}updateDataComponentConfigSignal(t,e){try{t==="dataComponentConfigSignal"?this.dataComponentConfigSignal.set(e):this.dataComponentConfigSignal.update(i=>f(m({},i),{[t]:e})),(this.path||this.field)&&(this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps))}catch(i){this.loggingService.catch("Error in DataComponent updateDataComponentConfigSignal: ",i)}}extractProps(){try{let t=this.field||this.path;this.extractedProps[t]={value:null,path:null,isDynamicPath:this.hasDynamicParts(t)}}catch(t){this.loggingService.catch("Error in DataComponent extractProps: ",t)}}hasDynamicParts(t){try{let e=/\[[^\]'"]*[^\]'"]\]/.test(t),i=/\[[^[\]]*[\.\[][^[\]]*\]/.test(t);return e||i}catch(e){return this.loggingService.catch("Error checking for dynamic path: ",e),!1}}evaluateCondition(){try{let t=this.field||this.path,e=this.extractedProps[t].value;this.valueSignal.set(e)}catch(t){this.loggingService.catch("Error in DataComponent evaluateCondition: ",t)}}getComputedValues(t,e,i,a,c,v){try{Object.keys(i).forEach(s=>{let u;if(ot(t)?u=it(()=>at(t(),i[s].path)):u=it(()=>at(t,i[s].path)),ot(u()))bt(()=>{try{let h=u()();i[s].value=h,this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector});else{let h=u();i[s].value=h,this.extractedProps=i,this.evaluateCondition()}})}catch(s){this.loggingService.catch("Error in DynamicDataService getComputedValues: ",s)}}};r.\u0275fac=function(e){return new(e||r)(O(U),O(_),O(mt))},r.\u0275cmp=P({type:r,selectors:[["app-data"]],inputs:{path:"path",field:"field"},standalone:!1,features:[F([_])],decls:2,vars:3,template:function(e,i){e&1&&(N(0),B(1,"translate")),e&2&&Ct(L(1,1,i.valueSignal()))},dependencies:[Ie],encapsulation:2,changeDetection:0});let n=r;return n})();var ii=(n,r)=>({template:n,context:r,cloneTemplate:!0});function ai(n,r){n&1&&$(0)}function li(n,r){if(n&1&&(y(0),p(1,ai,1,0,"ng-container",1),k()),n&2){let o=l();g(),d("veltDynamicTemplate",D(1,ii,o.template,o.dataComponentConfigSignal()))}}var We=(()=>{let r=class r{constructor(t,e,i){this.loggingService=t,this.dynamicDataService=e,this.injector=i,this.condition="",this.showContent=M(!1),this.conditionRegex=/\{(.*?)\}/g,this.extractedProps={},this.dataComponentConfigSignal=M({}),this.subscription=[],this.cleanupEffects=[];try{this.subscription.push(this.dynamicDataService.getCommonData().subscribe(a=>{this.dataComponentConfigSignal.update(c=>(c=m(m({},c),a),c)),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps)}))}catch(a){this.loggingService.catch("Error in IfComponent constructor: ",a)}}ngOnInit(){try{this.condition&&(this.extractProps(),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps))}catch(t){this.loggingService.catch("Error in IfComponent ngOnInit: ",t)}}ngOnDestroy(){try{this.cleanupEffects.forEach(t=>t.destroy()),this.cleanupEffects.length=0,this.subscription.forEach(t=>t.unsubscribe())}catch(t){this.loggingService.catch("Error in IfComponent ngOnDestroy: ",t)}}updateDataComponentConfigSignal(t,e){try{t==="dataComponentConfigSignal"?this.dataComponentConfigSignal.set(e):this.dataComponentConfigSignal.update(i=>f(m({},i),{[t]:e})),this.condition&&(this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps))}catch(i){this.loggingService.catch("Error in IfComponent updateDataComponentConfigSignal: ",i)}}extractProps(){try{this.extractedProps={},this.conditionRegex.lastIndex=0;let t;for(;(t=this.conditionRegex.exec(this.condition))!==null;){let e=t[1];this.extractedProps[e]={value:null,path:null,isDynamicPath:this.hasDynamicParts(e)}}}catch(t){this.loggingService.catch("Error in IfComponent extractProps: ",t)}}hasDynamicParts(t){try{let e=/\[[^\]'"]*[^\]'"]\]/.test(t),i=/\[[^[\]]*[\.\[][^[\]]*\]/.test(t);return e||i}catch(e){return this.loggingService.catch("Error checking for dynamic path: ",e),!1}}evaluateCondition(){try{let t=this.condition,e=this.extractedProps,i=t.replace(this.conditionRegex,(v,s)=>{let u=e[s];if(u&&u.value!==void 0){let h=u.value;return typeof h=="string"?`'${h}'`:typeof h=="boolean"||typeof h=="number"?String(h):h===null?"null":typeof h=="object"?h?"true":"false":String(h)}return"false"}),a=this.sanitizeCondition(i),c=this.dynamicDataService.safeEval(a);return this.showContent.set(c),c}catch(t){return this.loggingService.catch("Error in IfComponent evaluateCondition: ",t),this.showContent.set(!1),!1}}sanitizeCondition(t){try{return t.replace(/[^a-zA-Z0-9\s\+\-\*\/\%\(\)\!\=\<\>\|\&\.\[\]\{\},'"]/g,"")}catch(e){return this.loggingService.catch("Error in IfComponent sanitizeCondition: ",e),""}}getComputedValues(t,e,i,a,c,v){try{this.cleanupEffects.forEach(s=>s.destroy()),this.cleanupEffects.length=0,Object.keys(i).forEach(s=>{let u;if(ot(t)?u=it(()=>at(t(),i[s].path)):u=it(()=>at(t,i[s].path)),ot(u())){let h=bt(()=>{try{let E=u()();i[s].value=E,this.extractedProps=i,this.evaluateCondition()}catch{i[s].value="",this.extractedProps=i,this.evaluateCondition()}},{injector:this.injector});this.cleanupEffects.push(h)}else{let h=u();i[s].value=h,this.extractedProps=i,this.evaluateCondition()}})}catch(s){this.loggingService.catch("Error in DynamicDataService getComputedValues: ",s)}}};r.\u0275fac=function(e){return new(e||r)(O(U),O(_),O(mt))},r.\u0275cmp=P({type:r,selectors:[["app-if"]],inputs:{template:"template",condition:"condition"},standalone:!1,features:[F([_])],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltDynamicTemplate"]],template:function(e,i){e&1&&p(0,li,2,4,"ng-container",0),e&2&&d("ngIf",i.showContent())},styles:["[_nghost-%COMP%]{display:flex;align-items:center}"],changeDetection:0});let n=r;return n})();var Je=(()=>{let r=class r{constructor(t,e,i){this.coreActionsService=t,this.loggingService=e,this.metadataService=i,this.buttonClickSubject$=new It,this.buttonToggleMap$=new Nt({}),this.contextDataMapping={commentAnnotation:{source:["componentConfigSignal","data","annotation"],target:"commentAnnotation"},unreadCommentsMap:{source:["componentConfigSignal","unreadCommentsMap"],target:"unreadCommentAnnotationsMap"},comment:{source:["commentObj"],target:"comment"},index:{source:["i"],target:"index"},allAnnotations:{source:["componentConfigSignal","annotations"],target:"commentAnnotations"},systemFilteredAnnotations:{source:["componentConfigSignal","filteredCommentPinAnnotations"],target:"systemFilteredAnnotations"},notification:{source:["notification"],target:"notification"},allNotifications:{source:["componentConfigSignal","notificationsInSession"],target:"notifications"}}}buttonClick(v){return pt(this,arguments,function*({id:t,type:e,groupId:i,contextData:a,data:c}){try{this.buttonToggle(t,void 0,e,i);let u=this.extractButtonData(a),h=this.createButtonContext(t,e,i),E=yield this.metadataService.getGlobalMetadata(),x={};if(c){let s=c,{componentConfigSignal:C}=s,K=re(s,["componentConfigSignal"]);if(x=m({},K),C&&typeof C=="function")try{let Z=C();Z&&typeof Z=="object"&&(x=m(m({},x),Z))}catch(Z){this.loggingService.catch("Error accessing componentConfigSignal: ",Z)}}let b=f(m({buttonContext:h},u),{metadata:E,data:x});this.buttonClickSubject$.next(b),this.coreActionsService.triggerAction(Zt.VELT_BUTTON_CLICK,b)}catch(u){this.loggingService.catch("Error in ButtonService buttonClick: ",u)}})}buttonActive({id:t,type:e,groupId:i,contextData:a}){try{let c=this.buttonToggleMap$.value?.[i||"ungrouped"]?.[t]||!0;this.buttonToggle(t,c,e,i)}catch(c){this.loggingService.catch("Error in ButtonService buttonClick: ",c)}}buttonToggle(t,e,i,a){try{let c=this.buttonToggleMap$.value,v=this.createNewToggleMap(c,t,e,i,a);this.buttonToggleMap$.next(v)}catch(c){this.loggingService.catch("Error in ButtonService buttonToggle: ",c)}}extractButtonData(t){try{let e={};return Object.entries(this.contextDataMapping).forEach(([i,a])=>{let c=this.getNestedValue(t,a.source);c!==void 0&&(e[a.target]=c)}),e}catch(e){return this.loggingService.catch("Error in ButtonService extractContextData: ",e),{}}}getNestedValue(t,e){try{let i=t;for(let a of e){if(i?.[a]===void 0)return;ot(i[a])?i=i[a]():i=i[a]}return i}catch(i){this.loggingService.catch("Error in ButtonService getNestedValue: ",i);return}}createButtonContext(t,e,i){try{let a={type:e,selections:this.buttonToggleMap$.value,clickedButtonId:t};return(e==="single-select"||e==="multi-select")&&i?f(m({},a),{groupId:i}):a}catch(a){return this.loggingService.catch("Error in ButtonService createButtonMetadata: ",a),{}}}createNewToggleMap(t,e,i,a,c){try{let v=m({},t);return a==="button-toggle"?f(m({},v),{ungrouped:f(m({},v.ungrouped),{[e]:i??!v.ungrouped?.[e]})}):a==="single-select"&&c?f(m({},v),{[c]:{[e]:i??!0}}):a==="multi-select"&&c?f(m({},v),{[c]:f(m({},v[c]),{[e]:i??!v[c]?.[e]})}):v}catch(v){return this.loggingService.catch("Error in ButtonService createNewToggleMap: ",v),{}}}buttonClickSubject(){return this.buttonClickSubject$.asObservable()}buttonToggleMap(){return this.buttonToggleMap$.asObservable()}resetVeltButtonState(t){return pt(this,null,function*(){try{if(t){let{id:c,group:v}=t,s=JSON.parse(JSON.stringify(this.buttonToggleMap$.value||{}));v&&c?delete s?.[v]?.[c]:v?delete s?.[v]:c&&Object.keys(s).forEach(u=>{Object.keys(s[u]).forEach(h=>{h===c&&delete s?.[u]?.[h]})}),this.buttonToggleMap$.next(s)}else this.buttonToggleMap$.next({});let e={selections:this.buttonToggleMap$.value},i=yield this.metadataService.getGlobalMetadata(),a={buttonContext:e,metadata:i};this.coreActionsService.triggerAction(Zt.VELT_BUTTON_CLICK,a)}catch(e){this.loggingService.catch("Error in ButtonService resetVeltButtonState: ",e)}})}buttonToggleMapValue(){return this.buttonToggleMap$.value}};r.\u0275fac=function(e){return new(e||r)(G(xe),G(U),G(we))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var si=n=>({componentConfigSignal:n}),di=(n,r)=>({condition:n,data:r}),mi=(n,r)=>({componentConfigSignal:n,buttonComponentConfig:r}),vi=(n,r,o,t)=>({template:n,context:r,cloneTemplate:!0,setIfCondition:o,componentElementRef:t});function pi(n,r){if(n&1&&(y(0),N(1),B(2,"translate"),k()),n&2){let o=l(5);g(),X(" ",L(2,1,o.id)," ")}}function gi(n,r){if(n&1){let o=Ot();S(0,"div",3),Dt("click",function(){yt(o);let e=l(4);return kt(e.onClick())}),p(1,pi,3,3,"ng-container",4),I()}if(n&2){let o=l().ngIf,t=l(3);wt("velt-button--disabled",o.disabled)("velt-button--active",t.group?o.buttonToggleMap==null||o.buttonToggleMap[t.group]==null?null:o.buttonToggleMap[t.group][t.id]:o.buttonToggleMap==null||o.buttonToggleMap.ungrouped==null?null:o.buttonToggleMap.ungrouped[t.id]),A("data-testid",t.componentId+"-"+t.id)("data-group",t.group?t.group:"ungrouped")("data-value",t.valueSignal()),g(),d("veltDynamicTemplate",_t(11,vi,t.template,D(8,mi,t.dataComponentConfigSignal().componentConfigSignal,o),t.setIfCondition.bind(t),t.elementRef))}}function ui(n,r){if(n&1&&(y(0),p(1,gi,2,16,"div",2),k()),n&2){let o=l(3);g(),d("ngIf",o.id)}}function hi(n,r){if(n&1&&(y(0),p(1,ui,2,1,"ng-container",0),k()),n&2){let o=l(2);g(),d("ngIf",o.buttonComponentConfigSignal())}}function fi(n,r){if(n&1&&(y(0),p(1,hi,2,1,"ng-container",1),k()),n&2){let o=l();g(),d("veltIf",D(3,di,o.conditionSignal(),R(1,si,o.dataComponentConfigSignal().componentConfigSignal)))}}var Ke=(()=>{let r=class r extends lt{set disabled(t){try{let e=t;typeof t=="string"&&(e=JSON.parse(t)),this.buttonComponentConfigSignal.update(i=>(i=f(m({},i),{disabled:e}),i))}catch{}}set active(t){try{let e=t;typeof t=="string"&&(e=JSON.parse(t)),this.buttonComponentConfigSignal.update(i=>(i=f(m({},i),{active:e}),i))}catch{}}constructor(t,e,i,a,c){super(a,i,e),this.buttonService=t,this.loggingService=e,this.dynamicDataService=i,this.elementRef=a,this.injector=c,this.type="button",this.componentId="velt-button",this.subscription=[],this.extractedProps={},this.valueSignal=M(void 0),this.dataComponentConfigSignal=M({}),this.buttonComponentConfigSignal=M({buttonToggleMap:{},active:!1,disabled:!1,contextData:{},internalId:null});try{this.subscription.push(this.dynamicDataService.getCommonData().subscribe(v=>{this.dataComponentConfigSignal.update(s=>(s=m(m({},s),v),s)),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps)}))}catch(v){this.loggingService.catch("Error in ButtonComponent data functionality: ",v)}}ngOnInit(){try{super.ngOnInit(),this.subscription.push(this.buttonService.buttonToggleMap().subscribe(t=>{this.buttonComponentConfigSignal.update(e=>(e=f(m({},e),{buttonToggleMap:t}),e))})),this.buttonComponentConfigSignal.update(t=>(t=f(m({},t),{internalId:this.id?.includes("{")&&this.id?.includes("}")?this.id?.split("{")[1].split("}")[0]:this.id}),t)),this.buttonComponentConfigSignal().internalId&&(this.extractProps(),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps)),setTimeout(()=>{this.buttonComponentConfigSignal().active&&this.buttonService.buttonActive({id:this.valueSignal(),type:this.type,groupId:this.group,contextData:this.buttonComponentConfigSignal().contextData})},100)}catch(t){this.loggingService.catch("Error in ButtonComponent ngOnInit: ",t)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscription.forEach(t=>{t.unsubscribe()})}catch(t){this.loggingService.catch("Error in ButtonComponent ngOnDestroy: ",t)}}onClick(){try{if(this.buttonComponentConfigSignal().disabled)return;this.buttonService.buttonClick({id:this.valueSignal(),type:this.type,groupId:this.group,contextData:this.buttonComponentConfigSignal().contextData,data:this.dataComponentConfigSignal()})}catch(t){this.loggingService.catch("Error in ButtonComponent onClick: ",t)}}updateDataComponentConfigSignal(t,e){try{t==="dataComponentConfigSignal"?this.dataComponentConfigSignal.set(e):this.dataComponentConfigSignal.update(i=>f(m({},i),{[t]:e})),this.buttonComponentConfigSignal.update(i=>(i=m({},i),i.contextData[t]=e,i))}catch(i){this.loggingService.catch("Error in ButtonComponent updateDataComponentConfigSignal: ",i)}}extractProps(){try{this.extractedProps[this.buttonComponentConfigSignal().internalId]={value:null,path:null}}catch(t){this.loggingService.catch("Error in ButtonComponent extractProps: ",t)}}evaluateCondition(){try{this.id?.includes("{")&&this.id?.includes("}")?(this.valueSignal.set(this.extractedProps[this.buttonComponentConfigSignal().internalId].value),this.elementRef.nativeElement.id=this.valueSignal()):(this.valueSignal.set(this.id),this.elementRef.nativeElement.id=this.id)}catch{}}getComputedValues(t,e,i,a,c,v){try{Object.keys(i).forEach(s=>{let u;ot(t)?u=it(()=>at(t(),i[s].path)):u=it(()=>at(t,i[s].path)),ot(u())?bt(()=>{try{i[s].value=u()(),this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector}):(i[s].value=u(),this.extractedProps=i,this.evaluateCondition())})}catch(s){this.loggingService.catch("Error in ButtonComponent getComputedValues: ",s)}}};r.\u0275fac=function(e){return new(e||r)(O(Je),O(U),O(_),O(tt),O(mt))},r.\u0275cmp=P({type:r,selectors:[["app-button"]],inputs:{id:"id",type:"type",group:"group",disabled:"disabled",active:"active"},standalone:!1,features:[F([_]),j],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-button",3,"velt-button--disabled","velt-button--active","click",4,"ngIf"],[1,"velt-button",3,"click"],[4,"veltDynamicTemplate"]],template:function(e,i){e&1&&p(0,fi,2,6,"ng-container",0),e&2&&d("ngIf",i.componentConfigSignal())},styles:[".velt-button--disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed;opacity:.5}"],changeDetection:0});let n=r;return n})();var Ci=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,group:o}),_i=(n,r)=>({condition:n,data:r}),bi=(n,r)=>({componentConfigSignal:n,group:r}),xi=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-group-option-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Si(n,r){if(n&1&&(y(0),S(1,"div",2)(2,"span",3),N(3),I()(),k()),n&2){let o=l(3);g(3),Ct((o.group==null?null:o.group.name)||o.groupName)}}function yi(n,r){if(n&1&&(y(0),p(1,Si,4,1,"ng-container",1),k()),n&2){let o=l(),t=l();g(),d("veltDynamicTemplate",z(4,xi,t.template,D(1,bi,t.componentConfigSignal,t.group),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function ki(n,r){if(n&1&&p(0,yi,2,10,"ng-container",0),n&2){let o=l();d("veltIf",D(5,_i,o.conditionSignal(),rt(1,Ci,o.componentConfigSignal,o.localUIStateSignal,o.group)))}}var Ye=(()=>{let r=class r extends q{set group(t){this._group=t;let e=this._groupSetByParent;this._groupSetByParent=!!t,t?(this._groupIdSub?.unsubscribe(),this._groupIdSub=void 0):e&&this.resolveGroupId()}get group(){return this._group}set groupObject(t){try{if(this._groupSetByParent)return;if(!t){this._group=void 0,this.flushChangeDetection();return}let e=typeof t=="string"?JSON.parse(t):t;e&&typeof e=="object"&&(this._group=e,this.flushChangeDetection())}catch(e){this.loggingService.catch("Error parsing groupObject:",e)}}set groupId(t){this._groupId=t,this.resolveGroupId()}resolveGroupId(){try{if(this._groupSetByParent)return;this._groupIdSub?.unsubscribe(),this._groupIdSub=void 0;let t=this._groupId?.trim();if(!t){this._group=void 0,this.flushChangeDetection();return}this._groupIdSub=this.contactService.getOrganizationGroups$().subscribe(e=>{try{this._group=Ii(e,t),this.flushChangeDetection()}catch(i){this.loggingService.catch("Error resolving groupId:",i)}})}catch(t){this.loggingService.catch("Error in groupId resolution:",t)}}constructor(){super(),this.componentId="velt-autocomplete-group-option",this._groupSetByParent=!1,this.contactService=Q(xt),this.componentConfigSignal=M({})}ngOnInit(){try{super.ngOnInit(),this.dynamicDataService.applyConditionalClasses(this.hostElementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,group:this.group})}catch(t){this.loggingService.catch("Error in AutocompleteGroupOptionComponent ngOnInit:",t)}}ngOnDestroy(){try{this._groupIdSub?.unsubscribe(),super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteGroupOptionComponent ngOnDestroy:",t)}}setupA11yAttributes(){try{ht(this.hostElementRef.nativeElement,this.componentId)}catch(t){this.loggingService.catch("Error in AutocompleteGroupOptionComponent setupA11yAttributes:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-group-option-internal"]],inputs:{group:"group",groupName:"groupName",groupObject:"groupObject",groupId:"groupId"},standalone:!1,features:[F([_]),j],decls:1,vars:1,consts:[[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"velt-autocomplete-group-option"],[1,"velt-autocomplete-group-option-name"]],template:function(e,i){if(e&1&&w(0,ki,1,8,"ng-container"),e&2){let a;T((a=i.componentConfigSignal())?0:-1,a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]:empty{display:none}.velt-autocomplete-group-option[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.velt-autocomplete-group-option-name[_ngcontent-%COMP%]{font-weight:500}"],changeDetection:0});let n=r;return n})();function Ii(n,r){try{let o=r?.trim();if(!o)return;let t=(n||[]).find(e=>e?.metadata?.clientGroupId===o||e?.metadata?.groupId===o);return t?{id:t.metadata.clientGroupId||t.metadata.groupId,name:t.metadata.groupName,members:[]}:void 0}catch{return}}var Oi=(n,r,o,t)=>({componentConfigSignal:n,parentLocalUIState:r,newUserContact:o,newUserContactError:t}),Di=(n,r)=>({condition:n,data:r}),wi=(n,r,o)=>({componentConfigSignal:n,newUserContact:r,newUserContactError:o}),Ti=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-empty-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Ei(n,r){if(n&1&&(S(0,"span",3),N(1),I()),n&2){let o=l(4);A("data-testid",o.componentId+"-add-contact"),g(),X(' Add "',o.newUserContact==null||o.newUserContact.contact==null?null:o.newUserContact.contact.email,'" ')}}function Ai(n,r){if(n&1&&(S(0,"span",4),N(1),I()),n&2){let o=l(4);A("data-testid",o.componentId+"-error"),g(),X(" ",o.newUserContactError," ")}}function Mi(n,r){if(n&1&&(S(0,"span",5),N(1," No results found "),I()),n&2){let o=l(4);A("data-testid",o.componentId+"-no-results")}}function Pi(n,r){if(n&1&&(y(0),S(1,"div",2),w(2,Ei,2,2,"span",3)(3,Ai,2,2,"span",4)(4,Mi,2,1,"span",5),I(),k()),n&2){let o=l(3);g(),A("data-testid",o.componentId),g(),T(!(o.newUserContact==null||o.newUserContact.contact==null)&&o.newUserContact.contact.email&&!o.newUserContactError?2:o.newUserContactError?3:4)}}function Fi(n,r){if(n&1&&(y(0),p(1,Pi,5,2,"ng-container",1),k()),n&2){let o=l(),t=l();g(),d("veltDynamicTemplate",z(5,Ti,t.template,rt(1,wi,t.componentConfigSignal,t.newUserContact,t.newUserContactError),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Ri(n,r){if(n&1&&p(0,Fi,2,11,"ng-container",0),n&2){let o=l();d("veltIf",D(6,Di,o.conditionSignal(),_t(1,Oi,o.componentConfigSignal,o.localUIStateSignal,o.newUserContact,o.newUserContactError)))}}var Xe=(()=>{let r=class r extends q{constructor(){super(),this.componentId="velt-autocomplete-empty",this.componentConfigSignal=M({})}ngOnInit(){try{super.ngOnInit(),this.dynamicDataService.applyConditionalClasses(this.hostElementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,newUserContact:this.newUserContact,newUserContactError:this.newUserContactError})}catch(t){this.loggingService.catch("Error in AutocompleteEmptyComponent ngOnInit:",t)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteEmptyComponent ngOnDestroy:",t)}}setupA11yAttributes(){try{let t=this.hostElementRef.nativeElement;t.setAttribute("role","status"),t.setAttribute("data-testid",this.componentId+"-container"),t.setAttribute("aria-live","polite")}catch(t){this.loggingService.catch("Error in AutocompleteEmptyComponent setupA11yAttributes:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-empty-internal"]],inputs:{newUserContact:"newUserContact",newUserContactError:"newUserContactError"},standalone:!1,features:[F([_]),j],decls:1,vars:1,consts:[[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"velt-autocomplete-empty"],[1,"velt-autocomplete-empty--add-contact"],[1,"velt-autocomplete-empty--error"],[1,"velt-autocomplete-empty--no-results"]],template:function(e,i){if(e&1&&w(0,Ri,1,9,"ng-container"),e&2){let a;T((a=i.componentConfigSignal())?0:-1,a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]:empty{display:none}.velt-autocomplete-empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:8px 16px;color:var(--velt-text-6, #666);font-size:14px;line-height:1.5}.velt-autocomplete-empty--add-contact[_ngcontent-%COMP%]{color:var(--velt-text-1);cursor:pointer}.velt-autocomplete-empty--error[_ngcontent-%COMP%]{color:var(--velt-error-color, #dc3545)}.velt-autocomplete-empty--no-results[_ngcontent-%COMP%]{color:var(--velt-text-6, #666);font-style:italic}"],changeDetection:0});let n=r;return n})();var ct=class{constructor(){this.closeDialog=()=>{},this.darkMode=!1,this.variant="",this.type=""}};var Ze=n=>({componentConfigSignal:n}),ji=(n,r)=>({condition:n,data:r}),Ni=(n,r,o,t)=>({template:n,context:r,componentName:"velt-confirm-dialog-reject-button-wireframe",setIfCondition:o,componentElementRef:t});function Ui(n,r){if(n&1&&(y(0),S(1,"button",4),N(2),B(3,"translate"),I(),k()),n&2){let o=l(2).ngIf;g(2),X(" ",L(3,1,(o==null?null:o.noButton)||"No")," ")}}function Bi(n,r){if(n&1){let o=Ot();y(0),S(1,"div",2),Dt("pointerdown",function(e){return yt(o),kt(e.stopPropagation())}),p(2,Ui,4,3,"ng-container",3),I(),k()}if(n&2){let o=l(2);g(),A("data-testid",o.componentId+"-button"),g(),d("veltDynamicTemplate",_t(4,Ni,o.template,R(2,Ze,o.componentConfigSignal),o.setIfCondition.bind(o),o.elementRef))}}function Li(n,r){if(n&1&&(y(0),p(1,Bi,3,9,"ng-container",1),k()),n&2){let o=l();g(),d("veltIf",D(3,ji,o.conditionSignal(),R(1,Ze,o.componentConfigSignal)))}}var qe=(()=>{let r=class r extends lt{constructor(t,e,i){super(t,e,i),this.elementRef=t,this.dynamicDataService=e,this.loggingService=i,this.componentId="velt-confirm-dialog-reject",super.initializeComponentConfigSignal(new ct)}ngOnInit(){try{super.ngOnInit()}catch(t){this.loggingService.catch("Error in ConfirmDialogRejectComponent ngOnInit: ",t)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in ConfirmDialogRejectComponent ngOnDestroy: ",t)}}};r.\u0275fac=function(e){return new(e||r)(O(tt),O(_),O(U))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-reject"]],standalone:!1,features:[F([_]),j],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["mat-button","","mat-dialog-close","",3,"pointerdown"],[4,"veltDynamicTemplate"],[1,"velt-confirm-dialog--reject"]],template:function(e,i){e&1&&p(0,Li,2,6,"ng-container",0),e&2&&d("ngIf",i.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{flex:1}.velt-confirm-dialog--reject[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;padding:var(--velt-spacing-md) var(--velt-spacing-lg);border-radius:var(--velt-border-radius-3xl);border:0;transition:.2s;cursor:pointer;color:var(--velt-text-0);background-color:var(--velt-background-2);font-size:var(--velt-font-size-md);font-style:normal;font-weight:600;line-height:normal}.velt-confirm-dialog--reject[_ngcontent-%COMP%]:hover{background-color:var(--velt-background-4)}"],changeDetection:0});let n=r;return n})();var Qe=n=>({componentConfigSignal:n}),zi=(n,r)=>({condition:n,data:r}),$i=(n,r,o,t)=>({template:n,context:r,componentName:"velt-confirm-dialog-approve-button-wireframe",setIfCondition:o,componentElementRef:t});function Vi(n,r){if(n&1&&(y(0),S(1,"button",4),N(2),B(3,"translate"),I(),k()),n&2){let o=l(2).ngIf;g(2),X(" ",L(3,1,(o==null?null:o.yesButton)||"Yes")," ")}}function Gi(n,r){if(n&1){let o=Ot();y(0),S(1,"div",2),Dt("pointerdown",function(e){return yt(o),kt(e.stopPropagation())})("click",function(){yt(o);let e=l().ngIf;return kt(e==null?null:e.closeDialog(!0))}),p(2,Vi,4,3,"ng-container",3),I(),k()}if(n&2){let o=l(2);g(),A("data-testid",o.componentId+"-button"),g(),d("veltDynamicTemplate",_t(4,$i,o.template,R(2,Qe,o.componentConfigSignal),o.setIfCondition.bind(o),o.elementRef))}}function Hi(n,r){if(n&1&&(y(0),p(1,Gi,3,9,"ng-container",1),k()),n&2){let o=l();g(),d("veltIf",D(3,zi,o.conditionSignal(),R(1,Qe,o.componentConfigSignal)))}}var tn=(()=>{let r=class r extends lt{constructor(t,e,i){super(t,e,i),this.elementRef=t,this.dynamicDataService=e,this.loggingService=i,this.componentId="velt-confirm-dialog-approve",super.initializeComponentConfigSignal(new ct)}ngOnInit(){try{super.ngOnInit()}catch(t){this.loggingService.catch("Error in ConfirmDialogApproveComponent ngOnInit: ",t)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in ConfirmDialogApproveComponent ngOnDestroy: ",t)}}};r.\u0275fac=function(e){return new(e||r)(O(tt),O(_),O(U))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-approve"]],standalone:!1,features:[F([_]),j],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["mat-button","","cdkFocusInitial","",3,"pointerdown","click"],[4,"veltDynamicTemplate"],[1,"velt-confirm-dialog--approve"]],template:function(e,i){e&1&&p(0,Hi,2,6,"ng-container",0),e&2&&d("ngIf",i.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{flex:1}.velt-confirm-dialog--approve[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;padding:var(--velt-spacing-md) var(--velt-spacing-lg);border-radius:var(--velt-border-radius-3xl);border:0;transition:.2s;cursor:pointer;background-color:var(--velt-error);color:var(--velt-error-foreground);font-size:var(--velt-font-size-md);font-style:normal;font-weight:500;line-height:normal}.velt-confirm-dialog--approve[_ngcontent-%COMP%]:hover{background-color:var(--velt-error-hover)}"],changeDetection:0});let n=r;return n})();var en=n=>({componentConfigSignal:n}),Wi=(n,r)=>({condition:n,data:r}),Ji=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-confirm-dialog-title-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Ki(n,r){if(n&1&&(S(0,"h2",4),N(1),B(2,"translate"),I()),n&2){let o=l(3).ngIf,t=l();A("data-testid",t.componentId),g(),Ct(L(2,2,o==null?null:o.title))}}function Yi(n,r){if(n&1&&(y(0),p(1,Ki,3,4,"h2",3),k()),n&2){let o=l(2).ngIf;g(),d("ngIf",o==null?null:o.title)}}function Xi(n,r){if(n&1&&(y(0),p(1,Yi,2,1,"ng-container",2),k()),n&2){let o=l().ngIf,t=l();g(),d("veltDynamicTemplate",z(3,Ji,t.template,R(1,en,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Zi(n,r){if(n&1&&(y(0),p(1,Xi,2,9,"ng-container",1),k()),n&2){let o=l();g(),d("veltIf",D(3,Wi,o.conditionSignal(),R(1,en,o.componentConfigSignal)))}}var nn=(()=>{let r=class r extends lt{constructor(t,e,i){super(t,e,i),this.elementRef=t,this.dynamicDataService=e,this.loggingService=i,this.componentId="velt-confirm-dialog-title",super.initializeComponentConfigSignal(new ct)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(t){this.loggingService.catch("Error in ConfirmDialogTitleComponent ngOnInit: ",t)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in ConfirmDialogTitleComponent ngOnDestroy: ",t)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(t){this.loggingService.catch("Error in ConfirmDialogTitleComponent setupA11yAttributes:",t)}}};r.\u0275fac=function(e){return new(e||r)(O(tt),O(_),O(U))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-title"]],standalone:!1,features:[F([_]),j],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["mat-dialog-title","","class","velt-confirm-dialog-title",4,"ngIf"],["mat-dialog-title","",1,"velt-confirm-dialog-title"]],template:function(e,i){e&1&&p(0,Zi,2,6,"ng-container",0),e&2&&d("ngIf",i.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}.velt-confirm-dialog-title[_ngcontent-%COMP%]{color:var(--velt-text-0);font-size:var(--velt-font-size-xl);font-style:normal;font-weight:600;line-height:1.5;padding:0 24px 9px}"],changeDetection:0});let n=r;return n})();var on=n=>({componentConfigSignal:n}),qi=(n,r)=>({condition:n,data:r}),Qi=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-confirm-dialog-message-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function ta(n,r){if(n&1&&(S(0,"div"),N(1),B(2,"translate"),I()),n&2){let o=l(3).ngIf;g(),X(" ",L(2,1,o==null?null:o.message)," ")}}function ea(n,r){if(n&1&&(y(0),p(1,ta,3,3,"div",0),k()),n&2){let o=l(2).ngIf;g(),d("ngIf",o==null?null:o.message)}}function na(n,r){if(n&1&&(y(0),S(1,"div",2),p(2,ea,2,1,"ng-container",3),I(),k()),n&2){let o=l().ngIf,t=l();g(),A("data-testid",t.componentId),g(),d("veltDynamicTemplate",z(4,Qi,t.template,R(2,on,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function oa(n,r){if(n&1&&(y(0),p(1,na,3,10,"ng-container",1),k()),n&2){let o=l();g(),d("veltIf",D(3,qi,o.conditionSignal(),R(1,on,o.componentConfigSignal)))}}var rn=(()=>{let r=class r extends lt{constructor(t,e,i){super(t,e,i),this.elementRef=t,this.dynamicDataService=e,this.loggingService=i,this.componentId="velt-confirm-dialog-message",super.initializeComponentConfigSignal(new ct)}ngOnInit(){try{super.ngOnInit()}catch(t){this.loggingService.catch("Error in ConfirmDialogMessageComponent ngOnInit: ",t)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in ConfirmDialogMessageComponent ngOnDestroy: ",t)}}};r.\u0275fac=function(e){return new(e||r)(O(tt),O(_),O(U))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-message"]],standalone:!1,features:[F([_]),j],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["mat-dialog-content","",1,"velt-confirm-dialog-message"],[4,"veltDynamicTemplate"]],template:function(e,i){e&1&&p(0,oa,2,6,"ng-container",0),e&2&&d("ngIf",i.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}.velt-confirm-dialog-message[_ngcontent-%COMP%]{margin:var(--velt-spacing-sm) 0;font-size:var(--velt-font-size-md);font-style:normal;font-weight:400;line-height:normal;color:var(--velt-text-0);padding:20px 24px}"],changeDetection:0});let n=r;return n})();var an=n=>({componentConfigSignal:n}),ra=(n,r)=>({condition:n,data:r}),ia=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-confirm-dialog-preview-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function aa(n,r){if(n&1&&(S(0,"div",5),N(1),I()),n&2){let o=l(3).ngIf;g(),Ct(o==null?null:o.previewText)}}function la(n,r){if(n&1&&(y(0),p(1,aa,2,1,"div",4),k()),n&2){let o=l(2).ngIf;g(),d("ngIf",o==null?null:o.previewText)}}function ca(n,r){if(n&1&&(y(0),S(1,"div",2),p(2,la,2,1,"ng-container",3),I(),k()),n&2){let o=l().ngIf,t=l();g(),A("id",t.componentId)("data-testid",t.componentId),g(),d("veltDynamicTemplate",z(5,ia,t.template,R(3,an,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function sa(n,r){if(n&1&&(y(0),p(1,ca,3,11,"ng-container",1),k()),n&2){let o=l();g(),d("veltIf",D(3,ra,o.conditionSignal(),R(1,an,o.componentConfigSignal)))}}var ln=(()=>{let r=class r extends lt{constructor(t,e,i){super(t,e,i),this.elementRef=t,this.dynamicDataService=e,this.loggingService=i,this.componentId="velt-confirm-dialog-preview",super.initializeComponentConfigSignal(new ct)}ngOnInit(){try{super.ngOnInit()}catch(t){this.loggingService.catch("Error in ConfirmDialogPreviewComponent ngOnInit: ",t)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in ConfirmDialogPreviewComponent ngOnDestroy: ",t)}}};r.\u0275fac=function(e){return new(e||r)(O(tt),O(_),O(U))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-preview"]],standalone:!1,features:[F([_]),j],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[1,"velt-confirm-dialog-preview"],[4,"veltDynamicTemplate"],["class","velt-confirm-dialog-preview-text",4,"ngIf"],[1,"velt-confirm-dialog-preview-text"]],template:function(e,i){e&1&&p(0,sa,2,6,"ng-container",0),e&2&&d("ngIf",i.componentConfigSignal())},styles:['@charset "UTF-8";html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}.velt-confirm-dialog-preview[_ngcontent-%COMP%]{padding:0}.velt-confirm-dialog-preview-text[_ngcontent-%COMP%]{background-color:var(--velt-background-2);color:var(--velt-text-0);border-radius:var(--velt-border-radius-lg);padding:var(--velt-spacing-md);font-size:var(--velt-font-size-md);font-style:italic;font-weight:400;line-height:1.5;color:var(--velt-text-1);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}.velt-confirm-dialog-preview-text[_ngcontent-%COMP%]:before{content:"\\201c"}.velt-confirm-dialog-preview-text[_ngcontent-%COMP%]:after{content:"\\201d"}'],changeDetection:0});let n=r;return n})();var Kt={"velt-autocomplete-option-wireframe":Ge,"velt-autocomplete-group-option-wireframe":Ye,"velt-autocomplete-empty-wireframe":Xe,"velt-autocomplete-option-icon-wireframe":$e,"velt-autocomplete-option-name-wireframe":Ve,"velt-autocomplete-option-description-wireframe":Be,"velt-autocomplete-option-error-icon-wireframe":ze,"velt-autocomplete-chip-tooltip-wireframe":Ne,"velt-autocomplete-chip-tooltip-icon-wireframe":Re,"velt-autocomplete-chip-tooltip-name-wireframe":je,"velt-autocomplete-chip-tooltip-description-wireframe":Pe,"velt-data":He,"velt-if":We,"velt-button-wireframe":Ke,"velt-confirm-dialog-wireframe":Oe,"velt-confirm-dialog-reject-button-wireframe":qe,"velt-confirm-dialog-approve-button-wireframe":tn,"velt-confirm-dialog-title-wireframe":nn,"velt-confirm-dialog-message-wireframe":rn,"velt-confirm-dialog-preview-wireframe":ln};var cn=(()=>{let r=class r{constructor(t,e,i){this.injector=t,this.appRef=e,this.loggingService=i,this.componentRefs=new Map,this.veltFunctionComponents=["velt-if","velt-data","velt-button-wireframe"];try{this.loggingService.log("%c[WB] Creating CLASS: DynamicComponentService","color: blue;")}catch(a){this.loggingService.catch("Error in DynamicComponentService constructor: ",a)}}isSignalInput(t,e){try{let i=t[e];if(i&&typeof i=="function"){let a=i.toString();if(a.length<200&&!a.includes("native code"))return!0}return!1}catch{return!1}}setPropertyOnComponent(t,e,i){try{if(this.isSignalInput(t.instance,e))t.setInput(e,i);else{let a=e.replace(/-([a-z])/g,(c,v)=>v.toUpperCase());a!==e&&this.isSignalInput(t.instance,a)?t.setInput(a,i):t.instance[e]=i}}catch{try{t.instance[e]=i}catch(c){this.loggingService.warn(`Failed to set property '${e}' on component:`,c)}}}createComponentRef(t,e,i=!0){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: createComponentRef","color: green;"),e&&this.componentRefs.has(e)){let a=this.componentRefs.get(e);return a||null}else{let a=pe(t,{environmentInjector:this.injector.get(ce)});return i&&this.appRef.attachView(a.hostView),a}}catch(a){return this.loggingService.catch("Error in DynamicComponentService createComponentRef: ",a),null}}injectComponentIntoAndMoveChildren(t,e,i,a){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: injectComponentIntoAndMoveChildren","color: green;"),!Kt[t])return null;let c=a?`${a}__${t}`:"",v=e?.getAttribute("velt-wireframe-id");v&&(c=`${a}__${v}__${t}`);let s=this.createComponentRef(Kt[t],c,!1);if(!s||!e)return null;let u=s.location.nativeElement;if((e?.children?.length>0||e?.innerHTML?.trim()?.length>0)&&(s.instance.template=e),e.attributes.length>0)for(let h=0;h<e.attributes.length;h++){let E=e.attributes[h],x=E.name,b=E.value;x==="class"?u.classList.add(b):x==="style"?u.setAttribute("style",b):x==="velt-if"?s.instance.veltIf=b:(u.setAttribute(x,b),this.setPropertyOnComponent(s,x,b))}return i&&typeof i=="object"&&Object.keys(i).forEach(h=>{this.veltFunctionComponents.includes(t)?s.instance.updateDataComponentConfigSignal(h,i[h]):this.setPropertyOnComponent(s,h,i[h])}),this.appRef.attachView(s.hostView),e.parentNode?e.parentNode.replaceChild(u,e):e.appendChild(u),s}catch(c){return this.loggingService.catch("Error in DynamicComponentService injectComponentIntoAndMoveChildren: ",c),null}}processAndReplaceVeltComponents(t,e,i,a=[],c){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: processAndReplaceVeltComponents","color: green;"),!t)return[];let v=[],s=t.tagName.toLowerCase();if(Kt[s]&&!a?.includes(s)){let h=this.injectComponentIntoAndMoveChildren(s,t,e,i);return h&&v.push(h),v}return Array.from(t.children).forEach(h=>{let E=this.processAndReplaceVeltComponents(h,e,i,a,c);v.push(...E)}),v}catch(v){return this.loggingService.catch("Error in DynamicComponentService processAndReplaceVeltComponents: ",v),[]}}getComponentRef(t){return this.componentRefs.get(t)||null}getAllComponentRefs(){return this.componentRefs}attachComponentToView(t){try{this.loggingService.log("%cc[WB] Calling FUNCTION: attachComponentToView","color: green;"),t&&this.appRef.attachView(t.hostView)}catch(e){this.loggingService.catch("Error in DynamicComponentService attachComponentToView: ",e)}}detachComponentFromView(t){try{this.loggingService.log("%c[WB] Calling FUNCTION: detachComponentFromView","color: green;"),t&&this.appRef.detachView(t.hostView)}catch(e){this.loggingService.catch("Error in DynamicComponentService detachComponentFromView: ",e)}}setCommentRefData(t,e){try{this.loggingService.log("%c[WB] Calling FUNCTION: setCommentRefData","color: green;"),e&&t&&typeof t=="object"&&(Object.keys(t).forEach(i=>{let a=e.instance?.template?.nodeName?.toLowerCase();this.veltFunctionComponents.includes(a)?e.instance.updateDataComponentConfigSignal(i,t[i]):this.setPropertyOnComponent(e,i,t[i])}),typeof e.instance?.refreshAnnotationContextFromSignal=="function"&&e.instance.refreshAnnotationContextFromSignal())}catch(i){this.loggingService.catch("Error in DynamicComponentService setCommentRefData: ",i)}}destroyComponentRefsByIdStartsWith(t){try{this.loggingService.log("%c[WB] Calling FUNCTION: destroyComponentRefsByIdStartsWith","color: green;"),this.componentRefs.forEach((e,i)=>{i.startsWith(t)&&(e.destroy(),this.componentRefs.delete(i))})}catch(e){this.loggingService.catch("Error in DynamicComponentService destroyComponentRefsByIdStartsWith: ",e)}}};r.\u0275fac=function(e){return new(e||r)(G(mt),G(se),G(U))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var gd=(()=>{let r=class r{set veltDynamicTemplate({template:t,context:e,id:i,cloneTemplate:a,componentName:c,variant:v,suffix:s,setIfCondition:u,componentElementRef:h,replaceTemplate:E=!0}){try{if(s&&(c+=`--${s}`),v&&(c+=`---${v}`),c){let x=this.wireframeService.getConditionElement(c);if(!x&&t&&(x=t),x){let b=x?.getAttribute("velt-if");b&&u&&u(b),Array.from(x.attributes).forEach(C=>{h?.nativeElement.setAttribute(C.name,C.value)}),e?.componentConfigSignal?(this.dynamicDataService.applyConditionalClasses(h?.nativeElement,e),this.dynamicDataService.executeConditionalClasses()):this.dynamicDataService.applyConditionalClasses(h?.nativeElement)}}if(c&&!t){let x=this.wireframeService.getWireframe(c);if(x){let b=document.createElement(x.tagName);b.innerHTML=x.innerHTML,this.template=b}}else this.template=t;this.data=e,this.id=i,this.cloneTemplate=!!a,this.cloneTemplate&&t&&(this.template=this.domService.deepCloneElement(t)),this.checkToUpdateTemplate(E)}catch(x){this.loggingService.warn("Error in DynamicTemplateDirective veltDynamicTemplate: ",x)}}constructor(t,e,i,a,c,v,s,u){this.elementRef=t,this.templateRef=e,this.viewContainer=i,this.dynamicComponentService=a,this.loggingService=c,this.domService=v,this.wireframeService=s,this.dynamicDataService=u,this.directiveId=Math.random().toString(36).substring(7),this.isCustomTemplateMode=!1,this.isDefaultTemplateMode=!1,this.cloneTemplate=!1,this.injectedElements=[],this.componentRefs=[];try{this.loggingService.log("%c[WB] Creating CLASS: DynamicTemplateDirective","color: blue;")}catch(h){this.loggingService.catch("Error in DynamicTemplateDirective constructor: ",h)}}checkDataValue(t,e){let i=t.querySelectorAll("[data-velt]");function a(c,v){return v.split(".").reduce((s,u)=>s&&s[u],c)}i.forEach(c=>{let v=c.getAttribute("data-velt");if(v&&e){let s=a(e,v);c instanceof HTMLElement&&(c.innerText=JSON.stringify(s,null,2))}})}checkToUpdateTemplate(t){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: checkToUpdateTemplate","color: green;"),this.template&&t)if(this.isDefaultTemplateMode=!1,this.isCustomTemplateMode)this.updateDataOnComponentRefs(this.data);else{this.isCustomTemplateMode=!0,this.cleanUp();let e=document.createElement(this.template.tagName);e.innerHTML=this.template.innerHTML,this.injectElementNextToSibling(this.elementRef.nativeElement,e)}else this.isCustomTemplateMode=!1,this.isDefaultTemplateMode||(this.cleanUp(),this.viewContainer.createEmbeddedView(this.templateRef),this.isDefaultTemplateMode=!0)}catch(e){this.loggingService.catch("Error in DynamicTemplateDirective checkToUpdateTemplate: ",e)}}injectElementNextToSibling(t,e){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: injectElementNextToSibling","color: green;"),!e)return;this.cleanUp();let i=e;for(let c=0;c<i.children.length;c++){let v=i.children[c],s=this.dynamicComponentService.processAndReplaceVeltComponents(v,this.data,this.id?this.id:`from-directive-${this.directiveId}`,[],"from directive");s?.length&&this.componentRefs.push(...s)}i.setAttribute("data-velt-added-from-directive","true"),this.customTemplate=i;let a=Array.from(i.childNodes).reverse();t.nextSibling&&t.nextSibling&&t.nextSibling.getAttribute&&t.nextSibling.getAttribute("data-velt-added-from-directive")&&t.parentNode.removeChild(t.nextSibling),a.forEach(c=>{t.parentNode.insertBefore(c,t.nextSibling),c instanceof Element&&this.injectedElements.push(c)}),i.remove()}catch(i){this.loggingService.catch("Error in DynamicTemplateDirective injectElementNextToSibling: ",i)}}updateDataOnComponentRefs(t){try{this.loggingService.log("%c[WB] Calling FUNCTION: updateDataOnComponentRefs","color: green;"),this.componentRefs.forEach(e=>{this.dynamicComponentService.setCommentRefData(t,e)})}catch(e){this.loggingService.catch("Error in DynamicTemplateDirective updateDataOnComponentRefs: ",e)}}ngOnDestroy(){try{this.cleanUp()}catch(t){this.loggingService.catch("Error in DynamicTemplateDirective ngOnDestroy: ",t)}}cleanUp(){try{this.componentRefs.forEach(t=>{t.destroy()}),this.injectedElements.forEach(t=>{t.remove()}),this.injectedElements=[],this.viewContainer.clear()}catch(t){this.loggingService.catch("Error in DynamicTemplateDirective cleanUp: ",t)}}};r.\u0275fac=function(e){return new(e||r)(O(tt),O(zt),O($t),O(cn),O(U),O(Se),O(At),O(_))},r.\u0275dir=Vt({type:r,selectors:[["","veltDynamicTemplate",""]],inputs:{veltDynamicTemplate:"veltDynamicTemplate"}});let n=r;return n})();var Sd=(()=>{let r=class r{set veltIf(t){this.handleVeltIfChange(t)}constructor(t,e,i,a,c){this.templateRef=t,this.viewContainer=e,this.dynamicDataService=i,this.loggingService=a,this.injector=c,this.destroy$=new It,this.conditionRegex=/\{(.*?)\}/g,this.dataComponentConfig=M({}),this.extractedProps={},this.hasView=!1,this.cleanupEffects=[];try{this.dynamicDataService.getCommonData().pipe(ae(this.destroy$)).subscribe(v=>{this.processCondition(v)})}catch(v){this.loggingService.catch("Error in IfDirective constructor:",v)}}ngOnInit(){try{if(!this.context?.data)return;Object.entries(this.context.data).forEach(([t,e])=>{this.updateConfig(t,e)}),this.context.condition&&this.processCondition()}catch(t){this.loggingService.catch("Error in IfDirective ngOnInit:",t)}}ngOnDestroy(){try{this.cleanupEffects.forEach(t=>t.destroy()),this.cleanupEffects.length=0,this.destroy$.next(),this.destroy$.complete()}catch(t){this.loggingService.catch("Error in IfDirective ngOnDestroy:",t)}}handleVeltIfChange(t){try{if(this.context=t,!t.condition){this.hasView||(this.viewContainer.createEmbeddedView(this.templateRef),this.hasView=!0);return}this.processCondition()}catch(e){this.loggingService.warn("Error in IfDirective input setter:",e)}}processCondition(t){try{this.extractProps(),t&&this.dataComponentConfig.update(e=>(e=m(m({},e),t),e)),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfig,this.extractedProps),this.getComputedValues(this.dataComponentConfig,this.evaluateCondition.bind(this),this.extractedProps)}catch(e){this.loggingService.catch("Error in IfDirective processCondition:",e)}}getComputedValues(t,e,i,a,c,v){try{this.cleanupEffects.forEach(s=>s.destroy()),this.cleanupEffects.length=0,Object.keys(i).forEach(s=>{let u;if(ot(t)?u=it(()=>at(t(),i[s].path)):u=it(()=>at(t,i[s].path)),ot(u())){let h=bt(()=>{try{let E=u()();i[s].value=E,this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector,allowSignalWrites:!0});this.cleanupEffects.push(h)}else{let h=u();i[s].value=h,this.extractedProps=i,this.evaluateCondition()}})}catch(s){this.loggingService.catch("Error in DynamicDataService getComputedValues: ",s)}}extractProps(){try{this.extractedProps={},this.conditionRegex.lastIndex=0;let t;for(;(t=this.conditionRegex.exec(this.context?.condition??""))!==null;){let e=t[1];this.extractedProps[e]={value:null,path:null,isDynamicPath:this.hasDynamicParts(e)}}}catch(t){this.loggingService.catch("Error in IfDirective extractProps:",t)}}hasDynamicParts(t){try{let e=/\[[^\]'"]*[^\]'"]\]/.test(t),i=/\[[^[\]]*[\.\[][^[\]]*\]/.test(t);return e||i}catch(e){return this.loggingService.catch("Error checking for dynamic path: ",e),!1}}evaluateCondition(){try{if(!this.context?.condition)return!1;let t=this.buildConditionString(),e=this.sanitizeCondition(t),i=this.dynamicDataService.safeEval(e);return this.updateView(i),i}catch(t){return this.loggingService.catch("Error in IfDirective evaluateCondition:",t),this.clearView(),!1}}buildConditionString(){try{return this.context.condition.replace(this.conditionRegex,(t,e)=>{let i=this.extractedProps[e];if(i?.value!==void 0){let a=i.value;return typeof a=="string"?`'${a}'`:typeof a=="boolean"||typeof a=="number"?String(a):a===null?"null":typeof a=="object"?a?"true":"false":String(a)}return"false"})}catch(t){return this.loggingService.catch("Error in IfDirective buildConditionString:",t),""}}sanitizeCondition(t){try{return t.replace(/[^a-zA-Z0-9\s\+\-\*\/\%\(\)\!\=\<\>\|\&\.\[\]\{\},'"]/g,"")}catch(e){return this.loggingService.catch("Error sanitizing condition:",e),""}}updateView(t){try{t&&!this.hasView?(this.viewContainer.createEmbeddedView(this.templateRef),this.hasView=!0):!t&&this.hasView&&this.clearView()}catch(e){this.loggingService.catch("Error in IfDirective updateView:",e)}}clearView(){try{this.viewContainer.clear(),this.hasView=!1}catch(t){this.loggingService.catch("Error in IfDirective clearView:",t)}}updateConfig(t,e){try{this.dataComponentConfig.update(i=>f(m({},i),{[t]:e}))}catch(i){this.loggingService.catch("Error in IfDirective updateConfig:",i)}}};r.\u0275fac=function(e){return new(e||r)(O(zt),O($t),O(_),O(U),O(mt))},r.\u0275dir=Vt({type:r,selectors:[["","veltIf",""]],inputs:{veltIf:"veltIf"},features:[F([_])]});let n=r;return n})();export{De as a,we as b,Wt as c,Jt as d,q as e,Pe as f,Re as g,je as h,Ne as i,Be as j,ze as k,$e as l,Ve as m,Ge as n,ct as o,qe as p,tn as q,nn as r,rn as s,ln as t,We as u,Je as v,Ke as w,Ye as x,Xe as y,Kt as z,cn as A,gd as B,Sd as C};
package/chunk-BONBMEV3.js DELETED
@@ -1 +0,0 @@
1
- import{a as N}from"./chunk-5QRNDPMH.js";import{$ as v,Di as B,E as P,Ee as m,G as x,I as C,Ii as J,J as f,Ma as j,Ri as K,Si as W,Vf as $,Vg as V,Wg as L,Xg as H,Yg as z,Zg as R,_g as F,bb as X,ca as a,l as p,la as M,lg as T,ni as g,qg as k,r as A,vi as G,w as D,wi as b,z as y}from"./chunk-Z3CHFM5M.js";var h=(function(l){return l.CLICK="click",l.HOVER="hover",l.SCROLL="scroll",l.NAVIGATE="navigate",l})(h||{}),u=class{constructor(){this.type=h.HOVER,this.data=null,this.pageInfo=k(),this.timestamp=Date.now()}},U=class{constructor(n,w){this.targetXpath=n,this.xpath=w}};var E=class{constructor(){this.sessionId=null,this.isLeader=!1,this.lastProcessedActionTimestamp=null}};var S=class{constructor(n){this.snippylyId=n,this.joinTimestamp=Date.now()}};var I=class{constructor(n,w,e){this.followers=[],this.actionStack=[],this.id=$(),this.leaderId=n,this.leaderName=w,this.followers.push(new S(e))}};var Q=(()=>{let n=class n{constructor(e,t,r,i,o,s){this.databaseService=e,this.docService=t,this.loggingService=r,this.authService=i,this.commonDbService=o,this.realtimeAdapter=s,this.currentUser$=new p(null),this.currentSession$=new p(null);try{this.databaseService.getDb().pipe(P(c=>!!c),f(1)).subscribe(c=>{c&&(this.db=c)},c=>{this.loggingService.catch("Error in FlockSessionService getDb subscription: ",c)}),this.authService.getUser$().subscribe(c=>{c&&c.userSnippylyId&&(this.user=c)})}catch(c){this.loggingService.catch("Error in FlockSessionService constructor: ",c)}}startCurrentFlockUserSubscription(e){try{this.currentUserSub?.unsubscribe(),e&&e.userSnippylyId&&(this.user=e,this.subscribeToCurrentFlockUser(e?.userSnippylyId))}catch(t){this.loggingService.catch("Error in FlockSessionService startCurrentFlockUserSubscription: ",t)}}stopCurrentFlockUserSubscription(){try{this.currentUserSub?.unsubscribe()}catch(e){this.loggingService.catch("Error in FlockSessionService stopCurrentFlockUserSubscription: ",e)}}provisionFlockSession(e,t,r){try{let i=this.docService.getDocumentPaths();i&&this.db&&this.commonDbService.dbListener({feature:"flockUser",properties:{documentId:i?.documentId,organizationId:i?.organizationId,id:e,skipFirestore:!0}}).pipe(f(1)).subscribe(o=>{o?.data&&o?.data?.sessionId?this.subscribeToCurrentSession(o?.data?.sessionId,r):this.createFlockSession(e,t,r)})}catch(i){this.loggingService.catch("Error in FlockSessionService provisionFlockSession: ",i)}return null}swapLeader(e,t,r){try{if(this.updateRemoteFlockUser(e,{isLeader:!1}),this.updateRemoteFlockUser(t,{isLeader:!0}),this.currentSession){this.currentSession.leaderId=t,this.currentSession.leaderName=r,this.currentSession.followers.push(new S(e));let i=this.currentSession.followers.findIndex(o=>o.snippylyId===t);i>-1&&this.currentSession.followers.splice(i,1),this.updateSession(this.currentSession.id,this.currentSession)}}catch(i){this.loggingService.catch("Error in FlockSessionService swapLeader: ",i)}}createFlockSession(e,t,r){try{let i=new I(e,t,r);return this.updateRemoteFlockUser(e,{snippylyId:e,sessionId:i.id,isLeader:!0}),this.updateSession(i.id,i),this.subscribeToCurrentSession(i.id),i.id}catch(i){this.loggingService.catch("Error in FlockSessionService createFlockSession: ",i)}return null}removeFollowerFromCurrentSession(e){try{if(this.currentSession){this.updateRemoteFlockUser(e,{sessionId:null,lastProcessedActionTimestamp:null});let t=this.currentSession.followers.findIndex(r=>r.snippylyId===e);if(t>-1){if(this.currentSession.followers.splice(t,1),this.currentSession.followers.length===0){this.deleteSession(this.currentSession.id);return}this.updateSession(this.currentSession.id,this.currentSession),this.user&&this.user.userSnippylyId&&this.user.userSnippylyId===e&&(this.sessionSub?.unsubscribe(),this.currentSession=void 0,this.currentSession$?.next(null))}}}catch(t){this.loggingService.catch("Error in FlockSessionService removeFollowerFromSession: ",t)}}updateRemoteFlockUser(e,t={}){try{if(!e)return;let r=this.docService.getDocumentPaths();for(let i in t)t.hasOwnProperty(i)&&t[i]===void 0&&delete t[i];r&&this.db&&this.commonDbService.updateData({feature:"flockUser",properties:{documentId:r?.documentId??"",organizationId:r?.organizationId??"",id:e,skipFirestore:!0},data:JSON.parse(JSON.stringify(t))})}catch(r){this.loggingService.catch("Error in FlockSessionService updateRemoteFlockUser: ",r)}}subscribeToCurrentSession(e,t=void 0){try{let r=this.docService.getDocumentPaths();r&&this.db&&(this.sessionSub&&this.sessionSub.unsubscribe(),this.sessionSub=this.commonDbService.dbListener({feature:"flockSession",properties:{documentId:r?.documentId,organizationId:r?.organizationId,id:e,skipFirestore:!0}}).subscribe(i=>{i?.data&&typeof i?.data=="object"&&Object.keys(i?.data)?.length>0?(this.currentSession=i?.data,t!==void 0&&this.currentSession?.followers.findIndex(o=>o.snippylyId===t)===-1&&(this.currentSession.followers.push(new S(t)),this.updateSession(this.currentSession.id,this.currentSession)),this.currentSession$.next(this.currentSession??null)):(this.currentSession=void 0,this.currentSession$.next(null))}))}catch(r){this.loggingService.catch("Error in FlockSessionService subscribeToCurrentSession: ",r)}}subscribeToCurrentFlockUser(e){try{let t=this.docService.getDocumentPaths();t&&this.db&&(this.currentUserSub&&this.currentUserSub.unsubscribe(),this.currentUserSub=this.commonDbService.dbListener({feature:"flockUser",properties:{documentId:t?.documentId,organizationId:t?.organizationId,id:e,skipFirestore:!0}}).pipe(x(r=>(this.loggingService.catch("Error in FlockSessionService subscribeToCurrentFlockUser: ",r),A(null)))).subscribe(r=>{r?.data&&typeof r?.data=="object"&&Object.keys(r?.data)?.length>0&&(this.currentUser$.next(r?.data),r?.data?.sessionId&&this.subscribeToCurrentSession(r?.data?.sessionId))},r=>{this.loggingService.catch("Error in FlockSessionService subscribeToCurrentFlockUser subscription: ",r)}))}catch(t){this.loggingService.catch("Error in FlockSessionService subscribeToCurrentFlockUser: ",t)}}updateSession(e,t={}){try{if(!e)return;let r=this.docService.getDocumentPaths();for(let i in t)t.hasOwnProperty(i)&&t[i]===void 0&&delete t[i];r&&this.db&&this.commonDbService.updateData({feature:"flockSession",properties:{documentId:r?.documentId??"",organizationId:r?.organizationId??"",id:e,skipFirestore:!0},data:JSON.parse(JSON.stringify(t))})}catch(r){this.loggingService.catch("Error in FlockSessionService updateSession: ",r)}}deleteSession(e){try{let t=this.docService.getDocumentPaths();t&&this.db&&(this.commonDbService.deleteData({feature:"flockSession",properties:{documentId:t?.documentId??"",organizationId:t?.organizationId??"",id:e,skipFirestore:!0}}),this.currentSession&&e===this.currentSession.id&&(this.updateRemoteFlockUser(this.currentSession.leaderId,{sessionId:null,isLeader:!1,lastProcessedActionTimestamp:null}),this.currentSession.followers.forEach(r=>{this.updateRemoteFlockUser(r.snippylyId,{sessionId:null,lastProcessedActionTimestamp:null})}),this.currentSession=void 0,this.currentSession$.next(null),this.sessionSub?.unsubscribe()))}catch(t){this.loggingService.catch("Error in FlockSessionService deleteSession: ",t)}}addActionToStack(e,t){try{t=t&&JSON.parse(JSON.stringify(t));let r=this.docService.getDocumentPaths();if(r&&this.db&&e){let i=this.realtimeAdapter.rtdbRef(this.db,`${r.flock}/sessions/${e}/actionStack`);this.realtimeAdapter.rtdbRunTransaction("flockSession",i,o=>o?(o.unshift(t),o.slice(0,5)):[t]),t.type===h.NAVIGATE&&this.updateSession(e,{pageInfo:t.pageInfo})}}catch(r){this.loggingService.catch("Error in FlockSessionService addActionToStack: ",r)}}};n.\u0275fac=function(t){return new(t||n)(a(B),a(J),a(g),a(b),a(W),a(K))},n.\u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"});let l=n;return l})();var Z=(()=>{let n=class n{constructor(e,t,r,i){this.componentFactoryResolver=e,this.applicationRef=t,this.injector=r,this.loggingService=i,this.darkMode=!1}createFollowOverlay(e,t){try{let i=this.componentFactoryResolver.resolveComponentFactory(N).create(this.injector);i.instance.setLeaderName(e),i.instance.closeOverlayEvent.pipe(f(1)).subscribe(()=>{this.removeOverlay(),t()}),this.applicationRef.attachView(i.hostView),this.overlayRef=i,this.overlayRef.instance.darkMode=this.darkMode;let o=this.overlayRef.location.nativeElement;o.id="snippyly-follow-overlay",o.setAttribute(m.ATTRIBUTES.VELT_IGNORE,""),document.body.appendChild(o)}catch(r){this.loggingService.catch("Error in FlockOverlayService createFollowOverlay: ",r)}}createLeaderOverlay(e){let r=this.componentFactoryResolver.resolveComponentFactory(N).create(this.injector);r.instance.setType("leading"),r.instance.closeOverlayEvent.pipe(f(1)).subscribe(()=>{this.removeOverlay(),e()}),this.applicationRef.attachView(r.hostView),this.overlayRef=r,this.overlayRef.instance.darkMode=this.darkMode;let i=this.overlayRef.location.nativeElement;i.id="snippyly-follow-overlay",i.setAttribute(m.ATTRIBUTES.VELT_IGNORE,""),document.body.appendChild(i)}changeLeaderName(e){this.overlayRef&&this.overlayRef.instance.setLeaderName(e)}getLeaderName(){return this.overlayRef?this.overlayRef.instance.getLeaderName():null}removeOverlay(){if(this.overlayRef){let e=this.overlayRef.location.nativeElement;this.applicationRef.detachView(this.overlayRef.hostView),this.overlayRef.destroy(),e.shadowRoot&&e.shadowRoot.removeChild(e.shadowRoot.childNodes[0]),e.remove(),this.overlayRef=void 0}}setDarkMode(e){try{this.darkMode=e,this.overlayRef&&(this.overlayRef.instance.darkMode=e)}catch(t){this.loggingService.catch("Error in FlockOverlayService setDarkMode: ",t)}}};n.\u0275fac=function(t){return new(t||n)(a(j),a(X),a(M),a(g))},n.\u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"});let l=n;return l})();var Ce=(()=>{let n=class n{constructor(e,t,r,i,o){this.authService=e,this.domService=t,this.loggingService=r,this.flockSessionService=i,this.flockOverlayService=o,this.flockLeader$=new p({userId:"",name:""}),this.flockMode$=new p(!1),this.currentFlockUser=null,this.localScrollData=[],this.domSubscriptions=[],this.followOverlayCreated=!1,this.leaderOverlayCreated=!1,this.windowFocused=!0,this.tabFocused=!0,this.useHistoryAPI=!0,this.disableDefaultNavigation=!1;try{this.flockLeader$.subscribe(s=>{let{userId:c,name:d}=s,O=c;if(this.provisionFollowUser(),O&&this.currentFlockUser&&this.currentFlockUser.snippylyId)if(this.currentFlockUser.sessionId){if(this.currentFlockUser.snippylyId&&this.currentFlockUser.isLeader){this.flockSessionService.swapLeader(this.currentFlockUser.snippylyId,O,d);return}this.removeCurrentUserFromSession()}else this.flockSessionService.provisionFlockSession(O,d,this.currentFlockUser.snippylyId)},s=>{this.loggingService.catch("Error in FlockService flockLeader$ subscription: ",s)}),this.flockSessionService.currentSession$.subscribe(s=>{if(s!==null){if(this.currentFlockUser&&(this.currentFlockUser.sessionId===null||this.currentFlockUser.sessionId===void 0)&&this.currentFlockUser.snippylyId&&(this.currentFlockUser.sessionId=s.id,this.flockSessionService.updateRemoteFlockUser(this.currentFlockUser.snippylyId,this.currentFlockUser)),this.currentFlockUser&&!this.currentFlockUser.isLeader&&!this.followOverlayCreated&&(this.leaderOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.leaderOverlayCreated=!1),this.followOverlayCreated=!0,this.flockOverlayService.createFollowOverlay(s.leaderName,()=>{this.removeCurrentUserFromSession(),this.followOverlayCreated=!1})),this.currentFlockUser&&this.currentFlockUser.isLeader&&!this.leaderOverlayCreated&&(this.followOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.followOverlayCreated=!1),this.leaderOverlayCreated=!0,this.flockOverlayService.createLeaderOverlay(()=>{this.removeCurrentUserFromSession(),this.leaderOverlayCreated=!1})),this.currentFlockUser&&!this.currentFlockUser.isLeader&&s.actionStack){let c=s.actionStack[0];c&&this.currentFlockUser.lastProcessedActionTimestamp!==c.timestamp&&this.processAction(c)}if(this.currentFlockUser&&!this.currentFlockUser.isLeader&&this.followOverlayCreated&&this.flockOverlayService.getLeaderName()!==null&&s.leaderName!==this.flockOverlayService.getLeaderName()&&this.flockOverlayService.changeLeaderName(s.leaderName),this.currentFlockUser&&this.currentFlockUser.isLeader){let c=k();if(s.pageInfo){if(c&&c.url!==s.pageInfo.url){let d=new u;d.type=h.NAVIGATE,this.flockSessionService.addActionToStack(s.id,d)}}else{this.flockSessionService.updateSession(s.id,{pageInfo:c});let d=new u;d.type=h.NAVIGATE,this.flockSessionService.addActionToStack(s.id,d)}}}else this.currentFlockUser&&this.leaderOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.leaderOverlayCreated=!1),this.currentFlockUser&&this.followOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.followOverlayCreated=!1)}),this.flockSessionService.currentUser$.subscribe(s=>{if(s!==null&&(this.currentFlockUser&&this.currentFlockUser.isLeader!==s.isLeader&&(this.domSubscriptions.forEach(c=>c.unsubscribe()),this.domSubscriptions=[]),this.currentFlockUser=s,s.sessionId&&this.domSubscriptions.length===0))if(s.isLeader){if(!this.tabFocused||!this.windowFocused)return;this.subscribeToLeaderDOMEvents()}else this.subscribeToFollowerDOMEvents()}),D([this.authService.getUser$(),this.getFlockMode$()]).subscribe(([s,c])=>{s&&s.userSnippylyId&&c?this.flockSessionService.startCurrentFlockUserSubscription(s):this.flockSessionService.stopCurrentFlockUserSubscription()})}catch(s){this.loggingService.catch("Error in FlockService constructor: ",s)}}provisionFollowUser(){try{if(this.currentFlockUser===null){let e=this.authService.getUser();e&&e.userSnippylyId&&(this.currentFlockUser=new E,this.currentFlockUser.snippylyId=e.userSnippylyId)}}catch(e){this.loggingService.catch("Error in FlockService provisionFollowUser: ",e)}}startFollowingUser(e,t){try{if(this.provisionFollowUser(),e&&this.currentFlockUser&&this.currentFlockUser.snippylyId){if(this.currentFlockUser.sessionId){if(this.currentFlockUser.snippylyId&&this.currentFlockUser.isLeader){this.flockSessionService.swapLeader(this.currentFlockUser.snippylyId,e,t);return}this.removeCurrentUserFromSession()}this.flockSessionService.provisionFlockSession(e,t,this.currentFlockUser.snippylyId)}}catch(r){this.loggingService.catch("Error in FlockService startFollowingUser: ",r)}}stopFollowingUser(){try{this.removeCurrentUserFromSession()}catch(e){this.loggingService.catch("Error in FlockService stopFollowingUser: ",e)}}subscribeToUrlChanges(){try{if(this.useHistoryAPI){let e=window.history.pushState,t=window.history.replaceState;window.history.pushState=(...r)=>{e.apply(window.history,r),this.onUrlChange()},window.history.replaceState=(...r)=>{t.apply(window.history,r),this.onUrlChange()},this.domSubscriptions.push({unsubscribe:()=>{window.history.pushState=e,window.history.replaceState=t}}),this.domSubscriptions.push(y(window,"popstate").subscribe(()=>{this.onUrlChange()}))}}catch(e){this.loggingService.catch("Error in FlockService subscribeToUrlChanges: ",e)}}onUrlChange(){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId&&this.currentFlockUser.isLeader){let e=new u;e.type=h.NAVIGATE,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,e)}}catch(e){this.loggingService.catch("Error in FlockService onUrlChange: ",e)}}processAction(e){try{switch(e.type){case h.CLICK:this.clickUserElement(e.data);break;case h.HOVER:this.scrollToHoveredElement(e.data);break;case h.SCROLL:this.scrollToFollowedUser(e.data);break;case h.NAVIGATE:this.checkMatchingUrl(e.pageInfo);break}this.currentFlockUser&&this.currentFlockUser.snippylyId&&this.flockSessionService.updateRemoteFlockUser(this.currentFlockUser.snippylyId,{lastProcessedActionTimestamp:e.timestamp})}catch(t){this.loggingService.catch("Error in FlockService processAction: ",t)}}subscribeToLeaderDOMEvents(){try{this.domSubscriptions.length>0&&(this.domSubscriptions.forEach(e=>e.unsubscribe()),this.domSubscriptions=[]),this.domSubscriptions.push(y(window,"mouseover").pipe(C(500)).subscribe(e=>{let t=e?.target;if(t){let r=window.getComputedStyle(t);if(r.position==="fixed"||r.position==="sticky"||t.hasAttribute(m.ATTRIBUTES.VELT_IGNORE))return;t=L(t,{x:e.clientX,y:e.clientY}),this.updateHoveredElement(t)}})),this.domSubscriptions.push(this.domService.onWindowClick$().subscribe(e=>{let t=e?.target;if(t){if(t.hasAttribute(m.ATTRIBUTES.VELT_IGNORE))return;this.updateClickedElement(t)}})),this.subscribeToUrlChanges(),this.subscribeToScrollables()}catch(e){this.loggingService.catch("Error in FlockService subscribeToLeaderDOMEvents: ",e)}}subscribeToFollowerDOMEvents(){}updateClickedElement(e){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId){let t=this.domService.getXPath(e),r=T(e),i=this.domService.getXPath(r),o={id:Math.random().toString(36).substring(2),xpath:t,parentXpath:i},s=new u;s.type=h.CLICK,s.data=o,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,s)}}catch(t){this.loggingService.catch("Error in FlockService updateClickedElement: ",t)}}updateHoveredElement(e){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId){let t=this.domService.getXPath(e),r=T(e),i=this.domService.getXPath(r),o={id:Math.random().toString(36).substring(2),xpath:t,parentXpath:i},s=new u;s.type=h.HOVER,s.data=o,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,s)}}catch(t){this.loggingService.catch("Error in FlockService updateHoveredElement: ",t)}}subscribeToScrollables(){try{let e=V();e.push(document),e?.forEach(t=>{this.domSubscriptions.push(y(t,"scroll").pipe(C(100)).subscribe(r=>{this.currentFlockUser&&this.currentFlockUser.sessionId&&this.currentFlockUser.isLeader&&this.updateScrollPositionOfElement(t)}))})}catch(e){this.loggingService.catch("Error in FlockService getScrollableElements: ",e)}}updateScrollPositionOfElement(e){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId){let t=new U("","");if(e===document){let o=z();if(o){let s=L(o);s&&(t.targetXpath=this.domService.getXPath(s))}t.xpath=""}else{let o=H(e);t.targetXpath=this.domService.getXPath(o),t.xpath=this.domService.getXPath(e)}let r=!1,i=!1;if(this.localScrollData.forEach((o,s)=>{o.xpath===o.xpath&&(t.targetXpath!==o.targetXpath&&(r=!0),this.localScrollData[s]=Object.assign(o,t),i=!0)}),i||this.localScrollData.push(t),r||!i){let o=new u;o.type=h.SCROLL,o.data=t,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,o)}}}catch(t){this.loggingService.catch("Error in FlockService calculateScrollPositionOfAnElement: ",t)}}enableFlockMode(e){try{if(this.flockMode$.next(!0),e){let{useHistoryAPI:t,onNavigate:r,disableDefaultNavigation:i,darkMode:o}=e;t!==void 0&&(this.useHistoryAPI=t),r!==void 0&&typeof r=="function"&&(this.onNavigate=r),i!==void 0&&(this.disableDefaultNavigation=i),this.flockOverlayService.setDarkMode(o)}}catch(t){this.loggingService.catch("Error in FlockService enableFlockMode: ",t)}}disableFlockMode(){try{this.flockMode$.next(!1),this.onNavigateEmitter=void 0,this.useHistoryAPI=!0,this.onNavigate=void 0}catch(e){this.loggingService.catch("Error in FlockService disableFlockMode: ",e)}}setDisableFlockNavigation(e){try{this.disableDefaultNavigation=e}catch(t){this.loggingService.catch("Error in FlockService setDisableFlockNavigation: ",t)}}getFlockMode$(){return this.flockMode$.asObservable()}getFlockMode(){return this.flockMode$.value}setNavigateEmitter(e){try{this.onNavigateEmitter=e}catch(t){this.loggingService.catch("Error in FlockService setNavigateEmitter: ",t)}}setTabFocused(e){try{if(this.tabFocused=e,!this.currentFlockUser)return;this.currentFlockUser.isLeader&&this.currentFlockUser.sessionId&&(this.tabFocused&&this.domSubscriptions.length===0?this.subscribeToLeaderDOMEvents():!this.tabFocused&&this.domSubscriptions.length>0&&(this.domSubscriptions.forEach(r=>{r.unsubscribe()}),this.domSubscriptions=[]))}catch(t){this.loggingService.catch("Error in FlockService setTabFocused: ",t)}}setWindowFocused(e){try{if(this.windowFocused=e,!this.currentFlockUser)return;this.currentFlockUser.isLeader&&this.currentFlockUser.sessionId&&(this.windowFocused&&this.domSubscriptions.length===0?this.subscribeToLeaderDOMEvents():!this.windowFocused&&this.domSubscriptions.length>0&&(this.domSubscriptions.forEach(r=>{r.unsubscribe()}),this.domSubscriptions=[]))}catch(t){this.loggingService.catch("Error in FlockService setWindowFocused: ",t)}}setFlockLeader(e,t){try{this.flockLeader$.next({userId:e,name:t})}catch(r){this.loggingService.catch("Error in FlockService setFlockLeader: ",r)}}isInSession(){try{return!!(this.currentFlockUser&&this.currentFlockUser.sessionId)}catch(e){this.loggingService.catch("Error in FlockService isFollowing: ",e)}return!1}removeCurrentUserFromSession(){try{this.domSubscriptions.forEach(e=>e.unsubscribe()),this.domSubscriptions=[],this.currentFlockUser&&(this.currentFlockUser.isLeader?this.currentFlockUser.sessionId&&this.flockSessionService.deleteSession(this.currentFlockUser.sessionId):this.currentFlockUser.snippylyId&&this.flockSessionService.removeFollowerFromCurrentSession(this.currentFlockUser.snippylyId))}catch(e){this.loggingService.catch("Error in FlockService removeCurrentUserFromSession: ",e)}}checkMatchingUrl(e){try{let r=k()?.url,i=e.url;if(r!==i&&i!==void 0){let{url:o,path:s,baseUrl:c}=e;if(this.onNavigate!==void 0&&typeof this.onNavigate=="function"){this.onNavigate({url:o,path:s,baseUrl:c});return}if(this.onNavigateEmitter&&this.onNavigateEmitter.emit({url:o,path:s,baseUrl:c}),this.disableDefaultNavigation)return;window.location.href=i}}catch(t){this.loggingService.catch("Error in FlockService checkMatchingUrl: ",t)}}scrollToFollowedUser(e){try{if(e.xpath===""){let t=this.domService.getElementFromXPath(e.targetXpath);t&&F(t)}else{let t=this.domService.getElementFromXPath(e.xpath),r=this.domService.getElementFromXPath(e.targetXpath);t&&r&&(F(t),R(t,r))}}catch(t){this.loggingService.catch("Error in FlockService scrollToFollowedUser: ",t)}}clickUserElement(e){try{let t=this.domService.getElementFromXPath(e.xpath);t&&this.lastClickedElement?.id!==e.id&&(t?.click(),this.lastClickedElement=e)}catch(t){this.loggingService.catch("Error in FlockService clickUserElement: ",t)}}scrollToHoveredElement(e){try{let t=this.domService.getElementFromXPath(e.xpath);if(t&&e.parentXpath)if(e.parentXpath==="/html")F(t);else{let r=this.domService.getElementFromXPath(e.parentXpath);r&&R(r,t,!0)}}catch(t){this.loggingService.catch("Error in FlockService clickUserElement: ",t)}}};n.\u0275fac=function(t){return new(t||n)(a(b),a(G),a(g),a(Q),a(Z))},n.\u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"});let l=n;return l})();export{Ce as a};
package/chunk-ELF6PPR2.js DELETED
@@ -1,2 +0,0 @@
1
- import{C as F,R as b,S as f,T as H,U as j,V as N,u as R,v as E,w as O,x as I}from"./chunk-WASG3GA7.js";import{$ as y,D as v,E as l,Ga as k,J as h,Kb as A,Td as L,Ua as C,Ud as s,Va as B,Ya as w,_a as M,a as c,aa as S,b as _,ba as p,da as r,db as D,k as g,la as x,xb as T}from"./chunk-Z3CHFM5M.js";function X(i,m){}var z="_mat-bottom-sheet-enter",P="_mat-bottom-sheet-exit",G=(()=>{class i extends H{_breakpointSubscription;_animationsDisabled=b();_animationState="void";_animationStateChanged=new k;_destroyed;constructor(){super();let e=r(L);this._breakpointSubscription=e.observe([s.Medium,s.Large,s.XLarge]).subscribe(()=>{let o=this._elementRef.nativeElement.classList;o.toggle("mat-bottom-sheet-container-medium",e.isMatched(s.Medium)),o.toggle("mat-bottom-sheet-container-large",e.isMatched(s.Large)),o.toggle("mat-bottom-sheet-container-xlarge",e.isMatched(s.XLarge))})}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._animationsDisabled&&this._simulateAnimation(z))}exit(){this._destroyed||(this._elementRef.nativeElement.setAttribute("mat-exit",""),this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._animationsDisabled&&this._simulateAnimation(P))}ngOnDestroy(){super.ngOnDestroy(),this._breakpointSubscription.unsubscribe(),this._destroyed=!0}_simulateAnimation(e){this._ngZone.run(()=>{this._handleAnimationEvent(!0,e),setTimeout(()=>this._handleAnimationEvent(!1,e))})}_trapFocus(){super._trapFocus({preventScroll:!0})}_handleAnimationEvent(e,o){let t=o===z;(t||o===P)&&this._animationStateChanged.emit({toState:t?"visible":"hidden",phase:e?"start":"done"})}static \u0275fac=function(o){return new(o||i)};static \u0275cmp=C({type:i,selectors:[["mat-bottom-sheet-container"]],hostAttrs:["tabindex","-1",1,"mat-bottom-sheet-container"],hostVars:9,hostBindings:function(o,t){o&1&&T("animationstart",function(a){return t._handleAnimationEvent(!0,a.animationName)})("animationend",function(a){return t._handleAnimationEvent(!1,a.animationName)})("animationcancel",function(a){return t._handleAnimationEvent(!1,a.animationName)}),o&2&&(D("role",t._config.role)("aria-modal",t._config.ariaModal)("aria-label",t._config.ariaLabel),A("mat-bottom-sheet-container-animations-enabled",!t._animationsDisabled)("mat-bottom-sheet-container-enter",t._animationState==="visible")("mat-bottom-sheet-container-exit",t._animationState==="hidden"))},features:[w],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(o,t){o&1&&M(0,X,0,0,"ng-template",0)},dependencies:[R],styles:[`@keyframes _mat-bottom-sheet-enter{from{transform:translateY(100%)}to{transform:none}}@keyframes _mat-bottom-sheet-exit{from{transform:none}to{transform:translateY(100%)}}.mat-bottom-sheet-container{box-shadow:0px 8px 10px -5px rgba(0, 0, 0, 0.2), 0px 16px 24px 2px rgba(0, 0, 0, 0.14), 0px 6px 30px 5px rgba(0, 0, 0, 0.12);padding:8px 16px;min-width:100vw;box-sizing:border-box;display:block;outline:0;max-height:80vh;overflow:auto;position:relative;background:var(--mat-bottom-sheet-container-background-color, var(--mat-sys-surface-container-low));color:var(--mat-bottom-sheet-container-text-color, var(--mat-sys-on-surface));font-family:var(--mat-bottom-sheet-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-bottom-sheet-container-text-size, var(--mat-sys-body-large-size));line-height:var(--mat-bottom-sheet-container-text-line-height, var(--mat-sys-body-large-line-height));font-weight:var(--mat-bottom-sheet-container-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-bottom-sheet-container-text-tracking, var(--mat-sys-body-large-tracking))}@media(forced-colors: active){.mat-bottom-sheet-container{outline:1px solid}}.mat-bottom-sheet-container-animations-enabled{transform:translateY(100%)}.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-enter{animation:_mat-bottom-sheet-enter 195ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-exit{animation:_mat-bottom-sheet-exit 375ms cubic-bezier(0.4, 0, 1, 1) backwards}.mat-bottom-sheet-container-xlarge,.mat-bottom-sheet-container-large,.mat-bottom-sheet-container-medium{border-top-left-radius:var(--mat-bottom-sheet-container-shape, 28px);border-top-right-radius:var(--mat-bottom-sheet-container-shape, 28px)}.mat-bottom-sheet-container-medium{min-width:384px;max-width:calc(100vw - 128px)}.mat-bottom-sheet-container-large{min-width:512px;max-width:calc(100vw - 256px)}.mat-bottom-sheet-container-xlarge{min-width:576px;max-width:calc(100vw - 384px)}
2
- `],encapsulation:2})}return i})(),K=new p("MatBottomSheetData"),u=class{viewContainerRef;panelClass;direction;data=null;hasBackdrop=!0;backdropClass;disableClose=!1;ariaLabel=null;ariaModal=!1;closeOnNavigation=!0;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;height="";minHeight;maxHeight},d=class{_ref;get instance(){return this._ref.componentInstance}get componentRef(){return this._ref.componentRef}containerInstance;disableClose;_afterOpened=new g;_result;_closeFallbackTimeout;constructor(m,e,o){this._ref=m,this.containerInstance=o,this.disableClose=e.disableClose,o._animationStateChanged.pipe(l(t=>t.phase==="done"&&t.toState==="visible"),h(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),o._animationStateChanged.pipe(l(t=>t.phase==="done"&&t.toState==="hidden"),h(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._ref.close(this._result)}),m.overlayRef.detachments().subscribe(()=>{this._ref.close(this._result)}),v(this.backdropClick(),this.keydownEvents().pipe(l(t=>t.keyCode===27))).subscribe(t=>{!this.disableClose&&(t.type!=="keydown"||!O(t))&&(t.preventDefault(),this.dismiss())})}dismiss(m){this.containerInstance&&(this.containerInstance._animationStateChanged.pipe(l(e=>e.phase==="start"),h(1)).subscribe(()=>{this._closeFallbackTimeout=setTimeout(()=>this._ref.close(this._result),500),this._ref.overlayRef.detachBackdrop()}),this._result=m,this.containerInstance.exit(),this.containerInstance=null)}afterDismissed(){return this._ref.closed}afterOpened(){return this._afterOpened}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}},U=new p("mat-bottom-sheet-default-options"),W=(()=>{class i{_injector=r(x);_parentBottomSheet=r(i,{optional:!0,skipSelf:!0});_animationsDisabled=b();_defaultOptions=r(U,{optional:!0});_bottomSheetRefAtThisLevel=null;_dialog=r(j);get _openedBottomSheetRef(){let e=this._parentBottomSheet;return e?e._openedBottomSheetRef:this._bottomSheetRefAtThisLevel}set _openedBottomSheetRef(e){this._parentBottomSheet?this._parentBottomSheet._openedBottomSheetRef=e:this._bottomSheetRefAtThisLevel=e}constructor(){}open(e,o){let t=c(c({},this._defaultOptions||new u),o),n;return this._dialog.open(e,_(c({},t),{disableClose:!0,closeOnOverlayDetachments:!1,maxWidth:"100%",container:G,scrollStrategy:t.scrollStrategy||I(this._injector),positionStrategy:F(this._injector).centerHorizontally().bottom("0"),disableAnimations:this._animationsDisabled,templateContext:()=>({bottomSheetRef:n}),providers:(a,Z,Y)=>(n=new d(a,t,Y),[{provide:d,useValue:n},{provide:K,useValue:t.data}])})),n.afterDismissed().subscribe(()=>{this._openedBottomSheetRef===n&&(this._openedBottomSheetRef=null)}),this._openedBottomSheetRef?(this._openedBottomSheetRef.afterDismissed().subscribe(()=>n.containerInstance?.enter()),this._openedBottomSheetRef.dismiss()):n.containerInstance.enter(),this._openedBottomSheetRef=n,n}dismiss(e){this._openedBottomSheetRef&&this._openedBottomSheetRef.dismiss(e)}ngOnDestroy(){this._bottomSheetRefAtThisLevel&&this._bottomSheetRefAtThisLevel.dismiss()}static \u0275fac=function(o){return new(o||i)};static \u0275prov=y({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),dt=(()=>{class i{static \u0275fac=function(o){return new(o||i)};static \u0275mod=B({type:i});static \u0275inj=S({providers:[W],imports:[N,f,E,f]})}return i})();export{K as a,d as b,W as c,dt as d};