@veltdev/sdk-dev 6.0.8-beta.4 → 6.0.8-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/models/data/notification.model.d.ts +13 -0
- package/app/models/element/notification-element.model.d.ts +24 -1
- package/chunk-2H6D2UE5.js +1 -0
- package/{chunk-RD4WD7HR.js → chunk-2N7F6RD7.js} +1 -1
- package/{chunk-YMLBHLGQ.js → chunk-3BKUZ65V.js} +1 -1
- package/{chunk-YTAAOIBL.js → chunk-4EV2AXDK.js} +1 -1
- package/{chunk-F5F6L463.js → chunk-4ZVKEG33.js} +1 -1
- package/{chunk-6ARAZSKF.js → chunk-55ARQKHV.js} +1 -1
- package/{chunk-4Z6JEK4C.js → chunk-6AS4UBOQ.js} +1 -1
- package/{chunk-5AXDQN2Z.js → chunk-7AHH7XWM.js} +1 -1
- package/{chunk-3W7PWPIA.js → chunk-A2DMYJYR.js} +1 -1
- package/{chunk-PPIN2ZDO.js → chunk-CLE4JZBV.js} +1 -1
- package/{chunk-54WPSIBC.js → chunk-CQ2PFN5H.js} +1 -1
- package/{chunk-44QKIIUD.js → chunk-F7UEUUNI.js} +1 -1
- package/{chunk-WNQGJ6NQ.js → chunk-HAKNI7BB.js} +1 -1
- package/{chunk-4NY6TY72.js → chunk-ICDRH3KF.js} +1 -1
- package/{chunk-C45R3XT6.js → chunk-IHGYXGQ3.js} +1 -1
- package/{chunk-67WASIND.js → chunk-KPCULYW2.js} +1 -1
- package/{chunk-PSDDJB4F.js → chunk-MCPBCPXB.js} +1 -1
- package/{chunk-KGSCJNID.js → chunk-MUZB4ZRW.js} +1 -1
- package/{chunk-C6NXU52W.js → chunk-N6XSJOCG.js} +1 -1
- package/{chunk-2VSCJ7FP.js → chunk-OEOE4TD6.js} +1 -1
- package/{chunk-T4Z2W6NR.js → chunk-PPWVFIE5.js} +1 -1
- package/{chunk-5AD56Z43.js → chunk-PX2LBUTF.js} +1 -1
- package/{chunk-TYOTWEG4.js → chunk-QYY5QDZZ.js} +1 -1
- package/{chunk-F4COO6HD.js → chunk-R4Z2NW35.js} +1 -1
- package/{chunk-UZW6GB3Q.js → chunk-S4QHENVI.js} +1 -1
- package/{chunk-WUADE2PV.js → chunk-SHXQBB7N.js} +1 -1
- package/{chunk-ZDDZXCPC.js → chunk-TRPKCRP6.js} +1 -1
- package/{chunk-UGQYGMGF.js → chunk-UORQ3B6S.js} +1 -1
- package/{chunk-6VS6CXUM.js → chunk-W2OE7HCO.js} +1 -1
- package/{chunk-LC33EWB5.js → chunk-WLT43RAI.js} +1 -1
- package/{chunk-K47CMSNK.js → chunk-XFL4XVS4.js} +1 -1
- package/{chunk-Z4PTG3MC.js → chunk-XJUXSAIL.js} +1 -1
- package/{chunk-6GPW7ZK5.js → chunk-XZUEYYE3.js} +1 -1
- package/package.json +1 -1
- package/velt-activity-log.js +1 -1
- package/velt-area.js +1 -1
- package/velt-arrow.js +1 -1
- package/velt-comment.js +1 -1
- package/velt-crdt.js +1 -1
- package/velt-cursor.js +1 -1
- package/velt-huddle.js +1 -1
- package/velt-live-state-sync.js +1 -1
- package/velt-notification.js +1 -1
- package/velt-presence.js +1 -1
- package/velt-reaction.js +1 -1
- package/velt-recorder.js +1 -1
- package/velt-rewriter.js +1 -1
- package/velt-selection.js +1 -1
- package/velt-tag.js +1 -1
- package/velt-user-invite.js +1 -1
- package/velt-user-request.js +1 -1
- package/velt-video-player.js +1 -1
- package/velt-views.js +1 -1
- package/velt.js +3 -3
- package/chunk-MIVF7JMQ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Pt,b as Je}from"./chunk-F4COO6HD.js";import{b as We}from"./chunk-67WASIND.js";import{Ea as St,Fa as b,Ga as Zt,Ha as ct,Ia as He,L as xt,M as ye,N as ke,O as Ie,Q as Xt,R as Oe,S as De,T as we,U as Tt,V as Ee,Y as Te,ea as Ae,ga as Me,ha as ie,ia as Pe}from"./chunk-2VSCJ7FP.js";import{$ as nt,Aa as Gt,Bc as Se,Ca as Ht,Cf as Ue,Ee as Fe,Fa as u,Fi as Ge,Ib as W,Kb as Et,L as $t,La as Wt,Nb as U,Ob as Ct,Pa as I,Pb as X,Qb as Yt,Ra as Jt,T as gt,U as ue,Ua as P,Uh as ut,Vh as Le,Wa as Kt,Ya as j,_a as v,_b as R,a as m,ac as Nt,b as f,ba as he,bb as Ce,bc as F,be as ae,c as ge,ca as H,cc as O,da as Q,db as M,dc as it,ec as _t,fa as fe,fb as w,fc as B,g as vt,gb as E,gc as _e,ha as kt,hc as be,ia as It,ii as At,ja as mt,k as Ot,kc as V,ki as N,l as Bt,la as at,lb as p,lc as L,li as Be,mb as x,nb as k,nh as lt,ob as Y,od as Re,p as yt,pa as ot,pc as J,qa as A,qh as Ne,qi as ze,r as Ut,rc as oe,rf as je,sb as S,sc as rt,si as $e,tb as y,tc as bt,ti as Mt,ub as z,vb as Dt,vc as re,w as zt,wa as tt,xb as wt,xc as xe,yh as Ve,zb as l}from"./chunk-YTAAOIBL.js";var Ke=(()=>{let r=class r{constructor(t){this.loggingService=t,this.autocompleteDataMap$=new Bt({}),this.onAutocompleteChipClick$=new Ot;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)(H(N))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var Ye=(()=>{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 vt(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(g=>{delete g?.locations,delete g?.location,delete g?.locationId,delete g?.pageInfo,delete g?.documentId,g.documentId=g?.clientDocumentId,delete g?.clientDocumentId,delete g?.veltFolderId,g?.clientOrganizationId&&(g.organizationId=g?.clientOrganizationId,delete g?.clientOrganizationId)}));let c=[];a&&(a=JSON.parse(JSON.stringify(a)),a?.location&&c.push(a?.location));let d=this.docService.getLocations();d&&Object.values(d).forEach(g=>{g?.location&&c.push(g?.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 vt(this,null,function*(){try{let t=this.authService.getUser();if(!t)return null;let e,i;t&&(e=Ve(t)??void 0,i=JSON.parse(JSON.stringify(t)),delete i?.contacts);let a=this.configService.getApiKey(),c=window?.Velt?.version,d=this.docService.getOrganizationMetadata(t?.organizationId),s,h;d&&(s=JSON.parse(JSON.stringify(d)),delete s?.organizationId,s.organizationId=s?.clientOrganizationId,delete s?.clientOrganizationId,delete s?.pageInfo,delete s?.apiKey,h=JSON.parse(JSON.stringify(d)),delete h?.clientOrganizationId,delete h?.pageInfo,delete h?.apiKey);let g=this.docService.getDocumentMetadataOfAvailableDocuments(),T=this.docService.getLocation(),D=[],_=[];T&&(D.push(T),T?.location&&_.push(T?.location));let C=this.docService.getLocations();C&&Object.values(C).forEach(G=>{D.push(G),G?.location&&_.push(G?.location)});let $=[],Z=[];g&&($=JSON.parse(JSON.stringify(g)),$.forEach(G=>{delete G?.apiKey,delete G?.locations,delete G?.location,delete G?.locationId,delete G?.pageInfo,delete G?.documentId,G.documentId=G?.clientDocumentId,delete G?.clientDocumentId,delete G?.veltFolderId,G?.clientOrganizationId&&(G.organizationId=G?.clientOrganizationId,delete G?.clientOrganizationId)}),Z=JSON.parse(JSON.stringify(g)),Z.forEach(G=>{delete G?.apiKey,delete G?.locations,delete G?.location,delete G?.locationId,delete G?.pageInfo,delete G?.clientDocumentId,G.folderId=G?.veltFolderId,delete G?.veltFolderId,delete G?.clientOrganizationId}));let dt,Lt=this.docService.getDocumentPaths();Lt?.folderId&&Lt?.veltFolderId&&(dt={folderId:Lt?.folderId,veltFolderId:Lt?.veltFolderId});let ne,Ft;dt&&(ne=JSON.parse(JSON.stringify(dt)),delete ne?.veltFolderId,Ft=JSON.parse(JSON.stringify(dt)),Ft.folderId=Ft.veltFolderId,delete Ft?.veltFolderId);let jt={};return jt.veltVersion=c,jt.apiKey=a,jt.serverMap={organization:h??void 0,documents:Z,locations:D??void 0,folder:Ft??void 0,user:i??void 0,accessFields:this.docService.getProcessedDocContext()??void 0},jt.clientMap={organization:s??void 0,documents:$,locations:_??void 0,folder:ne??void 0,user:e??void 0,context:this.docService.getDocContext()??void 0},jt}catch(t){return this.loggingService.catch("Error in MetadataService getDebugInfo: ",t),null}})}getDebugInfo$(){return zt([this.authService.getUser$(),this.docService.getOrganizationConfig$(),this.docService.getOrganizationMetadataMap$(),this.docService.getAllDocumentMetadataMap$(),this.docService.getDocContext$()]).pipe(gt(()=>vt(this,null,function*(){return yield this.getDebugInfo()})),$t(Ne))}};r.\u0275fac=function(e){return new(e||r)(H(Ge),H(N),H(Mt),H(Be))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var pt=class{constructor(){this.isGroupHeader=!1,this.isGroupMember=!1,this.isNewContact=!1,this.disabled=!1}},Vt=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 le(){return{panelOpen:!1,filterText:"",highlightedIndex:-1,autocompleteDisabledPositions:new Set,darkMode:!1,variant:void 0}}var Xe=new he("AutocompleteLocalUIStateSignal");var qt=class{constructor(r,o){this.injector=r,this.readSignal=o,this.cache=new Map,this.structureVersion=A(0)}bumpStructureVersion(){try{this.structureVersion.update(r=>r+1)}catch{}}get(r,o){try{if(!r||!this.injector)return Ut(null);let t=this.cache.get(r);if(t)return t;o?.();let e=Re(rt(()=>{this.structureVersion();let i=this.readSignal(r);return i?i():null}),{injector:this.injector}).pipe($t());return this.cache.set(r,e),e}catch{return Ut(null)}}},Ha="default";function Ze(){try{return Q(at)}catch{return null}}var Qt=(()=>{let r=class r{bumpContextConfigStructureVersion(){this.configBridge.bumpStructureVersion()}constructor(t,e,i,a,c,d){this.authService=t,this.contactService=e,this.autocompleteService=i,this.serviceBook=a,this.themeService=c,this.loggingService=d,this.contextMap=new Map,this.registryMap=new Map,this.serviceSubscriptions=[],this.injector=Ze(),this.configBridge=new qt(this.injector,s=>this.contextMap.get(s)),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$():yt)).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$():yt)).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$():yt)).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$():yt)).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$():yt)).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$():yt)).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 Vt;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=A(i),this.contextMap.set(t,e),this.bumpContextConfigStructureVersion()}return e}catch(e){return this.loggingService.catch("Error in AutocompleteCoreService getOrCreateContextConfig:",e),A(new Vt)}}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),this.bumpContextConfigStructureVersion()}catch(i){this.loggingService.catch("Error in AutocompleteCoreService setContextConfig:",i)}}clearContextConfig(t){try{this.contextMap.delete(t),this.registryMap.delete(t),this.bumpContextConfigStructureVersion()}catch(e){this.loggingService.catch("Error in AutocompleteCoreService clearContextConfig:",e)}}getAutocompleteConfig$(t){try{return this.configBridge.get(t,()=>this.getOrCreateContextConfig(t))}catch(e){return this.loggingService.catch("Error in AutocompleteCoreService getAutocompleteConfig$:",e),Ut(null)}}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)(H(Mt),H(St),H(Ke),H(At),H(Zt),H(N))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var qe=(()=>{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(Le).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()||"",d=new je;d.email=c;let s=new RegExp(Fe.REGEX_EMAIL).test("@"+d?.email),h=a.data.userContacts.slice();a.featureState.customAutocompleteSearch||e&&(h=this.filterContacts(h,d),a.featureState.paginatedContactList&&h.length<3&&this.fetchFilteredUsersFromDb(e).then(()=>{})),a.featureState.atHereEnabled&&a.data.hereUserContact?.name?.includes(c)&&(h?.find(C=>C?.userId==="here")||(h=[a.data.hereUserContact,...h])),i?.length&&(h=h.filter(C=>!i.find($=>$?.email===C?.email)));let g=e?this.filterGroups(a.data.organizationGroups,e):a.data.organizationGroups,T=h.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 $=a.data.userDocumentContacts?.length||0;C=f(m({},C),{email:`${$} members`}),C.description=`${$} members`}}return{type:"contact",contact:C,disabled:!1}}),D=g.map(C=>({type:"group",group:C})),_=[...T,...D];if(a.featureState.expandMentionGroups)this.buildExpandedGroupItems(t,_,a,d,s);else{let C=_.length?void 0:{type:"contact",contact:d},$=this.createFlattenedItems({allItems:_,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:$,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 d=[],s={},h=new Map;e.forEach(C=>{if(C.contact?.userId){let $=Ue(C.contact.userId);h.set($,C),s[C.contact.userId]=!1}});let g=new Map;i.data.organizationGroups.forEach(C=>{g.set(C.metadata.clientGroupId,{id:C.metadata.clientGroupId,name:C.metadata.groupName,members:[],userIds:Object.keys(C.users||{})})}),g.forEach(C=>{C.userIds.forEach($=>{let Z=h.get($);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]&&d.push(C)});let T=Array.from(g.values()),D=e.length?void 0:{type:"contact",contact:a},_=this.createFlattenedItems({allItems:e,contactsWithoutGroup:d,groups:T,newUserContact:D,isExpandedGroups:!0,isCustomGroups:!1,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(C=>f(m({},C),{data:f(m({},C.data),{flattenedItems:_,newUserContactError:c?void 0:"Invalid email",newUserContact:D,contactsWithoutGroup:d,groups:T})}))}catch(d){this.loggingService.catch("Error in AutocompleteActionService buildExpandedGroupItems:",d)}}filterCustomOptions(t,e){try{let i=t(),a=i.data.selectedAutocompleteData,c=i.data.autocompleteDataMap?.[a?.hotkey],d=c?.data?.slice()||[];if(i.featureState.customAutocompleteSearch||(e?d=d.filter(h=>h.name?.toLowerCase()?.includes(e?.toLowerCase())):d=a?.data?.slice()||[]),c?.groups&&c.groups.length>0){let h=[],g=new Map;c.groups?.forEach(_=>{g.set(_.id,{id:_.id,name:_.name,members:[]})}),d.forEach(_=>{let C={type:"custom",custom:_};_.groupId&&g.has(_.groupId)?g.get(_.groupId)?.members.push(C):h.push(C)});let T=Array.from(g.values()).filter(_=>_.members.length>0),D=this.createFlattenedItems({allItems:[],contactsWithoutGroup:h,groups:T,isExpandedGroups:!1,isCustomGroups:!0,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(_=>f(m({},_),{featureState:f(m({},_.featureState),{customGroupsEnabled:!0}),data:f(m({},_.data),{flattenedItems:D,contactsWithoutGroup:h,groups:T})}))}else{let h=d.map(T=>({type:"custom",custom:T})),g=this.createFlattenedItems({allItems:h,isExpandedGroups:!1,isCustomGroups:!1,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(T=>f(m({},T),{featureState:f(m({},T.featureState),{customGroupsEnabled:!1}),data:f(m({},T.data),{flattenedItems:g})}))}}catch(i){this.loggingService.catch("Error in AutocompleteActionService filterCustomOptions:",i)}}createFlattenedItems(t){try{let{allItems:e,contactsWithoutGroup:i,groups:a,newUserContact:c,isExpandedGroups:d=!1,isCustomGroups:s=!1,showMentionGroupsOnly:h=!1,showMentionGroupsFirst:g=!1}=t,T=[];if(d||s){if(!h&&!g&&i?.forEach((D,_)=>{let C=new pt;C.originalItem=D,C.disabled=!!D.disabled,C.id=s?`velt-option-custom-ungrouped-${_}`:`velt-option-user-${_}`,C.testId=s?`${this.componentId}-custom-ungrouped-${_}`:`${this.componentId}-user-${_}`,T.push(C)}),a?.forEach((D,_)=>{if(D?.members?.length){let C=new pt;C.originalItem={type:"group",group:D},C.isGroupHeader=!0,C.disabled=!0,C.group=D,C.id=s?`velt-option-custom-group-${_}`:`velt-option-group-${_}`,C.testId=s?`${this.componentId}-custom-group-${_}`:`${this.componentId}-group-${_}`,T.push(C),D.members.forEach(($,Z)=>{let dt=new pt;dt.originalItem=$,dt.isGroupMember=!0,dt.disabled=$.disabled||!1,dt.id=s?`velt-option-custom-group-${_}-member-${Z}`:`velt-option-group-${_}-member-${Z}`,dt.testId=s?`${this.componentId}-custom-group-${_}-member-${Z}`:`${this.componentId}-group-${_}-member-${Z}`,T.push(dt)})}}),!h&&g&&i?.length){let D=new pt;D.originalItem={type:"group"},D.isGroupHeader=!0,D.disabled=!0,D.groupName="Ungrouped",D.id="velt-option-ungrouped",D.testId=`${this.componentId}-ungrouped`,T.push(D),i.forEach((_,C)=>{let $=new pt;$.originalItem=_,$.isGroupMember=!0,$.disabled=_.disabled||!1,$.id=`velt-option-user-${C}`,$.testId=`${this.componentId}-user-${C}`,T.push($)})}}else e.forEach((D,_)=>{let C=new pt;C.originalItem=D,C.disabled=D.disabled||!1,C.id=`velt-option-${_}`,C.testId=`${this.componentId}-${_}`,T.push(C)});if(c?.contact?.email){let D=new pt;D.originalItem=c,D.isNewContact=!0,D.id="velt-new-contact-option",D.testId=`${this.componentId}-new-contact`,T.push(D)}return T}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)),d;return c>=0?d=[...a.slice(0,c),...a.slice(c+1)]:d=[...a,e],t.update(s=>f(m({},s),{data:f(m({},s.data),{multiSelectItems:d})})),d}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 vt(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)(H(Qt),H(St),H(N),H(At))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var te=(()=>{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)(H(N))},r.\u0275prov=nt({token:r,factory:r.\u0275fac});let n=r;return n})();function ce(n,r){try{let o=r?.trim();return o?(n||[]).find(t=>t?.userId===o):void 0}catch{return}}function Qe(n,r,o){try{let t=o?.trim();return t?n||(r?.userId===t?r:void 0):void 0}catch{return}}var ee=class{constructor(r){this.options=r,this.published=!1}finalize(){try{let r=this.options.getHost();if(!r)return;this.publish(r,xt(r)?.payload),De(r,this.options.ownerRef,()=>this.refreshFromPlacement())}catch{}}refreshFromPlacement(){try{let r=this.options.getHost();if(!r)return;let o=xt(r)?.payload,t=o?.contextData||{},e=!jn(this.lastContextData,t)||this.lastAnnotationId!==o?.annotationId,i=this.lastEntity!==this.readOwnEntity(),a=this.lastLocalUIState!==this.readOwnLocalUIState(),c=this.lastInheritedEntity!==o?.data;if(this.published&&!e&&!i&&!a&&!c)return;this.options.onContextChanged?.(),this.publish(r,o),this.options.markForCheck?.()}catch{}}destroy(){try{let r=this.options.getHost();ke(r,this.options.ownerRef),we(r,this.options.ownerRef),this.published=!1}catch{}}getInheritedContextData(){try{return xt(this.options.getHost())?.payload?.contextData||{}}catch{return{}}}getInheritedEntity(){try{return xt(this.options.getHost())?.payload?.data}catch{return}}getInheritedLocalUIState(){try{return xt(this.options.getHost())?.payload?.localUIState}catch{return}}adoptInheritedLocalUIState(r){return Xt(f(m({},r),{host:this.options.getHost()}))}publish(r,o){let t=this.readOwnEntity(),e=this.readOwnLocalUIState();ye(r,Ie({host:r,inherited:o,ownData:t,ownLocalUIState:e,ownerRef:this.options.ownerRef})),this.lastContextData=o?.contextData||{},this.lastAnnotationId=o?.annotationId,this.lastEntity=t,this.lastLocalUIState=e,this.lastInheritedEntity=o?.data,this.published=!0}readOwnEntity(){if(this.options.getEntity)try{return oe(()=>this.options.getEntity())}catch{return}}readOwnLocalUIState(){if(this.options.getLocalUIState)try{return oe(()=>this.options.getLocalUIState())}catch{return}}};function jn(n,r){try{if(n===r)return!0;if(!n||!r)return!1;let o=Object.keys(n);return o.length!==Object.keys(r).length?!1:o.every(t=>n[t]===r[t])}catch{return!1}}var q=(()=>{let r=class r extends He{set parentLocalUIState(t){t&&(this.localUIStateSignal=t,this.isLocalUIStateOwner=!1)}get elementRef(){return this.hostElementRef}constructor(){let t=Q(tt),e=Q(Zt),i=Q(xe),a=Q(At).get(ut),c=Q(b),d=Q(N);super(t,e,i,a??void 0,void 0,c,d),this.autocompleteId=re(),this.defaultCondition=re(!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.veltContextHost=new ee({getHost:()=>this.hostElementRef?.nativeElement,ownerRef:this,getLocalUIState:()=>this.isLocalUIStateOwner?this.localUIStateSignal:void 0,getEntity:()=>this.getPublishedVeltEntity(),onContextChanged:()=>{this.adoptInheritedLocalUIState(),this.inheritSelectorItemFromContext(),this.onVeltContextChanged()},markForCheck:()=>this.cd?.markForCheck?.()}),this.onContextPayload=s=>{try{this.isContextInitialized||(this.isContextInitialized=!0),this._autocompleteId=s.autocompleteId,this._contextData=s.contextData||{};let h=this.coreService.getContextConfig(s.autocompleteId);h&&(this.componentConfigSignal.update(g=>m({},g)),this.componentConfigSignal=h,this.cd.markForCheck())}catch(h){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent onContextPayload:",h)}},this.isLocalUIStateRoot=!1,this.hostElementRef=t,this.themeService=e,this.dynamicDataService=c,this.loggingService=d,this.coreService=Q(Qt),this.actionService=Q(qe),this.cd=i,this.commentService=a??void 0,this.registry=Q(te,{optional:!0})??void 0,this._userIdContactService=Q(St),this._userIdAuthService=Q(Mt),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=ce(a,i);if(c){e(c),this.publishResolvedEntityToDescendants(),this.flushChangeDetection();return}this._userIdSub=zt([this._userIdContactService.getUserByUserId$(i),this._userIdAuthService.getUser$(),this._userIdContactService.getInternalUserContacts$()]).subscribe(([d,s,h])=>{try{let g=ce(h??[],i)??Qe(d,s,i);e(g),this.publishResolvedEntityToDescendants(),this.flushChangeDetection()}catch(g){this.loggingService.catch("Error resolving userId user:",g)}})}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(Xe,{optional:!0,skipSelf:!0});t?(this.localUIStateSignal=t,this.isLocalUIStateOwner=!1):(this.localUIStateSignal=A(le()),this.isLocalUIStateOwner=!0)}catch{this.localUIStateSignal=A(le()),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(),this.finalizeVeltContext();return}if(t){this._autocompleteId=t,this.initializeFromAutocompleteId(t),this.setupA11yAttributes(),this.setupDarkModeSync(),this.finalizeVeltContext();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(),this.finalizeVeltContext();return}if(this.registry){this.registry.register(this.onContextPayload);let i=this.registry.getLastPayload?.();i&&this.onContextPayload(i),this.setupA11yAttributes(),this.setupDarkModeSync(),this.finalizeVeltContext();return}this.tryRegisterWithContext(),this.setupA11yAttributes(),this.setupDarkModeSync(),this.finalizeVeltContext()}catch(t){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent ngOnInit:",t)}}finalizeVeltContext(){try{this.adoptInheritedLocalUIState(),this.inheritSelectorItemFromContext(),this.veltContextHost.finalize()}catch(t){this.loggingService?.catch?.("Error in AutocompletePrimitiveThemedComponent finalizeVeltContext:",t)}}refreshVeltContextFromPlacement(){this.veltContextHost.refreshFromPlacement()}onVeltContextChanged(){}getPublishedVeltEntity(){}getInheritedVeltContextData(){try{return xt(this.hostElementRef?.nativeElement)?.payload?.contextData||{}}catch{return{}}}getInheritedVeltEntity(){try{return Oe(this.hostElementRef?.nativeElement)}catch{return}}inheritSelectorItemFromContext(){try{let t=this.getInheritedVeltEntity(),e=this.selectorItem;if(e&&e!==this._lastInheritedSelectorItem)return;t&&t!==e&&(this.selectorItem=t,this._lastInheritedSelectorItem=t,this.flushChangeDetection())}catch(t){this.loggingService?.catch?.("Error in AutocompletePrimitiveThemedComponent inheritSelectorItemFromContext:",t)}}publishResolvedEntityToDescendants(){try{let t=this.hostElementRef?.nativeElement;if(!t)return;this.veltContextHost.refreshFromPlacement(),Tt(t)}catch{}}ngOnDestroy(){try{this.veltContextHost.destroy(),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 te)return i.contextData&&(this._contextData=i.contextData),i.registry;let a=window.ng;if(a?.getComponent){let d=a.getComponent(e);if(d?.registry)return d.registry}let c=e.__ngContext__;if(c&&Array.isArray(c))for(let d=0;d<c.length;d++){let s=c[d];if(s&&typeof s=="object"&&s.registry instanceof te)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}}adoptInheritedLocalUIState(){try{Xt({host:this.hostElementRef?.nativeElement,current:this.localUIStateSignal,isOwner:this.isLocalUIStateOwner,isRoot:this.isLocalUIStateRoot,adopt:t=>{this.localUIStateSignal=t,this.isLocalUIStateOwner=!1}})}catch(t){this.loggingService?.catch?.("Error in AutocompletePrimitiveThemedComponent adoptInheritedLocalUIState:",t)}}};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}),Nn=(n,r)=>({condition:n,data:r}),Vn=n=>({componentConfigSignal:n}),Ln=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-description-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),Bn=()=>({});function zn(n,r){n&1&&z(0)}function $n(n,r){if(n&1&&v(0,zn,1,0,"ng-container",5),n&2){l(2);let o=W(3);p("ngTemplateOutlet",o)}}function Gn(n,r){n&1&&z(0)}function Hn(n,r){if(n&1&&v(0,Gn,1,0,"ng-container",5),n&2){l(2);let o=W(5);p("ngTemplateOutlet",o)}}function Wn(n,r){n&1&&z(0)}function Jn(n,r){if(n&1&&v(0,Wn,1,0,"ng-container",5),n&2){l(2);let o=W(7);p("ngTemplateOutlet",o)}}function Kn(n,r){if(n&1&&(S(0),w(1,$n,1,1,"ng-container")(2,Hn,1,1,"ng-container")(3,Jn,1,1,"ng-container"),y()),n&2){let o=l(2);u(),E((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function Yn(n,r){if(n&1&&(U(0),V(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 Xn(n,r){if(n&1&&(U(0),V(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 Zn(n,r){if(n&1&&(U(0),V(1,"translate")),n&2){let o,t=l(3),e=l();Yt(" ",(o=e.objectKeys((t==null||t.group==null||t.group.group==null?null:t.group.group.users)||Nt(4,Bn)))==null?null:o.length," ",L(1,2,"members")," ")}}function qn(n,r){if(n&1&&w(0,Zn,2,5),n&2){let o=l(2);E(!(o==null||o.group==null)&&o.group.group?0:-1)}}function Qn(n,r){if(n&1&&(S(0),v(1,Kn,4,1,"ng-container",4)(2,Yn,2,3,"ng-template",null,0,J)(4,Xn,2,3,"ng-template",null,1,J)(6,qn,1,1,"ng-template",null,2,J),y()),n&2){let o=l(),t=l();u(),p("veltDynamicTemplate",B(3,Ln,t.template,F(1,Vn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function to(n,r){if(n&1&&v(0,Qn,8,9,"ng-container",3),n&2){let o=l();p("veltIf",O(4,Nn,o.conditionSignal(),O(1,Un,o.componentConfigSignal,o.localUIStateSignal)))}}var tn=(()=>{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=A({})}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:[R([b]),j],decls:1,vars:1,consts:[["contacEmailRef",""],["customDescriptionRef",""],["groupDescriptionRef",""],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngTemplateOutlet"]],template:function(e,i){if(e&1&&w(0,to,1,7,"ng-container"),e&2){let a;E((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 eo=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),no=(n,r)=>({condition:n,data:r}),oo=n=>({componentConfigSignal:n}),ro=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function io(n,r){n&1&&z(0)}function ao(n,r){if(n&1&&v(0,io,1,0,"ng-container",5),n&2){l(2);let o=W(3);p("ngTemplateOutlet",o)}}function lo(n,r){n&1&&z(0)}function co(n,r){if(n&1&&v(0,lo,1,0,"ng-container",5),n&2){l(2);let o=W(5);p("ngTemplateOutlet",o)}}function so(n,r){n&1&&z(0)}function mo(n,r){if(n&1&&v(0,so,1,0,"ng-container",5),n&2){l(2);let o=W(7);p("ngTemplateOutlet",o)}}function po(n,r){if(n&1&&(S(0),w(1,ao,1,1,"ng-container")(2,co,1,1,"ng-container")(3,mo,1,1,"ng-container"),y()),n&2){let o=l(2);u(),E((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function vo(n,r){if(n&1&&Y(0,"snippyly-user-avatar",6),n&2){let o=l(2);p("size",32)("user",o==null?null:o.contact)}}function go(n,r){if(n&1&&(Y(0,"div",7),V(1,"safeSvg")),n&2){let o=l(3);p("innerHtml",L(1,1,o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null?null:o.custom.custom.icon.svg),Gt)}}function uo(n,r){if(n&1&&(x(0,"div",8),Y(1,"img",9),k()),n&2){let o=l(3);u(),p("src",o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null?null:o.custom.custom.icon.url,Ht)}}function ho(n,r){if(n&1&&(w(0,go,2,3,"div",7),w(1,uo,2,1,"div",8)),n&2){let o=l(2);E(!(o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null)&&o.custom.custom.icon.svg?0:-1),u(),E(!(o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null)&&o.custom.custom.icon.url?1:-1)}}function fo(n,r){n&1&&(x(0,"div",10),mt(),x(1,"svg",11),Y(2,"path",12),k()())}function Co(n,r){if(n&1&&(S(0),v(1,po,4,1,"ng-container",4)(2,vo,1,2,"ng-template",null,0,J)(4,ho,2,2,"ng-template",null,1,J)(6,fo,3,0,"ng-template",null,2,J),y()),n&2){let o=l(),t=l();u(),p("veltDynamicTemplate",B(3,ro,t.template,F(1,oo,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function _o(n,r){if(n&1&&v(0,Co,8,9,"ng-container",3),n&2){let o=l();p("veltIf",O(4,no,o.conditionSignal(),O(1,eo,o.componentConfigSignal,o.localUIStateSignal)))}}var nn=(()=>{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=A({})}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:[R([b]),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,_o,1,7,"ng-container"),e&2){let a;E((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 bo=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),xo=(n,r)=>({condition:n,data:r}),So=n=>({componentConfigSignal:n}),yo=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-name-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function ko(n,r){n&1&&z(0)}function Io(n,r){if(n&1&&v(0,ko,1,0,"ng-container",5),n&2){l(2);let o=W(3);p("ngTemplateOutlet",o)}}function Oo(n,r){n&1&&z(0)}function Do(n,r){if(n&1&&v(0,Oo,1,0,"ng-container",5),n&2){l(2);let o=W(5);p("ngTemplateOutlet",o)}}function wo(n,r){n&1&&z(0)}function Eo(n,r){if(n&1&&v(0,wo,1,0,"ng-container",5),n&2){l(2);let o=W(7);p("ngTemplateOutlet",o)}}function To(n,r){if(n&1&&(S(0),w(1,Io,1,1,"ng-container")(2,Do,1,1,"ng-container")(3,Eo,1,1,"ng-container"),y()),n&2){let o=l(2);u(),E((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function Ao(n,r){if(n&1&&(U(0),V(1,"translate")),n&2){let o=l(2);X(" ",L(1,1,o==null||o.contact==null?null:o.contact.name)," ")}}function Mo(n,r){if(n&1&&(U(0),V(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 Po(n,r){if(n&1&&(U(0),V(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 Ro(n,r){if(n&1&&(S(0),v(1,To,4,1,"ng-container",4)(2,Ao,2,3,"ng-template",null,0,J)(4,Mo,2,3,"ng-template",null,1,J)(6,Po,2,3,"ng-template",null,2,J),y()),n&2){let o=l(),t=l();u(),p("veltDynamicTemplate",B(3,yo,t.template,F(1,So,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Fo(n,r){if(n&1&&v(0,Ro,8,9,"ng-container",3),n&2){let o=l();p("veltIf",O(4,xo,o.conditionSignal(),O(1,bo,o.componentConfigSignal,o.localUIStateSignal)))}}var on=(()=>{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=A({})}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:[R([b]),j],decls:1,vars:1,consts:[["contactNameRef",""],["customNameRef",""],["groupNameRef",""],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngTemplateOutlet"]],template:function(e,i){if(e&1&&w(0,Fo,1,7,"ng-container"),e&2){let a;E((a=i.componentConfigSignal())?0:-1,a)}},styles:["[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let n=r;return n})();var jo=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),Uo=(n,r)=>({condition:n,data:r}),No=n=>({componentConfigSignal:n}),Vo=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Lo(n,r){n&1&&z(0)}function Bo(n,r){if(n&1&&(x(0,"velt-shadow-dom-internal"),v(1,Lo,1,0,"ng-container",2),k()),n&2){l();let o=W(4);u(),p("ngTemplateOutlet",o)}}function zo(n,r){n&1&&z(0)}function $o(n,r){if(n&1&&v(0,zo,1,0,"ng-container",2),n&2){l();let o=W(4);p("ngTemplateOutlet",o)}}function Go(n,r){if(n&1&&(x(0,"div",4)(1,"div",5),Y(2,"velt-autocomplete-chip-tooltip-icon-internal",6),k(),x(3,"div",7)(4,"div",8),Y(5,"velt-autocomplete-chip-tooltip-name-internal",6),k(),x(6,"div",9),Y(7,"velt-autocomplete-chip-tooltip-description-internal",6),k()()()),n&2){let o=l(4);u(2),p("componentConfigSignal",o.componentConfigSignal),u(3),p("componentConfigSignal",o.componentConfigSignal),u(2),p("componentConfigSignal",o.componentConfigSignal)}}function Ho(n,r){if(n&1&&v(0,Go,8,3,"div",3),n&2){let o=l(2),t=l();p("veltDynamicTemplate",B(3,Vo,t.template,F(1,No,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Wo(n,r){if(n&1&&(S(0),w(1,Bo,2,1,"velt-shadow-dom-internal")(2,$o,1,1,"ng-container"),v(3,Ho,1,9,"ng-template",null,0,J),y()),n&2){let o=l(2);u(),E(o.shadowDom&&!o.template||o.template&&o.isExplicitShadowDom?1:2)}}function Jo(n,r){if(n&1&&v(0,Wo,5,1,"ng-container",1),n&2){let o=l();p("veltIf",O(4,Uo,o.conditionSignal(),O(1,jo,o.componentConfigSignal,o.localUIStateSignal)))}}var rn=(()=>{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=A({}),this.subscriptions=[],this.wireframeService=Q(Pt)}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:[R([b]),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,Jo,1,7,"ng-container"),e&2){let a;E((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 Yo=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),Xo=(n,r)=>({condition:n,data:r}),se=n=>({$implicit:n}),Zo=(n,r)=>({componentConfigSignal:n,userContact:r}),de=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-description-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),qo=(n,r)=>({componentConfigSignal:n,custom:r}),Qo=(n,r)=>({componentConfigSignal:n,group:r}),an=()=>({});function tr(n,r){n&1&&z(0)}function er(n,r){if(n&1&&v(0,tr,1,0,"ng-container",4),n&2){l();let o=W(5),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,se,t.selectorItem==null?null:t.selectorItem.contact))}}function nr(n,r){n&1&&z(0)}function or(n,r){if(n&1&&v(0,nr,1,0,"ng-container",4),n&2){l();let o=W(7),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,se,t.selectorItem==null?null:t.selectorItem.custom))}}function rr(n,r){n&1&&z(0)}function ir(n,r){if(n&1&&v(0,rr,1,0,"ng-container",4),n&2){l();let o=W(9),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,se,t.selectorItem==null?null:t.selectorItem.group))}}function ar(n,r){if(n&1&&(x(0,"p",7),U(1),V(2,"translate"),k()),n&2){let o=l(2).$implicit,t=l(3);Et("velt-autocomplete-option-description--secondary",(o.name==null?null:o.name.length)>0),M("aria-label",t.field?o[t.field]:o.email),u(),X(" ",t.field?o[t.field]:L(2,4,o.email)," ")}}function lr(n,r){if(n&1&&v(0,ar,3,6,"p",6),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",B(4,de,e.template,O(1,Zo,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function cr(n,r){if(n&1&&w(0,lr,1,10,"p",5),n&2){let o=r.$implicit,t=l(3);E((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 sr(n,r){if(n&1&&(x(0,"p",7),U(1),V(2,"translate"),k()),n&2){let o=l(2).$implicit;M("aria-label",o.description),u(),X(" ",L(2,2,o.description)," ")}}function dr(n,r){if(n&1&&v(0,sr,3,4,"p",8),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",B(4,de,e.template,O(1,qo,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function mr(n,r){if(n&1&&w(0,dr,1,10,"p",7),n&2){let o=r.$implicit;E((o.description==null?null:o.description.length)>0?0:-1)}}function pr(n,r){if(n&1&&(x(0,"p",7),U(1),V(2,"translate"),k()),n&2){let o,t,e=l().$implicit,i=l(3);M("aria-label",((o=i.objectKeys((e==null?null:e.users)||Nt(5,an)))==null?null:o.length)+" members"),u(),Yt(" ",(t=i.objectKeys((e==null?null:e.users)||Nt(6,an)))==null?null:t.length," ",L(2,3,"members")," ")}}function vr(n,r){if(n&1&&v(0,pr,3,7,"p",8),n&2){let o=r.$implicit,t=l(2),e=l();p("veltDynamicTemplate",B(4,de,e.template,O(1,Qo,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function gr(n,r){if(n&1&&(S(0),w(1,er,1,4,"ng-container")(2,or,1,4,"ng-container")(3,ir,1,4,"ng-container"),v(4,cr,1,1,"ng-template",null,0,J)(6,mr,1,1,"ng-template",null,1,J)(8,vr,1,10,"ng-template",null,2,J),y()),n&2){let o=l(2);u(),E((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 ur(n,r){if(n&1&&v(0,gr,10,1,"ng-container",3),n&2){let o=l();p("veltIf",O(5,Xo,o.conditionSignal(),it(1,Yo,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var ln=(()=>{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=A({}),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:[R([b]),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,ur,1,8,"ng-container"),e&2){let a;E((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 hr=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),fr=(n,r)=>({condition:n,data:r}),Cr=n=>({componentConfigSignal:n}),cn=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-error-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),_r=n=>({$implicit:n}),br=(n,r,o)=>({componentConfigSignal:n,isNewContact:r,userContact:o});function xr(n,r){if(n&1&&(x(0,"div",4)(1,"div",5),mt(),x(2,"svg",6),Y(3,"path",7)(4,"path",8),k()()()),n&2){let o=l(4);u(),M("data-testid",o.componentId+"-icon"),u(),M("data-testid",o.componentId+"-svg")}}function Sr(n,r){if(n&1&&(x(0,"div",2),V(1,"translate"),v(2,xr,5,2,"div",3),k()),n&2){let o=l(2),t=l();M("aria-label",L(1,3,"Invalid contact"))("data-testid",t.componentId),u(2),p("veltDynamicTemplate",B(7,cn,t.template,F(5,Cr,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function yr(n,r){n&1&&z(0)}function kr(n,r){if(n&1&&v(0,yr,1,0,"ng-container",9),n&2){l();let o=W(4),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,_r,t.selectorItem==null?null:t.selectorItem.contact))}}function Ir(n,r){if(n&1&&(x(0,"div",4)(1,"div",10),mt(),x(2,"svg",6),Y(3,"path",7)(4,"path",8),k()()()),n&2){let o=l(4),t=l();u(),p("title",o.newUserContactError),M("title",o.newUserContactError)("data-testid",t.componentId+"-icon"),u(),M("data-testid",t.componentId+"-svg")}}function Or(n,r){if(n&1&&(x(0,"div",2),V(1,"translate"),v(2,Ir,5,4,"div",3),k()),n&2){let o=l().$implicit,t=l(2),e=l();M("aria-label",L(1,3,(t==null?null:t.newUserContactError)||"Invalid contact"))("data-testid",e.componentId),u(2),p("veltDynamicTemplate",B(9,cn,e.template,it(5,br,e.componentConfigSignal,e.isNewContact,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function Dr(n,r){if(n&1&&w(0,Or,3,15,"div",2),n&2){let o=l(2),t=l();E(t.isNewContact&&o.newUserContactError?0:-1)}}function wr(n,r){if(n&1&&(S(0),w(1,Sr,3,13,"div",2)(2,kr,1,4,"ng-container"),v(3,Dr,1,1,"ng-template",null,0,J),y()),n&2){let o=l(2);u(),E(o.defaultCondition()?(o.selectorItem==null?null:o.selectorItem.type)==="contact"?2:-1:1)}}function Er(n,r){if(n&1&&v(0,wr,5,1,"ng-container",1),n&2){let o=l();p("veltIf",O(5,fr,o.conditionSignal(),it(1,hr,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var sn=(()=>{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=A({}),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:[R([b]),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,Er,1,8,"ng-container"),e&2){let a;E((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 Tr=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),Ar=(n,r)=>({condition:n,data:r}),Mr=(n,r)=>({componentConfigSignal:n,selectorItem:r}),Pr=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),me=n=>({$implicit:n});function Rr(n,r){n&1&&z(0)}function Fr(n,r){if(n&1&&v(0,Rr,1,0,"ng-container",6),n&2){l(2);let o=W(3),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,me,t.selectorItem==null?null:t.selectorItem.contact))}}function jr(n,r){n&1&&z(0)}function Ur(n,r){if(n&1&&v(0,jr,1,0,"ng-container",6),n&2){l(2);let o=W(5),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,me,t.selectorItem==null?null:t.selectorItem.custom))}}function Nr(n,r){n&1&&z(0)}function Vr(n,r){if(n&1&&v(0,Nr,1,0,"ng-container",6),n&2){l(2);let o=W(7),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,me,t.selectorItem==null?null:t.selectorItem.group))}}function Lr(n,r){if(n&1&&(x(0,"div",5),w(1,Fr,1,4,"ng-container")(2,Ur,1,4,"ng-container")(3,Vr,1,4,"ng-container"),k()),n&2){let o=l(3);M("data-testid",o.componentId)("aria-label","Option icon"),u(),E((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 Br(n,r){if(n&1&&(mt(),x(0,"svg",7),Y(1,"path",9),k()),n&2){let o=l(4);M("data-testid",o.componentId+"-contact-at")}}function zr(n,r){if(n&1&&Y(0,"snippyly-user-avatar",8),n&2){let o=l().$implicit,t=l(3);p("size",32)("user",o),M("data-testid",t.componentId+"-contact-avatar")}}function $r(n,r){if(n&1&&w(0,Br,2,1,":svg:svg",7)(1,zr,1,3,"snippyly-user-avatar",8),n&2){let o=r.$implicit;E((o==null?null:o.visibility)==="here"?0:1)}}function Gr(n,r){if(n&1&&(Y(0,"div",10),V(1,"safeSvg")),n&2){let o=l().$implicit,t=l(3);p("innerHTML",L(1,2,o.icon.svg),Gt),M("data-testid",t.componentId+"-custom-svg")}}function Hr(n,r){if(n&1&&Y(0,"img",11),n&2){let o=l().$implicit,t=l(3);p("src",o.icon.url,Ht),M("alt",(o==null?null:o.description)||"Custom icon")("data-testid",t.componentId+"-custom-img")}}function Wr(n,r){if(n&1&&(w(0,Gr,2,4,"div",10),w(1,Hr,1,3,"img",11)),n&2){let o=r.$implicit;E(!(o==null||o.icon==null)&&o.icon.svg?0:-1),u(),E(!(o==null||o.icon==null)&&o.icon.url?1:-1)}}function Jr(n,r){if(n&1&&(mt(),x(0,"svg",12),Y(1,"path",13),k()),n&2){let o=l(3);M("data-testid",o.componentId+"-group-icon")}}function Kr(n,r){if(n&1&&(S(0),v(1,Lr,4,3,"div",4)(2,$r,2,1,"ng-template",null,0,J)(4,Wr,2,2,"ng-template",null,1,J)(6,Jr,2,1,"ng-template",null,2,J),y()),n&2){let o=l(),t=l();u(),p("veltDynamicTemplate",B(4,Pr,t.template,O(1,Mr,t.componentConfigSignal,t.selectorItem),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Yr(n,r){if(n&1&&v(0,Kr,8,10,"ng-container",3),n&2){let o=l();p("veltIf",O(5,Ar,o.conditionSignal(),it(1,Tr,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var dn=(()=>{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=A({}),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:[R([b]),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,Yr,1,8,"ng-container"),e&2){let a;E((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 Xr=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),Zr=(n,r)=>({condition:n,data:r}),pe=n=>({$implicit:n}),qr=(n,r)=>({componentConfigSignal:n,userContact:r}),ve=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-name-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),Qr=(n,r)=>({componentConfigSignal:n,custom:r}),ti=(n,r)=>({componentConfigSignal:n,group:r});function ei(n,r){n&1&&z(0)}function ni(n,r){if(n&1&&v(0,ei,1,0,"ng-container",4),n&2){l();let o=W(5),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,pe,t.selectorItem==null?null:t.selectorItem.contact))}}function oi(n,r){n&1&&z(0)}function ri(n,r){if(n&1&&v(0,oi,1,0,"ng-container",4),n&2){l();let o=W(7),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,pe,t.selectorItem==null?null:t.selectorItem.custom))}}function ii(n,r){n&1&&z(0)}function ai(n,r){if(n&1&&v(0,ii,1,0,"ng-container",4),n&2){l();let o=W(9),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,pe,t.selectorItem==null?null:t.selectorItem.group))}}function li(n,r){if(n&1&&(x(0,"p",5),U(1),V(2,"translate"),k()),n&2){let o=l(2).$implicit,t=l(3);M("data-testid",t.componentId+"-contact-text")("aria-label",o.name||o.email),u(),X(" ",L(2,3,o.name||o.email)," ")}}function ci(n,r){if(n&1&&v(0,li,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",B(4,ve,e.template,O(1,qr,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function si(n,r){n&1&&Y(0,"velt-skeleton-loader-internal",6)}function di(n,r){if(n&1&&w(0,ci,1,10,"p",5)(1,si,1,0,"velt-skeleton-loader-internal",6),n&2){let o=r.$implicit;E((o.name==null?null:o.name.length)>0||(o==null||o.email==null?null:o.email.length)>0?0:1)}}function mi(n,r){if(n&1&&(x(0,"p",5),U(1),V(2,"translate"),k()),n&2){let o=l(2).$implicit,t=l(3);M("data-testid",t.componentId+"-custom-text")("aria-label",o.name),u(),X(" ",L(2,3,o.name)," ")}}function pi(n,r){if(n&1&&v(0,mi,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",B(4,ve,e.template,O(1,Qr,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function vi(n,r){if(n&1&&w(0,pi,1,10,"p",5),n&2){let o=r.$implicit;E((o.name==null?null:o.name.length)>0?0:-1)}}function gi(n,r){if(n&1&&(x(0,"p",5),U(1),V(2,"translate"),k()),n&2){let o=l(2).$implicit,t=l(3);M("data-testid",t.componentId+"-group-text")("aria-label",o==null||o.metadata==null?null:o.metadata.groupName),u(),X(" ",L(2,3,o==null||o.metadata==null?null:o.metadata.groupName)," ")}}function ui(n,r){if(n&1&&v(0,gi,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",B(4,ve,e.template,O(1,ti,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function hi(n,r){if(n&1&&w(0,ui,1,10,"p",5),n&2){let o=r.$implicit;E((o==null||o.metadata==null||o.metadata.groupName==null?null:o.metadata.groupName.length)>0?0:-1)}}function fi(n,r){if(n&1&&(S(0),w(1,ni,1,4,"ng-container")(2,ri,1,4,"ng-container")(3,ai,1,4,"ng-container"),v(4,di,2,1,"ng-template",null,0,J)(6,vi,1,1,"ng-template",null,1,J)(8,hi,1,1,"ng-template",null,2,J),y()),n&2){let o=l(2);u(),E((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 Ci(n,r){if(n&1&&v(0,fi,10,1,"ng-container",3),n&2){let o=l();p("veltIf",O(5,Zr,o.conditionSignal(),it(1,Xr,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var mn=(()=>{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=A({}),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:[R([b]),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,Ci,1,8,"ng-container"),e&2){let a;E((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 _i=(n,r,o,t,e,i,a)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o,isNewContact:t,multiSelect:e,isSelected:i,readOnly:a}),bi=(n,r)=>({condition:n,data:r}),xi=(n,r,o,t,e,i)=>({componentConfigSignal:n,isNewContact:r,selectorItem:o,multiSelect:t,isSelected:e,readOnly:i}),Si=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function yi(n,r){if(n&1&&(x(0,"div",3),Y(1,"velt-autocomplete-option-icon-internal",4),x(2,"div",5),Y(3,"velt-autocomplete-option-name-internal",4)(4,"velt-autocomplete-option-description-internal",4),k(),Y(5,"velt-autocomplete-option-error-icon-internal",6),k()),n&2){let o=l(2),t=l();Et("velt-autocomplete-option--multi-select",t.multiSelect)("velt-autocomplete-option--selected",t.isSelected),M("data-testid",t.componentId)("aria-selected",t.isSelected)("aria-disabled",!!(o!=null&&o.newUserContactError)),u(),p("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),u(),M("data-testid",t.componentId+"-details"),u(),p("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),u(),p("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),u(),p("selectorItem",t.selectorItem)("isNewContact",t.isNewContact)("componentConfigSignal",t.componentConfigSignal)}}function ki(n,r){n&1&&(x(0,"div",2),mt(),x(1,"svg",7),Y(2,"path",8),k()())}function Ii(n,r){if(n&1&&(S(0),v(1,yi,6,17,"div",1),w(2,ki,3,0,"div",2),y()),n&2){let o=l(),t=l();u(),p("veltDynamicTemplate",B(9,Si,t.template,_e(2,xi,t.componentConfigSignal,t.isNewContact,t.selectorItem,t.multiSelect,t.isSelected,t.readOnly),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef)),u(),E(t.multiSelect&&!t.readOnly&&t.isSelected?2:-1)}}function Oi(n,r){if(n&1&&v(0,Ii,3,15,"ng-container",0),n&2){let o=l();p("veltIf",O(9,bi,o.conditionSignal(),be(1,_i,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem,o.isNewContact,o.multiSelect,o.isSelected,o.readOnly)))}}var pn=(()=>{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=A({}),this.subscriptions=[],this.wireframeService=Q(Pt),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)}}getPublishedVeltEntity(){return this.selectorItem}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:[R([b]),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,Oi,1,12,"ng-container"),e&2){let a;E((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 vn=(()=>{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=A(void 0),this.dataComponentConfigSignal=A({}),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,d){try{Object.keys(i).forEach(s=>{let h;if(ot(t)?h=rt(()=>lt(t(),i[s].path)):h=rt(()=>lt(t,i[s].path)),ot(h()))bt(()=>{try{let g=h()();i[s].value=g,this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector});else{let g=h();i[s].value=g,this.extractedProps=i,this.evaluateCondition()}})}catch(s){this.loggingService.catch("Error in DynamicDataService getComputedValues: ",s)}}};r.\u0275fac=function(e){return new(e||r)(I(N),I(b),I(at))},r.\u0275cmp=P({type:r,selectors:[["app-data"]],inputs:{path:"path",field:"field"},standalone:!1,features:[R([b])],decls:2,vars:3,template:function(e,i){e&1&&(U(0),V(1,"translate")),e&2&&Ct(L(1,1,i.valueSignal()))},dependencies:[We],encapsulation:2,changeDetection:0});let n=r;return n})();var Di=(n,r)=>({template:n,context:r,cloneTemplate:!0});function wi(n,r){n&1&&z(0)}function Ei(n,r){if(n&1&&(S(0),v(1,wi,1,0,"ng-container",1),y()),n&2){let o=l();u(),p("veltDynamicTemplate",O(1,Di,o.template,o.dataComponentConfigSignal()))}}var gn=(()=>{let r=class r{constructor(t,e,i){this.loggingService=t,this.dynamicDataService=e,this.injector=i,this.condition="",this.showContent=A(!1),this.conditionRegex=/\{(.*?)\}/g,this.extractedProps={},this.dataComponentConfigSignal=A({}),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,(d,s)=>{let h=e[s];if(h&&h.value!==void 0){let g=h.value;return typeof g=="string"?`'${g}'`:typeof g=="boolean"||typeof g=="number"?String(g):g===null?"null":typeof g=="object"?g?"true":"false":String(g)}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,d){try{this.cleanupEffects.forEach(s=>s.destroy()),this.cleanupEffects.length=0,Object.keys(i).forEach(s=>{let h;if(ot(t)?h=rt(()=>lt(t(),i[s].path)):h=rt(()=>lt(t,i[s].path)),ot(h())){let g=bt(()=>{try{let T=h()();i[s].value=T,this.extractedProps=i,this.evaluateCondition()}catch{i[s].value="",this.extractedProps=i,this.evaluateCondition()}},{injector:this.injector});this.cleanupEffects.push(g)}else{let g=h();i[s].value=g,this.extractedProps=i,this.evaluateCondition()}})}catch(s){this.loggingService.catch("Error in DynamicDataService getComputedValues: ",s)}}};r.\u0275fac=function(e){return new(e||r)(I(N),I(b),I(at))},r.\u0275cmp=P({type:r,selectors:[["app-if"]],inputs:{template:"template",condition:"condition"},standalone:!1,features:[R([b])],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltDynamicTemplate"]],template:function(e,i){e&1&&v(0,Ei,2,4,"ng-container",0),e&2&&p("ngIf",i.showContent())},styles:["[_nghost-%COMP%]{display:flex;align-items:center}"],changeDetection:0});let n=r;return n})();var un=(()=>{let r=class r{constructor(t,e,i){this.coreActionsService=t,this.loggingService=e,this.metadataService=i,this.buttonClickSubject$=new Ot,this.buttonToggleMap$=new Bt({}),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(d){return vt(this,arguments,function*({id:t,type:e,groupId:i,contextData:a,data:c}){try{this.buttonToggle(t,void 0,e,i);let h=this.extractButtonData(a),g=this.createButtonContext(t,e,i),T=yield this.metadataService.getGlobalMetadata(),D={};if(c){let s=c,{componentConfigSignal:C}=s,$=ge(s,["componentConfigSignal"]);if(D=m({},$),C&&typeof C=="function")try{let Z=C();Z&&typeof Z=="object"&&(D=m(m({},D),Z))}catch(Z){this.loggingService.catch("Error accessing componentConfigSignal: ",Z)}}let _=f(m({buttonContext:g},h),{metadata:T,data:D});this.buttonClickSubject$.next(_),this.coreActionsService.triggerAction(ae.VELT_BUTTON_CLICK,_)}catch(h){this.loggingService.catch("Error in ButtonService buttonClick: ",h)}})}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,d=this.createNewToggleMap(c,t,e,i,a);this.buttonToggleMap$.next(d)}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 d=m({},t);return a==="button-toggle"?f(m({},d),{ungrouped:f(m({},d.ungrouped),{[e]:i??!d.ungrouped?.[e]})}):a==="single-select"&&c?f(m({},d),{[c]:{[e]:i??!0}}):a==="multi-select"&&c?f(m({},d),{[c]:f(m({},d[c]),{[e]:i??!d[c]?.[e]})}):d}catch(d){return this.loggingService.catch("Error in ButtonService createNewToggleMap: ",d),{}}}buttonClickSubject(){return this.buttonClickSubject$.asObservable()}buttonToggleMap(){return this.buttonToggleMap$.asObservable()}resetVeltButtonState(t){return vt(this,null,function*(){try{if(t){let{id:c,group:d}=t,s=JSON.parse(JSON.stringify(this.buttonToggleMap$.value||{}));d&&c?delete s?.[d]?.[c]:d?delete s?.[d]:c&&Object.keys(s).forEach(h=>{Object.keys(s[h]).forEach(g=>{g===c&&delete s?.[h]?.[g]})}),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(ae.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)(H(ze),H(N),H(Ye))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var Ai=n=>({componentConfigSignal:n}),Mi=(n,r)=>({condition:n,data:r}),Pi=(n,r)=>({componentConfigSignal:n,buttonComponentConfig:r}),Ri=(n,r,o,t)=>({template:n,context:r,cloneTemplate:!0,setIfCondition:o,componentElementRef:t});function Fi(n,r){if(n&1&&(S(0),U(1),V(2,"translate"),y()),n&2){let o=l(5);u(),X(" ",L(2,1,o.id)," ")}}function ji(n,r){if(n&1){let o=Dt();x(0,"div",3),wt("click",function(){kt(o);let e=l(4);return It(e.onClick())}),v(1,Fi,3,3,"ng-container",4),k()}if(n&2){let o=l().ngIf,t=l(3);Et("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]),M("data-testid",t.componentId+"-"+t.id)("data-group",t.group?t.group:"ungrouped")("data-value",t.valueSignal()),u(),p("veltDynamicTemplate",_t(11,Ri,t.template,O(8,Pi,t.dataComponentConfigSignal().componentConfigSignal,o),t.setIfCondition.bind(t),t.elementRef))}}function Ui(n,r){if(n&1&&(S(0),v(1,ji,2,16,"div",2),y()),n&2){let o=l(3);u(),p("ngIf",o.id)}}function Ni(n,r){if(n&1&&(S(0),v(1,Ui,2,1,"ng-container",0),y()),n&2){let o=l(2);u(),p("ngIf",o.buttonComponentConfigSignal())}}function Vi(n,r){if(n&1&&(S(0),v(1,Ni,2,1,"ng-container",1),y()),n&2){let o=l();u(),p("veltIf",O(3,Mi,o.conditionSignal(),F(1,Ai,o.dataComponentConfigSignal().componentConfigSignal)))}}var hn=(()=>{let r=class r extends ct{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=A(void 0),this.dataComponentConfigSignal=A({}),this.buttonComponentConfigSignal=A({buttonToggleMap:{},active:!1,disabled:!1,contextData:{},internalId:null});try{this.subscription.push(this.dynamicDataService.getCommonData().subscribe(d=>{this.dataComponentConfigSignal.update(s=>(s=m(m({},s),d),s)),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps)}))}catch(d){this.loggingService.catch("Error in ButtonComponent data functionality: ",d)}}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,d){try{Object.keys(i).forEach(s=>{let h;ot(t)?h=rt(()=>lt(t(),i[s].path)):h=rt(()=>lt(t,i[s].path)),ot(h())?bt(()=>{try{i[s].value=h()(),this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector}):(i[s].value=h(),this.extractedProps=i,this.evaluateCondition())})}catch(s){this.loggingService.catch("Error in ButtonComponent getComputedValues: ",s)}}};r.\u0275fac=function(e){return new(e||r)(I(un),I(N),I(b),I(tt),I(at))},r.\u0275cmp=P({type:r,selectors:[["app-button"]],inputs:{id:"id",type:"type",group:"group",disabled:"disabled",active:"active"},standalone:!1,features:[R([b]),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&&v(0,Vi,2,6,"ng-container",0),e&2&&p("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 Li=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,group:o}),Bi=(n,r)=>({condition:n,data:r}),zi=(n,r)=>({componentConfigSignal:n,group:r}),$i=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-group-option-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Gi(n,r){if(n&1&&(S(0),x(1,"div",2)(2,"span",3),U(3),k()(),y()),n&2){let o=l(3);u(3),Ct((o.group==null?null:o.group.name)||o.groupName)}}function Hi(n,r){if(n&1&&(S(0),v(1,Gi,4,1,"ng-container",1),y()),n&2){let o=l(),t=l();u(),p("veltDynamicTemplate",B(4,$i,t.template,O(1,zi,t.componentConfigSignal,t.group),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Wi(n,r){if(n&1&&v(0,Hi,2,10,"ng-container",0),n&2){let o=l();p("veltIf",O(5,Bi,o.conditionSignal(),it(1,Li,o.componentConfigSignal,o.localUIStateSignal,o.group)))}}var fn=(()=>{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=Ji(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(St),this.componentConfigSignal=A({})}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:[R([b]),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,Wi,1,8,"ng-container"),e&2){let a;E((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 Ji(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 Ki=(n,r,o,t)=>({componentConfigSignal:n,parentLocalUIState:r,newUserContact:o,newUserContactError:t}),Yi=(n,r)=>({condition:n,data:r}),Xi=(n,r,o)=>({componentConfigSignal:n,newUserContact:r,newUserContactError:o}),Zi=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-empty-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function qi(n,r){if(n&1&&(x(0,"span",3),U(1),k()),n&2){let o=l(4);M("data-testid",o.componentId+"-add-contact"),u(),X(' Add "',o.newUserContact==null||o.newUserContact.contact==null?null:o.newUserContact.contact.email,'" ')}}function Qi(n,r){if(n&1&&(x(0,"span",4),U(1),k()),n&2){let o=l(4);M("data-testid",o.componentId+"-error"),u(),X(" ",o.newUserContactError," ")}}function ta(n,r){if(n&1&&(x(0,"span",5),U(1," No results found "),k()),n&2){let o=l(4);M("data-testid",o.componentId+"-no-results")}}function ea(n,r){if(n&1&&(S(0),x(1,"div",2),w(2,qi,2,2,"span",3)(3,Qi,2,2,"span",4)(4,ta,2,1,"span",5),k(),y()),n&2){let o=l(3);u(),M("data-testid",o.componentId),u(),E(!(o.newUserContact==null||o.newUserContact.contact==null)&&o.newUserContact.contact.email&&!o.newUserContactError?2:o.newUserContactError?3:4)}}function na(n,r){if(n&1&&(S(0),v(1,ea,5,2,"ng-container",1),y()),n&2){let o=l(),t=l();u(),p("veltDynamicTemplate",B(5,Zi,t.template,it(1,Xi,t.componentConfigSignal,t.newUserContact,t.newUserContactError),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function oa(n,r){if(n&1&&v(0,na,2,11,"ng-container",0),n&2){let o=l();p("veltIf",O(6,Yi,o.conditionSignal(),_t(1,Ki,o.componentConfigSignal,o.localUIStateSignal,o.newUserContact,o.newUserContactError)))}}var Cn=(()=>{let r=class r extends q{constructor(){super(),this.componentId="velt-autocomplete-empty",this.componentConfigSignal=A({})}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:[R([b]),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,oa,1,9,"ng-container"),e&2){let a;E((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 st=class{constructor(){this.closeDialog=()=>{},this.darkMode=!1,this.variant="",this.type=""}};var _n=n=>({componentConfigSignal:n}),ra=(n,r)=>({condition:n,data:r}),ia=(n,r,o,t)=>({template:n,context:r,componentName:"velt-confirm-dialog-reject-button-wireframe",setIfCondition:o,componentElementRef:t});function aa(n,r){if(n&1&&(S(0),x(1,"button",4),U(2),V(3,"translate"),k(),y()),n&2){let o=l(2).ngIf;u(2),X(" ",L(3,1,(o==null?null:o.noButton)||"No")," ")}}function la(n,r){if(n&1){let o=Dt();S(0),x(1,"div",2),wt("pointerdown",function(e){return kt(o),It(e.stopPropagation())}),v(2,aa,4,3,"ng-container",3),k(),y()}if(n&2){let o=l(2);u(),M("data-testid",o.componentId+"-button"),u(),p("veltDynamicTemplate",_t(4,ia,o.template,F(2,_n,o.componentConfigSignal),o.setIfCondition.bind(o),o.elementRef))}}function ca(n,r){if(n&1&&(S(0),v(1,la,3,9,"ng-container",1),y()),n&2){let o=l();u(),p("veltIf",O(3,ra,o.conditionSignal(),F(1,_n,o.componentConfigSignal)))}}var bn=(()=>{let r=class r extends ct{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 st)}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)(I(tt),I(b),I(N))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-reject"]],standalone:!1,features:[R([b]),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&&v(0,ca,2,6,"ng-container",0),e&2&&p("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 xn=n=>({componentConfigSignal:n}),sa=(n,r)=>({condition:n,data:r}),da=(n,r,o,t)=>({template:n,context:r,componentName:"velt-confirm-dialog-approve-button-wireframe",setIfCondition:o,componentElementRef:t});function ma(n,r){if(n&1&&(S(0),x(1,"button",4),U(2),V(3,"translate"),k(),y()),n&2){let o=l(2).ngIf;u(2),X(" ",L(3,1,(o==null?null:o.yesButton)||"Yes")," ")}}function pa(n,r){if(n&1){let o=Dt();S(0),x(1,"div",2),wt("pointerdown",function(e){return kt(o),It(e.stopPropagation())})("click",function(){kt(o);let e=l().ngIf;return It(e==null?null:e.closeDialog(!0))}),v(2,ma,4,3,"ng-container",3),k(),y()}if(n&2){let o=l(2);u(),M("data-testid",o.componentId+"-button"),u(),p("veltDynamicTemplate",_t(4,da,o.template,F(2,xn,o.componentConfigSignal),o.setIfCondition.bind(o),o.elementRef))}}function va(n,r){if(n&1&&(S(0),v(1,pa,3,9,"ng-container",1),y()),n&2){let o=l();u(),p("veltIf",O(3,sa,o.conditionSignal(),F(1,xn,o.componentConfigSignal)))}}var Sn=(()=>{let r=class r extends ct{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 st)}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)(I(tt),I(b),I(N))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-approve"]],standalone:!1,features:[R([b]),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&&v(0,va,2,6,"ng-container",0),e&2&&p("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 yn=n=>({componentConfigSignal:n}),ga=(n,r)=>({condition:n,data:r}),ua=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-confirm-dialog-title-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function ha(n,r){if(n&1&&(x(0,"h2",4),U(1),V(2,"translate"),k()),n&2){let o=l(3).ngIf,t=l();M("data-testid",t.componentId),u(),Ct(L(2,2,o==null?null:o.title))}}function fa(n,r){if(n&1&&(S(0),v(1,ha,3,4,"h2",3),y()),n&2){let o=l(2).ngIf;u(),p("ngIf",o==null?null:o.title)}}function Ca(n,r){if(n&1&&(S(0),v(1,fa,2,1,"ng-container",2),y()),n&2){let o=l().ngIf,t=l();u(),p("veltDynamicTemplate",B(3,ua,t.template,F(1,yn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function _a(n,r){if(n&1&&(S(0),v(1,Ca,2,9,"ng-container",1),y()),n&2){let o=l();u(),p("veltIf",O(3,ga,o.conditionSignal(),F(1,yn,o.componentConfigSignal)))}}var kn=(()=>{let r=class r extends ct{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 st)}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)(I(tt),I(b),I(N))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-title"]],standalone:!1,features:[R([b]),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&&v(0,_a,2,6,"ng-container",0),e&2&&p("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 In=n=>({componentConfigSignal:n}),ba=(n,r)=>({condition:n,data:r}),xa=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-confirm-dialog-message-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Sa(n,r){if(n&1&&(x(0,"div"),U(1),V(2,"translate"),k()),n&2){let o=l(3).ngIf;u(),X(" ",L(2,1,o==null?null:o.message)," ")}}function ya(n,r){if(n&1&&(S(0),v(1,Sa,3,3,"div",0),y()),n&2){let o=l(2).ngIf;u(),p("ngIf",o==null?null:o.message)}}function ka(n,r){if(n&1&&(S(0),x(1,"div",2),v(2,ya,2,1,"ng-container",3),k(),y()),n&2){let o=l().ngIf,t=l();u(),M("data-testid",t.componentId),u(),p("veltDynamicTemplate",B(4,xa,t.template,F(2,In,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Ia(n,r){if(n&1&&(S(0),v(1,ka,3,10,"ng-container",1),y()),n&2){let o=l();u(),p("veltIf",O(3,ba,o.conditionSignal(),F(1,In,o.componentConfigSignal)))}}var On=(()=>{let r=class r extends ct{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 st)}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)(I(tt),I(b),I(N))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-message"]],standalone:!1,features:[R([b]),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&&v(0,Ia,2,6,"ng-container",0),e&2&&p("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 Dn=n=>({componentConfigSignal:n}),Oa=(n,r)=>({condition:n,data:r}),Da=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-confirm-dialog-preview-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function wa(n,r){if(n&1&&(x(0,"div",5),U(1),k()),n&2){let o=l(3).ngIf;u(),Ct(o==null?null:o.previewText)}}function Ea(n,r){if(n&1&&(S(0),v(1,wa,2,1,"div",4),y()),n&2){let o=l(2).ngIf;u(),p("ngIf",o==null?null:o.previewText)}}function Ta(n,r){if(n&1&&(S(0),x(1,"div",2),v(2,Ea,2,1,"ng-container",3),k(),y()),n&2){let o=l().ngIf,t=l();u(),M("id",t.componentId)("data-testid",t.componentId),u(),p("veltDynamicTemplate",B(5,Da,t.template,F(3,Dn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Aa(n,r){if(n&1&&(S(0),v(1,Ta,3,11,"ng-container",1),y()),n&2){let o=l();u(),p("veltIf",O(3,Oa,o.conditionSignal(),F(1,Dn,o.componentConfigSignal)))}}var wn=(()=>{let r=class r extends ct{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 st)}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)(I(tt),I(b),I(N))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-preview"]],standalone:!1,features:[R([b]),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&&v(0,Aa,2,6,"ng-container",0),e&2&&p("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 Rt={"velt-autocomplete-option-wireframe":pn,"velt-autocomplete-group-option-wireframe":fn,"velt-autocomplete-empty-wireframe":Cn,"velt-autocomplete-option-icon-wireframe":dn,"velt-autocomplete-option-name-wireframe":mn,"velt-autocomplete-option-description-wireframe":ln,"velt-autocomplete-option-error-icon-wireframe":sn,"velt-autocomplete-chip-tooltip-wireframe":rn,"velt-autocomplete-chip-tooltip-icon-wireframe":nn,"velt-autocomplete-chip-tooltip-name-wireframe":on,"velt-autocomplete-chip-tooltip-description-wireframe":tn,"velt-data":vn,"velt-if":gn,"velt-button-wireframe":hn,"velt-confirm-dialog-wireframe":Je,"velt-confirm-dialog-reject-button-wireframe":bn,"velt-confirm-dialog-approve-button-wireframe":Sn,"velt-confirm-dialog-title-wireframe":kn,"velt-confirm-dialog-message-wireframe":On,"velt-confirm-dialog-preview-wireframe":wn};var En=(()=>{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,d)=>d.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=Se(t,{environmentInjector:this.injector.get(fe)});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;"),!Rt[t])return null;let c=a?`${a}__${t}`:"",d=e?.getAttribute("velt-wireframe-id");d&&(c=`${a}__${d}__${t}`);let s=this.createComponentRef(Rt[t],c,!1);if(!s||!e)return null;let h=s.location.nativeElement;if((e?.children?.length>0||e?.innerHTML?.trim()?.length>0)&&(s.instance.template=e),e.attributes.length>0)for(let g=0;g<e.attributes.length;g++){let T=e.attributes[g],D=T.name,_=T.value;D==="class"?h.classList.add(_):D==="style"?h.setAttribute("style",_):D==="velt-if"?s.instance.veltIf=_:(h.setAttribute(D,_),this.setPropertyOnComponent(s,D,_))}i&&typeof i=="object"&&Object.keys(i).forEach(g=>{this.veltFunctionComponents.includes(t)?s.instance.updateDataComponentConfigSignal(g,i[g]):this.setPropertyOnComponent(s,g,i[g])}),this.appRef.attachView(s.hostView),e.parentNode?e.parentNode.replaceChild(h,e):e.appendChild(h);try{Tt(h)}catch{}return 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 d=[],s=t.tagName.toLowerCase();if(Rt[s]&&!a?.includes(s)){let g=this.injectComponentIntoAndMoveChildren(s,t,e,i);return g&&d.push(g),d}return Array.from(t.children).forEach(g=>{let T=this.processAndReplaceVeltComponents(g,e,i,a,c);d.push(...T)}),d}catch(d){return this.loggingService.catch("Error in DynamicComponentService processAndReplaceVeltComponents: ",d),[]}}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)(H(at),H(Ce),H(N))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var em=(()=>{let r=class r{set veltDynamicTemplate({template:t,context:e,id:i,cloneTemplate:a,componentName:c,variant:d,suffix:s,setIfCondition:h,componentElementRef:g,replaceTemplate:T=!0,childrenSlot:D=!0}){try{if(this.childrenSlot=D&&Te(c)?Ae(g?.nativeElement,this):void 0,this.childrenSlot&&!T&&this.warnAugmentingAnchorReplaced(c),s&&(c+=`--${s}`),d&&(c+=`---${d}`),c){let _=this.wireframeService.getConditionElement(c);if(!_&&t&&(_=t),_){let C=_?.getAttribute("velt-if");C&&h&&h(C),Array.from(_.attributes).forEach($=>{g?.nativeElement.setAttribute($.name,$.value)}),e?.componentConfigSignal?(this.dynamicDataService.applyConditionalClasses(g?.nativeElement,e),this.dynamicDataService.executeConditionalClasses()):this.dynamicDataService.applyConditionalClasses(g?.nativeElement)}}if(c&&!t){let _=this.wireframeService.getWireframe(c);if(_){let C=document.createElement(_.tagName);C.innerHTML=_.innerHTML,this.template=C}}else this.template=t;this.data=e,this.id=i,this.cloneTemplate=!!a,this.cloneTemplate&&t&&(this.template=this.domService.deepCloneElement(t)),this.checkToUpdateTemplate(T)}catch(_){this.loggingService.warn("Error in DynamicTemplateDirective veltDynamicTemplate: ",_)}}constructor(t,e,i,a,c,d,s,h){this.elementRef=t,this.templateRef=e,this.viewContainer=i,this.dynamicComponentService=a,this.loggingService=c,this.domService=d,this.wireframeService=s,this.dynamicDataService=h,this.directiveId=Math.random().toString(36).substring(7),this.isCustomTemplateMode=!1,this.isDefaultTemplateMode=!1,this.cloneTemplate=!1,this.injectedElements=[],this.isChildrenMode=!1,this.componentRefs=[],this.warnedAugmentingAnchor=!1;try{this.loggingService.log("%c[WB] Creating CLASS: DynamicTemplateDirective","color: blue;")}catch(g){this.loggingService.catch("Error in DynamicTemplateDirective constructor: ",g)}}checkDataValue(t,e){let i=t.querySelectorAll("[data-velt]");function a(c,d){return d.split(".").reduce((s,h)=>s&&s[h],c)}i.forEach(c=>{let d=c.getAttribute("data-velt");if(d&&e){let s=a(e,d);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.childrenSlot)this.isDefaultTemplateMode=!1,this.isCustomTemplateMode=!1,this.isChildrenMode?this.updateDataOnComponentRefs(this.data):(this.cleanUp(),this.isChildrenMode=this.injectChildrenSlot());else if(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)}}warnAugmentingAnchorReplaced(t){try{if(this.warnedAugmentingAnchor)return;this.warnedAugmentingAnchor=!0,console.warn(`[Velt] Children passed to <${(t||"").replace(/-wireframe$/,"")}> replace its default content. This primitive normally renders SDK children of its own (and may repeat them per item), so your markup will render once, not once per item. To render per item, loop in your own code and place one primitive per item.`)}catch{}}injectChildrenSlot(){try{let t=Me(this.childrenSlot,this);if(!t.length)return!1;let e=this.elementRef.nativeElement,i=e.parentNode;if(!i)return ie(this.childrenSlot,this),!1;t.forEach(c=>{if(Pe(c,d=>!!Rt[d])){let d=this.dynamicComponentService.processAndReplaceVeltComponents(c,this.data,this.id?this.id:`from-children-${this.directiveId}`,[],"from children slot");d?.length&&this.componentRefs.push(...d)}});let a=e.nextSibling;return t.forEach(c=>{i.insertBefore(c,a),a=c.nextSibling,Ee(c)}),t.forEach(c=>Tt(c)),!0}catch(t){return this.loggingService.catch("Error in DynamicTemplateDirective injectChildrenSlot: ",t),!1}}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 d=i.children[c],s=this.dynamicComponentService.processAndReplaceVeltComponents(d,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.componentRefs=[],this.isChildrenMode&&(ie(this.childrenSlot,this),this.isChildrenMode=!1),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)(I(tt),I(Wt),I(Jt),I(En),I(N),I($e),I(Pt),I(b))},r.\u0275dir=Kt({type:r,selectors:[["","veltDynamicTemplate",""]],inputs:{veltDynamicTemplate:"veltDynamicTemplate"}});let n=r;return n})();var sm=(()=>{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 Ot,this.conditionRegex=/\{(.*?)\}/g,this.dataComponentConfig=A({}),this.extractedProps={},this.hasView=!1,this.cleanupEffects=[];try{this.dynamicDataService.getCommonData().pipe(ue(this.destroy$)).subscribe(d=>{this.processCondition(d)})}catch(d){this.loggingService.catch("Error in IfDirective constructor:",d)}}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,d){try{this.cleanupEffects.forEach(s=>s.destroy()),this.cleanupEffects.length=0,Object.keys(i).forEach(s=>{let h;if(ot(t)?h=rt(()=>lt(t(),i[s].path)):h=rt(()=>lt(t,i[s].path)),ot(h())){let g=bt(()=>{try{let T=h()();i[s].value=T,this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector,allowSignalWrites:!0});this.cleanupEffects.push(g)}else{let g=h();i[s].value=g,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)(I(Wt),I(Jt),I(b),I(N),I(at))},r.\u0275dir=Kt({type:r,selectors:[["","veltIf",""]],inputs:{veltIf:"veltIf"},features:[R([b])]});let n=r;return n})();export{Ke as a,Ye as b,qt as c,Ha as d,Ze as e,Qt as f,te as g,ee as h,q as i,tn as j,nn as k,on as l,rn as m,ln as n,sn as o,dn as p,mn as q,pn as r,st as s,bn as t,Sn as u,kn as v,On as w,wn as x,gn as y,un as z,hn as A,fn as B,Cn as C,Rt as D,En as E,em as F,sm as G};
|
|
1
|
+
import{a as Pt,b as Je}from"./chunk-R4Z2NW35.js";import{b as We}from"./chunk-KPCULYW2.js";import{Ea as St,Fa as b,Ga as Zt,Ha as ct,Ia as He,L as xt,M as ye,N as ke,O as Ie,Q as Xt,R as Oe,S as De,T as we,U as Tt,V as Ee,Y as Te,ea as Ae,ga as Me,ha as ie,ia as Pe}from"./chunk-OEOE4TD6.js";import{$ as nt,Aa as Gt,Bc as Se,Ca as Ht,Cf as Ue,Ee as Fe,Fa as u,Fi as Ge,Ib as W,Kb as Et,L as $t,La as Wt,Nb as U,Ob as Ct,Pa as I,Pb as X,Qb as Yt,Ra as Jt,T as gt,U as ue,Ua as P,Uh as ut,Vh as Le,Wa as Kt,Ya as j,_a as v,_b as R,a as m,ac as Nt,b as f,ba as he,bb as Ce,bc as F,be as ae,c as ge,ca as H,cc as O,da as Q,db as M,dc as it,ec as _t,fa as fe,fb as w,fc as B,g as vt,gb as E,gc as _e,ha as kt,hc as be,ia as It,ii as At,ja as mt,k as Ot,kc as V,ki as N,l as Bt,la as at,lb as p,lc as L,li as Be,mb as x,nb as k,nh as lt,ob as Y,od as Re,p as yt,pa as ot,pc as J,qa as A,qh as Ne,qi as ze,r as Ut,rc as oe,rf as je,sb as S,sc as rt,si as $e,tb as y,tc as bt,ti as Mt,ub as z,vb as Dt,vc as re,w as zt,wa as tt,xb as wt,xc as xe,yh as Ve,zb as l}from"./chunk-4EV2AXDK.js";var Ke=(()=>{let r=class r{constructor(t){this.loggingService=t,this.autocompleteDataMap$=new Bt({}),this.onAutocompleteChipClick$=new Ot;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)(H(N))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var Ye=(()=>{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 vt(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(g=>{delete g?.locations,delete g?.location,delete g?.locationId,delete g?.pageInfo,delete g?.documentId,g.documentId=g?.clientDocumentId,delete g?.clientDocumentId,delete g?.veltFolderId,g?.clientOrganizationId&&(g.organizationId=g?.clientOrganizationId,delete g?.clientOrganizationId)}));let c=[];a&&(a=JSON.parse(JSON.stringify(a)),a?.location&&c.push(a?.location));let d=this.docService.getLocations();d&&Object.values(d).forEach(g=>{g?.location&&c.push(g?.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 vt(this,null,function*(){try{let t=this.authService.getUser();if(!t)return null;let e,i;t&&(e=Ve(t)??void 0,i=JSON.parse(JSON.stringify(t)),delete i?.contacts);let a=this.configService.getApiKey(),c=window?.Velt?.version,d=this.docService.getOrganizationMetadata(t?.organizationId),s,h;d&&(s=JSON.parse(JSON.stringify(d)),delete s?.organizationId,s.organizationId=s?.clientOrganizationId,delete s?.clientOrganizationId,delete s?.pageInfo,delete s?.apiKey,h=JSON.parse(JSON.stringify(d)),delete h?.clientOrganizationId,delete h?.pageInfo,delete h?.apiKey);let g=this.docService.getDocumentMetadataOfAvailableDocuments(),T=this.docService.getLocation(),D=[],_=[];T&&(D.push(T),T?.location&&_.push(T?.location));let C=this.docService.getLocations();C&&Object.values(C).forEach(G=>{D.push(G),G?.location&&_.push(G?.location)});let $=[],Z=[];g&&($=JSON.parse(JSON.stringify(g)),$.forEach(G=>{delete G?.apiKey,delete G?.locations,delete G?.location,delete G?.locationId,delete G?.pageInfo,delete G?.documentId,G.documentId=G?.clientDocumentId,delete G?.clientDocumentId,delete G?.veltFolderId,G?.clientOrganizationId&&(G.organizationId=G?.clientOrganizationId,delete G?.clientOrganizationId)}),Z=JSON.parse(JSON.stringify(g)),Z.forEach(G=>{delete G?.apiKey,delete G?.locations,delete G?.location,delete G?.locationId,delete G?.pageInfo,delete G?.clientDocumentId,G.folderId=G?.veltFolderId,delete G?.veltFolderId,delete G?.clientOrganizationId}));let dt,Lt=this.docService.getDocumentPaths();Lt?.folderId&&Lt?.veltFolderId&&(dt={folderId:Lt?.folderId,veltFolderId:Lt?.veltFolderId});let ne,Ft;dt&&(ne=JSON.parse(JSON.stringify(dt)),delete ne?.veltFolderId,Ft=JSON.parse(JSON.stringify(dt)),Ft.folderId=Ft.veltFolderId,delete Ft?.veltFolderId);let jt={};return jt.veltVersion=c,jt.apiKey=a,jt.serverMap={organization:h??void 0,documents:Z,locations:D??void 0,folder:Ft??void 0,user:i??void 0,accessFields:this.docService.getProcessedDocContext()??void 0},jt.clientMap={organization:s??void 0,documents:$,locations:_??void 0,folder:ne??void 0,user:e??void 0,context:this.docService.getDocContext()??void 0},jt}catch(t){return this.loggingService.catch("Error in MetadataService getDebugInfo: ",t),null}})}getDebugInfo$(){return zt([this.authService.getUser$(),this.docService.getOrganizationConfig$(),this.docService.getOrganizationMetadataMap$(),this.docService.getAllDocumentMetadataMap$(),this.docService.getDocContext$()]).pipe(gt(()=>vt(this,null,function*(){return yield this.getDebugInfo()})),$t(Ne))}};r.\u0275fac=function(e){return new(e||r)(H(Ge),H(N),H(Mt),H(Be))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var pt=class{constructor(){this.isGroupHeader=!1,this.isGroupMember=!1,this.isNewContact=!1,this.disabled=!1}},Vt=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 le(){return{panelOpen:!1,filterText:"",highlightedIndex:-1,autocompleteDisabledPositions:new Set,darkMode:!1,variant:void 0}}var Xe=new he("AutocompleteLocalUIStateSignal");var qt=class{constructor(r,o){this.injector=r,this.readSignal=o,this.cache=new Map,this.structureVersion=A(0)}bumpStructureVersion(){try{this.structureVersion.update(r=>r+1)}catch{}}get(r,o){try{if(!r||!this.injector)return Ut(null);let t=this.cache.get(r);if(t)return t;o?.();let e=Re(rt(()=>{this.structureVersion();let i=this.readSignal(r);return i?i():null}),{injector:this.injector}).pipe($t());return this.cache.set(r,e),e}catch{return Ut(null)}}},Ha="default";function Ze(){try{return Q(at)}catch{return null}}var Qt=(()=>{let r=class r{bumpContextConfigStructureVersion(){this.configBridge.bumpStructureVersion()}constructor(t,e,i,a,c,d){this.authService=t,this.contactService=e,this.autocompleteService=i,this.serviceBook=a,this.themeService=c,this.loggingService=d,this.contextMap=new Map,this.registryMap=new Map,this.serviceSubscriptions=[],this.injector=Ze(),this.configBridge=new qt(this.injector,s=>this.contextMap.get(s)),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$():yt)).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$():yt)).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$():yt)).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$():yt)).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$():yt)).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$():yt)).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 Vt;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=A(i),this.contextMap.set(t,e),this.bumpContextConfigStructureVersion()}return e}catch(e){return this.loggingService.catch("Error in AutocompleteCoreService getOrCreateContextConfig:",e),A(new Vt)}}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),this.bumpContextConfigStructureVersion()}catch(i){this.loggingService.catch("Error in AutocompleteCoreService setContextConfig:",i)}}clearContextConfig(t){try{this.contextMap.delete(t),this.registryMap.delete(t),this.bumpContextConfigStructureVersion()}catch(e){this.loggingService.catch("Error in AutocompleteCoreService clearContextConfig:",e)}}getAutocompleteConfig$(t){try{return this.configBridge.get(t,()=>this.getOrCreateContextConfig(t))}catch(e){return this.loggingService.catch("Error in AutocompleteCoreService getAutocompleteConfig$:",e),Ut(null)}}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)(H(Mt),H(St),H(Ke),H(At),H(Zt),H(N))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var qe=(()=>{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(Le).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()||"",d=new je;d.email=c;let s=new RegExp(Fe.REGEX_EMAIL).test("@"+d?.email),h=a.data.userContacts.slice();a.featureState.customAutocompleteSearch||e&&(h=this.filterContacts(h,d),a.featureState.paginatedContactList&&h.length<3&&this.fetchFilteredUsersFromDb(e).then(()=>{})),a.featureState.atHereEnabled&&a.data.hereUserContact?.name?.includes(c)&&(h?.find(C=>C?.userId==="here")||(h=[a.data.hereUserContact,...h])),i?.length&&(h=h.filter(C=>!i.find($=>$?.email===C?.email)));let g=e?this.filterGroups(a.data.organizationGroups,e):a.data.organizationGroups,T=h.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 $=a.data.userDocumentContacts?.length||0;C=f(m({},C),{email:`${$} members`}),C.description=`${$} members`}}return{type:"contact",contact:C,disabled:!1}}),D=g.map(C=>({type:"group",group:C})),_=[...T,...D];if(a.featureState.expandMentionGroups)this.buildExpandedGroupItems(t,_,a,d,s);else{let C=_.length?void 0:{type:"contact",contact:d},$=this.createFlattenedItems({allItems:_,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:$,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 d=[],s={},h=new Map;e.forEach(C=>{if(C.contact?.userId){let $=Ue(C.contact.userId);h.set($,C),s[C.contact.userId]=!1}});let g=new Map;i.data.organizationGroups.forEach(C=>{g.set(C.metadata.clientGroupId,{id:C.metadata.clientGroupId,name:C.metadata.groupName,members:[],userIds:Object.keys(C.users||{})})}),g.forEach(C=>{C.userIds.forEach($=>{let Z=h.get($);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]&&d.push(C)});let T=Array.from(g.values()),D=e.length?void 0:{type:"contact",contact:a},_=this.createFlattenedItems({allItems:e,contactsWithoutGroup:d,groups:T,newUserContact:D,isExpandedGroups:!0,isCustomGroups:!1,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(C=>f(m({},C),{data:f(m({},C.data),{flattenedItems:_,newUserContactError:c?void 0:"Invalid email",newUserContact:D,contactsWithoutGroup:d,groups:T})}))}catch(d){this.loggingService.catch("Error in AutocompleteActionService buildExpandedGroupItems:",d)}}filterCustomOptions(t,e){try{let i=t(),a=i.data.selectedAutocompleteData,c=i.data.autocompleteDataMap?.[a?.hotkey],d=c?.data?.slice()||[];if(i.featureState.customAutocompleteSearch||(e?d=d.filter(h=>h.name?.toLowerCase()?.includes(e?.toLowerCase())):d=a?.data?.slice()||[]),c?.groups&&c.groups.length>0){let h=[],g=new Map;c.groups?.forEach(_=>{g.set(_.id,{id:_.id,name:_.name,members:[]})}),d.forEach(_=>{let C={type:"custom",custom:_};_.groupId&&g.has(_.groupId)?g.get(_.groupId)?.members.push(C):h.push(C)});let T=Array.from(g.values()).filter(_=>_.members.length>0),D=this.createFlattenedItems({allItems:[],contactsWithoutGroup:h,groups:T,isExpandedGroups:!1,isCustomGroups:!0,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(_=>f(m({},_),{featureState:f(m({},_.featureState),{customGroupsEnabled:!0}),data:f(m({},_.data),{flattenedItems:D,contactsWithoutGroup:h,groups:T})}))}else{let h=d.map(T=>({type:"custom",custom:T})),g=this.createFlattenedItems({allItems:h,isExpandedGroups:!1,isCustomGroups:!1,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(T=>f(m({},T),{featureState:f(m({},T.featureState),{customGroupsEnabled:!1}),data:f(m({},T.data),{flattenedItems:g})}))}}catch(i){this.loggingService.catch("Error in AutocompleteActionService filterCustomOptions:",i)}}createFlattenedItems(t){try{let{allItems:e,contactsWithoutGroup:i,groups:a,newUserContact:c,isExpandedGroups:d=!1,isCustomGroups:s=!1,showMentionGroupsOnly:h=!1,showMentionGroupsFirst:g=!1}=t,T=[];if(d||s){if(!h&&!g&&i?.forEach((D,_)=>{let C=new pt;C.originalItem=D,C.disabled=!!D.disabled,C.id=s?`velt-option-custom-ungrouped-${_}`:`velt-option-user-${_}`,C.testId=s?`${this.componentId}-custom-ungrouped-${_}`:`${this.componentId}-user-${_}`,T.push(C)}),a?.forEach((D,_)=>{if(D?.members?.length){let C=new pt;C.originalItem={type:"group",group:D},C.isGroupHeader=!0,C.disabled=!0,C.group=D,C.id=s?`velt-option-custom-group-${_}`:`velt-option-group-${_}`,C.testId=s?`${this.componentId}-custom-group-${_}`:`${this.componentId}-group-${_}`,T.push(C),D.members.forEach(($,Z)=>{let dt=new pt;dt.originalItem=$,dt.isGroupMember=!0,dt.disabled=$.disabled||!1,dt.id=s?`velt-option-custom-group-${_}-member-${Z}`:`velt-option-group-${_}-member-${Z}`,dt.testId=s?`${this.componentId}-custom-group-${_}-member-${Z}`:`${this.componentId}-group-${_}-member-${Z}`,T.push(dt)})}}),!h&&g&&i?.length){let D=new pt;D.originalItem={type:"group"},D.isGroupHeader=!0,D.disabled=!0,D.groupName="Ungrouped",D.id="velt-option-ungrouped",D.testId=`${this.componentId}-ungrouped`,T.push(D),i.forEach((_,C)=>{let $=new pt;$.originalItem=_,$.isGroupMember=!0,$.disabled=_.disabled||!1,$.id=`velt-option-user-${C}`,$.testId=`${this.componentId}-user-${C}`,T.push($)})}}else e.forEach((D,_)=>{let C=new pt;C.originalItem=D,C.disabled=D.disabled||!1,C.id=`velt-option-${_}`,C.testId=`${this.componentId}-${_}`,T.push(C)});if(c?.contact?.email){let D=new pt;D.originalItem=c,D.isNewContact=!0,D.id="velt-new-contact-option",D.testId=`${this.componentId}-new-contact`,T.push(D)}return T}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)),d;return c>=0?d=[...a.slice(0,c),...a.slice(c+1)]:d=[...a,e],t.update(s=>f(m({},s),{data:f(m({},s.data),{multiSelectItems:d})})),d}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 vt(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)(H(Qt),H(St),H(N),H(At))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var te=(()=>{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)(H(N))},r.\u0275prov=nt({token:r,factory:r.\u0275fac});let n=r;return n})();function ce(n,r){try{let o=r?.trim();return o?(n||[]).find(t=>t?.userId===o):void 0}catch{return}}function Qe(n,r,o){try{let t=o?.trim();return t?n||(r?.userId===t?r:void 0):void 0}catch{return}}var ee=class{constructor(r){this.options=r,this.published=!1}finalize(){try{let r=this.options.getHost();if(!r)return;this.publish(r,xt(r)?.payload),De(r,this.options.ownerRef,()=>this.refreshFromPlacement())}catch{}}refreshFromPlacement(){try{let r=this.options.getHost();if(!r)return;let o=xt(r)?.payload,t=o?.contextData||{},e=!jn(this.lastContextData,t)||this.lastAnnotationId!==o?.annotationId,i=this.lastEntity!==this.readOwnEntity(),a=this.lastLocalUIState!==this.readOwnLocalUIState(),c=this.lastInheritedEntity!==o?.data;if(this.published&&!e&&!i&&!a&&!c)return;this.options.onContextChanged?.(),this.publish(r,o),this.options.markForCheck?.()}catch{}}destroy(){try{let r=this.options.getHost();ke(r,this.options.ownerRef),we(r,this.options.ownerRef),this.published=!1}catch{}}getInheritedContextData(){try{return xt(this.options.getHost())?.payload?.contextData||{}}catch{return{}}}getInheritedEntity(){try{return xt(this.options.getHost())?.payload?.data}catch{return}}getInheritedLocalUIState(){try{return xt(this.options.getHost())?.payload?.localUIState}catch{return}}adoptInheritedLocalUIState(r){return Xt(f(m({},r),{host:this.options.getHost()}))}publish(r,o){let t=this.readOwnEntity(),e=this.readOwnLocalUIState();ye(r,Ie({host:r,inherited:o,ownData:t,ownLocalUIState:e,ownerRef:this.options.ownerRef})),this.lastContextData=o?.contextData||{},this.lastAnnotationId=o?.annotationId,this.lastEntity=t,this.lastLocalUIState=e,this.lastInheritedEntity=o?.data,this.published=!0}readOwnEntity(){if(this.options.getEntity)try{return oe(()=>this.options.getEntity())}catch{return}}readOwnLocalUIState(){if(this.options.getLocalUIState)try{return oe(()=>this.options.getLocalUIState())}catch{return}}};function jn(n,r){try{if(n===r)return!0;if(!n||!r)return!1;let o=Object.keys(n);return o.length!==Object.keys(r).length?!1:o.every(t=>n[t]===r[t])}catch{return!1}}var q=(()=>{let r=class r extends He{set parentLocalUIState(t){t&&(this.localUIStateSignal=t,this.isLocalUIStateOwner=!1)}get elementRef(){return this.hostElementRef}constructor(){let t=Q(tt),e=Q(Zt),i=Q(xe),a=Q(At).get(ut),c=Q(b),d=Q(N);super(t,e,i,a??void 0,void 0,c,d),this.autocompleteId=re(),this.defaultCondition=re(!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.veltContextHost=new ee({getHost:()=>this.hostElementRef?.nativeElement,ownerRef:this,getLocalUIState:()=>this.isLocalUIStateOwner?this.localUIStateSignal:void 0,getEntity:()=>this.getPublishedVeltEntity(),onContextChanged:()=>{this.adoptInheritedLocalUIState(),this.inheritSelectorItemFromContext(),this.onVeltContextChanged()},markForCheck:()=>this.cd?.markForCheck?.()}),this.onContextPayload=s=>{try{this.isContextInitialized||(this.isContextInitialized=!0),this._autocompleteId=s.autocompleteId,this._contextData=s.contextData||{};let h=this.coreService.getContextConfig(s.autocompleteId);h&&(this.componentConfigSignal.update(g=>m({},g)),this.componentConfigSignal=h,this.cd.markForCheck())}catch(h){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent onContextPayload:",h)}},this.isLocalUIStateRoot=!1,this.hostElementRef=t,this.themeService=e,this.dynamicDataService=c,this.loggingService=d,this.coreService=Q(Qt),this.actionService=Q(qe),this.cd=i,this.commentService=a??void 0,this.registry=Q(te,{optional:!0})??void 0,this._userIdContactService=Q(St),this._userIdAuthService=Q(Mt),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=ce(a,i);if(c){e(c),this.publishResolvedEntityToDescendants(),this.flushChangeDetection();return}this._userIdSub=zt([this._userIdContactService.getUserByUserId$(i),this._userIdAuthService.getUser$(),this._userIdContactService.getInternalUserContacts$()]).subscribe(([d,s,h])=>{try{let g=ce(h??[],i)??Qe(d,s,i);e(g),this.publishResolvedEntityToDescendants(),this.flushChangeDetection()}catch(g){this.loggingService.catch("Error resolving userId user:",g)}})}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(Xe,{optional:!0,skipSelf:!0});t?(this.localUIStateSignal=t,this.isLocalUIStateOwner=!1):(this.localUIStateSignal=A(le()),this.isLocalUIStateOwner=!0)}catch{this.localUIStateSignal=A(le()),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(),this.finalizeVeltContext();return}if(t){this._autocompleteId=t,this.initializeFromAutocompleteId(t),this.setupA11yAttributes(),this.setupDarkModeSync(),this.finalizeVeltContext();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(),this.finalizeVeltContext();return}if(this.registry){this.registry.register(this.onContextPayload);let i=this.registry.getLastPayload?.();i&&this.onContextPayload(i),this.setupA11yAttributes(),this.setupDarkModeSync(),this.finalizeVeltContext();return}this.tryRegisterWithContext(),this.setupA11yAttributes(),this.setupDarkModeSync(),this.finalizeVeltContext()}catch(t){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent ngOnInit:",t)}}finalizeVeltContext(){try{this.adoptInheritedLocalUIState(),this.inheritSelectorItemFromContext(),this.veltContextHost.finalize()}catch(t){this.loggingService?.catch?.("Error in AutocompletePrimitiveThemedComponent finalizeVeltContext:",t)}}refreshVeltContextFromPlacement(){this.veltContextHost.refreshFromPlacement()}onVeltContextChanged(){}getPublishedVeltEntity(){}getInheritedVeltContextData(){try{return xt(this.hostElementRef?.nativeElement)?.payload?.contextData||{}}catch{return{}}}getInheritedVeltEntity(){try{return Oe(this.hostElementRef?.nativeElement)}catch{return}}inheritSelectorItemFromContext(){try{let t=this.getInheritedVeltEntity(),e=this.selectorItem;if(e&&e!==this._lastInheritedSelectorItem)return;t&&t!==e&&(this.selectorItem=t,this._lastInheritedSelectorItem=t,this.flushChangeDetection())}catch(t){this.loggingService?.catch?.("Error in AutocompletePrimitiveThemedComponent inheritSelectorItemFromContext:",t)}}publishResolvedEntityToDescendants(){try{let t=this.hostElementRef?.nativeElement;if(!t)return;this.veltContextHost.refreshFromPlacement(),Tt(t)}catch{}}ngOnDestroy(){try{this.veltContextHost.destroy(),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 te)return i.contextData&&(this._contextData=i.contextData),i.registry;let a=window.ng;if(a?.getComponent){let d=a.getComponent(e);if(d?.registry)return d.registry}let c=e.__ngContext__;if(c&&Array.isArray(c))for(let d=0;d<c.length;d++){let s=c[d];if(s&&typeof s=="object"&&s.registry instanceof te)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}}adoptInheritedLocalUIState(){try{Xt({host:this.hostElementRef?.nativeElement,current:this.localUIStateSignal,isOwner:this.isLocalUIStateOwner,isRoot:this.isLocalUIStateRoot,adopt:t=>{this.localUIStateSignal=t,this.isLocalUIStateOwner=!1}})}catch(t){this.loggingService?.catch?.("Error in AutocompletePrimitiveThemedComponent adoptInheritedLocalUIState:",t)}}};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}),Nn=(n,r)=>({condition:n,data:r}),Vn=n=>({componentConfigSignal:n}),Ln=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-description-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),Bn=()=>({});function zn(n,r){n&1&&z(0)}function $n(n,r){if(n&1&&v(0,zn,1,0,"ng-container",5),n&2){l(2);let o=W(3);p("ngTemplateOutlet",o)}}function Gn(n,r){n&1&&z(0)}function Hn(n,r){if(n&1&&v(0,Gn,1,0,"ng-container",5),n&2){l(2);let o=W(5);p("ngTemplateOutlet",o)}}function Wn(n,r){n&1&&z(0)}function Jn(n,r){if(n&1&&v(0,Wn,1,0,"ng-container",5),n&2){l(2);let o=W(7);p("ngTemplateOutlet",o)}}function Kn(n,r){if(n&1&&(S(0),w(1,$n,1,1,"ng-container")(2,Hn,1,1,"ng-container")(3,Jn,1,1,"ng-container"),y()),n&2){let o=l(2);u(),E((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function Yn(n,r){if(n&1&&(U(0),V(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 Xn(n,r){if(n&1&&(U(0),V(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 Zn(n,r){if(n&1&&(U(0),V(1,"translate")),n&2){let o,t=l(3),e=l();Yt(" ",(o=e.objectKeys((t==null||t.group==null||t.group.group==null?null:t.group.group.users)||Nt(4,Bn)))==null?null:o.length," ",L(1,2,"members")," ")}}function qn(n,r){if(n&1&&w(0,Zn,2,5),n&2){let o=l(2);E(!(o==null||o.group==null)&&o.group.group?0:-1)}}function Qn(n,r){if(n&1&&(S(0),v(1,Kn,4,1,"ng-container",4)(2,Yn,2,3,"ng-template",null,0,J)(4,Xn,2,3,"ng-template",null,1,J)(6,qn,1,1,"ng-template",null,2,J),y()),n&2){let o=l(),t=l();u(),p("veltDynamicTemplate",B(3,Ln,t.template,F(1,Vn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function to(n,r){if(n&1&&v(0,Qn,8,9,"ng-container",3),n&2){let o=l();p("veltIf",O(4,Nn,o.conditionSignal(),O(1,Un,o.componentConfigSignal,o.localUIStateSignal)))}}var tn=(()=>{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=A({})}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:[R([b]),j],decls:1,vars:1,consts:[["contacEmailRef",""],["customDescriptionRef",""],["groupDescriptionRef",""],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngTemplateOutlet"]],template:function(e,i){if(e&1&&w(0,to,1,7,"ng-container"),e&2){let a;E((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 eo=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),no=(n,r)=>({condition:n,data:r}),oo=n=>({componentConfigSignal:n}),ro=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function io(n,r){n&1&&z(0)}function ao(n,r){if(n&1&&v(0,io,1,0,"ng-container",5),n&2){l(2);let o=W(3);p("ngTemplateOutlet",o)}}function lo(n,r){n&1&&z(0)}function co(n,r){if(n&1&&v(0,lo,1,0,"ng-container",5),n&2){l(2);let o=W(5);p("ngTemplateOutlet",o)}}function so(n,r){n&1&&z(0)}function mo(n,r){if(n&1&&v(0,so,1,0,"ng-container",5),n&2){l(2);let o=W(7);p("ngTemplateOutlet",o)}}function po(n,r){if(n&1&&(S(0),w(1,ao,1,1,"ng-container")(2,co,1,1,"ng-container")(3,mo,1,1,"ng-container"),y()),n&2){let o=l(2);u(),E((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function vo(n,r){if(n&1&&Y(0,"snippyly-user-avatar",6),n&2){let o=l(2);p("size",32)("user",o==null?null:o.contact)}}function go(n,r){if(n&1&&(Y(0,"div",7),V(1,"safeSvg")),n&2){let o=l(3);p("innerHtml",L(1,1,o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null?null:o.custom.custom.icon.svg),Gt)}}function uo(n,r){if(n&1&&(x(0,"div",8),Y(1,"img",9),k()),n&2){let o=l(3);u(),p("src",o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null?null:o.custom.custom.icon.url,Ht)}}function ho(n,r){if(n&1&&(w(0,go,2,3,"div",7),w(1,uo,2,1,"div",8)),n&2){let o=l(2);E(!(o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null)&&o.custom.custom.icon.svg?0:-1),u(),E(!(o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null)&&o.custom.custom.icon.url?1:-1)}}function fo(n,r){n&1&&(x(0,"div",10),mt(),x(1,"svg",11),Y(2,"path",12),k()())}function Co(n,r){if(n&1&&(S(0),v(1,po,4,1,"ng-container",4)(2,vo,1,2,"ng-template",null,0,J)(4,ho,2,2,"ng-template",null,1,J)(6,fo,3,0,"ng-template",null,2,J),y()),n&2){let o=l(),t=l();u(),p("veltDynamicTemplate",B(3,ro,t.template,F(1,oo,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function _o(n,r){if(n&1&&v(0,Co,8,9,"ng-container",3),n&2){let o=l();p("veltIf",O(4,no,o.conditionSignal(),O(1,eo,o.componentConfigSignal,o.localUIStateSignal)))}}var nn=(()=>{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=A({})}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:[R([b]),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,_o,1,7,"ng-container"),e&2){let a;E((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 bo=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),xo=(n,r)=>({condition:n,data:r}),So=n=>({componentConfigSignal:n}),yo=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-name-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function ko(n,r){n&1&&z(0)}function Io(n,r){if(n&1&&v(0,ko,1,0,"ng-container",5),n&2){l(2);let o=W(3);p("ngTemplateOutlet",o)}}function Oo(n,r){n&1&&z(0)}function Do(n,r){if(n&1&&v(0,Oo,1,0,"ng-container",5),n&2){l(2);let o=W(5);p("ngTemplateOutlet",o)}}function wo(n,r){n&1&&z(0)}function Eo(n,r){if(n&1&&v(0,wo,1,0,"ng-container",5),n&2){l(2);let o=W(7);p("ngTemplateOutlet",o)}}function To(n,r){if(n&1&&(S(0),w(1,Io,1,1,"ng-container")(2,Do,1,1,"ng-container")(3,Eo,1,1,"ng-container"),y()),n&2){let o=l(2);u(),E((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function Ao(n,r){if(n&1&&(U(0),V(1,"translate")),n&2){let o=l(2);X(" ",L(1,1,o==null||o.contact==null?null:o.contact.name)," ")}}function Mo(n,r){if(n&1&&(U(0),V(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 Po(n,r){if(n&1&&(U(0),V(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 Ro(n,r){if(n&1&&(S(0),v(1,To,4,1,"ng-container",4)(2,Ao,2,3,"ng-template",null,0,J)(4,Mo,2,3,"ng-template",null,1,J)(6,Po,2,3,"ng-template",null,2,J),y()),n&2){let o=l(),t=l();u(),p("veltDynamicTemplate",B(3,yo,t.template,F(1,So,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Fo(n,r){if(n&1&&v(0,Ro,8,9,"ng-container",3),n&2){let o=l();p("veltIf",O(4,xo,o.conditionSignal(),O(1,bo,o.componentConfigSignal,o.localUIStateSignal)))}}var on=(()=>{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=A({})}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:[R([b]),j],decls:1,vars:1,consts:[["contactNameRef",""],["customNameRef",""],["groupNameRef",""],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngTemplateOutlet"]],template:function(e,i){if(e&1&&w(0,Fo,1,7,"ng-container"),e&2){let a;E((a=i.componentConfigSignal())?0:-1,a)}},styles:["[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let n=r;return n})();var jo=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),Uo=(n,r)=>({condition:n,data:r}),No=n=>({componentConfigSignal:n}),Vo=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Lo(n,r){n&1&&z(0)}function Bo(n,r){if(n&1&&(x(0,"velt-shadow-dom-internal"),v(1,Lo,1,0,"ng-container",2),k()),n&2){l();let o=W(4);u(),p("ngTemplateOutlet",o)}}function zo(n,r){n&1&&z(0)}function $o(n,r){if(n&1&&v(0,zo,1,0,"ng-container",2),n&2){l();let o=W(4);p("ngTemplateOutlet",o)}}function Go(n,r){if(n&1&&(x(0,"div",4)(1,"div",5),Y(2,"velt-autocomplete-chip-tooltip-icon-internal",6),k(),x(3,"div",7)(4,"div",8),Y(5,"velt-autocomplete-chip-tooltip-name-internal",6),k(),x(6,"div",9),Y(7,"velt-autocomplete-chip-tooltip-description-internal",6),k()()()),n&2){let o=l(4);u(2),p("componentConfigSignal",o.componentConfigSignal),u(3),p("componentConfigSignal",o.componentConfigSignal),u(2),p("componentConfigSignal",o.componentConfigSignal)}}function Ho(n,r){if(n&1&&v(0,Go,8,3,"div",3),n&2){let o=l(2),t=l();p("veltDynamicTemplate",B(3,Vo,t.template,F(1,No,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Wo(n,r){if(n&1&&(S(0),w(1,Bo,2,1,"velt-shadow-dom-internal")(2,$o,1,1,"ng-container"),v(3,Ho,1,9,"ng-template",null,0,J),y()),n&2){let o=l(2);u(),E(o.shadowDom&&!o.template||o.template&&o.isExplicitShadowDom?1:2)}}function Jo(n,r){if(n&1&&v(0,Wo,5,1,"ng-container",1),n&2){let o=l();p("veltIf",O(4,Uo,o.conditionSignal(),O(1,jo,o.componentConfigSignal,o.localUIStateSignal)))}}var rn=(()=>{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=A({}),this.subscriptions=[],this.wireframeService=Q(Pt)}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:[R([b]),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,Jo,1,7,"ng-container"),e&2){let a;E((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 Yo=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),Xo=(n,r)=>({condition:n,data:r}),se=n=>({$implicit:n}),Zo=(n,r)=>({componentConfigSignal:n,userContact:r}),de=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-description-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),qo=(n,r)=>({componentConfigSignal:n,custom:r}),Qo=(n,r)=>({componentConfigSignal:n,group:r}),an=()=>({});function tr(n,r){n&1&&z(0)}function er(n,r){if(n&1&&v(0,tr,1,0,"ng-container",4),n&2){l();let o=W(5),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,se,t.selectorItem==null?null:t.selectorItem.contact))}}function nr(n,r){n&1&&z(0)}function or(n,r){if(n&1&&v(0,nr,1,0,"ng-container",4),n&2){l();let o=W(7),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,se,t.selectorItem==null?null:t.selectorItem.custom))}}function rr(n,r){n&1&&z(0)}function ir(n,r){if(n&1&&v(0,rr,1,0,"ng-container",4),n&2){l();let o=W(9),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,se,t.selectorItem==null?null:t.selectorItem.group))}}function ar(n,r){if(n&1&&(x(0,"p",7),U(1),V(2,"translate"),k()),n&2){let o=l(2).$implicit,t=l(3);Et("velt-autocomplete-option-description--secondary",(o.name==null?null:o.name.length)>0),M("aria-label",t.field?o[t.field]:o.email),u(),X(" ",t.field?o[t.field]:L(2,4,o.email)," ")}}function lr(n,r){if(n&1&&v(0,ar,3,6,"p",6),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",B(4,de,e.template,O(1,Zo,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function cr(n,r){if(n&1&&w(0,lr,1,10,"p",5),n&2){let o=r.$implicit,t=l(3);E((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 sr(n,r){if(n&1&&(x(0,"p",7),U(1),V(2,"translate"),k()),n&2){let o=l(2).$implicit;M("aria-label",o.description),u(),X(" ",L(2,2,o.description)," ")}}function dr(n,r){if(n&1&&v(0,sr,3,4,"p",8),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",B(4,de,e.template,O(1,qo,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function mr(n,r){if(n&1&&w(0,dr,1,10,"p",7),n&2){let o=r.$implicit;E((o.description==null?null:o.description.length)>0?0:-1)}}function pr(n,r){if(n&1&&(x(0,"p",7),U(1),V(2,"translate"),k()),n&2){let o,t,e=l().$implicit,i=l(3);M("aria-label",((o=i.objectKeys((e==null?null:e.users)||Nt(5,an)))==null?null:o.length)+" members"),u(),Yt(" ",(t=i.objectKeys((e==null?null:e.users)||Nt(6,an)))==null?null:t.length," ",L(2,3,"members")," ")}}function vr(n,r){if(n&1&&v(0,pr,3,7,"p",8),n&2){let o=r.$implicit,t=l(2),e=l();p("veltDynamicTemplate",B(4,de,e.template,O(1,Qo,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function gr(n,r){if(n&1&&(S(0),w(1,er,1,4,"ng-container")(2,or,1,4,"ng-container")(3,ir,1,4,"ng-container"),v(4,cr,1,1,"ng-template",null,0,J)(6,mr,1,1,"ng-template",null,1,J)(8,vr,1,10,"ng-template",null,2,J),y()),n&2){let o=l(2);u(),E((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 ur(n,r){if(n&1&&v(0,gr,10,1,"ng-container",3),n&2){let o=l();p("veltIf",O(5,Xo,o.conditionSignal(),it(1,Yo,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var ln=(()=>{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=A({}),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:[R([b]),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,ur,1,8,"ng-container"),e&2){let a;E((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 hr=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),fr=(n,r)=>({condition:n,data:r}),Cr=n=>({componentConfigSignal:n}),cn=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-error-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),_r=n=>({$implicit:n}),br=(n,r,o)=>({componentConfigSignal:n,isNewContact:r,userContact:o});function xr(n,r){if(n&1&&(x(0,"div",4)(1,"div",5),mt(),x(2,"svg",6),Y(3,"path",7)(4,"path",8),k()()()),n&2){let o=l(4);u(),M("data-testid",o.componentId+"-icon"),u(),M("data-testid",o.componentId+"-svg")}}function Sr(n,r){if(n&1&&(x(0,"div",2),V(1,"translate"),v(2,xr,5,2,"div",3),k()),n&2){let o=l(2),t=l();M("aria-label",L(1,3,"Invalid contact"))("data-testid",t.componentId),u(2),p("veltDynamicTemplate",B(7,cn,t.template,F(5,Cr,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function yr(n,r){n&1&&z(0)}function kr(n,r){if(n&1&&v(0,yr,1,0,"ng-container",9),n&2){l();let o=W(4),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,_r,t.selectorItem==null?null:t.selectorItem.contact))}}function Ir(n,r){if(n&1&&(x(0,"div",4)(1,"div",10),mt(),x(2,"svg",6),Y(3,"path",7)(4,"path",8),k()()()),n&2){let o=l(4),t=l();u(),p("title",o.newUserContactError),M("title",o.newUserContactError)("data-testid",t.componentId+"-icon"),u(),M("data-testid",t.componentId+"-svg")}}function Or(n,r){if(n&1&&(x(0,"div",2),V(1,"translate"),v(2,Ir,5,4,"div",3),k()),n&2){let o=l().$implicit,t=l(2),e=l();M("aria-label",L(1,3,(t==null?null:t.newUserContactError)||"Invalid contact"))("data-testid",e.componentId),u(2),p("veltDynamicTemplate",B(9,cn,e.template,it(5,br,e.componentConfigSignal,e.isNewContact,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function Dr(n,r){if(n&1&&w(0,Or,3,15,"div",2),n&2){let o=l(2),t=l();E(t.isNewContact&&o.newUserContactError?0:-1)}}function wr(n,r){if(n&1&&(S(0),w(1,Sr,3,13,"div",2)(2,kr,1,4,"ng-container"),v(3,Dr,1,1,"ng-template",null,0,J),y()),n&2){let o=l(2);u(),E(o.defaultCondition()?(o.selectorItem==null?null:o.selectorItem.type)==="contact"?2:-1:1)}}function Er(n,r){if(n&1&&v(0,wr,5,1,"ng-container",1),n&2){let o=l();p("veltIf",O(5,fr,o.conditionSignal(),it(1,hr,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var sn=(()=>{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=A({}),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:[R([b]),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,Er,1,8,"ng-container"),e&2){let a;E((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 Tr=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),Ar=(n,r)=>({condition:n,data:r}),Mr=(n,r)=>({componentConfigSignal:n,selectorItem:r}),Pr=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),me=n=>({$implicit:n});function Rr(n,r){n&1&&z(0)}function Fr(n,r){if(n&1&&v(0,Rr,1,0,"ng-container",6),n&2){l(2);let o=W(3),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,me,t.selectorItem==null?null:t.selectorItem.contact))}}function jr(n,r){n&1&&z(0)}function Ur(n,r){if(n&1&&v(0,jr,1,0,"ng-container",6),n&2){l(2);let o=W(5),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,me,t.selectorItem==null?null:t.selectorItem.custom))}}function Nr(n,r){n&1&&z(0)}function Vr(n,r){if(n&1&&v(0,Nr,1,0,"ng-container",6),n&2){l(2);let o=W(7),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,me,t.selectorItem==null?null:t.selectorItem.group))}}function Lr(n,r){if(n&1&&(x(0,"div",5),w(1,Fr,1,4,"ng-container")(2,Ur,1,4,"ng-container")(3,Vr,1,4,"ng-container"),k()),n&2){let o=l(3);M("data-testid",o.componentId)("aria-label","Option icon"),u(),E((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 Br(n,r){if(n&1&&(mt(),x(0,"svg",7),Y(1,"path",9),k()),n&2){let o=l(4);M("data-testid",o.componentId+"-contact-at")}}function zr(n,r){if(n&1&&Y(0,"snippyly-user-avatar",8),n&2){let o=l().$implicit,t=l(3);p("size",32)("user",o),M("data-testid",t.componentId+"-contact-avatar")}}function $r(n,r){if(n&1&&w(0,Br,2,1,":svg:svg",7)(1,zr,1,3,"snippyly-user-avatar",8),n&2){let o=r.$implicit;E((o==null?null:o.visibility)==="here"?0:1)}}function Gr(n,r){if(n&1&&(Y(0,"div",10),V(1,"safeSvg")),n&2){let o=l().$implicit,t=l(3);p("innerHTML",L(1,2,o.icon.svg),Gt),M("data-testid",t.componentId+"-custom-svg")}}function Hr(n,r){if(n&1&&Y(0,"img",11),n&2){let o=l().$implicit,t=l(3);p("src",o.icon.url,Ht),M("alt",(o==null?null:o.description)||"Custom icon")("data-testid",t.componentId+"-custom-img")}}function Wr(n,r){if(n&1&&(w(0,Gr,2,4,"div",10),w(1,Hr,1,3,"img",11)),n&2){let o=r.$implicit;E(!(o==null||o.icon==null)&&o.icon.svg?0:-1),u(),E(!(o==null||o.icon==null)&&o.icon.url?1:-1)}}function Jr(n,r){if(n&1&&(mt(),x(0,"svg",12),Y(1,"path",13),k()),n&2){let o=l(3);M("data-testid",o.componentId+"-group-icon")}}function Kr(n,r){if(n&1&&(S(0),v(1,Lr,4,3,"div",4)(2,$r,2,1,"ng-template",null,0,J)(4,Wr,2,2,"ng-template",null,1,J)(6,Jr,2,1,"ng-template",null,2,J),y()),n&2){let o=l(),t=l();u(),p("veltDynamicTemplate",B(4,Pr,t.template,O(1,Mr,t.componentConfigSignal,t.selectorItem),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Yr(n,r){if(n&1&&v(0,Kr,8,10,"ng-container",3),n&2){let o=l();p("veltIf",O(5,Ar,o.conditionSignal(),it(1,Tr,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var dn=(()=>{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=A({}),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:[R([b]),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,Yr,1,8,"ng-container"),e&2){let a;E((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 Xr=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),Zr=(n,r)=>({condition:n,data:r}),pe=n=>({$implicit:n}),qr=(n,r)=>({componentConfigSignal:n,userContact:r}),ve=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-name-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),Qr=(n,r)=>({componentConfigSignal:n,custom:r}),ti=(n,r)=>({componentConfigSignal:n,group:r});function ei(n,r){n&1&&z(0)}function ni(n,r){if(n&1&&v(0,ei,1,0,"ng-container",4),n&2){l();let o=W(5),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,pe,t.selectorItem==null?null:t.selectorItem.contact))}}function oi(n,r){n&1&&z(0)}function ri(n,r){if(n&1&&v(0,oi,1,0,"ng-container",4),n&2){l();let o=W(7),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,pe,t.selectorItem==null?null:t.selectorItem.custom))}}function ii(n,r){n&1&&z(0)}function ai(n,r){if(n&1&&v(0,ii,1,0,"ng-container",4),n&2){l();let o=W(9),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,pe,t.selectorItem==null?null:t.selectorItem.group))}}function li(n,r){if(n&1&&(x(0,"p",5),U(1),V(2,"translate"),k()),n&2){let o=l(2).$implicit,t=l(3);M("data-testid",t.componentId+"-contact-text")("aria-label",o.name||o.email),u(),X(" ",L(2,3,o.name||o.email)," ")}}function ci(n,r){if(n&1&&v(0,li,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",B(4,ve,e.template,O(1,qr,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function si(n,r){n&1&&Y(0,"velt-skeleton-loader-internal",6)}function di(n,r){if(n&1&&w(0,ci,1,10,"p",5)(1,si,1,0,"velt-skeleton-loader-internal",6),n&2){let o=r.$implicit;E((o.name==null?null:o.name.length)>0||(o==null||o.email==null?null:o.email.length)>0?0:1)}}function mi(n,r){if(n&1&&(x(0,"p",5),U(1),V(2,"translate"),k()),n&2){let o=l(2).$implicit,t=l(3);M("data-testid",t.componentId+"-custom-text")("aria-label",o.name),u(),X(" ",L(2,3,o.name)," ")}}function pi(n,r){if(n&1&&v(0,mi,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",B(4,ve,e.template,O(1,Qr,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function vi(n,r){if(n&1&&w(0,pi,1,10,"p",5),n&2){let o=r.$implicit;E((o.name==null?null:o.name.length)>0?0:-1)}}function gi(n,r){if(n&1&&(x(0,"p",5),U(1),V(2,"translate"),k()),n&2){let o=l(2).$implicit,t=l(3);M("data-testid",t.componentId+"-group-text")("aria-label",o==null||o.metadata==null?null:o.metadata.groupName),u(),X(" ",L(2,3,o==null||o.metadata==null?null:o.metadata.groupName)," ")}}function ui(n,r){if(n&1&&v(0,gi,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",B(4,ve,e.template,O(1,ti,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function hi(n,r){if(n&1&&w(0,ui,1,10,"p",5),n&2){let o=r.$implicit;E((o==null||o.metadata==null||o.metadata.groupName==null?null:o.metadata.groupName.length)>0?0:-1)}}function fi(n,r){if(n&1&&(S(0),w(1,ni,1,4,"ng-container")(2,ri,1,4,"ng-container")(3,ai,1,4,"ng-container"),v(4,di,2,1,"ng-template",null,0,J)(6,vi,1,1,"ng-template",null,1,J)(8,hi,1,1,"ng-template",null,2,J),y()),n&2){let o=l(2);u(),E((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 Ci(n,r){if(n&1&&v(0,fi,10,1,"ng-container",3),n&2){let o=l();p("veltIf",O(5,Zr,o.conditionSignal(),it(1,Xr,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var mn=(()=>{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=A({}),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:[R([b]),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,Ci,1,8,"ng-container"),e&2){let a;E((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 _i=(n,r,o,t,e,i,a)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o,isNewContact:t,multiSelect:e,isSelected:i,readOnly:a}),bi=(n,r)=>({condition:n,data:r}),xi=(n,r,o,t,e,i)=>({componentConfigSignal:n,isNewContact:r,selectorItem:o,multiSelect:t,isSelected:e,readOnly:i}),Si=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function yi(n,r){if(n&1&&(x(0,"div",3),Y(1,"velt-autocomplete-option-icon-internal",4),x(2,"div",5),Y(3,"velt-autocomplete-option-name-internal",4)(4,"velt-autocomplete-option-description-internal",4),k(),Y(5,"velt-autocomplete-option-error-icon-internal",6),k()),n&2){let o=l(2),t=l();Et("velt-autocomplete-option--multi-select",t.multiSelect)("velt-autocomplete-option--selected",t.isSelected),M("data-testid",t.componentId)("aria-selected",t.isSelected)("aria-disabled",!!(o!=null&&o.newUserContactError)),u(),p("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),u(),M("data-testid",t.componentId+"-details"),u(),p("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),u(),p("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),u(),p("selectorItem",t.selectorItem)("isNewContact",t.isNewContact)("componentConfigSignal",t.componentConfigSignal)}}function ki(n,r){n&1&&(x(0,"div",2),mt(),x(1,"svg",7),Y(2,"path",8),k()())}function Ii(n,r){if(n&1&&(S(0),v(1,yi,6,17,"div",1),w(2,ki,3,0,"div",2),y()),n&2){let o=l(),t=l();u(),p("veltDynamicTemplate",B(9,Si,t.template,_e(2,xi,t.componentConfigSignal,t.isNewContact,t.selectorItem,t.multiSelect,t.isSelected,t.readOnly),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef)),u(),E(t.multiSelect&&!t.readOnly&&t.isSelected?2:-1)}}function Oi(n,r){if(n&1&&v(0,Ii,3,15,"ng-container",0),n&2){let o=l();p("veltIf",O(9,bi,o.conditionSignal(),be(1,_i,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem,o.isNewContact,o.multiSelect,o.isSelected,o.readOnly)))}}var pn=(()=>{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=A({}),this.subscriptions=[],this.wireframeService=Q(Pt),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)}}getPublishedVeltEntity(){return this.selectorItem}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:[R([b]),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,Oi,1,12,"ng-container"),e&2){let a;E((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 vn=(()=>{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=A(void 0),this.dataComponentConfigSignal=A({}),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,d){try{Object.keys(i).forEach(s=>{let h;if(ot(t)?h=rt(()=>lt(t(),i[s].path)):h=rt(()=>lt(t,i[s].path)),ot(h()))bt(()=>{try{let g=h()();i[s].value=g,this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector});else{let g=h();i[s].value=g,this.extractedProps=i,this.evaluateCondition()}})}catch(s){this.loggingService.catch("Error in DynamicDataService getComputedValues: ",s)}}};r.\u0275fac=function(e){return new(e||r)(I(N),I(b),I(at))},r.\u0275cmp=P({type:r,selectors:[["app-data"]],inputs:{path:"path",field:"field"},standalone:!1,features:[R([b])],decls:2,vars:3,template:function(e,i){e&1&&(U(0),V(1,"translate")),e&2&&Ct(L(1,1,i.valueSignal()))},dependencies:[We],encapsulation:2,changeDetection:0});let n=r;return n})();var Di=(n,r)=>({template:n,context:r,cloneTemplate:!0});function wi(n,r){n&1&&z(0)}function Ei(n,r){if(n&1&&(S(0),v(1,wi,1,0,"ng-container",1),y()),n&2){let o=l();u(),p("veltDynamicTemplate",O(1,Di,o.template,o.dataComponentConfigSignal()))}}var gn=(()=>{let r=class r{constructor(t,e,i){this.loggingService=t,this.dynamicDataService=e,this.injector=i,this.condition="",this.showContent=A(!1),this.conditionRegex=/\{(.*?)\}/g,this.extractedProps={},this.dataComponentConfigSignal=A({}),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,(d,s)=>{let h=e[s];if(h&&h.value!==void 0){let g=h.value;return typeof g=="string"?`'${g}'`:typeof g=="boolean"||typeof g=="number"?String(g):g===null?"null":typeof g=="object"?g?"true":"false":String(g)}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,d){try{this.cleanupEffects.forEach(s=>s.destroy()),this.cleanupEffects.length=0,Object.keys(i).forEach(s=>{let h;if(ot(t)?h=rt(()=>lt(t(),i[s].path)):h=rt(()=>lt(t,i[s].path)),ot(h())){let g=bt(()=>{try{let T=h()();i[s].value=T,this.extractedProps=i,this.evaluateCondition()}catch{i[s].value="",this.extractedProps=i,this.evaluateCondition()}},{injector:this.injector});this.cleanupEffects.push(g)}else{let g=h();i[s].value=g,this.extractedProps=i,this.evaluateCondition()}})}catch(s){this.loggingService.catch("Error in DynamicDataService getComputedValues: ",s)}}};r.\u0275fac=function(e){return new(e||r)(I(N),I(b),I(at))},r.\u0275cmp=P({type:r,selectors:[["app-if"]],inputs:{template:"template",condition:"condition"},standalone:!1,features:[R([b])],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltDynamicTemplate"]],template:function(e,i){e&1&&v(0,Ei,2,4,"ng-container",0),e&2&&p("ngIf",i.showContent())},styles:["[_nghost-%COMP%]{display:flex;align-items:center}"],changeDetection:0});let n=r;return n})();var un=(()=>{let r=class r{constructor(t,e,i){this.coreActionsService=t,this.loggingService=e,this.metadataService=i,this.buttonClickSubject$=new Ot,this.buttonToggleMap$=new Bt({}),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(d){return vt(this,arguments,function*({id:t,type:e,groupId:i,contextData:a,data:c}){try{this.buttonToggle(t,void 0,e,i);let h=this.extractButtonData(a),g=this.createButtonContext(t,e,i),T=yield this.metadataService.getGlobalMetadata(),D={};if(c){let s=c,{componentConfigSignal:C}=s,$=ge(s,["componentConfigSignal"]);if(D=m({},$),C&&typeof C=="function")try{let Z=C();Z&&typeof Z=="object"&&(D=m(m({},D),Z))}catch(Z){this.loggingService.catch("Error accessing componentConfigSignal: ",Z)}}let _=f(m({buttonContext:g},h),{metadata:T,data:D});this.buttonClickSubject$.next(_),this.coreActionsService.triggerAction(ae.VELT_BUTTON_CLICK,_)}catch(h){this.loggingService.catch("Error in ButtonService buttonClick: ",h)}})}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,d=this.createNewToggleMap(c,t,e,i,a);this.buttonToggleMap$.next(d)}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 d=m({},t);return a==="button-toggle"?f(m({},d),{ungrouped:f(m({},d.ungrouped),{[e]:i??!d.ungrouped?.[e]})}):a==="single-select"&&c?f(m({},d),{[c]:{[e]:i??!0}}):a==="multi-select"&&c?f(m({},d),{[c]:f(m({},d[c]),{[e]:i??!d[c]?.[e]})}):d}catch(d){return this.loggingService.catch("Error in ButtonService createNewToggleMap: ",d),{}}}buttonClickSubject(){return this.buttonClickSubject$.asObservable()}buttonToggleMap(){return this.buttonToggleMap$.asObservable()}resetVeltButtonState(t){return vt(this,null,function*(){try{if(t){let{id:c,group:d}=t,s=JSON.parse(JSON.stringify(this.buttonToggleMap$.value||{}));d&&c?delete s?.[d]?.[c]:d?delete s?.[d]:c&&Object.keys(s).forEach(h=>{Object.keys(s[h]).forEach(g=>{g===c&&delete s?.[h]?.[g]})}),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(ae.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)(H(ze),H(N),H(Ye))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var Ai=n=>({componentConfigSignal:n}),Mi=(n,r)=>({condition:n,data:r}),Pi=(n,r)=>({componentConfigSignal:n,buttonComponentConfig:r}),Ri=(n,r,o,t)=>({template:n,context:r,cloneTemplate:!0,setIfCondition:o,componentElementRef:t});function Fi(n,r){if(n&1&&(S(0),U(1),V(2,"translate"),y()),n&2){let o=l(5);u(),X(" ",L(2,1,o.id)," ")}}function ji(n,r){if(n&1){let o=Dt();x(0,"div",3),wt("click",function(){kt(o);let e=l(4);return It(e.onClick())}),v(1,Fi,3,3,"ng-container",4),k()}if(n&2){let o=l().ngIf,t=l(3);Et("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]),M("data-testid",t.componentId+"-"+t.id)("data-group",t.group?t.group:"ungrouped")("data-value",t.valueSignal()),u(),p("veltDynamicTemplate",_t(11,Ri,t.template,O(8,Pi,t.dataComponentConfigSignal().componentConfigSignal,o),t.setIfCondition.bind(t),t.elementRef))}}function Ui(n,r){if(n&1&&(S(0),v(1,ji,2,16,"div",2),y()),n&2){let o=l(3);u(),p("ngIf",o.id)}}function Ni(n,r){if(n&1&&(S(0),v(1,Ui,2,1,"ng-container",0),y()),n&2){let o=l(2);u(),p("ngIf",o.buttonComponentConfigSignal())}}function Vi(n,r){if(n&1&&(S(0),v(1,Ni,2,1,"ng-container",1),y()),n&2){let o=l();u(),p("veltIf",O(3,Mi,o.conditionSignal(),F(1,Ai,o.dataComponentConfigSignal().componentConfigSignal)))}}var hn=(()=>{let r=class r extends ct{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=A(void 0),this.dataComponentConfigSignal=A({}),this.buttonComponentConfigSignal=A({buttonToggleMap:{},active:!1,disabled:!1,contextData:{},internalId:null});try{this.subscription.push(this.dynamicDataService.getCommonData().subscribe(d=>{this.dataComponentConfigSignal.update(s=>(s=m(m({},s),d),s)),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps)}))}catch(d){this.loggingService.catch("Error in ButtonComponent data functionality: ",d)}}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,d){try{Object.keys(i).forEach(s=>{let h;ot(t)?h=rt(()=>lt(t(),i[s].path)):h=rt(()=>lt(t,i[s].path)),ot(h())?bt(()=>{try{i[s].value=h()(),this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector}):(i[s].value=h(),this.extractedProps=i,this.evaluateCondition())})}catch(s){this.loggingService.catch("Error in ButtonComponent getComputedValues: ",s)}}};r.\u0275fac=function(e){return new(e||r)(I(un),I(N),I(b),I(tt),I(at))},r.\u0275cmp=P({type:r,selectors:[["app-button"]],inputs:{id:"id",type:"type",group:"group",disabled:"disabled",active:"active"},standalone:!1,features:[R([b]),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&&v(0,Vi,2,6,"ng-container",0),e&2&&p("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 Li=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,group:o}),Bi=(n,r)=>({condition:n,data:r}),zi=(n,r)=>({componentConfigSignal:n,group:r}),$i=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-group-option-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Gi(n,r){if(n&1&&(S(0),x(1,"div",2)(2,"span",3),U(3),k()(),y()),n&2){let o=l(3);u(3),Ct((o.group==null?null:o.group.name)||o.groupName)}}function Hi(n,r){if(n&1&&(S(0),v(1,Gi,4,1,"ng-container",1),y()),n&2){let o=l(),t=l();u(),p("veltDynamicTemplate",B(4,$i,t.template,O(1,zi,t.componentConfigSignal,t.group),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Wi(n,r){if(n&1&&v(0,Hi,2,10,"ng-container",0),n&2){let o=l();p("veltIf",O(5,Bi,o.conditionSignal(),it(1,Li,o.componentConfigSignal,o.localUIStateSignal,o.group)))}}var fn=(()=>{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=Ji(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(St),this.componentConfigSignal=A({})}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:[R([b]),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,Wi,1,8,"ng-container"),e&2){let a;E((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 Ji(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 Ki=(n,r,o,t)=>({componentConfigSignal:n,parentLocalUIState:r,newUserContact:o,newUserContactError:t}),Yi=(n,r)=>({condition:n,data:r}),Xi=(n,r,o)=>({componentConfigSignal:n,newUserContact:r,newUserContactError:o}),Zi=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-empty-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function qi(n,r){if(n&1&&(x(0,"span",3),U(1),k()),n&2){let o=l(4);M("data-testid",o.componentId+"-add-contact"),u(),X(' Add "',o.newUserContact==null||o.newUserContact.contact==null?null:o.newUserContact.contact.email,'" ')}}function Qi(n,r){if(n&1&&(x(0,"span",4),U(1),k()),n&2){let o=l(4);M("data-testid",o.componentId+"-error"),u(),X(" ",o.newUserContactError," ")}}function ta(n,r){if(n&1&&(x(0,"span",5),U(1," No results found "),k()),n&2){let o=l(4);M("data-testid",o.componentId+"-no-results")}}function ea(n,r){if(n&1&&(S(0),x(1,"div",2),w(2,qi,2,2,"span",3)(3,Qi,2,2,"span",4)(4,ta,2,1,"span",5),k(),y()),n&2){let o=l(3);u(),M("data-testid",o.componentId),u(),E(!(o.newUserContact==null||o.newUserContact.contact==null)&&o.newUserContact.contact.email&&!o.newUserContactError?2:o.newUserContactError?3:4)}}function na(n,r){if(n&1&&(S(0),v(1,ea,5,2,"ng-container",1),y()),n&2){let o=l(),t=l();u(),p("veltDynamicTemplate",B(5,Zi,t.template,it(1,Xi,t.componentConfigSignal,t.newUserContact,t.newUserContactError),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function oa(n,r){if(n&1&&v(0,na,2,11,"ng-container",0),n&2){let o=l();p("veltIf",O(6,Yi,o.conditionSignal(),_t(1,Ki,o.componentConfigSignal,o.localUIStateSignal,o.newUserContact,o.newUserContactError)))}}var Cn=(()=>{let r=class r extends q{constructor(){super(),this.componentId="velt-autocomplete-empty",this.componentConfigSignal=A({})}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:[R([b]),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,oa,1,9,"ng-container"),e&2){let a;E((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 st=class{constructor(){this.closeDialog=()=>{},this.darkMode=!1,this.variant="",this.type=""}};var _n=n=>({componentConfigSignal:n}),ra=(n,r)=>({condition:n,data:r}),ia=(n,r,o,t)=>({template:n,context:r,componentName:"velt-confirm-dialog-reject-button-wireframe",setIfCondition:o,componentElementRef:t});function aa(n,r){if(n&1&&(S(0),x(1,"button",4),U(2),V(3,"translate"),k(),y()),n&2){let o=l(2).ngIf;u(2),X(" ",L(3,1,(o==null?null:o.noButton)||"No")," ")}}function la(n,r){if(n&1){let o=Dt();S(0),x(1,"div",2),wt("pointerdown",function(e){return kt(o),It(e.stopPropagation())}),v(2,aa,4,3,"ng-container",3),k(),y()}if(n&2){let o=l(2);u(),M("data-testid",o.componentId+"-button"),u(),p("veltDynamicTemplate",_t(4,ia,o.template,F(2,_n,o.componentConfigSignal),o.setIfCondition.bind(o),o.elementRef))}}function ca(n,r){if(n&1&&(S(0),v(1,la,3,9,"ng-container",1),y()),n&2){let o=l();u(),p("veltIf",O(3,ra,o.conditionSignal(),F(1,_n,o.componentConfigSignal)))}}var bn=(()=>{let r=class r extends ct{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 st)}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)(I(tt),I(b),I(N))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-reject"]],standalone:!1,features:[R([b]),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&&v(0,ca,2,6,"ng-container",0),e&2&&p("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 xn=n=>({componentConfigSignal:n}),sa=(n,r)=>({condition:n,data:r}),da=(n,r,o,t)=>({template:n,context:r,componentName:"velt-confirm-dialog-approve-button-wireframe",setIfCondition:o,componentElementRef:t});function ma(n,r){if(n&1&&(S(0),x(1,"button",4),U(2),V(3,"translate"),k(),y()),n&2){let o=l(2).ngIf;u(2),X(" ",L(3,1,(o==null?null:o.yesButton)||"Yes")," ")}}function pa(n,r){if(n&1){let o=Dt();S(0),x(1,"div",2),wt("pointerdown",function(e){return kt(o),It(e.stopPropagation())})("click",function(){kt(o);let e=l().ngIf;return It(e==null?null:e.closeDialog(!0))}),v(2,ma,4,3,"ng-container",3),k(),y()}if(n&2){let o=l(2);u(),M("data-testid",o.componentId+"-button"),u(),p("veltDynamicTemplate",_t(4,da,o.template,F(2,xn,o.componentConfigSignal),o.setIfCondition.bind(o),o.elementRef))}}function va(n,r){if(n&1&&(S(0),v(1,pa,3,9,"ng-container",1),y()),n&2){let o=l();u(),p("veltIf",O(3,sa,o.conditionSignal(),F(1,xn,o.componentConfigSignal)))}}var Sn=(()=>{let r=class r extends ct{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 st)}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)(I(tt),I(b),I(N))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-approve"]],standalone:!1,features:[R([b]),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&&v(0,va,2,6,"ng-container",0),e&2&&p("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 yn=n=>({componentConfigSignal:n}),ga=(n,r)=>({condition:n,data:r}),ua=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-confirm-dialog-title-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function ha(n,r){if(n&1&&(x(0,"h2",4),U(1),V(2,"translate"),k()),n&2){let o=l(3).ngIf,t=l();M("data-testid",t.componentId),u(),Ct(L(2,2,o==null?null:o.title))}}function fa(n,r){if(n&1&&(S(0),v(1,ha,3,4,"h2",3),y()),n&2){let o=l(2).ngIf;u(),p("ngIf",o==null?null:o.title)}}function Ca(n,r){if(n&1&&(S(0),v(1,fa,2,1,"ng-container",2),y()),n&2){let o=l().ngIf,t=l();u(),p("veltDynamicTemplate",B(3,ua,t.template,F(1,yn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function _a(n,r){if(n&1&&(S(0),v(1,Ca,2,9,"ng-container",1),y()),n&2){let o=l();u(),p("veltIf",O(3,ga,o.conditionSignal(),F(1,yn,o.componentConfigSignal)))}}var kn=(()=>{let r=class r extends ct{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 st)}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)(I(tt),I(b),I(N))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-title"]],standalone:!1,features:[R([b]),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&&v(0,_a,2,6,"ng-container",0),e&2&&p("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 In=n=>({componentConfigSignal:n}),ba=(n,r)=>({condition:n,data:r}),xa=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-confirm-dialog-message-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Sa(n,r){if(n&1&&(x(0,"div"),U(1),V(2,"translate"),k()),n&2){let o=l(3).ngIf;u(),X(" ",L(2,1,o==null?null:o.message)," ")}}function ya(n,r){if(n&1&&(S(0),v(1,Sa,3,3,"div",0),y()),n&2){let o=l(2).ngIf;u(),p("ngIf",o==null?null:o.message)}}function ka(n,r){if(n&1&&(S(0),x(1,"div",2),v(2,ya,2,1,"ng-container",3),k(),y()),n&2){let o=l().ngIf,t=l();u(),M("data-testid",t.componentId),u(),p("veltDynamicTemplate",B(4,xa,t.template,F(2,In,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Ia(n,r){if(n&1&&(S(0),v(1,ka,3,10,"ng-container",1),y()),n&2){let o=l();u(),p("veltIf",O(3,ba,o.conditionSignal(),F(1,In,o.componentConfigSignal)))}}var On=(()=>{let r=class r extends ct{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 st)}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)(I(tt),I(b),I(N))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-message"]],standalone:!1,features:[R([b]),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&&v(0,Ia,2,6,"ng-container",0),e&2&&p("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 Dn=n=>({componentConfigSignal:n}),Oa=(n,r)=>({condition:n,data:r}),Da=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-confirm-dialog-preview-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function wa(n,r){if(n&1&&(x(0,"div",5),U(1),k()),n&2){let o=l(3).ngIf;u(),Ct(o==null?null:o.previewText)}}function Ea(n,r){if(n&1&&(S(0),v(1,wa,2,1,"div",4),y()),n&2){let o=l(2).ngIf;u(),p("ngIf",o==null?null:o.previewText)}}function Ta(n,r){if(n&1&&(S(0),x(1,"div",2),v(2,Ea,2,1,"ng-container",3),k(),y()),n&2){let o=l().ngIf,t=l();u(),M("id",t.componentId)("data-testid",t.componentId),u(),p("veltDynamicTemplate",B(5,Da,t.template,F(3,Dn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Aa(n,r){if(n&1&&(S(0),v(1,Ta,3,11,"ng-container",1),y()),n&2){let o=l();u(),p("veltIf",O(3,Oa,o.conditionSignal(),F(1,Dn,o.componentConfigSignal)))}}var wn=(()=>{let r=class r extends ct{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 st)}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)(I(tt),I(b),I(N))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-preview"]],standalone:!1,features:[R([b]),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&&v(0,Aa,2,6,"ng-container",0),e&2&&p("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 Rt={"velt-autocomplete-option-wireframe":pn,"velt-autocomplete-group-option-wireframe":fn,"velt-autocomplete-empty-wireframe":Cn,"velt-autocomplete-option-icon-wireframe":dn,"velt-autocomplete-option-name-wireframe":mn,"velt-autocomplete-option-description-wireframe":ln,"velt-autocomplete-option-error-icon-wireframe":sn,"velt-autocomplete-chip-tooltip-wireframe":rn,"velt-autocomplete-chip-tooltip-icon-wireframe":nn,"velt-autocomplete-chip-tooltip-name-wireframe":on,"velt-autocomplete-chip-tooltip-description-wireframe":tn,"velt-data":vn,"velt-if":gn,"velt-button-wireframe":hn,"velt-confirm-dialog-wireframe":Je,"velt-confirm-dialog-reject-button-wireframe":bn,"velt-confirm-dialog-approve-button-wireframe":Sn,"velt-confirm-dialog-title-wireframe":kn,"velt-confirm-dialog-message-wireframe":On,"velt-confirm-dialog-preview-wireframe":wn};var En=(()=>{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,d)=>d.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=Se(t,{environmentInjector:this.injector.get(fe)});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;"),!Rt[t])return null;let c=a?`${a}__${t}`:"",d=e?.getAttribute("velt-wireframe-id");d&&(c=`${a}__${d}__${t}`);let s=this.createComponentRef(Rt[t],c,!1);if(!s||!e)return null;let h=s.location.nativeElement;if((e?.children?.length>0||e?.innerHTML?.trim()?.length>0)&&(s.instance.template=e),e.attributes.length>0)for(let g=0;g<e.attributes.length;g++){let T=e.attributes[g],D=T.name,_=T.value;D==="class"?h.classList.add(_):D==="style"?h.setAttribute("style",_):D==="velt-if"?s.instance.veltIf=_:(h.setAttribute(D,_),this.setPropertyOnComponent(s,D,_))}i&&typeof i=="object"&&Object.keys(i).forEach(g=>{this.veltFunctionComponents.includes(t)?s.instance.updateDataComponentConfigSignal(g,i[g]):this.setPropertyOnComponent(s,g,i[g])}),this.appRef.attachView(s.hostView),e.parentNode?e.parentNode.replaceChild(h,e):e.appendChild(h);try{Tt(h)}catch{}return 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 d=[],s=t.tagName.toLowerCase();if(Rt[s]&&!a?.includes(s)){let g=this.injectComponentIntoAndMoveChildren(s,t,e,i);return g&&d.push(g),d}return Array.from(t.children).forEach(g=>{let T=this.processAndReplaceVeltComponents(g,e,i,a,c);d.push(...T)}),d}catch(d){return this.loggingService.catch("Error in DynamicComponentService processAndReplaceVeltComponents: ",d),[]}}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)(H(at),H(Ce),H(N))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var em=(()=>{let r=class r{set veltDynamicTemplate({template:t,context:e,id:i,cloneTemplate:a,componentName:c,variant:d,suffix:s,setIfCondition:h,componentElementRef:g,replaceTemplate:T=!0,childrenSlot:D=!0}){try{if(this.childrenSlot=D&&Te(c)?Ae(g?.nativeElement,this):void 0,this.childrenSlot&&!T&&this.warnAugmentingAnchorReplaced(c),s&&(c+=`--${s}`),d&&(c+=`---${d}`),c){let _=this.wireframeService.getConditionElement(c);if(!_&&t&&(_=t),_){let C=_?.getAttribute("velt-if");C&&h&&h(C),Array.from(_.attributes).forEach($=>{g?.nativeElement.setAttribute($.name,$.value)}),e?.componentConfigSignal?(this.dynamicDataService.applyConditionalClasses(g?.nativeElement,e),this.dynamicDataService.executeConditionalClasses()):this.dynamicDataService.applyConditionalClasses(g?.nativeElement)}}if(c&&!t){let _=this.wireframeService.getWireframe(c);if(_){let C=document.createElement(_.tagName);C.innerHTML=_.innerHTML,this.template=C}}else this.template=t;this.data=e,this.id=i,this.cloneTemplate=!!a,this.cloneTemplate&&t&&(this.template=this.domService.deepCloneElement(t)),this.checkToUpdateTemplate(T)}catch(_){this.loggingService.warn("Error in DynamicTemplateDirective veltDynamicTemplate: ",_)}}constructor(t,e,i,a,c,d,s,h){this.elementRef=t,this.templateRef=e,this.viewContainer=i,this.dynamicComponentService=a,this.loggingService=c,this.domService=d,this.wireframeService=s,this.dynamicDataService=h,this.directiveId=Math.random().toString(36).substring(7),this.isCustomTemplateMode=!1,this.isDefaultTemplateMode=!1,this.cloneTemplate=!1,this.injectedElements=[],this.isChildrenMode=!1,this.componentRefs=[],this.warnedAugmentingAnchor=!1;try{this.loggingService.log("%c[WB] Creating CLASS: DynamicTemplateDirective","color: blue;")}catch(g){this.loggingService.catch("Error in DynamicTemplateDirective constructor: ",g)}}checkDataValue(t,e){let i=t.querySelectorAll("[data-velt]");function a(c,d){return d.split(".").reduce((s,h)=>s&&s[h],c)}i.forEach(c=>{let d=c.getAttribute("data-velt");if(d&&e){let s=a(e,d);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.childrenSlot)this.isDefaultTemplateMode=!1,this.isCustomTemplateMode=!1,this.isChildrenMode?this.updateDataOnComponentRefs(this.data):(this.cleanUp(),this.isChildrenMode=this.injectChildrenSlot());else if(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)}}warnAugmentingAnchorReplaced(t){try{if(this.warnedAugmentingAnchor)return;this.warnedAugmentingAnchor=!0,console.warn(`[Velt] Children passed to <${(t||"").replace(/-wireframe$/,"")}> replace its default content. This primitive normally renders SDK children of its own (and may repeat them per item), so your markup will render once, not once per item. To render per item, loop in your own code and place one primitive per item.`)}catch{}}injectChildrenSlot(){try{let t=Me(this.childrenSlot,this);if(!t.length)return!1;let e=this.elementRef.nativeElement,i=e.parentNode;if(!i)return ie(this.childrenSlot,this),!1;t.forEach(c=>{if(Pe(c,d=>!!Rt[d])){let d=this.dynamicComponentService.processAndReplaceVeltComponents(c,this.data,this.id?this.id:`from-children-${this.directiveId}`,[],"from children slot");d?.length&&this.componentRefs.push(...d)}});let a=e.nextSibling;return t.forEach(c=>{i.insertBefore(c,a),a=c.nextSibling,Ee(c)}),t.forEach(c=>Tt(c)),!0}catch(t){return this.loggingService.catch("Error in DynamicTemplateDirective injectChildrenSlot: ",t),!1}}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 d=i.children[c],s=this.dynamicComponentService.processAndReplaceVeltComponents(d,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.componentRefs=[],this.isChildrenMode&&(ie(this.childrenSlot,this),this.isChildrenMode=!1),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)(I(tt),I(Wt),I(Jt),I(En),I(N),I($e),I(Pt),I(b))},r.\u0275dir=Kt({type:r,selectors:[["","veltDynamicTemplate",""]],inputs:{veltDynamicTemplate:"veltDynamicTemplate"}});let n=r;return n})();var sm=(()=>{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 Ot,this.conditionRegex=/\{(.*?)\}/g,this.dataComponentConfig=A({}),this.extractedProps={},this.hasView=!1,this.cleanupEffects=[];try{this.dynamicDataService.getCommonData().pipe(ue(this.destroy$)).subscribe(d=>{this.processCondition(d)})}catch(d){this.loggingService.catch("Error in IfDirective constructor:",d)}}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,d){try{this.cleanupEffects.forEach(s=>s.destroy()),this.cleanupEffects.length=0,Object.keys(i).forEach(s=>{let h;if(ot(t)?h=rt(()=>lt(t(),i[s].path)):h=rt(()=>lt(t,i[s].path)),ot(h())){let g=bt(()=>{try{let T=h()();i[s].value=T,this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector,allowSignalWrites:!0});this.cleanupEffects.push(g)}else{let g=h();i[s].value=g,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)(I(Wt),I(Jt),I(b),I(N),I(at))},r.\u0275dir=Kt({type:r,selectors:[["","veltIf",""]],inputs:{veltIf:"veltIf"},features:[R([b])]});let n=r;return n})();export{Ke as a,Ye as b,qt as c,Ha as d,Ze as e,Qt as f,te as g,ee as h,q as i,tn as j,nn as k,on as l,rn as m,ln as n,sn as o,dn as p,mn as q,pn as r,st as s,bn as t,Sn as u,kn as v,On as w,wn as x,gn as y,un as z,hn as A,fn as B,Cn as C,Rt as D,En as E,em as F,sm as G};
|