@veltdev/sdk 6.0.26 → 6.0.27
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/element/comment-element.model.d.ts +5 -2
- package/app/utils/constants.d.ts +8 -0
- package/{chunk-TMLYEZEQ.js → chunk-2C7WPTQD.js} +1 -1
- package/{chunk-ZH5R4MP6.js → chunk-2MYJTN75.js} +1 -1
- package/{chunk-JICLHDU3.js → chunk-4CPJN52I.js} +1 -1
- package/{chunk-G3BZ4EU4.js → chunk-4GWTY2QW.js} +1 -1
- package/{chunk-YRE3NGCE.js → chunk-4JE45AVC.js} +1 -1
- package/chunk-72TEWHMQ.js +1 -0
- package/{chunk-2JSXDPYO.js → chunk-7J6SWBKB.js} +1 -1
- package/{chunk-DLN23S5M.js → chunk-ABA7YQYU.js} +1 -1
- package/{chunk-UFOCUTLN.js → chunk-BTJTZEPV.js} +1 -1
- package/{chunk-FJ6KQ3QL.js → chunk-CXZSNTWV.js} +1 -1
- package/{chunk-VYZZWZPY.js → chunk-DF2C2V7B.js} +1 -1
- package/chunk-DKI2JSNJ.js +6 -0
- package/{chunk-BJ5O5D7F.js → chunk-FHFEI7VF.js} +1 -1
- package/chunk-G6V3RCTP.js +1 -0
- package/{chunk-7O3OJVW3.js → chunk-HV37SAIK.js} +1 -1
- package/{chunk-AP33ZJ2C.js → chunk-IVZBIMXH.js} +1 -1
- package/{chunk-CNB6D3KX.js → chunk-J3DYWDYQ.js} +25 -25
- package/{chunk-LM54BOTU.js → chunk-JR3BVUP3.js} +1 -1
- package/{chunk-AWNCHHGK.js → chunk-K6LCTVYG.js} +1 -1
- package/{chunk-GB46XS3O.js → chunk-KHGHU7FE.js} +1 -1
- package/chunk-KWZM6CNH.js +1 -0
- package/{chunk-B3ZPP3EZ.js → chunk-M3XIT6ZY.js} +1 -1
- package/chunk-NZUJK3CJ.js +1 -0
- package/{chunk-MEI3IAPO.js → chunk-PBA6NIAI.js} +1 -1
- package/{chunk-FJAMH4UH.js → chunk-PIBUTN6R.js} +1 -1
- package/{chunk-LCACRBV3.js → chunk-QQIKH4VS.js} +1 -1
- package/chunk-T32PAZYN.js +193 -0
- package/{chunk-VX7YLWTK.js → chunk-UKCZENKX.js} +1 -1
- package/{chunk-JAKGBQ5D.js → chunk-V2VL4H4R.js} +1 -1
- package/{chunk-W47H5WHD.js → chunk-WBOPOSCN.js} +1 -1
- package/{chunk-CLRO2X6T.js → chunk-WNH4SCIB.js} +1 -1
- package/chunk-WWK6NPFJ.js +1 -0
- package/{chunk-2KJYRR7X.js → chunk-YI3LAD3Z.js} +1 -1
- package/{chunk-IAYXXVUB.js → chunk-YUGCY3BB.js} +1 -1
- package/{chunk-NNZNLREA.js → chunk-Z7CCKSEO.js} +1 -1
- package/{chunk-6BTXSFDP.js → chunk-ZVRUGR3J.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 +7 -7
- 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-portable.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 +3 -3
- package/velt.js +2 -2
- package/chunk-BR7AO7YV.js +0 -1
- package/chunk-CCZ3WXF4.js +0 -1
- package/chunk-JPOBXW24.js +0 -1
- package/chunk-NY2Q7SEG.js +0 -6
- package/chunk-TN7X7OZD.js +0 -1
- package/chunk-Z7JR4TW6.js +0 -193
- package/chunk-ZF7OTWYC.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Rt,b as Qe}from"./chunk-Z7CCKSEO.js";import{b as qe}from"./chunk-4GWTY2QW.js";import{Fa as xt,Ga as b,Ha as qt,Ia as ct,Ja as Ze,L as Te,M as Tt,N as Ae,O as Me,P as Pe,R as Zt,S as Fe,T as Re,U as je,V as At,W as Ne,Z as Ue,fa as Ve,ha as Le,ia as le,ja as ze}from"./chunk-DKI2JSNJ.js";import{E as Xe}from"./chunk-72TEWHMQ.js";import{$h as lt,Bb as l,Ca as Ht,Dc as Ee,Ea as Wt,Ha as h,He as Mt,Kb as W,M as Gt,Mb as Et,Mf as Be,N as be,Na as Jt,Pb as N,Q as xe,Qb as _t,Ra as I,Rb as X,Sb as Xt,Ta as Kt,V as ut,W as Se,Wa as P,Ya as Yt,Zi as ht,_a as j,_f as $e,_i as We,a as d,ab as v,ac as F,b as u,ba as nt,c as he,cc as Vt,ci as Ge,da as ye,db as Ie,dc as R,ea as H,ec as O,ee as ce,fa as Q,fb as M,fc as rt,g as gt,gc as bt,ha as ke,hb as w,hc as z,i as fe,ib as E,ic as Oe,ja as yt,jc as De,k as It,ka as kt,l as Bt,la as mt,m as Ce,mc as V,mi as He,na as it,nb as p,nc as L,nj as Pt,nk as Ke,ob as x,p as St,pb as k,pj as U,qb as Y,qj as Je,r as Ot,ra as ot,rc as J,rk as Ye,sa as A,sk as Ft,tc as ie,ub as S,uc as at,v as _e,vb as y,vc as pt,w as $t,wb as B,xb as Dt,xc as ae,ya as tt,zb as wt,zc as we}from"./chunk-J3DYWDYQ.js";var tn=(()=>{let r=class r{constructor(t){this.loggingService=t,this.autocompleteDataMap$=new Bt({}),this.onAutocompleteChipClick$=new It;try{this.loggingService.log("%c[WB] Creating CLASS: AutocompleteService","color: blue;"),this.create({hotkey:"@",type:"contact",data:[]})}catch(e){this.loggingService.catch("Error in AutocompleteService constructor: ",e)}}create(t){try{if(this.loggingService.log("%c[WB] Calling AutocompleteService FUNCTION: create","color: green;"),t?.hotkey){let e=this.autocompleteDataMap$.value;e[t.hotkey]=t,this.autocompleteDataMap$.next(e)}}catch(e){this.loggingService.catch("Error in AutocompleteService create: ",e)}}remove(t){try{this.loggingService.log("%c[WB] Calling AutocompleteService FUNCTION: remove","color: green;");let e=this.autocompleteDataMap$.value;delete e[t],this.autocompleteDataMap$.next(e)}catch(e){this.loggingService.catch("Error in AutocompleteService remove: ",e)}}getAutocompleteDataMap$(){return this.autocompleteDataMap$.asObservable()}getAutocompleteDataMap(){return this.autocompleteDataMap$.value}setOnAutocompleteChipClick(t){this.onAutocompleteChipClick$.next(t)}getOnAutocompleteChipClick$(){return this.onAutocompleteChipClick$.asObservable()}};r.\u0275fac=function(e){return new(e||r)(H(U))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var en=(()=>{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 gt(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 m=this.docService.getLocations();m&&Object.values(m).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 gt(this,null,function*(){try{let t=this.authService.getUser();if(!t)return null;let e,i;t&&(e=He(t)??void 0,i=JSON.parse(JSON.stringify(t)),delete i?.contacts);let a=this.configService.getApiKey(),c=window?.Velt?.version,m=this.docService.getOrganizationMetadata(t?.organizationId),s,f;m&&(s=JSON.parse(JSON.stringify(m)),delete s?.organizationId,s.organizationId=s?.clientOrganizationId,delete s?.clientOrganizationId,delete s?.pageInfo,delete s?.apiKey,f=JSON.parse(JSON.stringify(m)),delete f?.clientOrganizationId,delete f?.pageInfo,delete f?.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,zt=this.docService.getDocumentPaths();zt?.folderId&&zt?.veltFolderId&&(dt={folderId:zt?.folderId,veltFolderId:zt?.veltFolderId});let re,Nt;dt&&(re=JSON.parse(JSON.stringify(dt)),delete re?.veltFolderId,Nt=JSON.parse(JSON.stringify(dt)),Nt.folderId=Nt.veltFolderId,delete Nt?.veltFolderId);let Ut={};return Ut.veltVersion=c,Ut.apiKey=a,Ut.serverMap={organization:f??void 0,documents:Z,locations:D??void 0,folder:Nt??void 0,user:i??void 0,accessFields:this.docService.getProcessedDocContext()??void 0},Ut.clientMap={organization:s??void 0,documents:$,locations:_??void 0,folder:re??void 0,user:e??void 0,context:this.docService.getDocContext()??void 0},Ut}catch(t){return this.loggingService.catch("Error in MetadataService getDebugInfo: ",t),null}})}getDebugInfo$(){return $t([this.authService.getUser$(),this.docService.getOrganizationConfig$(),this.docService.getOrganizationMetadataMap$(),this.docService.getAllDocumentMetadataMap$(),this.docService.getDocContext$()]).pipe(ut(()=>gt(this,null,function*(){return yield this.getDebugInfo()})),Gt(Ge))}};r.\u0275fac=function(e){return new(e||r)(H(Xe),H(U),H(Ft),H(Je))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var Qt=class n{static forContextMap(r,o){return new n(r,t=>zn(o,t))}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 Ot(null);let t=this.cache.get(r);if(t)return t;let e=this.buildStream(r,o);return this.cache.set(r,e),e}catch{return Ot(null)}}getForContext(r,o,t){try{let e=r?.trim();return!e||e===te&&!t?.sentinelIdIsAKey?this.get(te):this.get(e,()=>o(e))}catch{return Ot(null)}}buildStream(r,o){let t=new fe(i=>{let a;try{o?.(),a=pt(()=>{this.structureVersion();let c=this.readSignal(r);try{i.next(c?c():null)}catch{}},{injector:this.injector,manualCleanup:!0})}catch{i.next(null)}return()=>{try{a?.destroy()}catch{}}}),e;return e=t.pipe(Gt(),_e(i=>Ln(i)),be(()=>{try{this.cache.get(r)===e&&this.cache.delete(r)}catch{}}),xe({connector:()=>new Ce(1),resetOnRefCountZero:!0})),e}};function Ln(n){try{if(!n||typeof n!="object"||Object.isFrozen(n))return n;if(Array.isArray(n))return Object.freeze(n.slice());let r=Object.assign(Object.create(Object.getPrototypeOf(n)),n);return Object.freeze(r)}catch{return n}}var te="default";function zn(n,r){try{if(r!==te)return n.get(r);let o=n.get(te);return o||(n.size===1?n.values().next().value:void 0)}catch{return}}function nn(){try{return Q(it)}catch{return null}}var vt=class{constructor(){this.isGroupHeader=!1,this.isGroupMember=!1,this.isNewContact=!1,this.disabled=!1}},Lt=class{constructor(){this.appState={user:null,darkMode:!1},this.featureState={customAutocompleteSearch:!1,expandMentionGroups:!1,showMentionGroupsFirst:!1,showMentionGroupsOnly:!1,customGroupsEnabled:!1,paginatedContactList:Mt.PAGINATED_CONTACT_LIST_DEFAULT,atHereEnabled:!1,showAtHere:!1},this.data={userContacts:[],organizationGroups:[],userDocumentContacts:[],documentContactCount:null,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 on(n,r){let o=typeof n=="number"&&Number.isFinite(n)&&n>0?n:0,t=typeof r=="number"&&Number.isFinite(r)&&r>0?r:0;return Math.max(o,t)}function se(){return{panelOpen:!1,filterText:"",highlightedIndex:-1,autocompleteDisabledPositions:new Set,darkMode:!1,variant:void 0}}var rn=new ye("AutocompleteLocalUIStateSignal");var ee=(()=>{let r=class r{bumpContextConfigStructureVersion(){this.configBridge.bumpStructureVersion()}constructor(t,e,i,a,c,m){this.authService=t,this.contactService=e,this.autocompleteService=i,this.serviceBook=a,this.themeService=c,this.loggingService=m,this.contextMap=new Map,this.registryMap=new Map,this.serviceSubscriptions=[],this.injector=nn(),this.configBridge=new Qt(this.injector,s=>this.contextMap.get(s)),this.currentUser=null,this.currentDarkMode=!1,this.currentUserContacts=[],this.currentOrganizationGroups=[],this.currentUserDocumentContacts=[],this.currentDocumentContactCount=null,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=Mt.PAGINATED_CONTACT_LIST_DEFAULT,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=>u(d({},e),{appState:u(d({},e.appState),{user:t})})))})),this.serviceSubscriptions.push(this.themeService.getDarkMode$().subscribe(t=>{this.currentDarkMode=t,this.updateAllContexts(e=>u(d({},e),{appState:u(d({},e.appState),{darkMode:t})}))})),this.serviceSubscriptions.push(this.contactService.getUserContacts$().subscribe(t=>{this.currentUserContacts=t?.slice()||[],this.updateAllContexts(e=>u(d({},e),{data:u(d({},e.data),{userContacts:this.buildUserContactsWithHere(this.currentUserContacts)})}))})),this.serviceSubscriptions.push(this.contactService.getOrganizationGroups$().subscribe(t=>{this.currentOrganizationGroups=t||[],this.updateAllContexts(e=>u(d({},e),{data:u(d({},e.data),{organizationGroups:this.currentOrganizationGroups})}))})),this.serviceSubscriptions.push(this.contactService.getUserDocumentContacts$().subscribe(t=>{this.currentUserDocumentContacts=t||[],this.updateAllContexts(e=>u(d({},e),{data:u(d({},e.data),{userDocumentContacts:this.currentUserDocumentContacts})}))})),this.serviceSubscriptions.push(this.contactService.getDocumentContactCount$().subscribe(t=>{this.currentDocumentContactCount=t??null,this.updateAllContexts(e=>u(d({},e),{data:u(d({},e.data),{documentContactCount:this.currentDocumentContactCount})}))})),this.serviceSubscriptions.push(this.autocompleteService.getAutocompleteDataMap$().subscribe(t=>{this.currentAutocompleteDataMap=t||{},this.updateAllContexts(e=>u(d({},e),{data:u(d({},e.data),{autocompleteDataMap:this.currentAutocompleteDataMap})}))})),this.serviceSubscriptions.push(this.contactService.getAtHereEnabled$().subscribe(t=>{this.currentAtHereEnabled=t,this.updateAllContexts(e=>u(d({},e),{featureState:u(d({},e.featureState),{atHereEnabled:t}),data:u(d({},e.data),{userContacts:this.buildUserContactsWithHere(this.currentUserContacts)})}))})),this.serviceSubscriptions.push(this.contactService.getAtHereLabel().subscribe(t=>{this.currentAtHereLabel=t,this.updateAllContexts(e=>u(d({},e),{data:u(d({},e.data),{hereUserContact:u(d({},e.data.hereUserContact),{name:t})})}))})),this.serviceSubscriptions.push(this.contactService.getAtHereDescription().subscribe(t=>{this.currentAtHereDescription=t,this.updateAllContexts(e=>u(d({},e),{data:u(d({},e.data),{atHereDescription:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ht).pipe(ut(t=>t?t.getCustomAutocompleteSearch$():St)).subscribe(t=>{this.currentCustomAutocompleteSearch=t,this.updateAllContexts(e=>u(d({},e),{featureState:u(d({},e.featureState),{customAutocompleteSearch:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ht).pipe(ut(t=>t?t.getExpandMentionGroups$():St)).subscribe(t=>{this.currentExpandMentionGroups=t,this.updateAllContexts(e=>u(d({},e),{featureState:u(d({},e.featureState),{expandMentionGroups:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ht).pipe(ut(t=>t?t.getShowMentionGroupsFirst$():St)).subscribe(t=>{this.currentShowMentionGroupsFirst=t,this.updateAllContexts(e=>u(d({},e),{featureState:u(d({},e.featureState),{showMentionGroupsFirst:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ht).pipe(ut(t=>t?t.getShowMentionGroupsOnly$():St)).subscribe(t=>{this.currentShowMentionGroupsOnly=t,this.updateAllContexts(e=>u(d({},e),{featureState:u(d({},e.featureState),{showMentionGroupsOnly:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ht).pipe(ut(t=>t?t.getPaginatedContactList$():St)).subscribe(t=>{this.currentPaginatedContactList=t,this.updateAllContexts(e=>u(d({},e),{featureState:u(d({},e.featureState),{paginatedContactList:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ht).pipe(ut(t=>t?t.getAutoCompleteScrollConfig$():St)).subscribe(t=>{this.currentAutoCompleteScrollConfig=t,this.updateAllContexts(e=>u(d({},e),{uiState:u(d({},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 Lt;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.documentContactCount=this.currentDocumentContactCount,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 Lt)}}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),Ot(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(Ft),H(xt),H(tn),H(Pt),H(qt),H(U))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var an=(()=>{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(We).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()||"",m=new Be;m.email=c;let s=new RegExp(Mt.REGEX_EMAIL).test("@"+m?.email),f=a.data.userContacts.slice();a.featureState.customAutocompleteSearch||e&&(f=this.filterContacts(f,m),a.featureState.paginatedContactList&&f.length<3&&this.fetchFilteredUsersFromDb(e).then(()=>{})),a.featureState.atHereEnabled&&a.data.hereUserContact?.name?.includes(c)&&(f?.find(C=>C?.userId==="here")||(f=[a.data.hereUserContact,...f])),i?.length&&(f=f.filter(C=>!i.find($=>$?.email===C?.email)));let g=e?this.filterGroups(a.data.organizationGroups,e):a.data.organizationGroups,T=f.map(C=>{if(C.visibility==="here"){if(a.data.atHereDescription)C=u(d({},C),{email:a.data.atHereDescription}),C.description=a.data.atHereDescription;else if(a.appState.user&&a.appState.user?.organizationId){let $=on(a.data.userDocumentContacts?.length,a.data.documentContactCount);C=u(d({},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,m,s);else{let C=_.length?void 0:{type:"contact",contact:m},$=this.createFlattenedItems({allItems:_,newUserContact:C,isExpandedGroups:!1,isCustomGroups:!1,showMentionGroupsOnly:a.featureState.showMentionGroupsOnly,showMentionGroupsFirst:a.featureState.showMentionGroupsFirst});t.update(Z=>u(d({},Z),{data:u(d({},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 m=[],s={},f=new Map;e.forEach(C=>{if(C.contact?.userId){let $=$e(C.contact.userId);f.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=f.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]&&m.push(C)});let T=Array.from(g.values()),D=e.length?void 0:{type:"contact",contact:a},_=this.createFlattenedItems({allItems:e,contactsWithoutGroup:m,groups:T,newUserContact:D,isExpandedGroups:!0,isCustomGroups:!1,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(C=>u(d({},C),{data:u(d({},C.data),{flattenedItems:_,newUserContactError:c?void 0:"Invalid email",newUserContact:D,contactsWithoutGroup:m,groups:T})}))}catch(m){this.loggingService.catch("Error in AutocompleteActionService buildExpandedGroupItems:",m)}}filterCustomOptions(t,e){try{let i=t(),a=i.data.selectedAutocompleteData,c=i.data.autocompleteDataMap?.[a?.hotkey],m=c?.data?.slice()||[];if(i.featureState.customAutocompleteSearch||(e?m=m.filter(f=>f.name?.toLowerCase()?.includes(e?.toLowerCase())):m=a?.data?.slice()||[]),c?.groups&&c.groups.length>0){let f=[],g=new Map;c.groups?.forEach(_=>{g.set(_.id,{id:_.id,name:_.name,members:[]})}),m.forEach(_=>{let C={type:"custom",custom:_};_.groupId&&g.has(_.groupId)?g.get(_.groupId)?.members.push(C):f.push(C)});let T=Array.from(g.values()).filter(_=>_.members.length>0),D=this.createFlattenedItems({allItems:[],contactsWithoutGroup:f,groups:T,isExpandedGroups:!1,isCustomGroups:!0,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(_=>u(d({},_),{featureState:u(d({},_.featureState),{customGroupsEnabled:!0}),data:u(d({},_.data),{flattenedItems:D,contactsWithoutGroup:f,groups:T})}))}else{let f=m.map(T=>({type:"custom",custom:T})),g=this.createFlattenedItems({allItems:f,isExpandedGroups:!1,isCustomGroups:!1,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(T=>u(d({},T),{featureState:u(d({},T.featureState),{customGroupsEnabled:!1}),data:u(d({},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:m=!1,isCustomGroups:s=!1,showMentionGroupsOnly:f=!1,showMentionGroupsFirst:g=!1}=t,T=[];if(m||s){if(!f&&!g&&i?.forEach((D,_)=>{let C=new vt;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 vt;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 vt;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)})}}),!f&&g&&i?.length){let D=new vt;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 vt;$.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 vt;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 vt;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=>u(d({},i),{data:u(d({},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)),m;return c>=0?m=[...a.slice(0,c),...a.slice(c+1)]:m=[...a,e],t.update(s=>u(d({},s),{data:u(d({},s.data),{multiSelectItems:m})})),m}catch(i){return this.loggingService.catch("Error in AutocompleteActionService toggleSelection:",i),[]}}confirmSelection(t){try{let i=t().data.multiSelectItems||[];return t.update(a=>u(d({},a),{data:u(d({},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 gt(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(ee),H(xt),H(U),H(Pt))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var ne=(()=>{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(U))},r.\u0275prov=nt({token:r,factory:r.\u0275fac});let n=r;return n})();function de(n,r){try{let o=r?.trim();return o?(n||[]).find(t=>t?.userId===o):void 0}catch{return}}function ln(n,r,o){try{let t=o?.trim();return t?n||(r?.userId===t?r:void 0):void 0}catch{return}}var oe=class{constructor(r){this.options=r,this.published=!1}finalize(){try{let r=this.options.getHost();if(!r)return;let o=Te(r);this.publish(r,o?o.payload:Tt(r)?.payload),Re(r,this.options.ownerRef,()=>this.refreshFromPlacement())}catch{}}refreshFromPlacement(){try{let r=this.options.getHost();if(!r)return;let o=Tt(r)?.payload,t=o?.contextData||{},e=!Hn(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();Me(r,this.options.ownerRef),je(r,this.options.ownerRef),this.published=!1}catch{}}getInheritedLocalUIState(){try{return Tt(this.options.getHost())?.payload?.localUIState}catch{return}}adoptInheritedLocalUIState(r){return Zt(u(d({},r),{host:this.options.getHost()}))}publish(r,o){let t=this.readOwnEntity(),e=this.readOwnLocalUIState();Ae(r,Pe({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 ie(()=>this.options.getEntity())}catch{return}}readOwnLocalUIState(){if(this.options.getLocalUIState)try{return ie(()=>this.options.getLocalUIState())}catch{return}}};function Hn(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 Ze{set parentLocalUIState(t){t&&(this.localUIStateSignal=t,this.isLocalUIStateOwner=!1)}get elementRef(){return this.hostElementRef}constructor(){let t=Q(tt),e=Q(qt),i=Q(we),a=Q(Pt).get(ht),c=Q(b),m=Q(U);super(t,e,i,a??void 0,void 0,c,m),this.autocompleteId=ae(),this.defaultCondition=ae(!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 oe({getHost:()=>this.hostElementRef?.nativeElement,ownerRef:this,getLocalUIState:()=>this.isLocalUIStateOwner?this.localUIStateSignal:void 0,getEntity:()=>this.getPublishedVeltEntity(),onContextChanged:()=>this.handleVeltContextChanged(),markForCheck:()=>this.cd?.markForCheck?.()}),this._placementFlushScheduled=!1,this.onContextPayload=s=>{try{this.isContextInitialized||(this.isContextInitialized=!0),this._autocompleteId=s.autocompleteId,this._contextData=s.contextData||{};let f=this.coreService.getContextConfig(s.autocompleteId);f&&(this.componentConfigSignal.update(g=>d({},g)),this.componentConfigSignal=f,this.cd.markForCheck())}catch(f){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent onContextPayload:",f)}},this.isLocalUIStateRoot=!1,this.hostElementRef=t,this.themeService=e,this.dynamicDataService=c,this.loggingService=m,this.coreService=Q(ee),this.actionService=Q(an),this.cd=i,this.commentService=a??void 0,this.registry=Q(ne,{optional:!0})??void 0,this._userIdContactService=Q(xt),this._userIdAuthService=Q(Ft),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=de(a,i);if(c){e(c),this.publishResolvedEntityToDescendants(),this.flushChangeDetection();return}this._userIdSub=$t([this._userIdContactService.getUserByUserId$(i),this._userIdAuthService.getUser$(),this._userIdContactService.getInternalUserContacts$()]).subscribe(([m,s,f])=>{try{let g=de(f??[],i)??ln(m,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(rn,{optional:!0,skipSelf:!0});t?(this.localUIStateSignal=t,this.isLocalUIStateOwner=!1):(this.localUIStateSignal=A(se()),this.isLocalUIStateOwner=!0)}catch{this.localUIStateSignal=A(se()),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)}}handleVeltContextChanged(){this.adoptInheritedLocalUIState(),this.inheritSelectorItemFromContext(!0),this.onVeltContextChanged()}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 Tt(this.hostElementRef?.nativeElement)?.payload?.contextData||{}}catch{return{}}}getInheritedVeltEntity(){try{return Fe(this.hostElementRef?.nativeElement)}catch{return}}inheritSelectorItemFromContext(t=!1){try{let e=this.getInheritedVeltEntity(),i=this.selectorItem;if(i&&i!==this._lastInheritedSelectorItem)return;e&&e!==i&&(this.selectorItem=e,this._lastInheritedSelectorItem=e,t?(this.cd?.markForCheck?.(),this.schedulePlacementFlush()):this.flushChangeDetection())}catch(e){this.loggingService?.catch?.("Error in AutocompletePrimitiveThemedComponent inheritSelectorItemFromContext:",e)}}schedulePlacementFlush(){try{if(this._placementFlushScheduled)return;this._placementFlushScheduled=!0,queueMicrotask(()=>{this._placementFlushScheduled=!1,this.flushChangeDetection()})}catch{}}publishResolvedEntityToDescendants(){try{let t=this.hostElementRef?.nativeElement;if(!t)return;this.veltContextHost.refreshFromPlacement(),At(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=>u(d({},i),{appState:u(d({},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 ne)return i.contextData&&(this._contextData=i.contextData),i.registry;let a=window.ng;if(a?.getComponent){let m=a.getComponent(e);if(m?.registry)return m.registry}let c=e.__ngContext__;if(c&&Array.isArray(c))for(let m=0;m<c.length;m++){let s=c[m];if(s&&typeof s=="object"&&s.registry instanceof ne)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=>d({},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=>d({},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{Zt({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 Wn=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),Jn=(n,r)=>({condition:n,data:r}),Kn=n=>({componentConfigSignal:n}),Yn=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-description-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),Xn=()=>({});function Zn(n,r){n&1&&B(0)}function qn(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 Qn(n,r){n&1&&B(0)}function to(n,r){if(n&1&&v(0,Qn,1,0,"ng-container",5),n&2){l(2);let o=W(5);p("ngTemplateOutlet",o)}}function eo(n,r){n&1&&B(0)}function no(n,r){if(n&1&&v(0,eo,1,0,"ng-container",5),n&2){l(2);let o=W(7);p("ngTemplateOutlet",o)}}function oo(n,r){if(n&1&&(S(0),w(1,qn,1,1,"ng-container")(2,to,1,1,"ng-container")(3,no,1,1,"ng-container"),y()),n&2){let o=l(2);h(),E((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function ro(n,r){if(n&1&&(N(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 io(n,r){if(n&1&&(N(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 ao(n,r){if(n&1&&(N(0),V(1,"translate")),n&2){let o,t=l(3),e=l();Xt(" ",(o=e.objectKeys((t==null||t.group==null||t.group.group==null?null:t.group.group.users)||Vt(4,Xn)))==null?null:o.length," ",L(1,2,"members")," ")}}function lo(n,r){if(n&1&&w(0,ao,2,5),n&2){let o=l(2);E(!(o==null||o.group==null)&&o.group.group?0:-1)}}function co(n,r){if(n&1&&(S(0),v(1,oo,4,1,"ng-container",4)(2,ro,2,3,"ng-template",null,0,J)(4,io,2,3,"ng-template",null,1,J)(6,lo,1,1,"ng-template",null,2,J),y()),n&2){let o=l(),t=l();h(),p("veltDynamicTemplate",z(3,Yn,t.template,R(1,Kn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function so(n,r){if(n&1&&v(0,co,8,9,"ng-container",3),n&2){let o=l();p("veltIf",O(4,Jn,o.conditionSignal(),O(1,Wn,o.componentConfigSignal,o.localUIStateSignal)))}}var cn=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.componentConfigSignal.update(i=>u(d({},i),{type:"contact",contact:e}))})}set userId(t){this.resolveUserIdToContact(t,e=>{this.componentConfigSignal.update(i=>u(d({},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:[F([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,so,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 ft(n,r){n&&(n.setAttribute("role","presentation"),n.setAttribute("data-testid",r+"-container"))}var mo=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),po=(n,r)=>({condition:n,data:r}),vo=n=>({componentConfigSignal:n}),go=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function uo(n,r){n&1&&B(0)}function ho(n,r){if(n&1&&v(0,uo,1,0,"ng-container",5),n&2){l(2);let o=W(3);p("ngTemplateOutlet",o)}}function fo(n,r){n&1&&B(0)}function Co(n,r){if(n&1&&v(0,fo,1,0,"ng-container",5),n&2){l(2);let o=W(5);p("ngTemplateOutlet",o)}}function _o(n,r){n&1&&B(0)}function bo(n,r){if(n&1&&v(0,_o,1,0,"ng-container",5),n&2){l(2);let o=W(7);p("ngTemplateOutlet",o)}}function xo(n,r){if(n&1&&(S(0),w(1,ho,1,1,"ng-container")(2,Co,1,1,"ng-container")(3,bo,1,1,"ng-container"),y()),n&2){let o=l(2);h(),E((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function So(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 yo(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),Ht)}}function ko(n,r){if(n&1&&(x(0,"div",8),Y(1,"img",9),k()),n&2){let o=l(3);h(),p("src",o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null?null:o.custom.custom.icon.url,Wt)}}function Io(n,r){if(n&1&&(w(0,yo,2,3,"div",7),w(1,ko,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),h(),E(!(o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null)&&o.custom.custom.icon.url?1:-1)}}function Oo(n,r){n&1&&(x(0,"div",10),mt(),x(1,"svg",11),Y(2,"path",12),k()())}function Do(n,r){if(n&1&&(S(0),v(1,xo,4,1,"ng-container",4)(2,So,1,2,"ng-template",null,0,J)(4,Io,2,2,"ng-template",null,1,J)(6,Oo,3,0,"ng-template",null,2,J),y()),n&2){let o=l(),t=l();h(),p("veltDynamicTemplate",z(3,go,t.template,R(1,vo,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function wo(n,r){if(n&1&&v(0,Do,8,9,"ng-container",3),n&2){let o=l();p("veltIf",O(4,po,o.conditionSignal(),O(1,mo,o.componentConfigSignal,o.localUIStateSignal)))}}var dn=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.componentConfigSignal.update(i=>u(d({},i),{type:"contact",contact:e}))})}set userId(t){this.resolveUserIdToContact(t,e=>{this.componentConfigSignal.update(i=>u(d({},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:[F([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,wo,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 Eo=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),To=(n,r)=>({condition:n,data:r}),Ao=n=>({componentConfigSignal:n}),Mo=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-name-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Po(n,r){n&1&&B(0)}function Fo(n,r){if(n&1&&v(0,Po,1,0,"ng-container",5),n&2){l(2);let o=W(3);p("ngTemplateOutlet",o)}}function Ro(n,r){n&1&&B(0)}function jo(n,r){if(n&1&&v(0,Ro,1,0,"ng-container",5),n&2){l(2);let o=W(5);p("ngTemplateOutlet",o)}}function No(n,r){n&1&&B(0)}function Uo(n,r){if(n&1&&v(0,No,1,0,"ng-container",5),n&2){l(2);let o=W(7);p("ngTemplateOutlet",o)}}function Vo(n,r){if(n&1&&(S(0),w(1,Fo,1,1,"ng-container")(2,jo,1,1,"ng-container")(3,Uo,1,1,"ng-container"),y()),n&2){let o=l(2);h(),E((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function Lo(n,r){if(n&1&&(N(0),V(1,"translate")),n&2){let o=l(2);X(" ",L(1,1,o==null||o.contact==null?null:o.contact.name)," ")}}function zo(n,r){if(n&1&&(N(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 Bo(n,r){if(n&1&&(N(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 $o(n,r){if(n&1&&(S(0),v(1,Vo,4,1,"ng-container",4)(2,Lo,2,3,"ng-template",null,0,J)(4,zo,2,3,"ng-template",null,1,J)(6,Bo,2,3,"ng-template",null,2,J),y()),n&2){let o=l(),t=l();h(),p("veltDynamicTemplate",z(3,Mo,t.template,R(1,Ao,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Go(n,r){if(n&1&&v(0,$o,8,9,"ng-container",3),n&2){let o=l();p("veltIf",O(4,To,o.conditionSignal(),O(1,Eo,o.componentConfigSignal,o.localUIStateSignal)))}}var mn=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.componentConfigSignal.update(i=>u(d({},i),{type:"contact",contact:e}))})}set userId(t){this.resolveUserIdToContact(t,e=>{this.componentConfigSignal.update(i=>u(d({},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:[F([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,Go,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 Ho=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),Wo=(n,r)=>({condition:n,data:r}),Jo=n=>({componentConfigSignal:n}),Ko=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Yo(n,r){n&1&&B(0)}function Xo(n,r){if(n&1&&(x(0,"velt-shadow-dom-internal"),v(1,Yo,1,0,"ng-container",2),k()),n&2){l();let o=W(4);h(),p("ngTemplateOutlet",o)}}function Zo(n,r){n&1&&B(0)}function qo(n,r){if(n&1&&v(0,Zo,1,0,"ng-container",2),n&2){l();let o=W(4);p("ngTemplateOutlet",o)}}function Qo(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);h(2),p("componentConfigSignal",o.componentConfigSignal),h(3),p("componentConfigSignal",o.componentConfigSignal),h(2),p("componentConfigSignal",o.componentConfigSignal)}}function tr(n,r){if(n&1&&v(0,Qo,8,3,"div",3),n&2){let o=l(2),t=l();p("veltDynamicTemplate",z(3,Ko,t.template,R(1,Jo,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function er(n,r){if(n&1&&(S(0),w(1,Xo,2,1,"velt-shadow-dom-internal")(2,qo,1,1,"ng-container"),v(3,tr,1,9,"ng-template",null,0,J),y()),n&2){let o=l(2);h(),E(o.shadowDom&&!o.template||o.template&&o.isExplicitShadowDom?1:2)}}function nr(n,r){if(n&1&&v(0,er,5,1,"ng-container",1),n&2){let o=l();p("veltIf",O(4,Wo,o.conditionSignal(),O(1,Ho,o.componentConfigSignal,o.localUIStateSignal)))}}var pn=(()=>{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=>u(d({},i),{type:"contact",contact:e}))})}set userId(t){this.resolveUserIdToContact(t,e=>{this.componentConfigSignal.update(i=>u(d({},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(Rt)}ngOnInit(){try{super.ngOnInit();let t=this.elementRef.nativeElement,e=t.getAttribute("shadow-dom")??t.getAttribute("shadowdom");this.isExplicitShadowDom=e!==null&&e!=="false",this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),this.subscriptions.push(this.wireframeService.getWireframe$("velt-autocomplete-chip-tooltip-wireframe").subscribe(a=>{if(a){let c=document.createElement(a.tagName);c.innerHTML=a.innerHTML,this.template=c}}))}catch(t){this.loggingService.catch("Error in AutocompleteChipTooltipComponent OnInit: ",t)}}ngOnDestroy(){try{this._userIdSub?.unsubscribe(),super.ngOnDestroy(),this.subscriptions.forEach(t=>{t.unsubscribe()})}catch{}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-chip-tooltip-internal"]],inputs:{shadowDom:"shadowDom",variant:"variant",userObject:"userObject",userId:"userId"},standalone:!1,features:[F([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,nr,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 rr=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),ir=(n,r)=>({condition:n,data:r}),me=n=>({$implicit:n}),ar=(n,r)=>({componentConfigSignal:n,userContact:r}),pe=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-description-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),lr=(n,r)=>({componentConfigSignal:n,custom:r}),cr=(n,r)=>({componentConfigSignal:n,group:r}),vn=()=>({});function sr(n,r){n&1&&B(0)}function dr(n,r){if(n&1&&v(0,sr,1,0,"ng-container",4),n&2){l();let o=W(5),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,me,t.selectorItem==null?null:t.selectorItem.contact))}}function mr(n,r){n&1&&B(0)}function pr(n,r){if(n&1&&v(0,mr,1,0,"ng-container",4),n&2){l();let o=W(7),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,me,t.selectorItem==null?null:t.selectorItem.custom))}}function vr(n,r){n&1&&B(0)}function gr(n,r){if(n&1&&v(0,vr,1,0,"ng-container",4),n&2){l();let o=W(9),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,me,t.selectorItem==null?null:t.selectorItem.group))}}function ur(n,r){if(n&1&&(x(0,"p",7),N(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),h(),X(" ",t.field?o[t.field]:L(2,4,o.email)," ")}}function hr(n,r){if(n&1&&v(0,ur,3,6,"p",6),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",z(4,pe,e.template,O(1,ar,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function fr(n,r){if(n&1&&w(0,hr,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 Cr(n,r){if(n&1&&(x(0,"p",7),N(1),V(2,"translate"),k()),n&2){let o=l(2).$implicit;M("aria-label",o.description),h(),X(" ",L(2,2,o.description)," ")}}function _r(n,r){if(n&1&&v(0,Cr,3,4,"p",8),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",z(4,pe,e.template,O(1,lr,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function br(n,r){if(n&1&&w(0,_r,1,10,"p",7),n&2){let o=r.$implicit;E((o.description==null?null:o.description.length)>0?0:-1)}}function xr(n,r){if(n&1&&(x(0,"p",7),N(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)||Vt(5,vn)))==null?null:o.length)+" members"),h(),Xt(" ",(t=i.objectKeys((e==null?null:e.users)||Vt(6,vn)))==null?null:t.length," ",L(2,3,"members")," ")}}function Sr(n,r){if(n&1&&v(0,xr,3,7,"p",8),n&2){let o=r.$implicit,t=l(2),e=l();p("veltDynamicTemplate",z(4,pe,e.template,O(1,cr,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function yr(n,r){if(n&1&&(S(0),w(1,dr,1,4,"ng-container")(2,pr,1,4,"ng-container")(3,gr,1,4,"ng-container"),v(4,fr,1,1,"ng-template",null,0,J)(6,br,1,1,"ng-template",null,1,J)(8,Sr,1,10,"ng-template",null,2,J),y()),n&2){let o=l(2);h(),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 kr(n,r){if(n&1&&v(0,yr,10,1,"ng-container",3),n&2){let o=l();p("veltIf",O(5,ir,o.conditionSignal(),rt(1,rr,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var gn=(()=>{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{ft(this.hostElementRef.nativeElement,this.componentId)}catch(t){this.loggingService.catch("Error in AutocompleteOptionDescriptionComponent setupA11yAttributes:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-option-description-internal"]],inputs:{selectorItem:"selectorItem",field:"field",userObject:"userObject",userId:"userId"},standalone:!1,features:[F([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,kr,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 Ir=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),Or=(n,r)=>({condition:n,data:r}),Dr=n=>({componentConfigSignal:n}),un=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-error-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),wr=n=>({$implicit:n}),Er=(n,r,o)=>({componentConfigSignal:n,isNewContact:r,userContact:o});function Tr(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);h(),M("data-testid",o.componentId+"-icon"),h(),M("data-testid",o.componentId+"-svg")}}function Ar(n,r){if(n&1&&(x(0,"div",2),V(1,"translate"),v(2,Tr,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),h(2),p("veltDynamicTemplate",z(7,un,t.template,R(5,Dr,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Mr(n,r){n&1&&B(0)}function Pr(n,r){if(n&1&&v(0,Mr,1,0,"ng-container",9),n&2){l();let o=W(4),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,wr,t.selectorItem==null?null:t.selectorItem.contact))}}function Fr(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();h(),p("title",o.newUserContactError),M("title",o.newUserContactError)("data-testid",t.componentId+"-icon"),h(),M("data-testid",t.componentId+"-svg")}}function Rr(n,r){if(n&1&&(x(0,"div",2),V(1,"translate"),v(2,Fr,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),h(2),p("veltDynamicTemplate",z(9,un,e.template,rt(5,Er,e.componentConfigSignal,e.isNewContact,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function jr(n,r){if(n&1&&w(0,Rr,3,15,"div",2),n&2){let o=l(2),t=l();E(t.isNewContact&&o.newUserContactError?0:-1)}}function Nr(n,r){if(n&1&&(S(0),w(1,Ar,3,13,"div",2)(2,Pr,1,4,"ng-container"),v(3,jr,1,1,"ng-template",null,0,J),y()),n&2){let o=l(2);h(),E(o.defaultCondition()?(o.selectorItem==null?null:o.selectorItem.type)==="contact"?2:-1:1)}}function Ur(n,r){if(n&1&&v(0,Nr,5,1,"ng-container",1),n&2){let o=l();p("veltIf",O(5,Or,o.conditionSignal(),rt(1,Ir,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var hn=(()=>{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{ft(this.hostElementRef.nativeElement,this.componentId)}catch(t){this.loggingService.catch("Error in AutocompleteOptionErrorIconComponent setupA11yAttributes:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-option-error-icon-internal"]],inputs:{selectorItem:"selectorItem",isNewContact:"isNewContact",userObject:"userObject",userId:"userId"},standalone:!1,features:[F([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,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)}[_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 Vr=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),Lr=(n,r)=>({condition:n,data:r}),zr=(n,r)=>({componentConfigSignal:n,selectorItem:r}),Br=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),ve=n=>({$implicit:n});function $r(n,r){n&1&&B(0)}function Gr(n,r){if(n&1&&v(0,$r,1,0,"ng-container",6),n&2){l(2);let o=W(3),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ve,t.selectorItem==null?null:t.selectorItem.contact))}}function Hr(n,r){n&1&&B(0)}function Wr(n,r){if(n&1&&v(0,Hr,1,0,"ng-container",6),n&2){l(2);let o=W(5),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ve,t.selectorItem==null?null:t.selectorItem.custom))}}function Jr(n,r){n&1&&B(0)}function Kr(n,r){if(n&1&&v(0,Jr,1,0,"ng-container",6),n&2){l(2);let o=W(7),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ve,t.selectorItem==null?null:t.selectorItem.group))}}function Yr(n,r){if(n&1&&(x(0,"div",5),w(1,Gr,1,4,"ng-container")(2,Wr,1,4,"ng-container")(3,Kr,1,4,"ng-container"),k()),n&2){let o=l(3);M("data-testid",o.componentId)("aria-label","Option icon"),h(),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 Xr(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 qr(n,r){if(n&1&&w(0,Xr,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 Qr(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),Ht),M("data-testid",t.componentId+"-custom-svg")}}function ti(n,r){if(n&1&&Y(0,"img",11),n&2){let o=l().$implicit,t=l(3);p("src",o.icon.url,Wt),M("alt",(o==null?null:o.description)||"Custom icon")("data-testid",t.componentId+"-custom-img")}}function ei(n,r){if(n&1&&(w(0,Qr,2,4,"div",10),w(1,ti,1,3,"img",11)),n&2){let o=r.$implicit;E(!(o==null||o.icon==null)&&o.icon.svg?0:-1),h(),E(!(o==null||o.icon==null)&&o.icon.url?1:-1)}}function ni(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 oi(n,r){if(n&1&&(S(0),v(1,Yr,4,3,"div",4)(2,qr,2,1,"ng-template",null,0,J)(4,ei,2,2,"ng-template",null,1,J)(6,ni,2,1,"ng-template",null,2,J),y()),n&2){let o=l(),t=l();h(),p("veltDynamicTemplate",z(4,Br,t.template,O(1,zr,t.componentConfigSignal,t.selectorItem),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function ri(n,r){if(n&1&&v(0,oi,8,10,"ng-container",3),n&2){let o=l();p("veltIf",O(5,Lr,o.conditionSignal(),rt(1,Vr,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var fn=(()=>{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:[F([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,ri,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 ii=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),ai=(n,r)=>({condition:n,data:r}),ge=n=>({$implicit:n}),li=(n,r)=>({componentConfigSignal:n,userContact:r}),ue=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-name-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),ci=(n,r)=>({componentConfigSignal:n,custom:r}),si=(n,r)=>({componentConfigSignal:n,group:r});function di(n,r){n&1&&B(0)}function mi(n,r){if(n&1&&v(0,di,1,0,"ng-container",4),n&2){l();let o=W(5),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ge,t.selectorItem==null?null:t.selectorItem.contact))}}function pi(n,r){n&1&&B(0)}function vi(n,r){if(n&1&&v(0,pi,1,0,"ng-container",4),n&2){l();let o=W(7),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ge,t.selectorItem==null?null:t.selectorItem.custom))}}function gi(n,r){n&1&&B(0)}function ui(n,r){if(n&1&&v(0,gi,1,0,"ng-container",4),n&2){l();let o=W(9),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ge,t.selectorItem==null?null:t.selectorItem.group))}}function hi(n,r){if(n&1&&(x(0,"p",5),N(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),h(),X(" ",L(2,3,o.name||o.email)," ")}}function fi(n,r){if(n&1&&v(0,hi,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",z(4,ue,e.template,O(1,li,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function Ci(n,r){n&1&&Y(0,"velt-skeleton-loader-internal",6)}function _i(n,r){if(n&1&&w(0,fi,1,10,"p",5)(1,Ci,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 bi(n,r){if(n&1&&(x(0,"p",5),N(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),h(),X(" ",L(2,3,o.name)," ")}}function xi(n,r){if(n&1&&v(0,bi,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",z(4,ue,e.template,O(1,ci,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function Si(n,r){if(n&1&&w(0,xi,1,10,"p",5),n&2){let o=r.$implicit;E((o.name==null?null:o.name.length)>0?0:-1)}}function yi(n,r){if(n&1&&(x(0,"p",5),N(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),h(),X(" ",L(2,3,o==null||o.metadata==null?null:o.metadata.groupName)," ")}}function ki(n,r){if(n&1&&v(0,yi,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",z(4,ue,e.template,O(1,si,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function Ii(n,r){if(n&1&&w(0,ki,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 Oi(n,r){if(n&1&&(S(0),w(1,mi,1,4,"ng-container")(2,vi,1,4,"ng-container")(3,ui,1,4,"ng-container"),v(4,_i,2,1,"ng-template",null,0,J)(6,Si,1,1,"ng-template",null,1,J)(8,Ii,1,1,"ng-template",null,2,J),y()),n&2){let o=l(2);h(),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 Di(n,r){if(n&1&&v(0,Oi,10,1,"ng-container",3),n&2){let o=l();p("veltIf",O(5,ai,o.conditionSignal(),rt(1,ii,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var Cn=(()=>{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:[F([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,Di,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 wi=(n,r,o,t,e,i,a)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o,isNewContact:t,multiSelect:e,isSelected:i,readOnly:a}),Ei=(n,r)=>({condition:n,data:r}),Ti=(n,r,o,t,e,i)=>({componentConfigSignal:n,isNewContact:r,selectorItem:o,multiSelect:t,isSelected:e,readOnly:i}),Ai=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Mi(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)),h(),p("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),h(),M("data-testid",t.componentId+"-details"),h(),p("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),h(),p("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),h(),p("selectorItem",t.selectorItem)("isNewContact",t.isNewContact)("componentConfigSignal",t.componentConfigSignal)}}function Pi(n,r){n&1&&(x(0,"div",2),mt(),x(1,"svg",7),Y(2,"path",8),k()())}function Fi(n,r){if(n&1&&(S(0),v(1,Mi,6,17,"div",1),w(2,Pi,3,0,"div",2),y()),n&2){let o=l(),t=l();h(),p("veltDynamicTemplate",z(9,Ai,t.template,Oe(2,Ti,t.componentConfigSignal,t.isNewContact,t.selectorItem,t.multiSelect,t.isSelected,t.readOnly),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef)),h(),E(t.multiSelect&&!t.readOnly&&t.isSelected?2:-1)}}function Ri(n,r){if(n&1&&v(0,Fi,3,15,"ng-container",0),n&2){let o=l();p("veltIf",O(9,Ei,o.conditionSignal(),De(1,wi,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem,o.isNewContact,o.multiSelect,o.isSelected,o.readOnly)))}}var _n=(()=>{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(Rt),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:[F([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,Ri,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 bn=(()=>{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=d(d({},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=>u(d({},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,m){try{Object.keys(i).forEach(s=>{let f;if(ot(t)?f=at(()=>lt(t(),i[s].path)):f=at(()=>lt(t,i[s].path)),ot(f()))pt(()=>{try{let g=f()();i[s].value=g,this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector});else{let g=f();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(U),I(b),I(it))},r.\u0275cmp=P({type:r,selectors:[["app-data"]],inputs:{path:"path",field:"field"},standalone:!1,features:[F([b])],decls:2,vars:3,template:function(e,i){e&1&&(N(0),V(1,"translate")),e&2&&_t(L(1,1,i.valueSignal()))},dependencies:[qe],encapsulation:2,changeDetection:0});let n=r;return n})();var ji=(n,r)=>({template:n,context:r,cloneTemplate:!0});function Ni(n,r){n&1&&B(0)}function Ui(n,r){if(n&1&&(S(0),v(1,Ni,1,0,"ng-container",1),y()),n&2){let o=l();h(),p("veltDynamicTemplate",O(1,ji,o.template,o.dataComponentConfigSignal()))}}var xn=(()=>{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=d(d({},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=>u(d({},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,(m,s)=>{let f=e[s];if(f&&f.value!==void 0){let g=f.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,m){try{this.cleanupEffects.forEach(s=>s.destroy()),this.cleanupEffects.length=0,Object.keys(i).forEach(s=>{let f;if(ot(t)?f=at(()=>lt(t(),i[s].path)):f=at(()=>lt(t,i[s].path)),ot(f())){let g=pt(()=>{try{let T=f()();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=f();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(U),I(b),I(it))},r.\u0275cmp=P({type:r,selectors:[["app-if"]],inputs:{template:"template",condition:"condition"},standalone:!1,features:[F([b])],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltDynamicTemplate"]],template:function(e,i){e&1&&v(0,Ui,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 Sn=(()=>{let r=class r{constructor(t,e,i){this.coreActionsService=t,this.loggingService=e,this.metadataService=i,this.buttonClickSubject$=new It,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(m){return gt(this,arguments,function*({id:t,type:e,groupId:i,contextData:a,data:c}){try{this.buttonToggle(t,void 0,e,i);let f=this.extractButtonData(a),g=this.createButtonContext(t,e,i),T=yield this.metadataService.getGlobalMetadata(),D={};if(c){let s=c,{componentConfigSignal:C}=s,$=he(s,["componentConfigSignal"]);if(D=d({},$),C&&typeof C=="function")try{let Z=C();Z&&typeof Z=="object"&&(D=d(d({},D),Z))}catch(Z){this.loggingService.catch("Error accessing componentConfigSignal: ",Z)}}let _=u(d({buttonContext:g},f),{metadata:T,data:D});this.buttonClickSubject$.next(_),this.coreActionsService.triggerAction(ce.VELT_BUTTON_CLICK,_)}catch(f){this.loggingService.catch("Error in ButtonService buttonClick: ",f)}})}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,m=this.createNewToggleMap(c,t,e,i,a);this.buttonToggleMap$.next(m)}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?u(d({},a),{groupId:i}):a}catch(a){return this.loggingService.catch("Error in ButtonService createButtonMetadata: ",a),{}}}createNewToggleMap(t,e,i,a,c){try{let m=d({},t);return a==="button-toggle"?u(d({},m),{ungrouped:u(d({},m.ungrouped),{[e]:i??!m.ungrouped?.[e]})}):a==="single-select"&&c?u(d({},m),{[c]:{[e]:i??!0}}):a==="multi-select"&&c?u(d({},m),{[c]:u(d({},m[c]),{[e]:i??!m[c]?.[e]})}):m}catch(m){return this.loggingService.catch("Error in ButtonService createNewToggleMap: ",m),{}}}buttonClickSubject(){return this.buttonClickSubject$.asObservable()}buttonToggleMap(){return this.buttonToggleMap$.asObservable()}resetVeltButtonState(t){return gt(this,null,function*(){try{if(t){let{id:c,group:m}=t,s=JSON.parse(JSON.stringify(this.buttonToggleMap$.value||{}));m&&c?delete s?.[m]?.[c]:m?delete s?.[m]:c&&Object.keys(s).forEach(f=>{Object.keys(s[f]).forEach(g=>{g===c&&delete s?.[f]?.[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(ce.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(Ke),H(U),H(en))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var Li=n=>({componentConfigSignal:n}),zi=(n,r)=>({condition:n,data:r}),Bi=(n,r)=>({componentConfigSignal:n,buttonComponentConfig:r}),$i=(n,r,o,t)=>({template:n,context:r,cloneTemplate:!0,setIfCondition:o,componentElementRef:t});function Gi(n,r){if(n&1&&(S(0),N(1),V(2,"translate"),y()),n&2){let o=l(5);h(),X(" ",L(2,1,o.id)," ")}}function Hi(n,r){if(n&1){let o=Dt();x(0,"div",3),wt("click",function(){yt(o);let e=l(4);return kt(e.onClick())}),v(1,Gi,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()),h(),p("veltDynamicTemplate",bt(11,$i,t.template,O(8,Bi,t.dataComponentConfigSignal().componentConfigSignal,o),t.setIfCondition.bind(t),t.elementRef))}}function Wi(n,r){if(n&1&&(S(0),v(1,Hi,2,16,"div",2),y()),n&2){let o=l(3);h(),p("ngIf",o.id)}}function Ji(n,r){if(n&1&&(S(0),v(1,Wi,2,1,"ng-container",0),y()),n&2){let o=l(2);h(),p("ngIf",o.buttonComponentConfigSignal())}}function Ki(n,r){if(n&1&&(S(0),v(1,Ji,2,1,"ng-container",1),y()),n&2){let o=l();h(),p("veltIf",O(3,zi,o.conditionSignal(),R(1,Li,o.dataComponentConfigSignal().componentConfigSignal)))}}var yn=(()=>{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=u(d({},i),{disabled:e}),i))}catch{}}set active(t){try{let e=t;typeof t=="string"&&(e=JSON.parse(t)),this.buttonComponentConfigSignal.update(i=>(i=u(d({},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(m=>{this.dataComponentConfigSignal.update(s=>(s=d(d({},s),m),s)),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps)}))}catch(m){this.loggingService.catch("Error in ButtonComponent data functionality: ",m)}}ngOnInit(){try{super.ngOnInit(),this.subscription.push(this.buttonService.buttonToggleMap().subscribe(t=>{this.buttonComponentConfigSignal.update(e=>(e=u(d({},e),{buttonToggleMap:t}),e))})),this.buttonComponentConfigSignal.update(t=>(t=u(d({},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=>u(d({},i),{[t]:e})),this.buttonComponentConfigSignal.update(i=>(i=d({},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,m){try{Object.keys(i).forEach(s=>{let f;ot(t)?f=at(()=>lt(t(),i[s].path)):f=at(()=>lt(t,i[s].path)),ot(f())?pt(()=>{try{i[s].value=f()(),this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector}):(i[s].value=f(),this.extractedProps=i,this.evaluateCondition())})}catch(s){this.loggingService.catch("Error in ButtonComponent getComputedValues: ",s)}}};r.\u0275fac=function(e){return new(e||r)(I(Sn),I(U),I(b),I(tt),I(it))},r.\u0275cmp=P({type:r,selectors:[["app-button"]],inputs:{id:"id",type:"type",group:"group",disabled:"disabled",active:"active"},standalone:!1,features:[F([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,Ki,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 Yi=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,group:o}),Xi=(n,r)=>({condition:n,data:r}),Zi=(n,r)=>({componentConfigSignal:n,group:r}),qi=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-group-option-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Qi(n,r){if(n&1&&(S(0),x(1,"div",2)(2,"span",3),N(3),k()(),y()),n&2){let o=l(3);h(3),_t((o.group==null?null:o.group.name)||o.groupName)}}function ta(n,r){if(n&1&&(S(0),v(1,Qi,4,1,"ng-container",1),y()),n&2){let o=l(),t=l();h(),p("veltDynamicTemplate",z(4,qi,t.template,O(1,Zi,t.componentConfigSignal,t.group),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function ea(n,r){if(n&1&&v(0,ta,2,10,"ng-container",0),n&2){let o=l();p("veltIf",O(5,Xi,o.conditionSignal(),rt(1,Yi,o.componentConfigSignal,o.localUIStateSignal,o.group)))}}var kn=(()=>{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=na(e,t),this.flushChangeDetection()}catch(i){this.loggingService.catch("Error resolving groupId:",i)}})}catch(t){this.loggingService.catch("Error in groupId resolution:",t)}}constructor(){super(),this.componentId="velt-autocomplete-group-option",this._groupSetByParent=!1,this.contactService=Q(xt),this.componentConfigSignal=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{ft(this.hostElementRef.nativeElement,this.componentId)}catch(t){this.loggingService.catch("Error in AutocompleteGroupOptionComponent setupA11yAttributes:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-group-option-internal"]],inputs:{group:"group",groupName:"groupName",groupObject:"groupObject",groupId:"groupId"},standalone:!1,features:[F([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,ea,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 na(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 oa=(n,r,o,t)=>({componentConfigSignal:n,parentLocalUIState:r,newUserContact:o,newUserContactError:t}),ra=(n,r)=>({condition:n,data:r}),ia=(n,r,o)=>({componentConfigSignal:n,newUserContact:r,newUserContactError:o}),aa=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-empty-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function la(n,r){if(n&1&&(x(0,"span",3),N(1),k()),n&2){let o=l(4);M("data-testid",o.componentId+"-add-contact"),h(),X(' Add "',o.newUserContact==null||o.newUserContact.contact==null?null:o.newUserContact.contact.email,'" ')}}function ca(n,r){if(n&1&&(x(0,"span",4),N(1),k()),n&2){let o=l(4);M("data-testid",o.componentId+"-error"),h(),X(" ",o.newUserContactError," ")}}function sa(n,r){if(n&1&&(x(0,"span",5),N(1," No results found "),k()),n&2){let o=l(4);M("data-testid",o.componentId+"-no-results")}}function da(n,r){if(n&1&&(S(0),x(1,"div",2),w(2,la,2,2,"span",3)(3,ca,2,2,"span",4)(4,sa,2,1,"span",5),k(),y()),n&2){let o=l(3);h(),M("data-testid",o.componentId),h(),E(!(o.newUserContact==null||o.newUserContact.contact==null)&&o.newUserContact.contact.email&&!o.newUserContactError?2:o.newUserContactError?3:4)}}function ma(n,r){if(n&1&&(S(0),v(1,da,5,2,"ng-container",1),y()),n&2){let o=l(),t=l();h(),p("veltDynamicTemplate",z(5,aa,t.template,rt(1,ia,t.componentConfigSignal,t.newUserContact,t.newUserContactError),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function pa(n,r){if(n&1&&v(0,ma,2,11,"ng-container",0),n&2){let o=l();p("veltIf",O(6,ra,o.conditionSignal(),bt(1,oa,o.componentConfigSignal,o.localUIStateSignal,o.newUserContact,o.newUserContactError)))}}var In=(()=>{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:[F([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,pa,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 On=n=>({componentConfigSignal:n}),va=(n,r)=>({condition:n,data:r}),ga=(n,r,o,t)=>({template:n,context:r,componentName:"velt-confirm-dialog-reject-button-wireframe",setIfCondition:o,componentElementRef:t});function ua(n,r){if(n&1&&(S(0),x(1,"button",4),N(2),V(3,"translate"),k(),y()),n&2){let o=l(2).ngIf;h(2),X(" ",L(3,1,(o==null?null:o.noButton)||"No")," ")}}function ha(n,r){if(n&1){let o=Dt();S(0),x(1,"div",2),wt("pointerdown",function(e){return yt(o),kt(e.stopPropagation())}),v(2,ua,4,3,"ng-container",3),k(),y()}if(n&2){let o=l(2);h(),M("data-testid",o.componentId+"-button"),h(),p("veltDynamicTemplate",bt(4,ga,o.template,R(2,On,o.componentConfigSignal),o.setIfCondition.bind(o),o.elementRef))}}function fa(n,r){if(n&1&&(S(0),v(1,ha,3,9,"ng-container",1),y()),n&2){let o=l();h(),p("veltIf",O(3,va,o.conditionSignal(),R(1,On,o.componentConfigSignal)))}}var Dn=(()=>{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(U))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-reject"]],standalone:!1,features:[F([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,fa,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 wn=n=>({componentConfigSignal:n}),Ca=(n,r)=>({condition:n,data:r}),_a=(n,r,o,t)=>({template:n,context:r,componentName:"velt-confirm-dialog-approve-button-wireframe",setIfCondition:o,componentElementRef:t});function ba(n,r){if(n&1&&(S(0),x(1,"button",4),N(2),V(3,"translate"),k(),y()),n&2){let o=l(2).ngIf;h(2),X(" ",L(3,1,(o==null?null:o.yesButton)||"Yes")," ")}}function xa(n,r){if(n&1){let o=Dt();S(0),x(1,"div",2),wt("pointerdown",function(e){return yt(o),kt(e.stopPropagation())})("click",function(){yt(o);let e=l().ngIf;return kt(e==null?null:e.closeDialog(!0))}),v(2,ba,4,3,"ng-container",3),k(),y()}if(n&2){let o=l(2);h(),M("data-testid",o.componentId+"-button"),h(),p("veltDynamicTemplate",bt(4,_a,o.template,R(2,wn,o.componentConfigSignal),o.setIfCondition.bind(o),o.elementRef))}}function Sa(n,r){if(n&1&&(S(0),v(1,xa,3,9,"ng-container",1),y()),n&2){let o=l();h(),p("veltIf",O(3,Ca,o.conditionSignal(),R(1,wn,o.componentConfigSignal)))}}var En=(()=>{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(U))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-approve"]],standalone:!1,features:[F([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,Sa,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 Tn=n=>({componentConfigSignal:n}),ya=(n,r)=>({condition:n,data:r}),ka=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-confirm-dialog-title-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Ia(n,r){if(n&1&&(x(0,"h2",4),N(1),V(2,"translate"),k()),n&2){let o=l(3).ngIf,t=l();M("data-testid",t.componentId),h(),_t(L(2,2,o==null?null:o.title))}}function Oa(n,r){if(n&1&&(S(0),v(1,Ia,3,4,"h2",3),y()),n&2){let o=l(2).ngIf;h(),p("ngIf",o==null?null:o.title)}}function Da(n,r){if(n&1&&(S(0),v(1,Oa,2,1,"ng-container",2),y()),n&2){let o=l().ngIf,t=l();h(),p("veltDynamicTemplate",z(3,ka,t.template,R(1,Tn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function wa(n,r){if(n&1&&(S(0),v(1,Da,2,9,"ng-container",1),y()),n&2){let o=l();h(),p("veltIf",O(3,ya,o.conditionSignal(),R(1,Tn,o.componentConfigSignal)))}}var An=(()=>{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(U))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-title"]],standalone:!1,features:[F([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,wa,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 Mn=n=>({componentConfigSignal:n}),Ea=(n,r)=>({condition:n,data:r}),Ta=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-confirm-dialog-message-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Aa(n,r){if(n&1&&(x(0,"div"),N(1),V(2,"translate"),k()),n&2){let o=l(3).ngIf;h(),X(" ",L(2,1,o==null?null:o.message)," ")}}function Ma(n,r){if(n&1&&(S(0),v(1,Aa,3,3,"div",0),y()),n&2){let o=l(2).ngIf;h(),p("ngIf",o==null?null:o.message)}}function Pa(n,r){if(n&1&&(S(0),x(1,"div",2),v(2,Ma,2,1,"ng-container",3),k(),y()),n&2){let o=l().ngIf,t=l();h(),M("data-testid",t.componentId),h(),p("veltDynamicTemplate",z(4,Ta,t.template,R(2,Mn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Fa(n,r){if(n&1&&(S(0),v(1,Pa,3,10,"ng-container",1),y()),n&2){let o=l();h(),p("veltIf",O(3,Ea,o.conditionSignal(),R(1,Mn,o.componentConfigSignal)))}}var Pn=(()=>{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(U))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-message"]],standalone:!1,features:[F([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,Fa,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 Fn=n=>({componentConfigSignal:n}),Ra=(n,r)=>({condition:n,data:r}),ja=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-confirm-dialog-preview-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Na(n,r){if(n&1&&(x(0,"div",5),N(1),k()),n&2){let o=l(3).ngIf;h(),_t(o==null?null:o.previewText)}}function Ua(n,r){if(n&1&&(S(0),v(1,Na,2,1,"div",4),y()),n&2){let o=l(2).ngIf;h(),p("ngIf",o==null?null:o.previewText)}}function Va(n,r){if(n&1&&(S(0),x(1,"div",2),v(2,Ua,2,1,"ng-container",3),k(),y()),n&2){let o=l().ngIf,t=l();h(),M("id",t.componentId)("data-testid",t.componentId),h(),p("veltDynamicTemplate",z(5,ja,t.template,R(3,Fn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function La(n,r){if(n&1&&(S(0),v(1,Va,3,11,"ng-container",1),y()),n&2){let o=l();h(),p("veltIf",O(3,Ra,o.conditionSignal(),R(1,Fn,o.componentConfigSignal)))}}var Rn=(()=>{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(U))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-preview"]],standalone:!1,features:[F([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,La,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 jt={"velt-autocomplete-option-wireframe":_n,"velt-autocomplete-group-option-wireframe":kn,"velt-autocomplete-empty-wireframe":In,"velt-autocomplete-option-icon-wireframe":fn,"velt-autocomplete-option-name-wireframe":Cn,"velt-autocomplete-option-description-wireframe":gn,"velt-autocomplete-option-error-icon-wireframe":hn,"velt-autocomplete-chip-tooltip-wireframe":pn,"velt-autocomplete-chip-tooltip-icon-wireframe":dn,"velt-autocomplete-chip-tooltip-name-wireframe":mn,"velt-autocomplete-chip-tooltip-description-wireframe":cn,"velt-data":bn,"velt-if":xn,"velt-button-wireframe":yn,"velt-confirm-dialog-wireframe":Qe,"velt-confirm-dialog-reject-button-wireframe":Dn,"velt-confirm-dialog-approve-button-wireframe":En,"velt-confirm-dialog-title-wireframe":An,"velt-confirm-dialog-message-wireframe":Pn,"velt-confirm-dialog-preview-wireframe":Rn};var jn=(()=>{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,m)=>m.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=Ee(t,{environmentInjector:this.injector.get(ke)});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;"),!jt[t])return null;let c=a?`${a}__${t}`:"",m=e?.getAttribute("velt-wireframe-id");m&&(c=`${a}__${m}__${t}`);let s=this.createComponentRef(jt[t],c,!1);if(!s||!e)return null;let f=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"?f.classList.add(_):D==="style"?f.setAttribute("style",_):D==="velt-if"?s.instance.veltIf=_:(f.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(f,e):e.appendChild(f);try{At(f)}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 m=[],s=t.tagName.toLowerCase();if(jt[s]&&!a?.includes(s)){let g=this.injectComponentIntoAndMoveChildren(s,t,e,i);return g&&m.push(g),m}return Array.from(t.children).forEach(g=>{let T=this.processAndReplaceVeltComponents(g,e,i,a,c);m.push(...T)}),m}catch(m){return this.loggingService.catch("Error in DynamicComponentService processAndReplaceVeltComponents: ",m),[]}}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(it),H(Ie),H(U))},r.\u0275prov=nt({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var dm=(()=>{let r=class r{set veltDynamicTemplate({template:t,context:e,id:i,cloneTemplate:a,componentName:c,variant:m,suffix:s,setIfCondition:f,componentElementRef:g,replaceTemplate:T=!0,childrenSlot:D=!0}){try{if(this.childrenSlot=D&&Ue(c)?Ve(g?.nativeElement,this):void 0,this.childrenSlot&&!T&&this.warnAugmentingAnchorReplaced(c),s&&(c+=`--${s}`),m&&(c+=`---${m}`),c){let _=this.wireframeService.getConditionElement(c);if(!_&&t&&(_=t),_){let C=_?.getAttribute("velt-if");C&&f&&f(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,m,s,f){this.elementRef=t,this.templateRef=e,this.viewContainer=i,this.dynamicComponentService=a,this.loggingService=c,this.domService=m,this.wireframeService=s,this.dynamicDataService=f,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,m){return m.split(".").reduce((s,f)=>s&&s[f],c)}i.forEach(c=>{let m=c.getAttribute("data-velt");if(m&&e){let s=a(e,m);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=Le(this.childrenSlot,this);if(!t.length)return!1;let e=this.elementRef.nativeElement,i=e.parentNode;if(!i)return le(this.childrenSlot,this),!1;t.forEach(c=>{if(ze(c,m=>!!jt[m])){let m=this.dynamicComponentService.processAndReplaceVeltComponents(c,this.data,this.id?this.id:`from-children-${this.directiveId}`,[],"from children slot");m?.length&&this.componentRefs.push(...m)}});let a=e.nextSibling;return t.forEach(c=>{i.insertBefore(c,a),a=c.nextSibling,Ne(c)}),t.forEach(c=>At(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 m=i.children[c],s=this.dynamicComponentService.processAndReplaceVeltComponents(m,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&&(le(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(Jt),I(Kt),I(jn),I(U),I(Ye),I(Rt),I(b))},r.\u0275dir=Yt({type:r,selectors:[["","veltDynamicTemplate",""]],inputs:{veltDynamicTemplate:"veltDynamicTemplate"}});let n=r;return n})();var Cm=(()=>{let r=class r{set veltIf(t){this.handleVeltIfChange(t)}constructor(t,e,i,a,c){this.templateRef=t,this.viewContainer=e,this.dynamicDataService=i,this.loggingService=a,this.injector=c,this.destroy$=new It,this.conditionRegex=/\{(.*?)\}/g,this.dataComponentConfig=A({}),this.extractedProps={},this.hasView=!1,this.cleanupEffects=[];try{this.dynamicDataService.getCommonData().pipe(Se(this.destroy$)).subscribe(m=>{this.processCondition(m)})}catch(m){this.loggingService.catch("Error in IfDirective constructor:",m)}}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=d(d({},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,m){try{this.cleanupEffects.forEach(s=>s.destroy()),this.cleanupEffects.length=0,Object.keys(i).forEach(s=>{let f;if(ot(t)?f=at(()=>lt(t(),i[s].path)):f=at(()=>lt(t,i[s].path)),ot(f())){let g=pt(()=>{try{let T=f()();i[s].value=T,this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector,allowSignalWrites:!0});this.cleanupEffects.push(g)}else{let g=f();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=>u(d({},i),{[t]:e}))}catch(i){this.loggingService.catch("Error in IfDirective updateConfig:",i)}}};r.\u0275fac=function(e){return new(e||r)(I(Jt),I(Kt),I(b),I(U),I(it))},r.\u0275dir=Yt({type:r,selectors:[["","veltIf",""]],inputs:{veltIf:"veltIf"},features:[F([b])]});let n=r;return n})();export{tn as a,on as b,en as c,Qt as d,te as e,nn as f,ee as g,ne as h,oe as i,q as j,cn as k,dn as l,mn as m,pn as n,gn as o,hn as p,fn as q,Cn as r,_n as s,st as t,Dn as u,En as v,An as w,Pn as x,Rn as y,xn as z,Sn as A,yn as B,kn as C,In as D,jt as E,jn as F,dm as G,Cm as H};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i,b as r,
|
|
1
|
+
import{a as i,b as r,oj as e,pj as a}from"./chunk-J3DYWDYQ.js";var h=class{constructor(t){this.injector=t,this.hideAnalytics=!1}ha(t){try{this.hideAnalytics=t}catch{}}getService(t){return this.injector.get(t)}trackEvent(t,c={},n=!0){try{this.hideAnalytics||(c||(c={}),c=r(i({},c),{source:"external"}),this.getService(e).trackAuthenticatedEvent(t,c,n))}catch(s){this.getService(a).catch("Error in _trackEvent: ",s);return}}};export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-FHFEI7VF.js";import{Ra as g,W as c,Ya as l,k as s,pj as v}from"./chunk-J3DYWDYQ.js";var p=(()=>{let i=class i{constructor(e,r){this.loggingService=e,this.dragDrop=r,this.currentX=0,this.currentY=0,this.destroy$=new s,this.subscriptions=[],this.loggingService.log("%c[WB] Creating CLASS: DraggableOverlayDirective","color: blue;")}ngOnInit(){try{this.loggingService.log("%c[WB] Calling DraggableOverlayDirective FUNCTION: ngOnInit","color: green;"),this.setupDraggableOverlay()}catch(e){this.loggingService.catch("Error in DraggableOverlayDirective ngOnInit: ",e)}}setupDraggableOverlay(){try{if(this.loggingService.log("%c[WB] Calling DraggableOverlayDirective FUNCTION: setupDraggableOverlay","color: green;"),this.connectedOverlay&&this.connectedOverlay.overlayRef){let e=this.connectedOverlay.overlayRef.overlayElement;this.dragRef=this.dragDrop.createDrag(e),this.subscriptions.push(this.dragRef.moved.pipe(c(this.destroy$)).subscribe(r=>{let a=this.connectedOverlay?.overlayRef.getConfig().positionStrategy;this.updatePosition(a,r.distance.x,r.distance.y)},r=>{this.loggingService.catch("Error in DraggableOverlayDirective dragRef.moved subscription: ",r)})),this.dragRef.ended.pipe(c(this.destroy$)).subscribe(r=>{this.currentX+=r.distance.x,this.currentY+=r.distance.y},r=>{this.loggingService.catch("Error in DraggableOverlayDirective dragRef.ended subscription: ",r)})}}catch(e){this.loggingService.catch("Error in DraggableOverlayDirective setupDraggableOverlay: ",e)}}updatePosition(e,r,a){try{if(e){let n=this.currentX+r,h=this.currentY+a;e.withDefaultOffsetX(n).withDefaultOffsetY(h),this.connectedOverlay?.overlayRef?.updatePosition()}}catch{}}cleanupDraggableOverlay(){try{this.loggingService.log("%c[WB] Calling DraggableOverlayDirective FUNCTION: cleanupDraggableOverlay","color: green;"),this.dragRef&&this.dragRef.dispose()}catch(e){this.loggingService.catch("Error in DraggableOverlayDirective cleanupDraggableOverlay: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling DraggableOverlayDirective FUNCTION: ngOnDestroy","color: green;"),this.cleanupDraggableOverlay(),this.destroy$.next(),this.destroy$.complete(),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.loggingService.catch("Error in DraggableOverlayDirective ngOnDestroy: ",e)}}};i.\u0275fac=function(r){return new(r||i)(g(v),g(o))},i.\u0275dir=l({type:i,selectors:[["","veltDraggableOverlay",""]],inputs:{connectedOverlay:[0,"veltDraggableOverlay","connectedOverlay"]}});let t=i;return t})();export{p as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as w,_ as V,aa as j,ba as T,ca as Z}from"./chunk-
|
|
1
|
+
import{$ as w,_ as V,aa as j,ba as T,ca as Z}from"./chunk-DKI2JSNJ.js";import{D as E,Ja as R,La as S,Ma as F,Oa as l,V as b,db as C,i as g,m as y,na as I,ta as v}from"./chunk-J3DYWDYQ.js";var _={schedule(n,t){let e=setTimeout(n,t);return()=>clearTimeout(e)}};function O(n){return n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function k(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}var h;function N(n,t){if(!h){let e=Element.prototype;h=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE?h.call(n,t):!1}function z(n){let t={};return n.forEach(({propName:e,templateName:s,transform:u})=>{t[O(s)]=[e,u]}),t}function A(n,t){return t.get(l).resolveComponentFactory(n).inputs}function P(n,t){let e=n.childNodes,s=t.map(()=>[]),u=-1;t.some((r,o)=>r==="*"?(u=o,!0):!1);for(let r=0,o=e.length;r<o;++r){let i=e[r],c=L(i,t,u);c!==-1&&s[c].push(i)}return s}function L(n,t,e){let s=e;return k(n)&&t.some((u,r)=>u!=="*"&&N(n,u)?(s=r,!0):!1),s}var Y=10,p=class{componentFactory;inputMap=new Map;constructor(t,e){this.componentFactory=e.get(l).resolveComponentFactory(t);for(let s of this.componentFactory.inputs)this.inputMap.set(s.propName,s.templateName)}create(t){return new m(this.componentFactory,t,this.inputMap)}},m=class{componentFactory;injector;inputMap;eventEmitters=new y(1);events=this.eventEmitters.pipe(b(t=>E(...t)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(t,e,s){this.componentFactory=t,this.injector=e,this.inputMap=s,this.ngZone=this.injector.get(R),this.appRef=this.injector.get(C),this.cdScheduler=e.get(v),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(t){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(t)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=_.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},Y))})}getInputValue(t){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(t):this.componentRef.instance[t])}setInputValue(t,e){if(this.componentRef===null){this.initialInputValues.set(t,e);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(t)??t,e),S(this.componentRef.hostView)&&(F(this.componentRef.changeDetectorRef),this.cdScheduler.notify(6))})}initializeComponent(t){let e=I.create({providers:[],parent:this.injector}),s=P(t,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(e,s,t),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[t,e]of this.initialInputValues)this.setInputValue(t,e);this.initialInputValues.clear()}initializeOutputs(t){let e=this.componentFactory.outputs.map(({propName:s,templateName:u})=>{let r=t.instance[s];return new g(o=>{let i=r.subscribe(c=>o.next({name:u,value:c}));return()=>i.unsubscribe()})});this.eventEmitters.next(e)}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}},f=class extends HTMLElement{ngElementEventsSubscription=null};function D(n,t){let e=A(n,t.injector),s=t.strategyFactory||new p(n,t.injector),u=z(e);class r extends f{injector;static observedAttributes=Object.keys(u);get ngElementStrategy(){if(!this._ngElementStrategy){let i=this._ngElementStrategy=s.create(this.injector||t.injector);e.forEach(({propName:c,transform:a})=>{if(!this.hasOwnProperty(c))return;let d=this[c];delete this[c],i.setInputValue(c,d,a)})}return this._ngElementStrategy}_ngElementStrategy;constructor(i){super(),this.injector=i}attributeChangedCallback(i,c,a,d){let[M,x]=u[i];this.ngElementStrategy.setInputValue(M,a,x)}connectedCallback(){let i=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),i=!0),this.ngElementStrategy.connect(this),i||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(i=>{let c=new CustomEvent(i.name,{detail:i.value});this.dispatchEvent(c)})}}return e.forEach(({propName:o,transform:i})=>{Object.defineProperty(r.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(c){this.ngElementStrategy.setInputValue(o,c,i)},configurable:!0,enumerable:!0})}),r}function K(n,t){let e=D(n,{injector:t});class s extends e{connectedCallback(){let r;try{let o=this;Z(o),r=V(o)}catch{}super.connectedCallback?.();try{if(w(r),r){let o=this;setTimeout(()=>{j(o),T(o)},0)}}catch{}}}return s}export{K as a};
|