PageSourceSearch

https://piscine-nostress.fr/9183.152ba58214e38d0a.js

js piscine-nostress.fr collected 2026-10-07 22:39:58 UTC 64,197 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwebclient_webpack=self.webpackChunkwebclient_webpack||[]).push([[9183],{43636(R,g,e){e.d(g,{s:()=>a});class a{cd;disabled=!1;touched=!1;onChange=m=>{};onTouched=()=>{};constructor(m){this.cd=m}registerOnChange(m){this.onChange=m}registerOnTouched(m){this.onTouched=m}markAsTouched(m=!1){(!this.touched||m)&&(this.onTouched(),this.touched=!0),this.cd.markForCheck()}setDisabledState(m){this.disabled=m,this.cd.markForCheck()}onBlur(m){this.markAsTouched(!0)}}},47172(R,g,e){e.d(g,{J9:()=>u,Ji:()=>d,Zc:()=>s,qU:()=>h,zM:()=>l});var a=e(9195);const h=["all","incoming","outgoing","missed","abandoned"],m={[a.r.Missed]:"_i18n.Calls_Missed",[a.r.Received]:"_i18n.IncomingCalls",[a.r.Outgoing]:"_i18n.Calls_Outgoing",[a.r.Abandoned]:"_i18n.Calls_AbandonedQueue",[a.r.AllCalls]:"_i18n.Calls_All"},l={[a.r.Missed]:"_i18n.RecentsMissedCall",[a.r.Received]:"_i18n.Incoming_call",[a.r.Outgoing]:"_i18n.RecentsOutgoingCall",[a.r.Abandoned]:"_i18n.AbandonedCall",[a.r.AllCalls]:"_i18n.Unknown"},d={all:a.r.AllCalls,missed:a.r.Missed,incoming:a.r.Received,outgoing:a.r.Outgoing,abandoned:a.r.Abandoned},s=Object.fromEntries(Object.entries(d).map(([_,E])=>[_,m[E]]));function u(_){return"string"==typeof _&&h.includes(_)}},48661(R,g,e){e.d(g,{Hr:()=>C,Sz:()=>y,iH:()=>_});var a=e(67374),h=e.n(a),m=e(8516),l=e(1211),d=e(9195),s=e(47172),u=e(85372);class _{call;partyName;partyNumber;queueName;isVoicemail;iconClass;icon;description;via;duration;isToday;time;dateRelative;callTypeTitle;constructor(f){this.call=f,this.partyName=function E(I){return(I.party??"").replace(/\s*->\s*VM\s*$/,"").replace(I.partyNumber,"").trim()}(this.call)||this.call.partyNumber,this.partyNumber=this.partyName===this.call.partyNumber?"":this.call.partyNumber,this.isVoicemail=this.call.partyDnType===l.Jhl.SpecialMenu,this.iconClass=C[this.call.callType],this.icon=y[this.call.callType],this.via=t(this.call),this.queueName=this.call.title,this.description=function x(I){return[[I.title,h()(I.startTime).format("L LT"),T(I.duration)].filter(Boolean).join(", "),t(I)].filter(Boolean).join(" ")}(this.call),this.duration=T(this.call.duration),this.isToday=h()().isSame(h()(this.call.startTime),"day"),this.time=h()(this.call.startTime).format("LT"),this.dateRelative=(0,u.P)(this.call.startTime),this.callTypeTitle=s.zM[this.call.callType]}}const C={[d.r.Received]:"fillIconBlue received",[d.r.Outgoing]:"fillIconGreen outgoing",[d.r.Missed]:"fillIconRed missed",[d.r.Abandoned]:"fillIconRed missed",[d.r.AllCalls]:""},y={[d.r.Received]:m.T8X,[d.r.Outgoing]:m.ZWL,[d.r.Missed]:m.EGT,[d.r.Abandoned]:m.Q3b,[d.r.AllCalls]:void 0};function t(I){return I.viaParty?`via ${I.viaParty} ${I.viaPartyNumber}`:""}function T(I){if(!I||I<=0)return"";const f=h().duration(I,"seconds");return f.format(f.hours()?"HH:mm:ss":"H:m:ss").replace(/^0:/,"")}},40838(R,g,e){e.d(g,{k:()=>ge,R:()=>ve});var a=e(85802),h=e(20039),m=e(84412);let l=(()=>{class r{selectedItems$=new m.t((0,h.B8)());isEmpty(){return this.items.isEmpty()}get items(){return this.selectedItems$.value}setItems(n){this.selectedItems$.next(n)}clear(){this.setItems((0,h.B8)())}isSelected(n){return this.items.some(i=>i.number===n.number)}toggleSelection(n){this.isSelected(n)?this.setItems(this.items.filter(i=>i.number!==n.number)):this.setItems(this.items.push(n))}static \u0275fac=function(i){return new(i||r)};static \u0275prov=a.jDH({token:r,factory:r.\u0275fac})}return r})();var d=e(90394),s=e(83762),u=e(38601),_=e(45984),E=e(68018),C=e(8516),y=e(58689),t=e(35547);const x=[[["","inner-chat-search",""]],[["","inner-chat-content",""]]],T=["[inner-chat-search]","[inner-chat-content]"];let I=(()=>{class r{location=(0,a.WQX)(_.aZ);isNewDesign=(0,a.WQX)(y.T);ArrowLeft=C.nkM;header="";back(){this.location.back()}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=t.VBU({type:r,selectors:[["app-layout-inner-chat"]],hostAttrs:[1,"h-100","d-flex","flex-column","flex-1","bg"],inputs:{header:"header"},ngContentSelectors:T,decls:11,vars:9,consts:[[1,"d-flex","gap-1","align-items-center","border-bottom","p-2"],["type","button","data-qa","go-back",1,"btn","btn-plain","btn-icon",3,"click","title"],[3,"img"],[1,"m-0"],[1,"border-bottom","hide-empty"],[1,"flex-1","scrollable"]],template:function(i,o){1&i&&(t.NAR(x),t.j41(0,"div",0)(1,"button",1),t.nI1(2,"translate"),t.bIt("click",function(){return o.back()}),t.nrm(3,"lucide-icon",2),t.k0s(),t.j41(4,"h6",3),t.EFF(5),t.nI1(6,"translate"),t.k0s()(),t.j41(7,"div",4),t.SdG(8),t.k0s(),t.j41(9,"div",5),t.SdG(10,1),t.k0s()),2&i&&(t.R7$(),t.Y8G("title",t.bMT(2,5,"_i18n.GoBack")),t.R7$(2),t.Y8G("img",o.ArrowLeft),t.R7$(),t.AVh("h5",o.isNewDesign()),t.R7$(),t.JRh(t.bMT(6,7,o.header)))},dependencies:[C.flO,C.WGl,E.D9],encapsulation:2,changeDetection:0})}return r})();var f=e(89417),A=e(35606),H=e(94681),c=e(62175),G=e(19543),pt=e(9852),q=e(49769);let st=(()=>{class r{isNewDesign=(0,a.WQX)(y.T);item=H.n;disableReason;static \u0275fac=function(i){return new(i||r)};static \u0275cmp=t.VBU({type:r,selectors:[["app-chat-participant"]],hostVars:2,hostBindings:function(i,o){2&i&&t.AVh("disabled",o.disableReason)},inputs:{item:"item",disableReason:"disableReason"},decls:14,vars:17,consts:[[1,"m-0",3,"ext","size"],["data-qa","item-name",1,"part-name","text-truncate"],["data-qa","item-number",1,"part-number"],["data-qa","item-status",1,"part-status","text-truncate"],["data-qa","item-disable-reason",1,"part-info","text-truncate"]],template:function(i,o){1&i&&(t.nrm(0,"app-avatar",0),t.j41(1,"span",1),t.EFF(2),t.nI1(3,"lforfl"),t.nI1(4,"async"),t.k0s(),t.j41(5,"small",2),t.EFF(6),t.k0s(),t.j41(7,"small",3),t.EFF(8),t.nI1(9,"userProfile"),t.nI1(10,"async"),t.k0s(),t.j41(11,"small",4),t.EFF(12),t.nI1(13,"translate"),t.k0s()),2&i&&(t.Y8G("ext",null==o.item?null:o.item.contact)("size",o.isNewDesign()?"s":"m"),t.R7$(2),t.JRh(t.bMT(4,9,t.i5U(3,6,o.item.contact,o.item.name))),t.R7$(4),t.JRh(o.item.number),t.R7$(2),t.JRh(t.bMT(10,13,t.bMT(9,11,o.item.contact))),t.R7$(4),t.JRh(t.bMT(13,15,o.disableReason)))},dependencies:[c.f,G.R,pt._,E.D9,q.Jj],styles:['[_nghost-%COMP%]{align-items:center;display:grid;grid-template-areas:"avatar name name name" "avatar phone status info";grid-template-columns:auto auto 1fr auto;column-gap:var(--spacer-xs);row-gap:2px;padding-right:var(--spacer-xs)}.disabled[_nghost-%COMP%]{background-color:var(--bg-disabled)!important;color:var(--text-disabled)!important;cursor:not-allowed}
1[_nghost-%COMP%]   app-avatar[_ngcontent-%COMP%]{grid-area:avatar}[_nghost-%COMP%]   .part-name[_ngcontent-%COMP%]{grid-area:name;align-self:flex-end}[_nghost-%COMP%]   .part-number[_ngcontent-%COMP%]{grid-area:phone;align-self:flex-start}[_nghost-%COMP%]   .part-status[_ngcontent-%COMP%]{grid-area:status;align-self:flex-start}[_nghost-%COMP%]   .part-info[_ngcontent-%COMP%]{grid-area:info;align-self:flex-start}.new-design   [_nghost-%COMP%]{column-gap:var(--spacer-s);padding:var(--spacer-s)}.new-design   [_nghost-%COMP%]   .part-name[_ngcontent-%COMP%]{font-weight:var(--font-weight-bold)}.new-design   [_nghost-%COMP%]   small[_ngcontent-%COMP%]{color:var(--text-hint)}'],changeDetection:0})}return r})();function rt(r,b){if(1&r&&t.nrm(0,"app-chat-participant",5),2&r){const n=b.$implicit;t.Y8G("item",n),t.BMQ("data-id",n.number)}}let mt=(()=>{class r{selected=(0,a.WQX)(l);chatLocatorSevice=(0,a.WQX)(d.e);modalService=(0,a.WQX)(u.B);processing=!1;groupName="";get isNothingSelected(){return this.selected.isEmpty()}onKeyDown(n){"Enter"===n.key&&!this.isNothingSelected&&this.startChat()}startChat(){this.processing||(this.processing=!0,this.chatLocatorSevice.createConversation(this.selected.items.map(n=>n.contact).filter(s.z2).toArray(),this.groupName).subscribe({next:n=>{this.selected.clear(),this.chatLocatorSevice.openChatById(n.Conversation.IdConversation),this.processing=!1},error:n=>{this.modalService.error(n),this.processing=!1}}))}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=t.VBU({type:r,selectors:[["ng-component"]],decls:10,vars:9,consts:[["header","_i18n.ComposeGroupChat"],["inner-chat-search","",1,"d-flex","align-items-center","py-1","px-2","gap-2"],["wcAutofocus","","type","text",1,"form-control",3,"keydown","ngModelChange","maxlength","ngModel","placeholder"],["data-qa","start-chat","type","button",1,"btn","btn-border",3,"click","disabled"],["inner-chat-content",""],[1,"grid-group-item",3,"item"]],template:function(i,o){1&i&&(t.j41(0,"app-layout-inner-chat",0)(1,"div",1)(2,"input",2),t.nI1(3,"translate"),t.bIt("keydown",function(P){return o.onKeyDown(P)}),t.mxI("ngModelChange",function(P){return t.DH7(o.groupName,P)||(o.groupName=P),P}),t.k0s(),t.j41(4,"button",3),t.bIt("click",function(){return o.startChat()}),t.EFF(5),t.nI1(6,"translate"),t.k0s()(),t.j41(7,"div",4),t.Z7z(8,rt,1,2,"app-chat-participant",5,t.fX1),t.k0s()()),2&i&&(t.R7$(2),t.Y8G("maxlength",255),t.R50("ngModel",o.groupName),t.Y8G("placeholder",t.bMT(3,5,"_i18n.TypeGroupChatNameHere")),t.R7$(2),t.Y8G("disabled",o.processing||o.isNothingSelected),t.R7$(),t.SpI(" ",t.bMT(6,7,"_i18n.StartChat")," "),t.R7$(3),t.Dyx(o.selected.items))},dependencies:[I,f.X1,f.me,f.BC,f.tU,A.J,f.YN,f.vS,st,E.D9],styles:["[inner-chat-header][_ngcontent-%COMP%]{min-height:var(--avatar-size)}"]})}return r})();var tt=e(59882),it=e(28891),X=e(17705),S=e(44652),k=e(96049),F=e(18530),U=e(983),B=e(84572),Y=e(7673),vt=e(18810),z=e(25558),N=e(96354),ut=e(99437),_t=e(44668),ct=e(88141),Mt=e(23294),Dt=e(23386),yt=e(81546),Pt=e(61594),ot=e(16444),Et=e(23935),K=e(1211),Ct=e(20836),lt=e(33971),Ot=e(12426),St=e(43636),L=e(89079);const D=["inputChatCompose"],M=(r,b)=>b.name;function v(r,b){if(1&r){const n=t.RV6();t.j41(0,"div",8)(1,"span",9),t.bIt("click",function(){const o=a.eBV(n).$implicit,p=t.XpG(2);return a.Njj(p.toggleSelection(o))}),t.EFF(2,"\xd7"),t.k0s(),t.j41(3,"span",10),t.EFF(4),t.k0s()()}if(2&r){const n=b.$implicit;t.R7$(4),t.JRh(n.name)}}function $(r,b){if(1&r&&t.Z7z(0,v,5,1,"div",8,M),2&r){const n=t.XpG();t.Dyx(n.selectedItems())}}let O=(()=>{class r extends St.s{multiselect=(0,X.hFB)(!1);searchPlaceholder=(0,X.hFB)("");composeGroupChat=(0,X.hFB)(new l);enterKeyDown=(0,X.CGW)();clearSelection=(0,X.CGW)();inputChatCompose;textFilter=(0,a.vPA)("");focused=(0,a.vPA)(!1);selectedItems=(0,L.ot)((0,L.br)(this.composeGroupChat).pipe((0,z.n)(n=>n.selectedItems$)),{initialValue:(0,h.B8)()});constructor(){super((0,a.WQX)(X.gRc))}inputKeydown(n){"Enter"===n.key&&(this.enterKeyDown.emit(this.textFilter()),n.stopPropagation(),this.markAsTouched())}toggleSelection(n){this.composeGroupChat().toggleSelection(n),this.focusInputChat()}focusInputChat(){this.inputChatCompose&&this.inputChatCompose.nativeElement.focus()}writeValue(n){this.textFilter.set(n)}valueChanged(n){this.textFilter.set(n),this.markAsTouched(),this.onChange(n)}clear(n){this.composeGroupChat().clear(),this.clearSelection.emit(n),this.valueChanged(""),this.focusInputChat()}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=t.VBU({type:r,selectors:[["app-compose-chat-input"]],viewQuery:function(i,o){if(1&i&&t.GBs(D,5),2&i){let p;t.mGM(p=t.lsd())&&(o.inputChatCompose=p.first)}},inputs:{multiselect:[1,"multiselect"],searchPlaceholder:[1,"searchPlaceholder"],composeGroupChat:[1,"composeGroupChat"]},outputs:{enterKeyDown:"enterKeyDown",clearSelection:"clearSelection"},features:[t.Jv_([{provide:f.kq,multi:!0,useExisting:r}]),t.Vt3],decls:12,vars:16,consts:[["inputChatCompose",""],["data-qa","searchable"],[1,"ng-select-container","ng-has-value","pe-2"],["data-qa","added",1,"ng-value-container"],[1,"ng-input"],["id","inputChatCompose","data-qa","input-chat-compose","maxlength","255","type","text","spellcheck","fal
1se","autocapitalize","off","autocomplete","off","aria-expanded","false",2,"min-width","300px",3,"keydown","ngModelChange","focus","blur","ngModel","placeholder"],["data-qa","clear-participants-list",1,"ng-clear-wrapper","text-end",3,"click","title"],["aria-hidden","true",1,"ng-clear"],[1,"ng-value","d-flex"],["data-qa","remove","aria-hidden","true",1,"ng-value-icon","left",3,"click"],["data-qa","selected-name",1,"ng-value-label","text-nowrap"]],template:function(i,o){1&i&&(t.j41(0,"div",1)(1,"div",2)(2,"div",3),t.nVh(3,$,2,0),t.j41(4,"div",4)(5,"input",5,0),t.nI1(7,"translate"),t.bIt("keydown",function(P){return o.inputKeydown(P)})("ngModelChange",function(P){return o.valueChanged(P)})("focus",function(){return o.focused.set(!0)})("blur",function(){return o.focused.set(!1)}),t.k0s()()(),t.j41(8,"span",6),t.nI1(9,"translate"),t.bIt("click",function(P){return o.clear(P)}),t.j41(10,"span",7),t.EFF(11,"\xd7"),t.k0s()()()()),2&i&&(t.HbH(t.VkB("ng-select ng-select-searchable ng-select-clearable ng-select-",o.multiselect()?"multiple":"single")),t.AVh("ng-select-focused",o.focused()),t.R7$(2),t.AVh("flex-wrap",o.multiselect()),t.R7$(),t.vxM(o.multiselect()?3:-1),t.R7$(2),t.Y8G("ngModel",o.textFilter())("placeholder",t.bMT(7,12,o.searchPlaceholder())),t.R7$(3),t.Y8G("title",t.mNQ(t.bMT(9,14,"_i18n.ClearParticipantsList"))))},dependencies:[f.YN,f.me,f.BC,f.tU,f.vS,E.D9],encapsulation:2})}return r})();var j=e(53775),w=e(50644),et=e(96106),Tt=e(22429),ft=e(32723),It=e(42268),gt=e(40720);const bt=["scrollableElement"],Q=[[["button"],["",8,"btn"]]],J=["button,.btn"],Z=r=>({item:r}),dt=(r,b)=>b.id,nt=(r,b)=>b.number;function $t(r,b){if(1&r){const n=t.RV6();t.j41(0,"app-chat-participant",8),t.bIt("mousedown",function(o){return o.preventDefault()})("click",function(){const o=a.eBV(n).item,p=t.XpG();return a.Njj(p.contactClickInternal(o))}),t.k0s()}if(2&r){const n=b.item,i=t.XpG();t.AVh("selected",i.composeGroupChat.isSelected(n)),t.Y8G("item",n)("disableReason",i.getContactDisableReason(n.contact)),t.BMQ("data-id",n.number)}}function Gt(r,b){1&r&&(t.j41(0,"div",9),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&r&&(t.R7$(),t.JRh(t.bMT(2,1,"_i18n.RecentChats")))}function Ut(r,b){if(1&r){const n=t.RV6();t.j41(0,"chat-item",11),t.bIt("click",function(){const o=a.eBV(n).$implicit,p=t.XpG(2);return a.Njj(p.chatClick.emit(o))}),t.k0s()}if(2&r){const n=b.$implicit;t.Y8G("hideUnread",!0)("chat",n)}}function jt(r,b){if(1&r&&(t.nVh(0,Gt,3,3,"div",9),t.Z7z(1,Ut,1,2,"chat-item",10,dt)),2&r){const n=b;t.vxM(n.length?0:-1),t.R7$(),t.Dyx(n)}}function Kt(r,b){1&r&&(t.j41(0,"div",9),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&r&&(t.R7$(),t.JRh(t.bMT(2,1,"_i18n.Contacts")))}function Nt(r,b){if(1&r&&t.eu8(0,12),2&r){const n=b.$implicit;t.XpG(2);const i=t.sdS(1);t.Y8G("ngTemplateOutlet",i)("ngTemplateOutletContext",t.eq3(2,Z,n))}}function wt(r,b){if(1&r&&(t.nVh(0,Kt,3,3,"div",9),t.Z7z(1,Nt,1,4,"ng-container",12,nt)),2&r){const n=b,i=t.XpG();t.vxM(i.recentChatsEnabled&&n.length?0:-1),t.R7$(),t.Dyx(n)}}function Vt(r,b){if(1&r&&t.eu8(0,12),2&r){const n=b.$implicit;t.XpG(2);const i=t.sdS(1);t.Y8G("ngTemplateOutlet",i)("ngTemplateOutletContext",t.eq3(2,Z,n))}}function Xt(r,b){1&r&&t.Z7z(0,Vt,1,4,"ng-container",12,nt),2&r&&t.Dyx(b.contacts)}let ht=(()=>{class r{contactSearcher=(0,a.WQX)(S.D);localStorage=(0,a.WQX)(Ot.sj);myPhoneService=(0,a.WQX)(ot.gx);composeGroupChat=(0,a.WQX)(l,{optional:!0});textFilter$=new m.t("");nextPage$=new F.B;contacts$=U.w;searcher=new Et.e;crmContacts$=U.w;recentChatsEnabled=!1;resetOnQueuesChange=!1;useCache=!0;title="_i18n.NewConversation";searchPlaceholder="_i18n.StandardChatPlaceholder";disabledContacts;context=k.o.chatEnabled(!1);multiselect=!1;contactClick=(0,X.CGW)();chatClick=(0,X.CGW)();enterKeyDown=(0,X.CGW)();scrollableList;inputChatCompose;textFilter=null;recentChats$;isContextBounded=!1;constructor(){const n=this.myPhoneService;this.composeGroupChat||(this.composeGroupChat=new l);const o=this.textFilter$.pipe((0,et.Or)());this.recentChats$=(0,B.z)([o,n.myPhoneSession]).pipe((0,z.n)(([p,P])=>P.get(new K.SDV({Count:5,From:0,IsActive:!0,SearchString:p?`%${p}%`:""})).pipe((0,N.T)(W=>(0,Ct.vO)((0,Ct.QW)(W,P))),(0,ut.W)(W=>(console.log(W),(0,Y.of)([]))))),(0,_t.t)({refCount:!0,bufferSize:1}))}contactClickInternal(n){n.contact&&this.getContactDisableReason(n.contact)||(this.clearSearchText(),this.multiselect&&this.composeGroupChat.toggleSelection(n),this.contactClick.emit(n))}requestNextPage(n,i){const[o,p,P,W]=n;if(i.isFinished)return(0,Y.of)(i);this.scrollableList&&(this.scrollableList.nativeElement.scrollTop=0);
1const V=this.contactSearcher.requestFactory({Input:o,Count:W,Offset:i.offset,SortBy:P},this.context);return this.useCache||p.deactivateCaching(),this.contactSearcher.requestContact(V).pipe((0,N.T)(at=>({contacts:i.contacts.concat(this.searcher.search(at.Entries.map(Ft=>p.createMergedContact(Ft)),o,this.context)),isFinished:at.Entries.length<W,offset:i.offset+W})),(0,ct.M)(()=>{this.useCache||p.activateCaching()}),(0,ut.W)(at=>(p.activateCaching(),(0,vt.$)(()=>at))))}clearSearchText(){this.textFilter="",this.textFilter$.next("")}getContactDisableReason(n){const i=n?.isAvailableForTransfer||n?.dnType!==K.Jhl.Queue?"":"_i18n.QueueDoesNotHaveActiveAgents";return this.disabledContacts?.find(o=>o.id===n?.id)?.reason??i}reinitializeContacts(){const n=this.textFilter$.pipe((0,et.Or)(),(0,Mt.F)()),i=this.myPhoneService.myPhoneSession.pipe((0,z.n)(p=>p.queuesIdentity$),(0,Dt.c)(800),(0,N.T)(()=>!0)),o=this.resetOnQueuesChange?i:(0,Y.of)(!0);this.contacts$=(0,B.z)([n,this.myPhoneService.myPhoneSession,this.myPhoneService.myPhoneSession.pipe((0,lt.b$)(this.localStorage))]).pipe((0,w.lc)(o),(0,z.n)(p=>{const[P]=p,W=P?j.fy:64;let V=this.requestNextPage([...p,W],{offset:0,isFinished:!1,contacts:[]});return P||(V=V.pipe((0,yt.f)(at=>this.nextPage$.pipe((0,Pt.$)(),(0,z.n)(Ft=>this.requestNextPage([...p,W],at))),1))),V}),(0,N.T)(p=>p.contacts),(0,_t.t)({refCount:!0,bufferSize:1})),this.crmContacts$=this.context.contextRequestHasCRM()?n.pipe((0,z.n)(p=>this.contactSearcher.requestCrmContact(new K.Nhk({InputString:p,MaxContactCount:j.fy}))),(0,N.T)(p=>({error:p.error,contacts:this.searcher.search(p.contacts,"",this.context),status:p.status}))):(0,Y.of)({status:"unavailable",error:"",contacts:[]})}ngOnChanges(n){n.context&&(this.isContextBounded=!0,n.context.currentValue&&this.reinitializeContacts())}focusInputChat(){this.inputChatCompose&&this.inputChatCompose.focusInputChat()}toggleSelection(n){this.composeGroupChat.toggleSelection(n),this.focusInputChat()}ngOnInit(){this.isContextBounded||this.reinitializeContacts()}ngAfterViewInit(){this.focusInputChat()}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=t.VBU({type:r,selectors:[["app-find-contact-plain"]],viewQuery:function(i,o){if(1&i&&t.GBs(bt,5)(O,7),2&i){let p;t.mGM(p=t.lsd())&&(o.scrollableList=p.first),t.mGM(p=t.lsd())&&(o.inputChatCompose=p.first)}},inputs:{recentChatsEnabled:"recentChatsEnabled",resetOnQueuesChange:"resetOnQueuesChange",useCache:"useCache",title:"title",searchPlaceholder:"searchPlaceholder",disabledContacts:"disabledContacts",context:"context",multiselect:"multiselect"},outputs:{contactClick:"contactClick",chatClick:"chatClick",enterKeyDown:"enterKeyDown"},features:[t.OA$],ngContentSelectors:J,decls:15,vars:17,consts:[["participant",""],["scrollableElement",""],[3,"header"],["inner-chat-search","",1,"p-2","d-flex","gap-2","align-items-center"],[1,"flex-grow-1","minw-0",3,"ngModelChange","enterKeyDown","multiselect","composeGroupChat","ngModel","searchPlaceholder"],["inner-chat-content","","infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[3,"crm"],["appCrmContactsRef",""],["data-qa","chat-participant",1,"clickable",3,"mousedown","click","item","disableReason"],[1,"list-header"],[1,"clickable",3,"hideUnread","chat"],[1,"clickable",3,"click","hideUnread","chat"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){if(1&i){const p=t.RV6();t.NAR(Q),t.DNE(0,$t,1,5,"ng-template",null,0,t.C5r),t.j41(2,"app-layout-inner-chat",2)(3,"div",3)(4,"app-compose-chat-input",4),t.mxI("ngModelChange",function(W){return a.eBV(p),t.DH7(o.textFilter,W)||(o.textFilter=W),a.Njj(W)}),t.bIt("enterKeyDown",function(){return o.enterKeyDown.emit(o.textFilter??"")})("ngModelChange",function(W){return o.textFilter$.next(W)}),t.k0s(),t.SdG(5),t.k0s(),t.j41(6,"div",5,1),t.bIt("infiniteScrollCallback",function(){return o.nextPage$.next()}),t.nVh(8,jt,3,1),t.nI1(9,"async"),t.nVh(10,wt,3,1),t.nI1(11,"async"),t.j41(12,"app-crm-contacts",6),t.nI1(13,"async"),t.DNE(14,Xt,2,0,"ng-template",7),t.k0s()()()}if(2&i){let p,P;t.R7$(2),t.Y8G("header",o.title),t.R7$(2),t.Y8G("multiselect",o.multiselect)("composeGroupChat",o.composeGroupChat),t.R50("ngModel",o.textFilter),t.Y8G("searchPlaceholder",o.searchPlaceholder),t.R7$(2),t.Y8G("infiniteScrollContainer",".scrollable")("infiniteScrollDistance",1)("infiniteScrollDisabled",!1),t.R7$(2),t.vxM((p=o.recentChatsEnabled&&t.bMT(9,11,o.recentChats$))?8:-1,p),t.R7$(2),t.vxM((P=t.bMT(11,13,o.contacts$))?10:-1,P),t.R7$(2),t.Y8G("crm",t.bMT(13,15,o.crmContacts$))}},dependencies:[st,I,O,f.X1,f.BC,f.YN,f.vS,Tt.D,ft.B,q.T3,It.n,gt.E,E.D9,q.Jj],styles:[".list-header[_ngcontent-%COMP%]{background:var(--bg-icon-primary-hover);border-bottom:1px solid var(--border-color);padding:var(--spacer-s) var(--spacer);position:sticky;top:0;z-index:1}.clickable[_ngcontent-%COMP%]{border-radius:0;--selectable-hover-bg: color-mix(in srgb, var(--bg-primary-hover) 50%, var(--bg-primary))}.clickable[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--border-color)}.new-design   [_nghost-%COMP%]   .list-header[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--bg-primary-hover) 50%,var(--bg-primary));color:var(--text-hint)}"]})}return r})(),Yt=(()=>{class r{basePath=(0,a.WQX)(it.$);router=(0,a.WQX)(tt.Ix);composeGroupChat=(0,a.WQX)(l);chatLocatorService=(0,a.WQX)(d.e);modalService=(0,a.WQX)(u.B);chatSubscription;processing=!1;get isNothingSelected(){return this.composeGroupChat.isEmpty()}nextStep(){this.isNothingSelected||(this.composeGroupChat.items.size>1?this.router.navigate([`${this.basePath}/create/group/name`]):this.createGroupChatWithOneContact())}createGroupChatWithOneContact(){if(this.processing)return;this.processing=!0;const n=Array.from(this.composeGroupChat.items).map(i=>i.contact);this.chatSubscription=this.chatLocatorService.createConversation(n).subscribe({next:i=>{this.chatLocatorService.openChatById(i.Conversation.IdConversation),this.processing=!1},error:i=>{this.modalService.error(i),this.processing=!1}})}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=t.VBU({type:r,selectors:[["ng-component"]],decls:4,vars:6,consts:[[3,"enterKeyDown","title","multiselect"],["id","btnNext","data-qa","next","type","button",1,"btn","btn-border",3,"click","disabled"]],template:function(i,o){1&i&&(t.j41(0,"app-find-contact-plain",0),t.bIt("enterKeyDown",function(){return o.nextStep()}),t.j41(1,"button",1),t.bIt("click",function(){return o.nextStep()}),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&i&&(t.Y8G("title","_i18n.NewGroupConversation")("multiselect",!0),t.R7$(),t.Y8G("disabled",o.isNothingSelected),t.R7$(),t.SpI(" ",t.bMT(3,4,"_i18n.Next")," "))},dependencies:[ht,E.D9],encapsulation:2})}return r})();var Bt=e(95);let zt=(()=>{class r{chatSmsService=(0,a.WQX)(Bt.V);context=k.o.forSmsChat();createSmsChat(n){n&&this.chatSmsService.navigateToProviderWizard(n)}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=t.VBU({type:r,selectors:[["ng-component"]],decls:5,vars:6,consts:[["compose",""],[3,"contactClick","enterKeyDown","context","searchPlaceholder"],["id","btnStart","data-qa","start","type","button",1,"btn","btn-border",3,"click","disabled"]],template:function(i,o){if(1&i){const p=t.RV6();t.j41(0,"app-find-contact-plain",1,0),t.bIt("contactClick",function(W){return o.createSmsChat(W.number)})("enterKeyDown",function(W){return o.createSmsChat(W)}),t.j41(2,"button",2),t.bIt("click",function(){a.eBV(p);const W=t.sdS(1);return a.Njj(o.createSmsChat(W.textFilter??""))}),t.EFF(3),t.nI1(4,"translate"),t.k0s()()}if(2&i){const p=t.sdS(1);t.Y8G("context",o.context)("searchPlaceholder","_i18n.SmsChatPlaceholder"),t.R7$(2),t.Y8G("disabled",!p.textFilter),t.R7$(),t.SpI(" ",t.bMT(4,4,"_i18n.StartChat")," ")}},dependencies:[ht,E.D9],encapsulation:2})}return r})(),Ht=(()=>{class r{chatLocatorService=(0,a.WQX)(d.e);modalService=(0,a.WQX)(u.B);chatSubscription;processing=!1;createSingleChat(n){this.processing||(this.processing=!0,this.chatSubscription?.unsubscribe(),n.contact&&(this.chatSubscription=this.chatLocatorService.createConversation([n.contact]).subscribe({next:i=>{this.chatLocatorService.openChatById(i.Conversation.IdConversation),this.processing=!1},error:i=>{this.modalService.error(i),this.processing=!1}})))}ngOnDestroy(){this.chatSubscription?.unsubscribe()}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=t.VBU({type:r,selectors:[["ng-component"]],decls:1,vars:0,consts:[[3,"contactClick"]],template:function(i,o){1&i&&(t.j41(0,"app-find-contact-plain",0),t.bIt("contactClick",function(P){return o.createSingleChat(P)}),t.k0s())},dependencies:[ht],encapsulation:2})}return r})();var xt=e(46062),Jt=e(78534),Zt=e(5964);let qt=(()=>{class r{selected=(0,a.WQX)(l);route=(0,a.WQX)(tt.nX);myPhoneService=(0,a.WQX)(ot.gx);modalService=(0,a.WQX)(u.B);location=(0,a.WQX)(_.aZ);chatListService=(0,a.WQX)(Jt.I);processing=!1;chatContacts$;addContext=k.o.chatEnabled(!1);ngOnInit(){this.chatContacts$=this.route.parent.params.pipe((0,N.T)(n=>n.id),(0,Mt.F)(),(0,N.T)(n=>parseInt(n,10)),(0,Zt.p)(n=>
1!isNaN(n)),(0,z.n)(n=>this.chatListService.getChatById(n)),(0,N.T)(n=>n.participants.activeParticipants.filter(i=>i.contact).map(i=>({id:i.contact.id,reason:"_i18n.AlreadyInChat"}))))}addUsers(){if(this.processing)return;this.processing=!0;const n=parseInt(this.route.parent?.snapshot.params.id,10),i=this.selected.items.map(o=>o.contact).filter(s.z2).map(o=>new K.hJ0({Recipient:new K.GRz({ExtNumber:o.extensionNumber,IsModerator:!0,BridgeNumber:o.bridgeId===xt.Ij?"":o.bridgeId,RecipientType:o.bridgeId===xt.Ij?K.ix6.CRT_Local:K.ix6.CRT_3cxBridge})})).toArray();this.myPhoneService.get(new K.mG3({IdConversation:n,ParticipantUpdates:i})).subscribe({next:()=>{this.location.back(),this.processing=!1},error:o=>{this.modalService.error(o),this.processing=!1}})}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=t.VBU({type:r,selectors:[["ng-component"]],features:[t.Jv_([l])],decls:3,vars:8,consts:[[3,"title","disabledContacts","context","multiselect"],["type","button","id","btnAdd",1,"btn","btn-border",3,"click","disabled","translate"]],template:function(i,o){1&i&&(t.j41(0,"app-find-contact-plain",0),t.nI1(1,"async"),t.j41(2,"button",1),t.bIt("click",function(){return o.addUsers()}),t.k0s()()),2&i&&(t.Y8G("title","_i18n.ConfScheduleAddParticipants")("disabledContacts",t.bMT(1,6,o.chatContacts$))("context",o.addContext)("multiselect",!0),t.R7$(2),t.Y8G("disabled",o.processing||o.selected.isEmpty())("translate","_i18n.Add"))},dependencies:[ht,E.Mm,q.Jj],encapsulation:2})}return r})();var te=e(64058),ee=e(28793),ne=e(22398);let ae=(()=>{class r{myPhoneService=(0,a.WQX)(ot.gx);modalService=(0,a.WQX)(u.B);route=(0,a.WQX)(tt.nX);fwd=(0,a.WQX)(ne.L);chatLocatorService=(0,a.WQX)(d.e);processing=!1;forwardToConversation(n){if(this.processing)return;this.processing=!0;const i=this.route.snapshot.queryParams.messageIds;if(!i)return;const p=(Array.isArray(i)?i:[i]).map(V=>parseInt(V,10)).sort(),P=V=>p.map(at=>this.myPhoneService.get(new K.m6U({DstIdConversation:V,SrcIdMessage:at})));n.pipe((0,z.n)(V=>(0,ee.x)(...P(V)).pipe((0,te.$)(),(0,N.T)(()=>V)))).subscribe({next:V=>{this.fwd.clearSelection(),this.chatLocatorService.openChatById(V),this.processing=!1},error:V=>{this.modalService.error(V),this.processing=!1}})}forwardToChat(n){this.forwardToConversation((0,Y.of)(n.id))}forwardToContact(n){n.contact&&this.forwardToConversation(this.chatLocatorService.createConversation([n.contact]).pipe((0,N.T)(i=>i.Conversation.IdConversation)))}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=t.VBU({type:r,selectors:[["ng-component"]],decls:1,vars:2,consts:[[3,"chatClick","contactClick","title","recentChatsEnabled"]],template:function(i,o){1&i&&(t.j41(0,"app-find-contact-plain",0),t.bIt("chatClick",function(P){return o.forwardToChat(P)})("contactClick",function(P){return o.forwardToContact(P)}),t.k0s()),2&i&&t.Y8G("title","_i18n.ForwardMessage")("recentChatsEnabled",!0)},dependencies:[ht],encapsulation:2})}return r})();var ie=e(53993),oe=e(96697),se=e(94014);let re=(()=>{class r{route=(0,a.WQX)(tt.nX);location=(0,a.WQX)(_.aZ);myPhoneService=(0,a.WQX)(ot.gx);modalService=(0,a.WQX)(u.B);processing=!1;currentChat$;context$;ngOnInit(){const n=this.route.parent.params.pipe((0,N.T)(i=>parseInt(i.id,10)));this.currentChat$=(0,B.z)([this.myPhoneService.myPhoneSession,n]).pipe((0,z.n)(([i,o])=>i.get(new K.$RH({IdConversation:o})).pipe((0,N.T)(p=>se.ry.FromPartyInfo(p.Conversation,i))))),this.context$=this.currentChat$.pipe((0,N.T)(i=>k.o.addToChatContext(!0,this.canBeTransferredToQueue(i))))}canBeTransferredToQueue(n){return!n.isChatClosed}transferChat(n){if(!n.contact||this.processing)return;this.processing=!0;const i=n.contact;this.currentChat$.pipe((0,ie.E)(this.myPhoneService.myPhoneSession),(0,oe.s)(1),(0,z.n)(([o,p])=>{const P=!!o.activeParticipants.find(W=>W.contact?.id===i.id&&!W.isExternal);return o.isGroupChat||!P?p.get(new K.WrK({Participant:new K.GRz({BridgeNumber:i.bridgeId===xt.Ij?"":i.bridgeId,ExtNumber:i.extensionNumber}),IdConversation:o.id})).pipe((0,z.n)(()=>p.get(new K.$RH({IdConversation:o.id})).pipe((0,N.T)(()=>!0),(0,ut.W)(()=>(0,Y.of)(!1))))):(0,Y.of)(!0)})).subscribe({next:o=>{this.processing=!1,o&&this.location.path().endsWith("/transfer")&&this.location.back()},error:o=>{this.processing=!1,this.modalService.error(o)}})}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=t.VBU({type:r,selectors:[["ng-component"]],decls:2,vars:6,consts:[[3,"contactClick","title","context","resetOnQueuesChange","useCache"]],template:function(i,o){1&i&&(t.j41(0,"app-find-contact-plain",0),t.nI1(1,"async"),t.bIt("contactClick",function(P){return o.transferChat(P)}),t.k0s()),2&i&&t.Y8G("title","_i18n.Transfer")("context",t.bMT(1,4,o.context$))("resetOnQueuesChange",!0)("useCache",!1)},dependencies:[ht,q.Jj],encapsulation:2})}return r})();var Rt=e(68173),ce=e(53154),At=e(31335);let Lt=(()=>{class r{animationService=(0,a.WQX)(At.L);static \u0275fac=function(i){return new(i||r)};static \u0275cmp=t.VBU({type:r,selectors:[["ng-component"]],features:[t.Jv_([l,At.L])],decls:3,vars:1,consts:[["outlet","outlet"],[1,"holder"]],template:function(i,o){if(1&i&&(t.j41(0,"div",1),t.nrm(1,"router-outlet",null,0),t.k0s()),2&i){const p=t.sdS(2);t.Y8G("@animationPlaceholder",o.animationService.prepareRoute(p))}},dependencies:[tt.n3],styles:[".holder[_ngcontent-%COMP%]{height:100%;position:relative}"],data:{animation:[(0,Rt.hZ)("animationPlaceholder",[(0,Rt.kY)("* => void",[(0,Rt.P)(":leave",ce.SI)])])]}})}return r})();var Wt=e(32271),le=e(13477);let de=(()=>{class r{static \u0275fac=function(i){return new(i||r)};static \u0275cmp=t.VBU({type:r,selectors:[["app-square-chat-custom-icon"],["","app-square-chat-custom-icon",""]],decls:3,vars:0,consts:[["viewBox","0 0 128 128","fill","none","xmlns","http://www.w3.org/2000/svg"],["width","128","height","128","fill","#0096D1"],["d","M48.44 77.125C64.1495 77.125 76.8784 66.3516 76.8784 53.0625C76.8784 39.7734 64.1495 29 48.44 29C32.7304 29 20.0015 39.7734 20.0015 53.0625C20.0015 58.3398 22.0113 63.2207 25.4157 67.1992C24.9372 68.4844 24.2262 69.6191 23.4743 70.5762C22.818 71.4238 22.1481 72.0801 21.6558 72.5312C21.4097 72.75 21.2047 72.9277 21.0679 73.0371C20.9996 73.0918 20.9449 73.1328 20.9175 73.1465L20.8902 73.1738C20.1382 73.7344 19.8101 74.7187 20.1109 75.6074C20.4117 76.4961 21.2457 77.125 22.1891 77.125C25.1696 77.125 28.1776 76.3594 30.6796 75.416C31.9374 74.9375 33.1133 74.4043 34.1387 73.8574C38.3361 75.9355 43.2171 77.125 48.44 77.125ZM81.2536 53.0625C81.2536 68.416 67.7043 79.9824 51.653 81.3633C54.9753 91.5352 65.9952 99 79.066 99C84.2888 99 89.1699 97.8105 93.3809 95.7324C94.4064 96.2793 95.5685 96.8125 96.8264 97.291C99.3284 98.2344 102.336 99 105.317 99C106.26 99 107.108 98.3848 107.395 97.4824C107.682 96.5801 107.368 95.5957 106.602 95.0352L106.575 95.0078C106.547 94.9805 106.493 94.9531 106.424 94.8984C106.288 94.7891 106.083 94.625 105.836 94.3926C105.344 93.9414 104.674 93.2852 104.018 92.4375C103.266 91.4805 102.555 90.332 102.077 89.0605C105.481 85.0957 107.491 80.2148 107.491 74.9238C107.491 62.2363 95.883 51.832 81.1579 50.9297C81.2126 51.627 81.2399 52.3379 81.2399 53.0488L81.2536 53.0625Z","fill","white"]],template:function(i,o){1&i&&(a.qSk(),t.rj2(0,"svg",0),t.Hgh(1,"rect",1)(2,"path",2),t.eux())},encapsulation:2})}return r})();function he(r,b){if(1&r){const n=t.RV6();t.j41(0,"img",4),t.bIt("error",function(){a.eBV(n);const o=t.XpG();return a.Njj(o.setDefaultImage())}),t.k0s()}if(2&r){let n;const i=t.XpG();t.Y8G("alt",null==(n=i.provider())?null:n.Type)("src",i.providerImageSrc(),t.B4B)}}function pe(r,b){1&r&&t.nrm(0,"span",1)}let me=(()=>{class r{myPhoneSession=(0,L.ot)((0,a.WQX)(ot.gx).myPhoneSession);provider=(0,X.hFB)();useDefaultImg=(0,a.vPA)(!1);providerImageSrc=(0,Wt.EW)(()=>{const n=this.myPhoneSession(),i=this.provider();if(!n||!i)return;const o=(0,le.SV)(i?.EncodedProvider,void 0);return(0,lt.kb)(o.imageIdent,n,lt.l8.Logo)});setDefaultImage(){this.useDefaultImg.set(!0)}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=t.VBU({type:r,selectors:[["app-provider-item"]],inputs:{provider:[1,"provider"]},decls:6,vars:3,consts:[["data-qa","provider-image",1,"part-avatar",3,"alt","src"],["data-qa","provider-default-image","app-square-chat-custom-icon","",1,"part-avatar","fillIconCurrent"],[1,"part-name","text-truncate"],[1,"part-info","text-truncate"],["data-qa","provider-image",1,"part-avatar",3,"error","alt","src"]],template:function(i,o){if(1&i&&(t.nVh(0,he,1,2,"img",0)(1,pe,1,0,"span",1),t.j41(2,"span",2),t.EFF(3),t.k0s(),t.j41(4,"small",3),t.EFF(5),t.k0s()),2&i){let p,P;t.vxM(o.useDefaultImg()?1:0),t.R7$(3),t.JRh(null==(p=o.provider())?null:p.InstanceName),t.R7$(2),t.JRh(null!=(P=o.provider())&&P.UsePhoneNumbers?null==(P=o.provider())?null:P.ExternalNumber:"")}},dependencies:[de],styles:['[_nghost-%COMP%]{align-items:center;display:grid;grid-template-areas:"avatar name" "avatar info";grid-template-columns:auto 1fr;grid-template-rows:auto auto;row-gap:var(--spacer-xxs);column-gap:var(--spacer-xs);min-width:0}
1[_nghost-%COMP%]   .part-avatar[_ngcontent-%COMP%]{grid-area:avatar;width:var(--avatar-size);height:var(--avatar-size)}[_nghost-%COMP%]   .part-name[_ngcontent-%COMP%]{grid-area:name;align-self:flex-end}[_nghost-%COMP%]   .part-info[_ngcontent-%COMP%]{grid-area:info;align-self:flex-start}.new-design   [_nghost-%COMP%]{padding:var(--spacer-s)}.new-design   [_nghost-%COMP%]   .part-name[_ngcontent-%COMP%]{font-weight:var(--font-weight-bold)}.new-design   [_nghost-%COMP%]   small[_ngcontent-%COMP%]{color:var(--text-hint)}.new-design   [_nghost-%COMP%]   .part-avatar[_ngcontent-%COMP%]{--avatar-size: var(--avatar-size-s);border-radius:50%}'],changeDetection:0})}return r})();const ue=(r,b)=>b.ExternalNumber;function Ce(r,b){if(1&r){const n=t.RV6();t.j41(0,"app-provider-item",5),t.bIt("click",function(){const o=a.eBV(n).$implicit,p=t.XpG();return a.Njj(p.startConversation(o))}),t.k0s()}2&r&&t.Y8G("provider",b.$implicit)}const ge=[{path:"add",component:qt,data:{animation:"add"}},{path:"transfer",component:re,data:{animation:"transfer"}},{path:"forward",component:ae,data:{animation:"forward"}}],ve=[{path:"create",component:Ht,data:{animation:"create"}},{data:{animation:"group"},path:"create/group",component:Lt,children:[{path:"",data:{animation:"group_create"},component:Yt},{path:"name",data:{animation:"group_name"},component:mt}]},{path:"create/external",component:Lt,children:[{path:"",component:zt,data:{animation:"provider_contact"}},{path:":phone",component:(()=>{class r{chatSmsService=(0,a.WQX)(Bt.V);route=(0,a.WQX)(tt.nX);filter=(0,a.vPA)("");allProviders=(0,L.ot)(this.chatSmsService.providersParty$,{initialValue:[]});filteredProviders=(0,Wt.EW)(()=>{const n=this.allProviders(),i=this.filter().toLowerCase().trim();return i?n.filter(o=>[o.ExternalNumber,o.InstanceName].some(p=>p.toLowerCase().includes(i))):n});startConversation(n){this.chatSmsService.startSmsChat(this.route.snapshot.params.phone,n)}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=t.VBU({type:r,selectors:[["ng-component"]],decls:6,vars:1,consts:[["header","_i18n.SelectSmsProvider"],["inner-chat-search","",1,"p-2"],["searchPlaceholder","_i18n.Search",3,"ngModelChange","ngModel"],["inner-chat-content",""],["data-qa","provider-items",1,"clickable","border-bottom",3,"provider"],["data-qa","provider-items",1,"clickable","border-bottom",3,"click","provider"]],template:function(i,o){1&i&&(t.j41(0,"app-layout-inner-chat",0)(1,"div",1)(2,"app-compose-chat-input",2),t.mxI("ngModelChange",function(P){return t.DH7(o.filter,P)||(o.filter=P),P}),t.k0s()(),t.j41(3,"div",3),t.Z7z(4,Ce,1,1,"app-provider-item",4,ue),t.k0s()()),2&i&&(t.R7$(2),t.R50("ngModel",o.filter),t.R7$(2),t.Dyx(o.filteredProviders()))},dependencies:[I,O,f.X1,f.BC,f.YN,f.vS,me],encapsulation:2,changeDetection:0})}return r})(),data:{animation:"provider"}}]}]},28891(R,g,e){e.d(g,{$:()=>h});const h=new(e(85802).nKC)("BASE_CHAT_PATH")},22398(R,g,e){e.d(g,{L:()=>m});var a=e(20039),h=e(85802);let m=(()=>{class l{_selected=(0,a.NZ)();get selected(){return this._selected}clearSelection(){this._selected=(0,a.NZ)()}toggle(s,u){this._selected=u?this._selected.add(s):this._selected.remove(s)}isSelected(s){return this._selected.has(s)}forward(s){}static \u0275fac=function(u){return new(u||l)};static \u0275prov=h.jDH({token:l,factory:l.\u0275fac})}return l})()},32723(R,g,e){e.d(g,{B:()=>X});var a=e(85802),h=e(62175),m=e(75982),l=e(24147),d=e(29912),s=e(49769),u=e(68018),_=e(46007),E=e(31390),C=e(82869),y=e(58689),t=e(47548),x=e(18530),T=e(89079),I=e(13220),f=e(32934),A=e(8516),H=e(94579),c=e(35547);function G(S,k){if(1&S&&(c.j41(0,"small",7),c.EFF(1),c.nI1(2,"chatParticipantId"),c.nI1(3,"async"),c.nI1(4,"translate"),c.k0s()),2&S){const F=c.XpG();c.R7$(),c.Lme(" ",c.bMT(3,4,c.bMT(2,2,F.chat.typing))," ",c.bMT(4,6,"_i18n.UserTyping")," ")}}function pt(S,k){if(1&S&&c.nrm(0,"delivered-check",18),2&S){const F=c.XpG(2);c.AVh("svg-sm",F.isNewDesign()),c.Y8G("mes",F.chat.lastMessageObject)}}function q(S,k){1&S&&c.nrm(0,"show-svg-images",16),2&S&&c.Y8G("svg",k)}function st(S,k){if(1&S&&(c.j41(0,"div",13),c.nVh(1,pt,1,3,"delivered-check",14),c.j41(2,"div",15),c.nVh(3,q,1,1,"show-svg-images",16),c.nrm(4,"small",17),c.nI1(5,"translateSystemMessage"),c.nI1(6,"async"),c.nI1(7,"translateSystemMessage"),c.nI1(8,"async"),c.k0s()()),2&S){let F;const U=c.XpG();c.AVh("flex-row-reverse",U.isNewDesign()),c.R7$(),c.vxM(U.chat.isLastMessageMine&&U.chat.lastMessageObject.showDeliveryStatus?1:-1),c.R7$(2),c.vxM((F=U.chat.lastMessageObject.messageIcon)?3:-1,F),c.R7$(),c.AVh("fw-bold",U.chat.hasUnread&&!U.isNewDesign()),c.Y8G("title",c.bMT(6,12,c.brH(5,8,U.chat.lastMessageObject,!1,!0)))("innerHTML",c.bMT(8,16,c.bMT(7,14,U.chat.lastMessageObject)),c.npT)}}function rt(S,k){1&S&&(c.j41(0,"small",9),c.EFF(1),c.nI1(2,"translate"),c.k0s()),2&S&&(c.R7$(),c.JRh(c.bMT(2,1,"_i18n.Archive")))}function mt(S,k){if(1&S&&c.nrm(0,"app-counter-badge",10),2&S){const F=c.XpG();c.Y8G("count",F.chat.unreadCount)}}function tt(S,k){if(1&S){const F=c.RV6();c.j41(0,"button",19),c.nI1(1,"translate"),c.bIt("click",function(B){a.eBV(F);const Y=c.XpG();return a.Njj(Y.callClick$.next(B))}),c.nrm(2,"lucide-icon",20),c.k0s()}if(2&S){const F=c.XpG();c.Y8G("title",c.bMT(1,2,"_i18n.MakeCall")),c.R7$(2),c.Y8G("img",F.phoneCallIcon)}}function it(S,k){if(1&S){const F=c.RV6();c.j41(0,"button",21),c.nI1(1,"translate"),c.bIt("click",function(B){a.eBV(F);const Y=c.XpG();return a.Njj(Y.menuClick$.next(B))}),c.nrm(2,"lucide-icon",22),c.k0s()}if(2&S){const F=c.XpG();c.Y8G("title",c.bMT(1,2,"_i18n.ShowMore")),c.R7$(2),c.Y8G("img",F.EllipsisVertical)}}let X=(()=>{class S{chat;hideUnread;showCallAction=!1;menuClick$=new x.B;callClick$=new x.B;menuClick=(0,T.p)(this.menuClick$);callClick=(0,T.p)(this.callClick$);
1isNewDesign=(0,a.WQX)(y.T);EllipsisVertical=A.YbC;phoneCallIcon=A.d3s;static \u0275fac=function(U){return new(U||S)};static \u0275cmp=c.VBU({type:S,selectors:[["chat-item"]],inputs:{chat:"chat",hideUnread:"hideUnread",showCallAction:"showCallAction"},outputs:{menuClick:"menuClick",callClick:"callClick"},decls:17,vars:20,consts:[[1,"me-0",3,"title","ext","size"],[1,"chat-content"],[1,"d-flex","gap-1","align-items-center","overflow-hidden"],[1,"provider",3,"provider"],["data-qa","header-name",1,"text-truncate",3,"truncatedText"],["format","dateOrTime","data-qa","last-sent",1,"flex-shrink-0","ms-auto","me-2",3,"appDateTime"],[1,"d-flex","align-items-center","gap-2"],[1,"user-typing","text-truncate","flex-1"],[1,"last-text","flex-1",3,"flex-row-reverse"],["data-qa","chat-archive",1,"badge","bg-tiles","archive-badge"],["data-qa","chat-unread",1,"bg-brand",3,"count"],["type","button","data-qa","call-btn",1,"btn","btn-plain-sm","btn-icon",3,"title"],["type","button","data-qa","showMore",1,"btn","btn-plain-sm","btn-icon","ms-auto",3,"title"],[1,"last-text","flex-1"],[1,"delivery-check",3,"svg-sm","mes"],[1,"d-flex","align-items-center","gap-1","flex-1","mw-0"],[3,"svg"],["data-qa","message-text",1,"text-truncate",3,"title","innerHTML"],[1,"delivery-check",3,"mes"],["type","button","data-qa","call-btn",1,"btn","btn-plain-sm","btn-icon",3,"click","title"],[3,"img"],["type","button","data-qa","showMore",1,"btn","btn-plain-sm","btn-icon","ms-auto",3,"click","title"],[1,"filled",3,"img"]],template:function(U,B){1&U&&(c.nrm(0,"app-avatar",0),c.nI1(1,"translate"),c.j41(2,"div",1)(3,"div",2),c.nrm(4,"provider-image",3)(5,"span",4),c.nI1(6,"chatTitle"),c.nI1(7,"async"),c.nI1(8,"translate"),c.nrm(9,"small",5),c.k0s(),c.j41(10,"div",6),c.nVh(11,G,5,8,"small",7)(12,st,9,18,"div",8),c.nVh(13,rt,3,3,"small",9)(14,mt,1,1,"app-counter-badge",10),c.nVh(15,tt,3,4,"button",11),c.nVh(16,it,3,4,"button",12),c.k0s()()),2&U&&(c.Y8G("title",B.chat.isGroupChat?c.bMT(1,12,"_i18n.GroupChatDescription"):"")("ext",null==B.chat||null==B.chat.destination?null:B.chat.destination.contact)("size",B.isNewDesign()?"s":"m"),c.R7$(4),c.Y8G("provider",B.chat.destination.provider),c.R7$(),c.AVh("fw-bold",B.isNewDesign()),c.Y8G("truncatedText",c.bMT(8,18,c.bMT(7,16,c.bMT(6,14,B.chat)))),c.R7$(4),c.Y8G("appDateTime",B.chat.lastSended),c.R7$(2),c.vxM(B.chat.typing?11:B.chat.lastMessageObject?12:-1),c.R7$(2),c.vxM(B.chat.isArchived?13:!B.hideUnread&&B.chat.unreadCount?14:-1),c.R7$(2),c.vxM(B.showCallAction&&B.callClick$.observed?15:-1),c.R7$(),c.vxM(B.menuClick$.observed?16:-1))},dependencies:[h.f,m.E,l.I,t.N,I.kq,f.h,A.flO,A.WGl,d.d,H._,s.Jj,u.D9,_.b,E.H,C.n],styles:["[_nghost-%COMP%]{display:flex;width:100%;gap:var(--spacer-s);align-items:center;border-radius:var(--border-radius)}.avatar-style-square   [_nghost-%COMP%]{border-bottom:1px solid var(--border-color)}.new-design   [_nghost-%COMP%]{border:none}.chat-content[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:2px;align-items:stretch;overflow:hidden}.last-text[_ngcontent-%COMP%]{display:flex;align-items:center;column-gap:var(--spacer-xs);overflow:hidden}.archive-badge[_ngcontent-%COMP%]{border:1px solid var(--border-color);color:inherit;text-shadow:none;font-weight:400}.archive-badge[_ngcontent-%COMP%], app-counter-badge[_ngcontent-%COMP%], .btn-icon[_ngcontent-%COMP%], delivered-check[_ngcontent-%COMP%]{flex-shrink:0}.new-design   [_nghost-%COMP%]{padding:var(--spacer-s);min-height:60px;--svg-color: var(--text-hint)}.new-design   [_nghost-%COMP%]   .chat-content[_ngcontent-%COMP%]{gap:0}.new-design   [_nghost-%COMP%]   small[_ngcontent-%COMP%]{color:var(--text-hint)}.new-design   [_nghost-%COMP%]   .last-text[_ngcontent-%COMP%]{line-height:20px}.new-design   [_nghost-%COMP%]   .archive-badge[_ngcontent-%COMP%], .new-design   [_nghost-%COMP%]   .user-typing[_ngcontent-%COMP%]{border:none;padding:var(--spacer-xs) var(--spacer-s);border-radius:var(--border-radius)}"],changeDetection:0})}return S})()},46007(R,g,e){e.d(g,{b:()=>u});var a=e(85802),h=e(16444),m=e(96354),l=e(25558),d=e(31390),s=e(35547);let u=(()=>{class _{service=(0,a.WQX)(h.gx);transform(C){return this.service.myPhoneSession.pipe((0,l.n)(y=>y.systemParameters$),(0,m.T)(y=>(0,d.V)(y,C)))}static \u0275fac=function(y){return new(y||_)};static \u0275pipe=s.EJ8({name:"chatParticipantId",type:_,pure:!0})}return _})()},24147(R,g,e){e.d(g,{I:()=>x});var a=e(85802),h=e(1211),m=e(68018),l=e(8516),d=e(58689),s=e(35547);function u(T,I){if(1&T&&(s.nrm(0,"lucide-icon",0),s.nI1(1,"translate")),2&T){const f=s.XpG(2);s.Y8G("img",f.Check)("title",s.bMT(1,2,"_i18n.Message_was_not_delivered"))}}function _(T,I){if(1&T&&(s.nrm(0,"lucide-icon",1),s.nI1(1,"translate")),2&T){const f=s.XpG(2);s.Y8G("img",f.CircleAlert)("title",s.bMT(1,2,"_i18n.Message_failed"))}}function E(T,I){if(1&T&&(s.nrm(0,"lucide-icon",2),s.nI1(1,"translate")),2&T){const f=s.XpG(3);s.Y8G("img",f.CheckCheck)("title",s.bMT(1,2,"_i18n.Message_read"))}}function C(T,I){if(1&T&&(s.nrm(0,"lucide-icon",0),s.nI1(1,"translate")),2&T){const f=s.XpG(3);s.Y8G("img",f.CheckCheck)("title",s.bMT(1,2,"_i18n.Message_delivered"))}}function y(T,I){if(1&T&&s.nVh(0,E,2,4,"lucide-icon",2)(1,C,2,4,"lucide-icon",0),2&T){const f=s.XpG(2);s.vxM(f.mes.isRead?0:1)}}function t(T,I){if(1&T&&s.nVh(0,u,2,4,"lucide-icon",0)(1,_,2,4,"lucide-icon",1)(2,y,2,1),2&T){let f;const A=s.XpG();s.vxM((f=A.mes.messageMainStatus)===A.Delivery.CDS_NotDelivered?0:f===A.Delivery.CDS_Failed?1:f===A.Delivery.CDS_Delivered?2:-1)}}let x=(()=>{class T{isNewDesign=(0,a.WQX)(d.T);mes;Delivery=h.XfZ;CheckCheck=l.frJ;Check=l.Jlk;CircleAlert=l.H5B;static \u0275fac=function(A){return new(A||T)};static \u0275cmp=s.VBU({type:T,selectors:[["delivered-check"]],inputs:{mes:"mes"},decls:1,vars:1,consts:[[3,"img","title"],[1,"fillIconRed",3,"img","title"],[1,"fillIconBlueVariant",3,"img","title"]],template:function(A,H){1&A&&s.nVh(0,t,3,1),2&A&&s.vxM(H.mes&&H.mes.showDeliveryStatus?0:-1)},dependencies:[l.flO,l.WGl,m.D9],styles:["[_nghost-%COMP%]{--svg-color: var(--text-hint);--svg-size: var(--font-size);&:empty{display:none}}"]})}return T})()},82869(R,g,e){e.d(g,{n:()=>s});var a=e(85802),h=e(31251),m=e(68018),l=e(7673),d=e(35547);let s=(()=>{class u{translateService=(0,a.WQX)(m.c$);
1transform(E,C,y){if(!E)return(0,l.of)("");let t;return t=y?E.UnsafeMessage:C?E.messageLinkified:E.messageEmojified,(0,h.Iz)(this.translateService,E,t,!0)}static \u0275fac=function(C){return new(C||u)};static \u0275pipe=d.EJ8({name:"translateSystemMessage",type:u,pure:!0})}return u})()},44724(R,g,e){e.d(g,{j:()=>s});var a=e(18530),h=e(84412),m=e(92771),l=e(33916),d=e(85802);let s=(()=>{class u{conversationWasTaken$=new a.B;error$=new m.m(1);selectedChatFolder$=new h.t(l.l.None);static \u0275fac=function(C){return new(C||u)};static \u0275prov=d.jDH({token:u,factory:u.\u0275fac})}return u})()},33916(R,g,e){e.d(g,{l:()=>a});var a=function(h){return h.None="main",h.ArchiveMenu="archive",h.Monitor="monitor",h}(a||{})},35437(R,g,e){e.d(g,{C:()=>m});var a=e(84412),h=e(85802);let m=(()=>{class l{selectedChatId;filterText$;constructor(){this.filterText$=new a.t("")}static \u0275fac=function(u){return new(u||l)};static \u0275prov=h.jDH({token:l,factory:l.\u0275fac})}return l})()},38666(R,g,e){e.d(g,{L:()=>h});var a=e(7673);class h{state;constructor(l){this.state=l}updateChatList(l){return(0,a.of)(l.map(d=>d.id===this.state.IdConversation?this.updateChat(d):d))}updateChat(l){return l.merge({closeReason:this.state.CloseReason,participants:l.participants.merge({items:l.participants.items.map(d=>(d.isExternal&&d.contact.setContactProfile(!1),d))})})}}},20836(R,g,e){e.d(g,{Hx:()=>St,vL:()=>Ct,QW:()=>Et,zh:()=>lt,vO:()=>K});var a=e(57786),h=e(7673),m=e(1807),l=e(18530),d=e(84572),s=e(983),u=e(44437),_=e(19724),E=e(85802),C=e(16444),y=e(94014),t=e(1211),x=e(71985),T=e(58750),I=e(39974),f=e(54360);var H=e(73028),c=e(25558),G=e(96354),pt=e(63489),q=e(99172),st=e(53993),rt=e(99437),mt=e(44668),tt=e(70274),it=e(96697),X=e(5964),S=e(25174),k=e(44915),F=e(72339),U=e(68739);class B{typingChat;timeExpired;constructor(D,M){this.typingChat=D,this.timeExpired=M}updateChatList(D){return(0,h.of)(this.timeExpired?this.unMarkTyping(D):this.markTyping(D))}updateChat(D){return this.timeExpired?this.deleteTyping(D):this.markChatTyping(D)}markTyping(D){return D.map(M=>M.id===this.typingChat.IdConversation?this.markChatTyping(M):M)}markChatTyping(D){return D.merge({typing:D.isOverallGroupChat?D.getParticipant(this.t
1ypingChat.IdRecipient)?.contact??U.a3:U.a3})}deleteTyping(D){return D.merge({typing:void 0})}unMarkTyping(D){return D.map(M=>M.id===this.typingChat.IdConversation?this.deleteTyping(M):M)}}var Y=e(38666),vt=e(70329),z=e(63034);class N{chats;constructor(D){this.chats=D}updateChatList(D){return(0,h.of)(this.chats)}}var ut=e(83762),_t=e(35437),ct=e(78534),Mt=e(44724),Dt=e(79804),yt=e(7211),Pt=e(33916),ot=e(20039);function Et(L,D){return L.LastMessages.map(M=>{const v=L.Participants.find($=>$.IdConversation===M.IdConversation);return v?y.ry.FromPartyInfo(v,D,M):void 0}).filter(ut.z2)}function K(L){return L.sort((D,M)=>D.lastSended&&M.lastSended?M.lastSended.getTime()-D.lastSended.getTime():0)}const Ct=()=>L=>L.pipe(function A(L,D,M,v){return(0,I.N)(($,O)=>{let j;D&&"function"!=typeof D?({duration:M,element:j,connector:v}=D):j=D;const w=new Map,et=Q=>{w.forEach(Q),Q(O)},Tt=Q=>et(J=>J.error(Q));let ft=0,It=!1;const gt=new f.H(O,Q=>{try{const J=L(Q);let Z=w.get(J);if(!Z){w.set(J,Z=v?v():new l.B);const dt=function bt(Q,J){const Z=new x.c(dt=>{ft++;const nt=J.subscribe(dt);return()=>{nt.unsubscribe(),0===--ft&&It&&gt.unsubscribe()}});return Z.key=Q,Z}(J,Z);if(O.next(dt),M){const nt=(0,f._)(Z,()=>{Z.complete(),nt?.unsubscribe()},void 0,void 0,()=>w.delete(J));gt.add((0,T.Tg)(M(dt)).subscribe(nt))}}Z.next(j?j(Q):Q)}catch(J){Tt(J)}},()=>et(Q=>Q.complete()),Tt,()=>w.clear(),()=>(It=!0,0===ft));$.subscribe(gt)})}(D=>D.IdConversation),(0,H.Z)(D=>D.pipe((0,c.n)(M=>(0,a.h)((0,h.of)(new B(M)),(0,m.O)(2100).pipe((0,G.T)(()=>new B(M,!0)))))))),lt=L=>D=>D.pipe((0,pt.i)((M,v)=>v instanceof Array?(0,h.of)([...M,...v.filter($=>!M.find(O=>O.id===$.id))]):v.updateChatList(M),L.chats.toArray()),(0,G.T)(M=>new ct.G({chats:(0,ot.B8)(K(M)),serverResponse:!0})),(0,q.Z)(L));let St=(()=>{class L{myPhoneSvc=(0,E.WQX)(C.gx);chatEventsService=(0,E.WQX)(Mt.j);chatSearchService=(0,E.WQX)(_t.C);unreadChatNotificationService=(0,E.WQX)(z.O);
1loadMoreChats$=new l.B;chatRemoved$;chatsList$;constructor(){this.chatRemoved$=this.myPhoneSvc.myPhoneSession.pipe((0,c.n)(v=>v.conversationRemoved$),(0,G.T)(v=>v.IdConversation)),this.chatsList$=(0,d.z)([this.myPhoneSvc.myPhoneSession,this.myPhoneSvc.myPhoneSession.pipe((0,c.n)(v=>v.chatIsAllowed$))]).pipe((0,c.n)(([v,$])=>$?this.leftBarChatActions(v).pipe(lt(new ct.G),(0,st.E)(this.chatSearchService.filterText$,this.chatEventsService.selectedChatFolder$),(0,G.T)(([O,j,w])=>O.merge({searchText:j,chats:O.chats.filter(et=>et.isArchived===(w===Pt.l.ArchiveMenu))}))):(0,h.of)(new ct.G({serverResponse:!0}))),(0,q.Z)(new ct.G),(0,rt.W)(v=>(this.chatEventsService.error$.next(v),s.w)),(0,mt.t)({refCount:!0,bufferSize:1}))}leftBarChatActions(M){return(0,a.h)(M.contactUpdated$.pipe((0,G.T)(v=>new yt.f(v))),M.newChatMessages$.pipe((0,tt.H)(v=>{const $=v.map(O=>O.IdConversation).filter((O,j,w)=>w.indexOf(O)===j).map(O=>this.getChatById(O).pipe((0,it.s)(1)));return(0,u.y)(...$).pipe((0,G.T)(O=>new S.s(v,O)),(0,rt.W)(O=>(console.warn(O),s.w)))})),M.unreadChatCount$.pipe((0,G.T)(v=>new k.F(v))),M.anonymousSessionClosed.pipe((0,G.T)(v=>new Y.L(v))),M.chatTransferred$.pipe((0,G.T)(v=>new vt.u(!1,v.PartyInfo,M,!0))),M.conversationRemoved$.pipe((0,G.T)(v=>new F.N(v.IdConversation))),M.conversationInfo$.pipe((0,G.T)(v=>new vt.u(v.IsNew,v.Conversation,M))),M.chatMessageState$.pipe((0,G.T)(v=>new Dt.x(v))),(0,d.z)([this.chatEventsService.selectedChatFolder$,this.chatSearchService.filterText$,this.loadMoreChats$]).pipe((0,c.n)(([v,$,O])=>this.unreadChatNotificationService.unreadMessagesCount$.pipe((0,it.s)(1),(0,c.n)(j=>{const w=new t.SDV({IsArchived:v===Pt.l.ArchiveMenu,SearchString:$?`%${$}%`:"",Count:O.count,From:O.from});return function Ot(L,D,M){return L.get(D).pipe((0,G.T)(v=>K(Et(v,L).map(j=>{const w=M.Items.find(et=>et.IdConversation===j.id);return w?j.merge({unreadCount:w.Count}):j}))))}(M,w,j)}),(0,G.T)(j=>0===O.from?new N(j):j)))),M.userTyping$.pipe(Ct()))}getConversationByID(M){const v=new t.$RH;return v.IdConversation=M,this.myPhoneSvc.get(v).pipe((0,G.T)($=>$))}getChatById(M){return this.chatsList$.pipe((0,it.s)(1),(0,G.T)(v=>v.chats.find($=>$.id===M)),(0,c.n)(v=>v?(0,_.H)([v]):this.requestNewChat(M)))}requestNewChat(M){return this.myPhoneSvc.myPhoneSession.pipe((0,c.n)(v=>this.myPhoneSvc.myPhoneSession.pipe((0,c.n)($=>$.chatIsAllowed$),(0,c.n)($=>(0,h.of)($).pipe((0,X.p)(O=>O),(0,c.n)(()=>this.getConversationByID(M).pipe((0,X.p)(O=>!!O.Conversation),(0,G.T)(O=>y.ry.FromPartyInfo(O.Conversation,v)))))))))}static \u0275fac=function(v){return new(v||L)};static \u0275prov=E.jDH({token:L,factory:L.\u0275fac})}return L})()},78534(R,g,e){e.d(g,{G:()=>m,I:()=>l});var a=e(85802),h=e(20039);class m extends((0,h.mS)({searchText:"",serverResponse:!1,chats:(0,h.B8)()})){}const l=new a.nKC("CHAT_LIST_SERVICE")},7211(R,g,e){e.d(g,{f:()=>m});var a=e(68739),h=e(7673);class m{contact;appContact;constructor(d){this.contact=d,this.appContact=a.KA.create(d)}updateChatList(d){return(0,h.of)(d.map(s=>this.updateChat(s)))}updateChat(d){let s=!1;const u=d.participants.merge({items:d.participants.items.map(_=>{if(_.contact.id===this.appContact.id&&_.contact.type===this.appContact.type){s=!0;const E=new a.KA(this.appContact.id,this.appContact.type,this.appContact.bridgeId,this.appContact);return Object.assign(E.currentProfile,_.contact.currentProfile),E.forceShowProfile=_.contact.forceShowProfile,_.merge({contact:E})}return _})});return s?d.merge({participants:u}):d}}},44915(R,g,e){e.d(g,{F:()=>h});var a=e(7673);class h{unreadParties;constructor(l){this.unreadParties=l}updateChatList(l){let d;return d=l.map(this.unreadParties&&0!==this.unreadParties.length?s=>{const u=this.unreadParties.find(_=>_.IdConversation===s.id);return this.updateParty(u?u.Count:0,s)}:s=>this.updateParty(0,s)),(0,a.of)(l=d)}updateParty(l,d){return d.merge({hasUnread:l>0,unreadCount:l})}}},79804(R,g,e){e.d(g,{g:()=>h,x:()=>m});var a=e(7673);function h(l,d){return d.IdMessage.includes(l.Id)?l.merge({Participants:l.Participants.map(s=>s.IdRecipient===d.RecipientStatus.IdRecipient?d.RecipientStatus:s)}):l}class m{state;constructor(d){this.state=d}updateChatList(d){return(0,a.of)(d.map(s=>s.lastMessageObject?s.merge({lastMessageObject:h(s.lastMessageObject,this.state)}):s))}}},25174(R,g,e){e.d(g,{s:()=>h});var a=e(7673);class h{newMessages;messageChats;constructor(l,d){this.newMessages=l,this.messageChats=d}updateChat(l){return this.updateLastMessage(l,this.newMessages,!0)}updateLastMessage(l,d,s){const u=this.newMessages.reduce((E,C)=>C.Id>E.Id?C:E,d[0]);l=l.merge({id:u.IdConversation,isArchived:!1,lastSended:new Date,lastMessageObject:u});const _=d.filter(E=>E.IsNew);
1return u.IsNew&&(l=l.merge({hasUnread:!s,unreadCount:l.unreadCount?l.unreadCount+_.length:_.length})),l}updateChatList(l){const d=this.messageChats?.filter(s=>!l.some(u=>u.id===s.id))??[];return d.length>0&&(l=l.concat(d)),(0,a.of)(this.updateMessages(l,this.newMessages))}updateMessages(l,d){return l.map(s=>{const u=d.filter(_=>_.IdConversation===s.id);return u&&u.length>0&&(s=this.updateLastMessage(s,u)),s})}}},53154(R,g,e){e.d(g,{SI:()=>m,Tw:()=>E,oK:()=>C});var a=e(68173);const h=[(0,a.iF)({left:"100%"}),(0,a.i0)("200ms ease-in-out",(0,a.iF)({left:"0%"}))],m=[(0,a.iF)({left:"0%"}),(0,a.i0)("200ms ease-in-out",(0,a.iF)({left:"100%"}))],l=[(0,a.iF)({left:"0%"}),(0,a.i0)("200ms ease-in-out",(0,a.iF)({left:"-100%"}))],d=[(0,a.iF)({left:"-100%"}),(0,a.i0)("200ms ease-in-out",(0,a.iF)({left:"0%"}))],s=[(0,a.P)(":enter",h,{optional:!0}),(0,a.P)(":leave",m,{optional:!0})],u=[(0,a.Os)([(0,a.P)(":enter",h),(0,a.P)(":leave",l)])],_=[(0,a.Os)([(0,a.P)(":enter",d),(0,a.P)(":leave",m)])],E=(0,a.hZ)("routeAnimations",[(0,a.kY)("void <=> *",[]),(0,a.kY)("root <=> *",s),(0,a.kY)("chat => *",u),(0,a.kY)("* => chat",_)]),C=(0,a.hZ)("routeAnimations",[(0,a.kY)("void <=> *",[]),(0,a.kY)("root <=> *",s)])},31335(R,g,e){e.d(g,{L:()=>m});var a=e(85802),h=e(81535);let m=(()=>{class l{breakpointObserver=(0,a.WQX)(h.Q);prepareRoute(s){return this.breakpointObserver.isMatched("screen and (max-width: 767px)")?(s&&s.activatedRouteData&&s.activatedRouteData.animation)??"root":"root"}static \u0275fac=function(u){return new(u||l)};static \u0275prov=a.jDH({token:l,factory:l.\u0275fac})}return l})()},42268(R,g,e){e.d(g,{n:()=>t});var a=e(40720),h=e(5739),m=e(74743),l=e(49769),d=e(68018),s=e(35547);const u=x=>({contacts:x});function _(x,T){if(1&x&&s.nrm(0,"span",2),2&x){const I=s.XpG(3);s.Y8G("title",I.crm.error)}}function E(x,T){1&x&&s.nrm(0,"span",3)}function C(x,T){if(1&x&&(s.j41(0,"div",0)(1,"span"),s.EFF(2),s.nI1(3,"translate"),s.k0s(),s.nVh(4,_,1,1,"span",2),s.nVh(5,E,1,0,"span",3),s.k0s()),2&x){const I=s.XpG(2);s.R7$(2),s.JRh(s.bMT(3,3,"_i18n.CRM")),s.R7$(2),s.vxM("error"===I.crm.status?4:-1),s.R7$(),s.vxM("loading"===I.crm.status?5:-1)}}function y(x,T){if(1&x&&(s.nVh(0,C,6,5,"div",0),s.eu8(1,1)),2&x){const I=s.XpG();s.vxM("error"===I.crm.status||"loading"===I.crm.status||I.crm.contacts.length>0?0:-1),s.R7$(),s.Y8G("ngTemplateOutlet",I.content.templateRef)("ngTemplateOutletContext",s.eq3(3,u,I.crm.contacts))}}let t=(()=>{class x{crm;content;static \u0275fac=function(f){return new(f||x)};static \u0275cmp=s.VBU({type:x,selectors:[["app-crm-contacts"]],contentQueries:function(f,A,H){if(1&f&&s.wni(H,a.E,5),2&f){let c;s.mGM(c=s.lsd())&&(A.content=c.first)}},inputs:{crm:"crm"},decls:1,vars:1,consts:[[1,"crm-tile","d-flex","align-items-center","p-3","gap-2"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["app-exclamation-circle-solid-icon","",1,"customSVGIcons","fillIconRed","svg-sm",3,"title"],["app-spinner-regular-icon","",1,"customSVGIcons","svg-sm"]],template:function(f,A){1&f&&s.nVh(0,y,2,5),2&f&&s.vxM(A.crm&&"unavailable"!==A.crm.status?0:-1)},dependencies:[h.b,m.a,l.T3,d.D9],encapsulation:2,changeDetection:0})}return x})()},40720(R,g,e){e.d(g,{E:()=>m});var a=e(35547),h=e(85802);let m=(()=>{class l{templateRef=(0,h.WQX)(a.C4Q);static \u0275fac=function(u){return new(u||l)};static \u0275dir=a.FsC({type:l,selectors:[["","appCrmContactsRef",""]]})}return l})()},22429(R,g,e){e.d(g,{D:()=>u});var a=e(17705),h=e(35547),m=e(85802),l=e(33726),d=e(70152);let u=(()=>{class _{zone=(0,m.WQX)(m.SKi);infiniteScrollCallback=(0,a.CGW)();infiniteScrollContainer;infiniteScrollDistance=0;infiniteScrollDisabled=!1;infiniteScrollUseDocumentBottom=!1;infiniteScrollListenForEvent;zeroBased=!1;infiniteScrollParent=!1;infiniteScrollImmediateCheck=!1;elem;windowElement=window;scrollEnabled=null;checkWhenEnabled=null;container=null;scrollSubscription;sizeCheckInterval;hostProps={width:0,height:0};height(C){return isNaN(C.offsetHeight)?C.document.documentElement.clientHeight:C.offsetHeight}pageYOffset(C){return isNaN(window.scrollY)?C.document.documentElement.scrollTop:C.ownerDocument.defaultView.scrollY}offsetTop(C){if(C.getBoundingClientRect)return C.getBoundingClientRect().top+this.pageYOffset(C)}defaultHandler(){let C=0,y=0;if(this.container===this.windowElement)C=this.height(this.container)+this.pageYOffset(this.container[0].document.documentElement),y=this.offsetTop(this.elem)+this.height(this.elem);
1else{C=this.height(this.container);let T=0;void 0!==this.offsetTop(this.container)&&(T=this.offsetTop(this.container)),y=this.offsetTop(this.elem)-T+this.height(this.elem)}this.infiniteScrollUseDocumentBottom&&(y=this.height((this.elem[0].ownerDocument||this.elem[0].document).documentElement)),y-C<=this.height(this.container)*this.infiniteScrollDistance+(this.zeroBased?0:1)?(this.checkWhenEnabled=!0,this.scrollEnabled&&this.infiniteScrollCallback.emit()):this.checkWhenEnabled=!1}handleInfiniteScrollDisabled(C){this.scrollEnabled=!C,this.scrollEnabled&&this.checkWhenEnabled&&(this.checkWhenEnabled=!1)}changeContainer(C){void 0!==this.scrollSubscription&&(this.scrollSubscription.unsubscribe(),this.scrollSubscription=void 0),this.container=C,null!=C&&(this.scrollSubscription=(0,l.R)(C,"scroll").pipe((0,d.B)(300)).subscribe(y=>this.defaultHandler()))}handleInfiniteScrollContainer(C){if(null==C||0===C.length)return;const y=this.elem.closest(C);if(null==y)throw new Error("invalid infinite-scroll-container attribute.");this.changeContainer(y)}constructor(){const C=(0,m.WQX)(h.aKT);this.elem=C.nativeElement}ngOnChanges(C){C.infiniteScrollDisabled&&this.handleInfiniteScrollDisabled(this.infiniteScrollDisabled),C.infiniteScrollContainer&&this.handleInfiniteScrollContainer(this.infiniteScrollContainer||[])}ngAfterViewInit(){this.handleInfiniteScrollDisabled(this.infiniteScrollDisabled),this.handleInfiniteScrollContainer(this.infiniteScrollContainer||this.windowElement)}ngAfterContentInit(){const C=()=>{const y=this.elem.offsetHeight,t=this.elem.offsetWidth;(y!==this.hostProps.height||t!==this.hostProps.width)&&(this.hostProps={width:t,height:y},this.zone.run(()=>{this.defaultHandler()}))};setTimeout(()=>{C(),this.sizeCheckInterval=this.zone.runOutsideAngular(()=>setInterval(C,300))})}ngOnDestroy(){void 0!==this.scrollSubscription&&this.scrollSubscription.unsubscribe(),clearInterval(this.sizeCheckInterval)}static \u0275fac=function(y){return new(y||_)};static \u0275dir=h.FsC({type:_,selectors:[["","infiniteScroll",""]],inputs:{infiniteScrollContainer:"infiniteScrollContainer",infiniteScrollDistance:"infiniteScrollDistance",infiniteScrollDisabled:"infiniteScrollDisabled",infiniteScrollUseDocumentBottom:"infiniteScrollUseDocumentBottom",infiniteScrollListenForEvent:"infiniteScrollListenForEvent",zeroBased:"zeroBased",infiniteScrollParent:"infiniteScrollParent",infiniteScrollImmediateCheck:"infiniteScrollImmediateCheck"},outputs:{infiniteScrollCallback:"infiniteScrollCallback"},features:[h.OA$]})}return _})()},72252(R,g,e){e.d(g,{U:()=>l});var a=e(68018),h=e(12834),m=e(35547);let l=(()=>{class d{static \u0275fac=function(_){return new(_||d)};static \u0275cmp=m.VBU({type:d,selectors:[["app-mobile-close-button"]],hostAttrs:[1,"d-md-none"],decls:2,vars:3,consts:[["data-qa","mobile-close-btn",3,"title"]],template:function(_,E){1&_&&(m.nrm(0,"app-button-close-x",0),m.nI1(1,"translate")),2&_&&m.Y8G("title",m.bMT(1,1,"_i18n.GoBack"))},dependencies:[h.W,a.D9],encapsulation:2,changeDetection:0})}return d})()},94579(R,g,e){e.d(g,{_:()=>x});var a=e(17705),h=e(35547),m=e(85802),l=e(32271),d=e(67374),s=e.n(d),u=e(68018),_=e(89079),E=e(84572),C=e(96354),y=e(25558),t=e(85372);let x=(()=>{class T{translate=(0,m.WQX)(u.c$);el=(0,m.WQX)(h.aKT);appDateTime=a.hFB.required();format=(0,a.hFB)("dateOrTime");datePart=(0,l.EW)(()=>(0,t.P)(this.appDateTime(),"dateOrTime"===this.format()));timePart=(0,l.EW)(()=>{const f=this.appDateTime();return"dateAndTime"===this.format()?" "+s()(f).format("LT"):""});text=(0,_.ot)((0,E.z)([(0,_.br)(this.datePart),(0,_.br)(this.timePart)]).pipe((0,y.n)(([f,A])=>this.translate.stream(f).pipe((0,C.T)(H=>H+A)))));constructor(){(0,m.QZP)(()=>{this.el.nativeElement.title=s()(this.appDateTime()).format("L LT")}),(0,m.QZP)(()=>{this.el.nativeElement.textContent=this.text()})}ngAfterViewInit(){this.el.nativeElement.classList.add("text-truncate")}static \u0275fac=function(A){return new(A||T)};static \u0275dir=h.FsC({type:T,selectors:[["","appDateTime",""]],inputs:{appDateTime:[1,"appDateTime"],format:[1,"format"]}})}return T})()},81546(R,g,e){e.d(g,{f:()=>m});var a=e(39974),h=e(85412);function m(l,d=1/0,s){return d=(d||0)<1?1/0:d,(0,a.N)((u,_)=>(0,h.h)(u,_,l,d,void 0,!0,s))}},64058(R,g,e){e.d(g,{$:()=>d});var a=e(46649),h=e(39974);const l=(s,u)=>(s.push(u),s);function d(){return(0,h.N)((s,u)=>{(function m(s,u){return(0,h.N)((0,a.S)(s,u,arguments.length>=2,!1,!0))})(l,[])(s).subscribe(u)})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.