1"use strict";(self.webpackChunkwebclient_webpack=self.webpackChunkwebclient_webpack||[]).push([[6004],{43636(O,S,l){l.d(S,{s:()=>d});class d{cd;disabled=!1;touched=!1;onChange=a=>{};onTouched=()=>{};constructor(a){this.cd=a}registerOnChange(a){this.onChange=a}registerOnTouched(a){this.onTouched=a}markAsTouched(a=!1){(!this.touched||a)&&(this.onTouched(),this.touched=!0),this.cd.markForCheck()}setDisabledState(a){this.disabled=a,this.cd.markForCheck()}onBlur(a){this.markAsTouched(!0)}}},4187(O,S,l){l.d(S,{c:()=>x});var d=l(2275),m=l(95604),a=l(35547);let x=(()=>{class b{label;inlineLabel;url;showIcon=!0;showActionText;actionText="_i18n.DisplayCopy";static \u0275fac=function(P){return new(P||b)};static \u0275cmp=a.VBU({type:b,selectors:[["app-copy-url"]],hostAttrs:[1,"form-input"],inputs:{label:"label",inlineLabel:"inlineLabel",url:"url",showIcon:"showIcon",showActionText:"showActionText",actionText:"actionText"},decls:4,vars:8,consts:[["data-qa","copy-url",1,"mb-0",3,"label","inlineLabel"],[1,"link",3,"source","showIcon","showActionText","actionText"],["target","_blank","data-qa","link",1,"link",3,"href"]],template:function(P,_){1&P&&(a.j41(0,"field-wrapper",0)(1,"app-simple-copy",1)(2,"a",2),a.EFF(3),a.k0s()()()),2&P&&(a.Y8G("label",_.label)("inlineLabel",_.inlineLabel),a.R7$(),a.Y8G("source",_.url)("showIcon",_.showIcon)("showActionText",_.showActionText)("actionText",_.actionText),a.R7$(),a.Y8G("href",_.url,a.B4B),a.R7$(),a.JRh(_.url))},dependencies:[m.z,d.T],encapsulation:2,changeDetection:0})}return b})()},87175(O,S,l){l.d(S,{O:()=>G});var d=l(17705),m=l(85802),a=l(43636),x=l(89417),b=l(72510),v=l(56998),h=l(76115),P=l(95604),_=l(8876),$=l(29912),g=l(35547);function e(y,M){if(1&y&&g.nrm(0,"show-svg-images",4),2&y){const C=g.XpG().item;g.Y8G("svg",C.flag)}}function T(y,M){if(1&y&&(g.j41(0,"div",3),g.nVh(1,e,1,1,"show-svg-images",4),g.j41(2,"span"),g.EFF(3),g.k0s()()),2&y){const C=M.item;g.R7$(),g.vxM(C.flag?1:-1),g.R7$(2),g.JRh(C.value??C.phoneSystemId)}}let G=(()=>{class y extends a.s{cd;languageList=h.xl;id=(0,v.bn)("language-select");label="_i18n.Language";langs;selectedLang;constructor(){const C=(0,m.WQX)(d.gRc);super(C),this.cd=C}compareFn(C,f){return 0===C.phoneSystemId.localeCompare(f)}valueChanged(C){this.markAsTouched(),this.onChange(C)}writeValue(C){this.selectedLang=C,this.cd.markForCheck()}static \u0275fac=function(f){return new(f||y)};static \u0275cmp=g.VBU({type:y,selectors:[["app-language-select"]],inputs:{label:"label",langs:"langs"},features:[g.Jv_([{provide:x.kq,multi:!0,useExisting:y}]),g.Vt3],decls:3,vars:8,consts:[["data-qa","language",3,"label","labelFor"],["bindLabel","value","bindValue","phoneSystemId","data-qa","select",3,"ngModelChange","clearable","ngModel","items","searchable","compareWith","id"],["ng-label-tmp","","ng-option-tmp",""],[1,"d-flex","align-items-center","gap-1"],[1,"d-flex","svg-lg",3,"svg"]],template:function(f,I){1&f&&(g.j41(0,"field-wrapper",0)(1,"ng-select",1),g.bIt("ngModelChange",function(me){return I.valueChanged(me)}),g.DNE(2,T,4,2,"ng-template",2),g.k0s()()),2&f&&(g.Y8G("label",I.label)("labelFor",I.id),g.R7$(),g.Y8G("clearable",!1)("ngModel",I.selectedLang)("items",I.langs??I.languageList)("searchable",!1)("compareWith",I.compareFn)("id",I.id))},dependencies:[x.YN,x.BC,x.vS,b.vr,P.z,_.c,$.d,b.ZZ,b.Uq],encapsulation:2,changeDetection:0})}return y})()},29325(O,S,l){l.d(S,{I:()=>e});var d=l(85802),m=l(68580),a=l(18530);let x=(()=>{class T{open=new a.B;static \u0275fac=function(M){return new(M||T)};static \u0275prov=d.jDH({token:T,factory:T.\u0275fac,providedIn:"root"})}return T})();var b=l(5964),v=l(89079),h=l(35547);let P=(()=>{class T{static \u0275fac=function(M){return new(M||T)};static \u0275cmp=h.VBU({type:T,selectors:[["app-ellipsis-v-solid-icon"],["","app-ellipsis-v-solid-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 32 32"],["d","M16 12.5a3.5 3.5 0 0 1 0 7 3.5 3.5 0 0 1 0-7zm-3.5-
17.583a3.5 3.5 0 0 0 7 0 3.5 3.5 0 0 0-7 0zm0 22.166a3.5 3.5 0 0 0 7 0 3.5 3.5 0 0 0-7 0z"]],template:function(M,C){1&M&&(d.qSk(),h.rj2(0,"svg",0),h.Hgh(1,"path",1),h.eux())},encapsulation:2})}return T})();const _=["dropdown"],$=["*"];function g(T,G){if(1&T){const y=h.RV6();h.j41(0,"ul",4),h.bIt("click",function(C){d.eBV(y);const f=h.XpG();return d.Njj(f.itemClicked(C))})("focusout",function(){d.eBV(y),h.XpG();const C=h.sdS(1);return d.Njj(C.hide())}),h.SdG(1),h.k0s()}}let e=(()=>{class T{actionButtonService=(0,d.WQX)(x);disabled;isLarge=!1;dropdown;clickOutside(){this.actionButtonService.open.next(null)}constructor(){const y=(0,d.WQX)(d.abz);this.actionButtonService.open.pipe((0,b.p)(()=>!!this.dropdown),(0,v.pQ)(y)).subscribe(M=>{this.dropdown!==M||this.dropdown.isOpen?this.dropdown.hide():this.dropdown.show()})}itemClicked(y){y.stopPropagation(),this.actionButtonService.open.next(null)}click(y){this.actionButtonService.open.next(this.dropdown),y.stopPropagation()}static \u0275fac=function(M){return new(M||T)};static \u0275cmp=h.VBU({type:T,selectors:[["row-action-button"]],viewQuery:function(M,C){if(1&M&&h.GBs(_,5),2&M){let f;h.mGM(f=h.lsd())&&(C.dropdown=f.first)}},hostBindings:function(M,C){1&M&&h.bIt("click",function(){return C.clickOutside()},h.EBC)},inputs:{disabled:"disabled",isLarge:"isLarge"},ngContentSelectors:$,decls:4,vars:3,consts:[["dropdown","bs-dropdown"],["dropdown","","placement","bottom right",1,"btn-group"],["type","button","data-qa","action-menu","aria-controls","dropdown-actions","app-ellipsis-v-solid-icon","",1,"btn","btn-plain",3,"click","disabled"],["id","dropdown-actions","class","dropdown-menu dropdown-menu-right","role","menu","aria-labelledby","button-basic",3,"click","focusout",4,"dropdownMenu"],["id","dropdown-actions","role","menu","aria-labelledby","button-basic",1,"dropdown-menu","dropdown-menu-right",3,"click","focusout"]],template:function(M,C){1&M&&(h.NAR(),h.j41(0,"div",1,0)(2,"button",2),h.bIt("click",function(I){return C.click(I)}),h.k0s(),h.DNE(3,g,2,0,"ul",3),h.k0s()),2&M&&(h.R7$(2),h.AVh("icon-button",!C.isLarge),h.Y8G("disabled",C.disabled))},dependencies:[P,m.Kk,m.hs],styles:[".icon-button[_ngcontent-%COMP%]{width:24px;height:24px;padding:2px}"],changeDetection:0})}return T})()},49764(O,S,l){l.d(S,{$:()=>T});var d=l(35547),m=l(85802),a=l(89417),x=l(84460),b=l(95604),v=l(32834),h=l(68018),P=l(8516);const _=[[["input","hidden",""]],[["",8,"input-group-append"]],[["button"]],[["val-errors"],["show-error-warning"]],[["","description",""]]],$=["input[hidden]",".input-group-append","button","val-errors,show-error-warning","[description]"];function g(G,y){if(1&G){const M=d.RV6();d.j41(0,"app-times-regular-icon",8),d.bIt("click",function(){m.eBV(M);const f=d.XpG();return m.Njj(f.clear())}),d.k0s()}}function e(G,y){if(1&G){const M=d.RV6();d.j41(0,"button",9),d.bIt("click",function(){m.eBV(M);const f=d.XpG();return m.Njj(f.inlineBtnClick())}),d.nrm(1,"lucide-icon",10),d.k0s()}if(2&G){const M=d.XpG();d.Y8G("disabled",M.disabled||M.inlineButtonDisabled),d.R7$(),d.Y8G("img",M.inlineBtnIcon)}}let T=(()=>{class G extends x.m{inlineButtonIcon;inlineButtonClick;get hasConcealClass(){return this.isConcealed&&this.concealByClass}get type(){return this.isConcealed&&!this.concealByClass?"password":"text"}get inlineBtnIcon(){return this.isConcealed?P.X_F:P.kU3}get isAutocomplete(){return this.autocomplete&&"off"!==this.autocomplete}inlineBtnClick(){this.isConcealed=!this.isConcealed}get concealByClass(){return this.canConcealByClass&&!this.isAutocomplete}canConcealByClass;isConcealed=!0;constructor(){const M=(0,m.WQX)(d.aKT);super(),this.canConcealByClass="webkitTextSecurity"in window.getComputedStyle(M.nativeElement)}static \u0275fac=function(C){return new(C||G)};static \u0275cmp=d.VBU({type:G,selectors:[["field-input-password"]],hostVars:2,hostBindings:function(C,f){2&C&&d.AVh("conceal",f.hasConcealClass)},features:[d.Jv_([{provide:a.kq,multi:!0,useExisting:G}]),d.Vt3],ngContentSelectors:$,decls:14,vars:23,consts:[["inputElement",""],[3,"label","labelFor","inlineLabel","disabled","required","description","hint"],[1,"input-group"],["data-qa","input",1,"form-control",3,"ngModelChange","keydown","paste","focus","blur","type","id","maxlength","minlength","autocomplete","name","disabled","readonly","placeholder","ngModel"],["data-qa","clear",1,"clear"],["type","button","data-qa","btn",1,"btn","btn-border","btn-icon",3,"disabled"],["ngProjectAs","val-errors",5,["val-errors"]],["ngProjectAs","[description]",5,["","description",""]],["data-qa","clear",1,"clear",3,"click"],["type","button","data-qa","btn",1,"btn","btn-border","btn-icon",3,"click","disabled"],[3,"img"]],template:function(C,f){1&C&&(d.NAR(_),d.j41(0,"field-wrapper",1)(1,"div",2),d.SdG(2),d.j41(3,"input",3,0),d.nI1(5,"translate"),d.bIt("ngModelChange",function(E){return f.valueChanged(E)})("keydown",function(E){return f.preventInvalidInput(E)})("paste",function(E){return f.onPaste(E)})("focus",function(){return f.onFocus()})("blur",function(E){return f.onBlur(E)}),d.k0s(),d.nVh(6,g,1,0,"app-times-regular-icon",4),d.SdG(7,1),d.SdG(8,2),d.nVh(9,e,2,2,"button",5),d.k0s(),d.qex(10,6),d.SdG(11,3),d.bVm(),d.qex(12,7),d.SdG(13,4),d.bVm(),d.k0s()),2&C&&(d.Y8G("label",f.label)("labelFor",f.id)("inlineLabel",f.inlineLabel)("disabled",f.disabled)("required",f.isRequired)("description",f.description)("hint",f.hint),d.R7$(3),d.AVh("text-truncate",f.readonly),d.Y8G("type",f.type)("id",f.id)("maxlength",f.maxlength??null)("minlength",f.minlength)("autocomplete",f.autocomplete)("name",f.name)("disabled",f.disabled)("readonly",f.readonly||f.noManualInput)("placeholder",d.bMT(5,21,f.indeterminate?f.indeterminatePlaceholder:f.placeholder||""))("ngModel",f.value),d.R7$(3),d.vxM(f.indeterminate&&!f.disabled?6:-1),d.R7$(3),d.vxM(f.inlineBtnIcon?9:-1))},dependencies:[b.z,a.X1,a.me,a.BC,a.xh,a.tU,a.YN,a.vS,v.R,P.flO,P.WGl,h.D9],styles:[".conceal[_nghost-%COMP%] input[_ngcontent-%COMP%]{-webkit-text-security:disc}","[_nghost-%COMP%]{display:block;margin-bottom:16px}[_nghost-%COMP%] field-wrapper[_ngcontent-%COMP%]{margin-bottom:0}[_nghost-%COMP%] .input-group>.btn{border-left:0}.max-length-3[_nghost-%COMP%] input[type=number]{max-width:calc(12px * 2 + .65em * 3);min-width:calc(12px * 2 + .65em * 3)}.max-length-4[_nghost-%COMP%] input[type=number]{max-width:calc(24px + 2.6em);min-width:calc(24px + 2.6em)}.max-length-5[_nghost-%COMP%] input[type=number]{max-width:calc(24px + 3.25em);min-width:calc(24px + 3.25em)}.max-length-6[_nghost-%COMP%] input[type=number]{max-width:calc(12px * 2 + .65em * 6);min-width:calc(12px * 2 + .65em * 6)}.max-length-7[_nghost-%COMP%] input[type=number]{max-width:calc(24px + 4.55em);min-width:calc(24px + 4.55em)}.min-length-3[_nghost-%COMP%] input[type=number]{min-width:calc(12px * 2 + .65em * 3)}.min-length-4[_nghost-%COMP%] input[type=number]{min-width:calc(24px + 2.6em)}.min-length-5[_nghost-%COMP%] input[type=number]{min-width:calc(24px + 3.25em)}.min-length-6[_nghost-%COMP%] input[type=number]{min-width:calc(12px * 2 + .65em * 6)}.min-length-7[_nghost-%COMP%] input[type=number]{min-width:calc(24px + 4.55em)}[_nghost-%COMP%] .clear[_ngcontent-%COMP%]{position:absolute;top:10px;right:10px;cursor:pointer;--svg-color: currentColor;--svg-vertical-align: baseline}"],changeDetection:0})}return G})()},54495(O,S,l){l.d(S,{P:()=>m});var d=l(35547);let m=(()=>{class a{transform(b){return b?a.groupsSort(b):[]}static groupsSort(b){return b.sort((v,h)=>"DEFAULT"===v.name?-1:"DEFAULT"===h.name?1:v.name.localeCompare(h.name))}static \u0275fac=function(v){return new(v||a)};static \u0275pipe=d.EJ8({name:"groupsSort",type:a,pure:!0})}return a})()},42318(O,S,l){l.d(S,{i:()=>d});
1class d{showRingingExternalCalls=!0;showParkedCalls=!0;showExternalConnectedCalls=!0;showInternalConnectedCalls=!0;showIvrCalls=!0;showQueueCalls=!0}},28602(O,S,l){l.d(S,{settingsRoutes:()=>Ji});var d=l(25558),m=l(96354),a=l(85802),x=l(16444),b=l(93049),v=l(59882),h=l(68018),P=l(60540),_=l(58689),$=l(8516),g=l(89079),e=l(35547);const T=()=>({exact:!0}),G=()=>["status"],y=()=>({exact:!1});function M(n,r){1&n&&(e.j41(0,"li",2)(1,"h3",12),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&n&&(e.R7$(2),e.JRh(e.bMT(3,1,"_i18n.Settings")))}function C(n,r){if(1&n&&e.nrm(0,"lucide-icon",5),2&n){const t=e.XpG(2);e.Y8G("img",t.User)}}function f(n,r){if(1&n&&e.nrm(0,"lucide-icon",5),2&n){const t=e.XpG(3);e.Y8G("img",t.PhoneCall)}}function I(n,r){if(1&n&&(e.j41(0,"li",3)(1,"a",13),e.nVh(2,f,1,1,"lucide-icon",5),e.EFF(3),e.nI1(4,"translate"),e.k0s()()),2&n){e.XpG();const t=e.r8f(0),i=e.XpG(),o=e.r8f(0);e.R7$(),e.HbH(t),e.Y8G("routerLink",e.lJ4(9,G))("routerLinkActive",o)("routerLinkActiveOptions",e.lJ4(10,y)),e.R7$(),e.vxM(i.isNewDesign()?2:-1),e.R7$(),e.SpI(" ",e.bMT(4,7,"_i18n.TitlePresence")," ")}}function E(n,r){if(1&n&&e.nrm(0,"lucide-icon",5),2&n){const t=e.XpG(2);e.Y8G("img",t.Smartphone)}}function me(n,r){if(1&n&&e.nrm(0,"lucide-icon",5),2&n){const t=e.XpG(2);e.Y8G("img",t.MessageCircle)}}function Ke(n,r){if(1&n&&e.nrm(0,"lucide-icon",5),2&n){const t=e.XpG(2);e.Y8G("img",t.Volume2)}}function ze(n,r){if(1&n&&e.nrm(0,"lucide-icon",5),2&n){const t=e.XpG(2);e.Y8G("img",t.Eye)}}function Ze(n,r){if(1&n&&e.nrm(0,"lucide-icon",5),2&n){const t=e.XpG(2);e.Y8G("img",t.Coffee)}}function qe(n,r){if(1&n&&e.nrm(0,"lucide-icon",5),2&n){const t=e.XpG(3);e.Y8G("img",t.Plug)}}function et(n,r){if(1&n&&(e.j41(0,"li",3)(1,"a",14),e.nVh(2,qe,1,1,"lucide-icon",5),e.EFF(3),e.nI1(4,"translate"),e.k0s()()),2&n){e.XpG();const t=e.r8f(0),i=e.XpG(),o=e.r8f(0);e.R7$(),e.HbH(t),e.Y8G("routerLinkActive",o)("routerLinkActiveOptions",e.lJ4(8,T)),e.R7$(),e.vxM(i.isNewDesign()?2:-1),e.R7$(),e.SpI(" ",e.bMT(4,6,"_i18n.Integration")," ")}}function tt(n,r){if(1&n&&e.nrm(0,"lucide-icon",5),2&n){const t=e.XpG(2);e.Y8G("img",t.Radio)}}function nt(n,r){if(1&n&&(e.SS7(0),e.nVh(1,M,4,3,"li",2),e.j41(2,"li",3)(3,"a",4),e.nVh(4,C,1,1,"lucide-icon",5),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.nVh(7,I,5,11,"li",3),e.j41(8,"li",3)(9,"a",6),e.nVh(10,E,1,1,"lucide-icon",5),e.EFF(11),e.nI1(12,"translate"),e.k0s()(),e.j41(13,"li",3)(14,"a",7),e.nVh(15,me,1,1,"lucide-icon",5),e.EFF(16),e.nI1(17,"translate"),e.k0s()(),e.j41(18,"li",3)(19,"a",8),e.nVh(20,Ke,1,1,"lucide-icon",5),e.EFF(21),e.nI1(22,"translate"),e.k0s()(),e.j41(23,"li",3)(24,"a",9),e.nVh(25,ze,1,1,"lucide-icon",5),e.EFF(26),e.nI1(27,"translate"),e.k0s()(),e.j41(28,"li",3)(29,"a",10),e.nVh(30,Ze,1,1,"lucide-icon",5),e.EFF(31),e.nI1(32,"translate"),e.k0s()(),e.nVh(33,et,5,9,"li",3),e.j41(34,"li",3)(35,"a",11),e.nVh(36,tt,1,1,"lucide-icon",5),e.EFF(37),e.nI1(38,"translate"),e.k0s()()),2&n){const t=r.itemClass,i=e.XpG(),o=e.r8f(0),s=e.bH3(i.isNewDesign()?"btn btn-plain":t);e.R7$(),e.vxM(i.isNewDesign()?1:-1),e.R7$(2),e.HbH(s),e.Y8G("routerLinkActive",o)("routerLinkActiveOptions",e.lJ4(60,T)),e.R7$(),e.vxM(i.isNewDesign()?4:-1),e.R7$(),e.SpI(" ",e.bMT(6,46,"_i18n.General")," "),e.R7$(2),e.vxM(i.forwardingRulesVisible()?7:-1),e.R7$(2),e.HbH(s),e.Y8G("routerLinkActive",o)("routerLinkActiveOptions",e.lJ4(61,T)),e.R7$(),e.vxM(i.isNewDesign()?10:-1),e.R7$(),e.SpI(" ",e.bMT(12,48,"_i18n.3CXTalk")," "),e.R7$(3),e.HbH(s),e.Y8G("routerLinkActive",o)("routerLinkActiveOptions",e.lJ4(62,T)),e.R7$(),e.vxM(i.isNewDesign()?15:-1),e.R7$(),e.SpI(" ",e.bMT(17,50,"_i18n.Chat")," "),e.R7$(3),e.HbH(s),e.Y8G("routerLinkActive",o)("routerLinkActiveOptions",e.lJ4(63,T)),e.R7$(),e.vxM(i.isNewDesign()?20:-1),e.R7$(),e.SpI(" ",e.bMT(22,52,"_i18n.MediaDeviceOptions")," "),e.R7$(3),e.HbH(s),e.Y8G("routerLinkActive",o)("routerLinkActiveOptions",e.lJ4(64,T)),e.R7$(),e.vxM(i.isNewDesign()?25:-1),e.R7$(),e.SpI(" ",e.bMT(27,54,"_i18n.View")," "),e.R7$(3),e.HbH(s),e.Y8G("routerLinkActive",o)("routerLinkActiveOptions",e.lJ4(65,T)),e.R7$(),e.vxM(i.isNewDesign()?30:-1),e.R7$(),e.SpI(" ",e.bMT(32,56,"_i18n.Greetings")," "),e.R7$(2),e.vxM(i.isPro()?33:-1),e.R7$(2),e.HbH(s),e.Y8G("routerLinkActive",o)("routerLinkActiveOptions",e.lJ4(66,T)),e.R7$(),e.vxM(i.isNewDesign()?36:-1),e.R7$(),e.SpI(" ",e.bMT(38,58,"_i18n.BLF")," ")}}let it=(()=>{class n{myPhoneService=(0,a.WQX)(x.gx);forwardingRulesVisible=(0,g.ot)(this.myPhoneService.myPhoneSession.pipe((0,d.n)(t=>t.myInfo$),(0,m.T)(t=>t.AllowEditFwRules)));isPro=(0,g.ot)(this.myPhoneService.isPro$);isNewDesign=(0,a.WQX)(_.T);User=$.KJW;PhoneCall=$.d3s;Smartphone=$.wO7;MessageCircle=$.oFn;Volume2=$.jIq;Eye=$.kU3;
1Coffee=$.vLn;Plug=$.FcC;Radio=$.sxL;static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["app-settings-layout"]],decls:5,vars:2,consts:[["menuTemplate",""],[3,"navTemplateOutlet"],["role","menuitem",1,"p-0"],["role","menuitem"],["routerLink","/settings",3,"routerLinkActive","routerLinkActiveOptions"],[3,"img"],["routerLink","/settings/talk-and-meet","data-qa","talk-and-meet",3,"routerLinkActive","routerLinkActiveOptions"],["routerLink","/settings/chat","data-qa","chat",3,"routerLinkActive","routerLinkActiveOptions"],["routerLink","/settings/media","data-qa","media",3,"routerLinkActive","routerLinkActiveOptions"],["routerLink","/settings/view","data-qa","view",3,"routerLinkActive","routerLinkActiveOptions"],["routerLink","/settings/voicemails","data-qa","voicemails",3,"routerLinkActive","routerLinkActiveOptions"],["routerLink","/settings/blf","data-qa","blf",3,"routerLinkActive","routerLinkActiveOptions"],[1,"border-bottom","aside-align","m-0","d-flex","align-items-center","ps-3"],["data-qa","forwarding-rules",3,"routerLink","routerLinkActive","routerLinkActiveOptions"],["routerLink","/settings/integrations","data-qa","integrations",3,"routerLinkActive","routerLinkActiveOptions"]],template:function(i,o){if(1&i&&(e.SS7(0),e.DNE(1,nt,39,67,"ng-template",null,0,e.C5r),e.j41(3,"app-layout-type3",1),e.nrm(4,"router-outlet"),e.k0s()),2&i){const s=e.sdS(2);e.bH3(o.isNewDesign()?"btn-primary":"focus"),e.R7$(3),e.Y8G("navTemplateOutlet",s)}},dependencies:[b.Wk,b.wQ,P.F,v.n3,$.flO,$.WGl,h.D9],styles:["a[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--spacer-s)}.new-design [_nghost-%COMP%] li[_ngcontent-%COMP%]{padding:var(--spacer-xs) var(--spacer-s) 0}.new-design [_nghost-%COMP%] a[_ngcontent-%COMP%]{width:100%;font-size:inherit!important;font-weight:500!important;line-height:inherit!important;justify-content:start;white-space:normal;text-align:left;--bs-btn-hover-bg: var(--bg-primary-hover);--bs-btn-padding-x: var(--spacer-s)}.new-design [_nghost-%COMP%] a.btn-primary[_ngcontent-%COMP%]{--bs-btn-hover-bg: var(--bg-secondary-hover)}.new-design [_nghost-%COMP%] .nav-menu{width:190px}"]})}return n})();var k=l(96697),X=l(23294),ot=l(13946),B=l(5964),q=l(17705),U=l(84572),he=l(983),ge=l(1211),J=l(38601),ee=l(2122),te=l(91413),at=l(3710),st=l(12449),lt=l(20681);let rt=(()=>{class n extends st.d{httpClient;constructor(t,i,o){super(i,o),this.httpClient=t}profileImageDeleteImage(t="body",i=!1,o){let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const p=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);void 0!==p&&(s=s.set("Accept",p));const u=o?.context??new te._y,w=o?.transferCache??!0;let A="json";p&&(A=p.startsWith("text")?"text":this.configuration.isJsonMime(p)?"json":"blob");const{basePath:$e,withCredentials:V}=this.configuration;return this.httpClient.request("delete",`${$e}/webclient/api/ProfileImage`,{context:u,responseType:A,...V?{withCredentials:V}:{},headers:s,observe:t,...void 0!==w?{transferCache:w}:{},reportProgress:i})}profileImageUpload(t,i="body",o=!1,s){if(null==t)throw new Error("Required parameter fileInput was null or undefined when calling profileImageUpload.");let p=this.defaultHeaders;p=this.configuration.addCredentialToHeaders("Application","Authorization",p,"Bearer ");const u=s?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);void 0!==u&&(p=p.set("Accept",u));const w=s?.context??new te._y,A=s?.transferCache??!0;let V,Ye=!1;Ye=this.canConsumeForm(["multipart/form-data"]),V=Ye?new FormData:new te.Nl({encoder:this.encoder}),void 0!==t&&(V=V.append("fileInput",t)||V);let ue="json";u&&(ue=u.startsWith("text")?"text":this.configuration.isJsonMime(u)?"json":"blob");const{basePath:Zi,withCredentials:Je}=this.configuration;return this.httpClient.request("post",`${Zi}/webclient/api/ProfileImage`,{context:w,body:V,responseType:ue,...Je?{withCredentials:Je}:{},headers:p,observe:i,...void 0!==A?{transferCache:A}:{},reportProgress:o})}static \u0275fac=function(i){return new(i||n)(a.KVO(te.Qq),a.KVO(at.o,8),a.KVO(lt.V,8))};static \u0275prov=a.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var xe=l(69296),c=l(89417);function ct(n){return n.value?{serverError:!0}:null}var dt=l(7881),pt=l(22972),W=l(99437),fe=l(88141),ut=l(54999),ne=l(59053),mt=l(40953),L=l(24708),Pe=l(49764),we=l(91968);function ht(n,r){if(1&n&&e.nrm(0,"app-server-error",10),2&n){const t=e.XpG();e.Y8G("message",t.form.value.unparsedServerError)}}function gt(n,r){1&n&&(e.EFF(0),e.nI1(1,"translate")),2&n&&e.JRh(e.bMT(1,1,"_i18n.OldPasswordWrong"))}let ft=(()=>{class n extends pt.m{myPhoneService=(0,a.WQX)(x.gx);cdr=(0,a.WQX)(q.gRc);maxAllowedPasswordChars=ne.lC+1;buttons=ut.P.OkCancel;form=new c.gE({oldPassword:new c.MJ("",{nonNullable:!0,validators:[c.k0.required,
1c.k0.maxLength(ne.lC)]}),newPassword:new c.MJ("",{nonNullable:!0,validators:ne.nb}),newPasswordRepeat:new c.MJ("",{nonNullable:!0}),unparsedServerError:new c.MJ("",[ct])},t=>this.validateForm(t));validateForm(t){const{newPassword:i,newPasswordRepeat:o}=t.controls;return o.setErrors(i.value&&i.value!==o.value?{passwordMismatch:!0}:null),null}validateBeforeSubmit=this.createDialogValidate(this.form,this.cdr);submit$=()=>{const{newPassword:t,oldPassword:i}=this.form.value;return this.myPhoneService.get(new ge.U2O({NewPassword:t,OldPassword:i})).pipe((0,W.W)(o=>{const s=(0,dt.PE)(o);return s.includes("OldPassword")?(this.form.controls.oldPassword.setErrors({wrong:!0}),this.cdr.markForCheck()):s.includes("NewPassword")?(this.form.controls.newPassword.setErrors({weak:!0}),this.cdr.markForCheck()):(this.form.patchValue({unparsedServerError:s}),this.form.markAllAsTouched(),this.cdr.markForCheck()),he.w}),(0,fe.M)(()=>{this.myPhoneService.logout()}))};static \u0275fac=(()=>{let t;return function(o){return(t||(t=e.xGo(n)))(o||n)}})();static \u0275cmp=e.VBU({type:n,selectors:[["ng-component"]],features:[e.Vt3],decls:10,vars:7,consts:[["header","_i18n.ChangePassword","okText","_i18n.Save",3,"buttons","formGroup","validateBeforeSubmit","submit$"],["controlName","unparsedServerError",1,"server-validation"],["valError","serverError"],["formControlName","oldPassword","label","_i18n.OldPassword","name","password","autocomplete","current-password",3,"maxlength"],["controlName","oldPassword"],["valError","wrong"],["formControlName","newPassword","name","new-password","autocomplete","new-password","label","_i18n.NewPassword",3,"maxlength"],["controlName","newPassword"],["formControlName","newPasswordRepeat","label","_i18n.NewPasswordRepeat","autocomplete","new-password",3,"maxlength"],["controlName","newPasswordRepeat"],[3,"message"]],template:function(i,o){1&i&&(e.j41(0,"app-modal-dialog",0)(1,"val-errors",1),e.DNE(2,ht,1,1,"ng-template",2),e.k0s(),e.j41(3,"field-input-password",3)(4,"val-errors",4),e.DNE(5,gt,2,3,"ng-template",5),e.k0s()(),e.j41(6,"field-input-password",6),e.nrm(7,"val-errors",7),e.k0s(),e.j41(8,"field-input-password",8),e.nrm(9,"val-errors",9),e.k0s()()),2&i&&(e.Y8G("buttons",o.buttons)("formGroup",o.form)("validateBeforeSubmit",o.validateBeforeSubmit)("submit$",o.submit$),e.R7$(3),e.Y8G("maxlength",o.maxAllowedPasswordChars),e.R7$(3),e.Y8G("maxlength",o.maxAllowedPasswordChars),e.R7$(2),e.Y8G("maxlength",o.maxAllowedPasswordChars))},dependencies:[mt.p,c.X1,c.BC,c.cb,c.tU,c.j4,c.JD,L.IH,L.VI,Pe.$,we.J,h.D9],styles:[".server-validation[_ngcontent-%COMP%]:not(:empty){display:block;margin-bottom:1rem}"],changeDetection:0})}return n})();var Q=l(50733),Se=l(41029),vt=l(73470),Ie=l(81173),K=l(50644),j=l(96106),Ct=l(70299),ve=l(84460),bt=l(20284),Ce=l(84360),_t=l(60332),N=l(83188),Mt=l(17855),yt=l(50176),be=l(95604),Re=l(8876),ie=l(72510),Fe=l(5918),Tt=l(87175),R=l(49769),$t=l(6581);let xt=(()=>{class n{langSelect=(0,a.WQX)(Fe.E);lang=(0,a.WQX)($t.m);static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["app-language-selector"]],decls:2,vars:3,consts:[[3,"ngModelChange","ngModel"]],template:function(i,o){if(1&i&&(e.j41(0,"app-language-select",0),e.nI1(1,"async"),e.bIt("ngModelChange",function(p){return o.langSelect.selectLanguage(p)}),e.k0s()),2&i){let s;e.Y8G("ngModel",null==(s=e.bMT(1,1,o.lang.localStorageLanguage$))?null:s.phoneSystemId)}},dependencies:[Tt.O,c.YN,c.BC,c.vS,R.Jj],encapsulation:2})}return n})();var se=l(66300),D=l(42610),Pt=l(25013),z=l(19781),Z=l(23773);function wt(n,r){if(1&n){const t=e.RV6();e.j41(0,"field-checkbox",1),e.bIt("ngModelChange",function(o){a.eBV(t);const s=e.XpG();return a.Njj(s.pushDisabled.set(!o))}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("ngModel",!t.pushDisabled())("switch",t.isNewDesign())}}let St=(()=>{class n{pushAvailable=(0,g.ot)((0,a.WQX)(Pt.Xd).isEnabled$);isNewDesign=(0,a.WQX)(_.T);pushDisabled=(0,Z.I)(D.Hh.PushDisabled,!1);static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["app-push-control"]],decls:1,vars:1,consts:[["data-qa","enable-push-notifications","label","_i18n.EnablePushNotifications",3,"ngModel","switch"],["data-qa","enable-push-notifications","label","_i18n.EnablePushNotifications",3,"ngModelChange","ngModel","switch"]],template:function(i,o){1&i&&e.nV
1h(0,wt,1,2,"field-checkbox",0),2&i&&e.vxM(o.pushAvailable()?0:-1)},dependencies:[c.YN,c.BC,c.vS,z.t],styles:["[_nghost-%COMP%]:empty{display:none}"]})}return n})();var It=l(62382),Rt=l(64631),H=l(22114);const Ft=["vmNumber"],Ge=()=>({data:"/#/settings/security"});function Gt(n,r){if(1&n){const t=e.RV6();e.j41(0,"button",10),e.bIt("click",function(){a.eBV(t);const o=e.XpG(2);return a.Njj(o.openChangePasswordDialog())}),e.k0s()}2&n&&e.Y8G("translate","_i18n.ChangePassword")}function Dt(n,r){if(1&n){const t=e.RV6();e.j41(0,"div",5)(1,"app-profile-image",6),e.nI1(2,"async"),e.bIt("ngModelChange",function(o){a.eBV(t);const s=e.XpG();return a.Njj(s.onContactImageChange(o))}),e.k0s(),e.nVh(3,Gt,1,1,"button",7),e.nI1(4,"async"),e.j41(5,"button",8),e.bIt("click",function(){a.eBV(t);const o=e.XpG();return a.Njj(o.openSmartphoneModal())}),e.nrm(6,"lucide-icon",9),e.EFF(7),e.nI1(8,"translate"),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(),e.AVh("mb-2",t.isNewDesign()),e.Y8G("ngModel",e.bMT(2,7,t.contactImageUrl$))("userAvatar",!0),e.R7$(2),e.vxM(e.bMT(4,9,t.allowChangePass$)?3:-1),e.R7$(3),e.Y8G("img",t.QrCode),e.R7$(),e.SpI(" ",e.bMT(8,11,"_i18n.QrCode")," ")}}function kt(n,r){1&n&&(e.EFF(0),e.nI1(1,"translate")),2&n&&e.SpI(" ",e.bMT(1,1,"_i18n.MobileHasBeenUsedInForwardingProfileAndCantBeEmpty")," ")}function Et(n,r){if(1&n&&(e.j41(0,"field-wrapper",15),e.nrm(1,"ng-select",19),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("id","primary-group-select")("formControl",t.f.primaryGroupId)("items",t.allowedGroups)("clearable",!1)("searchable",!1)}}function Nt(n,r){if(1&n){const t=e.RV6();e.j41(0,"div",11)(1,"field-input",12)(2,"val-errors",13),e.DNE(3,kt,2,3,"ng-template",14),e.k0s()(),e.nVh(4,Et,2,5,"field-wrapper",15),e.k0s(),e.j41(5,"div",11),e.nrm(6,"app-language-selector",16),e.j41(7,"field-select",17),e.nI1(8,"async"),e.bIt("ngModelChange",function(o){a.eBV(t);const s=e.XpG();return a.Njj(s.selectTheme(o))}),e.k0s()(),e.j41(9,"div",11)(10,"div",18),e.nrm(11,"app-push-control"),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(),e.Y8G("maxlength",50)("formControl",t.mobileNumber),e.R7$(),e.Y8G("control",t.mobileNumber),e.R7$(2),e.vxM(t.user.Groups&&t.user.Groups.length?4:-1),e.R7$(3),e.Y8G("options",t.themeList)("ngModel",e.bMT(8,6,t.applicationTheme$))}}function Vt(n,r){if(1&n&&e.nrm(0,"field-input",20),2&n){const t=e.XpG(2);e.Y8G("ngModel",t.myDids)("readonly",!0)("maxlength",null)}}function Ot(n,r){1&n&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(),e.JRh(e.bMT(2,1,"_i18n.MakeCall")))}function Bt(n,r){1&n&&e.nrm(0,"app-input-copy-to-clipboard",24),2&n&&e.Y8G("data",r)}function At(n,r){if(1&n){const t=e.RV6();e.j41(0,"app-input-copy-to-clipboard",25)(1,"button",26),e.bIt("click",function(){const o=a.eBV(t),s=e.XpG(2);return a.Njj(s.openLinkInNewTab(o))}),e.nrm(2,"lucide-icon",9),e.k0s()()}if(2&n){const t=e.XpG(2);e.Y8G("data",r),e.R7$(),e.HbH(e.VkB("btn btn-icon ",t.isNewDesign()?"btn-plain":"btn-border")),e.R7$(),e.Y8G("img",t.Video)}}function Ut(n,r){if(1&n){const t=e.RV6();e.j41(0,"fieldset")(1,"legend"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",11),e.nVh(5,Vt,1,3,"field-input",20),e.j41(6,"field-input",21,3),e.nI1(8,"async"),e.j41(9,"button",22),e.bIt("click",function(){a.eBV(t);const o=e.XpG();return a.Njj(o.makeCallToVmExt())}),e.nrm(10,"lucide-icon",9),e.nVh(11,Ot,3,3,"span"),e.k0s()(),e.nrm(12,"field-input-password",23),e.nVh(13,Bt,1,1,"app-input-copy-to-clipboard",24),e.nI1(14,"async"),e.nVh(15,At,3,5,"app-input-copy-to-clipboard",25),e.nI1(16,"async"),e.k0s()()}if(2&n){let t,i;const o=e.sdS(7),s=e.XpG();e.R7$(2),e.JRh(e.bMT(3,14,"_i18n.AccountDetailsHeader")),e.R7$(3),e.vxM(s.myDids?5:-1),e.R7$(),e.Y8G("ngModel",e.bMT(8,16,s.vmNumber$))("readonly",!0),e.R7$(3),e.HbH(e.VkB("btn ",s.isNewDesign()?"btn-plain btn-icon":"btn-primary")),e.Y8G("disabled",!o.value),e.R7$(),e.Y8G("img",s.Phone),e.R7$(),e.vxM(s.isNewDesign()?-1:11),e.R7$(),e.Y8G("formControl",s.f.vmPin)("readonly",!0),e.R7$(),e.vxM((t=e.bMT(14,18,s.talkUrl$))?13:-1,t),e.R7$(2),e.vxM((i=e.bMT(16,20,s.meetUrl$))?15:-1,i)}}function Lt(n,r){1&n&&e.eu8(0)}function jt(n,r){1&n&&e.eu8(0)}function Xt(n,r){1&n&&e.eu8(0)}function Wt(n,r){if(1&n&&(e.j41(0,"fieldset")(1,"div",27),e.DNE(2,Lt,1,0,"ng-container",28),e.j41(3,"div",29)(4,"h3",30),e.nrm(5,"app-my-name"),e.k0s(),e.DNE(6,jt,1,0,"ng-container",28),e.k0s()()(),e.DNE(7,Xt,1,0,"ng-container",28),e.j41(8,"fieldset")(9,"legend"),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"label",31),e.EFF(13),e.nI1(14,"translate"),e.k0s(),e.j41(15,"span"),e.EFF(16),e.nI1(17,"amLocal"),e.nI1(18,"amDateFormat"),e.k0s(),e.nrm(19,"label",32),e.nI1(20,"translate"),e.k0s()),2&n){const t=e.XpG(),i=e.sdS(2),o=e.sdS(4),s=e.sdS(6);e.R7$(2),e.Y8G("ngTemplateOutlet",i),e.R7$(4),e.Y8G("ngTemplateOutlet",o),e.R7$(),e.Y8G("ngTemplateOutlet",s),e.R7$(3),e.JRh(e.bMT(11,7,"_i18n.Sessions")),e.R7$(3),e.JRh(e.bMT(14,9,"_i18n.LastActivity")),e.R7$(3),e.SpI(" ",e.i5U(18,13,e.bMT(17,11,t.lastActivityTokenDate),"L LT")),e.R7$(3),e.Y8G("innerHTML",e.i5U(20,16,"_i18n.SeeActiveLogins",e.lJ4(19,Ge)),e.npT)}}function Qt(n,r){1&n&&e.eu8(0)}function Ht(n,r){1&n&&e.eu8(0)}function Yt(n,r){1&n&&e.eu8(0)}function Jt(n,r){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.nI1(3,"amLocal"),e.nI1(4,"amDateFormat"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.Lme("",e.bMT(2,2,"_i18n.LastActivity")," ",e.i5U(4,6,e.bMT(3,4,t.lastActivityTokenDate),"L LT"))}}function Kt(n,r){if(1&n&&(e.j41(0,"h6",33),e.nrm(1,"app-my-name"),e.k0s(),e.j41(2,"div",34),e.DNE(3,Qt,1,0,"ng-container",28),e.j41(4,"div",35),e.DNE(5,Ht,1,0,"ng-container",28)(6,Yt,1,0,"ng-container",28),e.j41(7,"fieldset")(8,"legend"),e.EFF(9),e.nI1(10,"translate"),e.k0s(),e.nVh(11,Jt,5,9,"span"),e.nrm(12,"p",36),e.nI1(13,"translate"),e.k0s()()()),2&n){const t=e.XpG(),i=e.sdS(2),o=e.sdS(4),s=e.sdS(6);e.R7$(3),e.Y8G("ngTemplateOutlet",i),e.R7$(2),e.Y8G("ngTemplateOutlet",o),e.R7$(),e.Y8G("ngTemplateOutlet",s),e.R7$(3),e.JRh(e.bMT(10,6,"_i18n.Sessions")),e.R7$(2),e.vxM(t.lastActivityTokenDate?11:-1),e.R7$(),e.Y8G("innerHTML",e.i5U(13,8,"_i18n.SeeActiveLogins",e.lJ4(11,Ge)),e.npT)}}let zt=(()=>{class n{route=(0,a.WQX)(v.nX);profileImage=(0,a.WQX)(rt);profileService=(0,a.WQX)(ee._);myphone=(0,a.WQX)(x.gx);myUser=(0,a.WQX)(Q.b);modalService=(0,a.WQX)(J.B);xapiErrors=(0,a.WQX)(Se.Ko);themeListenerService=(0,a.WQX)(xe.Z);cd=(0,a.WQX)(q.gRc);phoneService=(0,a.WQX)(bt.u);destroy$=(0,a.WQX)(a.abz);contactImageUrl$;allowChangePass$;
1user=this.route.snapshot.data.user;lastActivityTokenDate;allowedGroups=this.user.Groups?.filter(Ce.O).filter(Ce.ps)??[];themeList=xe.Y;vmNumber$;talkUrl$;meetUrl$;vmNumber;isNewDesign=(0,a.WQX)(_.T);Phone=$.bcf;QrCode=$.vW6;Video=$.CeX;extension;firstName;lastName;mobileNumber=new c.MJ("",{validators:[({value:t})=>this.hasMyMobileForwarding&&!t?{invalidForwarding:!0}:null,ne.V$],updateOn:"blur"});myDids;hasMyMobileForwarding;form=new c.gE({firstName:new c.MJ(this.user.FirstName),lastName:new c.MJ(this.user.LastName),number:new c.MJ(this.user.Number),callUsRequirement:new c.MJ(this.user.CallUsRequirement),primaryGroupId:new c.MJ(this.user.PrimaryGroupId),vmPin:new c.MJ(this.user.VMPIN)});applicationTheme$=this.themeListenerService.applicationTheme$;constructor(){const t=this.myphone,i=this.destroy$,o=t.myPhoneSession.pipe((0,d.n)(u=>u.myInfo$),(0,K.H9)()),s=t.myPhoneSession.pipe((0,d.n)(u=>u.systemParameters$),(0,K.H9)());this.lastActivityTokenDate=(this.route.snapshot.data.tokens??[])[0]?.lastUsed,this.allowChangePass$=s.pipe((0,m.T)(u=>u.AllowChangePasswords)),this.contactImageUrl$=o.pipe((0,m.T)(u=>u.ContactImage||"")),this.vmNumber$=this.myphone.myPhoneSession.pipe((0,k.s)(1),(0,m.T)(u=>u.specialMenuNumber),(0,j.Tg)(this.modalService));const p=(0,U.z)([s.pipe((0,m.T)(u=>u.PbxExternalHost)),o.pipe((0,m.T)(u=>u.WmFriendlyName))]).pipe((0,K.H9)());this.talkUrl$=p.pipe((0,m.T)(([u,w])=>(0,Ie.Mh)(u,w))),this.meetUrl$=p.pipe((0,m.T)(([u,w])=>(0,Ie.Kz)(u,w))),o.pipe((0,g.pQ)(i)).subscribe(u=>{this.extension=u.Number,this.firstName=u.FirstName,this.lastName=u.LastName,this.hasMyMobileForwarding=u.MyProfiles.Items.some(w=>(0,H.w7)(w,u.MobileNumber)),this.mobileNumber.setValue(u.MobileNumber,{emitEvent:!1}),this.mobileNumber.updateValueAndValidity({emitEvent:!1}),this.myDids=u.ActiveDids?.Items?.map(w=>w.DIDNumber).join(", ")??"",this.cd.markForCheck()}),(0,U.z)([o,o.pipe((0,m.T)(u=>u.MobileNumber),(0,X.F)(),(0,ot.J)())]).pipe((0,d.n)(([u,[w,A]])=>this.autoCorrectExceptionsToMyMobile$(u.MyProfiles,w,A)),(0,g.pQ)(i)).subscribe(),this.f.primaryGroupId.valueChanges.pipe((0,g.pQ)(i)).subscribe(u=>{this.updateUser({PrimaryGroupId:u})}),this.mobileNumber.markAsTouched()}ngOnInit(){const t=this.user.Groups,{primaryGroupId:i}=this.form.value;t&&t.length>1&&(!i||-1===i)&&this.form.patchValue({primaryGroupId:t[0].GroupId}),this.mobileNumber.valueChanges.pipe((0,B.p)(()=>this.mobileNumber.valid),(0,g.pQ)(this.destroy$)).subscribe(o=>{this.sendUpdateMobile(o||"")})}openSmartphoneModal(){this.modalService.showComponent(_t.N)}makeCallToVmExt(){const t=this.vmNumber.value;t&&this.phoneService.call(t)}onContactImageChange(t){(t?this.profileImage.profileImageUpload((0,vt.z)(t)):this.profileImage.profileImageDeleteImage()).pipe((0,k.s)(1)).subscribe({error:o=>this.modalService.error(o)})}getValueFormMyInfoOnce(t){return this.myphone.myPhoneSession.pipe((0,d.n)(i=>i.myInfo$),(0,k.s)(1),(0,m.T)(i=>i[t]))}get f(){return this.form.controls}sendUpdateMobile(t){this.getValueFormMyInfoOnce("MobileNumber").pipe((0,k.s)(1),(0,B.p)(i=>i!==t)).subscribe(()=>{this.sendUpdateRequest({MobileNumber:t})})}autoCorrectExceptionsToMyMobile$(t,i,o){const s=t.Items.find(u=>u.Exceptions&&(0,H.w7)(u,i));if(!s||!o)return he.w;const p=(0,H.am)((0,H.qt)(s,i),o);return this.profileService.updateProfile$(p).pipe((0,j.Tg)(this.modalService))}sendUpdateRequest(t){this.myphone.get(new ge.mko(t)).pipe((0,j.Tg)(this.modalService)).subscribe()}selectTheme(t){this.themeListenerService.selectTheme(t)}openChangePasswordDialog(){this.modalService.showComponent(ft)}openLinkInNewTab(t){window.open(t,"_blank")}updateUser(t){this.myUser.updateMyUser({pbxUser:t}).subscribe({error:i=>this.xapiErrors.error(this.cd,i,this.form)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["ng-component"]],viewQuery:function(i,o){if(1&i&&e.GBs(Ft,5),2&i){let s;e.mGM(s=e.lsd())&&(o.vmNumber=s.first)}},features:[e.Jv_([ee._])],decls:9,vars:1,consts:[["avatar",""],["main",""],["account",""],["vmNumber",""],["header","_i18n.General"],[1,"d-flex","flex-column","align-items-stretch","pt-1"],[3,"ngModelChange","ngModel","userAvatar"],["data-qa","change-password","id","btnChangePassword","type","button",1,"btn","btn-border","mb-3","small",3,"translate"],["data-qa","qr-code","type","button",1,"btn","btn-primary","small","mb-3",3,"click"],[3,"img"],["data-qa","change-password","id","btnChangePassword","type","button",1,"btn","btn-border","mb-3","small",3,"click","translate"],[1,"row"],["label","_i18n.MobileNumber","data-qa","mobile-number",1,"col-md-6",3,"maxlength","formControl"],[3,"control"],["valError","invali
1dForwarding"],["data-qa","primary-group","labelFor","primary-group-select","label","_i18n.MainGroupMembership","hint","_i18n.GroupMembershipUserMainInfo",1,"col-md-6"],[1,"d-block","col-md-6"],["label","_i18n.SelectATheme","data-qa","app-theme",1,"col-md-6",3,"ngModelChange","options","ngModel"],[1,"col-md-6"],["data-qa","select","bindValue","GroupId","bindLabel","Name",3,"id","formControl","items","clearable","searchable"],["data-qa","my-dids","label","_i18n.YourDid",1,"col-md-12",3,"ngModel","readonly","maxlength"],["data-qa","vm-number","label","_i18n.VoicemailNumberLabel",1,"col-md-6",3,"ngModel","readonly"],["data-qa","make-call","type","button",3,"click","disabled"],["data-qa","vm-pin-number","label","_i18n.VMPINNumber",1,"col-md-6",3,"formControl","readonly"],["data-qa","talk-url","label","_i18n.TalkUrl",1,"col-md-6",3,"data"],["data-qa","meet-url","label","_i18n.MeetUrl",1,"col-md-6",3,"data"],["type","button",3,"click"],[1,"d-flex","flex-column","flex-sm-row","gap-3"],[4,"ngTemplateOutlet"],[1,"flex-grow-1","mw-0"],[1,"mb-3"],[1,"form-label","mb-0"],[1,"form-label","d-block","mb-3",3,"innerHTML"],[1,"mb-3",2,"min-height","20px"],[1,"d-flex","gap-5"],[1,"flex-grow-1"],[3,"innerHTML"]],template:function(i,o){1&i&&(e.j41(0,"app-page",4),e.DNE(1,Dt,9,13,"ng-template",null,0,e.C5r)(3,Nt,12,8,"ng-template",null,1,e.C5r)(5,Ut,17,22,"ng-template",null,2,e.C5r),e.nVh(7,Wt,21,20)(8,Kt,14,12),e.k0s()),2&i&&(e.R7$(7),e.vxM(o.isNewDesign()?7:8))},dependencies:[N.H,Mt.X2,yt.W,c.X1,c.BC,c.tU,c.l_,c.YN,c.vS,h.Mm,ve.m,L.IH,L.VI,be.z,ie.vr,xt,se.q,St,Pe.$,Ct.Y,R.T3,$.flO,$.WGl,Re.c,R.Jj,h.D9,It.a,Rt.h],encapsulation:2})}return n})();var Zt=l(4856),oe=l(84412),Y=l(7673),_e=l(56344);let qt=(()=>{class n{myUserApi=(0,a.WQX)(Q.b);http=(0,a.WQX)(te.Qq);selectedGreetings$;availablePrompts$;refreshAvailable$=new oe.t(void 0);refreshSelected$=new oe.t(void 0);constructor(){const t=this.myUserApi;this.availablePrompts$=this.refreshAvailable$.pipe((0,d.n)(()=>t.listMyUserGreetings({})),(0,m.T)(({value:i})=>[{DisplayName:"_i18n.Voicemail_GreetingsPlayDefault",Filename:""},...(i||[]).map(this.convertToPrompt)]),(0,W.W)(()=>(0,Y.of)([])),(0,K.H9)()),this.selectedGreetings$=this.refreshSelected$.pipe((0,d.n)(()=>t.getMyUser({$select:["Greetings"],$expand:["Greetings"]})),(0,m.T)(i=>i.Greetings||[]),(0,W.W)(()=>(0,Y.of)([])),(0,K.H9)())}uploadPrompt$(t){const i=new FormData;return i.append("file",t,t.name),this.http.post(`${_e.H}/MyUser/UploadGreeting`,i).pipe((0,m.T)(()=>(this.refreshAvailable$.next(),t.name)))}deletePrompt$(t){return this.http.delete(`${_e.H}/MyUser/DeleteGreeting/${encodeURIComponent(t)}`).pipe((0,fe.M)(()=>{this.refreshAvailable$.next()}))}setGreeting$(t,i){return this.myUserApi.updateMyUser({pbxUser:{Greetings:[{Type:t,Filename:i}]}}).pipe((0,m.T)(()=>{this.refreshSelected$.next()}))}convertToPrompt=t=>({Filename:t.Filename,DisplayName:t.DisplayName,CanBeDeleted:!0,FileLink:`${_e.H}/MyUser/DownloadGreeting/${encodeURIComponent(t.Filename)}`});static \u0275fac=function(i){return new(i||n)};static \u0275prov=a.jDH({token:n,factory:n.\u0275fac})}return n})();var en=l(65164),De=l(21339),tn=l(87370),le=l(43462),ke=l(57786),Ee=l(13798);function nn(n,r){if(1&n&&(e.j41(0,"div",2)(1,"div",3),e.EFF(2),e.nI1(3,"profileNameConv"),e.nI1(4,"async"),e.k0s(),e.j41(5,"div",4)(6,"app-prompt-selector",5),e.nrm(7,"val-errors",6),e.k0s()()()),2&n){const t=r.$implicit,i=e.XpG();e.R7$(2),e.SpI(" ",e.bMT(4,5,e.bMT(3,3,i.convertProfileName(t)))," "),e.R7$(4),e.Y8G("formControlName",t),e.R7$(),e.Y8G("controlName",t)}}let on=(()=>{class n{service=(0,a.WQX)(De.t,{self:!0});modalService=(0,a.WQX)(J.B);destroy$=(0,a.WQX)(a.abz);cd=(0,a.WQX)(q.gRc);isNewDesign=(0,a.WQX)(_.T);profiles=["Default","Available","Away","OutOfOffice","Available2","OutOfOffice2"];form=new c.gE({Default:new c.MJ(""),Available:new c.MJ(""),Away:new c.MJ(""),OutOfOffice:new c.MJ(""),Available2:new c.MJ(""),OutOfOffice2:new c.MJ("")});ngOnInit(){this.service.selectedGreetings$.pipe((0,g.pQ)(this.destroy$)).subscribe(t=>{const i=this.profiles.reduce((o,s)=>(o[s]=t.find(p=>p.Type===s)?.Filename||"",o),{});this.form.setValue(i,{emitEvent:!1}),this.cd.markForCheck()}),(0,ke.h)(...this.profiles.map(t=>this.form.controls[t].valueChanges.pipe((0,Ee.Z)(0),(0,X.F)(),(0,m.T)(i=>({profile:t,filename:i||""}))))).pipe((0,d.n)(t=>this.service.selectedGreetings$.pipe((0,B.p)(i=>this.isDifferent(t,i)),(0,m.T)(()=>t))),(0,d.n)(t=>this.service.setGreeting$(t.profile,t.filename).pipe((0,j.Tg)(this.modalService))),(0,g.pQ)(this.destroy$)).subscribe()}convertProfileName(t){switch(t){case"Default":return"Default";case"Available2":return le.SB.Custom1;case"OutOfOffice2":return le.SB.Custom2;default:return le.SB[t]}}isDifferent(t,i){return t.filename!==(i.find(o=>o.Type===t.profile)?.Filename||"")}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["ng-component"]],features:[e.Jv_([{provide:De.t,useClass:qt}])],decls:7,vars:6,consts:[["header","_i18n.Greetings",3,"formGroup"],[1,"d-md-table","w-100"],[1,"d-md-table-row"],[1,"d-md-table-cell","text-nowrap"],[1,"d-md-table-cell","
1w-100"],[1,"mb-0",3,"formControlName"],[3,"controlName"]],template:function(i,o){1&i&&(e.j41(0,"app-page",0)(1,"p"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",1),e.Z7z(5,nn,8,7,"div",2,e.fX1),e.k0s()()),2&i&&(e.Y8G("formGroup",o.form),e.R7$(),e.HbH(o.isNewDesign()?"subheader mb-1":""),e.R7$(),e.JRh(e.bMT(3,4,"_i18n.Voicemail_SetGreetingsSubTitle")),e.R7$(3),e.Dyx(o.profiles))},dependencies:[c.X1,c.BC,c.cb,c.j4,c.JD,N.H,tn.X,L.N4,L.IH,R.Jj,h.D9,en.F],styles:["@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}@media(min-width:768px){[_nghost-%COMP%] .d-md-table[_ngcontent-%COMP%]{border-spacing:var(--spacer);margin:0 calc(var(--spacer) * -1)}[_nghost-%COMP%] .d-md-table-cell[_ngcontent-%COMP%]:first-child{vertical-align:middle}}@media(max-width:767.98px){[_nghost-%COMP%] .d-md-table-row[_ngcontent-%COMP%]{margin-bottom:var(--spacer)}}.new-design [_nghost-%COMP%] .d-md-table-row[_ngcontent-%COMP%]{border-radius:var(--border-radius);box-shadow:0 0 0 1px var(--border-color)}.new-design [_nghost-%COMP%] .d-md-table-cell[_ngcontent-%COMP%]{padding:var(--spacer-s) var(--spacer-semi-medium)}.new-design [_nghost-%COMP%] .d-md-table-cell[_ngcontent-%COMP%]:first-child{font-weight:var(--font-weight-bold);vertical-align:top;padding-top:var(--spacer)}@media(max-width:767.98px){.new-design [_nghost-%COMP%] .d-md-table-cell[_ngcontent-%COMP%]:first-child{padding-top:var(--spacer-s);padding-bottom:0}.new-design [_nghost-%COMP%] .d-md-table-cell[_ngcontent-%COMP%]:last-child{padding-top:var(--spacer-xs)}}"],changeDetection:0})}return n})();var re=l(22040),F=l(40678),an=l(19630),Ne=l(53993),ae=l(65245),sn=l(60240);const ln=n=>({p1:n}),rn=(n,r)=>r.name,cn=(n,r)=>r.value.variableId;function dn(n,r){1&n&&(e.j41(0,"h6",1),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(),e.JRh(e.bMT(2,1,"_i18n.ConfigureIntegrations")))}function pn(n,r){1&n&&(e.EFF(0),e.nI1(1,"translate")),2&n&&e.JRh(e.bMT(1,1,"_i18n.URLShouldNotBeEmpty"))}function un(n,r){1&n&&(e.EFF(0),e.nI1(1,"translate")),2&n&&e.JRh(e.bMT(1,1,"_i18n.URLShouldNotBeEmpty"))}function mn(n,r){if(1&n&&(e.j41(0,"field-wrapper",4)(1,"ul",5)(2,"li")(3,"b"),e.EFF(4,"%CallerNumber%"),e.k0s(),e.EFF(5," \xa0 "),e.j41(6,"span",6),e.EFF(7,"which will contain the incoming caller id."),e.k0s()(),e.j41(8,"li")(9,"b"),e.EFF(10,"%CallerDisplayName%"),e.k0s(),e.EFF(11," \xa0 "),e.j41(12,"span",6),e.EFF(13,"which will contain incoming Display names"),e.k0s()()()(),e.j41(14,"field-input",7)(15,"val-errors",8),e.DNE(16,pn,2,3,"ng-template",9)(17,un,2,3,"ng-template",10),e.k0s()(),e.j41(18,"field-wrapper",11)(19,"ng-select",12)(20,"ng-option",13),e.EFF(21),e.nI1(22,"translate"),e.k0s(),e.j41(23,"ng-option",13),e.EFF(24),e.nI1(25,"translate"),e.k0s()()()),2&n){const t=e.XpG();e.R7$(6),e.Y8G("translate","_i18n.CallerNumberWhichWillContainIncomingCallerID"),e.R7$(6),e.Y8G("translate","_i18n.CallerDisplayNameWhichWillContainIncomingDisplayNames"),e.R7$(2),e.Y8G("maxlength",500),e.R7$(5),e.Y8G("clearable",!1)("searchable",!1),e.R7$(),e.Y8G("value",t.LaunchIntegrationWhen.Ringing),e.R7$(),e.JRh(e.bMT(22,9,"_i18n.Ringing")),e.R7$(2),e.Y8G("value",t.LaunchIntegrationWhen.Connected),e.R7$(),e.JRh(e.bMT(25,11,"_i18n.Connected"))}}function hn(n,r){if(1&n&&(e.j41(0,"ng-option",13),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n){const t=r.$implicit;e.Y8G("value",t.name),e.R7$(),e.JRh(e.bMT(2,2,t.name))}}function gn(n,r){if(1&n&&(e.j41(0,"field-wrapper",16)(1,"ng-select",19)(2,"ng-option",20),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"ng-option",21),e.EFF(6),e.nI1(7,"translate"),e.k0s(),e.j41(8,"ng-option",22),e.EFF(9),e.nI1(10,"translate"),e.k0s()()()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("clearable",!1)("searchable",!1),e.R7$(),e.Y8G("value",t.CrmLookUpMode.Manual),e.R7$(),e.JRh(e.bMT(4,8,"_i18n.CallLookupModeManual")),e.R7$(2),e.Y8G("value",t.CrmLookUpMode.Ringing),e.R7$(),e.JRh(e.bMT(7,10,"_i18n.CallLookupModeRinging")),e.R7$(2),e.Y8G("value",t.CrmLookUpMode.Connected),e.R7$(),e.JRh(e.bMT(10,12,"_i18n.CallLookupModeConnect"))}}function fn(n,r){if(1&n&&(e.EFF(0),e.nI1(1,"translate"),e.nI1(2,"translate")),2&n){const t=e.XpG().$implicit;e.Lme("",e.bMT(1,2,null==t.value.hints?null:t.value.hints.name)," ",e.bMT(2,4,"_i18n.IsRequired"))}}function vn(n,r){if(1&n&&(e.EFF(0),e.nI1(1,"translate")),2&n){const t=e.XpG(3);e.JRh(e.i5U(1,1,"_i18n.ValueCannotBeMoreThan",e.eq3(4,ln,t.crmVariableMaxLength)))}}function Cn(n,r){if(1&n&&(e.qex(0,18),e.j41(1,"field-input",23),e.nI1(2,"translate"),e.nI1(3,"translate"),e.j41(4,"val-errors",24),e.DNE(
15,fn,3,6,"ng-template",9)(6,vn,2,6,"ng-template",25),e.k0s()(),e.bVm()),2&n){const t=r.$implicit,i=r.$index,o=e.XpG(2);e.Y8G("formGroupName",i),e.R7$(),e.Y8G("label",e.bMT(2,5,null==t.value.hints?null:t.value.hints.name))("maxlength",o.crmVariableMaxLength)("hint",e.bMT(3,7,null==t.value.hints?null:t.value.hints.value)),e.BMQ("data-qa","crm-variable-"+t.value.variableId)}}function bn(n,r){if(1&n&&(e.j41(0,"field-wrapper",14)(1,"ng-select",15),e.nI1(2,"translate"),e.Z7z(3,hn,3,4,"ng-option",13,rn),e.k0s()(),e.nVh(5,gn,11,14,"field-wrapper",16),e.qex(6,17),e.Z7z(7,Cn,7,9,"ng-container",18,cn),e.bVm()),2&n){const t=e.XpG();e.R7$(),e.Y8G("clearable",!1)("searchable",!1)("placeholder",t.f.crmName.value?"":e.bMT(2,4,"_i18n.SelectCRM")),e.R7$(2),e.Dyx(t.crmIntegrationList),e.R7$(2),e.vxM(t.f.crmName.value?5:-1),e.R7$(2),e.Dyx(t.crmVariablesArray.controls)}}let _n=(()=>{class n{integrationService=(0,a.WQX)(an.a);languageService=(0,a.WQX)(Fe.E);settingsService=(0,a.WQX)(re.h);myPhoneService=(0,a.WQX)(x.gx);destroy$=(0,a.WQX)(a.abz);formBuilder=(0,a.WQX)(c.ok);isNewDesign=(0,a.WQX)(_.T);isMcmMode$;AutoOpenUrl=F.Vz;LaunchIntegrationWhen=F.im;CrmLookUpMode=F.y7;crmVariableMaxLength=255;crmIntegrationList;openUrlIntegrationOptions$;form=this.formBuilder.nonNullable.group({autoOpenUrl:F.Vz.Off,integrationsUrl:["",[c.k0.required,ne.QO]],launchIntegrationWhen:F.im.Ringing,crmName:"",callLookup:F.y7.Manual,crmVariables:this.formBuilder.array([])});get f(){return this.form.controls}get crmVariablesArray(){return this.f.crmVariables}constructor(){this.isMcmMode$=this.myPhoneService.myPhoneSession.pipe((0,d.n)(t=>t.systemParameters$),(0,m.T)(t=>t.MultiCompanyMode)),this.openUrlIntegrationOptions$=this.isMcmMode$.pipe((0,m.T)(t=>[{label:"_i18n.Off",value:F.Vz.Off},...t?[]:[{label:"_i18n.ServerSideCRM",value:F.Vz.CrmUrl}],{label:"_i18n.ClientSideCRM",value:F.Vz.ClientCrmUrl},{label:"_i18n.CustomCRM",value:F.Vz.IntegrationsUrl}]))}ngOnInit(){(0,U.z)([this.integrationService.clientCrmList$,this.integrationService.selectedClientCrm$,this.settingsService.generalSettings$,this.languageService.sessionLanguage$,this.isMcmMode$]).pipe((0,k.s)(1),(0,g.pQ)(this.destroy$)).subscribe({next:([t,i,o,s,p])=>{this.crmIntegrationList=t,this.form.patchValue({autoOpenUrl:p&&o.autoOpenUrl===F.Vz.CrmUrl?F.Vz.Off:o.autoOpenUrl,integrationsUrl:o.integrationsUrl,launchIntegrationWhen:o.launchIntegrationWhen,crmName:i?.name??"",callLookup:o.callLookup}),this.setCrmVariables(i,o.crmVariables,s)}}),this.isMcmMode$.pipe((0,X.F)(),(0,Ne.E)(this.settingsService.generalSettings$),(0,ae.i)(1),(0,g.pQ)(this.destroy$)).subscribe(([t,i])=>{t&&i.autoOpenUrl===F.Vz.CrmUrl&&this.f.autoOpenUrl.setValue(F.Vz.Off)}),(0,U.z)([this.integrationService.selectedClientCrm$,this.languageService.sessionLanguage$]).pipe((0,Ne.E)(this.settingsService.generalSettings$.pipe((0,m.T)(t=>t.crmVariables))),(0,ae.i)(1),(0,g.pQ)(this.destroy$)).subscribe(([[t,i],o])=>{this.setCrmVariables(t,o,i)}),this.f.autoOpenUrl.valueChanges.pipe((0,g.pQ)(this.destroy$)).subscribe(t=>{this.settingsService.setField("autoOpenUrl",t),this.f.crmName.setValue(""),this.f.callLookup.setValue(F.y7.Manual)}),this.f.crmName.valueChanges.pipe((0,g.pQ)(this.destroy$)).subscribe(t=>{this.settingsService.setField("crmVariables",[]),this.settingsService.setField("crmName",t)}),this.f.integrationsUrl.valueChanges.pipe((0,g.pQ)(this.destroy$)).subscribe(t=>this.settingsService.setField("integrationsUrl",t)),this.f.callLookup.valueChanges.pipe((0,g.pQ)(this.destroy$)).subscribe(t=>this.settingsService.setField("callLookup",t)),this.f.launchIntegrationWhen.valueChanges.pipe((0,g.pQ)(this.destroy$)).subscribe(t=>this.settingsService.setField("launchIntegrationWhen",t))}setCrmVariables(t,i=[],o="en"){let s=[];t&&this.f.autoOpenUrl.value===F.Vz.ClientCrmUrl&&(s=t.variables.map(p=>({isEncode:p.isEncode,variableId:p.variableId,variableValue:p.variableValue,hints:p.hints.find(w=>w.locale===o)??[]}))),this.form.setControl("crmVariables",this.createCrmVariablesArray(s,i)),this.settingsService.setField("crmVariables",this.extractCrmVariablesForSave()),this.form.markAllAsTouched()}createCrmVariablesArray(t,i=[]){return this.formBuilder.array(t?t.map(o=>{const s=i.find(p=>p.variableId===o.variableId);return this.createCrmVariableGroup(o,s)}):[])}createCrmVariableGroup(t,i){const o=this.formBuilder.group({variableId:t.variableId,isEncode:t.isEncode,hints:t.hints,variableValue:[i?.variableValue??"",[c.k0.required,
1c.k0.maxLength(this.crmVariableMaxLength)]]});return o.controls.variableValue.valueChanges.pipe((0,g.pQ)(this.destroy$)).subscribe(()=>this.settingsService.setField("crmVariables",this.extractCrmVariablesForSave())),o}extractCrmVariablesForSave(){return this.crmVariablesArray.controls.map(t=>({variableId:t.get("variableId")?.value,variableValue:t.get("variableValue")?.value}))}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["ng-component"]],decls:11,vars:9,consts:[["header","_i18n.Integration"],[1,"subheader"],[3,"formGroup"],["data-qa","url-openIntegration-type","formControlName","autoOpenUrl",3,"options"],["label","_i18n.SupportedVariablesAre","data-qa","supported-variables-description"],[1,"ps-5"],[3,"translate"],["label","_i18n.OpenContactURL","formControlName","integrationsUrl","data-qa","integrations-url",3,"maxlength"],["controlName","integrationsUrl"],["valError","required"],["valError","whitespace"],["label","_i18n.LaunchApplicationNotify","data-qa","launch-integration-when"],["data-qa","select","formControlName","launchIntegrationWhen",3,"clearable","searchable"],[3,"value"],["label","_i18n.YourCRM","data-qa","client-side-crm-list"],["data-qa","select","formControlName","crmName",3,"clearable","searchable","placeholder"],["label","_i18n.CallLookupMode","data-qa","call-lookup"],["formArrayName","crmVariables"],[3,"formGroupName"],["data-qa","select","formControlName","callLookup",3,"clearable","searchable"],["data-qa","call-lookup-manual",3,"value"],["data-qa","call-lookup-ringing",3,"value"],["data-qa","call-lookup-connected",3,"value"],["formControlName","variableValue",3,"label","maxlength","hint"],["controlName","variableValue"],["valError","maxlength"]],template:function(i,o){if(1&i&&(e.j41(0,"app-page",0),e.nVh(1,dn,3,3,"h6",1),e.j41(2,"fieldset")(3,"legend"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.qex(6,2),e.nrm(7,"field-radio-group",3),e.nI1(8,"async"),e.nVh(9,mn,26,13)(10,bn,9,6),e.bVm(),e.k0s()()),2&i){let s;e.R7$(),e.vxM(o.isNewDesign()?1:-1),e.R7$(3),e.JRh(e.bMT(5,5,"_i18n.Integrations")),e.R7$(2),e.Y8G("formGroup",o.form),e.R7$(),e.Y8G("options",e.bMT(8,7,o.openUrlIntegrationOptions$)),e.R7$(2),e.vxM((s=o.f.autoOpenUrl.value)===o.AutoOpenUrl.IntegrationsUrl?9:s===o.AutoOpenUrl.ClientCrmUrl?10:-1)}},dependencies:[N.H,c.X1,c.BC,c.cb,c.tU,c.j4,c.JD,c.$R,c.v8,sn.u,be.z,h.Mm,ve.m,L.IH,L.VI,ie.vr,ie.xt,R.Jj,h.D9],styles:[".new-design [_nghost-%COMP%] ul[_ngcontent-%COMP%]{list-style:none;padding-left:var(--spacer)!important}.new-design [_nghost-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:var(--spacer-s)}.new-design [_nghost-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--label-color)}.new-design [_nghost-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{color:var(--text-primary);background:var(--input-background);font-weight:var(--bs-body-font-weight);padding:var(--spacer-xs) var(--spacer-s);border-radius:var(--border-radius)}"]})}return n})();function Ve(n,r){return t=>(0,U.z)([t,n.paramMap]).pipe((0,d.n)(([i,o])=>{const s=o.get("id"),p=s?parseInt(s,10):0,u=i.MyProfiles.Items.find(w=>w.Id===p);return u?(0,Y.of)({profile:(0,H.qt)(u,i.MobileNumber),extensionInfo:{Number:i.Number,MobileNumber:i.MobileNumber}}):(r.navigate(["people"]),he.w)}))}var Mn=l(99448);function yn(n,r){if(1&n){const t=e.RV6();e.j41(0,"app-forwarding-exceptions-editor",1),e.bIt("ngModelChange",function(o){a.eBV(t);const s=e.XpG();return a.Njj(s.updateProfile(o))}),e.k0s()}if(2&n){const t=r,i=e.XpG();e.Y8G("isPage",!i.isNewDesign())("ngModel",t.profile)("extensionInfo",t.extensionInfo)}}let Tn=(()=>{class n{profileService=(0,a.WQX)(ee._);myPhone=(0,a.WQX)(x.gx);route=(0,a.WQX)(v.nX);router=(0,a.WQX)(v.Ix);modalService=(0,a.WQX)(J.B);isNewDesign=(0,a.WQX)(_.T);profileContext=(0,g.ot)(this.myPhone.myPhoneSession.pipe((0,d.n)(t=>t.myInfo$),Ve(this.route,this.router)));updateProfile(t){const{extensionInfo:i}=this.profileContext();this.profileService.updateProfile$((0,H.am)(t,i.MobileNumber)).subscribe({error:o=>this.modalService.error(o)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["ng-component"]],decls:1,vars:1,consts:[[3,"isPage","ngModel","extensionInfo"],[3,"ngModelChange","isPage","ngModel","extensionInfo"]],template:function(i,o){if(1&i&&e.nV
1h(0,yn,1,3,"app-forwarding-exceptions-editor",0),2&i){let s;e.vxM((s=o.profileContext())?0:-1,s)}},dependencies:[Mn.c,c.X1,c.BC,c.YN,c.vS],encapsulation:2,changeDetection:0})}return n})();var Oe=l(18530),$n=l(1033),xn=l(1807),Pn=l(39974),wn=l(85343),Be=l(54360),Sn=l(58750),Rn=l(77048),Fn=l(37382),Gn=l(58973);function Dn(n,r){if(1&n){const t=e.RV6();e.j41(0,"app-forwarding-profile-editor",4,1),e.bIt("ngModelChange",function(o){a.eBV(t);const s=e.sdS(1),p=e.XpG(2);return a.Njj(s.valid&&p.pendingChanges$.next(o))}),e.k0s()}if(2&n){const t=r;e.Y8G("extensionInfo",t.extensionInfo)("ngModel",t.profile)}}function kn(n,r){if(1&n&&e.nVh(0,Dn,2,2,"app-forwarding-profile-editor",3),2&n){let t;const i=e.XpG();e.vxM((t=i.profileContext())?0:-1,t)}}function En(n,r){1&n&&e.eu8(0)}function Nn(n,r){if(1&n&&e.DNE(0,En,1,0,"ng-container",5),2&n){e.XpG();const t=e.sdS(1);e.Y8G("ngTemplateOutlet",t)}}function Vn(n,r){1&n&&e.eu8(0)}function On(n,r){if(1&n&&(e.j41(0,"app-page",2),e.DNE(1,Vn,1,0,"ng-container",5),e.k0s()),2&n){const t=e.XpG(),i=e.sdS(1);e.Y8G("header",t.header()),e.R7$(),e.Y8G("ngTemplateOutlet",i)}}let Ae=(()=>{class n{profileService=(0,a.WQX)(ee._);myPhone=(0,a.WQX)(x.gx);route=(0,a.WQX)(v.nX);router=(0,a.WQX)(v.Ix);modalService=(0,a.WQX)(J.B);isNewDesign=(0,a.WQX)(_.T);header=(0,g.ot)(this.route.data.pipe((0,m.T)(t=>t.navTitle)),{initialValue:""});profileContext=(0,g.ot)(this.myPhone.myPhoneSession.pipe((0,d.n)(t=>t.myInfo$),Ve(this.route,this.router)));pendingChanges$=new Oe.B;constructor(){const t=(0,a.WQX)(a.abz),i=new Oe.B;t.onDestroy(()=>i.next()),this.pendingChanges$.pipe(function In(n){return(0,Pn.N)((r,t)=>{let i=!1,o=null,s=null;const p=()=>{if(s?.unsubscribe(),s=null,i){i=!1;const u=o;o=null,t.next(u)}};r.subscribe((0,Be._)(t,u=>{s?.unsubscribe(),i=!0,o=u,s=(0,Be._)(t,p,wn.l),(0,Sn.Tg)(n(u)).subscribe(s)},()=>{p(),t.complete()},void 0,()=>{o=s=null}))})}(()=>(0,$n.O)((0,xn.O)(500),i)),(0,Rn.v)(()=>!t.destroyed,!0)).subscribe(o=>this.saveChanges(o))}saveChanges(t){const i=this.profileContext();if(!i)return;const{extensionInfo:{MobileNumber:o},profile:s}=i,p=(0,Gn.v)(s,(0,H.am)(t,o));p&&this.profileService.updateProfile$({...p,Id:s.Id,Name:s.Name}).subscribe({error:u=>this.modalService.error(u)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["ng-component"]],decls:4,vars:1,consts:[["profileEditor",""],["control","ngModel"],[3,"header"],[3,"extensionInfo","ngModel"],[3,"ngModelChange","extensionInfo","ngModel"],[4,"ngTemplateOutlet"]],template:function(i,o){1&i&&(e.DNE(0,kn,1,1,"ng-template",null,0,e.C5r),e.nVh(2,Nn,1,1,"ng-container")(3,On,2,2,"app-page",2)),2&i&&(e.R7$(2),e.vxM(o.isNewDesign()?2:3))},dependencies:[N.H,Fn.F,c.X1,c.BC,c.YN,c.vS,R.T3],encapsulation:2,changeDetection:0})}return n})();var Bn=l(34125),An=l(29912);const Un=["notificationFile"];function Ln(n,r){1&n&&e.nrm(0,"hr",4)}function jn(n,r){1&n&&e.eu8(0,6)}function Xn(n,r){if(1&n&&e.DNE(0,jn,1,0,"ng-container",9),2&n){e.XpG();const t=e.sdS(11);e.Y8G("ngTemplateOutlet",t)}}function Wn(n,r){1&n&&e.eu8(0)}function Qn(n,r){if(1&n&&e.DNE(0,Wn,1,0,"ng-container",10),2&n){e.XpG();const t=e.sdS(11);e.Y8G("ngTemplateOutlet",t)}}function Hn(n,r){if(1&n){const t=e.RV6();e.j41(0,"field-select",11),e.nI1(1,"async"),e.nI1(2,"async"),e.nI1(3,"async"),e.bIt("ngModelChange",function(o){a.eBV(t);const s=e.XpG();return a.Njj(s.setChatSoundFile(o))}),e.k0s()}if(2&n){const t=e.XpG();e.HbH(t.isNewDesign()?"maxw-px-400 mt-3 mb-0":""),e.Y8G("label",t.isNewDesign()?"_i18n.NotificationSoundLabel":"")("disabled",!e.bMT(1,6,t.playNewChatMessageSound$))("ngModel",e.bMT(2,8,t.chatSoundFile$))("options",e.bMT(3,10,t.chatSoundFileOptions$))}}function Yn(n,r){if(1&n){const t=e.RV6();e.j41(0,"button",12),e.bIt("click",function(){a.eBV(t);const o=e.XpG();return a.Njj(o.uploadNotification())}),e.nrm(1,"show-svg-images",13),e.EFF(2),e.nI1(3,"translate"),e.k0s()}2&n&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"_i18n.Upload")," "))}let Jn=(()=>{class n{settingsService=(0,a.WQX)(re.h);soundService=(0,a.WQX)(Bn.p);isNewDesign=(0,a.WQX)(_.T);notificationFileUpload;showChatNotifications$;playNewChatMessageSound$;chatSoundFile$;
1chatSoundFileOptions$=this.soundService.notifications$.pipe((0,m.T)(t=>t.map(i=>({value:i.name,label:i.label}))));constructor(){const t=this.settingsService,i=this.soundService,o=(0,a.WQX)(a.abz);this.playNewChatMessageSound$=t.generalSettings$.pipe((0,m.T)(s=>s.playNewChatMessageSound)),this.chatSoundFile$=t.generalSettings$.pipe((0,m.T)(s=>s.chatSoundFile),(0,K.H9)()),this.showChatNotifications$=t.generalSettings$.pipe((0,m.T)(s=>s.showChatToaster)),this.chatSoundFile$.pipe((0,X.F)(),(0,ae.i)(1),(0,g.pQ)(o)).subscribe(s=>{i.playNotificationByName(s)})}onShowChatNotificationsChange(t){this.settingsService.setField("showChatToaster",+t)}setChatSoundFile(t){this.settingsService.setField("chatSoundFile",t)}setPlayNewChatMessageSound(t){this.settingsService.setField("playNewChatMessageSound",t)}uploadNotification(){this.notificationFileUpload.nativeElement.value="",this.notificationFileUpload.nativeElement.click()}onNotificationSelected(t){if(!t||0===t.length)return;const i=t[0],o=new FileReader;o.onload=s=>this.soundService.uploadNotificationFile(s.target.result,i.name).pipe((0,k.s)(1)).subscribe(p=>this.setChatSoundFile(p.name)),o.readAsArrayBuffer(i)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["ng-component"]],viewQuery:function(i,o){if(1&i&&e.GBs(Un,5),2&i){let s;e.mGM(s=e.lsd())&&(o.notificationFileUpload=s.first)}},decls:15,vars:16,consts:[["soundSelect",""],["notificationFile",""],["header","_i18n.Chat","data-qa","chat-settings"],["data-qa","show-chat-toaster","id","inputShowChatToaster","label","_i18n.ShowChatToaster",3,"ngModelChange","ngModel","switch","description"],[1,"thick"],["id","inputPlayNewChatMessageSound","data-qa","play-new-message-sound","label","_i18n.PlayChatNotification",3,"ngModelChange","ngModel","switch","description"],["ngProjectAs","label-content",5,["label-content"]],["type","file","hidden","","accept","audio/x-mp3,audio/wav,audio/ogg",3,"change"],["type","button","id","btnUploadNotification"],["ngProjectAs","label-content",5,["label-content"],4,"ngTemplateOutlet"],[4,"ngTemplateOutlet"],["data-qa","sound-file",3,"ngModelChange","label","disabled","ngModel","options"],["type","button","id","btnUploadNotification",3,"click"],["svg","halflings halflings-upload"]],template:function(i,o){if(1&i){const s=e.RV6();e.j41(0,"app-page",2)(1,"fieldset")(2,"field-checkbox",3),e.nI1(3,"async"),e.bIt("ngModelChange",function(u){return o.onShowChatNotificationsChange(u)}),e.k0s(),e.nVh(4,Ln,1,0,"hr",4),e.j41(5,"div")(6,"field-checkbox",5),e.nI1(7,"async"),e.bIt("ngModelChange",function(u){return o.setPlayNewChatMessageSound(u)}),e.nVh(8,Xn,1,1,"ng-container",6),e.k0s(),e.nVh(9,Qn,1,1,"ng-container"),e.DNE(10,Hn,4,12,"ng-template",null,0,e.C5r),e.j41(12,"input",7,1),e.bIt("change",function(){a.eBV(s);const u=e.sdS(13);return a.Njj(o.onNotificationSelected(u.files))}),e.k0s()(),e.nVh(14,Yn,4,3,"button",8),e.k0s()()}2&i&&(e.R7$(2),e.Y8G("ngModel",e.bMT(3,12,o.showChatNotifications$))("switch",o.isNewDesign())("description",o.isNewDesign()?"_i18n.ShowChatToasterDescription":""),e.R7$(2),e.vxM(o.isNewDesign()?4:-1),e.R7$(),e.HbH(o.isNewDesign()?"":"d-flex align-items-center gap-3"),e.R7$(),e.Y8G("ngModel",e.bMT(7,14,o.playNewChatMessageSound$))("switch",o.isNewDesign())("description",o.isNewDesign()?"_i18n.PlayChatNotificationDescription":""),e.R7$(2),e.vxM(o.isNewDesign()?8:-1),e.R7$(),e.vxM(o.isNewDesign()?-1:9),e.R7$(5),e.vxM(-1))},dependencies:[N.H,z.t,c.X1,c.BC,c.YN,c.vS,se.q,An.d,R.T3,R.Jj,h.D9],encapsulation:2,changeDetection:0})}return n})();var Ue=l(67895),Kn=l(72960);function zn(n,r){1&n&&(e.j41(0,"h6",1),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(),e.JRh(e.bMT(2,1,"_i18n.ConfigureBLF")))}let Zn=(()=>{class n{formControl=new c.MJ([],{nonNullable:!0});isNewDesign=(0,a.WQX)(_.T);constructor(){const t=(0,a.WQX)(x.gx),i=(0,a.WQX)(J.B),o=(0,a.WQX)(q.gRc),s=(0,a.WQX)(a.abz);t.myPhoneSession.pipe((0,d.n)(p=>p.myInfo$.pipe((0,X.F)((u,w)=>u.Id===w.Id),(0,m.T)(u=>u.SharedBlfs))),(0,g.pQ)(s)).subscribe(p=>{this.formControl.setValue((0,Ue.MI)(p),{emitEvent:!1}),this.formControl.markAsUntouched(),o.markForCheck()}),this.formControl.valueChanges.pipe((0,Ee.Z)(1),(0,B.p)(()=>this.formControl.valid),(0,m.T)(Ue.GD),(0,X.F)(),(0,d.n)(p=>t.myPhoneSession.pipe((0,d.n)(u=>u.get(new ge.Eyr({SharedBlfs:p}))),(0,j.Tg)(i))),(0,g.pQ)(s)).subscribe()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["app-blf-editor"]],decls:3,vars:3,consts:[["header","_i18n.BLF",1,"show-validation"],[1,"subheader"],[3,"formControl","forCurrentUser"]],template:function(i,o){1&i&&(e.j41(0,"app-page",0),e.nVh(1,zn,3,3,"h6",1),e.nrm(2,"app-blf-list",2),e.k0s()),2&i&&(e.R7$(),e.vxM(o.isNewDesign()?1:-1),e.R7$(),e.Y8G("formControl",o.formControl)("forCurrentUser",!0))},dependencies:[N.H,Kn.I,c.X1,c.BC,c.l_,h.D9],encapsulation:2,changeDetection:0})}return n})();const Me=n=>{const r=(0,a.WQX)(ee._),t=+n.params.id;return(0,U.z)([r.forwardingAndExceptionsProfiles$,r.profileDisplayNames$]).pipe((0,m.T)(([i,o]
1)=>{const s=i.find(p=>p.Id===t);return s?s.CustomName||o[s.Name]:""}),(0,k.s)(1))};var qn=l(36550),Le=l(70152);function ei(n,r){if(1&n&&e.nrm(0,"app-user-schedule",2),2&n){const t=e.XpG();e.Y8G("formControl",t.schedule)}}function ti(n,r){1&n&&e.eu8(0)}function ni(n,r){if(1&n&&e.DNE(0,ti,1,0,"ng-container",3),2&n){e.XpG();const t=e.sdS(1);e.Y8G("ngTemplateOutlet",t)}}function ii(n,r){1&n&&e.eu8(0)}function oi(n,r){if(1&n&&(e.j41(0,"app-page",1),e.DNE(1,ii,1,0,"ng-container",3),e.k0s()),2&n){e.XpG();const t=e.sdS(1);e.R7$(),e.Y8G("ngTemplateOutlet",t)}}let ai=(()=>{class n{route=(0,a.WQX)(v.nX);myUser=(0,a.WQX)(Q.b);modal=(0,a.WQX)(J.B);destroyRef=(0,a.WQX)(a.abz);user=this.route.snapshot.data.user;schedule=new c.MJ({Hours:this.user.Hours,OfficeHoursProps:this.user.OfficeHoursProps,BreakTime:this.user.BreakTime},{nonNullable:!0});pendingChanges$=new oe.t(null);isNewDesign=(0,a.WQX)(_.T);constructor(){this.schedule.markAsUntouched(),this.schedule.valueChanges.pipe((0,B.p)(()=>this.schedule.valid),(0,g.pQ)(this.destroyRef)).subscribe(t=>this.pendingChanges$.next(t)),this.pendingChanges$.pipe((0,B.p)(Boolean),(0,Le.B)(500),(0,g.pQ)(this.destroyRef)).subscribe(()=>this.save()),this.destroyRef.onDestroy(()=>this.save())}save(){if(!this.pendingChanges$.value)return;const t={PrimaryGroupId:this.user.PrimaryGroupId,...this.pendingChanges$.value};this.myUser.updateMyUser({pbxUser:t}).pipe((0,j.Tg)(this.modal)).subscribe(),this.pendingChanges$.next(null)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["ng-component"]],decls:4,vars:1,consts:[["scheduleEditor",""],["header","_i18n.Schedule"],[3,"formControl"],[4,"ngTemplateOutlet"]],template:function(i,o){1&i&&(e.DNE(0,ei,1,1,"ng-template",null,0,e.C5r),e.nVh(2,ni,1,1,"ng-container")(3,oi,2,1,"app-page",1)),2&i&&(e.R7$(2),e.vxM(o.isNewDesign()?2:3))},dependencies:[N.H,qn.q,c.X1,c.BC,c.l_,R.T3],encapsulation:2,changeDetection:0})}return n})();var ce=l(19037),si=l(97273),ci=l(51883);let di=(()=>{class n{route=(0,a.WQX)(v.nX);myUser=(0,a.WQX)(Q.b);xapiErrors=(0,a.WQX)(Se.Ko);cd=(0,a.WQX)(q.gRc);destroyRef=(0,a.WQX)(a.abz);user=this.route.snapshot.data.user;navTitle=this.route.snapshot.data.navTitle;form=(0,Ce.RF)(this.user);ngOnInit(){const{webMeetingApproveParticipants:t,clickToCallId:i}=this.form.controls;let o=null;(0,ke.h)(t.valueChanges.pipe((0,ae.i)(1),(0,m.T)(s=>({WebMeetingApproveParticipants:s}))),i.valueChanges.pipe((0,ae.i)(1),(0,B.p)(()=>i.valid||i.disabled),(0,m.T)(s=>({ClickToCallId:s,WebMeetingFriendlyName:s})))).pipe((0,fe.M)(s=>{o=s}),(0,Le.B)(500),(0,g.pQ)(this.destroyRef)).subscribe(s=>{this.updateUser(s),o=null}),this.destroyRef.onDestroy(()=>{o&&this.updateUser(o)}),this.form.markAsTouched()}updateUser(t){this.myUser.updateMyUser({pbxUser:t}).subscribe({error:i=>this.xapiErrors.error(this.cd,i,this.form)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["ng-component"]],decls:2,vars:4,consts:[[3,"header"],[3,"form","hideCallUsRequirement","showValidation"]],template:function(i,o){1&i&&(e.j41(0,"app-page",0),e.nrm(1,"app-user-talk-and-meet",1),e.k0s()),2&i&&(e.Y8G("header",o.navTitle),e.R7$(),e.Y8G("form",o.form)("hideCallUsRequirement",!0)("showValidation",!0))},dependencies:[N.H,ci.v],encapsulation:2,changeDetection:0})}return n})();var ui=l(25146),mi=l(98016),hi=l(53349),gi=l.n(hi);const je=n=>()=>{const r=(0,a.WQX)(mi.I),t=(0,a.WQX)(ce.s);return function fi(n,r){const t=(new Date).toISOString();return n.listRefreshToken({$select:["Id","Used","UsedByIp","UsedByUserAgent","Token","Expires"],$filter:`Revoked eq null and Expires gt ${t}`,$orderby:["Used desc"],$top:r}).pipe((0,m.T)(i=>i.value?.map(o=>{const s=gi().getParser(o.UsedByUserAgent||"unknown");return{id:o.Id,ua:o.UsedByUserAgent,bowser:s.getResult(),usedByIp:o.UsedByIp,lastUsed:o.Used,token:o.Token,expires:o.Expires}})??[]))}(r,n).pipe((0,W.W)(i=>t.handleError(i)))};var de=l(90558);let Xe=(()=>{class n{settingsService=(0,a.WQX)(re.h);deviceService=(0,a.WQX)(de.gc);errors={InvalidReplacePlusWith:!1};userSelectedPhoneDevice$;phones$;expandPhoneBookPlusEnabled$;expandPhoneBookPlus$;expandPhoneBookPlus;
1expandPhoneBookPlusSubscription;constructor(){const t=this.settingsService;this.expandPhoneBookPlusEnabled$=t.generalSettings$.pipe((0,m.T)(i=>i.expandPhoneBookPlusEnabled)),this.expandPhoneBookPlus$=t.generalSettings$.pipe((0,m.T)(i=>i.expandPhoneBookPlus)),this.expandPhoneBookPlusSubscription=this.expandPhoneBookPlus$.subscribe(i=>{this.expandPhoneBookPlus=i}),this.userSelectedPhoneDevice$=this.deviceService.selectedPhoneDevice$.pipe((0,m.T)(i=>i?i.Contact:void 0)),this.phones$=this.deviceService.phones$}setPhoneBookPlusEnabled(t){this.expandPhoneBookPlus$.pipe((0,k.s)(1)).subscribe(i=>{t?this.setPhoneBookPlus(i):this.settingsService.setField("expandPhoneBookPlus",i),this.errors.InvalidReplacePlusWith=!1,this.settingsService.setField("expandPhoneBookPlusEnabled",t)})}setPhoneBookPlus(t){t&&/^[0-9]+$/.test(t)?(this.errors.InvalidReplacePlusWith=!1,this.settingsService.setField("expandPhoneBookPlus",t)):this.errors.InvalidReplacePlusWith=!0}getIpAddress(t){return(0,de.Ni)(t.Contact)}selectedPhonesDeviceChange(t){t&&this.deviceService.phones$.pipe((0,k.s)(1)).subscribe(i=>{const o=i.find(s=>s.Contact===t);o&&this.deviceService.selectPhoneDevice(o)})}ngOnDestroy(){this.expandPhoneBookPlusSubscription.unsubscribe()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=a.jDH({token:n,factory:n.\u0275fac})}return n})();var vi=l(48615),ye=l(12539),pe=l(90422);let We=(()=>{class n{dms=(0,a.WQX)(ye.q);myPhone=(0,a.WQX)(x.gx);label;selectedDevice$;storageKey;deviceList$;selectedDeviceRefreshed$=new oe.t(void 0);listRefreshed$=new oe.t(void 0);list$=this.listRefreshed$.pipe((0,d.n)(()=>this.deviceList$??(0,Y.of)([])));isDisabled$=(0,pe.lo)(this.myPhone).pipe((0,d.n)(t=>t?this.list$.pipe(pe.MC):(0,Y.of)(!0)));options$=this.list$.pipe((0,m.T)(t=>t.map(i=>({value:i.label,label:i.label}))));value$=this.selectedDeviceRefreshed$.pipe((0,d.n)(()=>this.selectedDevice$??(0,Y.of)(null)),pe.d7);ngOnChanges(t){t.selectedDevice$&&this.selectedDeviceRefreshed$.next(),t.deviceList$&&this.listRefreshed$.next()}save(t){this.dms.save(this.storageKey,t)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["app-media-device-selector"]],inputs:{label:"label",selectedDevice$:"selectedDevice$",storageKey:"storageKey",deviceList$:"deviceList$"},features:[e.OA$],decls:4,vars:10,consts:[[3,"ngModelChange","label","options","ngModel","disabled"]],template:function(i,o){1&i&&(e.j41(0,"field-select",0),e.nI1(1,"async"),e.nI1(2,"async"),e.nI1(3,"async"),e.bIt("ngModelChange",function(p){return o.save(p)}),e.k0s()),2&i&&e.Y8G("label",o.label)("options",e.bMT(1,4,o.options$))("ngModel",e.bMT(2,6,o.value$))("disabled",e.bMT(3,8,o.isDisabled$)??!0)},dependencies:[se.q,c.X1,c.BC,c.YN,c.vS,R.Jj],encapsulation:2})}return n})();function Ci(n,r){1&n&&(e.j41(0,"div",0)(1,"p"),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&n&&(e.R7$(2),e.JRh(e.bMT(3,1,r)))}let bi=(()=>{class n{deviceMedia=(0,a.WQX)(ye.q);myPhone=(0,a.WQX)(x.gx);destroy$=(0,a.WQX)(a.abz);LocalStorageKeys=D.Hh;deviceAlert$=(0,U.z)([(0,pe.lo)(this.myPhone),this.deviceMedia.videoDeviceList$,this.deviceMedia.microphoneDeviceList$]).pipe((0,m.T)(([t,i,o])=>this.getDeviceAlert(!t,!i.length,!o.length)),(0,g.pQ)(this.destroy$));ngOnInit(){this.deviceMedia.requestPermissions()}getDeviceAlert(t,i,o){return t?"_i18n.NotMediaDevice":i?o?"_i18n.PermissionDidntGrant":"_i18n.CameraDoesNotExist":o?"_i18n.MicDoesNotExist":""}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["app-media-device-options"]],decls:5,vars:12,consts:[["data-qa","device-alert","role","alert",1,"alert","alert-warning"],["data-qa","camera-device","label","_i18n.VideoDeviceCamera",3,"deviceList$","selectedDevice$","storageKey"],["data-qa","speaker-device","label","_i18n.DeviceSpeaker",3,"deviceList$","selectedDevice$","storageKey"],["data-qa","microphone-device","label","_i18n.Microphone",3,"deviceList$","selectedDevice$","storageKey"]],template:function(i,o){if(1&i&&(e.nVh(0,Ci,4,3,"div",0),e.nI1(1,"async"),e.nrm(2,"app-media-device-selector",1)(3,"app-media-device-selector",2)(4,"app-media-device-selector",3)),2&i){let s;e.vxM((s=e.bMT(1,10,o.deviceAlert$))?0:-1,s),e.R7$(2),e.Y8G("deviceList$",o.deviceMedia.videoDeviceList$)("selectedDevice$",o.deviceMedia.selectedInputVideoDevice$)("storageKey",o.LocalStorageKeys.SelectedCamera),e.R7$(),e.Y8G("deviceList$",o.deviceMedia.audioDeviceList$)("selectedDevice$",o.deviceMedia.selectedOutputAudioDevice$)("storageKey",o.LocalStorageKeys.SelectedSpeaker),e.R7$(),e.Y8G("deviceList$",o.deviceMedia.microphoneDeviceList$)("selectedDevice$",o.deviceMedia.selectedInputAudioDevice$)("storageKey",o.LocalStorageKeys.SelectedMicrophone)}},dependencies:[We,R.Jj,h.D9],encapsulation:2,changeDetection:0})}return n})();var _i=l(86908),Mi=l(85260);function yi(n,r){if(1&n&&(e.j41(0,"alert",2),e.nrm(1,"app-server-error",3),e.k0s()),2&n){const t=r;e.Y8G("type",e.mNQ(t.alertClass)),e.R7$(),e.Y8G("message",t.text)}}function Ti(n,r){if(1&n&&(e.nVh(0,yi,2,3,"alert",2),e.nI1(1,"async")),2&n){let t;const i=e.XpG();e.vxM((t=e.bMT(1,1,i.diagnostics$))?0:-1,t)}}function $i(n,r){if(1&n){const t=e.RV6();e.j41(0,"button",4),e.bIt("click",function(){a.eBV(t);const o=e.XpG();
1return a.Njj(o.connectDevice())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"_i18n.ConnectHeadset")," "))}let xi=(()=>{class n{headsetService=(0,a.WQX)(_i.i);myPhone=(0,a.WQX)(x.gx);isHeadsetSelectorDisabled$=this.myPhone.myPhoneSession.pipe((0,d.n)(t=>t.webRTCEndpoint$),(0,m.T)(t=>!t.isWebRTCEnpointRegistered||t.Items.length>0),(0,X.F)());diagnostics$=this.isHeadsetSelectorDisabled$.pipe((0,d.n)(t=>t?(0,Y.of)(void 0):this.headsetService.diagnostics$));headsetOptions=this.headsetService.AvailableHeadsets;storageHeadset=(0,Z.I)(D.Hh.SelectedHeadset,"");get selectedHeadset(){const t=this.headsetService.normalizeHeadsetName(this.storageHeadset());return this.headsetService.isHeadsetAvailable(t)?t:""}set selectedHeadset(t){this.storageHeadset.set(t)}connectDevice(){this.headsetService.connectDevice()}get showConnectDevice(){switch(this.selectedHeadset){case"generic":case"jabraLegacy":case"yealinkHID":return!0;default:return!1}}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["app-headset-selector"]],decls:4,vars:7,consts:[["data-qa","selected-headset",3,"ngModelChange","options","ngModel","disabled"],["type","button",1,"btn","btn-primary","mb-3"],[1,"dashed_container",3,"type"],[3,"message"],["type","button",1,"btn","btn-primary","mb-3",3,"click"]],template:function(i,o){1&i&&(e.j41(0,"field-select",0),e.nI1(1,"async"),e.mxI("ngModelChange",function(p){return e.DH7(o.selectedHeadset,p)||(o.selectedHeadset=p),p}),e.k0s(),e.nVh(2,Ti,2,3),e.nVh(3,$i,3,3,"button",1)),2&i&&(e.Y8G("options",o.headsetOptions),e.R50("ngModel",o.selectedHeadset),e.Y8G("disabled",e.bMT(1,5,o.isHeadsetSelectorDisabled$)??!1),e.R7$(2),e.vxM(o.selectedHeadset?2:-1),e.R7$(),e.vxM(o.showConnectDevice?3:-1))},dependencies:[se.q,c.X1,c.BC,c.YN,c.vS,Mi.Cy,we.J,R.Jj,h.D9],encapsulation:2})}return n})();var Pi=l(38900);
1function wi(n,r){1&n&&(e.j41(0,"ng-option",3),e.EFF(1,"None"),e.k0s()),2&n&&e.Y8G("value",void 0)("translate","_i18n.DNType_None")}function Si(n,r){if(1&n&&e.EFF(0),2&n){const t=e.XpG().$implicit,i=e.XpG();e.SpI(" (",i.av.getIpAddress(t),") ")}}function Ii(n,r){if(1&n&&(e.j41(0,"ng-option",4),e.EFF(1),e.nI1(2,"stripUserAgent"),e.nI1(3,"translate"),e.nVh(4,Si,1,1),e.k0s()),2&n){const t=r.$implicit,i=e.XpG();e.Y8G("value",t.Contact),e.R7$(),e.SpI(" ",e.bMT(3,5,e.bMT(2,3,t.UserAgent))," "),e.R7$(3),e.vxM(i.showIp(t)?4:-1)}}function Ri(n,r){1&n&&(e.j41(0,"div",10),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"_i18n.WarningForInvalidReplacePrefix")," "))}function Fi(n,r){1&n&&(e.j41(0,"fieldset")(1,"legend"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.nrm(4,"app-headset-selector"),e.k0s()),2&n&&(e.R7$(2),e.JRh(e.bMT(3,1,"_i18n.SelectHeadset")))}let Gi=(()=>{class n{av=(0,a.WQX)(Xe);deviceMedia=(0,a.WQX)(ye.q);LocalStorageKeys=D.Hh;get isHeadsetSelectorAvailable(){return!vi.gm}showIp(t){return!(0,de.F0)(t)&&!(0,de.JD)(t)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["app-audio-video"]],features:[e.Jv_([Xe])],decls:27,vars:26,consts:[["header","_i18n.MediaDeviceOptions"],["label","_i18n.UseDeviceForCalls","data-qa","device-for-calls"],["id","selectPhoneDevice","data-qa","select",3,"ngModelChange","ngModel"],[3,"value","translate"],[3,"value"],["data-qa","ringer-device","label","_i18n.DeviceRinger",3,"deviceList$","selectedDevice$","storageKey"],[1,"mb-3"],[1,"d-flex","align-items-center"],["id","chkSetPlusEnabled","label","_i18n.ReplacePlusWith",1,"mb-0",3,"ngModelChange","ngModel"],["id","inputPhoneBookPlus","maxlength","4",1,"sr-with","form-control",3,"ngModelChange","ngModel","disabled"],[1,"val-errors"],[1,"d-block"]],template:function(i,o){if(1&i&&(e.j41(0,"app-page",0)(1,"fieldset")(2,"legend"),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"field-wrapper",1)(6,"ng-select",2),e.nI1(7,"async"),e.bIt("ngModelChange",function(p){return o.av.selectedPhonesDeviceChange(p)}),e.nVh(8,wi,2,2,"ng-option",3),e.nI1(9,"async"),e.Z7z(10,Ii,5,7,"ng-option",4,e.fX1),e.nI1(12,"async"),e.k0s()(),e.nrm(13,"app-media-device-selector",5),e.j41(14,"div",6)(15,"div",7)(16,"field-checkbox",8),e.nI1(17,"async"),e.bIt("ngModelChange",function(p){return o.av.setPhoneBookPlusEnabled(p)}),e.k0s(),e.j41(18,"input",9),e.nI1(19,"async"),e.mxI("ngModelChange",function(p){return e.DH7(o.av.expandPhoneBookPlus,p)||(o.av.expandPhoneBookPlus=p),p}),e.bIt("ngModelChange",function(p){return o.av.setPhoneBookPlus(p)}),e.k0s()(),e.nVh(20,Ri,3,3,"div",10),e.k0s()(),e.j41(21,"fieldset")(22,"legend"),e.EFF(23),e.nI1(24,"translate"),e.k0s(),e.nrm(25,"app-media-device-options",11),e.k0s(),e.nVh(26,Fi,5,3,"fieldset"),e.k0s()),2&i){let s;e.R7$(3),e.JRh(e.bMT(4,12,"_i18n.CallSettings")),e.R7$(3),e.Y8G("ngModel",e.bMT(7,14,o.av.userSelectedPhoneDevice$)),e.R7$(2),e.vxM(0===(null==(s=e.bMT(9,16,o.av.phones$))?null:s.length)?8:-1),e.R7$(2),e.Dyx(e.bMT(12,18,o.av.phones$)),e.R7$(3),e.Y8G("deviceList$",o.deviceMedia.audioDeviceList$)("selectedDevice$",o.deviceMedia.selectedRingerDevice$)("storageKey",o.LocalStorageKeys.SelectedRinger),e.R7$(3),e.Y8G("ngModel",e.bMT(17,20,o.av.expandPhoneBookPlusEnabled$)),e.R7$(2),e.R50("ngModel",o.av.expandPhoneBookPlus),e.Y8G("disabled",!e.bMT(19,22,o.av.expandPhoneBookPlusEnabled$)),e.R7$(2),e.vxM(o.av.errors.InvalidReplacePlusWith?20:-1),e.R7$(3),e.JRh(e.bMT(24,24,"_i18n.MediaDeviceOptions")),e.R7$(3),e.vxM(o.isHeadsetSelectorAvailable?26:-1)}},dependencies:[N.H,be.z,ie.vr,Re.c,c.X1,c.me,c.BC,c.tU,c.YN,c.vS,ie.xt,h.Mm,We,z.t,bi,xi,R.Jj,h.D9,Pi.x],styles:["input.sr-with[_ngcontent-%COMP%]{width:55px;display:inline-block;margin-left:10px;text-align:center}"]})}return n})();var Di=l(28073),ki=l(76928),Ei=l(54495);const Ni=()=>["+name"];function Vi(n,r){if(1&n){const t=e.RV6();e.j41(0,"field-checkbox",5),e.bIt("ngModelChange",function(o){const s=a.eBV(t).$implicit,p=e.XpG(2).$implicit,u=e.XpG();return a.Njj(u.selectGroup(p,s,o))}),e.k0s()}if(2&n){const t=r.$implicit,i=e.XpG(2).$implicit,o=e.XpG();e.Y8G("ngModel",o.isGroupSelected(i,t))("label",t.name)}}function Oi(n,r){if(1&n&&(e.j41(0,"div",1)(1,"div",2),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",3),e.Z7z(5,Vi,1,2,"field-checkbox",4,e.fX1),e.nI1(7,"notFavoritesGroup"),e.nI1(8,"groupsSort"),e.k0s()()),2&n){const t=e.XpG().$implicit;e.R7$(2),e.JRh("local"===t.id?e.bMT(3,1,"_i18n.PresenceLocalPbx"):t.name),e.R7$(3),e.Dyx(e.bMT(8,5,e.bMT(7,3,t.groups)))}}function Bi(n,r){if(1&n&&(e.j41(0,"div",0),e.nVh(1,Oi,9,7,"div",1),e.k0s()),2&n){const t=r.$implicit;e.R7$(),e.vxM(t.isAllowed&&t.isConnected?1:-1)}}let Ai=(()=>{class n{myphone=(0,a.WQX)(x.gx);hiddenGroups=(0,Z.I)(D.Hh.HiddenGroups,[]);bridges$;constructor(){const i=this.myphone.myPhoneSession.pipe((0,d.n)(o=>o.bridgesMap$));this.bridges$=i.pipe((0,m.T)(o=>Object.values(o)))}isGroupSelected(t,i){return!this.hiddenGroups().some(o=>o===this.getStringId(t,i))}selectGroup(t,i,o){const s=this.hiddenGroups(),p=this.getStringId(t,i);if(o){const u=s.indexOf(p);-1!==u&&s.splice(u,1)}else s.some(u=>u===p)||s.push(p);this.hiddenGroups.set(s)}getStringId(t,i){return t.id+"@"+i.id}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["app-settings-groups"]],decls:7,vars:9,consts:[["data-qa","bridge"],[1,"card"],[1,"card-header"],[1,"card-body","pb-2"],["data-qa","group",1,"mb-2",3,"ngModel","label"],["data-qa","group",1,"mb-2",3,"ngModelChange","ngModel","label"]],template:function(i,o){1&i&&(e.j41(0,"p"),e.EFF(1),e.nI1(2,"translate"),e.k0s(),e.Z7z(3,Bi,2,1,"div",0,e.fX1),e.nI1(5,"async"),e.nI1(6,"orderBy")),2&i&&(e.R7$(),e.JRh(e.bMT(2,1,"_i18n.GroupsViewDescription")),e.R7$(2),e.Dyx(e.i5U(6,5,e.bMT(5,3,o.bridges$),e.lJ4(8,Ni))))},dependencies:[z.t,c.X1,c.BC,c.YN,c.vS,Di.u,ki.m,R.Jj,h.D9,Ei.P],encapsulation:2})}return n})(),Ui=(()=>{class n{showUnregisteredExtensions=(0,Z.I)(D.Hh.ShowUnregisteredExtensions,!0);sortByExtensionNumber=(0,Z.I)(D.Hh.SortByExtensionNumber,!1);displayCallRecentsInDialer=(0,Z.I)(D.Hh.DisplayCallRecentsInDialer,!1);static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["app-settings-status-view"]],decls:3,vars:3,consts:[["id","chkShowUnregisteredExtensions","data-qa","show-unregistered-extensions","label","_i18n.ShowUnregisteredExtensions",3,"ngModelChange","ngModel"],["id","chkSortByExtensionNumber","data-qa","sort-by-extension-number","label","_i18n.SortByExtensionNumber",3,"ngModelChange","ngModel"],["data-qa","display-call-recents-in-dialer","label","_i18n.DisplayCallRecentsInDialer",3,"ngModelChange","ngModel"]],template:function(i,o){1&i&&(e.j41(0,"field-checkbox",0),e.mxI("ngModelChange",function(p){return e.DH7(o.showUnregisteredExtensions,p)||(o.showUnregisteredExtensions=p),p}),e.k0s(),e.j41(1,"field-checkbox",1),e.mxI("ngModelChange",function(p){return e.DH7(o.sortByExtensionNumber,p)||(o.sortByExtensionNumber=p),p}),e.k0s(),e.j41(2,"field-checkbox",2),e.mxI("ngModelChange",function(p){return e.DH7(o.displayCallRecentsInDialer,p)||(o.displayCallRecentsInDialer=p),p}),e.k0s()),2&i&&(e.R50("ngModel",o.showUnregisteredExtensions),e.R7$(),e.R50("ngModel",o.sortByExtensionNumber),e.R7$(),e.R50("ngModel",o.displayCallRecentsInDialer))},dependencies:[z.t,c.X1,c.BC,c.YN,c.vS],encapsulation:2})}return n})();var Qe=l(12426),He=l(42318),Li=l(67290);let ji=(()=>{class n{localStorageService=(0,a.WQX)(Qe.sj);filter=new He.i;subscription;selectedFilterKeys=[];
1checkboxOptions=[{value:"showRingingExternalCalls",label:"_i18n.ShowRingingExternalCalls"},{value:"showParkedCalls",label:"_i18n.ShowParkedCalls"},{value:"showExternalConnectedCalls",label:"_i18n.ShowExternalConnectedCalls"},{value:"showInternalConnectedCalls",label:"_i18n.ShowInternalConnectedCalls"},{value:"showIvrCalls",label:"_i18n.ShowIVRCalls"},{value:"showQueueCalls",label:"_i18n.ShowQueueCalls"}];ngOnInit(){this.subscription=(0,j.lB)(this.localStorageService,D.Hh.ActiveCallsFilter,new He.i).subscribe(t=>{this.filter=t,this.onFilterLoaded()})}ngOnDestroy(){this.subscription.unsubscribe()}onSelectedFilterKeysChange(t){Object.keys(this.filter).forEach(i=>{this.filter[i]=t.includes(i)}),this.localStorageService.store(D.Hh.ActiveCallsFilter,this.filter)}onFilterLoaded(){this.selectedFilterKeys=Object.keys(this.filter).filter(t=>this.filter[t])}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["calls-filter"]],decls:1,vars:2,consts:[["data-qa","calls-filter",3,"ngModelChange","options","ngModel"]],template:function(i,o){1&i&&(e.j41(0,"field-checkbox-group",0),e.bIt("ngModelChange",function(p){return o.onSelectedFilterKeysChange(p)}),e.k0s()),2&i&&e.Y8G("options",o.checkboxOptions)("ngModel",o.selectedFilterKeys)},dependencies:[Li.c,c.X1,c.BC,c.YN,c.vS],encapsulation:2})}return n})();class Xi{id;visible;name;constructor(r){Object.assign(this,r)}}function Wi(n,r){if(1&n){const t=e.RV6();e.j41(0,"field-checkbox",1),e.bIt("ngModelChange",function(o){const s=a.eBV(t).$implicit,p=e.XpG();return a.Njj(p.setVisible(o,s.id))}),e.k0s()}if(2&n){const t=r.$implicit;e.Y8G("ngModel",t.visible)("label",t.name)}}let Qi=(()=>{class n{localStorage=(0,a.WQX)(Qe.sj);myPhoneService=(0,a.WQX)(x.gx);storageKey;queues$;ngOnInit(){const t=this.myPhoneService.myPhoneSession.pipe((0,d.n)(o=>o.queues$),(0,m.T)(o=>Object.values(o)),(0,B.p)(o=>void 0!==o),(0,k.s)(1)),i=(0,j.lB)(this.localStorage,this.storageKey,[]);this.queues$=(0,U.z)([t,i]).pipe((0,m.T)(o=>{const[s,p]=o;return void 0===s?[]:s.map(u=>new Xi({id:u.id,visible:!p.includes(u.id),name:`${u.queueNumber} ${u.name}`}))}))}identify(t,i){return i.id}setVisible(t,i){const o=this.localStorage.retrieve(this.storageKey)||[],s=o.indexOf(i);t&&-1!==s?(o.splice(s,1),this.localStorage.store(this.storageKey,o)):!t&&-1===s&&(o.push(i),this.localStorage.store(this.storageKey,o))}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["queue-filter"]],inputs:{storageKey:"storageKey"},decls:3,vars:2,consts:[["data-qa","queue-filter",3,"ngModel","label"],["data-qa","queue-filter",3,"ngModelChange","ngModel","label"]],template:function(i,o){1&i&&(e.Z7z(0,Wi,1,2,"field-checkbox",0,o.identify,!0),e.nI1(2,"async")),2&i&&e.Dyx(e.bMT(2,0,o.queues$))},dependencies:[z.t,c.X1,c.BC,c.YN,c.vS,R.Jj],encapsulation:2})}return n})();function Hi(n,r){if(1&n){const t=e.RV6();e.j41(0,"fieldset")(1,"legend"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"p"),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.nrm(7,"queue-filter",2),e.k0s(),e.j41(8,"fieldset")(9,"legend"),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"field-input",3),e.nI1(13,"async"),e.bIt("ngModelChange",function(o){a.eBV(t);const s=e.XpG();return a.Njj(s.setCustomMessage(o))}),e.k0s(),e.j41(14,"field-input",4),e.nI1(15,"async"),e.bIt("ngModelChange",function(o){a.eBV(t);const s=e.XpG();return a.Njj(s.setOptionalMessage(o))}),e.k0s(),e.j41(16,"div",5)(17,"div",6),e.EFF(18),e.nI1(19,"translate"),e.k0s(),e.j41(20,"div",7),e.nrm(21,"queue-filter",2),e.k0s()()()}if(2&n){const t=e.XpG();e.R7$(2),e.JRh(e.bMT(3,12,"_i18n.Queues")),e.R7$(3),e.JRh(e.bMT(6,14,"_i18n.QueuesViewDescription")),e.R7$(2),e.Y8G("storageKey",t.SwitchboardQueueFilter),e.R7$(3),e.JRh(e.bMT(11,16,"_i18n.Wallboard")),e.R7$(2),e.Y8G("label","_i18n.WallboardCustomMessage1")("ngModel",e.bMT(13,18,t.customMessage$))("maxlength",500),e.R7$(2),e.Y8G("label","_i18n.WallboardCustomMessage2")("ngModel",e.bMT(15,20,t.optionalMessage$))("maxlength",500),e.R7$(4),e.SpI(" ",e.bMT(19,22,"_i18n.SelectQueues")," "),e.R7$(3),e.Y8G("storageKey",t.WallboardQueueFilter)}}let Yi=(()=>{class n{myPhone=(0,a.WQX)(x.gx);settings=(0,a.WQX)(re.h);SwitchboardQueueFilter=D.Hh.SwitchboardQueueFilter;WallboardQueueFilter=D.Hh.WallboardQueueFilter;customMessage$=this.settings.generalSettings$.pipe((0,m.T)(t=>t.wallboardCustomMessage1));
1optionalMessage$=this.settings.generalSettings$.pipe((0,m.T)(t=>t.wallboardCustomMessage2));isNewDesign=(0,a.WQX)(_.T);setCustomMessage(t){this.settings.setField("wallboardCustomMessage1",t)}setOptionalMessage(t){this.settings.setField("wallboardCustomMessage2",t)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["ng-component"]],decls:18,vars:14,consts:[["header","_i18n.View"],[1,"d-block"],[3,"storageKey"],["id","customMessage","data-qa","wallboard-main-message",3,"ngModelChange","label","ngModel","maxlength"],["id","optionalMessage","data-qa","wallboard-optional-message",3,"ngModelChange","label","ngModel","maxlength"],[1,"card","mt-4"],[1,"card-header"],[1,"card-body","pb-2"]],template:function(i,o){1&i&&(e.j41(0,"app-page",0)(1,"fieldset")(2,"legend"),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.nrm(5,"app-settings-status-view",1)(6,"app-settings-groups"),e.k0s(),e.j41(7,"fieldset")(8,"legend"),e.EFF(9),e.nI1(10,"translate"),e.k0s(),e.j41(11,"p"),e.EFF(12),e.nI1(13,"translate"),e.k0s(),e.nrm(14,"calls-filter"),e.k0s(),e.nVh(15,Hi,22,24),e.nI1(16,"async"),e.nI1(17,"async"),e.k0s()),2&i&&(e.R7$(3),e.JRh(e.bMT(4,4,"_i18n.Team")),e.R7$(6),e.JRh(e.bMT(10,6,"_i18n.ActiveCalls")),e.R7$(3),e.JRh(e.bMT(13,8,"_i18n.ActiveCallsViewDescription")),e.R7$(3),e.vxM(e.bMT(16,10,o.myPhone.isPro$)&&e.bMT(17,12,o.myPhone.hasQueues$)?15:-1))},dependencies:[N.H,Ai,Ui,ji,Qi,ve.m,c.X1,c.BC,c.tU,c.YN,c.vS,R.Jj,h.D9],encapsulation:2})}return n})();const Ji=[{path:"",component:it,children:[{path:"",component:zt,data:{navTitle:"_i18n.General"},resolve:{user:()=>{const n=(0,a.WQX)(Q.b),r=(0,a.WQX)(ce.s);return n.getMyUser({$select:["FirstName","LastName","Number","Groups","PrimaryGroupId","Enable2FA","Require2FA","VMPIN"],$expand:[`Groups($select=GroupId,Name,Rights;${si.n0}$expand=Rights($select=RoleName))`]}).pipe((0,W.W)(t=>r.handleError(t)))},tokens:je(1)}},{path:"talk-and-meet",component:di,data:{navTitle:"_i18n.3CXTalk"},resolve:{user:()=>{const n=(0,a.WQX)(Q.b),r=(0,a.WQX)(ce.s);return n.getMyUser({$select:["ClickToCallId","WebMeetingApproveParticipants","WebMeetingFriendlyName"]}).pipe((0,W.W)(t=>r.handleError(t)))}}},{path:"chat",component:Jn,data:{navTitle:"_i18n.Chat"}},{path:"media",data:{navTitle:"_i18n.MediaDeviceOptions"},component:Gi},{path:"view",data:{navTitle:"_i18n.View"},component:Yi},{path:"status",component:Zt.i,data:{navTitle:"_i18n.TitlePresence"},children:[{path:"",pathMatch:"full",redirectTo:()=>(0,a.WQX)(x.gx).myPhoneSession.pipe((0,d.n)(n=>n.myInfo$),(0,m.T)(n=>n.MyProfiles.Items.find(r=>r.Name===le.SB.Available)?.Id),(0,B.p)(Boolean),(0,k.s)(1),(0,m.T)(n=>"available/"+n))},{path:"available/:id",component:Ae,resolve:{navTitle:Me}},{path:"away/:id",component:Ae,resolve:{navTitle:Me}},{path:"exceptions/:id",component:Tn,resolve:{navTitle:Me}},{path:"scheduler",component:ai,data:{navTitle:"_i18n.Schedule"},resolve:{user:()=>{const n=(0,a.WQX)(Q.b),r=(0,a.WQX)(ce.s);return n.getMyUser({$select:["Hours","BreakTime","OfficeHoursProps","PrimaryGroupId"],$expand:["Groups"]}).pipe((0,W.W)(t=>r.handleError(t)))}}}]},{path:"voicemails",component:on,data:{navTitle:"_i18n.Greetings"}},{path:"integrations",component:_n,data:{navTitle:"_i18n.Integration"}},{path:"blf",component:Zn,data:{navTitle:"_i18n.BLF"}},{path:"security",component:ui.E,data:{},resolve:{tokens:je()}}]}]},28073(O,S,l){l.d(S,{u:()=>m});var d=l(35547);let m=(()=>{class a{transform(b){return b.filter(v=>!v.isFavorite())}static \u0275fac=function(v){return new(v||a)};static \u0275pipe=d.EJ8({name:"notFavoritesGroup",type:a,pure:!0})}return a})()},76928(O,S,l){l.d(S,{m:()=>m});var d=l(35547);let m=(()=>{class a{static _orderByComparator(b,v){if(isNaN(parseFloat(b))||!isFinite(b)||isNaN(parseFloat(v))||!isFinite(v)){if(b.toLowerCase()<v.toLowerCase())return-1;if(b.toLowerCase()>v.toLowerCase())return 1}else{if(parseFloat(b)<parseFloat(v))return-1;if(parseFloat(b)>parseFloat(v))return 1}return 0}transform(b,v){if(!Array.isArray(b))return b;if(v=arguments[1]||"+",!Array.isArray(v)||Array.isArray(v)&&1===v.length){const h=Array.isArray(v)?v[0]:v,P=h.startsWith("-");if(!h||"-"===h||"+"===h)return P?b.sort().reverse():b.sort();{const _=h.startsWith("+")||h.startsWith("-")?h.substring(1):h;return b.sort(($,g)=>P?-a._orderByComparator($[_],g[_]):a._orderByComparator($[_],g[_]))}}return b.sort((h,P)=>{for(const _ of v){const $="-"===_.substr(0,1),g="+"===_.substr(0,1)||"-"===_.substr(0,1)?_.substr(1):_,e=$?-a._orderByComparator(h[g],P[g]):a._orderByComparator(h[g],P[g]);if(0!==e)return e}return 0})}static \u0275fac=function(v){return new(v||a)};static \u0275pipe=d.EJ8({name:"orderBy",type:a,pure:!1})}return a})()}}]);
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.