1"use strict";(self.webpackChunkwebclient_webpack=self.webpackChunkwebclient_webpack||[]).push([[6940],{50560(be,J,t){t.d(J,{D6:()=>C,Li:()=>v,UU:()=>O,W8:()=>E,vw:()=>S});var i=t(89417),y=t(59053);function O(u){const s=u.indexOf("-");return-1===s?{From:u,To:null}:{From:u.substring(0,s),To:u.substring(s+1)}}function v(u){return u?u.replace(/\s/g,"").split(",").map(p=>O(p)):[]}function S(u,s){let o=u,p=!1;s&&u.length>s&&(o=u.slice(0,s),p=!0);let M=o.map(m=>null!=m.To?`${m.From}-${m.To}`:`${m.From}`).join(",");return p&&(M+=", ..."),M}function E(u,s,o){return u.group({Name:u.control(s?.Name??"",i.k0.required),Prefix:u.control(s?.Prefix??""),FromToExt:u.control(S(s?.DNRanges??[]),{nonNullable:!0}),NumberLengthRanges:u.control(s?.NumberLengthRanges??""),GroupIds:u.control(s?.GroupIds??[],{nonNullable:!0}),Routes:u.array(x(u,s?.Routes??[],5,o))})}function x(u,s,o,p){const M=[];for(let m=0;m<o;m++)M.push(u.group({CallerID:u.control(s[m]?.CallerID??"",[y.CO,y.J3]),Prepend:u.control(s[m]?.Prepend??""),StripDigits:u.control(s[m]?.StripDigits??null),Trunk:l(u,s[m]?.Trunk??null,p,m)}));return M}function l(u,s,o,p){return u.control(s,o&&0===p?[i.k0.required]:[])}function C(u){return u.map(s=>({CallerID:s.CallerID,Prepend:s.Prepend,StripDigits:s.StripDigits,TrunkId:s.Trunk?.Id??-1,TrunkName:s.Trunk?.Gateway?.Name??null}))}},9867(be,J,t){t.d(J,{E$:()=>M,LT:()=>p});var i=t(85802),y=t(98317),O=t(19037),v=t(99437),S=t(23294),E=t(25558),x=t(96697),l=t(92996),C=t(7673),u=t(81753),s=t(50644);const o={Allowed:u.mG,Unlimited:!0};let p=(()=>{class m{myGroup=(0,i.WQX)(y.r);tokenInfoService=(0,i.WQX)(l.Z);restrictions$=this.getRestrictionsObservable$(!0).pipe((0,S.F)(m.areEqual),(0,s.H9)());getRestrictions$(){return this.getRestrictionsObservable$(!1)}getRestrictionsObservable$(R){return(R?this.tokenInfoService.hasMyGroupRole$:this.tokenInfoService.getHasMyGroupRole$()).pipe((0,E.n)(T=>T?this.myGroup.getMyGroupRestrictions():(0,C.of)({Dects:o,Users:o,LiveChats:o,System:o,Trunks:o,Sbcs:o,MaxPrompts:u.mG})))}static areEqual(R,f){return Object.keys(R).length===Object.keys(f).length&&Object.keys(R).every(T=>R[T]===f[T])}static \u0275fac=function(f){return new(f||m)};static \u0275prov=i.jDH({token:m,factory:m.\u0275fac,providedIn:"root"})}return m})();const M=()=>{const m=(0,i.WQX)(p),h=(0,i.WQX)(O.s);return m.getRestrictions$().pipe((0,x.s)(1),(0,v.W)(R=>h.handleError(R)))}},86745(be,J,t){t.d(J,{J:()=>T});var i=t(85802),y=t(89417),O=t(21437),v=t(56998),S=t(98352),E=t(31755),x=t(87370),l=t(21339),C=t(84412),u=t(84572),s=t(24708),o=t(49769),p=t(96354),M=t(89079),m=t(68018),h=t(35547);function R(_,r){1&_&&(h.EFF(0),h.nI1(1,"translate")),2&_&&h.JRh(h.bMT(1,1,"_i18n.PromptIsMissing"))}function f(_,r){1&_&&(h.j41(0,"val-errors",1),h.DNE(1,R,2,3,"ng-template",2),h.k0s()),2&_&&h.Y8G("control",r)}let T=(()=>{class _ extends S.z{label;inlineLabel;clearable;iconButtons=!0;allowPlaylists;restrictedAccess;showFileHint;addPlayDefault=!1;playDefaultLabel="_i18n.Voicemail_GreetingsPlayDefault";promptSelector;formControl=new y.MJ("");allowPlaylists$=new C.t(!1);service;maxPrompts$;availablePrompts$;constructor(){const Q=(0,i.WQX)(O.d,{self:!0}),B=(0,i.WQX)(O.d,{optional:!0,skipSelf:!0});super(),this.service=B??Q,this.maxPrompts$=this.service.maxPrompts$,this.availablePrompts$=(0,u.z)([this.service.availablePrompts$,this.allowPlaylists$]).pipe((0,p.T)(([K,ie])=>{let Ce=ie?K:K.filter(re=>"Playlist"!==re.PromptType);return this.addPlayDefault&&(Ce=[{DisplayName:this.playDefaultLabel||"_i18n.Voicemail_GreetingsPlayDefault",Filename:""},...Ce]),Ce}))}ngOnInit(){this.syncControlState(this.formControl),this.formControl.valueChanges.pipe((0,M.pQ)(this.destroyRef)).subscribe(Q=>this.valueChanged(Q??"",!!Q))}writeValue(Q){super.writeValue(Q??""),this.formControl.setValue(this.value,{emitEvent:!1})}setDisabledState(Q){super.setDisabledState(Q),(0,v.TZ)(this.formControl,!this.disabled)}ngOnChanges(Q){Q.allowPlaylists&&this.allowPlaylists$.next(this.allowPlaylists??!1)}focus(){this.promptSelector.focus()}validate=this.createComponentValidator(this.formControl);deletePrompt$(Q){return this.service.deletePrompt$(Q)}uploadPrompt$(Q){return this.service.uploadPrompt$(Q)}static \u0275fac=function(B){return new(B||_)};static \u0275cmp=h.VBU({type:_,selectors:[["app-call-prompts"]],viewQuery:function(B,K){if
1(1&B&&h.GBs(x.X,7),2&B){let ie;h.mGM(ie=h.lsd())&&(K.promptSelector=ie.first)}},hostAttrs:[1,"form-input"],inputs:{label:"label",inlineLabel:"inlineLabel",clearable:"clearable",iconButtons:"iconButtons",allowPlaylists:"allowPlaylists",restrictedAccess:"restrictedAccess",showFileHint:"showFileHint",addPlayDefault:"addPlayDefault",playDefaultLabel:"playDefaultLabel"},features:[h.Jv_([{provide:y.kq,multi:!0,useExisting:_},{provide:y.cz,multi:!0,useExisting:_},{provide:E.b,useExisting:_,multi:!1},{provide:l.t,useExisting:_,multi:!1},O.d]),h.Vt3,h.OA$],decls:3,vars:14,consts:[["data-qa","call-prompts",1,"mb-0",3,"label","isCstaRecordingAllowed","isCstaRecordingGlobal","inlineLabel","maxPrompts","clearable","iconButtons","restrictedAccess","formControl","isAdminView","description"],[3,"control"],["valError","notFound"]],template:function(B,K){if(1&B&&(h.j41(0,"app-prompt-selector",0),h.nI1(1,"async"),h.nVh(2,f,2,1,"val-errors",1),h.k0s()),2&B){let ie;h.Y8G("label",K.label)("isCstaRecordingAllowed",!0)("isCstaRecordingGlobal",!0)("inlineLabel",K.inlineLabel)("maxPrompts",h.bMT(1,12,K.maxPrompts$))("clearable",K.clearable)("iconButtons",K.iconButtons)("restrictedAccess",K.restrictedAccess)("formControl",K.formControl)("isAdminView",!0)("description",K.showFileHint?"_i18n.FileFormatAllowed":""),h.R7$(2),h.vxM((ie=K.componentControl)?2:-1,ie)}},dependencies:[x.X,y.X1,y.BC,y.l_,s.N4,s.IH,s.VI,o.Jj,m.D9],styles:["[_nghost-%COMP%]{width:100%}"],changeDetection:0})}return _})()},21437(be,J,t){t.d(J,{d:()=>m});var i=t(85802),y=t(91413),O=t(18530),v=t(7673),S=t(99437),E=t(23294),x=t(96354),l=t(99172),C=t(25558),u=t(88141),s=t(19968),o=t(9867),p=t(50644),M=t(56344);let m=(()=>{class h{http=(0,i.WQX)(y.Qq);api=(0,i.WQX)(s.O);restrictions=(0,i.WQX)(o.LT);refreshPrompts$=new O.B;maxPrompts$=this.restrictions.restrictions$.pipe((0,x.T)(f=>f.MaxPrompts??-1),(0,E.F)(),(0,p.H9)());availablePrompts$=this.refreshPrompts$.pipe((0,l.Z)(void 0),(0,C.n)(()=>this.api.listCustomPrompt({}).pipe((0,S.W)(()=>(0,v.of)({value:[]})))),(0,x.T)(f=>f.value||[]),(0,E.F)((f,T)=>!f.length&&!T.length),(0,p.H9)());uploadPrompt$(f){const T=new FormData;return T.append("file",f,f.name),this.http.post(M.H+"/customPrompts",T,{responseType:"text"}).pipe((0,u.M)(()=>{this.refreshPrompts$.next()}))}deletePrompt$(f){return this.api.deleteCustomPrompt({filename:f}).pipe((0,u.M)(()=>{this.refreshPrompts$.next()}))}refreshPrompts(){this.refreshPrompts$.next()}static \u0275fac=function(T){return new(T||h)};static \u0275prov=i.jDH({token:h,factory:h.\u0275fac})}return h})()},12419(be,J,t){t.d(J,{L:()=>s});var i=t(85802),y=t(89417),O=t(38601),v=t(96980),S=t(68018),E=t(46227),x=t(35547);const l=[[["val-errors"]]],C=["val-errors"];function u(o,p){if(1&o&&(x.j41(0,"span",5),x.EFF(1),x.nI1(2,"translate"),x.k0s()),2&o){const M=x.XpG();x.R7$(),x.JRh(x.bMT(2,1,M.indeterminatePlaceholder))}}let s=(()=>{class o{modal=(0,i.WQX)(O.B);label;defaultPeriod=(0,E.s)();hours;partialEdit;indeterminatePlaceholder="_i18n.LeaveUnchanged";get indeterminate(){return this.partialEdit&&null===this.hours.value}clear(){this.modal.confirmDeletion("_i18n.AreYouSureYouWantToDeleteAllOfficeHours").subscribe(()=>{this.hours.setValue([])})}static \u0275fac=function(m){return new(m||o)};static \u0275cmp=x.VBU({type:o,selectors:[["app-hours"]],inputs:{label:"label",defaultPeriod:"defaultPeriod",hours:"hours",partialEdit:"partialEdit",indeterminatePlaceholder:"indeterminatePlaceholder"},ngContentSelectors:C,decls:15,vars:14,consts:[["scheduler",""],[1,"d-flex","gap-3","pb-1","border-bottom","mb-2"],["data-qa","title",1,"flex-grow-1"],["data-qa","add-to-all",1,"dashed","link",3,"click"],["data-qa","clear-all",1,"dashed","link",3,"click"],[1,"text-muted"],["data-qa","scheduler",3,"formControl","defaultPeriod"],["ngProjectAs","val-errors",5,["val-errors"]]],template:function(m,h){if(1&m){const R=x.RV6();x.NAR(l),x.j41(0,"div",1)(1,"div",2),x.EFF(2),x.nI1(3,"translate"),x.k0s(),x.j41(4,"a",3),x.bIt("click",function(){i.eBV(R);const T=x.sdS(12);return i.Njj(T.addToAll())}),x.EFF(5),x.nI1(6,"translate"),x.k0s(),x.j41(7,"a",4),x.bIt("click",function(){return h.clear()}),x.EFF(8),x.nI1(9,"translate"),x.k0s()(),x.nVh(10,u,3,3,"span",5),x.j41(11,"app-time-scheduler",6,0),x.qex(13,7),x.SdG(14),x.bVm(),x.k0s()}2&m&&(x.R7$(2),x.JRh(x.bMT(3,8,h.label)),x.R7$(3),x.JRh(x.bMT(6,10,"_i18n.Add")),x.R7$(3),x.JRh(x.bMT(9,12,"_i18n.Clear")),x.R7$(2),x.vxM(h.indeterminate?10:-1),x.R7$(),x.AVh("d-none",!h.hours.value),x.Y8G("formControl",h.hours)("defaultPeriod",h.defaultPeriod))},dependencies:[y.X1,y.BC,y.l_,v.gn,S.D9],styles:["[_nghost-%COMP%]{display:block;margin-bottom:16px}"]})}return o}
1)()},46227(be,J,t){function i(){return{start:new Date(1970,0,1,9),stop:new Date(1970,0,1,18)}}function y(){return{start:new Date(1970,0,1,13),stop:new Date(1970,0,1,14)}}t.d(J,{c:()=>y,s:()=>i})},70943(be,J,t){function i(v){return v?60*v.getHours()+v.getMinutes():0}function y(v){return v.start&&v.stop&&0===i(v.start)&&0===i(v.stop)}function O(v){return v.start&&v.stop&&(0===i(v.stop)||i(v.start)<=i(v.stop))}t.d(J,{NM:()=>i,id:()=>y,yW:()=>O})},17350(be,J,t){t.d(J,{a:()=>M,C:()=>p});var i=t(70943),y=t(89417),O=t(91500),v=t(98352),S=t(31143),E=t(35547),x=t(85802);let l=(()=>{class m{static \u0275fac=function(f){return new(f||m)};static \u0275cmp=E.VBU({type:m,selectors:[["app-minus-light-icon"],["","app-minus-light-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 448 512"],["d","M432 256c0 8.8-7.2 16-16 16L32 272c-8.8 0-16-7.2-16-16s7.2-16 16-16l384 0c8.8 0 16 7.2 16 16z"]],template:function(f,T){1&f&&(x.qSk(),E.rj2(0,"svg",0),E.Hgh(1,"path",1),E.eux())},encapsulation:2})}return m})();var C=t(95604),u=t(68018);const s=[[["val-errors"],["show-error-warning"]]],o=["val-errors,show-error-warning"],p=new Date(2023,11,30,0,0,0);let M=(()=>{class m extends v.z{label;useAmPmFormat=(0,S.S)();containerClass="form-input";constructor(){super(),this.touchOnChange=!0}parse(R){return R??{start:null,stop:null}}onStartChange(R){this.valueChanged({...this.value,start:R})}onStopChange(R){this.valueChanged({...this.value,stop:R})}validate(R){const{start:f,stop:T}=R.value??{};return(!f||!T)&&{invalidTime:!0}||!(0,i.yW)({start:f,stop:T})&&{stopTimeBeforeStart:!0}||null}static \u0275fac=function(f){return new(f||m)};static \u0275cmp=E.VBU({type:m,selectors:[["app-time-interval-picker"]],hostVars:2,hostBindings:function(f,T){2&f&&E.HbH(T.containerClass)},inputs:{label:"label"},features:[E.Jv_([{provide:y.cz,useExisting:m,multi:!0},{provide:y.kq,multi:!0,useExisting:m}]),E.Vt3],ngContentSelectors:o,decls:15,vars:14,consts:[[1,"mb-0",3,"label","disabled"],[1,"d-flex","flex-column","gap-3","align-items-center","flex-sm-row"],[1,"d-flex","align-items-center","gap-1"],[1,"d-sm-none","minw-px-50"],["data-qa","start",3,"ngModelChange","ngModel","showMeridian","disabled"],["app-minus-light-icon","",1,"customSVGIcons","svg-xs","d-none","d-sm-block"],["data-qa","stop",3,"ngModelChange","ngModel","showMeridian","disabled"],["ngProjectAs","val-errors",5,["val-errors"]]],template:function(f,T){1&f&&(E.NAR(s),E.j41(0,"field-wrapper",0)(1,"div",1)(2,"div",2)(3,"span",3),E.EFF(4),E.nI1(5,"translate"),E.k0s(),E.j41(6,"timepicker",4),E.bIt("ngModelChange",function(r){return T.onStartChange(r)}),E.k0s()(),E.nrm(7,"span",5),E.j41(8,"div",2)(9,"span",3),E.EFF(10),E.nI1(11,"translate"),E.k0s(),E.j41(12,"timepicker",6),E.bIt("ngModelChange",function(r){return T.onStopChange(r)}),E.k0s()()(),E.qex(13,7),E.SdG(14),E.bVm(),E.k0s()),2&f&&(E.Y8G("label",T.label)("disabled",T.disabled),E.R7$(4),E.JRh(E.bMT(5,10,"_i18n.IntervalFrom")),E.R7$(2),E.Y8G("ngModel",null==T.value?null:T.value.start)("showMeridian",T.useAmPmFormat)("disabled",T.disabled),E.R7$(4),E.JRh(E.bMT(11,12,"_i18n.IntervalTo")),E.R7$(2),E.Y8G("ngModel",null==T.value?null:T.value.stop)("showMeridian",T.useAmPmFormat)("disabled",T.disabled))},dependencies:[y.YN,y.BC,y.vS,l,O.gS,O.nV,C.z,u.D9],styles:[".ng-invalid[_nghost-%COMP%]{--input-border-color: var(--error)}"],changeDetection:0})}return m})()},96980(be,J,t){t.d(J,{gn:()=>fe,Vd:()=>G,vn:()=>Ee});var i=t(85802),y=t(72107),O=t(70943),v=t(89417);function S(ne){return!(!ne.hours.every(O.yW)||ne.hours.length>1&&ne.hours.some((D,b)=>{if((0,O.id)(D))return!0;const c=(0,O.NM)(D.start),a=(0,O.NM)(D.stop);return ne.hours.slice(b+1).some(W=>{const X=(0,O.NM)(W.start),U=(0,O.NM)(W.stop);return c>=X&&c<U||a>X&&a<=U})}))}var E=t(54999),x=t(17705),l=t(22972),C=t(24708),u=t(40953),s=t(17350),o=t(68018),p=t(35547);let M=(()=>{class ne extends l.m{cd=(0,i.WQX)(x.gRc);dialog;period;deleteEnabled;control=new v.MJ(null);validateBeforeSubmit=this.createDialogValidate(this.control,this.cd);startDate=new Date(2023,11,30,0,0,0);
1wholeDay={start:this.startDate,stop:this.startDate};setWholeDay(){this.control.setValue(this.wholeDay),this.dialog.submit()}ngOnInit(){this.buttons=this.deleteEnabled?E.P.OkCancelCustom:E.P.OkCancel,this.control.setValue(this.period,{emitEvent:!1})}getPayload(){const{value:D}=this.control;return D&&(0,O.NM)(D.start)===(0,O.NM)(D.stop)?this.wholeDay:D??void 0}getCustomPayload(){return{toDelete:!0}}static \u0275fac=(()=>{let D;return function(c){return(D||(D=p.xGo(ne)))(c||ne)}})();static \u0275cmp=p.VBU({type:ne,selectors:[["app-time-interval-dialog"]],viewQuery:function(b,c){if(1&b&&p.GBs(u.p,5),2&b){let a;p.mGM(a=p.lsd())&&(c.dialog=a.first)}},inputs:{period:"period",deleteEnabled:"deleteEnabled"},features:[p.Vt3],decls:6,vars:8,consts:[["data-qa","time-interval-dialog","header","_i18n.TimeRange","customText","_i18n.Delete","customClass","btn-danger",3,"submitted","customClicked","buttons","validateBeforeSubmit","waitRecalculationsBeforeSave"],["data-qa","period",3,"formControl"],[3,"control"],["extraButton","","type","button","data-qa","modal-day",1,"btn","btn-border",3,"click"]],template:function(b,c){1&b&&(p.j41(0,"app-modal-dialog",0),p.bIt("submitted",function(){return c.onSubmit()})("customClicked",function(){return c.onCustom()}),p.j41(1,"app-time-interval-picker",1),p.nrm(2,"val-errors",2),p.k0s(),p.j41(3,"button",3),p.bIt("click",function(){return c.setWholeDay()}),p.EFF(4),p.nI1(5,"translate"),p.k0s()()),2&b&&(p.Y8G("buttons",c.buttons)("validateBeforeSubmit",c.validateBeforeSubmit)("waitRecalculationsBeforeSave",!0),p.R7$(),p.Y8G("formControl",c.control),p.R7$(),p.Y8G("control",c.control),p.R7$(2),p.SpI(" ",p.bMT(5,6,"_i18n.WholeDay")," "))},dependencies:[v.X1,v.BC,v.l_,C.N4,C.IH,u.p,s.a,o.D9],encapsulation:2,changeDetection:0})}return ne})();var m=t(67374),h=t.n(m),R=t(38601),f=t(96106);let T=(()=>{class ne{transform(D){return D?D.sort((b,c)=>(0,O.NM)(b.start)-(0,O.NM)(c.start)):[]}static \u0275fac=function(b){return new(b||ne)};static \u0275pipe=p.EJ8({name:"timeSchedulerSort",type:ne,pure:!0})}return ne})();var _=t(98352),r=t(62382),Q=t(64631),B=t(95604);const K=[[["val-errors"]]],ie=["val-errors"],Ce=(ne,w)=>w.dayOfWeek;function re(ne,w){if(1&ne){const D=p.RV6();p.j41(0,"a",8),p.bIt("click",function(){const c=i.eBV(D).$implicit,a=p.XpG().$implicit,W=p.XpG();return i.Njj(W.updateTimeRange(a,c))}),p.EFF(1),p.nI1(2,"amLocal"),p.nI1(3,"amDateFormat"),p.nI1(4,"amLocal"),p.nI1(5,"amDateFormat"),p.k0s()}if(2&ne){const D=w.$implicit;p.R7$(),p.Lme(" ",p.i5U(3,4,p.bMT(2,2,D.start),"LT")," - ",p.i5U(5,9,p.bMT(4,7,D.stop),"LT")," ")}}function ye(ne,w){if(1&ne){const D=p.RV6();p.j41(0,"div",4)(1,"span",5),p.EFF(2),p.nI1(3,"translate"),p.k0s(),p.Z7z(4,re,6,12,"a",6,p.Vm6),p.nI1(6,"timeSchedulerSort"),p.j41(7,"a",7),p.bIt("click",function(){const c=i.eBV(D).$implicit,a=p.XpG();return i.Njj(a.createTimeRange(c))}),p.EFF(8),p.nI1(9,"translate"),p.k0s()()}if(2&ne){const D=w.$implicit,b=p.XpG();p.AVh("invalid",!b.isValidDay(D)),p.R7$(2),p.JRh(p.bMT(3,4,"_i18n."+D.dayOfWeek)),p.R7$(2),p.Dyx(p.bMT(6,6,D.hours)),p.R7$(4),p.JRh(p.bMT(9,8,b.addText))}}function Ee(ne){return ne&&h()(ne).format("HH:mm:ss")}function G(ne){if(ne){const w=ne.split(":"),D=parseInt(w[0],10),b=parseInt(w[1],10);return new Date((new Date).getFullYear(),1,1,D,b,0,0)}return new Date}let fe=(()=>{class ne extends _.z{modalService=(0,i.WQX)(R.B);defaultPeriod;addText="_i18n.Add";containerClass="form-input";isValidDay=S;parse(D){return function he(ne){return[y.K.Monday,y.K.Tuesday,y.K.Wednesday,y.K.Thursday,y.K.Friday,y.K.Saturday,y.K.Sunday].map(w=>({dayOfWeek:w,hours:ne.filter(D=>D&&D.DayOfWeek===w).map(D=>({start:G(D.Start),stop:G(D.Stop)}))}))}(D??[])}clearAll(){this.valueChanged(this.value.map(D=>({...D,hours:[]})))}addToAll(){this.modalService.showComponent(M,{initialState:{period:this.defaultPeriod}}).pipe((0,f.Sf)()).subscribe(D=>{const b=(0,O.id)(D);this.valueChanged(this.value.map(c=>({...c,hours:b?[D]:[...c.hours,D]})))})}editPeriods(D,b,c,a){this.modalService.showComponent(M,{initialState:{deleteEnabled:a,period:b[c]}}).subscribe(W=>{switch(W.decision){case E.R.Ok:W.payload&&((0,O.id)(W.payload)?D.hours=[W.payload]:(b[c]=W.payload,D.hours=b),this.valueChanged(this.value,!0));break;case E.R.Custom:W.payload&&(b.splice(c,1),D.hours=b,this.valueChanged(this.value,!0))}})}format(D){return function q(ne){return ne.reduce((w,D)=>w.concat(D.hours.map(b=>({DayOfWeek:D.dayOfWeek,Start:Ee(b.start),Stop:Ee(b.stop)}))),[])}(D)}validate({value:D}){return this.parse(D).every(S)?null:{timeScheduler:!0}}createTimeRange(D){this.editPeriods(D,[...D.hours,this.defaultPeriod],D.hours.length,!1)}updateTimeRange(D,b){this.editPeriods(D,[...D.hours],D.hours.indexOf(b),!0)}static \u0275fac=(()=>{let D;return function(c){return(D||(D=p.xGo(ne)))(c||ne)}})();static \u0275cmp=p.VBU({type:ne,selectors:[["app-time-scheduler"]],hostVars:2,hostBindings:function(b,c){2&b&&p.HbH(c.containerClass)},inputs:{defaultPeriod:"defaultPeriod",addText:"addText"},features:[p.Jv_([{provide:v.cz,useExisting:ne,multi:!0},{provide:v.kq,multi:!0,useExisting:ne}]),p.Vt3],ngContentSelectors:ie,decls:6,vars:0,consts:[[1,"mb-0"],["data-qa","time-scheduler",1,"d-flex","gap-3","justify-content-stretch","flex-wrap"],["data-qa","day-of-week",1,"day","d-flex","flex-column","align-items-start","gap-2","p-1",3,"invali
1d"],["ngProjectAs","val-errors",5,["val-errors"]],["data-qa","day-of-week",1,"day","d-flex","flex-column","align-items-start","gap-2","p-1"],["data-qa","name"],["data-qa","period",1,"dashed","link"],["data-qa","add-period",1,"dashed","link",3,"click"],["data-qa","period",1,"dashed","link",3,"click"]],template:function(b,c){1&b&&(p.NAR(K),p.j41(0,"field-wrapper",0)(1,"div",1),p.Z7z(2,ye,10,10,"div",2,Ce),p.k0s(),p.qex(4,3),p.SdG(5),p.bVm(),p.k0s()),2&b&&(p.R7$(2),p.Dyx(c.value))},dependencies:[B.z,o.D9,r.a,Q.h,T],styles:[":root{--time-scheduler-day-min-width: 120px}.dashed.link[_ngcontent-%COMP%]{line-height:1.2}.invalid[_ngcontent-%COMP%]{box-shadow:0 0 0 1px var(--error)}.day[_ngcontent-%COMP%]{min-width:var(--time-scheduler-day-min-width)}"],changeDetection:0})}return ne})()},53909(be,J,t){t.d(J,{AC:()=>y,G6:()=>O,MR:()=>v,dy:()=>S,lW:()=>E,n6:()=>i});const i="Worldwide",y={provider:"whatsapp",countryId:i,providerId:"whatsapp.pv.xml"},O={provider:"facebook",countryId:i,providerId:"facebook.pv.xml"},v={providerId:"generic.gw.xml"},S=[y,O];var E=function(x){return x.cert="cert",x.e164="e164",x.registrar="registrar",x.port="port",x.proxy="proxy",x.secondaryRegistrar="SecondaryRegistrar",x.publicIPVia="PublicIPVia",x.ipInContactReg="IpInContactReg",x.advanced="advanced",x.threeWayAuth="3wayauth",x.authType="authtype",x.geo911="geo911",x}(E||{})},1716(be,J,t){t.d(J,{Rz:()=>x,Vt:()=>E,dL:()=>C});var i=t(45317),y=t(71747),O=t(12239),v=t(64385),S=t(21599);const E=u=>({OfficeHoursDestination:u,HolidaysDestination:u,OutOfOfficeHoursDestination:u,AlterDestinationDuringHolidays:!0,AlterDestinationDuringOutOfOfficeHours:!0,CallType:O.n.AllCalls,Condition:v.c.ForwardAll});function x(u){return u?{Number:u.Number,Name:u.Name,Type:u.Type,To:l(u.Type)}:void 0}function l(u){switch(u){case y.J.Extension:case y.J.Conference:return i.h.Extension;case y.J.Ivr:return i.h.Ivr;case y.J.Queue:return i.h.Queue;case y.J.RingGroup:return i.h.RingGroup;case y.J.Fax:return i.h.Fax;case y.J.Group:case y.J.RoutePoint:return i.h.RoutePoint;default:return i.h.None}}const C=(u,s,o)=>({RuleName:o,Data:u,OfficeHoursDestination:s,HolidaysDestination:s,OutOfOfficeHoursDestination:s,AlterDestinationDuringHolidays:!1,AlterDestinationDuringOutOfOfficeHours:!0,CallType:O.n.AllCalls,Condition:v.c.BasedOnDid,Hours:{Type:S.m.OfficeHours,IgnoreHolidays:!1,Periods:[]}})},38159(be,J,t){t.d(J,{A:()=>Ee});var i=t(85802),y=t(56998),O=t(98352),v=t(19781),S=t(60240),E=t(66300),x=t(95604),l=t(68018),C=t(24708),u=t(89417),s=t(74730),o=t(12239),p=t(61851),M=t(1211),m=t(76248),h=t(89079),R=t(6130),f=t(49769),T=t(51280),_=t(65781),r=t(16444),Q=t(96354),B=t(35547);function K(G,he){if(1&G&&B.nrm(0,"field-checkbox",0),2&G){const q=B.XpG();B.Y8G("label","_i18n.AllowBossSecretary")("formControl",q.f.enableBossSecretary)("nullIsIndeterminate",q.isPartialEdit)}}function ie(G,he){1&G&&(B.EFF(0),B.nI1(1,"translate")),2&G&&B.JRh(B.bMT(1,1,"_i18n.TooManyPhoneNumbers"))}function Ce(G,he){if(1&G&&(B.j41(0,"field-wrapper",10),B.nrm(1,"app-dn-select",11)(2,"val-errors",12),B.k0s(),B.j41(3,"field-wrapper",13),B.nI1(4,"enlExample"),B.nI1(5,"async"),B.nrm(6,"app-phone-select",14),B.j41(7,"val-errors",15),B.DNE(8,ie,2,3,"ng-template",7),B.k0s()()),2&G){const q=B.XpG(),fe=B.r8f(2);B.Y8G("label","_i18n.Secretary")("description","_i18n.SecretaryDescription"),B.R7$(),B.Y8G("searchDnTypes",q.searchDnTypes)("peerFilter",q.peerFilter)("nullIsIndeterminate",q.isPartialEditForRequired),B.R7$(2),B.Y8G("label","_i18n.AdditionalSecretary")("description",B.bMT(5,13,B.bMT(4,11,"_i18n.AdditionalSecretaryDescription"))),B.R7$(3),B.Y8G("searchType","extensions")("enl",fe)("enableWildcards",!0)("nullIsIndeterminate",q.isPartialEdit)}}function re(G,he){1&G&&(B.EFF(0),B.nI1(1,"translate")),2&G&&B.JRh(B.bMT(1,1,"_i18n.TooManyPhoneNumbers"))}function ye(G){if(G)switch(G){case"RingGroup":return"RingGroup";case"Queue":return"Queue";default:return"Extension"}}let Ee=(()=>{class G extends O.z{myPhoneService=(0,i.WQX)(r.gx);searchDnTypes=["Extension","RingGroup","Queue"];enl$=this.myPhoneService.myPhoneSession.pipe((0,Q.T)(q=>q.systemParameters.ENL));userMode;myNumber;partialEdit;fullEditIfChanged;partialEditUserNumbers;callsOptions=[{value:o.n.AllCalls,label:"_i18n.AllCallsMode"},{value:o.n.InternalCallsOnly,label:"_i18n.InternalCalls"}
1,{value:o.n.ExternalCallsOnly,label:"_i18n.ExternalCalls"}];requiredValidator=q=>null==q.value&&this.isPartialEditForRequired?null:u.k0.required(q);form=new u.gE({enableBossSecretary:new u.MJ(null),group:new u.gE({enabled:new u.MJ(null),callTypes:new u.MJ(null),data:new u.MJ(null,u.k0.maxLength(500)),allowedDirectCalls:new u.MJ(null,u.k0.maxLength(500)),destination:new u.MJ(null,this.requiredValidator),ruleHoursType:new u.MJ(null,this.requiredValidator),ruleHoursDays:new u.MJ({value:null,disabled:!0},this.requiredValidator)})});enabledOptions=[{label:"_i18n.OffDub1",value:!1},{label:"_i18n.On",value:!0}];get peerFilter(){return this.partialEdit?this.partialEditUserNumbers&&`not(Number in (${this.partialEditUserNumbers.map(q=>`'${q}'`).join(", ")}))`:this.myNumber&&`not(Number eq '${this.myNumber}')`}get f(){return this.form.controls}get isPartialEdit(){return this.partialEdit&&!this.emptyValue}get isPartialEditForRequired(){return this.isPartialEdit&&!(this.changed&&this.fullEditIfChanged)}constructor(){super(),this.form.valueChanges.pipe((0,h.pQ)()).subscribe(q=>{null==q.enableBossSecretary&&this.f.enableBossSecretary.setValue(!0,{emitEvent:!1}),this.updateControlEnabled(),this.valueChanged(this.form.value)})}ngOnInit(){this.syncControlState(this.form)}ngOnChanges(q){q.userMode&&this.updateControlEnabled()}validate=this.createComponentValidator(this.form);setDisabledState(q){super.setDisabledState(q),this.updateControlEnabled()}updateControlEnabled(){if((0,y.TZ)(this.form,!this.disabled),this.form.enabled){const{enableBossSecretary:q,group:fe}=this.f;(0,y.TZ)(fe,!1!==q.value),(0,y.TZ)(q,!this.userMode),fe.enabled&&((0,y.sS)([fe.controls.destination,fe.controls.data],!this.userMode),(0,y.TZ)(fe.controls.ruleHoursDays,(0,s.ot)(fe.controls.ruleHoursType.value)))}}writeValue(q){this.emptyValue=!q,super.writeValue(q),this.form.setValue(this.value,{emitEvent:!1}),this.updateControlEnabled()}emptyValue=!1;parse(q){const fe=this.partialEdit&&null!=q,ne=fe&&this.fullEditIfChanged?null:!!q,w=q?.Destination;return{enableBossSecretary:ne,group:{enabled:q?.Enabled??(!fe||null),allowedDirectCalls:q?.AllowedDirectCalls??(fe?null:""),callTypes:q?.CallType??(fe?null:o.n.AllCalls),data:q?.Data??(fe?null:""),destination:w?.Number?{Number:w.Number,Name:w.Name,Type:w.Type}:null,ruleHoursType:q?.Hours?.Type?(0,m.CM)(q.Hours.Type):fe?null:M.AV4.AllHours,ruleHoursDays:q?.Hours?.Periods??(fe?null:[])}}}format(q){const{group:fe}=q;return fe?{Enabled:fe.enabled,AllowedDirectCalls:fe.allowedDirectCalls,CallType:fe.callTypes,Data:fe.data,Hours:fe.ruleHoursType?{Type:(0,m.s9)(fe.ruleHoursType),IgnoreHolidays:!1,Periods:fe.ruleHoursDays??void 0}:null,Destination:fe.destination?{Number:fe.destination.Number,To:ye(fe.destination.Type)}:null}:null}static \u0275fac=function(fe){return new(fe||G)};static \u0275cmp=B.VBU({type:G,selectors:[["app-boss-secretary-forwarding"]],inputs:{userMode:"userMode",myNumber:"myNumber",partialEdit:"partialEdit",fullEditIfChanged:"fullEditIfChanged",partialEditUserNumbers:"partialEditUserNumbers"},features:[B.Jv_([{provide:u.kq,multi:!0,useExisting:G},{provide:u.cz,useExisting:G,multi:!0}]),B.Vt3,B.OA$],decls:15,vars:25,consts:[["data-qa","enable-boss-secretary","description","_i18n.AllowBossSecretaryDescription",3,"label","formControl","nullIsIndeterminate"],["data-qa","boss-secretary-settings",3,"formGroup","disabled"],[3,"ruleHoursDays","ruleHoursType","label","partialEdit"],["data-qa","call-types","formControlName","callTypes",3,"label","options","nullIsIndeterminate"],["data-qa","allow-direct-calls",3,"label","description"],["formControlName","allowedDirectCalls",3,"searchType","enl","enableWildcards","nullIsIndeterminate"],["controlName","allowedDirectCalls"],["valError","maxlength"],["label","_i18n.BossSecretaryMode","description","_i18n.BossSecretaryModeDescription"],["data-qa","boss-secretary-mode","formControlName","enabled","viewStyle","
1inline",1,"my-1",3,"options"],[3,"label","description"],["data-qa","destination","formControlName","destination",3,"searchDnTypes","peerFilter","nullIsIndeterminate"],["controlName","destination"],["data-qa","additional-secretary",3,"label","description"],["formControlName","data",3,"searchType","enl","enableWildcards","nullIsIndeterminate"],["controlName","data"]],template:function(fe,ne){if(1&fe&&(B.nVh(0,K,1,3,"field-checkbox",0),B.j41(1,"fieldset",1),B.SS7(2),B.nI1(3,"async"),B.nVh(4,Ce,9,15),B.nrm(5,"app-hours-type",2)(6,"field-select",3),B.j41(7,"field-wrapper",4),B.nI1(8,"enlExample"),B.nI1(9,"async"),B.nrm(10,"app-phone-select",5),B.j41(11,"val-errors",6),B.DNE(12,re,2,3,"ng-template",7),B.k0s()(),B.j41(13,"field-wrapper",8),B.nrm(14,"field-radio-group",9),B.k0s()()),2&fe){B.vxM(ne.userMode?-1:0),B.R7$(),B.Y8G("formGroup",ne.f.group)("disabled",ne.f.group.disabled),B.R7$();const w=B.bH3(B.bMT(3,18,ne.enl$));B.R7$(2),B.vxM(ne.userMode?-1:4),B.R7$(),B.Y8G("ruleHoursDays",ne.f.group.controls.ruleHoursDays)("ruleHoursType",ne.f.group.controls.ruleHoursType)("label","_i18n.ActiveDuring")("partialEdit",ne.isPartialEditForRequired),B.R7$(),B.Y8G("label","_i18n.CallTypes")("options",ne.callsOptions)("nullIsIndeterminate",ne.isPartialEdit),B.R7$(),B.Y8G("label","_i18n.AllowDirectCalls")("description",B.bMT(9,23,B.bMT(8,21,"_i18n.AllowDirectCallsDescription"))),B.R7$(3),B.Y8G("searchType","allPersons")("enl",w)("enableWildcards",!0)("nullIsIndeterminate",ne.isPartialEdit),B.R7$(4),B.Y8G("options",ne.enabledOptions)}},dependencies:[E.q,C.VI,C.IH,u.X1,u.BC,u.cb,u.l_,u.j4,u.JD,v.t,p.A,x.z,S.u,T.W,_.b,l.D9,R.C,f.Jj],encapsulation:2,changeDetection:0})}return G})()},76248(be,J,t){t.d(J,{zP:()=>ne,_G:()=>G,p9:()=>R,CM:()=>B,UL:()=>ie,Tj:()=>he,s9:()=>K,et:()=>Q,Az:()=>re,zW:()=>fe,p$:()=>q,Qy:()=>s});var i=t(64385),y=t(45317),O=t(71747),v=t(21599),S=t(1211),E=t(43462);class x extends S.Fdx{OfficeHoursAutoQueueLogOut;DisableRingGroupCalls;constructor(D){super(D),this.OfficeHoursAutoQueueLogOut=D?.OfficeHoursAutoQueueLogOut,this.DisableRingGroupCalls=D?.DisableRingGroupCalls}}var l=t(67374),C=t.n(l);const u=[E.SB.Available,E.SB.Away,E.SB.OutOfOffice,E.SB.Custom1,E.SB.Custom2];function s(w,D){return u.indexOf(w.Name)-u.indexOf(D.Name)}function M(w,D,b){if(!w||null==w.To)return;if(""===w.Number&&""===w.External)return new S.idX({FwdType:S.Cvu.FD_Disconnect});const c=function p(w){switch(w){case y.h.Deflect:return S.Cvu.FD_Deflect;case y.h.Boomerang:return S.Cvu.FD_Rebound;case y.h.External:return S.Cvu.FD_External;case y.h.VoiceMail:return S.Cvu.FD_VoiceMail;case y.h.None:return S.Cvu.FD_Disconnect;default:return S.Cvu.FD_Internal}}(w.To);switch(w.To){case y.h.Deflect:case y.h.Boomerang:case y.h.External:{const a=!!b&&b===w.External,W=new S.idX({FwdType:w.External||D?c:S.Cvu.FD_Disconnect,Number:a?"":w.External??void 0});return W.ToMyMobile=a,W}case y.h.None:case y.h.VoiceMail:return new S.idX({FwdType:c,Number:w.Number??void 0});default:{const a=new S.idX({FwdType:w.Number||D?c:S.Cvu.FD_Disconnect,Number:w.Number??void 0});return a.Tags=w.Tags,a.PeerType=function o(w){switch(w.To){case y.h.Ivr:return O.J.Ivr;case y.h.Queue:return O.J.Queue;case y.h.RingGroup:return O.J.RingGroup;default:return w.Type===O.J.Parking?O.J.Parking:O.J.Extension}}(w),a.PeerName=w.Name??void 0,a}}}function m(w,D,b){const{AvailableRoute:c}=w;if(c)return new S.MMH({NoAnswerTimeout:w.NoAnswerTimeout??void 0,RingMyMobile:w.RingMyMobile??void 0,UsePhoneBusyStatus:w.AcceptMultipleCalls??void 0,NoAnswerAllCalls:c.NoAnswerAllCalls??void 0,NoAnswerExternal:M(c.NoAnswerExternal,D,b),NoAnswerInternal:M(c.NoAnswerInternal,D,b),BusyAllCalls:c.BusyAllCalls??void 0,BusyExternal:M(c.BusyExternal,D,b),BusyInternal:M(c.BusyInternal,D,b),NotRegisteredAllCalls:c.NotRegisteredAllCalls??void 0,NotRegisteredExternal:M(c.NotRegisteredExternal,D,b),NotRegisteredInternal:M(c.NotRegisteredInternal,D,b)})}function h(w,D,b){const{AwayRoute:c}=w;if(c)return new S.RYs({AllHoursInternal:c.AllHoursInternal??void 0,AllHoursExternal:c.AllHoursExternal??void 0,InternalRule:M(c.Internal,D,b),ExternalRule:M(c.External,D,b)})}function R(w,D,b){return new x({Id:w.Id,Name:w.Name??void 0,CustomMessage:w.CustomMessage??void 0,CustomName:w.CustomName??void 0,Available:m(w,D,b),Away:h(w,D,b),BlockPush:w.BlockPushCalls??void 0,OfficeHoursAutoQueueLogOut:w.OfficeHoursAutoQueueLogOut??void 0,DisableRingGroupCalls:w.DisableRingGroupCalls??void 0})}function f(w){switch(w){case O.J.Ivr:return y.h.Ivr;case O.J.Queue:return y.h.Queue;case O.J.RingGroup:return y.h.RingGroup;default:return y.h.Extension}}function T(w,D){if(w&&null!=w.FwdType)switch(w.FwdType){case S.Cvu.FD_Deflect:return{To:y.h.Deflect,External:w.ToMyMobile?D:w.Number,Number:"",Name:""};case S.Cvu.FD_VoiceMail:return{To:y.h.VoiceMail,Number:w.Number,External:"",Name:""};
1case S.Cvu.FD_Rebound:return{To:y.h.Boomerang,External:w.ToMyMobile?D:w.Number,Number:"",Name:""};case S.Cvu.FD_Internal:return{To:f(w.PeerType),Number:w.Number,Name:w.PeerName,Tags:w.Tags,External:""};case S.Cvu.FD_External:return{To:y.h.External,External:w.ToMyMobile?D:w.Number,Number:"",Name:""};case S.Cvu.FD_Disconnect:return{To:y.h.None,External:"",Number:"",Name:""};default:throw new Error(`Not supported conversion of forward destination type ${w.FwdType}`)}}function _(w,D){return w?{AcceptMultipleCalls:w.UsePhoneBusyStatus,NoAnswerTimeout:w.NoAnswerTimeout,RingMyMobile:w.RingMyMobile,AvailableRoute:{NoAnswerAllCalls:w.NoAnswerAllCalls,NoAnswerExternal:T(w.NoAnswerExternal,D),NoAnswerInternal:T(w.NoAnswerInternal,D),BusyAllCalls:w.BusyAllCalls,BusyExternal:T(w.BusyExternal,D),BusyInternal:T(w.BusyInternal,D),NotRegisteredAllCalls:w.NotRegisteredAllCalls,NotRegisteredExternal:T(w.NotRegisteredExternal,D),NotRegisteredInternal:T(w.NotRegisteredInternal,D)}}:{}}function r(w,D){return w?{AwayRoute:{AllHoursInternal:w.AllHoursInternal,AllHoursExternal:w.AllHoursExternal,Internal:T(w.InternalRule,D),External:T(w.ExternalRule,D)}}:{}}function Q(w,D){return{..._(w.Available,D),...r(w.Away,D),Id:w.Id,Name:w.Name,CustomMessage:w.CustomMessage,CustomName:w.CustomName,BlockPushCalls:w.BlockPush,OfficeHoursAutoQueueLogOut:w.OfficeHoursAutoQueueLogOut,DisableRingGroupCalls:w.DisableRingGroupCalls}}function B(w){switch(w){case v.m.AllHours:return S.AV4.AllHours;case v.m.OfficeHours:return S.AV4.OfficeHours;case v.m.OutOfOfficeHours:return S.AV4.OutOfOfficeHours;case v.m.SpecificHours:return S.AV4.SpecificHours;case v.m.SpecificHoursExcludingHolidays:return S.AV4.SpecificHoursExcludingHolidays;case v.m.OutOfSpecificHours:return S.AV4.OutOfSpecificHours;case v.m.OutOfSpecificHoursIncludingHolidays:return S.AV4.OutOfSpecificHoursIncludingHolidays;case v.m.BreakTime:return S.AV4.BreakTime;default:throw new Error(`PbxRuleHoursType '${w}' is not supported`)}}function K(w){switch(w){case S.AV4.AllHours:return v.m.AllHours;case S.AV4.OfficeHours:return v.m.OfficeHours;case S.AV4.OutOfOfficeHours:return v.m.OutOfOfficeHours;case S.AV4.SpecificHours:return v.m.SpecificHours;case S.AV4.SpecificHoursExcludingHolidays:return v.m.SpecificHoursExcludingHolidays;case S.AV4.OutOfSpecificHours:return v.m.OutOfSpecificHours;case S.AV4.OutOfSpecificHoursIncludingHolidays:return v.m.OutOfSpecificHoursIncludingHolidays;case S.AV4.BreakTime:return v.m.BreakTime;default:throw new Error(`HoursType '${w}' is not supported`)}}function ie(w){return new S.KDE({RuleHoursType:B(w?.Type),Days:(w?.Periods??[]).map(D=>({Day:S.obr[D.DayOfWeek],From:new S.c9I({Hour:+D.Start.substring(0,2),Minute:+D.Start.substring(3,5)}),To:new S.c9I({Hour:+D.Stop.substring(0,2),Minute:+D.Stop.substring(3,5)})}))})}function re(w){return{Type:K(w.RuleHoursType),IgnoreHolidays:!1,Periods:w.Days.map(D=>({DayOfWeek:S.obr[D.Day],Start:C()(D.From.Hour+":"+D.From.Minute,"HH:mm").local().format("HH:mm:00.0000000"),Stop:C()(D.To.Hour+":"+D.To.Minute,"HH:mm").local().format("HH:mm:00.0000000")}))}}function G(w,D){return new S.Fdx({Name:E.SB.Exceptions,Exceptions:new S.GCD({Exceptions:w.filter(b=>"BasedOnCallerID"===b.Condition&&"ProceedWithNoExceptions"!==b.Destination?.To).map(b=>function Ce(w,D){const b=new S.I9Q({CallerId:w.Data??void 0,Destination:M(w.Destination,!1,D),Hours:ie(w.Hours)});return Object.assign(b,{Id:w.Id})}(b,D))})})}function he(w,D){return w.Exceptions.Exceptions.map(b=>function ye(w,D){return{Id:w.Id,Data:w.CallerId,Destination:T(w.Destination,D),Hours:re(w.Hours),Enabled:!0,Condition:i.c.BasedOnCallerId}}(b,D))}function q(w,D){return w?.map(b=>({...b,...b.AvailableRoute?{AvailableRoute:{...b.AvailableRoute,BusyInternal:D(b.AvailableRoute.BusyInternal),BusyExternal:D(b.AvailableRoute.BusyExternal),NoAnswerInternal:D(b.AvailableRoute.NoAnswerInternal),NoAnswerExternal:D(b.AvailableRoute.NoAnswerExternal),NotRegisteredInternal:D(b.AvailableRoute.NotRegisteredInternal),NotRegisteredExternal:D(b.AvailableRoute.NotRegisteredExternal)}}:{},...b.AwayRoute?{AwayRoute:{...b.AwayRoute,Internal:D(b.AwayRoute.Internal),External:D(b.AwayRoute.External)}}:{}}))}function fe(w,D){return w?.map(b=>({...b,Destination:D(b.Destination)}))}
1function ne(w){return w.Hours&&(w.Hours.Periods??=void 0),w.Destination&&(w.Destination.Tags??=void 0),w}},97937(be,J,t){t.d(J,{_:()=>s,u:()=>o});var i=t(85802),y=t(99437),O=t(23294),v=t(25558),S=t(84572),E=t(7673),x=t(96354),l=t(50644),C=t(1211),u=t(16444);function s(p,M){return p.size===M.size&&[...p].every(m=>M.has(m))}let o=(()=>{class p{myPhoneService=(0,i.WQX)(u.gx);groupsParticipating$;myGroupIds$;constructor(){this.myGroupIds$=this.myPhoneService.myPhoneSession.pipe((0,v.n)(h=>h.myInfo$),(0,v.n)(h=>h.MyGroups$),(0,x.T)(h=>h.Items.filter(R=>!R.Name.includes("___FAVORITES___"))),(0,l.H9)());const m=this.myPhoneService.myPhoneSession.pipe((0,v.n)(h=>h.bridgesMap$),(0,v.n)(h=>Object.values(h).find(f=>"local"===f.id)?.groupsMap$??(0,E.of)(void 0)),(0,x.T)(h=>h?Object.values(h):[]));this.groupsParticipating$=(0,S.z)([m,this.myGroupIds$]).pipe((0,x.T)(([h,R])=>h.filter(f=>R.some(T=>T.Id===+f.id))),(0,l.H9)())}getGroupPrompts$(m){return this.myPhoneService.get(this.getGroupFolderRequest(m)).pipe((0,x.T)(h=>h.Files.map(R=>{const f=R.replace(/\\/g,"/").split("/");return{promptFullPath:R,promptFileName:f[f.length-1]}})),(0,y.W)(()=>(0,E.of)([])),(0,O.F)((h,R)=>JSON.stringify(h)===JSON.stringify(R)))}getGroupFolderRequest(m){const h=new C.YSh;return h.Folder=C.vyG.GroupPrompts,h.IdGroup=m,h}static \u0275fac=function(h){return new(h||p)};static \u0275prov=i.jDH({token:p,factory:p.\u0275fac,providedIn:"root"})}return p})()},63034(be,J,t){t.d(J,{O:()=>R});var i=t(1211),y=t(85802),O=t(92771),v=t(7673),S=t(57786),E=t(16444),x=t(99437),l=t(25558),C=t(96354),u=t(5964),s=t(31943),o=t(99172),p=t(44668),M=t(23294);class m{msg;constructor(T){this.msg=T}}class h{msg;constructor(T){this.msg=T}}let R=(()=>{class f{myPhoneSvc=(0,y.WQX)(E.gx);unreadConversationCount$;lastError=new O.m(1);unreadMessagesCount$;defaultMessageCount=new i._Gs({Items:[]});constructor(){const _=this.myPhoneSvc.get(new i.OOj).pipe((0,x.W)(r=>(0,v.of)(this.defaultMessageCount)),(0,l.n)(r=>this.myPhoneSvc.myPhoneSession.pipe((0,l.n)(Q=>(0,S.h)(Q.newChatMessages$.pipe((0,C.T)(B=>new m(B))),Q.unreadChatCount$.pipe((0,C.T)(B=>new h(B))),Q.conversationRemoved$.pipe((0,u.p)(B=>!(B.TakenBy&&!B.TakenBy.BridgeNumber&&B.TakenBy.ExtNumber===Q.myInfo.Number))),Q.conversationInfo$).pipe((0,s.S)((B,K)=>(K instanceof m?K.msg.forEach(ie=>{ie.IsNew&&(B.Items.find(Ce=>Ce.IdConversation===ie.IdConversation)?B.Items=B.Items.map(Ce=>(Ce.IdConversation===ie.IdConversation&&(Ce.Count++,Ce.IsArchived=!1),Ce)):B.Items.push(new i.QHp({Count:1,IdConversation:ie.IdConversation})))}):K instanceof h?B.Items=K.msg:K instanceof i.jOx?B.Items=B.Items.filter(ie=>ie.IdConversation!==K.IdConversation):K instanceof i.loJ&&(B.Items=B.Items.map(ie=>(ie.IdConversation===K.Conversation.IdConversation&&(ie.IsArchived=K.Conversation.IsArchived),ie))),B),r||new i._Gs({Items:[]})),(0,o.Z)(r))))),(0,x.W)(r=>(this.lastError.next(r),(0,v.of)(this.defaultMessageCount))),(0,p.t)({refCount:!0,bufferSize:1}));this.unreadMessagesCount$=this.myPhoneSvc.myPhoneSession.pipe((0,l.n)(r=>r.chatIsAllowed$),(0,l.n)(r=>r?_:(0,v.of)(new i._Gs))),this.unreadConversationCount$=this.unreadMessagesCount$.pipe((0,C.T)(r=>r&&r.Items?r.Items.filter(Q=>!Q.IsArchived).length:0),(0,M.F)())}static \u0275fac=function(r){return new(r||f)};static \u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})()},31390(be,J,t){t.d(J,{H:()=>l,V:()=>x});var i=t(85802),y=t(16444),O=t(7673),v=t(25558),S=t(46062),E=t(35547);function x(C,u){let s=C.IsLastFirst?u.lastNameFirstName:u.firstNameLastName;return u.type===S.eE.Extension&&(s=s?`${s} ${u.extensionNumber}`:u.extensionNumber),s||(s=u.emailAddress),s||(s=u.bestPhone),s??""}let l=(()=>{class C{service=(0,i.WQX)(y.gx);transform(s){return this.service.myPhoneSession.pipe((0,v.n)(o=>o.systemParameters$),(0,v.n)(o=>{const p=s.participants.externalParticipant?.contact;if(p)return(0,O.of)(s.privateName?s.privateName:s.publicName?s.publicName:x(o,p));if(s.isGroupChat){if(s.privateName)return(0,O.of)(s.privateName);if(s.publicName)return(0,O.of)(s.publicName)}return(0,O.of)(s.activeParticipants.filter(M=>!(s.activeParticipants.size>1&&M.isMe)).map(M=>
1x(o,M.contact)).filter(Boolean).join(", "))}))}static \u0275fac=function(o){return new(o||C)};static \u0275pipe=E.EJ8({name:"chatTitle",type:C,pure:!0})}return C})()},75982(be,J,t){t.d(J,{E:()=>M});var i=t(85802),y=t(17705),O=t(32271),v=t(46062),S=t(16444),E=t(33971),x=t(96354),l=t(35547);let C=(()=>{class m{static \u0275fac=function(f){return new(f||m)};static \u0275cmp=l.VBU({type:m,selectors:[["app-live-chat-custom-icon"],["","app-live-chat-custom-icon",""]],decls:4,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 512 512"],["fill","#0096D1","d","M256 0C114.615 0 0 114.615 0 256s114.615 256 256 256 256-114.615 256-256S397.385 0 256 0z"],["fill","#FFF","d","M85.375 310.5c-1.95 0-3.656-1.097-4.448-2.925s-.427-3.9.914-5.302c.182-.182 13.65-14.807 21.815-33.21C89.092 253.157 80.5 233.901 80.5 213c0-53.869 56.733-97.5 126.75-97.5S334 159.131 334 213s-56.733 97.5-126.75 97.5c-24.984 0-48.202-5.667-67.823-15.234-13.285 7.739-31.749 15.234-54.052 15.234z"],["fill","#FFF","d","M430.16 380.273c1.34 1.463 1.706 3.535.913 5.302-.73 1.767-2.498 2.925-4.448 2.925-22.303 0-40.767-7.495-54.052-15.234-19.621 9.628-42.839 15.234-67.823 15.234-52.528 0-97.622-24.619-116.817-59.658 6.337.67 12.736 1.158 19.317 1.158 80.62 0 146.25-52.467 146.25-117 0-4.144-.244-8.227-.792-12.248 46.19 14.564 78.792 49.48 78.792 90.248 0 20.902-8.592 40.219-23.156 56.063 8.165 18.464 21.633 33.028 21.815 33.21z"]],template:function(f,T){1&f&&(i.qSk(),l.rj2(0,"svg",0),l.Hgh(1,"path",1)(2,"path",2)(3,"path",3),l.eux())},encapsulation:2})}return m})();var u=t(89079),s=t(20140);function o(m,h){1&m&&l.nrm(0,"i",0)}function p(m,h){if(1&m){const R=l.RV6();l.j41(0,"img",2),l.bIt("error",function(){i.eBV(R);const T=l.XpG();return i.Njj(T.imgError.set(!0))}),l.k0s()}2&m&&l.Y8G("src",h,l.B4B)}let M=(()=>{class m{myPhoneSvc=(0,i.WQX)(S.gx);provider=y.hFB.required();imgError=(0,i.vPA)(!1);isAnonymous=(0,O.EW)(()=>this.provider()?.type===v.yH);providerImage=(0,u.ot)((0,u.br)(this.provider).pipe((0,s.v)(this.myPhoneSvc.myPhoneSession),(0,x.T)(([R,f])=>(0,E.kb)(R?.imageIdent,f))));static \u0275fac=function(f){return new(f||m)};static \u0275cmp=l.VBU({type:m,selectors:[["provider-image"]],inputs:{provider:[1,"provider"]},decls:2,vars:1,consts:[["app-live-chat-custom-icon",""],["alt","",3,"src"],["alt","",3,"error","src"]],template:function(f,T){if(1&f&&l.nVh(0,o,1,0,"i",0)(1,p,1,1,"img",1),2&f){let _;l.vxM(T.isAnonymous()?0:(_=!T.imgError()&&T.providerImage())?1:-1,_)}},dependencies:[C],styles:["[_nghost-%COMP%]{--svg-size: 18px}[_nghost-%COMP%]:empty{display:none}img[_ngcontent-%COMP%]{background:transparent;width:var(--svg-size);height:var(--svg-size)}"],changeDetection:0})}return m})()},23439(be,J,t){t.d(J,{T:()=>v});var i=t(18530),y=t(78127),O=t(85802);let v=(()=>{class S{chatsSubject$=new i.B;chats$=this.chatsSubject$.asObservable();updateChatSubject$=new i.B;updateChat$=this.updateChatSubject$.asObservable();removeChatSubject$=new i.B;removeChat$=this.removeChatSubject$.asObservable();removeAllSubject$=new i.B;removeAll$=this.removeAllSubject$.asObservable();pop(x){this.chatsSubject$.next(x.merge({text:(0,y.X)(x.text,!1)}))}update(x){this.updateChatSubject$.next(x.merge({text:(0,y.X)(x.text,!1)}))}removeChat(x){this.removeChatSubject$.next(x)}removeAll(){this.removeAllSubject$.next()}static \u0275fac=function(l){return new(l||S)};static \u0275prov=O.jDH({token:S,factory:S.\u0275fac,providedIn:"root"})}return S})()},87966(be,J,t){t.d(J,{F:()=>S,X:()=>v});var i=t(68739),y=t(20039),O=t(13477),v=function(E){return E[E.External=0]="External",E[E.Group=1]="Group",E[E.Extension=2]="Extension",E}(v||{});class S extends((0,y.mS)({provider:O.do,type:v.Extension,phoneNumber:"",ipAddress:"",anonymousSessionId:"",contact:i.a3})){}},12271(be,J,t){t.d(J,{EG:()=>p,QR:()=>M});var i=t(1211),y=t(68739),O=t(46062),v=t(20039),S=t(13477),E=t(38052),x=t(33971);function l(m){return m===i.ix6.CRT_External||m===i.ix6.CRT_Anonymous}class u extends((0,v.mS)({id:0,contact:y.a3,isAgent:!1,phoneNumber:"",isWhisperer:!1,isModerator:!1,isMe:!1,ipAddress:"",canAddUsers:!1,canBeRemoved:!1,anonymousSessionId:"",gid:"",provider:S.do,type:i.ix6.CRT_Local}
1)){get isExternal(){return l(this.type)}get isProvider(){return function C(m){return m===i.ix6.CRT_External}(this.type)}}function p(m,h){if(h.Contact)return l(h.RecipientType)||h.Contact.ContactType!==i.PmU.LocalUser&&h.Contact.ContactType!==i.PmU.BridgeExtension?y.KA.create(h.Contact):m.createMergedContact(h.Contact);{let R,f=h.Name,T=h.PhoneNumber;switch(h.RecipientType){case i.ix6.CRT_3cxBridge:case i.ix6.CRT_Local:case i.ix6.CRT_System:R=h.ExtNumber;break;case i.ix6.CRT_External:!f&&!T&&(x.TJ.isValidPhoneNumber(h.ExtNumber)?T=h.ExtNumber:f=h.ExtNumber);break;case i.ix6.CRT_Anonymous:f||(f=h.Email?h.Email:T||"WebVisitor")}return new y.KA("",function o(m){switch(m.RecipientType){case i.ix6.CRT_3cxBridge:return O.eE.Extension;case i.ix6.CRT_Anonymous:case i.ix6.CRT_External:return O.eE.External;case i.ix6.CRT_System:return O.eE.SystemExtension;default:return O.eE.Extension}}(h),function s(m){return m.RecipientType===i.ix6.CRT_Local?O.Ij:m.BridgeNumber}(h),{profilePicture:E,lastNameFirstName:f,firstNameLastName:f,emailAddress:h.Email,lastName:"",firstName:f,nativeExtensionNumber:R,nativeMobileNumber:T,phones:{mobile:T,extension:R}})}}function M(m,h,R){const f=h.Recipient,T=p(R,f);return l(f.RecipientType)&&T.setContactProfile(m.IsExternal&&void 0===m.CloseReason),new u({contact:T,canAddUsers:h.CanAddUsers,canBeRemoved:h.CanBeDeleted,ipAddress:f.IpAddress,phoneNumber:f.PhoneNumber,anonymousSessionId:f.RecipientType===i.ix6.CRT_Anonymous?f.ExtNumber:"",gid:f.MemberGid,id:f.IdRecipient,isAgent:!h.IsRemoved,isWhisperer:h.IsWhisperer,isModerator:f.IsModerator,provider:(0,S.SV)(f.BridgeNumber,f.UserData),type:f.RecipientType,isMe:!f.BridgeNumber&&T.nativeExtensionNumber===R.myInfo.Number&&T.bridgeId===O.Ij})}},13477(be,J,t){t.d(J,{SV:()=>v,do:()=>O});var i=t(20039);class y extends((0,i.mS)({id:"",externalNumber:"",name:"",type:""})){get imageIdent(){const E=this.name&&this.type?`${this.name}.${this.type}`:this.name||this.type||"";return Object.defineProperty(this,"imageIdent",{get:()=>E}),E}}const O=new y;function v(S,E){const x=E&&JSON.parse(E)?.provider_id;if(S){const l=S.split(".");return new y(3===l.length?{externalNumber:l[0],name:l[1],type:l[2],id:x}:2===l.length?{externalNumber:l[0],type:l[1],id:x}:{type:l[0],id:x})}return O}},72339(be,J,t){t.d(J,{N:()=>y});var i=t(7673);class y{conversationId;constructor(v){this.conversationId=v}updateChatList(v){return(0,i.of)(v.filter(S=>S.id!==this.conversationId))}}},70329(be,J,t){t.d(J,{u:()=>E});var i=t(1211),y=t(94014),O=t(7673),v=t(99437),S=t(96354);class E{isNew;update;session;updateOnly;isMonitoring;constructor(l,C,u,s,o=!1){this.isNew=l,this.update=C,this.session=u,this.updateOnly=s,this.isMonitoring=o}updateChatList(l){const C=[...l],u=l.findIndex(s=>s.id===this.update.IdConversation);if(u>=0)C.splice(u,1,this.updateChat(l[u]));else if(!this.updateOnly){if(!this.isNew)return this.session.get(this.isMonitoring?new i.w9u({Count:1,IdConversation:this.update.IdConversation}):new i.g1b({Count:1,IdConversation:this.update.IdConversation})).pipe((0,v.W)(()=>(0,O.of)(new i.mKs)),(0,S.T)(s=>(C.push(y.ry.FromPartyInfo(this.update,this.session,s.Messages[0])),C)));C.push(y.ry.FromPartyInfo(this.update,this.session))}return(0,O.of)(C)}updateChat(l){return y.ry.FromPartyInfo(this.update,this.session).merge({hasUnread:l.hasUnread,unreadCount:l.unreadCount,lastSended:l.lastSended,lastMessageObject:l.lastMessageObject})}}},94014(be,J,t){t.d(J,{ry:()=>o,W_:()=>p,Kc:()=>M});var i=t(33971),y=t(1211),O=t(68739),v=t(12271),S=t(31251),E=t(20039),x=t(87966);class l extends((0,E.mS)({items:(0,E.B8)()})){get isMySelfParticipant(){return!!this.items.find(h=>h.isMe&&h.isAgent)}get isMySelfSpectator(){const h=this.items.filter(R=>R.isMe);return 0===h.size||h.some(R=>R.isWhisperer)}get canAddParticipants(){return this.items.some(h=>h.isMe&&h.canAddUsers)}get activeParticipants(){return this.items.filter(h=>h.isAgent)}get isGroupChat(){return this.activeParticipants.size>2}get isOverallGroupChat(){return this.items.size>2}get isLocalGroup(){return this.isOverallGroupChat&&!this.externalParticipant}get externalParticipant(){return this.items.find(h=>h.isAgent&&h.isExternal)}get providerParticipant(){return this.items.find(h=>h.isAgent&&h.isProvider)}getParticipant(h){return this.items.find(R=>R.id===h)}getMessageSender(h){const R=h.find(f=>f.IsSender);return R?this.getParticipant(R.IdRecipient):void 0}isSentByMe(h){return!!this.getMessageSender(h)?.isMe}}var C=t(46062),u=t(53909);const s={id:0,isExternal:!1,isProvider:!1,typing:void 0,lastSended:new Date,hasUnread:!1,unreadCount:0,participants:new l,lastMessageObject:void 0,destination:new x.F,queueName:"",isArchived:!1,privateName:"",publicName:"",queueNo:"",takenBy:void 0,closeReason:void 0};class o extends((0,E.mS)(s)){get isArchiveAvailable(){return!this.isArchived&&this.isMySelfParticipant}get isUnarchiveAvailable(){return this.isArchived&&this.isMySelfParticipant}get isDeleteAvailable(){return this.isMySelfParticipant&&(!this.isExternal||void 0!==this.closeReason)}get isMySelfParticipant(){return this.participants.isMySelfParticipant}get isTransferAvailable(){return this.isExternal&&!(!this.takenBy&&this.queueNo)}get isDealtWithAvailable(){return this.isTransferAvailable&&this.closeReason!==y.QBB.ECCR_IsHandled}get isTakeOwnershipAvailable(){return this.isExternal&&!this.takenBy&&!!this.queueNo}get isBlockChatAvailable(){return this.isExternal&&void 0===this.closeReason&&this.participants.items.some(h=>!!h.ipAddress)}get isBlockNumberAvailable(){return this.isExternal&&!this.participants.items.some(h=>h.type===y.ix6.CRT_Anonymous)&&!!this.destination.phoneNumber&&i.TJ.isValidPhoneNumber(this.destination.phoneNumber)}get participantToBlock(){return this.participants.items.find(h=>!!h.ipAddress)?.gid}get isEndSessionAvailable(){return this.isExternal&&void 0===this.closeReason&&this.participants.items.some(h=>h.type===y.ix6.CRT_Anonymous)}get isChatClosed(){return void 0!==this.closeReason}get isMySelfSpectator(){return this.participants.isMySelfSpectator}get lastMessage(){return this.lastMessageObject?.UnsafeMessage??""}get activeParticipants(){return this.participants.activeParticipants}static FromPartyInfo(h,R,f){const T=new l({items:(0,E.B8)(h.Recipients.map(Q=>(0,v.QR)(h,Q,R)))}),_=new o({participants:T,privateName:h.PrivateName,publicName:h.PublicName,queueName:h.QueueName,queueNo:h.QueueNo,id:h.IdConversation,isExternal:!!T.externalParticipant,isProvider:!!T.providerParticipant,isArchived:h.IsArchived,lastSended:f&&f.Time?(0,i.Nu)(f.Time):void 0,lastMessageObject:f&&(f.Message||f.File)?new S.cM(f):void 0,hasUnread:f?.IsNew,takenBy:h.TakenBy?(0,v.EG)(R,h.TakenBy):void 0,closeReason:h.CloseReason}),r=T.externalParticipant;
1if(r)return _.merge({destination:new x.F({type:x.X.External,phoneNumber:r.phoneNumber,ipAddress:r.ipAddress,anonymousSessionId:r.anonymousSessionId,provider:r.provider,contact:r.contact})});if(_.participants.isGroupChat)return _.merge({destination:new x.F({type:x.X.Group,contact:O.c9})});{const Q=_.participants.items.find(B=>B.isAgent&&!B.isMe);return _.merge({destination:new x.F({phoneNumber:Q?.phoneNumber,type:x.X.Extension,contact:Q?.contact??O.a3})})}}get isGroupChat(){return this.participants.isGroupChat}get isOverallGroupChat(){return this.participants.isOverallGroupChat}get isLastMessageMine(){return!!this.lastMessageObject&&this.isSentByMe(this.lastMessageObject.Participants)}get providerName(){const h=this.destination.provider.type;switch(h){case C.Lb:case C.ou:return"Live Chat";case C.T9:case u.G6.provider:return"Facebook";case C.ni:return"SMS";case u.AC.provider:return"WhatsApp";default:return h}}getParticipant(h){return this.participants.getParticipant(h)}isSentByMe(h){return this.participants.isSentByMe(h)}}const p=-1,M=new o({id:p})},60240(be,J,t){t.d(J,{u:()=>r});var i=t(35547),y=t(85802),O=t(89417),v=t(56998),S=t(98352),E=t(89079),x=t(49769),l=t(68018),C=t(17242);const u=[[["val-errors"]]],s=["val-errors"],o=Q=>({$implicit:Q});function p(Q,B){if(1&Q&&(i.j41(0,"label",2),i.EFF(1),i.nI1(2,"translate"),i.k0s()),2&Q){const K=i.XpG();i.R7$(),i.JRh(i.bMT(2,1,K.label))}}function M(Q,B){if(1&Q&&(i.j41(0,"div",8),i.nrm(1,"input",14)(2,"label",15),i.k0s()),2&Q){const K=i.XpG().$implicit,ie=i.XpG();i.R7$(),i.Y8G("id",i.ai1("",ie.labelToInputLinkId,"-",K.value))("value",K.value),i.BMQ("name",ie.labelToInputLinkId+"-name"),i.R7$(),i.Y8G("for",i.ai1("",ie.labelToInputLinkId,"-",K.value))}}function m(Q,B){if(1&Q&&i.nrm(0,"input",9),2&Q){const K=i.XpG().$implicit,ie=i.XpG();i.Y8G("id",i.ai1("",ie.labelToInputLinkId,"-",K.value))("value",K.value)("disabled",!0),i.BMQ("name",ie.labelToInputLinkId+"-name")}}function h(Q,B){if(1&Q&&i.nrm(0,"field-hint",16),2&Q){const K=i.XpG(2).$implicit;i.Y8G("text",K.hint)}}function R(Q,B){if(1&Q&&(i.j41(0,"label",11),i.EFF(1),i.nI1(2,"translate"),i.nVh(3,h,1,1,"field-hint",16),i.k0s()),2&Q){const K=i.XpG().$implicit,ie=i.XpG();i.Y8G("for",i.ai1("",ie.labelToInputLinkId,"-",K.value)),i.R7$(),i.SpI(" ",i.bMT(2,5,K.label)," "),i.R7$(2),i.vxM(K.hint?3:-1)}}function f(Q,B){if(1&Q&&(i.j41(0,"div",17),i.eu8(1,18),i.k0s()),2&Q){const K=i.XpG().$implicit,ie=i.XpG();i.AVh("disabled",K.value!==ie.value),i.R7$(),i.Y8G("ngTemplateOutlet",ie.templateRef)("ngTemplateOutletContext",i.eq3(4,o,K.value))}}function T(Q,B){if(1&Q&&(i.j41(0,"div",13),i.EFF(1),i.nI1(2,"translate"),i.k0s()),2&Q){const K=i.XpG().$implicit;i.R7$(),i.SpI(" ",i.bMT(2,1,K.description)," ")}}function _(Q,B){if(1&Q){const K=i.RV6();i.j41(0,"div",5),i.bIt("click",function(){const Ce=y.eBV(K).$implicit,re=i.XpG();return y.Njj(re.clickTile(Ce))}),i.j41(1,"div",6)(2,"div",7),i.nVh(3,M,3,8,"div",8)(4,m,1,6,"input",9),i.j41(5,"div",10),i.nVh(6,R,4,7,"label",11),i.nVh(7,f,2,6,"div",12),i.nVh(8,T,3,3,"div",13),i.k0s()()()()}if(2&Q){const K=B.$implicit,ie=i.XpG();i.R7$(),i.AVh("disabled",ie.disabled||K.disabled),i.R7$(2),i.vxM(K.disabled?4:3),i.R7$(3),i.vxM(K.label?6:-1),i.R7$(),i.vxM(ie.templateRef?7:-1),i.R7$(),i.vxM(K.description?8:-1)}}let r=(()=>{class Q extends S.z{templateRef;labelToInputLinkId=(0,v.bn)("radio");form=new O.gE({value:new O.MJ});label="";options;viewStyle="column";constructor(){const K=(0,y.WQX)(y.abz);super(),this.form.valueChanges.pipe((0,E.pQ)(K)).subscribe(({value:ie})=>{this.valueChanged(ie)})}writeValue(K){super.writeValue(K),this.form.setValue({value:K},{emitEvent:!1})}setDisabledState(K){super.setDisabledState(K),(0,v.TZ)(this.form,!K)}clickTile(K){("tiles"===this.viewStyle||"inline-tiles"===this.viewStyle)&&(this.form.setValue({value:K.value}),this.cd.markForCheck())}static \u0275fac=function(ie){return new(ie||Q)};static \u0275cmp=i.VBU({type:Q,selectors:[["field-radio-group"]],contentQueries:function(ie,Ce,re){if(1&ie&&i.wni(re,i.C4Q,5),2&ie){let ye;i.mGM(ye=i.lsd())&&(Ce.templateRef=ye.first)}},hostVars:2,hostBindings:function(ie,Ce){2&ie&&i.HbH(Ce.viewStyle)},inputs:{label:"label",options:"options",viewStyle:"viewStyle"},features:[i.Jv_([{provide:O.kq,multi:!0,useExisting:Q}]),i.Vt3],ngContentSelectors:s,decls:7,vars:4,consts:[["data-qa","radio-group",3,"formGroup"],[1,"control"],[1,"form-label"],["data-qa","radio-option"],["data-qa","validation",1,"form-control-validation"],["data-qa","radio-option",3,"click"],[1,"form-check"],[1,"d-flex","flex-row","gap-2"],[1,"position-relative"],["type","radio","data-qa","input",1,"form-check-input",3,"id","value","disabled"],[1,"flex-1","minw-0"],["data-qa","label",1,"d-flex","align-items-center","gap-2","form-check-label","w-100",3,"for"],[1,"pt-2",3,"disabled"],["data-qa","description",1,"form-text"],["type","radio","formControlName","value","data-qa","input",1,"form-check-input",3,"id","value"],[1,"check-icon",3,"for"],[3,"text"],[1,"pt-2"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(ie,Ce){1&ie&&(i.NAR(u),i.j41(0,"div",0)(1,"div",1),i.nVh(2,p,3,3,"label",2),i.Z7z(3,_,9,6,"div",3,i.fX1),i.k0s(),i.j41(5,"div",4),i.SdG(6),i.k0s()()),2&ie&&(i.Y8G("formGroup",Ce.form),i.R7$(),i.AVh("disabled",Ce.disabled),i.R7$(),i.vxM(Ce.label?2:-1),i.R7$(),i.Dyx(Ce.options))},dependencies:[O.X1,O.me,O.Fm,O.BC,O.cb,O.j4,O.JD,x.T3,C.F,l.D9],styles:["[_nghost-%COMP%]{display:block;margin-bottom:16px}[_nghost-%COMP%] .control[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{margin-bottom:8px}[_nghost-%COMP%] .control[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%], [_nghost-%COMP%] .control[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{margin-bottom:0}.inline[_nghost-%COMP%] .control[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:20px;align-items:center}.inline[_nghost-%COMP%] .control[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin:0}.table-row[_nghost-%COMP%], .table-row[_nghost-%COMP%] > div[_ngcontent-%COMP%]{display:contents}.table-row[_nghost-%COMP%] .control[_ngcontent-%COMP%]{display:table-row;margin:0}.table-row[_nghost-%COMP%] .control[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:table-cell;vertical-align:middle;margin:0;padding-right:20px;padding-bottom:16px}.table-row[_nghost-%COMP%] .form-control-validation[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none}[_nghost-%COMP%] .disabled[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{opacity:.5}.tiles[_nghost-%COMP%] .control[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{margin:0 0 16px;border-radius:4px;border:1px solid var(--border-color);padding:16px;cursor:pointer}.tiles[_nghost-%COMP%] .control[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .form-text[_ngcontent-%COMP%]{margin-top:4px}.inline-tiles[_nghost-%COMP%] .control[_ngcontent-%COMP%]{display:flex;flex-direction:row}.inline-tiles[_nghost-%COMP%] .control[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{margin:0;border-left:1px solid var(--border-color);border-top:1px solid var(--border-color);border-bottom:1px solid var(--border-color);padding:8px;
1cursor:pointer}.inline-tiles[_nghost-%COMP%] .control[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .form-check-label[_ngcontent-%COMP%]{text-wrap:nowrap}.inline-tiles[_nghost-%COMP%] .control[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:last-child{border-right:1px solid var(--border-color)}.inline-tiles[_nghost-%COMP%] .control[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .form-text[_ngcontent-%COMP%]{margin-top:4px}.horizontal[_nghost-%COMP%] .control[_ngcontent-%COMP%] > .form-label[_ngcontent-%COMP%]{display:block}.horizontal[_nghost-%COMP%] .control[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:inline-block}.horizontal[_nghost-%COMP%] .control[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:not(:last-child){margin-right:1em}.horizontal[_nghost-%COMP%] .control[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%] > .d-flex[_ngcontent-%COMP%]{align-items:center}[_nghost-%COMP%] .control[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:last-child{margin-bottom:0}"],changeDetection:0})}return Q})()},51946(be,J,t){t.d(J,{LAYOUT_ROUTES:()=>Ai});var i=t(34125),y=t(99077),O=t(38844),v=t(85802),S=t(20284),E=t(22040),x=t(19630),l=t(95195),C=t(13961),u=t(57786),s=t(84572),o=t(70274),p=t(983),M=t(23439),m=t(25558),h=t(96354),R=t(5964),f=t(53993),T=t(96697),_=t(23294),r=t(99172),Q=t(38601),B=t(16444),K=t(12426),ie=t(42610),Ce=t(63034),re=t(50644);let ye=(()=>{class d{chatService=(0,v.WQX)(Ce.O);myPhoneService=(0,v.WQX)(B.gx);unheardVoicemails$=this.myPhoneService.myPhoneSession.pipe((0,m.n)(n=>n.myInfo$),(0,h.T)(n=>n.VoiceMailBox?.Items?.filter(g=>g.IsNew).length||0));missedAndAbandonedCalls$=this.myPhoneService.myPhoneSession.pipe((0,m.n)(n=>(0,s.z)([n.myInfo$.pipe((0,h.T)(g=>g.MissedCallsCount)),n.newAbandonedQueueCallsAmount$])),(0,h.T)(([n,g])=>n+g),(0,re.H9)());unreadConversationCount$=this.chatService.unreadConversationCount$.pipe((0,re.H9)());combinedUnreadNotification$=(0,s.z)([this.unreadConversationCount$.pipe((0,r.Z)(0)),this.missedAndAbandonedCalls$.pipe((0,r.Z)(0))]).pipe((0,h.T)(([n,g])=>n+g));static \u0275fac=function(g){return new(g||d)};static \u0275prov=v.jDH({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();const Ee_ProvisionSmartphone=1,Ee_BrowserExtensionDeprecated=2;var w=t(28873),D=t(25013),b=t(96106),c=t(89324),a=t(53805),W=t(60332),X=t(3389),U=t(32271),oe=t(17855),H=t(59882),de=t(59053),ve=t(80377),ae=t(17705),ue=t(2122),ee=t(89417),k=t(1211),te=t(54999),Z=t(67374),N=t.n(Z),I=function(d){return d[d.M15=1]="M15",d[d.M30=2]="M30",d[d.H1=3]="H1",d[d.H2=4]="H2",d[d.H12=5]="H12",d[d.D1=6]="D1",d[d.D2=7]="D2",d[d.W1=8]="W1",d[d.W2=9]="W2",d[d.W3=10]="W3",d[d.M1=11]="M1",d}(I||{});var xe=t(56998),Pe=t(65133),De=t(22972),Me=t(89079),We=t(40953),$e=t(95604),Ye=t(8876),Le=t(66300),He=t(72510),Qe=t(24708),je=t(86745),Ie=t(68018),Oe=t(49769),Xe=t(62382),e=t(35547);const nt={[k.cl0.GHM_Default]:"_i18n.OverrideDefaultHours",[k.cl0.GHM_ForceOpened]:"_i18n.OverrideIsOpen",[k.cl0.GHM_ForceClosed]:"_i18n.OverrideIsClosed",[k.cl0.GHM_ForceBreak]:"_i18n.OverrideIsBreak",[k.cl0.GHM_ForceHoliday]:"_i18n.OverrideIsHoliday",[k.cl0.GHM_ForceCustomOperator]:"_i18n.OverrideCustomHours"};let ut=(()=>{class d{transform(n){return nt[n]||"_i18n.Unknown"}static \u0275fac=function(g){return new(g||d)};static \u0275pipe=e.EJ8({name:"appGroupHoursMode",type:d,pure:!0})}return d})();function qe(d,j){if(1&d&&(e.j41(0,"ng-option",6),e.EFF(1),e.nI1(2,"appGroupHoursMode"),e.nI1(3,"translate"),e.k0s()),2&d){const n=j.$implicit;e.Y8G("value",n.value),e.R7$(),e.SpI(" ",e.bMT(3,4,n.label||e.bMT(2,2,n.value))," ")}}function et(d,j){if(1&d&&(e.nrm(0,"app-forward-destination",7),e.nI1(1,"async")),2&d){const n=e.XpG();e.Y8G("isMcmMode",!0)("extensionInfo",e.bMT(1,2,n.myInfo$))}}function tt(d,j){1&d&&e.nrm(0,"app-call-prompts",8)}function pt(d,j){if(1&d&&e.nrm(0,"field-select",9),2&d){const n=e.XpG();e.Y8G("options",n.overrideExpireOptions)}}function ot(d,j){if(1&d&&(e.j41(0,"span",10),e.EFF(1),e.nI1(2,"translate"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.nI1(5,"amDateFormat"),e.k0s()),2&d){const n=e.XpG(2);e.R7$(),e.JRh(e.bMT(2,2,"_i18n.Until")),e.R7$(3),e.JRh(e.i5U(5,4,n.expirationTimeDisplay(n.group),"L LT"))}}function Fe(d,j){if(1&d&&(e.j41(0,"label")(1,"span",10),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"span",10),e.EFF(5),e.nI1(6,"appGroupHoursMode"),e.nI1(7,"translate"),e.k0s(),e.nVh(8,ot,6,7),e.k0s()),2&d){const n=e.XpG();e.R7$(2),e.JRh(e.bMT(3,3,"_i18n.CurrentOfficeHours")),e.R7$(3),e.JRh(e.bMT(7,7,e.bMT(6,5,n.officeHoursModeDisplay(n.group)))),e.R7$(3),e.vxM(n.expirationTimeDisplay(n.group)?8:-1)}}const it=new k.idX({Number:"",FwdType:k.Cvu.FD_Disconnect}),at=I.M15;let ft=(()=>{class d extends De.m{destroy$=(0,v.WQX)(v.abz);cd=(0,v.WQX)(ae.gRc);myPhoneService=(0,v.WQX)(B.gx);fb=(0,v.WQX)(ee.ok);newDesign;buttons=te.P.OkCancel;groups=[];groupHoursModeOptions=[{value:k.cl0.GHM_ForceOpened},{value:k.cl0.GHM_ForceClosed},{value:k.cl0.GHM_ForceBreak},{value:k.cl0.GHM_ForceHoliday},{value:k.cl0.GHM_ForceCustomOperator},{value:k.cl0.GHM_Default,label:"_i18n.SetOfficeBackToDefaultHours"}];
1overrideExpireOptions=[{value:I.M15,label:"_i18n.OverrideProfile15min"},{value:I.M30,label:"_i18n.OverrideProfile30min"},{value:I.H1,label:"_i18n.OverrideProfile1hour"},{value:I.H2,label:"_i18n.OverrideProfile2hours"},{value:I.H12,label:"_i18n.OverrideProfile12hours"},{value:I.D1,label:"_i18n.OverrideProfile1day"},{value:I.D2,label:"_i18n.OverrideProfile2days"},{value:I.W1,label:"_i18n.OverrideProfile1week"},{value:I.W2,label:"_i18n.OverrideProfile2week"},{value:I.W3,label:"_i18n.OverrideProfile3week"},{value:I.M1,label:"_i18n.OverrideProfile1month"}];form=this.fb.nonNullable.group({Group:this.fb.control(null,ee.k0.required),GroupHoursMode:[k.cl0.GHM_ForceOpened],OverrideExpiresAt:[at],selection:[],customOperator:new ee.MJ({forwardDestination:it}),CustomPrompt:new ee.MJ({value:"",disabled:!0},{nonNullable:!0,validators:ee.k0.required})});myInfo$=this.myPhoneService.myPhoneSession.pipe((0,m.n)(n=>n.myInfo$));get group(){return this.form.value.Group}ngOnInit(){const{customOperator:n,GroupHoursMode:g,CustomPrompt:P}=this.form.controls;this.form.patchValue({Group:this.groups[0]}),n.valueChanges.pipe((0,Me.pQ)(this.destroy$)).subscribe(Y=>{(0,xe.TZ)(P,Y?.playAnnouncement)}),g.valueChanges.pipe((0,Me.pQ)(this.destroy$)).subscribe(()=>{n.setValue({forwardDestination:it})})}validateBeforeSubmit=this.createDialogValidate(this.form,this.cd);submit$=()=>{const n=this.form.value.Group.Id,{customOperator:g,GroupHoursMode:P=k.cl0.GHM_Default,CustomPrompt:Y,OverrideExpiresAt:le}=this.form.value,se=new k.EKp({IdGroup:n,CurrentGroupHours:P});if(P!==k.cl0.GHM_Default&&(se.OverrideExpiresAt=function ge(d){let j=N()();switch(d){case I.M15:j=j.add(15,"minute");break;case I.M30:j=j.add(30,"minute");break;case I.H1:j=j.add(1,"hour");break;case I.H2:j=j.add(2,"hour");break;case I.H12:j=j.add(12,"hour");break;case I.D1:j=j.add(1,"day");break;case I.D2:j=j.add(2,"day");break;case I.W1:j=j.add(1,"week");break;case I.W2:j=j.add(2,"week");break;case I.W3:j=j.add(3,"week");break;case I.M1:j=j.add(1,"month")}const n=j.toDate();return new k.c9I({Year:n.getUTCFullYear(),Month:n.getUTCMonth()+1,Day:n.getUTCDate(),Hour:n.getUTCHours(),Minute:n.getUTCMinutes(),Second:n.getUTCSeconds()})}(le??at)),P===k.cl0.GHM_ForceCustomOperator){const Re=g?.playAnnouncement;se.CustomPrompt=Re&&Y||"",se.DisableCustomPrompt=!Re,se.CustomOperator=g?.forwardDestination??it}return this.myPhoneService.get(se)};get isAnnouncementEnabled(){return this.form.value.customOperator?.playAnnouncement}get isCustomMode(){return this.form.value.GroupHoursMode===k.cl0.GHM_ForceCustomOperator}get isSetToDefaultHours(){return this.form.value.GroupHoursMode===k.cl0.GHM_Default}isOfficeHoursOverrideExpired(n){return function V(d){return d.OverrideExpiresAt&&function L(d){return new Date>=d}(new Date(d.OverrideExpiresAt))||"Default"===d.CurrentGroupHours}(n)}officeHoursModeDisplay(n){return this.isOfficeHoursOverrideExpired(n)?k.cl0.GHM_Default:function me(d){switch(d){case"Default":default:return k.cl0.GHM_Default;case"ForceOpened":return k.cl0.GHM_ForceOpened;case"ForceClosed":return k.cl0.GHM_ForceClosed;case"ForceBreak":return k.cl0.GHM_ForceBreak;case"ForceCustomOperator":return k.cl0.GHM_ForceCustomOperator;case"ForceHoliday":return k.cl0.GHM_ForceHoliday}}(n.CurrentGroupHours)}expirationTimeDisplay(n){return!n.OverrideExpiresAt||this.isOfficeHoursOverrideExpired(n)?null:new Date(n.OverrideExpiresAt)}static \u0275fac=(()=>{let n;return function(P){return(n||(n=e.xGo(d)))(P||d)}})();static \u0275cmp=e.VBU({type:d,selectors:[["app-override-office-hours-dialog"]],inputs:{newDesign:"newDesign"},features:[e.Vt3],decls:15,vars:19,consts:[["header","_i18n.OverrideOfficeHours",3,"formGroup","buttons","submit$","validateBeforeSubmit","autofocus","newDesign"],["label","_i18n.Department","data-qa","group"],["data-qa","select","formControlName","Group","bindLabel","Name",3,"readonly","clearable","searchable","items"],["controlName","Group"],["label","_i18n.OverrideOfficeHoursTo","data-qa","group-hours-mode"],["id","GroupHoursMode","data-qa","select","formControlName","GroupHoursMode",3,"clearable","searchable"],[3,"value"],["data-qa","custom-operator","label","_i18n.ForwardTo","formControlName","customOperator",3,"isMcmMode","extensionInfo"],["label","_i18n.SelectPrompt","formControlName","CustomPrompt"],["formControlName","OverrideExpiresAt","label","_i18n.For","data-qa","timeout",3,"options"],[1,"me-1"]],template:function(g,P){1&g&&(e.j41(0,"app-modal-dialog",0)(1,"p"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"field-wrapper",1),e.nrm(5,"ng-select",2)(6,"val-errors",3),e.k0s(),e.j41(7,"field-wrapper",4)(8,"ng-select",5),e.Z7z(9,qe,4,6,"ng-option",6,e.fX1),e.k0s()(),e.nVh(11,et,2,4,"app-forward-destination",7),e.nVh(12,tt,1,0,"app-call-prompts",8),e.nVh(13,pt,1,1,"field-select",9),e.nVh(14,Fe,9,9,"label"),e.k0s()),2&g&&(e.Y8G("formGroup",P.form)("buttons",P.buttons)("submit$",P.submit$)("validateBeforeSubmit",P.validateBeforeSubmit)("autofocus",!0)("newDesign",P.newDesign),e.R7$(2),e.JRh(e.bMT(3,17,"_i18n.OverrideOfficeHoursStatusDescription")),e.R7$(3),e.Y8G("readonly",P.groups.length<=1)("clearable",!1)("searchable",!1)("items",P.groups),e.R7$(3),e.Y8G("clearable",!1)("searchable",!1),e.R7$(),e.Dyx(P.groupHoursModeOptions),e.R7$(2),e.vxM(P.isCustomMode?11:-1),e.R7$(),e.vxM(P.isAnnouncementEnabled?12:-1),e.R7$(),e.vxM(P.isSetToDefaultHours?-1:13),e.R7$(),e.vxM(P.group&&!P.isOfficeHoursOverrideExpired(P.group)?14:-1))},dependencies:[We.p,ee.X1,ee.BC,ee.cb,ee.j4,ee.JD,$e.z,He.vr,Qe.IH,Ye.c,He.xt,Pe.b,je.J,Le.q,Ie.D9,Oe.Jj,Xe.a,ut],encapsulation:2,changeDetection:0})}return d})();var Ae=t(7673),Be=t(43462),we=function(d){return d[d.M15=15]="M15",d[d.M30=30]="M30",d[d.H1=60]="H1",d[d.H2=120]="H2",d[d.H12=720]="H12",d[d.D1=1440]="D1",d[d.D2=2880]="D2",d[d.W1=10080]="W1",d[d.W2=20160]="W2",d[d.W3=30240]="W3",d[d.M1=40320]="M1",d}(we||{});const Ne={[we.M15]:"_i18n.OverrideProfile15min",[we.M30]:"_i18n.OverrideProfile30min",[we.H1]:"_i18n.OverrideProfile1hour",[we.H2]:"_i18n.OverrideProfile2hours",[we.H12]:"_i18n.OverrideProfile12hours",[we.D1]:"_i18n.OverrideProfile1day",[we.D2]:"_i18n.OverrideProfile2days",[we.W1]:"_i18n.OverrideProfile1week",[we.W2]:"_i18n.OverrideProfile2week",[we.W3]:"_i18n.OverrideProfile3week",[we.M1]:"_i18n.OverrideProfile1month"};var Ge=t(84460),z=t(60235);const Te=(d,j)=>({p1:d,p2:j});function F(d,j){if(1&d&&(e.j41(0,"p",5),e.EFF(1),e.nI1(2,"amDateFormat"),e.nI1(3,"translate"),e.k0s()),2&d){const n=j;e.R7$(),e.SpI(" ",e.i5U(3,4,"_i18n.CurrentStatusUntilDate",e.l_i(7,Te,n.name,e.i5U(2,1,n.expiresAt,"L LT")))," ")}}let pe=(()=>{class d extends De.m{myPhoneService=(0,v.WQX)(B.gx);fwdProfiles=(0,v.WQX)(ue._);newDesign;buttons=te.P.OkCancel;form=new ee.gE({customMessage:new ee.MJ(""),timeout:new ee.MJ(we.M15),selectedStatus:new ee.MJ(Be.SB.Away)});timeoutOptions=[we.M15,we.M30,we.H1,we.H2,we.H12,we.D1,we.D2,we.W1].map(n=>({value:n,label:Ne[n]}));get f(){return this.form.controls}statusOverride=(0,Me.ot)((0,s.z)([this.fwdProfiles.profileDisplayNames$,this.myPhoneService.myPhoneSession.pipe((0,m.n)(n=>n.myInfo$))]).pipe((0,m.n)(([n,g])=>
1{if(g.HasCurrentProfileOverride&&g.OverrideExpiresAtUTCTime){const P=function A(d){return new Date(Date.UTC(d.Year,d.Month-1,d.Day,d.Hour,d.Minute,d.Second))}(g.OverrideExpiresAtUTCTime);if(P>new Date)return this.fwdProfiles.forwardingProfiles$.pipe((0,h.T)(Y=>{const le=Y.find(Re=>Re.Id===g.CurrentProfileOverride),se=le&&le.Name!==Be.SB.Available?le.CustomName||n[le.Name]:"";return se?{name:se,expiresAt:P}:null}))}return(0,Ae.of)(null)})));statusOptions=(0,Me.ot)((0,s.z)([this.fwdProfiles.profileDisplayNames$,this.fwdProfiles.forwardingProfiles$]).pipe((0,h.T)(([n,g])=>(0,z.R)(n,g).filter(P=>P.value!==Be.SB.Available)),(0,re.H9)()));constructor(){super(),(0,xe.XP)(this.f.selectedStatus).pipe((0,m.n)(n=>this.getStatus$(n)),(0,R.p)(Boolean),(0,Me.pQ)()).subscribe(n=>{this.form.patchValue({customMessage:n.CustomMessage})})}submit$=()=>this.getStatus$().pipe((0,m.n)(n=>n?this.changeStatus$(n):(0,Ae.of)(void 0)));changeStatus$(n){const{customMessage:g,timeout:P}=this.form.value,Y=new k.mko({ProfileId:n.Id,CustomMessage:g,OverrideProfileAction:k.bsN.FPOverride_SetAsOverrideProfile,OverrideExpiresSeconds:60*P,OverrideAttachedData:P.toString()});return this.myPhoneService.get(Y)}getStatus$(n=this.form.value.selectedStatus){return this.fwdProfiles.forwardingProfiles$.pipe((0,T.s)(1),(0,h.T)(g=>g.find(P=>P.Name===n)))}static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["app-set-temporary-profile-dialog"]],inputs:{newDesign:"newDesign"},features:[e.Vt3],decls:9,vars:14,consts:[["header","_i18n.TimeBasedStatus",3,"buttons","submit$","newDesign"],["label","_i18n.IdleChangeStatusTo","data-qa","idle-change-status-to",3,"options","formControl"],["label","_i18n.For","data-qa","timeout",3,"options","formControl"],["label","_i18n.SetStatusMessage","data-qa","custom-message",3,"maxlength","formControl"],[3,"control"],[1,"hidden-overflow"]],template:function(g,P){if(1&g&&(e.j41(0,"app-modal-dialog",0)(1,"p"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.nrm(4,"field-select",1)(5,"field-select",2),e.j41(6,"field-input",3),e.nrm(7,"val-errors",4),e.k0s(),e.nVh(8,F,4,10,"p",5),e.k0s()),2&g){let Y;e.Y8G("buttons",P.buttons)("submit$",P.submit$)("newDesign",P.newDesign),e.R7$(2),e.JRh(e.bMT(3,12,"_i18n.TimeBasedStatusDescription")),e.R7$(2),e.Y8G("options",P.statusOptions())("formControl",P.f.selectedStatus),e.R7$(),e.Y8G("options",P.timeoutOptions)("formControl",P.f.timeout),e.R7$(),e.Y8G("maxlength",128)("formControl",P.f.customMessage),e.R7$(),e.Y8G("control",P.f.customMessage),e.R7$(),e.vxM((Y=P.statusOverride())?8:-1,Y)}},dependencies:[We.p,Le.q,ee.X1,ee.BC,ee.tU,ee.l_,Ge.m,Qe.IH,Ie.D9,Xe.a],encapsulation:2,changeDetection:0})}return d})();var ce=t(92996),Se=t(67469),ze=t(46062);let Wt=(()=>{class d extends De.m{profileService=(0,v.WQX)(ue._);currentProfile;newDesign;buttons=te.P.OkCancel;customMessage=new ee.MJ("",{nonNullable:!0});ngOnInit(){this.customMessage.setValue(this.currentProfile.CustomMessage||"")}submit$=()=>this.profileService.setProfileStatus$(this.currentProfile,this.customMessage.value||"");static \u0275fac=(()=>{let n;return function(P){return(n||(n=e.xGo(d)))(P||d)}})();static \u0275cmp=e.VBU({type:d,selectors:[["app-set-profile-status-dialog"]],inputs:{currentProfile:"currentProfile",newDesign:"newDesign"},features:[e.Vt3],decls:2,vars:6,consts:[["header","_i18n.SetStatusMessage",3,"buttons","submit$","autofocus","newDesign"],["data-qa","custom-message","label","_i18n.CustomStatus",3,"formControl","maxlength"]],template:function(g,P){1&g&&(e.j41(0,"app-modal-dialog",0),e.nrm(1,"field-input",1),e.k0s()),2&g&&(e.Y8G("buttons",P.buttons)("submit$",P.submit$)("autofocus",!0)("newDesign",P.newDesign),e.R7$(),e.Y8G("formControl",P.customMessage)("maxlength",128))},dependencies:[We.p,Ge.m,ee.X1,ee.BC,ee.tU,ee.l_],encapsulation:2,changeDetection:0})}return d})();var Je=t(68580),Tt=t(62175),vt=t(93049);let Nt=(()=>{class d{static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["app-signal-bars-slash-solid-icon"],["","app-signal-bars-slash-solid-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 640 512"],["d","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2s-6.3 25.5 4.1 33.7l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L608 451.2V48c0-26.5-21.5-48-48-48s-48 21.5-48 48v328l-64-50.2V176c0-26.5-21.5-48-48-48s-48 21.5-48 48v74.6L38.8 5.1zM288 322.9l-74.7-58.8c-12.8 8.6-21.3 23.3-21.3 39.9v160c0 26.5 21.5 48 48 48s48-21.5 48-48V322.9zM448 464v-15l-96-75.6V464c0 26.5 21.5 48 48 48s48-21.5 48-48zM80 384c-26.5 0-48 21.5-48 48v32c0 26.5 21.5 48 48 48s48-21.5 48-48v-32c0-26.5-21.5-48-48-48z"]],template:function(g,P){1&g&&(v.qSk(),e.rj2(0,"svg",0),e.Hgh(1,"path",1),e.eux())},encapsulation:2})}return d})(),Vt=(()=>{class d{static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["app-signal-bars-solid-icon"],["","app-signal-bars-solid-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 640 512"],["d","M560 0c-26.5 0-48 21.5-48 48v416c0 26.5 21.5 48 48 48s48-21.5 48-48V48c0-26.5-21.5-48-48-48zM352 176v288c0 26.5 21.5 48 48 48s48-21.5 48-48V176c0-26.5-21.5-48-48-48s-48 21.5-48 48zm-112 80c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48s48-21.5 48-48V304c0-26.5-21.5-48-48-48zM80 384c-26.5 0-48 21.5-48 48v32c0 26.5 21.5 48 48 48s48-21.5 48-48v-32c0-26.5-21.5-48-48-48z"]],template:function(g,P){1&g&&(v.qSk(),e.rj2(0,"svg",0),e.Hgh(1,"path",1),e.eux())},encapsulation:2})}return d})();var Lt=t(6580),_t=t(42974),xt=t(65164),jt=t(38159),Ct=t(99437),mt=t(12239),kt=t(50942),Qt=t(1716),Rt=t(76248),zt=t(19859);const Xt=d=>({p1:d});
1function Kt(d,j){1&d&&(e.j41(0,"div",2),e.nrm(1,"span",3),e.EFF(2),e.nI1(3,"translate"),e.k0s()),2&d&&(e.R7$(2),e.SpI(" ",e.i5U(3,1,"_i18n.BossRoutingPreview",e.eq3(4,Xt,j))," "))}function Yt(d,j){if(1&d&&(e.nVh(0,Kt,4,6,"div",2),e.nI1(1,"async")),2&d){let n;const g=e.XpG();e.vxM((n=e.bMT(1,1,g.effectiveRoute$))?0:-1,n)}}function Jt(d){switch(d){case k.rad.RCT_InternalCallsOnly:return mt.n.InternalCallsOnly;case k.rad.RCT_ExternalCallsOnly:return mt.n.ExternalCallsOnly;default:return mt.n.AllCalls}}function Zt(d){switch(d){case mt.n.InternalCallsOnly:return k.rad.RCT_InternalCallsOnly;case mt.n.ExternalCallsOnly:return k.rad.RCT_ExternalCallsOnly;default:return k.rad.RCT_AllCalls}}let qt=(()=>{class d extends De.m{cd=(0,v.WQX)(ae.gRc);peerService=(0,v.WQX)(kt.L);myPhoneService=(0,v.WQX)(B.gx);myNumber$=this.myPhoneService.myPhoneSession.pipe((0,m.n)(n=>n.myInfo$),(0,h.T)(n=>n.Number));effectiveRoute$;buttons=te.P.OkCancel;form=new ee.MJ({},{nonNullable:!0});validateBeforeSubmit=this.createDialogValidate(this.form,this.cd);bossSecretary;newDesign;ngOnInit(){const n=this.bossSecretary.Destination.Number;this.effectiveRoute$=n?this.peerService.getPeerByNumber({number:n}).pipe((0,h.T)(g=>`${g.Number} ${g.Name}`.trim()),(0,Ct.W)(()=>(0,Ae.of)(""))):(0,Ae.of)(""),this.form.setValue({Enabled:this.bossSecretary.Enabled,AllowedDirectCalls:this.bossSecretary.AllowedDirectCalls,Data:this.bossSecretary.AdditionalSecretary,CallType:Jt(this.bossSecretary.CallType),Hours:(0,Rt.Az)(this.bossSecretary.Hours),Destination:(0,Qt.Rz)(this.bossSecretary.Destination)})}submit$=()=>{const n=this.form.value;return this.myPhoneService.get(new k.vXy({Update:new k.gJe({Action:k.X2v.Updated,BossSecretary:new k.mIv({CallType:Zt(n.CallType),Hours:(0,Rt.UL)(n.Hours),AllowedDirectCalls:n.AllowedDirectCalls??"",Enabled:!!n.Enabled})})}))};static \u0275fac=(()=>{let n;return function(P){return(n||(n=e.xGo(d)))(P||d)}})();static \u0275cmp=e.VBU({type:d,selectors:[["app-edit-boss-secretary-dialog"]],hostAttrs:[1,"modal-lg"],features:[e.Vt3],decls:4,vars:10,consts:[["header","_i18n.BossSecretary",3,"buttons","validateBeforeSubmit","submit$","newDesign"],[3,"formControl","myNumber","userMode"],[1,"d-flex","gap-2","align-items-center"],["app-phone-alt-solid-icon","",1,"customSVGIcons","svg-xs"]],template:function(g,P){1&g&&(e.j41(0,"app-modal-dialog",0),e.nrm(1,"app-boss-secretary-forwarding",1),e.nI1(2,"async"),e.nVh(3,Yt,2,3),e.k0s()),2&g&&(e.Y8G("buttons",P.buttons)("validateBeforeSubmit",P.validateBeforeSubmit)("submit$",P.submit$)("newDesign",P.newDesign),e.R7$(),e.Y8G("formControl",P.form)("myNumber",e.bMT(2,8,P.myNumber$))("userMode",!0),e.R7$(2),e.vxM(P.form.value.Enabled?3:-1))},dependencies:[We.p,jt.A,ee.X1,ee.BC,ee.l_,zt.v,Oe.Jj,Ie.D9],encapsulation:2,changeDetection:0})}return d})();var bt=t(47548),_e=t(8516),wt=t(287);const en=(d,j)=>j.Id;function tn(d,j){if(1&d&&e.nrm(0,"app-avatar",7),2&d){const n=e.XpG(2);e.Y8G("ext",n.myContact)("newDesign",n.newDesign())}}function nn(d,j){if(1&d&&(e.nrm(0,"span",9),e.nI1(1,"profileNameConv"),e.nI1(2,"async")),2&d){const n=j;e.Y8G("truncatedText",e.bMT(2,3,e.bMT(1,1,n.Name))+(null!=n.CustomMessage&&n.CustomMessage.trim()?" - "+n.CustomMessage:""))}}function on(d,j){1&d&&(e.j41(0,"li",10),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&d&&(e.R7$(),e.JRh(e.bMT(2,1,"_i18n.Status")))}function an(d,j){1&d&&e.nrm(0,"li",11)}function rn(d,j){if(1&d){const n=e.RV6();e.j41(0,"li",25),e.bIt("click",function(){const P=v.eBV(n).$implicit,Y=e.XpG(2);return v.Njj(Y.selectStatus(P))}),e.j41(1,"div",26),e.nrm(2,"span"),e.nI1(3,"appProfileCssClass"),e.nrm(4,"span",27),e.nI1(5,"profileNameConv"),e.nI1(6,"async"),e.k0s(),e.j41(7,"lucide-icon",28),e.bIt("click",function(P){const Y=v.eBV(n).$implicit,le=e.XpG(2),se=e.sdS(1);return le.setProfileStatus(Y),se.hide(),v.Njj(P.stopPropagation())}),e.k0s()()}if(2&d){const n=j.$implicit,g=e.XpG(2);e.R7$(2),e.HbH(e.VkB("status-indicator ",e.bMT(3,5,n.Name))),e.R7$(2),e.Y8G("truncatedText",e.bMT(6,9,e.bMT(5,7,n.Name))+(null!=n.CustomMessage&&n.CustomMessage.trim()?" - "+n.CustomMessage:"")),e.R7$(3),e.Y8G("img",g.PenLine)}}function sn(d,j){if(1&d){const n=e.RV6();e.j41(0,"li",29),e.bIt("click",function(){v.eBV(n);const P=e.XpG(2);return v.Njj(P.setOverrideOfficeHours())}),e.nrm(1,"lucide-icon",14),e.j41(2,"span",30),e.EFF(3),e.nI1(4,"translate"),e.k0s()()}if(2&d){const n=e.XpG(2);e.R7$(),e.Y8G("img",n.CalendarDays),e.R7$(2),e.JRh(e.bMT(4,2,"_i18n.OverrideOfficeHours"))}}function ln(d,j){1&d&&e.nrm(0,"app-signal-bars-slash-solid-icon",32)}function cn(d,j){1&d&&e.nrm(0,"app-signal-bars-solid-icon",32)}function dn(d,j){if(1&d){const n=e.RV6();e.j41(0,"li",31),e.bIt("click",function(){v.eBV(n);const P=e.XpG(2);return v.Njj(P.handleCallQualityMonitoring())}),e.nVh(1,ln,1,0,"app-signal-bars-slash-solid-icon",32)(2,cn,1,0,"app-signal-bars-solid-icon",32),e.j41(3,"span",33),e.EFF(4),e.nI1(5,"translate"),e.k0s()()}if(2&d){const n=e.XpG(2);e.R7$(),e.vxM(n.validMonitoring?1:2),e.R7$(3),e.JRh(e.bMT(5,2,"_i18n.RequestCallReport"))}}function un(d,j){if(1&d){const n=e.RV6();e.j41(0,"li",25),e.bIt("click",function(){v.eBV(n),e.XpG();const P=e.r8f(20),Y=e.XpG();return v.Njj(Y.setBossForwardingStatus(!P.Enabled))}),e.j41(1,"div",34)(2,"span",35),e.EFF(3,"B"),e.k0s(),e.j41(4,"span",36),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.j41(7,"lucide-icon",37),e.bIt("click",function(P){v.eBV(n),e.XpG();const Y=e.r8f(20),le=e.XpG(),se=e.sdS(1);return le.editBossSecretary(Y),se.hide(),v.Njj(P.stopPropagation())}),e.k0s()()}if(2&d){e.XpG();const n=e.r8f(20),g=e.XpG();e.R7$(5),e.JRh(e.bMT(6,2,n.Enabled?"_i18n.BossSecretaryOn":"_i18n.BossSecretaryOff")),e.R7$(2),e.Y8G("img",g.PenLine)}}function pn(d,j){if(1&d){const n=e.RV6();e.SS7(0),e.j41(1,"li",38),e.bIt("click",function(){v.eBV(n);const P=e.r8f(0),Y=e.XpG(2);return v.Njj(Y.setQueueStatus(!P))}),e.nrm(2,"app-q-solid-icon",35),e.j41(3,"span",39),e.EFF(4),e.nI1(5,"translate"),e.k0s()()}if(2&d){const n=e.bH3(e.XpG(2).queueStatus());e.R7$(4),e.JRh(e.bMT(5,2,n?"_i18n.LogoutFromQueue":"_i18n.LoginToQueue"))}}function fn(d,j){if(1&d){const n=e.RV6();e.j41(0,"ul",4)(1,"li",5)(2,"a",6),e.nVh(3,tn,1,2,"app-avatar",7),e.j41(4,"div",8),e.nrm(5,"app-my-name"),e.nV
1h(6,nn,3,5,"span",9),e.k0s()()(),e.nVh(7,on,3,3,"li",10)(8,an,1,0,"li",11),e.Z7z(9,rn,8,11,"li",12,en),e.nrm(11,"li",11),e.j41(12,"li",13),e.bIt("click",function(){v.eBV(n);const P=e.XpG();return v.Njj(P.setTemporaryProfile())}),e.nrm(13,"lucide-icon",14),e.j41(14,"span",15),e.EFF(15),e.nI1(16,"translate"),e.k0s()(),e.nVh(17,sn,5,4,"li",16),e.nVh(18,dn,6,4,"li",17),e.nrm(19,"li",11),e.SS7(20),e.nVh(21,un,8,4,"li",12),e.nVh(22,pn,6,4,"li",18),e.SS7(23),e.j41(24,"li",19),e.bIt("click",function(){v.eBV(n);const P=e.r8f(23),Y=e.XpG();return v.Njj(Y.setSilentMode(!P))}),e.nrm(25,"lucide-icon",14),e.j41(26,"span",20),e.EFF(27),e.nI1(28,"translate"),e.k0s()(),e.j41(29,"li",21),e.nrm(30,"lucide-icon",14),e.j41(31,"span",22),e.EFF(32),e.nI1(33,"translate"),e.k0s()(),e.nrm(34,"li",11),e.j41(35,"li",23),e.bIt("click",function(){v.eBV(n);const P=e.XpG();return v.Njj(P.logout())}),e.nrm(36,"lucide-icon",14),e.j41(37,"span",24),e.EFF(38),e.nI1(39,"translate"),e.k0s()()()}if(2&d){let n;const g=e.XpG();e.R7$(3),e.vxM(g.newDesign()?3:-1),e.R7$(3),e.vxM((n=g.currentStatus())?6:-1,n),e.R7$(),e.vxM(g.newDesign()?7:8),e.R7$(2),e.Dyx(g.statuses()),e.R7$(4),e.Y8G("img",g.Clock),e.R7$(2),e.JRh(e.bMT(16,15,"_i18n.TimeBasedStatus")),e.R7$(2),e.vxM(g.canOverrideOfficeHours()?17:-1),e.R7$(),e.vxM(g.canMonitorMySelf?18:-1),e.R7$(2);const P=e.bH3(g.bossSecretary());e.R7$(),e.vxM(P&&P.Allowed?21:-1),e.R7$(),e.vxM(g.hasQ()?22:-1),e.R7$();const Y=e.bH3(g.silentMode());e.R7$(2),e.Y8G("img",Y?g.Bell:g.BellOff),e.R7$(2),e.JRh(e.bMT(28,19,Y?"_i18n.RingerOn":"_i18n.RingerOff")),e.R7$(3),e.Y8G("img",g.Settings),e.R7$(2),e.JRh(e.bMT(33,21,"_i18n.Settings")),e.R7$(4),e.Y8G("img",g.LogOut),e.R7$(2),e.JRh(e.bMT(39,23,"_i18n.Logout"))}}let mn=(()=>{class d{myPhoneService=(0,v.WQX)(B.gx);profileService=(0,v.WQX)(ue._);modalService=(0,v.WQX)(Q.B);silentModeService=(0,v.WQX)(a.Y);tokenInfo=(0,v.WQX)(ce.Z);groupsApiService=(0,v.WQX)(Se.G);myPhoneSession=this.myPhoneService.myPhoneSessionInit$.pipe((0,r.Z)(!0),(0,m.n)(()=>this.myPhoneService.myPhoneSession));isDropdownOpen=!1;onDropdownOpenChange(n){this.isDropdownOpen=n}newDesign=ae.hFB.required();myContact;sessionIsActive=(0,Me.ot)(this.myPhoneSession.pipe((0,m.n)(n=>n.isActive$)));myInfo$=this.myPhoneSession.pipe((0,m.n)(n=>n.myInfo$));silentMode=(0,Me.ot)(this.silentModeService.silentMode$);queueStatus=(0,Me.ot)(this.myInfo$.pipe((0,h.T)(({QueueStatus:n})=>n)));statuses=(0,Me.ot)(this.profileService.forwardingProfiles$);currentStatus=(0,Me.ot)(this.profileService.currentStatus$);bossSecretary=(0,Me.ot)(this.myInfo$.pipe((0,h.T)(({MyProfiles:{BossSecretary:n}})=>n)));canOverrideOfficeHours=(0,Me.ot)(this.tokenInfo.myToken$.pipe((0,h.T)(n=>n.overrideOfficeHours)));hasQ=(0,Me.ot)(this.myPhoneSession.pipe((0,m.n)(n=>(0,s.z)([n.myInfo$,n.queues$])),(0,h.T)(([{Number:n},g])=>Object.values(g).some(P=>P.agents.some(Y=>Y.agentNumber===n)))));logout(){this.myPhoneService.logout()}setBossForwardingStatus(n){this.myPhoneService.get(new k.vXy({Update:new k.gJe({Action:k.X2v.Updated,BossSecretary:new k.mIv({Enabled:n})})})).pipe((0,b.Tg)(this.modalService)).subscribe()}editBossSecretary(n){this.modalService.showDialog(qt,{bossSecretary:n,newDesign:this.newDesign()})}get validMonitoring(){return(0,wt.X)(this.myContact?.monitorExpiration)}get canMonitorMySelf(){const n=this.myContact;return n&&n.bridgeId===ze.Ij}handleCallQualityMonitoring(){const n=this.myContact;n&&this.modalService.showDialog(wt.$,{contact:n,newDesign:this.newDesign()})}selectStatus(n){this.profileService.selectStatus(n.Id)}setProfileStatus(n){this.modalService.showDialog(Wt,{currentProfile:n,newDesign:this.newDesign()})}setTemporaryProfile(){this.modalService.showDialog(pe,{newDesign:this.newDesign()})}setOverrideOfficeHours(){this.groupsApiService.listGroup({$select:["Id","IsDefault","Number","Name","CurrentGroupHours","OverrideExpiresAt"],$orderby:["Name"],$filter:"not startsWith(Name, '___FAVORITES___')"}).pipe(b.yh,(0,m.n)(n=>this.modalService.showDialog(ft,{groups:n,newDesign:this.newDesign()})),(0,b.Tg)(this.modalService)).subscribe()}setQueueStatus(n){this.myPhoneService.get(new k.mko({QueueStatus:n})).pipe((0,b.Tg)(this.modalService)).subscribe()}setSilentMode(n){this.silentModeService.setSilentMode(n)}Clock=_e.zD7;CalendarDays=_e.ADG;Bell=_e.IrQ;BellOff=_e.br1;Settings=_e.wB_;LogOut=_e.nUv;PenLine=_e._hk;static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["wc-account-menu"]],inputs:{newDesign:[1,"newDesign"],myContact:"myContact"},features:[e.Jv_([ue._])],decls:4,vars:7,consts:[["dropdownList","bs-dropdown"],["dropdown","","placement","bottom right",1,"dropdown",3,"isOpenChange","isOpen"],["dropdownToggle","","aria-haspopup","true",1,"me-0","ms-1","pointer",3,"ext","size","newDesign"],["role","menu","class","dropdown-menu dropdown-menu-right black-menu",4,"dropdownMenu"],["role","menu",1,"dropdown-menu","dropdown-menu-right","black-menu"],["role","menuitem"],["routerLink","/settings",1,"dropdown-item","account-info"],[3,"ext","newDesign"],[1,"d-flex","flex-column","gap-1","mw-0"],["data-qa","current-status",3,"truncatedText"],[1,"dropdown-item","menu-block-header"],[1,"divi
1der","dropdown-divider"],["role","menuitem",1,"dropdown-item"],["role","menuitem","data-qa","set-temporary-profile",1,"dropdown-item","menu-main-action",3,"click"],[3,"img"],["data-qa","temp-status"],["role","menuitem","data-qa","override-office-hours",1,"dropdown-item","menu-main-action"],["role","menuitem","data-qa","monitor-connection-quality",1,"dropdown-item","menu-main-action"],["data-qa","enable-q","role","menuitem",1,"dropdown-item","menu-main-action"],["role","menuitem","data-qa","toggle-silent-mode",1,"dropdown-item","menu-main-action",3,"click"],["data-qa","ringer"],["role","menuitem","data-qa","redirect-to-settings","routerLink","/settings",1,"dropdown-item","menu-main-action"],["data-qa","avatar-settings"],["role","menuitem","data-qa","logout",1,"dropdown-item","menu-main-action",3,"click"],["data-qa","logout"],["role","menuitem",1,"dropdown-item",3,"click"],[1,"menu-main-action","mw-0"],[3,"truncatedText"],["data-qa","set-status",1,"menu-nested-action",3,"click","img"],["role","menuitem","data-qa","override-office-hours",1,"dropdown-item","menu-main-action",3,"click"],["data-qa","override-office-hours"],["role","menuitem","data-qa","monitor-connection-quality",1,"dropdown-item","menu-main-action",3,"click"],[1,"icon"],["data-qa","request-call-report"],["data-qa","enable-boss-forwarding",1,"menu-main-action"],[1,"text-icon"],["data-qa","boss-secretary"],[1,"menu-nested-action",3,"click","img"],["data-qa","enable-q","role","menuitem",1,"dropdown-item","menu-main-action",3,"click"],["data-qa","logout-login-q"]],template:function(g,P){1&g&&(e.j41(0,"div",1,0),e.bIt("isOpenChange",function(le){return P.onDropdownOpenChange(le)}),e.nrm(2,"app-avatar",2),e.DNE(3,fn,40,25,"ul",3),e.k0s()),2&g&&(e.AVh("pe-none",!P.sessionIsActive()),e.Y8G("isOpen",P.isDropdownOpen),e.R7$(2),e.Y8G("ext",P.myContact)("size",P.newDesign()?"s":"m")("newDesign",P.newDesign()),e.BMQ("aria-expanded",P.isDropdownOpen))},dependencies:[Je.Kk,Tt.f,Je.UL,Je.hs,vt.Wk,oe.X2,Nt,Vt,bt.N,_e.flO,_e.WGl,Lt.N,Ie.D9,_t.t,xt.F,Oe.Jj],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}}[_nghost-%COMP%]{--avatar-status-icon-bg: var(--bg-tertiary);--avatar-status-icon-color: var(--text-secondary)}.dropdown-menu[_ngcontent-%COMP%]{max-height:calc(100vh - var(--top-header-height) + var(--spacer-s));--dropdown-item-padding-x: var(--spacer-s);--dropdown-item-padding-y: var(--spacer-xs);--dropdown-item-gap: var(--spacer-s);--svg-size: var(--svg-size-sm);--status-indicator-size: var(--svg-size)}.dropdown-item[_ngcontent-%COMP%]{overflow:hidden;width:100%;min-width:100px;padding:var(--dropdown-item-padding-y) var(--dropdown-item-padding-x);display:flex;align-items:center}.dropdown-item[_ngcontent-%COMP%] .menu-main-action[_ngcontent-%COMP%], .dropdown-item.menu-main-action[_ngcontent-%COMP%]{display:grid;grid-template-columns:var(--svg-size) auto;grid-template-areas:"icon action";align-items:center;flex-grow:1;gap:var(--dropdown-item-gap)}.dropdown-item[_ngcontent-%COMP%] .menu-main-action[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child, .dropdown-item.menu-main-action[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{grid-area:icon}.dropdown-item[_ngcontent-%COMP%] .menu-main-action[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:last-child, .dropdown-item.menu-main-action[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:last-child{grid-area:action}.dropdown-item[_ngcontent-%COMP%] .menu-nested-action[_ngcontent-%COMP%]{display:block;justify-self:end;margin:calc(-1 * var(--dropdown-item-padding-y)) calc(-1 * var(--dropdown-item-padding-x));margin-left:auto;padding:var(--dropdown-item-padding-y) var(--dropdown-item-padding-x);--svg-size: 14px}.dropdown-item[_ngcontent-%COMP%]:hover .menu-nested-action[_ngcontent-%COMP%], .dropdown-item.active[_ngcontent-%COMP%] .menu-nested-action[_ngcontent-%COMP%]{background:var(--status-off);--svg-color: var(--text-tertiary-hover)}.text-icon[_ngcontent-%COMP%]{color:var(--svg-color);font-size:var(--svg-size);width:var(--svg-size);display:flex;justify-content:center}.new-design [_nghost-%COMP%] .dropdown-menu[_ngcontent-%COMP%]{background:linear-gradient(to right bottom,#101828,#1e2939);border-color:#364153;padding:var(--spacer-s);--dropdown-item-padding-y: calc(var(--spacer-xs) * 1.5);--dropdown-item-padding-x: calc(var(--spacer-s) * 1.5);--dropdown-item-gap: var(--spacer)}@media(min-width:576px){.new-design [_nghost-%COMP%] .dropdown-menu[_ngcontent-%COMP%]{min-width:275px}}.new-design [_nghost-%COMP%] .dropdown-divider[_ngcontent-%COMP%]{margin:var(--dropdown-item-padding-y) 0}.new-design [_nghost-%COMP%] .status-indicator[_ngcontent-%COMP%]{border-radius:50%}.new-design [_nghost-%COMP%] .dropdown-item[_ngcontent-%COMP%]{background:none;color:var(--text-secondary);font-weight:400;--svg-color: #99a1af}.new-design [_nghost-%COMP%] .dropdown-item[_ngcontent-%COMP%]:hover{background:#ffffff1a}.new-design [_nghost-%COMP%] .dropdown-item.active[_ngcontent-%COMP%]{background:#e9ebef;color:#030213}.new-design [_nghost-%COMP%] .dropdown-item[_ngcontent-%COMP%]:hover .menu-nested-action[_ngcontent-%COMP%], .new-design [_nghost-%COMP%] .dropdown-item.active[_ngcontent-%COMP%] .menu-nested-action[_ngcontent-%COMP%]{background:#ffffff1a;--svg-color: #99a1af}.new-design [_nghost-%COMP%] .account-info[_ngcontent-%COMP%]{display:flex;gap:var(--spacer-s);align-items:center;background:linear-gradient(to right,#0597d433,#9810fa33);--current-background: #23324E;padding:var(--spacer-s);margin-bottom:var(--spacer-s)}.new-design [_nghost-%COMP%] .account-info[_ngcontent-%COMP%]:hover{background:linear-gradient(to right,color-mix(in srgb,rgba(5,151,212,.2) 90%,white 10%),color-mix(in srgb,rgba(152,16,250,.2) 90%,white 10%))}.new-design [_nghost-%COMP%] .account-info[_ngcontent-%COMP%] app-my-name[_ng
1content-%COMP%]{font-size:var(--font-size-h5);font-weight:var(--font-weight-bold)}.new-design [_nghost-%COMP%] .account-info[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{opacity:.9}.new-design [_nghost-%COMP%] .menu-block-header[_ngcontent-%COMP%]{pointer-events:none;font-size:var(--small-font-size);font-weight:var(--font-weight-bold);text-transform:uppercase;letter-spacing:.6px;color:#d1d5dc}'],changeDetection:0})}return d})();var hn=t(72214),yt=t(58664),Et=t(37731),Ot=t(11082),gn=t(5739),vn=t(15989),Cn=t(1807),At=t(37201),bn=t(38008);const yn=t.p+"media/notif-help-newUI-0b4683db.png";var rt=t(58689);let Pn=(()=>{class d extends De.m{notificationHelpImage=yn;isNewDesign=(0,v.WQX)(rt.T);static \u0275fac=(()=>{let n;return function(P){return(n||(n=e.xGo(d)))(P||d)}})();static \u0275cmp=e.VBU({type:d,selectors:[["ng-component"]],features:[e.Vt3],decls:5,vars:5,consts:[["header","_i18n.AllowNotifications",3,"newDesign"],["alt","",1,"d-none","d-md-block","mb-4","w-100",3,"src"]],template:function(g,P){1&g&&(e.j41(0,"app-modal-dialog",0),e.nrm(1,"img",1),e.j41(2,"p"),e.EFF(3),e.nI1(4,"translate"),e.k0s()()),2&g&&(e.Y8G("newDesign",P.isNewDesign),e.R7$(),e.Y8G("src",P.notificationHelpImage,e.B4B),e.R7$(2),e.JRh(e.bMT(4,3,"_i18n.AllowNotificationsDisclaimer")))},dependencies:[We.p,Ie.D9],encapsulation:2})}return d})();var Mn=t(97144),Tn=t(9625),st=function(d){return d[d.Alerts=1]="Alerts",d[d.Warnings=2]="Warnings",d}(st||{}),Ve=function(d){return d[d.None=0]="None",d[d.Info=1]="Info",d[d.Warning=2]="Warning",d[d.Error=3]="Error",d}(Ve||{}),Dt=t(33971);let _n=(()=>{class d{myPhoneService=(0,v.WQX)(B.gx);tokenInfoService=(0,v.WQX)(ce.Z);licenseStatusService=(0,v.WQX)(vn.v);modalService=(0,v.WQX)(Q.B);swPush=(0,v.WQX)(D.Xd);manageGroupsAndSupervisor=[...At.I0,"supervisors"];moreInfoLink="https://www.3cx.com/expiring/";renewLink="https://portal.3cx.com/customer/systems/shop?action=renew&key=";notificationWarnings$;constructor(){const n=this.myPhoneService.myPhoneSession.pipe((0,m.n)(se=>se.systemParameters$)),g=this.tokenInfoService.myToken$.pipe((0,h.T)(se=>se.myRole),(0,re.H9)()),P=(0,s.z)([g,n,(0,Cn.O)(0,216e5)]).pipe((0,m.n)(([se,Re])=>{const Ue=(0,Dt.Nu)(Re.LicenseExpiredAt);if(!Ue)return(0,Ae.of)(void 0);const ke=this.daysUntilExpirationDate(Ue),dt=ke<=0;if(ke<=30&&At.mD.includes(se))return this.licenseStatusService.getLicenseStatus({$select:["LicenseKey"]}).pipe((0,h.T)(Ze=>{const Ut=dt?Ve.Error:Ve.Warning;return{moreInfoLink:Ze.LicenseKey?`${this.moreInfoLink}?key=${Ze.LicenseKey}`:this.moreInfoLink,renewLink:Ze.LicenseKey?`${this.renewLink}${Ze.LicenseKey}`:this.renewLink,isLicenseExpired:dt,licenseExpirationDate:Ue,severity:Ut,type:st.Warnings,severityStyleClass:this.notificationStyleClass(Ut)}}),(0,Ct.W)(Ze=>(console.error(Ze),(0,Ae.of)(void 0))));if(!Re.MultiCompanyMode&&ke<=15&&this.manageGroupsAndSupervisor.includes(se)){const Ze=dt?Ve.Error:Ve.Warning;return(0,Ae.of)({moreInfoLink:this.moreInfoLink,renewLink:"",isLicenseExpired:dt,licenseExpirationDate:Ue,severity:Ze,type:st.Warnings,severityStyleClass:this.notificationStyleClass(Ze)})}return(0,Ae.of)(void 0)}),(0,re.H9)()),Y=this.swPush.permissionState$.pipe((0,h.T)(se=>"prompt"===se?{severity:Ve.Warning,type:st.Warnings,severityStyleClass:this.notificationStyleClass(Ve.Warning)}:void 0),(0,re.H9)()),le=(0,Ae.of)(this.isInsecureConnection()?{severity:Ve.Error,type:st.Warnings,severityStyleClass:this.notificationStyleClass(Ve.Error)}:void 0);this.notificationWarnings$=(0,s.z)([P,Y,le]).pipe((0,h.T)(se=>{const[Re,Ue,ke]=se,dt=se.filter(Boolean);return{licenseExpiration:Re,pushNotification:Ue,insecureConnection:ke,notificationStatistics:this.calculateNotificationStatistics(dt)}}),(0,re.H9)())}calculateNotificationStatistics(n){return n.reduce((g,P)=>({highestSeverity:Math.max(g.highestSeverity,P.severity),totalAlerts:g.totalAlerts+(P.type===st.Alerts?1:0),totalWarnings:g.totalWarnings+(P.type===st.Warnings?1:0),totalNotifications:g.totalNotifications+1}),{highestSeverity:Ve.None,totalAlerts:0,totalWarnings:0,totalNotifications:0})}hasDefaultPermission(){return(0,bn._)("default")}openNotificationModal(){Notification.requestPermission(),this.modalService.showComponent(Pn).subscribe(()=>{this.swPush.refreshPermissions$.next(!0)})}notificationStyleClass(n){switch(n){case Ve.Info:return"fillIconBlue";case Ve.Warning:return"fillIconOrange";case Ve.Error:return"fillIconRed";default:return""}}badgeStyleClass(n){switch(n){case Ve.Info:return"bg-brand";case Ve.Warning:return"bg-orange";case Ve.Error:return"bg-red";default:return""}}daysUntilExpirationDate(n){const g=new Date;return(n.getTime()-g.getTime())/864e5}isInsecureConnection(){let n=window.location.hostname;return n.startsWith("[")&&n.endsWith("]")&&(n=n.substring(1,n.length-1)),Mn.c.production&&("http:"===window.location.protocol||(0,Tn.isValid)(n)||"localhost"===n.toLowerCase())}static \u0275fac=function(g){return new(g||d)};static \u0275prov=v.jDH({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();var St=t(32934);const xn=(d,j,n)=>({date:d,renewLink:j,moreInfoLink:n}),Rn=(d,j)=>({date:d,moreInfoLink:j});function wn(d,j){if(1&d&&(e.nrm(0,"span",11),e.nI1(1,"date"),e.nI1(2,"translate")),2&d){const n=e.XpG();e.Y8G("innerHTML",e.i5U(2,3,n.isLicenseExpired?"_i18n.LicenseExpiredWarningWithRenew":"_i18n.LicenseExpiresWarningWithRenew",e.
1sMw(6,xn,e.bMT(1,1,n.licenseExpirationDate),n.renewLink,n.moreInfoLink)),e.npT)}}function En(d,j){if(1&d&&(e.nrm(0,"span",11),e.nI1(1,"date"),e.nI1(2,"translate")),2&d){const n=e.XpG(),g=e.XpG(3);e.Y8G("innerHTML",e.i5U(2,3,n.isLicenseExpired?"_i18n.LicenseExpiredWarning":"_i18n.LicenseExpiresWarning",e.l_i(6,Rn,e.bMT(1,1,n.licenseExpirationDate),g.notificationWarningsService.moreInfoLink)),e.npT)}}function On(d,j){if(1&d&&(e.j41(0,"li",8)(1,"div",9),e.nrm(2,"span",10),e.nVh(3,wn,3,10,"span",11)(4,En,3,9,"span",11),e.k0s()(),e.nrm(5,"li",7)),2&d){const n=j;e.R7$(2),e.HbH(e.VkB("svg-md ",n.severityStyleClass)),e.R7$(),e.vxM(n.renewLink?3:4)}}function An(d,j){1&d&&(e.j41(0,"li",12)(1,"div",13),e.nrm(2,"span",10),e.j41(3,"span"),e.EFF(4),e.nI1(5,"translate"),e.k0s()()(),e.nrm(6,"li",7)),2&d&&(e.R7$(2),e.HbH(e.VkB("",j.severityStyleClass," svg-md")),e.R7$(2),e.SpI(" ",e.bMT(5,4,"_i18n.3CXRequiresSecureConnection")," "))}function Dn(d,j){if(1&d){const n=e.RV6();e.j41(0,"a",16),e.bIt("click",function(){v.eBV(n);const P=e.XpG(4);return v.Njj(P.notificationWarningsService.openNotificationModal())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&d&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"_i18n.Allow")))}function Sn(d,j){if(1&d&&(e.j41(0,"li",14)(1,"div",13),e.nrm(2,"span",10),e.j41(3,"span"),e.EFF(4),e.nI1(5,"translate"),e.nV
1h(6,Dn,3,3,"a",15),e.k0s()()(),e.nrm(7,"li",7)),2&d){const n=e.XpG(3);e.R7$(2),e.HbH(e.VkB("",j.severityStyleClass," svg-md")),e.R7$(2),e.SpI(" ",e.bMT(5,5,"_i18n.NotificationsAreNotEnabled")," "),e.R7$(2),e.vxM(n.notificationWarningsService.hasDefaultPermission()?6:-1)}}function In(d,j){if(1&d&&(e.j41(0,"ul",5)(1,"li",6),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.nrm(4,"li",7),e.nVh(5,On,6,4),e.nVh(6,An,7,6),e.nVh(7,Sn,8,7),e.k0s()),2&d){let n,g,P;e.XpG(2);const Y=e.r8f(0);e.R7$(2),e.JRh(e.bMT(3,4,"_i18n.Notifications")),e.R7$(3),e.vxM((n=Y.licenseExpiration)?5:-1,n),e.R7$(),e.vxM((g=Y.insecureConnection)?6:-1,g),e.R7$(),e.vxM((P=Y.pushNotification)?7:-1,P)}}function Bn(d,j){if(1&d&&(e.j41(0,"div",0),e.vzT("leave"),e.j41(1,"button",1),e.nI1(2,"translate"),e.nrm(3,"lucide-icon",2)(4,"app-counter-badge",3),e.k0s(),e.DNE(5,In,8,6,"ul",4),e.k0s()),2&d){const n=e.XpG(),g=e.r8f(0);e.R7$(),e.Y8G("title",e.bMT(2,5,"_i18n.Notifications")),e.R7$(2),e.Y8G("img",n.BellRing),e.R7$(),e.HbH(n.notificationWarningsService.badgeStyleClass(g.notificationStatistics.highestSeverity)),e.Y8G("count",g.notificationStatistics.totalNotifications)}}let $n=(()=>{class d{notificationWarningsService=(0,v.WQX)(_n);BellRing=_e.Mqe;static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["app-notification-warnings-button"]],decls:3,vars:4,consts:[["dropdown","","placement","bottom right",1,"dropdown","fade-in-out"],["type","button","dropdownToggle","","data-qa","notifications-btn","role","button",1,"btn","btn-plain","btn-icon",3,"title"],[3,"img"],[3,"count"],["data-qa","notifications-dropdown","class","dropdown-menu black-menu dropdown-menu-right",4,"dropdownMenu"],["data-qa","notifications-dropdown",1,"dropdown-menu","black-menu","dropdown-menu-right"],[1,"p-2","fw-bold","text-md"],[1,"divider","dropdown-divider"],["data-qa","license-expiration-warning"],[1,"dropdown-item","text-wrap","mb-0","p-2","d-flex","gap-2","align-items-center","text-sm"],["app-exclamation-circle-solid-icon",""],[3,"innerHTML"],["data-qa","insecure-connection-warning"],[1,"notification-item","text-wrap","dropdown-item","mb-0","p-2","d-flex","gap-2","align-items-center","text-sm"],["data-qa","allow-notifications-warning"],[1,"link"],[1,"link",3,"click"]],template:function(g,P){if(1&g&&(e.SS7(0),e.nI1(1,"async"),e.nVh(2,Bn,6,7,"div",0)),2&g){const Y=e.bH3(e.bMT(1,1,P.notificationWarningsService.notificationWarnings$));e.R7$(2),e.vxM(Y&&Y.notificationStatistics.totalNotifications>0?2:-1)}},dependencies:[Je.Kk,Je.UL,Je.hs,gn.b,St.h,_e.flO,_e.WGl,Ie.D9,Oe.Jj,Oe.vh],styles:["[_nghost-%COMP%]:empty{display:none}[_nghost-%COMP%] .fade-in-out[_ngcontent-%COMP%]{transition:opacity ease-in-out 2s;opacity:1}@starting-style{[_nghost-%COMP%] .fade-in-out[_ngcontent-%COMP%]{opacity:0}}[_nghost-%COMP%] .fade-in-out.leave[_ngcontent-%COMP%]{opacity:0}[_nghost-%COMP%] .badge[_ngcontent-%COMP%]{position:absolute;top:6px;right:0}.new-design [_nghost-%COMP%] .badge[_ngcontent-%COMP%]{top:-6px;right:-4px}[_nghost-%COMP%] .dropdown-menu[_ngcontent-%COMP%]{line-height:normal;width:max-content;right:-115px!important}"]})}return d})();var lt=t(23773),Fn=t(19781);function Hn(d,j){if(1&d&&e.nrm(0,"img",11),2&d){const n=e.XpG();e.Y8G("src",n.BrandLogoImage,e.B4B)}}function Gn(d,j){1&d&&e.nrm(0,"show-3cx-logo-icon",12)}function Un(d,j){if(1&d&&(e.j41(0,"a",1),e.nI1(1,"translate"),e.nV
1h(2,Hn,1,1,"img",11)(3,Gn,1,0,"show-3cx-logo-icon",12),e.k0s()),2&d){const n=j,g=e.XpG();e.Y8G("href",e.mNQ(g.isValidBrandUrl(n.BrandUrl)?n.BrandUrl:e.bMT(1,3,"_i18n.AboutUri")),e.B4B),e.R7$(2),e.vxM(n.BrandLogoImage?2:3)}}function Wn(d,j){if(1&d){const n=e.RV6();e.j41(0,"field-checkbox",13),e.nI1(1,"translate"),e.mxI("ngModelChange",function(P){v.eBV(n);const Y=e.XpG();return e.DH7(Y.isNewDesign,P)||(Y.isNewDesign=P),v.Njj(P)}),e.k0s()}if(2&d){const n=e.XpG();e.Y8G("switch",!0)("title",e.bMT(1,3,"_i18n.TryTheNewUI")),e.R50("ngModel",n.isNewDesign)}}function Nn(d,j){if(1&d){const n=e.RV6();e.j41(0,"ul",17)(1,"li",18)(2,"a",19),e.bIt("click",function(){v.eBV(n);const P=e.XpG(3);return v.Njj(P.endMeeting())}),e.EFF(3),e.nI1(4,"translate"),e.k0s()()()}2&d&&(e.R7$(3),e.JRh(e.bMT(4,1,"_i18n.EndMeeting")))}function Vn(d,j){1&d&&(e.nrm(0,"button",15),e.DNE(1,Nn,5,3,"ul",16))}function Ln(d,j){if(1&d){const n=e.RV6();e.j41(0,"div",4)(1,"button",14),e.nI1(2,"translate"),e.bIt("click",function(){v.eBV(n);const P=e.XpG();return v.Njj(P.backToMeeting())}),e.nrm(3,"lucide-icon",7),e.k0s(),e.nVh(4,Vn,2,0),e.k0s()}if(2&d){const n=e.XpG();e.R7$(),e.Y8G("title",e.bMT(2,3,"_i18n.BackToMeet")),e.R7$(2),e.Y8G("img",n.Video),e.R7$(),e.vxM(n.isNewDesign()?-1:4)}}function jn(d,j){if(1&d){const n=e.RV6();e.j41(0,"button",20),e.nI1(1,"translate"),e.bIt("click",function(){v.eBV(n);const P=e.XpG();return v.Njj(P.disableSilentMode())}),e.nrm(2,"lucide-icon",21)(3,"lucide-icon",22),e.k0s()}if(2&d){const n=e.XpG();e.Y8G("title",e.bMT(1,3,"_i18n.SetRingerOn")),e.R7$(2),e.Y8G("img",n.BellOff),e.R7$(),e.Y8G("img",n.Bell)}}const It="https://www.3cx.com/user-manual/web-client/";let kn=(()=>{class d{silentModeService=(0,v.WQX)(a.Y);route=(0,v.WQX)(H.nX);router=(0,v.WQX)(H.Ix);modalService=(0,v.WQX)(Q.B);callsAdapterService=(0,v.WQX)(yt.d);myPhone=(0,v.WQX)(B.gx);webmeetingService=(0,v.WQX)(Et.l);myPhoneSession=this.myPhone.myPhoneSessionInit$.pipe((0,r.Z)(!0),(0,m.n)(()=>this.myPhone.myPhoneSession));isNewDesign=(0,lt.I)(ie.Hh.NewDesign,!0);isLab=(0,lt.I)(ie.Hh.Lab,!1);QrCode=_e.vW6;PhoneCall=_e.d3s;BellOff=_e.br1;Bell=_e.IrQ;FileText=_e.iUU;Video=_e.CeX;routeData=(0,Me.ot)((0,hn.c)(this.router).pipe((0,m.n)(()=>this.route.firstChild?.data??p.w),(0,r.Z)(this.route.firstChild?.snapshot?.data),(0,h.T)(n=>({helpUri:n?.helpUri??It,title:n?.title??""}))),{initialValue:{helpUri:It,title:""}});isValidBrandUrl=de.lx;systemParameters=(0,Me.ot)(this.myPhoneSession.pipe((0,m.n)(n=>n.systemParameters$)));contact=(0,Me.ot)(this.myPhoneSession.pipe((0,oe.F4)(!1)));silentMode=(0,Me.ot)(this.silentModeService.silentMode$);sectionTitle=(0,U.EW)(()=>this.isNewDesign()?"":this.routeData().title);hasWebMeeting=(0,Me.ot)((0,s.z)([this.webmeetingService.isActive,this.webmeetingService.isMeetingMainScreen]).pipe((0,h.T)(([n,g])=>n&&!g)));backToMeeting(){this.router.navigate([Ot.Hk])}endMeeting(){this.webmeetingService.deactivate()}disableSilentMode(){this.silentModeService.setSilentMode(!1)}openSmartphoneModal(){this.modalService.showComponent(W.N)}toggleDialer(){this.callsAdapterService.toggleDialer()}static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["app-header"]],hostVars:2,hostBindings:function(g,P){2&g&&e.AVh("new-design",P.isNewDesign())},decls:19,vars:24,consts:[[1,"navbar"],["target","_blank",1,"logo-button",3,"href"],[1,"flex-grow-1","px-1",3,"truncatedText"],["label","_i18n.TryTheNewUI","data-qa","new-design-toggle",1,"new-design-toggle","mb-0","me-1",3,"switch","title","ngModel"],["role","group","dropdown","",1,"btn-group"],["type","button","data-qa","button-disable-silent-mode",1,"btn","btn-icon","btn-plain","no-transition",3,"title"],["type","button","data-qa","header-call-btn",1,"btn","btn-primary","btn-icon",3,"click","title"],[3,"img"],["type","button","data-qa","header-install-mobile-app",1,"btn","btn-plain","btn-icon",3,"click","title"],["data-qa","header-help-btn","target","_blank",1,"btn","btn-plain","btn-icon",3,"href","title"],[3,"myContact","newDesign"],["alt","brand-img",1,"brand-img",3,"src"],[1,"d-flex","header-logo"],["label","_i18n.TryTheNewUI","data-qa","new-design-toggle",1,"new-design-toggle","mb-0","me-1",3,"ngModelChange","switch","title","ngModel"],["data-qa","button-back-to-meeting","type","button",1,"btn","btn-icon","btn-plain","pulse-border",3,"click","title"],["type","button","dropdownToggle","",1,"dropdown-toggle","dropdown-toggle-split","btn","btn-plain","px-1","me-1"],["class","dropdown-menu black-menu","role","menu",4,"dropdownMenu"],["role","menu",1,"dropdown-menu","black-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["type","button","data-qa","button-disable-silent-mode",1,"btn","btn-icon","btn-plain","
1no-transition",3,"click","title"],[1,"fillIconWithTertiary","hover-hide",3,"img"],[1,"fillIconWhite","hover-show",3,"img"]],template:function(g,P){if(1&g&&(e.j41(0,"header",0),e.nVh(1,Un,4,5,"a",1),e.nrm(2,"div",2),e.nI1(3,"translate"),e.nVh(4,Wn,2,5,"field-checkbox",3),e.nVh(5,Ln,5,5,"div",4),e.nVh(6,jn,4,5,"button",5),e.nrm(7,"app-notification-warnings-button"),e.j41(8,"button",6),e.nI1(9,"translate"),e.bIt("click",function(){return P.toggleDialer()}),e.nrm(10,"lucide-icon",7),e.k0s(),e.j41(11,"button",8),e.nI1(12,"translate"),e.bIt("click",function(){return P.openSmartphoneModal()}),e.nrm(13,"lucide-icon",7),e.k0s(),e.j41(14,"a",9),e.nI1(15,"translate"),e.nI1(16,"translate"),e.nrm(17,"lucide-icon",7),e.k0s(),e.nrm(18,"wc-account-menu",10),e.k0s()),2&g){let Y;e.R7$(),e.vxM((Y=P.systemParameters())?1:-1,Y),e.R7$(),e.Y8G("truncatedText",e.bMT(3,14,P.sectionTitle())),e.R7$(2),e.vxM(P.isLab()?4:-1),e.R7$(),e.vxM(P.hasWebMeeting()?5:-1),e.R7$(),e.vxM(P.silentMode()?6:-1),e.R7$(2),e.Y8G("title",e.bMT(9,16,"_i18n.Dialer")),e.R7$(2),e.Y8G("img",P.PhoneCall),e.R7$(),e.Y8G("title",e.bMT(12,18,"_i18n.Get3cxApp")),e.R7$(2),e.Y8G("img",P.QrCode),e.R7$(),e.Y8G("href",e.bMT(15,20,P.routeData().helpUri),e.B4B)("title",e.bMT(16,22,"_i18n.HelpPage")),e.R7$(3),e.Y8G("img",P.FileText),e.R7$(),e.Y8G("myContact",P.contact())("newDesign",P.isNewDesign())}},dependencies:[ve.h,mn,bt.N,_e.flO,_e.WGl,Je.Kk,Je.UL,Je.hs,$n,ee.YN,ee.BC,ee.vS,Fn.t,Ie.D9],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}}[_nghost-%COMP%] .navbar-collapse[_ngcontent-%COMP%]{box-shadow:0 2px 2px #0000000d,0 1px #0000000d}[_nghost-%COMP%] .brand-img[_ngcontent-%COMP%]{object-fit:contain;width:50px;height:50px}[_nghost-%COMP%] .navbar[_ngcontent-%COMP%]{width:100%;height:var(--top-header-height);display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;border:none;border-radius:0;margin:0;padding:0;background-color:var(--bg-tertiary);color:var(--text-secondary);--current-background: var(--bg-tertiary)}[_nghost-%COMP%] .navbar[_ngcontent-%COMP%] .btn-icon[_ngcontent-%COMP%]{--svg-color: currentColor;--svg-size: 18px}[_nghost-%COMP%] .logo-button[_ngcontent-%COMP%]{width:var(--aside-folded-width);--svg-size: 50px;--svg-color: var(--bg-secondary)}[_nghost-%COMP%]:not(.new-design) .btn, [_nghost-%COMP%] .logo-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;color:inherit;border:none;background-color:var(--bg-tertiary);height:100%}[_nghost-%COMP%]:not(.new-design) .btn:not(.logo-button), [_nghost-%COMP%] .logo-button[_ngcontent-%COMP%]:not(.logo-button){padding:0 var(--spacer-s)}[_nghost-%COMP%]:not(.new-design) .btn:hover, [_nghost-%COMP%]:not(.new-design) .btn:active, [_nghost-%COMP%] .logo-button[_ngcontent-%COMP%]:hover, [_nghost-%COMP%] .logo-button[_ngcontent-%COMP%]:active{background-color:var(--bg-tertiary-active)}[_nghost-%COMP%] app-notification-warnings-button[_ngcontent-%COMP%]{display:flex;height:100%}.new-design[_nghost-%COMP%] app-notification-warnings-button[_ngcontent-%COMP%]{display:contents}[_nghost-%COMP%] .btn[_ngcontent-%COMP%]:not(:hover):not(:active) .hover-show[_ngcontent-%COMP%], [_nghost-%COMP%] .btn[_ngcontent-%COMP%]:hover .hover-hide[_ngcontent-%COMP%], [_nghost-%COMP%] .btn[_ngcontent-%COMP%]:active .hover-hide[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .no-transition[_ngcontent-%COMP%]{transition:none}@media(max-width:575.98px){[_nghost-%COMP%] .new-design-toggle[_ngcontent-%COMP%] .form-check-label{display:none!important}}.new-design[_nghost-%COMP%]{--btn-icon-size: 32px}.new-design[_nghost-%COMP%] .navbar[_ngcontent-%COMP%]{gap:var(--spacer);padding-right:var(--spacer-s)}.new-design[_nghost-%COMP%] .btn-plain{--bs-btn-color: inherit;--bs-btn-bg: var(--top-bar-btn-bg);--bs-btn-hover-bg: var(--top-bar-btn-hover-bg);--bs-btn-active-bg: var(--bs-btn-hover-bg)}.new-design[_nghost-%COMP%] .pulse-border{animation:_ngcontent-%COMP%_border-pulse 2s ease-in-out infinite}@keyframes _ngcontent-%COMP%_border-pulse{0%,to{box-shadow:0 0 color-mix(in srgb,var(--bg-secondary) 50%,transparent)}50%{box-shadow:0 0 0 6px transparent}}"],changeDetection:0})}return d})();var Qn=t(65245),zn=t(48615),Pt=t(97937),Xn=t(1191),eo=t(33226);const ht=()=>({exact:!1});function ro(d,j){1&d&&e.nrm(0,"app-counter-badge",6),2&d&&e.Y8G("count",j)}function so(d,j){1&d&&e.nrm(0,"app-counter-badge",10),2&d&&e.Y8G("count",j)}function lo(d,j){if(1&d&&(e.j41(0,"li",2)(1,"a",15),e.nrm(2,"app-icon",4),e.EFF(3),e.nI1(4,"translate"),e.nV
1h(5,so,1,1,"app-counter-badge",10),e.nI1(6,"async"),e.k0s()()),2&d){let n;const g=e.XpG();e.R7$(2),e.Y8G("icon",g.chatIcon()),e.R7$(),e.SpI(" ",e.bMT(4,3,"_i18n.Chat")," "),e.R7$(2),e.vxM((n=e.bMT(6,5,g.notifications.unreadConversationCount$))?5:-1,n)}}function co(d,j){1&d&&e.nrm(0,"app-counter-badge",10),2&d&&e.Y8G("count",j)}function uo(d,j){if(1&d&&(e.j41(0,"li",2)(1,"a",16),e.nrm(2,"app-icon",4),e.EFF(3),e.nI1(4,"translate"),e.k0s()()),2&d){const n=e.XpG();e.R7$(),e.Y8G("routerLinkActiveOptions",e.lJ4(5,ht)),e.R7$(),e.Y8G("icon",n.recordingsIcon()),e.R7$(),e.SpI(" ",e.bMT(4,3,"_i18n.NavRecording")," ")}}function po(d,j){if(1&d&&(e.j41(0,"li",2)(1,"a",17),e.nrm(2,"app-icon",4),e.EFF(3),e.nI1(4,"translate"),e.k0s()()),2&d){const n=e.XpG();e.R7$(),e.Y8G("routerLinkActiveOptions",e.lJ4(5,ht)),e.R7$(),e.Y8G("icon",n.adminIcon()),e.R7$(),e.SpI(" ",e.bMT(4,3,"_i18n.Admin")," ")}}let fo=(()=>{class d{app=(0,v.WQX)(O.t);router=(0,v.WQX)(H.Ix);notifications=(0,v.WQX)(ye);rolesService=(0,v.WQX)(Pt.u);swPush=(0,v.WQX)(D.Xd);tokenInfoService=(0,v.WQX)(ce.Z);contactsQueryParams=(0,lt.I)(ie.Hh.SaveContactsQueryParams,ie.Xy);peopleLink=(0,lt.I)(ie.Hh.SavePeople,ie.lX);notificationsAsk$;isNewDesign=(0,v.WQX)(rt.e);peopleIcon=(0,U.EW)(()=>this.isNewDesign()?_e.zWC:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M192 256c61.9 0 112-50.1 112-112S253.9 32 192 32 80 82.1 80 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C51.6 288 0 339.6 0 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zM480 256c53 0 96-43 96-96s-43-96-96-96-96 43-96 96 43 96 96 96zm48 32h-3.8c-13.9 4.8-28.6 8-44.2 8s-30.3-3.2-44.2-8H432c-20.4 0-39.2 5.9-55.7 15.4 24.4 26.3 39.7 61.2 39.7 99.8v38.4c0 2.2-.5 4.3-.6 6.4H592c2
16.5 0 48-21.5 48-48 0-61.9-50.1-112-112-112z"/></svg>');callHistoryIcon=(0,U.EW)(()=>this.isNewDesign()?_e.bcf:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M504 255.532c.252 136.64-111.182 248.372-247.822 248.468-64.014.045-122.373-24.163-166.394-63.942-5.097-4.606-5.3-12.543-.443-17.4l16.96-16.96c4.529-4.529 11.776-4.659 16.555-.395C158.208 436.843 204.848 456 256 456c110.549 0 200-89.468 200-200 0-110.549-89.468-200-200-200-55.52 0-105.708 22.574-141.923 59.043l49.091 48.413c7.641 7.535 2.305 20.544-8.426 20.544H26.412c-6.627 0-12-5.373-12-12V45.443c0-10.651 12.843-16.023 20.426-8.544l45.097 44.474C124.866 36.067 187.15 8 256 8c136.811 0 247.747 110.781 248 247.532zm-167.058 90.173 14.116-19.409c3.898-5.36 2.713-12.865-2.647-16.763L280 259.778V116c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v168.222l88.179 64.13c5.36 3.897 12.865 2.712 16.763-2.647z"/></svg>');meetingIcon=(0,U.EW)(()=>this.isNewDesign()?_e.CeX:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M208.545 398.405c.848-28.636.848-57.06-19.515-79.333-22.06-23.97-35.212-24.181-57.06-.212-30.334 33.303-22.698 32.879-53.667-1.06-21.212-23.122-32.242-23.334-54.515-.425-11.667 11.879-18.242 26.515-21 46.667l-.636 30.12c.212 7.637 1.697 10.607 9.12 10.607 62.788-.212 125.364-.212 188.151-.212 3.607-.425 8.91 1.485 9.122-6.152z"/><path d="M71.727 235.285c-5.515.212-13.788-2.97-13.576 8.909.425 20.363 4.667 39.242 21.212 51.333 16.334 11.879 33.515 12.727 49.849 1.697 22.697-15.273 25.03-39.454 21.636-66.606-26.727 7.424-53.03 3.394-79.12 4.667zm-5.94-7.849c1.486.212 3.183.212 5.092 0h26.09v.212c1.061 0 2.334 0 3.182-.212h12.515v-.424c7.425-.212 14.849-.636 22.273-2.121 14.636-2.97 18.242-15.91 17.182-30.545-.849-7 4.454-19.303-5.515-19.728-23.122-1.06-47.091-5.727-69.364 3.606C61.545 184.8 55.606 202.406 59 219.376c.848 5.515 3.394 7.636 6.788 8.06zm137.455-28-.849 30.122c.212 7.636 1.697 10.606 9.121 10.606 62.788-.213 125.363-.213 188.15-.213 3.82 0 9.122 1.91 9.334-5.727.849-28.636.849-57.06-19.515-79.333-22.06-23.97-35.212-24.181-57.06-.212-30.333 33.303-22.697 32.879-53.667-1.06-21.212-23.122-32.242-23.334-54.514-.425-11.667 11.667-18.243 26.091-21 46.242z"/><path d="M280.759 70.892c-5.516.212-13.788-2.97-13.576 8.909.424 20.363 4.667 39.242 21.212 51.333 16.333 11.878 33.515 12.727 49.848 1.697 22.697-15.273 25.03-39.455 21.636-66.606-26.727 7.424-52.818 3.394-79.12 4.667zm-5.939-7.637c1.484.212 3.181.212 5.09 0H306v.212c1.061 0 2.334 0 3.183-.212h12.515v-.424c7.424-.212 14.848-.636 22.272-2.121 14.637-2.97 18.243-15.91 17.182-30.545-.636-6.788 4.667-19.091-5.515-19.516-23.121-1.06-47.09-5.727-69.363 3.819-15.697 6.575-21.637 24.181-18.243 41.151.849 4.879 3.394 7 6.788 7.636zm130.877 360.818c-30.333 33.302-22.696 32.878-53.666-1.061-21-23.121-32.242-23.333-54.303-.424-11.666 11.878-18.242 26.515-21 46.666l-.848 30.121c.212 7.637 1.697 10.606 9.121 10.606 62.788-.212 125.363-.212 188.15-.212 3.819 0 9.122 1.91 9.334-5.727.848-28.636.848-57.06-19.515-79.333-22.273-24.182-35.636-24.394-57.273-.636z"/><path d="M345.455 339.86c-5.515.212-13.788-2.97-13.575 8.91.424 20.363 4.666 39.241 21.212 51.332 16.333 11.879 33.515 12.727 49.848 1.697 22.697-15.273 25.03-39.454 21.636-66.606-26.727 7.637-53.03 3.394-79.12 4.667zm74.879-60.454c-23.121-1.06-47.091-5.727-69.364 3.818-15.697 6.576-21.636 24.182-18.242 41.151 1.06 5.303 3.818 7.424 7 7.849 1.485.212 3.182.212 4.879 0h26.09v.212c1.061 0 2.334 0 3.182-.212h12.515v-.425c7.425-.212 14.849-.636 22.273-2.12 14.636-2.97 18.242-15.91 17.182-30.546-.637-7 4.454-19.303-5.515-19.727zM120.303 141.952V36.316h110.302c19.09 0 19.09-34.297 0-34.297h-125.15c-8.061 0-14.85 7.285-14.85 16.194V141.74c0 21.212 29.698 21.424 29.698.212zM494.788 2.377h-84c-19.09 0-19.09 32.878 0 32.878h69.363v274.908h-2.545c-19.09 0-19.09 32.879 0 32.879H495c8.06 0 14.848-7.424 14.848-16.333V19.134c-.424-9.12-7.212-16.757-15.06-16.757zM239.183 477.103H128.881v-35.849c0-21.212-29.485-21.212-29.485 0v52.394c0 8.909 6.788 16.333 14.848 16.333h125.151c18.879 0 18.879-32.878-.212-32.878z"/></svg>');panelIcon=(0,U.EW)(()=>this.isNewDesign()?_e.pRo:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M24 32c13.3 0 24 10.7 24 24V408c0 13.3 10.7 24 24 24H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H72c-39.8 0-72-32.2-72-72V56C0 42.7 10.7 32 24 32zM128 136c0-13.3 10.7-24 24-24l208 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-208 0c-13.3 0-24-10.7-24-24zm24 72H296c13.3 0 24 10.7 24 24s-10.7 24-24 24H152c-13.3 0-24-10.7-24-24s10.7-24 24-24zm0 96H424c13.3 0 24 10.7 24 24s-10.7 24-24 24H152c-13.3 0-24-10.7-24-24s10.7-24 24-24z"/></svg>\n');chatIcon=(0,U.EW)(()=>this.isNewDesign()?_e.oFn:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M416 224V64c0-35.3-28.7-64-64-64H64C28.7 0 0 28.7 0 64v160c0 35.3 28.7 64 64 64v54.2c0 8 9.1 12.6 15.5 7.8l82.8-62.1H352c35.3.1 64-28.6 64-63.9zm96-64h-64v64c0 52.9-43.1 96-96 96H192v64c0 35.3 28.7 64 64 64h125.7l82.8 62.1c6.4 4.8 15.5.2 15.5-7.8V448h32c35.3 0 64-28.7 64-64V224c0-35.3-28.7-64-64-64z"/></svg>');contactsIcon=(0,U.EW)(()=>this.isNewDesign()?_e.Bve:eo);voicemailIcon=(0,U.EW)(()=>this.isNewDesign()?_e.c2U:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"/></svg>\n');recordingsIcon=(0,U.EW)(()=>this.isNewDesign()?_e.GOn:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512"><path d="M336 192h-16c-8.84 0-16 7.16-16 16v48c0 74.8-64.49 134.82-140.79 127.38C96.71 376.89 48 317.11 48 250.3V208c0-8.84-7.16-16-16-16H16c-8.84 0-16 7.16-16 16v40.16c0 89.64 63.97 169.55 152 181.69V464H96c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h160c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16h-56v-33.77C285.71 418.47 352 344.9 352 256v-48c0-8.84-7.16-16-16-16zM176 352c53.02 0 96-42.98 96-96h-85.33c-5.89 0-10.67-3.58-10.67-8v-16c0-4.42 4.78-8 10.67-8H272v-32h-85.33c-5.89 0-10.67-3.58-10.67-8v-16c0-4.42 4.78-8 10.67-8H272v-32h-85.33c-5.89 0-10.67-3.58-10.67-8v-16c0-4.42 4.78-8 10.67-8H272c0-53.02-42.98-96-96-96S80 42.98 80 96v160c0 53.02 42.98 96 96 96z"/></svg>');settingsIcon=(0,U.EW)(()=>this.isNewDesign()?_e.wB_:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M352 320c88.4 0 160-71.6 160-160c0-15.3-2.2-30.1-6.2-44.2c-3.1-10.8-16.4-13.2-24.3-5.3l-76.8 76.8c-3 3-7.1 4.7-11.3 4.7H336c-8.8 0-16-7.2-16-16V118.6c0-4.2 1.7-8.3 4.7-11.3l76.8-76.8c7.9-7.9 5.4-2
11.2-5.3-24.3C382.1 2.2 367.3 0 352 0C263.6 0 192 71.6 192 160c0 19.1 3.4 37.5 9.5 54.5L19.9 396.1C7.2 408.8 0 426.1 0 444.1C0 481.6 30.4 512 67.9 512c18 0 35.3-7.2 48-19.9L297.5 310.5c17 6.2 35.4 9.5 54.5 9.5zM80 408a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"/></svg>\n');adminIcon=(0,U.EW)(()=>this.isNewDesign()?_e.mg3:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"/></svg>\n');
1appsIcon=(0,U.EW)(()=>this.isNewDesign()?_e.Edl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M58.9 42.1c3-6.1 9.6-9.6 16.3-8.7L320 64 564.8 33.4c6.7-.8 13.3 2.7 16.3 8.7l41.7 83.4c9 17.9-.6 39.6-19.8 45.1L439.6 217.3c-13.9 4-28.8-1.9-36.2-14.3L320 64 236.6 203c-7.4 12.4-22.3 18.3-36.2 14.3L37.1 170.6c-19.3-5.5-28.8-27.2-19.8-45.1L58.9 42.1zM321.1 128l54.9 91.4c14.9 24.8 44.6 36.6 72.5 28.6L576 211.6v167c0 22-15 41.2-36.4 46.6l-204.1 51c-10.2 2.6-20.9 2.6-31 0l-204.1-51C79 419.7 64 400.5 64 378.5v-167L191.6 248c27.8 8 57.6-3.8 72.5-28.6L318.9 128h2.2z"/></svg>\n');recordingsVisible$;callHistorySubState$;chatVisible$;isEdge=zn.UP;constructor(){const n=(0,v.WQX)(B.gx);this.notificationsAsk$=this.swPush.permissionState$.pipe((0,h.T)(le=>"prompt"===le));const g=n.myPhoneSession.pipe((0,m.n)(le=>le.myInfo$),(0,re.H9)()),P=g.pipe((0,h.T)(le=>le.MissedCallsCount)),Y=n.myPhoneSession.pipe((0,m.n)(le=>le.newAbandonedQueueCallsAmount$));this.recordingsVisible$=(0,s.z)([n.isPro$,g.pipe((0,h.T)(le=>le.CanSeeRecordings))]).pipe((0,h.T)(([le,se])=>le&&se)),this.chatVisible$=n.myPhoneSession.pipe((0,m.n)(le=>le.systemParameters$),(0,h.T)(le=>le.ChatIsEnabled)),this.callHistorySubState$=(0,s.z)([P,Y]).pipe((0,h.T)(le=>{const[se,Re]=le;return Re>0?"/call_history/abandoned":se?"/call_history/missed":"/call_history"}),(0,r.Z)("/call_history"),(0,re.H9)()),this.rolesService.myGroupIds$.pipe((0,h.T)(le=>new Set(le.map(se=>JSON.stringify({RoleName:se.RoleName,CanSeeGroupRecordings:se.CanSeeGroupRecordings})))),(0,_.F)(Pt._),(0,Qn.i)(1),(0,Me.pQ)()).subscribe(()=>{this.tokenInfoService.getNewAccessToken()})}newConferenceUrl=Ot.i0;static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["app-nav"]],hostVars:2,hostBindings:function(g,P){2&g&&e.AVh("new-design",P.isNewDesign())},decls:54,vars:59,consts:[[1,"navi","clearfix"],[1,"nav"],[1,"nav-item"],["routerLinkActive","active","data-qa","people-link",3,"routerLink"],[3,"icon"],["routerLinkActive","active","data-qa","call-history-link",3,"routerLink"],[1,"bg-red",3,"count"],["routerLink","/switchboard","routerLinkActive","active","data-qa","switchboard-link"],["routerLink","/contacts","routerLinkActive","active","data-qa","contacts-link",3,"queryParams"],["routerLink","/voicemails","data-qa","voicemails-link","routerLinkActive","active",3,"routerLinkActiveOptions"],[1,"bg-brand",3,"count"],["routerLinkActive","active","data-qa","conference-link",3,"routerLink","routerLinkActiveOptions"],["routerLink","/settings","data-qa","settings-link","routerLinkActive","active",3,"routerLinkActiveOptions"],[1,"flex-grow-1"],["routerLink","/apps","routerLinkActive","active","data-qa","apps-link"],["routerLink","/chat","routerLinkActive","active","data-qa","chat-link"],["routerLink","/recordings","data-qa","recordings-link","routerLinkActive","active",3,"routerLinkActiveOptions"],["routerLink","/office","routerLinkActive","active","data-qa","admin-link",3,"routerLinkActiveOptions"]],template:function(g,P){if(1&g&&(e.j41(0,"nav",0)(1,"ul",1)(2,"li",2)(3,"a",3),e.nrm(4,"app-icon",4),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.j41(7,"li",2)(8,"a",5),e.nI1(9,"async"),e.nrm(10,"app-icon",4),e.EFF(11),e.nI1(12,"translate"),e.nV
1h(13,ro,1,1,"app-counter-badge",6),e.nI1(14,"async"),e.k0s()(),e.nVh(15,lo,7,7,"li",2),e.nI1(16,"async"),e.j41(17,"li",2)(18,"a",7),e.nrm(19,"app-icon",4),e.EFF(20),e.nI1(21,"translate"),e.k0s()(),e.j41(22,"li",2)(23,"a",8),e.nrm(24,"app-icon",4),e.EFF(25),e.nI1(26,"translate"),e.k0s()(),e.j41(27,"li",2)(28,"a",9),e.nrm(29,"app-icon",4),e.EFF(30),e.nI1(31,"translate"),e.nVh(32,co,1,1,"app-counter-badge",10),e.nI1(33,"async"),e.k0s()(),e.nVh(34,uo,5,6,"li",2),e.nI1(35,"async"),e.j41(36,"li",2)(37,"a",11),e.nrm(38,"app-icon",4),e.EFF(39),e.nI1(40,"translate"),e.k0s()(),e.j41(41,"li",2)(42,"a",12),e.nrm(43,"app-icon",4),e.EFF(44),e.nI1(45,"translate"),e.k0s()(),e.nrm(46,"div",13),e.nVh(47,po,5,6,"li",2),e.nI1(48,"async"),e.j41(49,"li",2)(50,"a",14),e.nrm(51,"app-icon",4),e.EFF(52),e.nI1(53,"translate"),e.k0s()()()()),2&g){let Y,le,se;e.R7$(3),e.Y8G("routerLink",P.peopleLink()),e.R7$(),e.Y8G("icon",P.peopleIcon()),e.R7$(),e.SpI(" ",e.bMT(6,28,"_i18n.Team")," "),e.R7$(3),e.Y8G("routerLink",e.bMT(9,30,P.callHistorySubState$)),e.R7$(2),e.Y8G("icon",P.callHistoryIcon()),e.R7$(),e.SpI(" ",e.bMT(12,32,"_i18n.AllowpushCalls")," "),e.R7$(2),e.vxM((Y=e.bMT(14,34,P.notifications.missedAndAbandonedCalls$))?13:-1,Y),e.R7$(2),e.vxM(e.bMT(16,36,P.chatVisible$)?15:-1),e.R7$(4),e.Y8G("icon",P.panelIcon()),e.R7$(),e.SpI(" ",e.bMT(21,38,"_i18n.Panel")," "),e.R7$(3),e.Y8G("queryParams",P.contactsQueryParams()),e.R7$(),e.Y8G("icon",P.contactsIcon()),e.R7$(),e.SpI(" ",e.bMT(26,40,"_i18n.Contacts")," "),e.R7$(3),e.Y8G("routerLinkActiveOptions",e.lJ4(56,ht)),e.R7$(),e.Y8G("icon",P.voicemailIcon()),e.R7$(),e.SpI(" ",e.bMT(31,42,"_i18n.VoiceMail")," "),e.R7$(2),e.vxM((le=e.bMT(33,44,P.notifications.unheardVoicemails$))?32:-1,le),e.R7$(2),e.vxM(e.bMT(35,46,P.recordingsVisible$)?34:-1),e.R7$(3),e.Y8G("routerLink",P.newConferenceUrl)("routerLinkActiveOptions",e.lJ4(57,ht)),e.R7$(),e.Y8G("icon",P.meetingIcon()),e.R7$(),e.SpI(" ",e.bMT(40,48,"_i18n.Meet")," "),e.R7$(3),e.Y8G("routerLinkActiveOptions",e.lJ4(58,ht)),e.R7$(),e.Y8G("icon",P.settingsIcon()),e.R7$(),e.SpI(" ",e.bMT(45,50,"_i18n.Settings")," "),e.R7$(3),e.vxM(null!=(se=e.bMT(48,52,P.tokenInfoService.myToken$))&&se.adminSection?47:-1),e.R7$(4),e.Y8G("icon",P.appsIcon()),e.R7$(),e.SpI(" ",e.bMT(53,54,"_i18n.Apps")," ")}},dependencies:[Xn.R,vt.wQ,vt.Wk,St.h,Ie.D9,Oe.Jj],styles:["[_nghost-%COMP%]{--aside-nav-item-bg: inherit;--aside-nav-item-color: inherit;--aside-nav-item-hover-bg: var(--bg-tertiary-active);--aside-nav-item-active-bg: var(--bg-tertiary-active);--svg-size: 17px}[_nghost-%COMP%] .navi[_ngcontent-%COMP%]{background-color:var(--bg-tertiary);color:var(--text-tertiary);height:100%;font-size:10px;line-height:normal;--svg-color: currentColor}[_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:nowrap;height:100%;overflow-y:auto;overflow-x:hidden;padding-bottom:var(--spacer-s)}[_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%] li.nav-item[_ngcontent-%COMP%]{width:var(--aside-folded-width);min-height:var(--aside-folded-nav-height);flex-shrink:0}[_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%] li.nav-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;word-break:break-word;position:relative;transition:background-color .2s ease-in-out 0s;border-radius:var(--border-radius);color:var(--aside-nav-item-color);background-color:var(--aside-nav-item-bg);padding:var(--spacer-xs) 0}[_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%] li.nav-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{--counter-badge-size: 12px;--counter-badge-font-size: 10px;--counter-badge-inline-padding: var(--spacer-xxs);font-size:var(--counter-badge-font-size);position:absolute;top:2px;left:calc(50% + max(14px,var(--counter-badge-size))/2 + 1px);padding:0 var(--counter-badge-inline-padding);min-width:max(14px,var(--counter-badge-size));text-align:center}[_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%] li.nav-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{--aside-nav-item-bg: var(--aside-nav-item-hover-bg);--aside-nav-item-color: var(--text-secondary)}[_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%] li.nav-item[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{--aside-nav-item-bg: var(--aside-nav-item-active-bg);--aside-nav-item-color: var(--text-secondary)}[_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%] li.nav-item[_ngcontent-%COMP%] a.showAppsModal[_ngcontent-%COMP%], [_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%] li.nav-item[_ngcontent-%COMP%] a.showNotificationsModal[_ngcontent-%COMP%]{--aside-nav-item-active-bg: var(--bg-secondary);--aside-nav-item-bg: var(--bg-secondary);--aside-nav-item-color: var(--text-secondary)}[_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%] li.nav-item[_ngcontent-%COMP%] a.showNotificationsModal[_ngcontent-%COMP%]{--svg-size: 23px}[_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%] li.nav-item[_ngcontent-%COMP%] a.showAppsModal[_ngcontent-%COMP%]{--svg-size: 18px}.new-design [_nghost-%COMP%], .new-design[_nghost-%COMP%]{--aside-nav-item-color: var(--text-secondary);--aside-nav-item-active-bg: var(--bg-secondary);--aside-nav-item-hover-bg: #4C5767;--svg-size: var(--svg-size-sm)}.new-design [_nghost-%COMP%] .navi[_ngcontent-%COMP%], .new-design[_nghost-%COMP%] .navi[_ngcontent-%COMP%]{font-size:var(--small-font-size);line-height:var(--line-height-xs)}.new-design [_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%] li.nav-item[_ngcontent-%COMP%], .new-design[_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%] li.nav-item[_ngcontent-%COMP%]{padding:var(--spacer-xxs) var(--spacer-xs)}.new-design [_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%] li.nav-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .new-design[_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%] li.nav-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{gap:var(--spacer-xs)}.new-design [_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%] li.nav-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%], .new-design[_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%] li.nav-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{--counter-badge-size: 16px;--counter-badge-inline-padding: var(--spacer-xs);--counter-badge-font-size: 11px}.new-design [_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%] li.nav-item[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%] .badge.bg-brand[_ngcontent-%COMP%], .new-design[_nghost-%COMP%] .navi[_ngcontent-%COMP%] ul.nav[_ngcontent-%COMP%] li.nav-item[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%] .badge.bg-brand[_ngcontent-%COMP%]{box-shadow:0 0 0 1px currentColor}"],changeDetection:0})}return d})(),mo=(()=>{class d{app=(0,v.WQX)(O.t);elementRef=(0,v.WQX)(e.aKT);onGlobalClick(n){this.app.asideMenuVisible&&!this.elementRef.nativeElement.contains(n.target)&&(this.app.asideMenuVisible=!1)}static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["app-aside"]],hostBindings:function(g,P){1&g&&e.bIt("mousedown",function(le){return P.onGlobalClick(le)},e.EBC)},decls:2,vars:0,consts:[[1,"h-100"]],template:function(g,P){1&g&&(e.j41(0,"aside",0),e.nrm(1,"app-nav"),e.k0s())},dependencies:[fo],encapsulation:2})}return d})();var Bt=t(62526),$t=t(13499),ho=t(44737),Ke=t(67895),go=t(66029),Mt=t(18530),gt=t(91250),vo=t(94681);let Ft=(()=>{class d{myPhoneService=(0,v.WQX)(B.gx);activeCallsService=(0,v.WQX)(go.N);fwdProfilesService=(0,v.WQX)(ue._);dialerService=(0,v.WQX)($t.$);callsService=(0,v.WQX)(Bt.z);dialerVisibilityService=(0,v.WQX)(yt.d);modalService=(0,v.WQX)(Q.B);parkings$;isParkingAvailable$;pageOffSet=new Mt.B;pageOffSet$;constructor(){this.pageOffSet$=this.pageOffSet.pipe((0,r.Z)(0),(0,_.F)(),(0,re.H9)()),this.parkings$=this.myPhoneService.myPhoneSession.pipe((0,m.n)(n=>n.parkings$),(0,h.T)(n=>n.Items.filter(g=>g.Name.startsWith("SP"))),(0,re.H9)()),this.isParkingAvailable$=this.parkings$.pipe((0,h.T)(n=>n.length>0),(0,re.H9)())}trackProfile$(n){return n&&n.type===Ke.Pw.ProfileStatus&&n.value?this.fwdProfilesService.forwardingProfiles$.pipe((0,h.T)(g=>g.find(P=>P.Name===n.value))):(0,Ae.of)(void 0)}trackContact$(n){const g=n?.peer?.Number;return g?this.myPhoneService.myPhoneSession.pipe((0,h.T)(P=>P.contactMatcher.localContactDb.findPhone(g,ze.Ij,!0)),(0,m.n)(P=>P?.identity??(0,Ae.of)(void 0))):(0,Ae.of)(void 0)}trackParking$(n){return n&&n.type===Ke.Pw.SharedParking&&n.value?this.parkings$.pipe((0,h.T)(g=>g.find(P=>P.Number===n.value))):(0,Ae.of)(void 0)}trackEnabled$(n){return n?.type===Ke.Pw.SharedParking?this.isParkingAvailable$:(0,Ae.of)(null!=n?.type&&n.type!==Ke.Pw.None&&n.type!==Ke.Pw.Line)}setPageOffSet(n){this.pageOffSet.next(n)}stealFocus(){this.dialerVisibilityService.focusDialer()}performQueueLoginAction(n){n.type===Ke.Pw.QueueLogin&&("LOGGEDINQUEUE"===n.value?this.setQueueStatus(!0):"LOGGEDOUTQUEUE"===n.value&&this.setQueueStatus(!1)),this.stealFocus()}performProfileStatusAction(n,g){n.type===Ke.Pw.ProfileStatus&&g&&this.fwdProfilesService.selectStatus(g.Id),this.stealFocus()}performBlfAction(n,g){if(n.type===Ke.Pw.BLF)if(g?.isRinging){const P=g.displayedConnection;this.myPhoneService.myPhoneSession.pipe((0,m.n)(Y=>{if(P?.State===k.Tll.Ringing)return(0,s.z)([(0,Ae.of)(P),(0,Ae.of)(Y)]);{const le=Object.values(Y.queues);return(le.length>0?(0,s.z)(le.map(Re=>Re.callDb.activeCalls$)):(0,Ae.of)([])).pipe((0,m.n)(Re=>{const Ue=Re.map(ke=>Object.values(ke)).flat().find(ke=>ke.OwnerDn===g.nativeExtensionNumber&&ke.State===k.Tll.Ringing);return(0,s.z)([(0,Ae.of)(Ue),(0,Ae.of)(Y)])}))}}),b.EK,(0,T.s)(1)).subscribe(Y=>{this.activeCallsService.pickup(Y)})}else this.callOrActiveCallAction(n);this.stealFocus()}performParkingAction(n){n.type===Ke.Pw.SharedParking&&this.isParkingAvailable$.pipe((0,T.s)(1)).subscribe(g=>{g&&this.callOrActiveCallAction(n)}),this.stealFocus()}performDialAction(n){this.callOrActiveCallAction(n),this.stealFocus()}callOrActiveCallAction(n){this.dialerService.activeCall$.pipe((0,T.s)(1)).subscribe(g=>{g?this.activeCallAction(g,n):this.makeCall(n.value)})}activeCallAction(n,g){n.state===k.Tll.Ringing?this.divert(n,g):this.dialerService.callSearchAction$.pipe((0,T.s)(1)).subscribe(P=>{const Y=new vo.q({number:g.value});switch(P){case gt.GS.Transfer:this.callsService.transfer(n,Y);break;case gt.GS.AttTransfer:this.callsService.attTransfer(n,Y);break;case gt.GS.NewCall:this.makeCall(g.value);break;case gt.GS.Conference:this.callsService.conference(n,Y);break;case gt.GS.AttConference:this.callsService.attendedConference(n,Y);break;default:this.callsService.transfer(n,Y)}})}divert(n,g){n?.isDivertToVmAllowed&&this.myPhoneService.myPhoneSession.pipe((0,T.s)(1),(0,m.n)(P=>{const Y=new k.Icu;return Y.IsLocal=!1,Y.LocalConnectionId=n.localConnectionId,Y.Destination=g.value??"",P.get(Y)})).subscribe({error:P=>{this.modalService.error(P)}})}makeCall(n){const g=(0,Dt.t9)(n||"");g&&this.dialerService.makeCall(g)}setQueueStatus(n){this.myPhoneService.get(new k.mko({QueueStatus:n})).pipe((0,b.Tg)(this.modalService)).subscribe()}static \u0275fac=function(g){return new(g||d)};static \u0275prov=v.jDH({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();
1var Co=t(92771),bo=t(49629);let yo=(()=>{class d{cssStatus;text;static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["app-call-blf-indicator"]],inputs:{cssStatus:"cssStatus",text:"text"},decls:6,vars:14,consts:[[3,"title"],[1,"text-truncate",3,"title"]],template:function(g,P){1&g&&(e.Hgh(0,"span",0),e.nI1(1,"translate"),e.rj2(2,"span",1),e.nI1(3,"translate"),e.EFF(4),e.nI1(5,"translate"),e.eux()),2&g&&(e.HbH(e.VkB("status-indicator ",P.cssStatus||"")),e.Avn("title",e.mNQ(e.bMT(1,8,P.text||""))),e.R7$(2),e.Avn("title",e.mNQ(e.bMT(3,10,P.text||""))),e.R7$(2),e.SpI(" ",e.bMT(5,12,P.text||"")," "))},dependencies:[Ie.D9],styles:["[_nghost-%COMP%]{display:flex;flex-direction:row;gap:3px;align-items:center;padding:2px;font-size:10px;line-height:1;color:var(--text-secondary);--status-indicator-width: 20px;--status-indicator-height: 10px}.new-design [_nghost-%COMP%]{font-size:var(--small-font-size);height:20px;gap:5px;padding:var(--spacer-xxs) var(--spacer-xs);color:var(--text-primary);--status-indicator-width: 10px}.new-design [_nghost-%COMP%] .status-indicator[_ngcontent-%COMP%]{border-radius:100%}"],changeDetection:0})}return d})();var Ht=t(9852),Po=t(19543);function Mo(d,j){if(1&d){const n=e.RV6();e.j41(0,"app-call-blf-indicator",3),e.bIt("click",function(){v.eBV(n);const P=e.XpG(2);return v.Njj(P.blfService.stealFocus())}),e.k0s()}}function To(d,j){1&d&&e.eu8(0)}function _o(d,j){if(1&d&&e.DNE(0,To,1,0,"ng-container",4),2&d){e.XpG();const n=e.sdS(1);e.Y8G("ngTemplateOutlet",n)}}function xo(d,j){1&d&&e.eu8(0)}function Ro(d,j){if(1&d&&e.DNE(0,xo,1,0,"ng-container",4),2&d){e.XpG();const n=e.sdS(1);e.Y8G("ngTemplateOutlet",n)}}function wo(d,j){if(1&d){const n=e.RV6();e.j41(0,"app-call-blf-indicator",6),e.nI1(1,"lforfl"),e.nI1(2,"async"),e.nI1(3,"lforfl"),e.nI1(4,"async"),e.nI1(5,"userProfile"),e.nI1(6,"async"),e.bIt("click",function(){const P=v.eBV(n),Y=e.XpG(3);return v.Njj(Y.blfService.performBlfAction(Y.blf,P.data))}),e.k0s()}if(2&d){const n=j,g=e.XpG(3);e.Y8G("cssStatus",null==n.data?null:n.data.statusCssClassName)("text",e.bMT(2,6,e.i5U(1,3,n.data,g.blf.value)))("title",e.bMT(4,11,e.i5U(3,8,n.data,g.blf.value))+(n.data?", "+e.bMT(6,15,e.bMT(5,13,n.data)):""))}}function Eo(d,j){1&d&&e.eu8(0)}function Oo(d,j){if(1&d&&e.DNE(0,Eo,1,0,"ng-container",4),2&d){e.XpG(2);const n=e.sdS(1);e.Y8G("ngTemplateOutlet",n)}}function Ao(d,j){if(1&d&&(e.nVh(0,wo,7,17,"app-call-blf-indicator",5),e.nI1(1,"async"),e.vZN(2,Oo,1,1,"ng-container")),2&d){let n;const g=e.XpG(2);e.vxM((n=e.bMT(1,1,g.contact$))?0:2,n)}}function Do(d,j){if(1&d){const n=e.RV6();e.j41(0,"app-call-blf-indicator",8),e.nI1(1,"lforfl"),e.nI1(2,"async"),e.nI1(3,"lforfl"),e.nI1(4,"async"),e.nI1(5,"userProfile"),e.nI1(6,"async"),e.bIt("click",function(){v.eBV(n);const P=e.XpG(3);return v.Njj(P.blfService.performDialAction(P.blf))}),e.k0s()}if(2&d){const n=j,g=e.XpG(3);e.Y8G("text",e.bMT(2,5,e.i5U(1,2,n.data,g.blf.value)))("title",e.bMT(4,10,e.i5U(3,7,n.data,g.blf.value))+(n.data?", "+e.bMT(6,14,e.bMT(5,12,n.data)):""))}}function So(d,j){1&d&&e.eu8(0)}function Io(d,j){if(1&d&&e.DNE(0,So,1,0,"ng-container",4),2&d){e.XpG(2);const n=e.sdS(1);e.Y8G("ngTemplateOutlet",n)}}function Bo(d,j){if(1&d&&(e.nVh(0,Do,7,16,"app-call-blf-indicator",7),e.nI1(1,"async"),e.vZN(2,Io,1,1,"ng-container")),2&d){let n;const g=e.XpG(2);e.vxM((n=e.bMT(1,1,g.contact$))?0:2,n)}}function $o(d,j){if(1&d){const n=e.RV6();e.j41(0,"app-call-blf-indicator",9),e.nI1(1,"lforfl"),e.nI1(2,"async"),e.bIt("click",function(){v.eBV(n);const P=e.XpG(2);return v.Njj(P.blfService.performDialAction(P.blf))}),e.k0s()}if(2&d){const n=e.XpG(2);e.Y8G("text",e.bMT(2,4,e.i5U(1,1,n.customDialContact,n.blf.value)))}}function Fo(d,j){if(1&d){const n=e.RV6();e.j41(0,"app-call-blf-indicator",10),e.bIt("click",function(){v.eBV(n);const P=e.XpG(3);return v.Njj(P.blfService.performParkingAction(P.blf))}),e.k0s()}if(2&d){const n=j,g=e.XpG(3);e.Y8G("cssStatus",n.data?null!=n.data.WaitingCalls&&null!=n.data.WaitingCalls.Items&&n.data.WaitingCalls.Items.length?"busy":"available":"off")("text",g.blf.value)}}function Ho(d,j){1&d&&e.eu8(0)}function Go(d,j){if(1&d&&e.DNE(0,Ho,1,0,"ng-container",4),2&d){e.XpG(2);const n=e.sdS(1);e.Y8G("ngTemplateOutlet",n)}}function Uo(d,j){if(1&d&&(e.nVh(0,Fo,1,2,"app-call-blf-indicator",2),e.nI1(1,"async"),e.vZN(2,Go,1,1,"ng-container")),2&d){let n;const g=e.XpG(2);e.vxM((n=e.bMT(1,1,g.parking$))?0:2,n)}}function Wo(d,j){if(1&d){const n=e.RV6();e.j41(0,"app-call-blf-indicator",10),e.nI1(1,"appProfileCssClass"),e.nI1(2,"profileNameConv"),e.nI1(3,"async"),e.bIt("click",function(){const P=v.eBV(n),Y=e.XpG(3);return v.Njj(Y.blfService.performProfileStatusAction(Y.blf,P))}),e.k0s()}if(2&d){const n=j;e.Y8G("cssStatus",e.bMT(1,2,n.Name))("text",e.bMT(3,6,e.bMT(2,4,n.Name)))}}function No(d,j){1&d&&e.eu8(0)}function Vo(d,j){if(1&d&&e.DNE(0,No,1,0,"ng-container",4),2&d){e.XpG(2);const n=e.sdS(1);e.Y8G("ngTemplateOutlet",n)}}function Lo(d,j){if(1&d&&(e.nVh(0,Wo,4,8,"app-call-blf-indicator",2),e.nI1(1,"async"),e.vZN(2,Vo,1,1,"ng-container")),2&d){let n;const g=e.XpG(2);e.vxM((n=e.bMT(1,1,g.profile$))?0:2,n)}}function jo(d,j){if(1&d){const n=e.RV6();e.j41(0,"app-call-blf-indicator",10),e.bIt("click",function(){v.eBV(n);const P=e.XpG(2);return v.Njj(P.blfService.performQueueLoginAction(P.blf))}),e.k0s()}if(2&d){const n=e.XpG(2);e.Y8G("cssStatus","LOGGEDINQUEUE"===n.blf.value?"on":"LOGGEDOUTQUEUE"===n.blf.value?"off":"")("text","LOGGEDINQUEUE"===n.blf.value?"_i18n.LoginToQueue":"LOGGEDOUTQUEUE"===n.blf.value?"_i18n.LogoutFromQueue":"")}}function ko(d,j){if(1&d&&(e.DNE(0,Mo,1,0,"ng-template",null,0,e.C5r),e.nVh(2,_o,1,1,"ng-container")(3,Ro,1,1,"ng-container")(4,Ao,3,3)(5,Bo,3,3)(6,$o,3,6,"app-call-blf-indicator",1)(7,Uo,3,3)(8,Lo,3,3)(9,jo,1,2,"app-call-blf-indicator",2)),2&d){let n;const g=e.XpG();e.R7$(2),e.vxM((n=g.blf.type)===g.BlfType.None?2:n===g.BlfType.Line?3:n===g.BlfType.BLF?4:n===g.BlfType.SpeedDial?5:n===g.BlfType.CustomSpeedDial?6:n===g.BlfType.SharedParking?7:n===g.BlfType.ProfileStatus?8:n===g.BlfType.QueueLogin?9:-1)}}let Qo=(()=>{class d{blfService=(0,v.WQX)(Ft);blf;index;blfEnabled=!1;get isRightAligned(){return this.index%2!=0}get customDialContact(){const n={firstName:this.blf.firstName||"",lastName:this.blf.lastName||""};return bo.A.onContactNameChanged(n),n}blf$=new Co.m(1);BlfType=Ke.Pw;contact$;profile$;parking$;constructor(){const n=this.blfService,g=(0,v.WQX)(v.abz);this.contact$=this.blf$.pipe((0,m.n)(P=>this.blfService.trackContact$(P)),(0,h.T)(P=>({data:P}))),this.profile$=this.blf$.pipe((0,m.n)(P=>this.blfService.trackProfile$(P))),this.parking$=this.blf$.pipe((0,m.n)(P=>this.blfService.trackParking$(P)),(0,h.T)(P=>({data:P}))),this.blf$.pipe((0,m.n)(P=>n.trackEnabled$(P)),(0,Me.pQ)(g)).subscribe(P=>{this.blfEnabled=P})}ngOnChanges(n){n.blf&&this.blf$.next(n.blf.currentValue)}static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["call-blf-item"]],hostVars:4,hostBindings:function(g,P){2&g&&e.AVh("blf-enabled",P.blfEnabled)("right-aligned",P.isRightAligned)},inputs:{blf:"blf",index:"index"},features:[e.OA$],decls:1,vars:1,consts:[["defaultBlf",""],["cssStatus","available",3,"text"],[3,"cssStatus","text"],[3,"click"],[4,"ngTemplateOutlet"],[3,"cssStatus","text","t
1itle"],[3,"click","cssStatus","text","title"],["cssStatus","available",3,"text","title"],["cssStatus","available",3,"click","text","title"],["cssStatus","available",3,"click","text"],[3,"click","cssStatus","text"]],template:function(g,P){1&g&&e.nVh(0,ko,10,1),2&g&&e.vxM(P.blf?0:-1)},dependencies:[yo,Oe.T3,Oe.Jj,_t.t,Ht._,Po.R,xt.F],styles:[".right-aligned[_nghost-%COMP%] app-call-blf-indicator[_ngcontent-%COMP%]{flex-direction:row-reverse}.blf-enabled[_nghost-%COMP%] app-call-blf-indicator[_ngcontent-%COMP%]:hover{cursor:pointer;background-color:var(--text-tertiary);color:var(--text-tertiary-hover)}.new-design .blf-enabled[_nghost-%COMP%] app-call-blf-indicator[_ngcontent-%COMP%]:hover{background-color:var(--dialer-btn-hover);color:var(--text-primary);border-radius:var(--border-radius)}"]})}return d})();var zo=t(87019);function Xo(d,j){if(1&d&&e.nrm(0,"call-blf-item",1),2&d){const g=j.$index;e.Y8G("blf",j.$implicit)("index",g)}}let Ko=(()=>{class d{myPhoneService=(0,v.WQX)(B.gx);blfService=(0,v.WQX)(Ft);mcmGroupsService=(0,v.WQX)(Pt.u);itemsPerPage=22;blfsCount$;pagedBlfs$;currentPage$;ngOnInit(){const n=this.mcmGroupsService.groupsParticipating$.pipe((0,m.n)(le=>(0,s.z)(le.map(se=>se.contactsMap$))),(0,h.T)(le=>JSON.stringify(le.flatMap(se=>se.getIds()))),(0,_.F)((le,se)=>le===se),(0,r.Z)("")),g=this.myPhoneService.myPhoneSession.pipe((0,m.n)(le=>le.myInfo$),(0,h.T)(le=>le.SharedBlfs),(0,_.F)()),P=this.myPhoneService.myPhoneSession.pipe((0,m.n)(le=>le.myInfo$.pipe((0,m.n)(se=>se.MyGroups$))),(0,h.T)(le=>JSON.stringify(le.Items)),(0,_.F)((le,se)=>le===se)),Y=this.myPhoneService.myPhoneSession.pipe((0,m.n)(le=>(0,s.z)([g,n,P]).pipe((0,h.T)(([se])=>(0,Ke.MI)(se)),(0,Ct.W)(()=>[]),(0,h.T)(se=>{const Re=Math.max(Math.ceil(se.length/this.itemsPerPage),1)*this.itemsPerPage;for(;se.length<Re;)se.push(new Ke.$O);return se}))),(0,re.H9)());this.currentPage$=this.blfService.pageOffSet$.pipe((0,h.T)(le=>Math.max(1,Math.floor(le/this.itemsPerPage)+1)),(0,re.H9)()),this.pagedBlfs$=(0,s.z)([Y,this.blfService.pageOffSet$]).pipe((0,h.T)(([le,se])=>{const Re=Math.max(0,Math.min(se,le.length-this.itemsPerPage));return le.slice(Re,Re+this.itemsPerPage)})),this.blfsCount$=Y.pipe((0,h.T)(le=>le.length))}pageChanged(n){this.blfService.setPageOffSet((n.page-1)*n.itemsPerPage)}static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["call-blf"]],decls:7,vars:12,consts:[[1,"blf-list"],[3,"blf","index"],[3,"pageChanged","currentPage","itemsPerPage","maxVisiblePages","size","pagingStyle","totalItems"]],template:function(g,P){1&g&&(e.j41(0,"div",0),e.Z7z(1,Xo,1,2,"call-blf-item",1,e.fX1),e.nI1(3,"async"),e.k0s(),e.j41(4,"app-paging",2),e.nI1(5,"async"),e.nI1(6,"async"),e.bIt("pageChanged",function(le){return P.pageChanged(le)}),e.k0s()),2&g&&(e.R7$(),e.Dyx(e.bMT(3,6,P.pagedBlfs$)),e.R7$(3),e.Y8G("currentPage",e.bMT(5,8,P.currentPage$))("itemsPerPage",P.itemsPerPage)("maxVisiblePages",3)("size","small")("pagingStyle","dots")("totalItems",e.bMT(6,10,P.blfsCount$)))},dependencies:[Qo,zo.u4,Oe.Jj],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;height:100%;position:relative;overflow:hidden;align-items:stretch;flex-grow:1}[_nghost-%COMP%] .blf-list[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-height:0;flex-grow:1;overflow-y:hidden}.new-design [_nghost-%COMP%] .blf-list[_ngcontent-%COMP%]{gap:3px}"]})}return d})();function Yo(d,j){1&d&&(e.j41(0,"call-blf"),e.vzT("blf-slide-out"),e.QR4("blf-slide-in"),e.k0s())}function Jo(d,j){if(1&d){const n=e.RV6();e.j41(0,"button",7),e.bIt("click",function(){v.eBV(n);const P=e.XpG(3);return v.Njj(P.onClose())}),e.nrm(1,"lucide-icon",5),e.k0s()}if(2&d){const n=e.XpG(3);e.R7$(),e.Y8G("img",n.XIcon)}}function Zo(d,j){if(1&d){const n=e.RV6();e.j41(0,"div",3)(1,"button",4),e.nI1(2,"translate"),e.bIt("click",function(){v.eBV(n),e.XpG();const P=e.r8f(1),Y=e.XpG();return v.Njj(Y.showBlf.set(!P))}),e.nrm(3,"lucide-icon",5),e.k0s(),e.nVh(4,Jo,2,1,"button",6),e.k0s()}if(2&d){e.XpG();const n=e.r8f(1),g=e.XpG();e.R7$(),e.Y8G("title",e.bMT(2,3,n?"_i18n.DialerHideBLFPanel":"_i18n.DialerShowBLFPanel")),e.R7$(2),e.Y8G("img",n?g.ArrowRightToLine:g.ArrowLeftFromLine),e.R7$(),e.vxM(g.hasActiveCalls()?-1:4)}}function qo(d,j){if(1&d){const n=e.RV6();e.j41(0,"div",2),e.bIt("animationend",function(){v.eBV(n);const P=e.XpG(),Y=e.r8f(0);return v.Njj(P.hide.set(!Y))}),e.SS7(1),e.nVh(2,Yo,1,0,"call-blf"),e.nrm(3,"app-call-control",null,0),e.nVh(5,Zo,5,5,"div",3),e.k0s()}if(2&d){const n=e.sdS(4),g=e.XpG(),P=e.r8f(0);e.HbH(e.VkB("dialer ",P?"slide-in-from-right":"slide-out-to-right")),e.R7$();const Y=e.bH3(g.showBlf());e.R7$(),e.vxM(Y?2:-1),e.R7$(3),e.vxM(n.isVideoActive?-1:5)}}let ei=(()=>{class d{isNewDesign=(0,v.WQX)(rt.e);phoneService=(0,v.WQX)(S.u);dialerVisibility=(0,v.WQX)(yt.d);dialerService=(0,v.WQX)($t.$);ArrowRightToLine=_e.XwL;ArrowLeftFromLine=_e.BQV;XIcon=_e.uv5;isVisible=this.dialerVisibility.isDialerVisible;showBlf=(0,lt.I)(ie.Hh.ShowBlf,!1);hasActiveCalls=(0,Me.ot)(this.dialerService.calls$.pipe((0,h.T)(n=>n.size>0)),{initialValue:!1});hide=(0,v.vPA)(!0);initialized=(0,v.vPA)(!1);constructor(){(0,v.QZP)(()=>{this.isVisible()&&(this.hide.set(!1),this.initialized.set(!0))})}closeAllNotifications(){this.phoneService.myCalls$.pipe((0,T.s)(1)).subscribe(n=>
1{n.calls.forEach(g=>{this.phoneService.terminateHeadsetCall(g.myCallId),g.notification?.close()})})}onClose(){this.dialerVisibility.toggleDialer(!1)}static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["app-web-dialer"]],hostVars:4,hostBindings:function(g,P){1&g&&e.bIt("beforeunload",function(){return P.closeAllNotifications()},e.tSv),2&g&&e.AVh("new-design",P.isNewDesign())("d-none",P.hide())},features:[e.Jv_([Bt.z])],decls:2,vars:2,consts:[["callControl",""],[3,"class"],[3,"animationend"],[1,"top-buttons"],["type","button","data-qa","dialer-blf-toggle",1,"btn","btn-plain-sm","btn-icon","btn-icon",3,"click","title"],[3,"img"],["type","button","data-qa","close-dialer",1,"btn","btn-plain-sm","btn-icon"],["type","button","data-qa","close-dialer",1,"btn","btn-plain-sm","btn-icon",3,"click"]],template:function(g,P){1&g&&(e.SS7(0),e.nVh(1,qo,6,6,"div",1)),2&g&&(e.bH3(P.isVisible()),e.R7$(),e.vxM(P.initialized()?1:-1))},dependencies:[ho.v,Ko,_e.flO,_e.WGl,Ie.D9],styles:['.dialer[_ngcontent-%COMP%]{display:inline-grid;grid-template-areas:"buttons buttons" "call blf";--current-background: var(--dialer-bg, var(--bg-tertiary));background:var(--current-background);color:var(--text-secondary);height:var(--dialer-height);--dialer-blf-width: 130px;--dialer-height: 384px;--dialer-button-size: 24px}.dialer[_ngcontent-%COMP%] call-blf[_ngcontent-%COMP%], .dialer[_ngcontent-%COMP%] app-call-control[_ngcontent-%COMP%]{flex:0 0 auto;height:calc(var(--dialer-height) - var(--dialer-button-size))}.dialer[_ngcontent-%COMP%] call-blf[_ngcontent-%COMP%]{grid-area:blf;width:var(--dialer-blf-width);--svg-size: 26px;--svg-color: currentColor}.dialer[_ngcontent-%COMP%] .top-buttons[_ngcontent-%COMP%]{grid-area:buttons;display:flex;justify-content:flex-end;align-items:center}.dialer[_ngcontent-%COMP%] .top-buttons[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{--btn-icon-size: var(--dialer-button-size);--bs-btn-hover-bg: var(--bg-tertiary-active);--bs-btn-active-bg: var(--bs-btn-hover-bg);--svg-color: var(--status-off)}.dialer[_ngcontent-%COMP%] app-call-control[_ngcontent-%COMP%]{grid-area:call;width:var(--dialer-main-width);padding-bottom:var(--spacer)}.dialer[_ngcontent-%COMP%] .blf-slide-in[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blfSlideIn .2s ease-out forwards}.dialer[_ngcontent-%COMP%] .blf-slide-out[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blfSlideOut .2s ease-in forwards}@keyframes _ngcontent-%COMP%_blfSlideIn{0%{width:0;opacity:0}to{width:var(--dialer-blf-width);opacity:1}}@keyframes _ngcontent-%COMP%_blfSlideOut{0%{width:var(--dialer-blf-width);opacity:1}to{width:0;opacity:0}}.new-design[_nghost-%COMP%] .dialer[_ngcontent-%COMP%]{display:flex;border:1px solid var(--dialer-border-color, var(--border-color));border-radius:var(--bs-border-radius);box-shadow:0 8px 10px -6px #0000001a,0 20px 25px -5px #0000001a;overflow:hidden;position:relative;color:var(--text-primary);--dialer-blf-width: 200px;--dialer-height: 595px}.new-design[_nghost-%COMP%] .dialer[_ngcontent-%COMP%] call-blf[_ngcontent-%COMP%], .new-design[_nghost-%COMP%] .dialer[_ngcontent-%COMP%] app-call-control[_ngcontent-%COMP%]{padding:var(--spacer);height:100%}.new-design[_nghost-%COMP%] .dialer[_ngcontent-%COMP%] app-call-control[_ngcontent-%COMP%]{box-shadow:-6px 0 12px -4px #00000026}.new-design[_nghost-%COMP%] .dialer[_ngcontent-%COMP%] .top-buttons[_ngcontent-%COMP%]{grid-area:unset;position:absolute;top:0;right:0;width:var(--dialer-main-width);justify-content:space-between;pointer-events:none;padding:var(--spacer-xs)}.new-design[_nghost-%COMP%] .dialer[_ngcontent-%COMP%] .top-buttons[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{pointer-events:auto;--bs-btn-hover-bg: transparent;--bs-btn-padding-x: 0}'],changeDetection:0})}return d})();var ti=t(31943),ni=t(97647),oi=t(90394),ii=t(54843),ai=t(77498),Gt=t(88141),ri=t(91473),si=t(44652),li=t(40544),ct=t(60572),ci=t(75982);function di(d,j){if(1&d){const n=e.RV6();e.j41(0,"button",13),e.nI1(1,"translate"),e.bIt("click",function(P){v.eBV(n);const Y=e.XpG(2);return v.Njj(Y.addContact(P))}),e.nrm(2,"lucide-icon",14),e.k0s()}if(2&d){const n=e.XpG(2);e.Y8G("title",e.bMT(1,2,"_i18n.MenuAddContact")),e.R7$(2),e.Y8G("img",n.UserPlus)}}function ui(d,j){if(1&d&&(e.j41(0,"a",15),e.nI1(1,"translate"),e.bIt("click",function(g){return g.stopPropagation()}),e.nrm(2,"lucide-icon",14),e.k0s()),2&d){const n=e.XpG(2);e.Y8G("href",j,e.B4B)("title",e.bMT(1,3,"_i18n.CRMLookUpOption")),e.R7$(2),e.Y8G("img",n.UserSearch)}}function pi(d,j){1&d&&(e.j41(0,"a",16),e.nI1(1,"translate"),e.bIt("click",function(g){return g.stopPropagation()}),e.EFF(2," CRM "),e.k0s()),2&d&&e.Y8G("href",j,e.B4B)("title",e.bMT(1,2,"_i18n.OpenContact"))}function fi(d,j){if(1&d){const n=e.RV6();e.j41(0,"div",0),e.nrm(1,"app-avatar",1),e.j41(2,"div",2)(3,"div",3),e.nrm(4,"provider-image",4),e.SS7(5),e.nI1(6,"lforfl"),e.nI1(7,"async"),e.SS7(8),e.j41(9,"span",5),e.bIt("click",function(P){v.eBV(n);const Y=e.r8f(8),le=e.XpG();return v.Njj(Y&&le.viewContact(P))}),e.k0s(),e.nVh(10,di,3,4,"button",6),e.nVh(11,ui,3,5,"a",7),e.nVh(12,pi,3,4,"a",8),e.k0s(),e.nrm(13,"p",9),e.k0s()(),e.j41(14,"div",10)(15,"button",11),e.bIt("click",function(P){v.eBV(n);const Y=e.XpG();return v.Njj(Y.reply(P))}),e.EFF(16),e.nI1(17,"translate"),e.k0s(),e.j41(18,"button",12),e.bIt("click",function(P){v.eBV(n);const Y=e.XpG();return v.Njj(Y.ignore(P))}),e.EFF(19),e.nI1(20,"translate"),e.k0s()()}if(2&d){let n,g,P;const Y=j,le=e.XpG(),se=le.isNewDesign(),Re=le.chatContact();e.R7$(),e.Y8G("ext",Re)("newDesign",se),e.R7$(3),e.Y8G("provider",null==(n=le.participant())?null:n.provider);const Ue=le.showContactName()?e.bMT(7,17,e.bMT(6,15,Re)):Y.sender;e.R7$(4);const ke=e.bH3(null==Re?null:Re.isPhonebookContact());e.R7$(),e.AVh("action-link",ke),e.Y8G("truncatedText",Ue),e.R7$(),e.vxM(le.canBeAdded()?10:-1),e.R7$(),e.vxM((g=le.clientCrmUrl())?11:-1,g),e.R7$(),e.vxM((P=null==Re?null:Re.crmUrl)?12:-1,P),e.R7$(),e.Y8G("innerHTML",Y.text,e.npT),e.R7$(3),e.SpI(" ",e.bMT(17,20,"_i18n.Reply")," "),e.R7$(2),e.HbH(e.VkB("btn ",se?"btn-border":"btn-gray")),e.R7$(),e.SpI(" ",e.bMT(20,22,"_i18n.Ignore")," ")}}let mi=(()=>{class d{chatLocatorService=(0,v.WQX)(oi.e);integrationService=(0,v.WQX)(x.a);router=(0,v.WQX)(H.Ix);myPhoneService=(0,v.WQX)(B.gx);
1phonebookEditorService=(0,v.WQX)(ri.m);modalService=(0,v.WQX)(Q.B);contactSearcherService=(0,v.WQX)(si.D);isNewDesign=(0,v.WQX)(rt.e);message=ae.hFB.required();remove=(0,ae.CGW)();createdContact=(0,v.vPA)(null);hasCrmIntegration=(0,Me.ot)(this.integrationService.hasClientCrmIntegration$);participant=(0,U.EW)(()=>this.message().participant);participantContact=(0,U.EW)(()=>this.participant()?.contact);chatContact=(0,U.EW)(()=>this.createdContact()??this.participantContact());clientCrmUrlResource=(0,U.Zc)({params:()=>({participant:this.participant(),hasCrmIntegration:this.hasCrmIntegration()}),loader:({params:{participant:n,hasCrmIntegration:g}})=>g&&n&&n.contact&&n.isExternal?(0,ii._)(this.integrationService.clientSideCrmUrl$(n.contact.bestPhone,n.contact.emailAddress)):Promise.resolve("")});clientCrmUrl=(0,U.EW)(()=>this.clientCrmUrlResource.hasValue()?this.clientCrmUrlResource.value():"");canBeAdded=(0,U.EW)(()=>{const n=this.chatContact();return!(!n||n.crmUrl||n.type!==ze.eE.External||!n.bestPhone&&!n.emailAddress)});showContactName=(0,U.EW)(()=>{const n=this.chatContact();return!(!n||!(n.isPhonebookContact()||n.crmUrl&&n.type===ze.eE.External))});reply(n){n.stopPropagation(),this.chatLocatorService.openChatById(this.message().conversationId),this.remove.emit(this.message())}ignore(n){n.stopPropagation(),this.remove.emit(this.message())}addContact(n){n.stopPropagation();const{conversationId:g}=this.message(),P=this.participantContact();!P||!P.bestPhone&&!P.emailAddress||this.createContact$(P).pipe((0,m.n)(()=>this.updateChatAfterContactCreation$(g)),(0,b.Tg)(this.modalService)).subscribe()}createContact$(n){return this.phonebookEditorService.addToContact(n,li.r.Compact).pipe((0,ai.c)(500),(0,m.n)(({model:g,creationResults:P})=>{const Y=P.filter(({status:se})=>se===ct.cZ.Success),le=Y.find(({type:se})=>se===ct.Of.Crm||se===ct.Of.Microsoft365)?.createdContact;if(le)return(0,Ae.of)(le);if(g&&Y.some(({type:se})=>se===ct.Of.Personal||se===ct.Of.Company||se===ct.Of.Department)){if(n.nativeMobileNumber&&g.hasPhoneNumber(n.nativeMobileNumber))return this.contactSearcherService.requestContactByNumber(n.nativeMobileNumber??"");if(n.emailAddress&&g.emailAddress===n.emailAddress)return this.contactSearcherService.requestContactByEmail(n.emailAddress??"")}return(0,Ae.of)(null)}),(0,Gt.M)(g=>{g&&!g.isDummy&&this.createdContact.set(g)}),(0,T.s)(1))}updateChatAfterContactCreation$(n){return this.myPhoneService.myPhoneSession.pipe((0,m.n)(g=>g.get(new k.$RH({IdConversation:n})).pipe((0,Gt.M)(P=>{g.conversationInfo$.next(P),g.chatMonitoringEvent$.next(new k.x9d({OnConversationChanged:P}))}))),(0,T.s)(1))}viewContact(n){n.stopPropagation();const g=this.chatContact();!g||!g.id||!g.isPhonebookContact()||this.router.navigate(["contacts/view",g.type,g.id])}UserSearch=_e.geC;Plus=_e.FWt;UserPlus=_e.ypN;static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["chat-toast-component"]],hostVars:2,hostBindings:function(g,P){1&g&&e.bIt("click",function(le){return P.reply(le)}),2&g&&e.AVh("new-design",P.isNewDesign())},inputs:{message:[1,"message"]},outputs:{remove:"remove"},decls:1,vars:1,consts:[[1,"chat-content"],[3,"ext","newDesign"],[1,"d-flex","flex-column","gap-1","mw-0","flex-1"],[1,"chat-header"],[3,"provider"],["data-qa","sender",1,"pe-2","fw-bold","flex-grow-1",3,"click","truncatedText"],["type","button","data-qa","add-contact",1,"btn","btn-plain-sm","btn-icon",3,"title"],["rel","noopener noreferrer","target","_blank","data-qa","crm-lookup-option",1,"btn","btn-plain-sm","btn-icon",3,"href","title"],["rel","noopener noreferrer","target","_blank","data-qa","crm-link",1,"btn","btn-plain-sm","px-1","py-0",3,"href","title"],["data-qa","message-text",1,"line-clamp-3","m-0",3,"innerHTML"],[1,"buttons"],["type","button","data-qa","reply-in-chat",1,"btn","btn-primary",3,"click"],["type","button","data-qa","ignore-chat",3,"click"],["type","button","data-qa","add-contact",1,"btn","btn-plain-sm","btn-icon",3,"click","title"],[3,"img"],["rel","noopener noreferrer","target","_blank","data-qa","crm-lookup-option",1,"btn","btn-plain-sm","btn-icon",3,"click","href","title"],["rel","noopener noreferrer","target","_blank","data-qa","crm-link",1,"btn","btn-plain-sm","px-1","py-0",3,"click","href","title"]],template:function(g,P){if(1&g&&e.nVh(0,fi,21,24),2&g){let Y;e.vxM((Y=P.message())?0:-1,Y)}},dependencies:[Tt.f,ci.E,bt.N,_e.flO,_e.WGl,Oe.Jj,Ie.D9,Ht._],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;row-gap:var(--spacer-s);padding:var(--spacer-s);font-size:var(--small-font-size);width:var(--dialer-main-width);max-width:calc(100vw - var(--spacer));--svg-color: currentColor;--svg-size: var(--svg-size-sm)}[_nghost-%COMP%] .chat-header[_ngcontent-%COMP%]{display:flex;min-width:0;gap:var(--spacer-xs);align-items:center;padding:var(--chat-header-padding, 0)}[_nghost-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;gap:var(--spacer-s);justify-content:end;width:100%}[_nghost-%COMP%] .buttons[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{flex:1 1 200px}[_nghost-%COMP%] .chat-content[_ngcontent-%COMP%]{display:flex;gap:var(--spacer-s)}.new-design[_nghost-%COMP%]{padding:calc(var(--spacer-s) * 1.5) var(--spacer);color:var(--text-primary);width:350px;font-size:var(--font-size)}.new-design[_nghost-%COMP%] p[_ngcontent-%COMP%]{color:var(--label-color)}.new-design[_nghost-%COMP%] .chat-content[_ngcontent-%COMP%]{display:flex;gap:var(--spacer-semi-medium)}.new-design[_nghost-%COMP%] .action-link[_ngcontent-%COMP%]{cursor:pointer}.new-design[_nghost-%COMP%] .action-link[_ngcontent-%COMP%]:hover{color:var(--bg-secondary);text-decoration:underline}.new-design[_nghost-%COMP%] .buttons[_ngcontent-%COMP%]{flex-direction:row-reverse}.new-design[_nghost-%COMP%] .buttons[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{flex:0 0 auto;font-size:var(--font-size-sm);font-weight:var(--font-weight-bold);height:32px;padding:0 var(--spacer-semi-medium)}.new-design[_nghost-%COMP%] .buttons[_ngcontent-%COMP%] .btn.btn-border[_ngcontent-%COMP%]{--bs-btn-bg: var(--dialer-btn);--bs-btn-hover-bg: var(--dialer-btn-hover);--bs-btn-active-bg: var(--dialer-btn-hover)}"],changeDetection:0})}return d})();var hi=t(12834);const gi=(d,j)=>j.id;function vi(d,j){if(1&d){const n=e.RV6();e.j41(0,"chat-toast-component",4),e.bIt("remove",function(){const P=v.eBV(n).$implicit,Y=e.XpG(2);return v.Njj(Y.delete$.next(P))}),e.k0s()}2&d&&e.Y8G("message",j.$implicit)}function Ci(d,j){if(1&d){const n=e.RV6();e.j41(0,"div",1),e.vzT("slide-out-to-right"),e.QR4("slide-in-from-right"),e.Z7z(1,vi,1,1,"chat-toast-component",2,gi),e.j41(3,"app-button-close-x",3),e.bIt("click",function(){v.eBV(n);const P=e.XpG();return v.Njj(P.deleteAll$.next())}),e.k0s()()}if(2&d){const n=e.XpG(),g=e.r8f(0);e.AVh("new-design",n.isNewDesign()),e.R7$(),e.Dyx(g)}}let bi=(()=>{class d{chatToastService=(0,v.WQX)(M.T);isNewDesign=(0,v.WQX)(rt.e);chatMessages;delete$=new Mt.B;deleteAll$=new Mt.B;XIcon=_e.uv5;constructor(){const n=this.chatToastService.chats$.pipe((0,h.T)(se=>({action:"add",chatMessage:se}))),g=this.chatToastService.updateChat$.pipe((0,h.T)(se=>({action:"update",chatMessage:se}))),P=(0,u.h)(this.deleteAll$,this.chatToastService.removeAll$).pipe((0,h.T)(()=>({action:"deleteAll"}))),Y=this.delete$.pipe((0,h.T)(se=>({action:"delete",IdConversation:se.conversationId}))),le=this.chatToastService.removeChat$.pipe((0,h.T)(se=>({action:"delete",IdConversation:se})));this.chatMessages=(0,Me.ot)((0,u.h)(n,Y,g,le,P).pipe((0,ti.S)((se,Re)=>{if("delete"===Re.action&&(se=se.filter(Ue=>Ue.conversationId!==Re.IdConversation)),"add"===Re.action&&(se=se.filter(Ue=>Ue.conversationId!==Re.chatMessage.conversationId),se=[Re.chatMessage,...se]),"update"===Re.action){const Ue=se.findIndex(ke=>ke.id===Re.chatMessage.id);Ue>=0&&(se[Ue]=Re.chatMessage)}return"deleteAll"===Re.action&&(se=[]),se},[]),(0,ni.u)()),{initialValue:[]})}static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["chat-toast-container"]],decls:2,vars:2,consts:[["data-qa","chat-toasts",1,"chat-toast-container",3,"new-design"],["data-qa","chat-toasts",1,"chat-toast-container"],["data-qa","chat-toast",3,"message"],["data-qa","close-all",3,"click"],["data-qa","chat-toast",3,"remove","message"]],template:function(g,P){if(1&g&&(e.SS7(0),e.nVh(1,Ci,4,2,"div",0)),2&g){const Y=e.bH3(P.chatMessages());e.R7$(),e.vxM(Y.length?1:-1)}},dependencies:[mi,_e.flO,hi.W],styles:[".chat-toast-container[_ngcontent-%COMP%]{position:relative;background-color:var(--dialer-bg, var(--bg-tertiary));color:var(--text-secondary)}.chat-toast-container[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{pointer-events:auto}.chat-toast-container[_ngcontent-%COMP%] app-button-close-x[_ngcontent-%COMP%]{position:absolute;top:calc(var(--spacer-xs) + var(--spacer-xxs));right:var(--spacer-xs)}.chat-toast-container[_ngcontent-%COMP%] chat-toast-component[_ng
1content-%COMP%]:first-of-type{--chat-header-padding: 0 var(--spacer-l) 0 0}.chat-toast-container.new-design[_ngcontent-%COMP%]{color:var(--text-primary);border:1px solid var(--border-color);border-radius:var(--bs-border-radius);box-shadow:0 25px 50px -12px #00000040;margin-right:var(--spacer-s)}.chat-toast-container.new-design[_ngcontent-%COMP%] app-button-close-x[_ngcontent-%COMP%]{top:calc(var(--spacer-s) + var(--spacer-xxs));right:var(--spacer-s)}.chat-toast-container.new-design[_ngcontent-%COMP%] chat-toast-component[_ngcontent-%COMP%]:first-of-type{border-top-left-radius:var(--bs-border-radius);border-top-right-radius:var(--bs-border-radius)}.chat-toast-container.new-design[_ngcontent-%COMP%] chat-toast-component[_ngcontent-%COMP%]:last-child{border-bottom-left-radius:var(--bs-border-radius);border-bottom-right-radius:var(--bs-border-radius)}.chat-toast-container.new-design[_ngcontent-%COMP%] chat-toast-component[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--border-color)}"],changeDetection:0})}return d})();var yi=t(345);let Pi=(()=>{class d{sanitizer=(0,v.WQX)(yi.up);transform(n){return n&&this.sanitizer.bypassSecurityTrustResourceUrl(n)}static \u0275fac=function(g){return new(g||d)};static \u0275pipe=e.EJ8({name:"safeUrl",type:d,pure:!0})}return d})();function Mi(d,j){if(1&d&&(e.j41(0,"iframe",0),e.nI1(1,"async"),e.nI1(2,"safeUrl"),e.j41(3,"p",1),e.EFF(4,"Your browser does not support iframes."),e.k0s()()),2&d){const n=e.XpG();e.Y8G("src",e.bMT(2,4,e.bMT(1,2,n.WebMeetingUrl$)),e.f$h),e.R7$(3),e.Y8G("translate","_i18n.BrowserDoesNotSupportIFrames")}}let Ti=(()=>{class d{myPhoneService=(0,v.WQX)(B.gx);WebMeetingUrl$;constructor(){this.WebMeetingUrl$=this.myPhoneService.myPhoneSession.pipe((0,h.T)(n=>{try{const g=new URL(n.myInfo.QuickMeetingLink),P=new URL(n.domainUrl);return g.host=P.host,g.protocol=P.protocol,g.searchParams.append("embed","true"),g.href}catch{return""}}))}static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["webmeeting"]],hostAttrs:[1,"d-block","w-100","h-100","hide-empty","overflow-hidden"],decls:2,vars:3,consts:[["id","webmeetingFrame","scrolling","no","allow","fullscreen; microphone; camera; display-capture *;","allowfullscreen","",2,"width","100%","padding","0","border","0","height","100%",3,"src"],[3,"translate"]],template:function(g,P){1&g&&(e.nVh(0,Mi,5,6,"iframe",0),e.nI1(1,"async")),2&g&&e.vxM(e.bMT(1,1,P.WebMeetingUrl$)?0:-1)},dependencies:[Ie.Mm,Oe.Jj,Pi],styles:[".bg-arrow[_ngcontent-%COMP%]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATQAAAHdCAYAAACTyoXVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjY5OTM0MUUyODhGMTFFNkE0N0VBRTQ2MzlDQjY2MEEiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjY5OTM0MUQyODhGMTFFNkE0N0VBRTQ2MzlDQjY2MEEiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NUE4OTc3MkZEMTZGMTFFNUE3RTc4NUE2NEI3Qjk1NTAiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NUE4OTc3MzBEMTZGMTFFNUE3RTc4NUE2NEI3Qjk1NTAiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6FjSd0AAAeqElEQVR42uydB5TX1bWFDwEELKhgwV4wdozGFiMoSewao7FFTYwtYCyIBUS6gBQVBMQey9OYSPCJGqNR1GCCvTcQK/YSpEmXYd457/5ZKy/LF0WZYWaf71trr1lZAWZm33HP7/7uPec0qK6utpqmbdu2a/qH+1zbuhYZKHO0605sgNpgwoQJ/+d/N6iNQKuE2kH+4VbXSiyDNG+52rk+xAqo7UD7Ti1+7ntc17EE8mzquhgbYHlQa4HmSbrYP/R1vYTt8hzj+jU2gGygVUJtun/o7FqA9fL0cW2GDSAbaJVQe8g/jMB6eTapbD0bYgXIBlqFIa7HsF+eQ1ynYANIB5o/pU3zD91d81gCefq62mADKD+hRaiN9w/DWQJ51nBd5GqOFSAbaBUGuJ5gGeTZj60nyAeaP6XN9Q9numaxFPL0du2EDaD8hGaVJ7RLWAp5okJkJFtPUA+0YGg8sLEc8uzmOg8bQD3QYut5lutzlkSeTq69sQGUAy142tWfJZFnZSunnqthBSgHWhDXOB5gWeTZ3nUBNoB6oH3hOt81laWR
157eug7EBlANtydZzEEsjT2MrtZ7rYgUoB1owykqHW9Bm88rWkwJ2kA60hVZOPaexRPKc6DoMG0A50IJJrp6uxSyT/M/gMNeGWAHKgRbc5LqbZZJnPSvVImw9QTrQ5ri6uj5mqeQ5wnUSNoByoAWTK1tP0CfWeRtsAOVAC250jWG55NnAShVBY6wA5UCrstLh9i2WTJ4DrNR7AsgGWvCGlVrPapZNnqgWoXcaSAdaEKeeo1k2eVpaqSKggB2kAy3upJ3reo+lk6e96zRsAOVACz5wneNaxPLJ08u1OzaAcqAFd1S2n6BNEyttu1tgBSgHWrQZiqEbr7OE8nzfygk3gGygLdl6djNqPTNwhpVReACygRbc7vodyyjPCq4hVoYWA8gGmlW2ni+zlPJsZ2UwNYB0oH3i6mGcemagg5UidgDZQAvucl3NcsrTwHWh0TsNxAMtiFbOE1lSeb5b2XqugBWgHGj/tFLUzKmnPse6jsQGUA604EEr7ZxB/+c2aj1bYwUoB5pVftCfYWnlaVX55dUMK0A50D51neeazfLK81PXydgAyoG2ZOt5OcsrT5x6Rtvu7bAClAMtiJOwJ1liedZyDTVOPUE80GLLGb3TZrDM8uxVWWsg0KT5h2s4y5yCLkbvNAItwfd4qetRllqeaNcdBezNsYJAU2aWq7OVocWgze6VJzUg0KR5ytWP5U5BXNnZExsINHWudI1jyeWJIcWjXKtjBYGmzOdW5j1OZdnl2ZYncgItA1ESdTHLnoKOVioJgECTZihbzzRbz4tc62AFgaZMlets18csvzxbWmkICQSaNDGDYCDLn4ITXL/EBgJNnTj1vJsfgRREN+PNsIFAUyaGqnS10m4ItNm0svWkgJ1Ak2aSlfYzoE+07D4OGwg0da533YYNKRhs5aAACDRZ4tQz5np+gBXytLTSfWUlrCDQlHnNygR2hhXrs7frFGwg0NS5wXUHNqT4me/l2hErCDRlqq1cuGXrqc+qVvrkNcUKAk2Z96z002LrqU87VzdsINDUGe36AzakIOYQ/BgbCDRlFrv6ut7ECnnitDNK4FbDCgJNmbet9E6rxgp5dnV1xwYCTZ0xrmuwIQVnuvbFBgJNnf6uV7FBnqjxjAu3a2AFgaZMXOGIk7C5WCFPlETF+7RGWEGgKXOX67+wIQVRvP4zbCDQlImDgejIMRkr5GliZebE+lhBoCkzzcqL43lYIc8mVmYRNMAKAk2Z+11XYUMKjnYdjw0EmvrWM7qePocVKYi23dtgA4GmzGdWTj0XYoU8G7gGWBmHBwSa9NbzUmxIwSFG7zQCLQGDXI9jQwricnUbbCDQlJlpZWIUF271id5pI1wrYgWBpsw/XMOwIQU/cnXGBgJNnSGuJ7EhBXEYtDM2EGjKzHad7pqPFfKs4rrMmBhFoInzlJXjfdAneqf1wgYCTZ14lzYeG1JwlmsfbCDQlIkaz+hwOx0r5IneaVExshZWEGjKxL20IdiQgp3YehJoWbaeD2BDCqKC4GBsINCU+cLKaLTPsEKeRpVfYK2wgkBT5gUr5TKLsUKe1q7BRgE7gSbOdVaK2EGfo1xHYAOBpkxcuI3j/WlYIU9TK227N8YKAk2ZGH/HANscrOu6hP+eCDR1YlrUWGxIwc9dHbGBQFMmajx7uN7BCnliqEpf1/ewgkBTZpKVm+Wgz1qVtebUk0CT5lrXbdiQggNdnbCBQFOnC1vPNPS2Uh4FBJosU6zU/3HhVp/mruFWrnQAgSbLH123YEMKdrfSgQUINFkWWTn1fBcrUnCmqx02EGjKvGelgB30iYlRI6207wYCTZY48bwOG1KwvesCbCDQlKm2chI2GStSEL3TDsQGAk2ZD109rfRQA22auQa51scKAk1963kjNqSgTeUXGBBo0kRHjlexIQUdjN5pBJo4U11nu6qwQp4oYL/I6J1GoIlzr2sUNqQgwizepzXCCgJNmfjN/SI2pCC2nb/CBgJNmTj1jAu3nHrq09DKcJXWWEGgKTPOSlEz6BO900ZWwg0INFniN/fT2JCCA1ynYwOBpkxMiurmmoEVKYiKke9jA4GmzIOuK7EhBS2snHquhBUEmjLRm/4pbEjBPlZaDQGBJsucyg/551iRguiTtxs2EGjKPGblfhros6LrUis91IBAkyUqCB7GhhTsarTtJtDEidPO81yzsCIFp7p+gg0EmjJPWDkJA32iXfcIK6efQKDJEu9X/oYNKdjGNQAbCDRlFlip9fwEK1JwvOswbCDQlHnWdQk2pGBJ2+6NsIJAU9963o8NKfiuqw82EGjKRGfbzq7pWJGCE1zHYgOBpswkY+BGJoa4NscGAk2Za1x3YEMK1nMNtDKTAAg0SRa5ehmnnlmIE8+O2ECgKfOy8dI4Exe4tsYGAk196zkWG1IQbbtH8N8tgaZMtesc1wdYkYK9XF2xgUBT5m0rp54LsSIFUTGyCzYQaMrc4rodG1LQ0nWxqzlWEGiqxDzPGK7yHlakYA/XWdhAoCnzjqsLNqQhfoG1xwYCTZnRrhuwIQVNrTQrWBMrCDRl+rsmY0MKdqw8qQGBJsuSU88qrEjBaVamsBNoWCDLba4bsSEFTay0lUq/9STQtOnueg0bUhDdONKPPCTQtPnUShXBXKxIwdEVEWggy72u67EhzdYz2gxtTKCBKnEwEB05JmJFCjauhFrK/7YJtBxMq2w9F2FFmq3n8QQaKPNXK61nIAfxlLYVgQbqP+RPYUMK1rYyi2AFAg2Ut55x4XYBVqTgp65TCDRQJmZ6DseGNMTcie0JNFAmaj2fwYYUrGHl3WkTAg1UmePqxNYzDdE7LUUBO4GWl0ddg7AhDZ0qwUaggSzDK8EG+rSwUuu5OoEGqsx0ne2ajRUp2NV1HoEGyjzhGowNaYg5BHsTaKDMMNdD2JCCuGgbbbvXI9BAlXmu811TsSIF21XWm0ADWZ60MusRcnCq62ACDZS5zPUANqSggZW23esQaKC89ezsmoEVKdhU7amcQIN/5xVXD1c1VqRAqncagQZfxk2uv2BDCiIDoqNxawINVImLtnEB82OsSMHGla1nQwINVIkZBP2wIQ2HujoQaKDM1a47sCEN0VaqDYEGqiyubD2nYEUKWlopYF+FQANVYvL6AGxIw36ujgQaKBODisdgQxqibffOBBqoEnfSurrex4oUNLfStnslAg1UmeLqgg1p2M3VnUADZW5z3YgNaTjN9RMCDVRZZOVW+dtYkYJVrVy4rTdtuwk0WFretdJLqworUrCDqzeBBsqMtlLvCTk43XUQgQbKxFPa69iQgkZW2nZvQKCBKp9YGV67ECtSsIWrp5XGkAQaSHK7lUu3kIMoXj+cQANloiPHRGxIw1DXhgQaqPKRlWHFnHrmYINKqBFoIMt9VkplIAeHWx3tnUagwbIiLmA+hw1piLkTWxNooEq0645TzzlYkYJ4jxa90xoTaKDK/a4rsSENB1q5dEuggSz92HqmIu6m7UCggSqfu85yzcSKFLSwUkVQJwrYCTSoCR52XYYNafixlVZDBBrIEqeej2NDGuLUczcCDVSZZeXCLaeeOWjqGulajUADVR5zDcKGNOxUeVIj0ECWqCB4CBvSENc49ifQQJXZVnqnTceKNFvPwa41CDRQ5Ukrt8ohB9vZchpOTaBBbRF3lcZjQxp+4zqMQANVYmLUma5pWJGCyJYhrvUJNFDlRSulUZCD1q4LXSsQaKDK5a57sSENv3QdSaCB8tbzPNdUrEiz9YyqkU0JNFDlJSsT2CEHrVzDrBZ6pxFosLy4yjUWG9LwM1dHAg1UWWylTOYjrEhDdyt31Ag0kGSSq6+V92qgzzpW7iM2IdBAlRtcd2FDGva20oWFQANJvnCdY2XICuSgq9VQ7zQCDeoCUyo/5AwrzsFqVkNtuwk0qCvcWhHk4IeuzgQaKG89e7vexIo0xKlnewINVHnLylg0yEEjK227WxBooLz1vBEb0tDGytUdAg1k6eWajA1pONV1MIEGqrxv5f3KAqxIQUMrw3RaEWigyh2um7EhDVtb6Z1GoIEkUesZw1Vex4o0nOg6hkADVaJnWtxVWogVaYjhKt+4dxqBBnWdv1ppNQQ52MQ10Mo4PAINJLee/V3PY0UajnAdS6CB8tazB1vPNEQuxbDizQk0UOUe12XYkIaYvD7CtSKBBqrE1vNZbEjDvq5TCDRQZaaV3mlcuM1BAyu1vTsSaKDKeCsThCAH0TNtqH3Ntt0EGtRHLnI9jQ1p2NPKJWsCDSSZ4TqTrWcq4lVDewINVHnUygVMyMHKriGu5gQaqDLc9XdsSMMu9hUNQAk0qM/MsvJuZRpWpCFeNexFoIHy1pNTzzys4BrlakmggSpxrP83bEjDFlben36HQANF5luZxj0dK9JwvOtQAg1UiW4cF2JDqq3n4LZt265PoIEq11jpnwY52MzKVQ4CDST53HUuW89UHONPaScSaKDKK1YmsEMe+niobUWggSrXuv6MDWnY0DXQQ60JgQaKRI1nN9e7WJGGQ1wdCTRQZaKVNs5VWJGGkwk0UOZK1yPYkIK4i9iXQANlWrvWwoYUXO26k0ADZeKi7ZbYIE9cqr5gwoQJVQQaqHKS6yhskGeeq7OH2f/ePSTQQJGY59gXG1IwyMPs4SX/g0ADRaL7xvrYIM84K
1/MljEADVTq5DsIGeaa6uvnT2QICDVTZ3r7mdCCo9/S1Lxk6TaCBCitZuUjbCivk+W/XVV/2fxBooEJH177YIM/7VkbaVRFooMrOxqlmBuZXwuyd/+8PEGhQ34k5jXGquQpWyHOza+x/+gMEGtR3YpZAO2yQJ/rcxYHPFwQaqNLWdRY2yBNXM2Ie52df9QcJNKivxBbz0sqWE7S5xPXg1/mDBBrUV/q4dsIGeca7Bn3dP0ygQX0krmecgg3yzLDy3mwOgQaqrG1ldNlKWCFPf9fjS/MXCDSob8Rv7O9hgzwx5GbE0v4lAg3qEwdaOe0CbT60Ml91qedBEGhQX1jPyqkmaBNXNLq7Xvsmf5lAg/pCP9d3sUGe0a5bvulfJtCgPvAL14nYIM/rri6uRQQaqLKBawA2yBOF5/F+9NNv848QaFDXiRbLrbFBnlGue7/tP0KgQV3mxMp2E7R5fFk9hRNoUFeJyU19sEGeqAKIKxozCTRQpZlroGtDrJAnnsweWVb/GIEGdZHjXIdhgzzxzmzYsvwHCTSoa2xZeToDbeI08zzXQgINVFnZNdzVAiukiXtmPV0vLet/mECDugSTm3IQY+iur4l/mECDukI0a+yBDfK8bWUORFVN/OMEGtQFmlpps7w6Vkgz18oMiA9r6hMQaFAX6OraExvkiW3mn2vyExBosLzZw8rwWNDmeVdv12ICDVRZ1Uo7bSY3abOk8Hx6TX8iAg2WJ9Eq5gfYIE/cK/x7bXwiAg2WF+2tXKwEbcbZMq4GINCgrhEXZ0e6GmGFNDHpfKnG0BFoUB+Jl8NtsEGe6JbyTG1+QgINapuY3HQqNshzu+uK2v6kBBrUJjEkeLCrMVZI856VqzjVBBooE5ObtsUGaeKKRhz2TFken5xAg9riSFcHbJDn964/La9PTqBBbRCdZ/tjgzyTrJxqVi2vL4BAg5om3pdFm+XNsUKaea4zXFOX5xdBoEFNc4TrWGyQJxpzPri8vwgCDWqSja20BeLnTJuHrdTkLnf4QYOaInqcRcnLOlghzSwr7Z9m1oUvhkCDmuJ418HYIE9UAzxZV74YAg1qgq1cfV0NsUKau1yj6tIXRKDBsiYKzi+2UhUAunxY2WouItBAmU5W6jVBl5il2d01ua59YQQaLEt2rvyggzZRCXBzXfzCCDRYVjSz0pm0JVZI84brXKvh2QAEGixvomf8XtggzdzKOn9SV79AAg2W1VazFzbIE/3N7qnLXyCBBt+WFV2XVT6CLnHXbGBd/yIJNPi29HTtig3SxEyAmHg+va5/oQQafBvaW3mnAtpc4Hq0PnyhBBp8U1ZzXcRWU557rY5VAxBoUBPEIcDO2CDNp1aqAeYRaKDMAVYqAkCXxZVfWi/Xpy+aQIOlpZVrkDEkWJ3bXNfWty+aQIOloUHlt/Z2WCHNFNfZthzG0BFoUJv8zHUyNkgT78tipuYH9fGLJ9Bgabaa0YF2BayQ5nrX2Pr6xRNo8HWIRo0xG2ATrJDmeVfv+rjVJNBgaTjadTg2SBOF551d0+rzN0GgwVexqetCVxOskGawlelN9RoCDb6KKEjeEBukecA1QuEbIdDgP3GS6yhskCa2mOdZGUdHoIEs27r6Y4M8ca/wWZVvhkCDLyNONeO9GUOCtYnrGVcqfUMEGnwZvzWGBKvzrpUeZ9VK3xSBBv/ONlb6X4EuMYbufNc7at8YgQb/ShScR++rFlghzU2uPyp+YwQa/CvR+6o9NkgzqfJ0Vq34zRFosIRo1ngONkgz30rL9Kmq3yCBBsHKrqFsNeWJ5gLjlL9BAg2CmITdDhukmVD5pSUNgQZ7WHl3BrpEFUC8Tpim/o0SaLlpaWVyUzOskKavlUHB8hBouYkaPoYEa3OX64os3yyBlpe9XadhgzTRRruLawGBBsqsbqVdDEOCdamyUnj+WqZvmkDLR0xuih5nW2GFNFEJcEO2b5pAy8ehruOwQZp4Kkt5SZpAy8V6VoYEs9XUZX4lzD4l0ECd6KKxOTZIE/3N7s76zRNoeYhW2idhgzRPW2nMmRYCLQetXUOwQZo5VgrPPyPQQJ1+ro2wQX6NH81uAoGmz69dx2CDNPdYomoAAi0vm1m5cwa6fGylhG02VhBo6kT/q3WxQZq+rpexgUBT5wzXT7FBmtGuq7GBQFOnjasbNkjzhpXGnECgSdPUSo8ztpq6xBi67q73sYJAUydaAu2HDdL8zjUGGwg0dXa00jIGdHnB1QcbCDR1VrUyBGNVrJAlCs87mfAYOgINlhCnmntigzSDXX/HBgJNnR8ak5vUedBKl2Eg0KSJIcHDXatghSzTrcwGmIEVBJo68YJ4Z2yQJg56nsMGAk2dfVwdsUGasUY1AIGWgDWtvCRmq6nL21aqARZhBYGmTg/XDtggy5IxdG9hBYGmzv5WrmmALje5bsEGAk2d9V2XsnbSTDSu4RBoSYhtyBbYIMsCV2ejGoBAS8Dhrg7YIE2Ur43DBgItw1aTyU3aPGKlyzAQaPJEj7NNsUGWz40xdARaEk5wHY0N0vR2PYMNBJo6MbmJHmfa3O26BhsINHUaW6kG2AQrZHnXSjXAXKwg0DJsNQ/DBmn6uiZjA4GmzpauC7FBmptdN2ADgaZOFJxf4loDK2R51crEcyDQ5DnZdQA2yBJj6KK06SOsINDU2d7V09UAK2S53PVnbCDQ1IkhwdFOuwVWyPK08W6UQEtCHN8zuUmXeVbG0FENQKDJ0851FjZI09/1GDYQaOo0t3KBlq2mLvdZeXcGBJo851iZrQmafGLldcIsrCDQ1Il3ZudjgzRReP4yNhBo6sTF2ZiG3RgrZBntuhYbCLQMdHd9Dxtkec3KBdpqrCDQ1NnXdTo2yBJj6OKC9LtYQaBl2GoOY6spTfQ3G4MNBFoG4qb41tggy4uVpzMg0OSJyU2/wQZZYgxdVANMwwoCTZ0NXf2MwnNlBrkexgYCTZ2GlTDbCitkGe8aiQ0EWgaOcB2HDbLMsDLxfDpWEGjqbGSlAy1bTV3iEOAFbCDQ1GlWCbP1sEKW241qAAItCb90HYINsrxlZTbAQqwg0NTZwjXA1QgrZInC8zewgUBTJ041h7rWwgpZrnfdgg0EWgbOcB2IDbJEO6Bu2ECgZWAnK500QJN4XxZNOf+JFQSaOk2s1GquiRWyRGOB+7GBQMvAma59sEGWx10XYwOBlmWr2QcbZJlt5d0ohecEmjwru0a5VsQKWXpZGRQMBJo80Wp5V2yQ5W6jGoBAS8IerrOxQZb3XV1cc7CCQFMnhgTHqddKWCFLvBd9FRsItAxE6cuO2CDLzVYqAoBAk2d/K+2WQZOJxhBoAi0Ja1u5QMvkJk1iDF1Ue3yAFQRaBqKh3w7YIEu00r4TGwi0DBzsOgUbZHnWyvwHINDkaeW61Ohxpsp8KxPtZ2AFgaZOhNgQ16ZYIcsFrsewgUDLQExuOhIbZBnnugIbCLQMxOSmwa6mWCFJ9DaLao9ZWEGgZeAiK5PPQZM4tX4ZGwi0DJzEVlOaW13XYQOBloFtrbwoBk0mW6kGqMIKAi2DP/2NIcGqVFupxZ2CFQRaBjoYQ4KVucr1J2wg0DKwjWsgNsjykqsHNhBoGYiC8+Gu1bFCkhhDF11SpmMFgZaBuI+0FzbIMsg1HhsItAzE5KYu2CDLBCu1uECgyRMTm6KddkuskGSmlcLzmVhBoGUgnszaYYMsUQ3wAjYQaBlox1ZTmtuNMXQEWhJiixltgZjcpMnbrm6uBVhBoGXgHNdu2CBLVAO8jg0EWgbiesZZ2CDL71y/xwYCLQMtrBzh0+NMk2gH1BMbCLQMNLAyCGNbfgwkiWqAc12fYAWBloGY3PRrfgRkiSfv+7CBQMtATG6KDrQr8yMgyRNWhkADgZaC6HG2OcsvyVzXaa7PsYJAy8BRrhNZell6uZ7BBgItA62t9Djjuoomf7HStBEItBT0MYYEq/KhldK1uVhBoGXgONevWHJZ4r7ZJGwg0DIQT2WDWW5ZbnLdgA2QJdDiTtI6LLckE41qAEgUaKdauUQLenxhZdDJe1gBGQItypq6s8yyXOG6AxsgQ6DF5KaLjSHBqjxn5c4ZQIpAO8O1H0ssSVzNiFcJVANAikDbkd/e0kSd5uPYABkCbVUr7bRXY3klecg1EhsgS6DFmLKfsLSSfGZl4vlsrIAMgbarlWEYoElc0XgFGyBDoK1S2YrQ40yTW63MBwBIEWjx23sXllSS16xUA1RhBWQItJjc9FuWU5LFlTB7EysgQ6DF5KZop92c5ZTkGtcYbIAsgRZDZHdgKSV5wcqrBIAUgba/lf7xoEdUA3R2TcMKyBBo67sucTViGSUZ5hqPDZAl0KKLxtYsoSQTjIackCjQDjVONVWJgvOo9piDFZAh0NZ1DWXpZIkn7xewAbIEWlzR2ISlk2SslWsaACkC7XjXsSybJO+4znctxArIEGgxuYkeZ9pbzcnYABkCraGVHmcMCdYkis7/gA2QJdBOch3OcknyspVqD4AUgbalqz9LJck8VxfX
1R1gBGQItepvF5Ka1WCpJLnf9FRsgS6Cd4DqQZZLkKbaakCnQtnP1czVgmeSYZaXSYx5WQIZAa+oabkxuUmWA6xlsgCyBdo7rRyyPJPcYY+ggUaDt7jqbpZHkYyunmguwAjIEWpxqxgXaFiyNJFHaNBEbIEugda08oYEeN7luxAbIEmh7VrYjoMerrj7YAFkCbU3XpVZON0GL6J4R0+ynYAVkCbTYajK5SZOrXXdiA2QJtL2tTPcBPZ61MiQYQD/Q2rZt29I/jDAmNyky09XJSlUAQIontAtdW7EMksSIwUewAVIEmj+d/dw/dGAJJPmblS4pAPqB5mEWQ4IpPNfkM9cZRjUAJHpCizDbBvslidkAr2ADpAg0fzr7hZU+Z6DHaCvzAQD0A83DbCMrczVBjzetTOVajBUgH2geZs38w2DXBtguR5WVwvPXsQKyPKEdbUxuUuVa1xhsgBSB5k9nm/mHgcYFWkVeNAZAQ5ZA8zBrbKXwfG3sliOqAaIZ51SsgCxPaDEM4yCsluQy14PYACkCzZ/Ovu8femCzJI9aGXYCoB9oHmYrWHlvxpBgPWa4TjOqASDRE1p0WtgXiyWJ7rPPYwOkCDR/OtvFmIqtSjRrvBwbIEWgeZjF5KZhrlWwV473rVygrcIKyPKEFoNOmNykScwGmIQNUFdZphdd/ensB1ZeFs93VWOvFDGG7hZsgLrM/wgwAPKtr2VfVzmuAAAAAElFTkSuQmCC),url(pattern_carbon.4e087babb2478cf8.gif);background-position:75%,top left;background-repeat:no-repeat,repeat;width:100%;height:100%}.flex-center[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.column-start[_ngcontent-%COMP%]{flex-direction:column;justify-content:flex-start}.modal-container[_ngcontent-%COMP%]{background-color:#0006;width:350px;height:334px;border-radius:5px;padding:24px}.modal-container[_ngcontent-%COMP%] .logo-img[_ngcontent-%COMP%]{padding-top:10px;width:152px;height:auto}"]})}return d})();function _i(d,j){if(1&d&&(e.nrm(0,"webmeeting"),e.nI1(1,"async")),2&d){const n=e.XpG();e.AVh("d-none",!e.bMT(1,2,n.service.isMeetingMainScreen))}}let xi=(()=>{class d{service=(0,v.WQX)(Et.l);static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["app-webmeeting-holder"]],decls:3,vars:5,consts:[[3,"d-none"]],template:function(g,P){1&g&&(e.nVh(0,_i,2,4,"webmeeting",0),e.nI1(1,"async"),e.nI1(2,"async")),2&g&&e.vxM(e.bMT(1,1,P.service.isActive)||e.bMT(2,3,P.service.isMeetingMainScreen)?0:-1)},dependencies:[Ti,Oe.Jj],styles:["[_nghost-%COMP%]:has(webmeeting:not(:empty):not(.d-none)){display:block;width:100%;height:calc(100% - var(--aside-folded-nav-height))}"]})}return d})();const Ri=["integrationUrl"],Ai=[{path:"",component:(()=>{class d{app=(0,v.WQX)(O.t);settingsService=(0,v.WQX)(E.h);chatToasterService=(0,v.WQX)(y.G);phoneService=(0,v.WQX)(S.u);myPhoneService=(0,v.WQX)(B.gx);modalService=(0,v.WQX)(Q.B);localStorage=(0,v.WQX)(K.sj);chatToastService=(0,v.WQX)(M.T);notificationService=(0,v.WQX)(l.J);pushService=(0,v.WQX)(D.Xd);unreadNotifications=(0,v.WQX)(ye);soundService=(0,v.WQX)(i.p);silentModeService=(0,v.WQX)(a.Y);integrationService=(0,v.WQX)(x.a);swUpdate=(0,v.WQX)(w.EI);appsUtilityService=(0,v.WQX)(c.G);subs=new C.yU;currentCallCount;integrationUrl;isNewDesign=(0,v.WQX)(rt.T);isNewDesignEnabled=(0,v.WQX)(rt.e);constructor(){(0,v.QZP)(()=>{document.body.classList.toggle("new-design-enabled",this.isNewDesignEnabled())}),(0,v.QZP)(()=>{const n=this.isNewDesign();document.body.classList.toggle("old-design",!n),document.body.classList.toggle("new-design",n)})}ngAfterViewInit(){this.subs.add(this.myPhoneService.myPhoneSession.pipe((0,m.n)(n=>(0,u.h)(n.conversationRemoved$,n.conversationInfo$.pipe((0,h.T)(g=>g.Conversation),(0,R.p)(g=>g.IsArchived))))).subscribe(n=>{this.chatToastService.removeChat(n.IdConversation),this.notificationService.removeChatNotification(n.IdConversation)})),this.subs.add(this.myPhoneService.myPhoneSession.pipe((0,m.n)(n=>n.chatIsAllowed$),(0,R.p)(n=>!n)).subscribe(()=>{this.chatToastService.removeAll(),this.notificationService.removeChatNotification()})),this.subs.add(this.chatToasterService.getUnhandledMessages().pipe((0,f.E)(this.settingsService.generalSettings$,this.silentModeService.silentMode$)).subscribe(n=>{const[g,P,Y]=n;P.showChatToaster&&!g.onChatPage&&(g.isUpdate?this.chatToastService.update(g):this.chatToastService.pop(g)),g.isUpdate||(this.notificationService.createChatNotification(g),this.playUnhandledChatMessageNotificationIfNeeded(P.playNewChatMessageSound&&!Y,P.chatSoundFile))})),this.subs.add(this.phoneService.myCalls$.subscribe(n=>this.currentCallCount=n.calls.size)),this.subs.add(this.myPhoneService.myPhoneSession.pipe((0,T.s)(1),(0,h.T)(n=>({hasSubscriptions:n.myInfo.Subscriptions?.Items?.length>0,welcome:n.sessionParam.welcome}))).subscribe(({hasSubscriptions:n,welcome:g})=>{g!==Ee_ProvisionSmartphone||n?g===Ee_BrowserExtensionDeprecated&&this.appsUtilityService.showPWAMod
1al(!0):this.modalService.showComponent(W.N)}))}ngOnInit(){this.subs.add(this.integrationService.openUrl$.subscribe(g=>{this.integrationUrl.nativeElement.href=g,this.integrationUrl.nativeElement.click()}));const n=(0,s.z)([this.unreadNotifications.combinedUnreadNotification$.pipe((0,_.F)()),this.myPhoneService.myPhoneSession]).pipe((0,h.T)(([g])=>g),(0,r.Z)(0));navigator?.setAppBadge&&this.subs.add(n.pipe((0,b.Tg)(this.modalService)).subscribe(g=>{navigator?.setAppBadge(Math.min(g,99))})),this.swUpdate.isEnabled&&this.subs.add(this.myPhoneService.myPhoneSession.pipe((0,_.F)()).subscribe(()=>{console.log("checking for pwa update..."),this.swUpdate.checkForUpdate()})),this.pushService.isEnabled$.pipe((0,m.n)(g=>{if(g){const P=(0,b.lB)(this.localStorage,ie.Hh.PushDisabled,!1);return(0,s.z)([this.myPhoneService.myPhoneSession,P,this.pushService.permissionState$]).pipe((0,o.H)(([Y,le,se])=>le||"granted"!==se?this.pushService.pushUnsubscribe(Y):this.pushService.pushSubscribe(Y)))}return p.w})).subscribe()}ngOnDestroy(){this.subs.unsubscribe()}playUnhandledChatMessageNotificationIfNeeded(n,g){n&&0===this.currentCallCount&&this.soundService.playNotificationByName(g)}static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["layout"]],viewQuery:function(g,P){if(1&g&&e.GBs(Ri,5),2&g){let Y;e.mGM(Y=e.lsd())&&(P.integrationUrl=Y.first)}},hostAttrs:[1,"d-flex","flex-column"],decls:12,vars:0,consts:[["integrationUrl",""],["target","_blank",1,"hidden"],[1,"flex-child","d-flex","flex-row","position-relative"],[1,"flex-child","bg"],[1,"right-toast-placeholder","hide-empty"],[1,"hide-empty"]],template:function(g,P){1&g&&(e.nrm(0,"default-validation-errors")(1,"a",1,0)(3,"app-header"),e.j41(4,"div",2),e.nrm(5,"app-aside"),e.j41(6,"div",3),e.nrm(7,"router-outlet")(8,"app-webmeeting-holder"),e.k0s(),e.j41(9,"div",4),e.nrm(10,"app-web-dialer",5)(11,"chat-toast-container",5),e.k0s()())},dependencies:[X.p,kn,mo,H.n3,ei,bi,xi],styles:["app-header[_ngcontent-%COMP%]{z-index:1}.right-toast-placeholder[_ngcontent-%COMP%]{position:absolute;display:flex;flex-direction:column;align-items:flex-end;right:0;overflow-x:hidden;pointer-events:none;z-index:1;padding-left:var(--spacer-xxl);height:100%;gap:var(--spacer-l)}.right-toast-placeholder[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{pointer-events:auto}.flex-child[_ngcontent-%COMP%]{isolation:isolate}"]})}return d})(),canActivate:[()=>((0,v.WQX)(B.gx).connect(),!0)],children:[{path:"",component:(()=>{class d{router=(0,v.WQX)(H.Ix);peopleLink=(0,lt.I)(ie.Hh.SavePeople,ie.lX);ngOnInit(){const n=this.peopleLink();this.router.navigate(n instanceof Array?n:[n])}static \u0275fac=function(g){return new(g||d)};static \u0275cmp=e.VBU({type:d,selectors:[["ng-component"]],decls:0,vars:0,template:function(g,P){},encapsulation:2})}return d})(),pathMatch:"full"},{path:"people",data:{helpUri:"_i18n.WebclientManualUri",title:"_i18n.Team"},loadChildren:()=>Promise.all([t.e(1811),t.e(9775),t.e(9765),t.e(5656),t.e(9022),t.e(9053),t.e(3775),t.e(6993),t.e(7771),t.e(9183),t.e(5085),t.e(2076),t.e(5362)]).then(t.bind(t,38543)).then(d=>d.peopleRoutes)},{path:"contacts",data:{helpUri:"_i18n.MainUri",title:"_i18n.Contacts"},loadChildren:()=>Promise.all([t.e(9765),t.e(5656),t.e(7199),t.e(445),t.e(9053),t.e(3775),t.e(9977),t.e(2076),t.e(5527)]).then(t.bind(t,63782)).then(d=>d.phonebookRoutes)},{path:"chat",data:{helpUri:"_i18n.ChatUri",title:"_i18n.Chat"},loadChildren:()=>Promise.all([t.e(1811),t.e(9775),t.e(9765),t.e(5656),t.e(7199),t.e(3775),t.e(9183),t.e(9977),t.e(2076),t.e(7202)]).then(t.bind(t,70691)).then(d=>d.conversationRoutes)},{path:"call_history",data:{helpUri:"_i18n.MainUri",title:"_i18n.AllowpushCalls"},loadChildren:()=>Promise.all([t.e(9765),t.e(7199),t.e(9053),t.e(5562),t.e(2076),t.e(1474)]).then(t.bind(t,81654)).then(d=>d.callHistoryRoutes)},{path:"voicemails",data:{helpUri:"_i18n.MainUri",title:"_i18n.VoiceMail"},loadChildren:()=>Promise.all([t.e(9765),t.e(7199),t.e(9053),t.e(8965),t.e(2076),t.e(9836)]).then(t.bind(t,99836)).then(d=>d.voicemailRoutes)},{path:"conferences",data:{helpUri:"_i18n.ConferenceUri",title:"_i18n.Meet"},loadChildren:()=>Promise.all([t.e(5656),t.e(445),t.e(2076),t.e(532)]).then(t.bind(t,44714)).then(d=>d.meetingRoutes)},{path:"switchboard",data:{helpUri:"_i18n.MainUri",title:"_i18n.Panel"},loadChildren:()=>Promise.all([t.e(1811),t.e(9775),t.e(9765),t.e(5656),t.e(7199),t.e(9022),t.e(3775),t.e(4421),t.e(6993),t.e(1941),t.e(2839),t.e(2076),t.e(3862)]).then(t.bind(t,3862)).then(d=>d.switchboardRoutes)},{path:"recordings",data:{helpUri:"_i18n.RecordingsUri",title:"_i18n.Recordings"},loadChildren:()=>Promise.all([t.e(9765),t.e(7199),t.e(9053),t.e(8965),t.e(2076),t.e(9448)]).then(t.bind(t,89448)).then(d=>d.recordingRoutes)},{path:"settings",data:{helpUri:"_i18n.WebclientManualUri",title:"_i18n.Settings"},loadChildren:()=>Promise.all([t.e(1811),t.e(9775),t.e(7273),t.e(4349),t.e(4360),t.e(2050),t.e(7771),t.e(821),t.e(5085),t.e(6428),t.e(6004)]).then(t.bind(t,28602)).then(d=>d.settingsRoutes)},{path:"apps",data:{helpUri:"_i18n.WebclientManualUri",title:"_i18n.Apps"},loadComponent:()=>Promise.all([t.e(2076),t.e(4096)]).then(t.bind(t,84096)).then(d=>d.AppsComponent)},{path:"office",canActivate:[t(93785).kP],data:{helpUri:"_i18n.AdminManualUri",title:"_i18n.AdminSectionHeader"},loadChildren:()=>Promise.all([t.e(9775),t.e(2050),t.e(5562),t.e(9682),t.e(2076),t.e(9353)]).then(t.bind(t,9353)).then(d=>d.officeRoutes)}]}]},99077(be,J,t){t.d(J,{G:()=>ie});var i=t(73801),y=t(19724),O=t(57786),v=t(7673),S=t(31251),E=t(16444),x=t(85802),l=t(25558),C=t(5964),u=t(63489),s=t(96354),o=t(99437),p=t(53993),M=t(23294),m=t(94014),h=t(20039);class f extends((0,h.mS)({id:-1,text:"",sender:"",eventTime:0,conversationId:m.W_,avatar:void 0,participant:void 0,onChatPage:!1,isUpdate:!1})){get chatLink(){return function R(Ce){return`/chat/${Ce}`}(this.conversationId)}}var T=t(1211),_=t(95195),r=t(70329),Q=t(72339),B=t(68018),K=t(31390);let ie=(()=>{class Ce{myPhoneSvc=(0,x.WQX)(E.gx);translateService=(0,x.WQX)(B.c$);chatSubscribers=new Set;latestMessagePerConversation(ye){return ye.map(G=>G.IdConversation).filter((G,he,q)=>q.indexOf(G)===he).map(G=>{const he=ye.filter(q=>q.IdConversation===G);return he.reduce((q,fe)=>fe.Id>q.Id?fe:q,he[0])})}getUnhandledMessages(){return this.myPhoneSvc.myPhoneSession.pipe((0,l.n)(ye=>{const Ee=ye.newChatMessages$.pipe((0,l.n)(he=>(0,y.H)(this.latestMessagePerConversation(he))),(0,C.p)(he=>document.hidden||!this.chatSubscribers.has(he.IdConversation)));return(0,O.h)(Ee,ye.conversationInfo$,ye.conversationRemoved$).pipe((0,u.i)((he,q)=>{if(q instanceof S.cM){const fe=he.chats.findIndex(ne=>ne.id===q.IdConversation);return fe>
1=0?(he.chats[fe]=he.chats[fe].merge({lastMessageObject:q}),(0,v.of)({chats:he.chats,chatMessage:q,isUpdate:!1})):ye.get(new T.$RH({IdConversation:q.IdConversation})).pipe((0,s.T)(ne=>m.ry.FromPartyInfo(ne.Conversation,ye)),(0,s.T)(ne=>(ne=ne.merge({lastMessageObject:q}),{chats:he.chats.concat(ne),chatMessage:q,isUpdate:!1})),(0,o.W)(ne=>(console.warn(ne),(0,v.of)({chats:he.chats,chatMessage:void 0,isUpdate:!1}))))}return q instanceof T.loJ?new r.u(q.IsNew,q.Conversation,ye).updateChatList(he.chats).pipe((0,s.T)(fe=>{const ne=he.chats.find(w=>w.id===q.Conversation.IdConversation);return{chats:fe,chatMessage:ne?.lastMessageObject,isUpdate:!!ne}})):new Q.N(q.IdConversation).updateChatList(he.chats).pipe((0,s.T)(fe=>({chats:fe,chatMessage:void 0,isUpdate:!1})))},{chats:[],chatMessage:void 0,isUpdate:!1},1)).pipe((0,C.p)(he=>{const q=he.chats,fe=he.chatMessage;return!!fe&&!q.find(ne=>ne.id===fe.IdConversation)?.getParticipant(fe.Sender)?.isMe}),(0,p.E)(ye.systemParameters$),(0,l.n)(([he,q])=>{const ne=he.chatMessage,w=he.chats.find(W=>W.id===ne.IdConversation),D=-1===ne.Sender?w?.participants?.externalParticipant:w?.getParticipant(ne.Sender),b=D?.contact?(0,K.V)(q,D.contact):"",c=ye.domainUrl?(0,_.B)(D?.contact?.profilePicture,ye.domainUrl):i,a=this.chatSubscribers.has(ne.IdConversation);return(0,S.Iz)(this.translateService,ne,ne.UnsafeMessage,!1).pipe((0,s.T)(W=>new f({id:ne.Id,eventTime:ne.Sended.getTime(),text:W,sender:b??"",conversationId:ne.IdConversation,avatar:c,participant:D,onChatPage:a,isUpdate:he.isUpdate})))}),(0,M.F)((he,q)=>he.id===q.id&&!q.isUpdate))}))}subscribeChat(ye){this.chatSubscribers.add(ye)}unsubscribeChat(ye){this.chatSubscribers.delete(ye)}static \u0275fac=function(Ee){return new(Ee||Ce)};static \u0275prov=x.jDH({token:Ce,factory:Ce.\u0275fac,providedIn:"root"})}return Ce})()},34125(be,J,t){t.d(J,{p:()=>re});var i=t(84412),y=t(7673),O=t(18810),v=t(19724),S=t(91413),E=t(38601),x=t(16444),l=t(85802),C=t(1211),u=t(96697),s=t(96354),o=t(99437),p=t(23294),M=t(25558),m=t(88141);const Ce=[{name:"Default",label:"_i18n.Voicemail_GreetingsDefaultTitle",data:t.p+"media/Default-918b5ae7.mp3",predefined:!0},{name:"Bobby",label:"Bobby",data:t.p+"media/Bobby-536568a4.mp3",predefined:!0},{name:"Daisy",label:"Daisy",data:t.p+"media/Daisy-e171a277.mp3",predefined:!0},{name:"Dong",label:"Dong",data:t.p+"media/Dong-18c7105b.mp3",predefined:!0},{name:"Harp",label:"Harpe",data:t.p+"media/Harp-952fe6c2.mp3",predefined:!0},{name:"Pling",label:"Pling",data:t.p+"media/Pling-b95ecb17.mp3",predefined:!0},{name:"Sparkle",label:"Sparkle",data:t.p+"media/Sparkle-ccac0f1d.mp3",predefined:!0},{name:"Swish",label:"Swish",data:t.p+"media/Swish-2077956e.mp3",predefined:!0},{name:"Teeting",label:"Teeting",data:t.p+"media/Teeting-0861b353.mp3",predefined:!0},{name:"Twinkle",label:"Twinkle",data:t.p+"media/Twinkle-96ab57b7.mp3",predefined:!0}];let re=(()=>{class ye{myPhoneService=(0,l.WQX)(x.gx);modalService=(0,l.WQX)(E.B);http=(0,l.WQX)(S.Qq);notifications;notifications$;audioCache;constructor(){this.audioCache={},this.notifications=Ce,this.notifications$=new i.t(this.notifications),this.downloadNotificationList().pipe((0,u.s)(1)).subscribe(G=>{this.notifications.push(...G),this.notifications$.next(this.notifications)})}downloadNotificationList(){const G=new C.YSh;return G.Folder=C.vyG.NotificationsFolder,this.myPhoneService.get(G).pipe((0,s.T)(he=>he.Files.map(q=>this.getExternalNotificationByFilename(q))),(0,o.W)(()=>(0,y.of)([])),(0,p.F)((he,q)=>JSON.stringify(he)===JSON.stringify(q)))}playNotificationByName(G){const he=this.notifications.find(q=>q.name===G);he&&(he.predefined?new Audio(he.data).play():void 0===this.audioCache[G]?this.http.get(he.data,{responseType:"blob"}).pipe((0,u.s)(1)).subscribe(q=>{const fe=window.URL.createObjectURL(q);this.audioCache[G]=fe,new Audio(fe).play()}):new Audio(this.audioCache[G]).play())}uploadNotificationFile(G,he){return(0,y.of)(G).pipe((0,M.n)(q=>{if(q.byteLength>2097152)return(0,O.$)(()=>new Error("_i18n.MaximumSizeIsExceeded"));const fe=new C.NgQ;return fe.Folder=C.vyG.NotificationsFolder,fe.FileName=he,fe.Content=new Uint8Array(q),(0,v.H)((new AudioContext).decodeAudioData(G)).pipe((0,M.n)(ne=>this.myPhoneService.get(fe)))}),(0,s.T)(q=>this.getExternalNotificationByFilename(he)),(0,m.M)({next:q=>{this.audioCache[q.name]=window.URL.createObjectURL(new Blob([G])),this.notifications.findIndex(fe=>
1fe.name===q.name)<0&&(this.notifications.push(q),this.notifications$.next(this.notifications))},error:q=>this.modalService.error(q)}))}getExternalNotificationByFilename(G){return{name:G,label:G,data:"/webclient/api/currentuser/notification/"+G,predefined:!1}}static \u0275fac=function(he){return new(he||ye)};static \u0275prov=l.jDH({token:ye,factory:ye.\u0275fac,providedIn:"root"})}return ye})()},37731(be,J,t){t.d(J,{l:()=>C});var i=t(85802),y=t(84412),O=t(16444),v=t(96354),S=t(44668),E=t(25558),x=t(1211),l=t(38601);let C=(()=>{class u{myPhoneService=(0,i.WQX)(O.gx);modalService=(0,i.WQX)(l.B);isActive;isMeetingMainScreen=new y.t(!1);isInvalid$;constructor(){const o=this.myPhoneService;this.isActive=o.myPhoneSession.pipe((0,E.n)(p=>p.quickMeetingActive$)),this.isInvalid$=o.myPhoneSession.pipe((0,E.n)(p=>p.myInfo$),(0,v.T)(p=>!((p.FirstName||p.LastName)&&p.Email&&p.WmFriendlyName)),(0,S.t)({refCount:!0,bufferSize:1}))}deactivate(){this.myPhoneService.get(new x.dnh).subscribe({error:o=>this.modalService.error(o)})}static \u0275fac=function(p){return new(p||u)};static \u0275prov=i.jDH({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})()},15792(be,J,t){t.d(J,{F:()=>y});var i=t(35547);let y=(()=>{class O{transform(S,E,x=!1){return`<a href="${S}" ${x?"":'target="_blank" rel="noopener" '} class="link">${E}</a>`}static \u0275fac=function(E){return new(E||O)};static \u0275pipe=i.EJ8({name:"appLinkify",type:O,pure:!0})}return O})()},60332(be,J,t){t.d(J,{N:()=>Z});var i=t(85802),y=t(22972),O=t(54999),v=t(40953),S=t(93656),E=t(17705),x=t(84412),l=t(84572),C=t(25558),u=t(89079),s=t(22573),o=t(68018),p=t(7673),M=t(99437),m=t(96354),h=t(50733),R=t(95847),f=t(16444);let T=(()=>{class N{myUserApi=(0,i.WQX)(h.b);usersApi=(0,i.WQX)(R.u);myPhoneService=(0,i.WQX)(f.gx);getProvisionUrl$($){return this.myPhoneService.myPhoneSession.pipe((0,C.n)(V=>($?this.usersApi.generateProvLink({id:$}):this.myUserApi.myUserGenerateProvLink()).pipe((0,M.W)(()=>(0,p.of)(void 0)),(0,m.T)(A=>{if(A&&V.domainUrl){const L=new URL(V.domainUrl);return(L.protocol+"//"+L.host+A.value).toUpperCase()}return""}))))}getWindowsProvisionUrl$($){return this.getProvisionUrl$($).pipe((0,m.T)(V=>`tcx+app:${V}`))}static \u0275fac=function(V){return new(V||N)};static \u0275prov=i.jDH({token:N,factory:N.\u0275fac,providedIn:"root"})}return N})();var _=t(8516),r=t(35547);let Q=(()=>{class N{appUtility=(0,i.WQX)(T);userId=(0,E.hFB)();refresh$=new x.t(void 0);provisionUrl=(0,u.ot)((0,l.z)([this.refresh$,(0,u.br)(this.userId)]).pipe((0,C.n)(([$,V])=>this.appUtility.getProvisionUrl$(V))));TriangleAlert=_.lW3;static \u0275fac=function(V){return new(V||N)};static \u0275cmp=r.VBU({type:N,selectors:[["app-provision-qrcode"]],hostAttrs:[1,"d-flex","flex-column","gap-2","align-items-center"],inputs:{userId:[1,"userId"]},decls:11,vars:11,consts:[[3,"url"],[1,"d-flex","gap-2","px-2"],[1,"fillIconCurrent","svg-md","opacity-75",3,"img"],["data-qa","refresh",1,"link","text-lowercase",3,"click"]],template:function(V,A){1&V&&(r.nrm(0,"app-qrcode",0),r.j41(1,"div",1),r.nrm(2,"lucide-icon",2),r.j41(3,"p"),r.EFF(4),r.nI1(5,"translate"),r.j41(6,"a",3),r.bIt("click",function(){return A.refresh$.next()}),r.EFF(7),r.nI1(8,"translate"),r.k0s(),r.EFF(9),r.nI1(10,"translate"),r.k0s()()),2&V&&(r.Y8G("url",A.provisionUrl()),r.R7$(2),r.Y8G("img",A.TriangleAlert),r.R7$(2),r.SpI(" ",r.bMT(5,5,"_i18n.QRCodeRefreshWarningPart1")," "),r.R7$(3),r.JRh(r.bMT(8,7,"_i18n.Refresh")),r.R7$(2),r.SpI(" ",r.bMT(10,9,"_i18n.QRCodeRefreshWarningPart2")," "))},dependencies:[s.q,_.flO,_.WGl,o.D9],encapsulation:2,changeDetection:0})}return N})();var B=t(15792);const K=N=>({p1:N});let ie=(()=>{class N{downloadOnAppleStoreImageData=S;userId;static \u0275fac=function(V){return new(V||N)};static \u0275cmp=r.VBU({type:N,selectors:[["app-ios-dialog-content"]],inputs:{userId:"userId"},decls:17,vars:20,consts:[[1,"d-flex","flex-row"],[1,"ps-2"],[3,"innerHTML"],[1,"ps-2","mb-3","d-flex","gap-2","justify-content-center"],["data-qa","apple-store-link","target","_blank",3,"href"],["height","30","alt","AppleStore",3,"src"],[1,"ps-2","mb-2"],[1,"d-flex","flex-column","align-items-center"],[3,"userId"]],template:function(V,A){1&V&&(r.j41(0,"div",0)(1,"div")(2,"p",1),r.EFF(3,"1. "),r.nrm(4,"span",2),r.nI1(5,"translate"),r.nI1(6,"appLinkify"),r.nI1(7,"translate"),r.k0s(),r.j41(8,"div",3)(9,"a",4),r.nI1(10,"translate"),r.nrm(11,"img",5),r.k0s()(),r.j41(12,"p",6),r.EFF(13),r.nI1(14,"translate"),r.k0s(),r.j41(15,"div",7),r.nrm(16,"app-provision-qrcode",8),r.k0s()()()),2&V&&(r.R7$(4),r.Y8G("innerHTML",r.i5U(7,11,"_i18n.InstallAndroid",r.eq3(18,K,r.i5U(6,8,r.bMT(5,6,"_i18n.IosManualUri"),"iOS"))),r.npT),r.R7$(5),r.Y8G("href",r.mNQ(r.bMT(10,14,"_i18n.AppleStoreClientLink")),r.B4B),r.R7$(2),r.Y8G("src",A.downloadOnAppleStoreImageData,r.B4B),r.R7$(2),r.SpI(" 2. ",r.bMT(14,16,"_i18n.OpenAndScanFrom3cxApp")," "),r.R7$(3),r.Y8G("userId",A.userId)
1)},dependencies:[Q,o.D9,B.F],styles:[".android-phone[_ngcontent-%COMP%]{width:190px}a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:4px;overflow:hidden}"],changeDetection:0})}return N})();var Ce=t(66100);const re=N=>({p1:N});let ye=(()=>{class N{getItGooglePlayPlayIcon=Ce;userId;static \u0275fac=function(V){return new(V||N)};static \u0275cmp=r.VBU({type:N,selectors:[["app-android-dialog-content"]],inputs:{userId:"userId"},decls:17,vars:20,consts:[[1,"d-flex","flex-row"],[1,"ps-2"],[3,"innerHTML"],[1,"ps-2","mb-3","d-flex","gap-2","justify-content-center"],["data-qa","google-play-link","target","_blank",3,"href"],["height","30","alt","GooglePlay",3,"src"],[1,"ps-2","mb-2"],[1,"d-flex","flex-column","align-items-center"],[3,"userId"]],template:function(V,A){1&V&&(r.j41(0,"div",0)(1,"div")(2,"p",1),r.EFF(3,"1. "),r.nrm(4,"span",2),r.nI1(5,"translate"),r.nI1(6,"appLinkify"),r.nI1(7,"translate"),r.k0s(),r.j41(8,"div",3)(9,"a",4),r.nI1(10,"translate"),r.nrm(11,"img",5),r.k0s()(),r.j41(12,"p",6),r.EFF(13),r.nI1(14,"translate"),r.k0s(),r.j41(15,"div",7),r.nrm(16,"app-provision-qrcode",8),r.k0s()()()),2&V&&(r.R7$(4),r.Y8G("innerHTML",r.i5U(7,11,"_i18n.InstallAndroid",r.eq3(18,re,r.i5U(6,8,r.bMT(5,6,"_i18n.AndroidManualUri"),"Android"))),r.npT),r.R7$(5),r.Y8G("href",r.mNQ(r.bMT(10,14,"_i18n.GooglePlayStoreClientLink")),r.B4B),r.R7$(2),r.Y8G("src",A.getItGooglePlayPlayIcon,r.B4B),r.R7$(2),r.SpI(" 2. ",r.bMT(14,16,"_i18n.OpenAndScanFrom3cxApp")," "),r.R7$(3),r.Y8G("userId",A.userId))},dependencies:[Q,o.D9,B.F],styles:[".android-phone[_ngcontent-%COMP%]{width:190px}a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:4px;overflow:hidden}"],changeDetection:0})}return N})();var Ee=t(14492),G=t(96697);const he=["appProtocol"],q=N=>({p1:N});let fe=(()=>{class N{destroy$=(0,i.WQX)(i.abz);provisionService=(0,i.WQX)(T);getFromMicrosoftStoreIcon=Ee;userId;winAppProtocol;provisionWinApp(){this.provisionService.getWindowsProvisionUrl$(this.userId).pipe((0,G.s)(1),(0,u.pQ)(this.destroy$)).subscribe($=>this.winAppProtocol.nativeElement.src=$)}static \u0275fac=function(V){return new(V||N)};static \u0275cmp=r.VBU({type:N,selectors:[["app-windows-dialog-content"]],viewQuery:function(V,A){if(1&V&&r.GBs(he,5),2&V){let L;r.mGM(L=r.lsd())&&(A.winAppProtocol=L.first)}},inputs:{userId:"userId"},decls:22,vars:22,consts:[["appProtocol",""],[1,"d-flex","flex-row"],[1,"ps-2"],[3,"innerHTML"],[1,"ps-2","mb-3","d-flex","gap-2","justify-content-center"],["target","_blank",3,"href"],["height","30","alt","MsWindowsStore",3,"src"],[1,"ps-2","mb-2"],[1,"d-flex","flex-column","align-items-center"],["type","button",1,"btn","btn-primary","my-2",3,"click"],[1,"d-none"]],template:function(V,A){1&V&&(r.rj2(0,"div",1)(1,"div")(2,"p",2),r.EFF(3,"1. "),r.Hgh(4,"span",3),r.nI1(5,"translate"),r.nI1(6,"appLinkify"),r.nI1(7,"translate"),r.eux(),r.rj2(8,"div",4)(9,"a",5),r.nI1(10,"translate"),r.Hgh(11,"img",6),r.eux()(),r.rj2(12,"p",7),r.EFF(13),r.nI1(14,"translate"),r.eux(),r.rj2(15,"div",8)(16,"button",9),r.VwU("click",function(){return A.provisionWinApp()}),r.EFF(17),r.nI1(18,"translate"),r.eux()(),r.rj2(19,"div",10),r.Hgh(20,"iframe",null,0),r.eux()()()),2&V&&(r.R7$(4),r.Avn("innerHTML",r.i5U(7,11,"_i18n.InstallWindows",r.eq3(20,q,r.i5U(6,8,"ms-windows-store://pdp/?productid=9NW77489NGJ0",r.bMT(5,6,"_i18n.WindowsLegacyApp")))),r.npT),r.R7$(5),r.Avn("href",r.mNQ(r.bMT(10,14,"_i18n.MsWindowsStoreClientLink")),r.B4B),r.R7$(2),r.Avn("src",A.getFromMicrosoftStoreIcon,r.B4B),r.R7$(2),r.SpI(" 2. ",r.bMT(14,16,"_i18n.ProvisionWindowsApp")," "),r.R7$(4),r.SpI(" ",r.bMT(18,18,"_i18n.Provision")," "))},dependencies:[o.D9,B.F],styles:[".android-phone[_ngcontent-%COMP%]{width:190px}a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:4px;overflow:hidden}"],changeDetection:0})}return N})();const ne=t.p+"media/installPwa-a45d2022.png";var w=t(89324);const D=(N,I,$,V)=>({p1:N,p2:I,p3:$,p4:V}),b=(N,I,$)=>({p1:N,p2:I,p3:$}),c=(N,I)=>({p1:N,p2:I});function a(N,I){1&N&&(r.nrm(0,"span",2),r.nI1(1,"translate"),r.nI1(2,"appLinkify"),r.nI1(3,"translate"),r.nI1(4,"appLinkify"),r.nI1(5,"translate"),r.nI1(6,"appLinkify"),r.nI1(7,"translate"),r.nI1(8,"appLinkify"),r.nI1(9,"translate")),2&N&&r.Y8G("innerHTML",r.i5U(9,21,"_i18n.install3cxAppWithPwa",r.ziG(24,D,r.i5U(2,3,r.bMT(1,1,"_i18n.IosManualUri"),"iOS"),r.i5U(4,8,r.bMT(3,6,"_i18n.AndroidManualUri"),"Android"),r.i5U(6,13,r.bMT(5,11,"_i18n.SoftphoneManualUri"),"Windows"),r.i5U(8,18,r.bMT(7,16,"_i18n.PWAManualUri"),"PWA"))),r.npT)}function W(N,I){1&N&&(r.nrm(0,"span",2),r.nI1(1,"translate"),r.nI1(2,"appLinkify"),r.nI1(3,"translate"),r.nI1(4,"appLinkify"),r.nI1(5,"translate"),r.nI1(6,"appLinkify"),r.nI1(7,"translate")),2&N&&r.Y8G("innerHTML",r.i5U(7,16,"_i18n.install3cxApp",r.sMw(19,b,r.i5U(2,3,r.bMT(1,1,"_i18n.IosManualUri"),"iOS"),r.i5U(4,8,r.bMT(3,6,"_i18n.AndroidManualUri"),"Android"),r.i5U(6,13,r.bMT(5,11,"_i18n.SoftphoneManualUri"),"Windows"))),r.npT)}function X(N,I){if(1&N&&r.nVh(0,a,10,29,"span",2)(1,W,8,23,"span",2),2&N){r.XpG();const $=r.r8f(0);r.vxM($?0:1)}}function U(N,I){1&N&&(r.nrm(0,"span",2),r.nI1(1,"translate"),r.nI1(2,"appLinkify"),r.nI1(3,"translate"),r.nI1(4,"appLinkify"),r.nI1(5,"translate")),2&N&&r.Y8G("innerHTML",r.i5U(5,11,"_i18n.Install3CXMobileApps",r.l_i(14,c,r.i5U(2,3,r.bMT(1,1,"_i18n.IosManualUri"),"iOS"),r.i5U(4,8,r.bMT(3,6,"_i18n.AndroidManualUri"),"Android"))),r.npT)}function oe(N,I){if(1&N&&(r.j41(0,"a",4),r.nI1(1,"translate"),r.nrm(2,"img",11),r.k0s()),2&N){const $=r.XpG();r.Y8G("href",r.mNQ(r.bMT(1,3,"_i18n.MsWindowsStoreClientLink")),r.B4B),r.R7$(2),r.Y8G("src",$.getFromMicrosoftStoreIcon,r.B4B)}}
1function H(N,I){if(1&N){const $=r.RV6();r.j41(0,"a",12),r.bIt("click",function(){i.eBV($);const A=r.XpG();return i.Njj(A.installPwa())}),r.nrm(1,"img",13),r.k0s()}if(2&N){const $=r.XpG();r.R7$(),r.Y8G("src",$.installPwaIcon,r.B4B)}}function de(N,I){if(1&N){const $=r.RV6();r.j41(0,"span",14),r.nI1(1,"translate"),r.bIt("click",function(A){i.eBV($);const L=r.XpG();return i.Njj(L.spanClicked(A))}),r.k0s()}2&N&&r.Y8G("innerHTML",r.bMT(1,1,"_i18n.WelcomeProvisionWindows"),r.npT)}let ve=(()=>{class N{appsUtilityService=(0,i.WQX)(w.G);downloadOnAppleStoreImageData=S;getItGooglePlayPlayIcon=Ce;getFromMicrosoftStoreIcon=Ee;installPwaIcon=ne;isWindows=this.appsUtilityService.isWindows;userId;showWindows=(0,E.CGW)();closeModal=(0,E.CGW)();spanClicked($){$.target instanceof HTMLAnchorElement&&($.preventDefault(),this.showWindows.emit(!0))}installPwa(){this.appsUtilityService.firePwaInstallation(),this.closeModal.emit()}static \u0275fac=function(V){return new(V||N)};static \u0275cmp=r.VBU({type:N,selectors:[["app-welcome-dialog-content"]],inputs:{userId:"userId"},outputs:{showWindows:"showWindows",closeModal:"closeModal"},decls:23,vars:19,consts:[[1,"d-flex","flex-row"],[1,"ps-2"],[3,"innerHTML"],[1,"ps-2","mb-3","d-flex","gap-2","flex-wrap","justify-content-center"],["target","_blank",3,"href"],["height","30","alt","GooglePlay",3,"src"],["height","30","alt","AppleStore",3,"src"],["data-qa","installPWA",1,"link"],[1,"ps-2","mb-2"],[1,"d-flex","flex-column","align-items-center"],[3,"userId"],["height","30","alt","MsWindowsStore",3,"src"],["data-qa","installPWA",1,"link",3,"click"],["height","30","alt","InstallPwaApp",3,"src"],[3,"click","innerHTML"]],template:function(V,A){if(1&V&&(r.SS7(0),r.j41(1,"div",0)(2,"div")(3,"p",1),r.EFF(4,"1. "),r.nVh(5,X,2,1)(6,U,6,17,"span",2),r.k0s(),r.j41(7,"div",3)(8,"a",4),r.nI1(9,"translate"),r.nrm(10,"img",5),r.k0s(),r.j41(11,"a",4),r.nI1(12,"translate"),r.nrm(13,"img",6),r.k0s(),r.nVh(14,oe,3,5,"a",4),r.nVh(15,H,2,1,"a",7),r.k0s(),r.j41(16,"p",8),r.EFF(17," 2. "),r.nrm(18,"span",2),r.nI1(19,"translate"),r.nVh(20,de,2,3,"span",2),r.k0s(),r.j41(21,"div",9),r.nrm(22,"app-provision-qrcode",10),r.k0s()()()),2&V){const L=r.bH3(A.appsUtilityService.isProgressiveWebAppVisible());r.R7$(5),r.vxM(A.isWindows?5:6),r.R7$(3),r.Y8G("href",r.mNQ(r.bMT(9,13,"_i18n.GooglePlayStoreClientLink")),r.B4B),r.R7$(2),r.Y8G("src",A.getItGooglePlayPlayIcon,r.B4B),r.R7$(),r.Y8G("href",r.mNQ(r.bMT(12,15,"_i18n.AppleStoreClientLink")),r.B4B),r.R7$(2),r.Y8G("src",A.downloadOnAppleStoreImageData,r.B4B),r.R7$(),r.vxM(A.isWindows?14:-1),r.R7$(),r.vxM(L?15:-1),r.R7$(3),r.Y8G("innerHTML",r.bMT(19,17,"_i18n.WelcomeProvisionAndroidAndIos"),r.npT),r.R7$(2),r.vxM(A.isWindows?20:-1),r.R7$(2),r.Y8G("userId",A.userId)}},dependencies:[Q,o.D9,B.F],styles:[".android-phone[_ngcontent-%COMP%]{width:190px}a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:4px;overflow:hidden}"],changeDetection:0})}return N})();var ae=t(58689);function ue(N,I){if(1&N&&r.nrm(0,"app-ios-dialog-content",4),2&N){const $=r.XpG();r.Y8G("userId",$.userId)}}function ee(N,I){if(1&N&&r.nrm(0,"app-android-dialog-content",4),2&N){const $=r.XpG();r.Y8G("userId",$.userId)}}function k(N,I){if(1&N&&r.nrm(0,"app-windows-dialog-content",4),2&N){const $=r.XpG();r.Y8G("userId",$.userId)}}function te(N,I){if(1&N){const $=r.RV6();r.j41(0,"app-welcome-dialog-content",5),r.bIt("showWindows",function(){i.eBV($);const A=r.XpG();return i.Njj(A.changeType("Windows"))})("closeModal",function(){i.eBV($),r.XpG();const A=r.sdS(1);return i.Njj(A.cancel())}),r.k0s()}if(2&N){const $=r.XpG();r.Y8G("userId",$.userId)}}let Z=(()=>{class N extends y.m{isNewDesign=(0,i.WQX)(ae.T);buttons=O.P.Ok;app="All";userId;changeType($){this.app=$}static \u0275fac=(()=>{let $;return function(A){return($||($=r.xGo(N)))(A||N)}})();static \u0275cmp=r.VBU({type:N,selectors:[["app-promote-apps-dialog"]],inputs:{app:"app",userId:"userId"},features:[r.Vt3],decls:13,vars:9,consts:[["dialog",""],[3,"buttons","newDesign"],["dialog-header",""],[1,"fw-bold"],[3,"userId"],[3,"showWindows","closeModal","userId"]],template:function(V,A){if(1&V&&(r.j41(0,"app-modal-dialog",1,0)(2,"div",2)(3,"h4",3),r.EFF(4),r.nI1(5,"translate"),r.k0s(),r.j41(6,"div"),r.EFF(7),r.nI1(8,"translate"),r.k0s()(),r.nVh(9,ue,1,1,"app-ios-dialog-content",4)(10,ee,1,1,"app-android-dialog-content",4)(11,k,1,1,"app-windows-dialog-content",4)(12,te,1,1,"app-welcome-dialog-content",4),r.k0s()),2&V){let L;r.Y8G("buttons",A.buttons)("newDesign",A.isNewDesign),r.R7$(4),r.JRh(r.bMT(5,5,"_i18n.getThe3CXApp")),r.R7$(3),r.JRh(r.bMT(8,7,"_i18n.3cxAppVoiceVideoCall")),r.R7$(2),r.vxM("Ios"===(L=A.app)?9:"Android"===L?10:"Windows"===L?11:12)}},dependencies:[v.p,ie,ye,fe,ve,o.D9],styles:["@media(min-width:576px){.medium-width[_nghost-%COMP%]{--bs-modal-width: 560px}.extended-width[_nghost-%COMP%]{--bs-modal-width: 620px}}"]})}return N})()},5739(be,J,t){t.d(J,{b:()=>O});var i=t(35547),y=t(85802);let O=(()=>{class v{static \u0275fac=function(x){return new(x||v)};static \u0275cmp=i.VBU({type:v,selectors:[["app-exclamation-circle-solid-icon"],["","app-exclamation-circle-solid-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 512 512"],["d","M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346 7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418
1-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"]],template:function(x,l){1&x&&(y.qSk(),i.rj2(0,"svg",0),i.Hgh(1,"path",1),i.eux())},encapsulation:2})}return v})()},51280(be,J,t){t.d(J,{W:()=>ne});var i=t(85802),y=t(17705),O=t(25558),v=t(84572),S=t(96354),E=t(96049),x=t(3013),l=t(50644),C=t(72510),u=t(98352),s=t(56998),o=t(89417),p=t(47548),M=t(68018),m=t(49769),h=t(9852),R=t(66179),f=t(89079),T=t(58369),_=t(1211),r=t(50560);const Q=/^\+?[0-9]{2,16}$/,B=/^\*?\+?[0-9]{2,16}\*?$/;function K(w,D){return w.length>=D.From&&w.length<=D.To&&/^[0-9]+$/.test(w)}function ie(w,D){return!!w.From&&(null==w.To?D.enableWildcards?D.enablePhones?B.test(w.From):K(w.From,D.enl)||w.From.length<=D.enl.From&&/^\*?[0-9]+\*?$/.test(w.From):D.enablePhones?Q.test(w.From):K(w.From,D.enl):!(w.To.length!==w.From.length||w.From>=w.To)&&(D.enablePhones?Q.test(w.From)&&Q.test(w.To):K(w.From,D.enl)&&K(w.To,D.enl)))}var re=t(35547);const ye=()=>({maxlength:"50"});function Ee(w,D){if(1&w&&(re.j41(0,"b"),re.EFF(1),re.nI1(2,"translate"),re.k0s(),re.EFF(3)),2&w){const b=D.searchTerm;re.R7$(),re.SpI("",re.bMT(2,2,"_i18n.AddNumber"),":"),re.R7$(2),re.SpI(" ",b," ")}}function G(w,D){if(1&w){const b=re.RV6();re.j41(0,"span",4),re.bIt("click",function(){const a=i.eBV(b);return i.Njj((0,a.clear)(a.item))}),re.EFF(1,"\xd7"),re.k0s(),re.j41(2,"span",5),re.EFF(3),re.k0s()}if(2&w){const b=D.item,c=re.XpG();re.R7$(2),re.AVh("bg-red",!c.validRule(b.number)),re.R7$(),re.SpI(" ",b.number," ")}}function he(w,D){if(1&w&&(re.j41(0,"div",6),re.nrm(1,"span",7),re.nI1(2,"lforfl"),re.nI1(3,"async"),re.nrm(4,"span",8),re.k0s()),2&w){const b=D.item;re.R7$(),re.Y8G("truncatedText",re.bMT(3,5,re.i5U(2,2,b.contact,b.name))),re.R7$(3),re.Y8G("truncatedText",b.number)}}const q=new E.o({request:new _.CzA({Sources:[_.SjL.CS_Extension,...E.o.allCompanySources,...E.o.allPersonalSources],SearchByMask:E.o.fullSearch,GroupBy:!0}),resultFilter:w=>w.type===T.i.internalNumber||w.type===T.i.externalNumber}),fe=new E.o({request:new _.CzA({Sources:[_.SjL.CS_Extension],SearchByMask:E.o.fullSearch,GroupBy:!0}),resultFilter:w=>w.type===T.i.internalNumber});let ne=(()=>{class w extends u.z{form=new o.MJ([]);runtimeSearch=(0,i.WQX)(x.B);enableWildcards=(0,y.hFB)();enl=y.hFB.required();searchType=(0,y.hFB)();nullIsIndeterminate=(0,y.hFB)(!1);indeterminatePlaceholder=(0,y.hFB)("_i18n.LeaveUnchanged");suggestions$=(0,f.br)(this.searchType).pipe((0,O.n)(b=>"allPersons"===b?(0,v.z)([this.runtimeSearch.getContacts(q),this.runtimeSearch.getCrmContacts(q)]).pipe((0,S.T)(([c,a])=>c.concat(a.contacts))):this.runtimeSearch.getContacts(fe)),(0,S.T)(b=>b.map(c=>({contact:c.contact,name:c.name,number:(0,R.C)(c.number)})).filter(c=>this.validRule(c.number))),(0,l.H9)());checkTag=b=>this.validRule(b)?{number:b}:null;writeValue(b){super.writeValue(b),this.form.setValue(b?.split(",").filter(c=>c)??null,{emitEvent:!1})}validateParams(){return{enl:this.enl(),enablePhones:"allPersons"===this.searchType(),enableWildcards:this.enableWildcards()}}validate(b){return(w=>({value:D})=>{const b=(0,r.vw)((0,r.Li)(D).filter(c=>!ie(c,w)));return b.length?{invalidDnRanges:b}:null})(this.validateParams())(b)}validRule(b){return ie((0,r.UU)(b),this.validateParams())}setDisabledState(b){super.setDisabledState(b),(0,s.TZ)(this.form,!b)}ngOnInit(){this.syncControlState(this.form),this.form.valueChanges.pipe((0,f.pQ)(this.destroyRef)).subscribe(b=>{this.onChange(b?.join(",")??"")})}static \u0275fac=(()=>{let b;return function(a){return(b||(b=re.xGo(w)))(a||w)}})();static \u0275cmp=re.VBU({type:w,selectors:[["app-phone-select"]],inputs:{enableWildcards:[1,"enableWildcards"],enl:[1,"enl"],searchType:[1,"searchType"],nullIsIndeterminate:[1,"nullIsIndeterminate"],indeterminatePlaceholder:[1,"indeterminatePlaceholder"]},features:[re.Jv_([x.B,{provide:o.kq,multi:!0,useExisting:w},{provide:o.cz,multi:!0,useExisting:w}]),re.Vt3],decls:7,vars:19,consts:[["bindLabel","number","bindValue","number","data-qa","select",3,"keydown.enter","items","placeholder","closeOnSelect","typeToSearchText","addTag","hideSelected","multiple","typeahead","minTermLength","inputAttrs","formControl"],["ng-tag-tmp",""],["ng-label-tmp",""],["ng-option-tmp",""],["data-qa","remove-choice","aria-hidden","true",1,"ng-value-icon","left",3,"click"],[1,"ng-value-label"],[1,"d-flex","align-items-center","gap-1"],["data-qa","item-name",1,"text-sm",3,"truncatedText"],["data-qa","item-number",1,"text-xs",3,"truncatedText"]],template:function(c,a){1&c&&(re.j41(0,"ng-select",0),re.nI1(1,"translate"),re.nI1(2,"async"),re.nI1(3,"translate"),re.bIt("keydown.enter",function(X){return X.stopPropagation()}),re.DNE(4,Ee,4,4,"ng-template",1)(5,G,4,3,"ng-template",2)(6,he,5,7,"ng-template",3),re.k0s()),2&c&&re.Y8G("typeToSearchText",re.VkB("",re.bMT(1,12,"_i18n.Search"),"..."))("items",re.bMT(2,14,a.suggestions$))("placeholder",a.nullIsIndeterminate()&&null===a.value&&!a.changed?re.bMT(3,16,a.indeterminatePlaceholder()):"")("closeOnSelect",!0)("addTag",a.
1checkTag)("hideSelected",!0)("multiple",!0)("typeahead",a.runtimeSearch.search$)("minTermLength",2)("inputAttrs",re.lJ4(18,ye))("formControl",a.form)},dependencies:[C.vr,o.X1,o.BC,o.l_,o.YN,C.Uq,p.N,C.BW,C.ZZ,M.D9,m.Jj,h._],encapsulation:2,changeDetection:0})}return w})()},59453(be,J,t){t.d(J,{A:()=>y});var i=t(71985);function y(O){return new i.c(v=>{const S=new FileReader;S.onerror=E=>v.error(E),S.onload=E=>{v.next(S.result),v.complete()},S.readAsDataURL(O)})}},6130(be,J,t){t.d(J,{C:()=>x});var i=t(85802),y=t(68018),O=t(25558),v=t(16444),S=t(35547);function E(l){const C=l>=2?"0".repeat(l-2):"";return`1${C}0,1${C}3-1${C}5`}let x=(()=>{class l{myPhoneService=(0,i.WQX)(v.gx);translateService=(0,i.WQX)(y.c$);transform(u){return this.myPhoneService.myPhoneSession.pipe((0,O.n)(s=>this.translateService.stream(u,{p1:E(s.systemParameters.ENL.From)})))}static \u0275fac=function(s){return new(s||l)};static \u0275pipe=S.EJ8({name:"enlExample",type:l,pure:!0})}return l})()},42974(be,J,t){t.d(J,{t:()=>O});var i=t(49629),y=t(35547);let O=(()=>{class v{transform(E){return i.A.getProfileCssClass(E)}static \u0275fac=function(x){return new(x||v)};static \u0275pipe=y.EJ8({name:"appProfileCssClass",type:v,pure:!0})}return v})()},65164(be,J,t){t.d(J,{F:()=>l});var i=t(85802),y=t(68018),O=t(2122),v=t(84572),S=t(7673),E=t(96354),x=t(35547);let l=(()=>{class C{translate=(0,i.WQX)(y.c$);profileService=(0,i.WQX)(O._);transform(s,o=!0){return s?"Default"===s?this.translate.stream("_i18n.Voicemail_GreetingsDefaultTitle"):(0,v.z)([this.profileService.profileDisplayNames$,o?this.profileService.forwardingAndExceptionsProfiles$:(0,S.of)([])]).pipe((0,E.T)(([p,M])=>M.find(m=>m.Name===s)?.CustomName||p[s]||s)):(0,S.of)("")}static \u0275fac=function(o){return new(o||C)};static \u0275pipe=x.EJ8({name:"profileNameConv",type:C,pure:!0})}return C})()},72214(be,J,t){t.d(J,{c:()=>v});var i=t(59882),y=t(5964),O=t(96354);function v(S){return S.events.pipe((0,O.T)(E=>E instanceof i.wF?E:E instanceof i.OY&&E.routerEvent instanceof i.wF?E.routerEvent:null),(0,y.p)(Boolean))}},32934(be,J,t){t.d(J,{h:()=>v});var i=t(17705),y=t(32271),O=t(35547);let v=(()=>{class S{count=i.hFB.required();max=(0,i.hFB)(99);badge=(0,y.EW)(()=>{const x=this.count(),l=this.max();return x?!l||x<=l?x.toString():`${l}+`:""});static \u0275fac=function(l){return new(l||S)};static \u0275cmp=O.VBU({type:S,selectors:[["app-counter-badge"]],hostAttrs:[1,"badge"],inputs:{count:[1,"count"],max:[1,"max"]},decls:1,vars:1,template:function(l,C){1&l&&O.EFF(0),2&l&&O.JRh(C.badge())},styles:["[_nghost-%COMP%]{--size: var(--counter-badge-size, 16px);display:inline-block;line-height:var(--size);min-width:var(--size);padding:0 var(--spacer-xs)}[_nghost-%COMP%]:empty{display:none}.new-design [_nghost-%COMP%]{border-radius:calc(var(--size) / 2)}"],changeDetection:0})}return S})()},67895(be,J,t){t.d(J,{$O:()=>v,GD:()=>l,MI:()=>x,NV:()=>S,Pw:()=>y});var i=t(43462),y=function(C){return C[C.BLF=0]="BLF",C[C.SpeedDial=1]="SpeedDial",C[C.CustomSpeedDial=2]="CustomSpeedDial",C[C.SharedParking=3]="SharedParking",C[C.QueueLogin=4]="QueueLogin",C[C.ProfileStatus=5]="ProfileStatus",C[C.Line=6]="Line",C[C.None=7]="None",C}(y||{});const O=[i.SB.Available,i.SB.Away,i.SB.OutOfOffice,i.SB.Custom1,i.SB.Custom2];class v{peer=null;type=y.None;value="";firstName="";lastName="";constructor(u){Object.assign(this,u)}}const S=200;function E(C){const u=parseInt(C.attributes.getNamedItem("BLFNo").value,10),s=C.attributes.getNamedItem("ID").value,o=C.textContent||"",p=new v({type:parseInt(C.attributes.getNamedItem("BLFTypeID").value,10)});switch(p.type){case y.SharedParking:case y.BLF:case y.SpeedDial:p.peer=o?{Number:o,Id:parseInt(s,10)}:null,p.value=o;break;case y.CustomSpeedDial:if(o){const[M,m="",h=""]=o.split("\n");Object.assign(p,{value:M,firstName:m,lastName:h})}break;case y.QueueLogin:p.value=s;break;case y.ProfileStatus:p.value=O[parseInt(o,10)]||""}return[p,u]}function x(C){if(!C)return[];const u=(new DOMParser).parseFromString(C,"text/xml");if(u.querySelector("parsererror"))return[];const o=u.getElementsByTagName("BLF"),p=[];for(let M=0;M<o.length;++M)try{const[m,h]=E(o[M]);if(h>S)continue;for(;h>p.length+1;)p.push(new v);h<p.length+1?p[h-1]=m:p.push(m)}catch{}return p}function l(C){const u=document.implementation.createDocument(null,"PhoneDevice",null),s=u.createElement("BLFS");
1return C.forEach((p,M)=>{if(null==p.type||p.type===y.None)return;const m=M+1,h=u.createElement("BLF");let R="-1",f="";switch(p.type){case y.SharedParking:case y.BLF:case y.SpeedDial:R=String(p.peer?.Id??-1),f=p.peer?.Number||"";break;case y.CustomSpeedDial:f=[p.value||"",p.firstName||"",p.lastName||""].join("\n").trim();break;case y.QueueLogin:R=p.value??"-1",f="DEFINED BY ID";break;case y.ProfileStatus:f=String(Math.max(O.indexOf(p.value),0));break;case null:return}h.setAttribute("ID",R),h.textContent=f,h.setAttribute("BLFNo",""+m),h.setAttribute("BLFType",y[p.type]),h.setAttribute("BLFTypeID",""+p.type),s.appendChild(h)}),u.children[0].appendChild(s),(new XMLSerializer).serializeToString(u)}},12834(be,J,t){t.d(J,{W:()=>v});var i=t(8516),y=t(68018),O=t(35547);let v=(()=>{class S{XIcon=i.uv5;static \u0275fac=function(l){return new(l||S)};static \u0275cmp=O.VBU({type:S,selectors:[["app-button-close-x"]],decls:3,vars:4,consts:[["type","button","data-qa","button-close-x","aria-label","Close",1,"btn","btn-plain-sm","btn-icon",3,"title"],[3,"img"]],template:function(l,C){1&l&&(O.j41(0,"button",0),O.nI1(1,"translate"),O.nrm(2,"lucide-icon",1),O.k0s()),2&l&&(O.Y8G("title",O.bMT(1,2,"_i18n.Close")),O.R7$(2),O.Y8G("img",C.XIcon))},dependencies:[i.flO,i.WGl,y.D9],styles:[".btn[_ngcontent-%COMP%]{background:none;border:none;--svg-size: var(--svg-size-md);&:not(:hover):not(:active){opacity:.6}}"],changeDetection:0})}return S})()},94343(be,J,t){t.d(J,{A:()=>v});var i=t(31842),y=t(35547);const O={[i.z6.SameAsAllCalls]:"_i18n.SameAsAllCalls",[i.z6.MyVoicemail]:"_i18n.V
1oiceMail",[i.z6.Extension]:"_i18n.ExtNumber",[i.z6.MyMobile]:"_i18n.MyMobile",[i.z6.External]:"_i18n.ExternalNum",[i.z6.SendBusy]:"_i18n.SendBusy",[i.z6.PlayAnnouncement]:"_i18n.PlayAnnouncementAndEndCall",[i.z6.SystemExtension]:"_i18n.SystemExtension"};let v=(()=>{class S{transform(x){return x&&O[x]||""}static \u0275fac=function(l){return new(l||S)};static \u0275pipe=y.EJ8({name:"appForwardDestinationType",type:S,pure:!0})}return S})()},65133(be,J,t){t.d(J,{b:()=>te});var i=t(17705),y=t(85802),O=t(32271),v=t(89417),S=t(92771),E=t(57786),x=t(13798),l=t(88141),C=t(5964),u=t(96354),s=t(25558),o=t(44652),p=t(31842),M=t(71747),m=t(56998),h=t(98352),R=t(8876),f=t(19781),T=t(84460),_=t(95604),r=t(59053),Q=t(61851),B=t(94343),K=t(1211),ie=t(89079),Ce=t(72510),re=t(24708),ye=t(68018),Ee=t(49769),G=t(35547);const he=[[["field-checkbox"]]],q=["field-checkbox"];function fe(Z,N){if(1&Z&&(G.j41(0,"ng-option",6),G.EFF(1),G.nI1(2,"appForwardDestinationType"),G.nI1(3,"translate"),G.k0s()),2&Z){const I=N.$implicit;G.Y8G("value",I),G.R7$(),G.JRh(G.bMT(3,4,G.bMT(2,2,I)))}}function ne(Z,N){1&Z&&G.eu8(0)}function w(Z,N){if(1&Z&&(G.nrm(0,"app-dn-select",12),G.DNE(1,ne,1,0,"ng-container",13)),2&Z){const I=G.XpG(),$=G.sdS(15);G.Y8G("searchDnTypes",I.searchContactExtensions)("nullIsIndeterminate",I.indeterminate)("indeterminatePlaceholder",I.indeterminatePlaceholder)("isForwarding",!0),G.R7$(),G.Y8G("ngTemplateOutlet",$)}}function D(Z,N){1&Z&&G.eu8(0)}function b(Z,N){if(1&Z&&G.DNE(0,D,1,0,"ng-container",13),2&Z){G.XpG(2);const I=G.sdS(15);G.Y8G("ngTemplateOutlet",I)}}function c(Z,N){if(1&Z&&(G.nrm(0,"app-dn-select",14),G.nVh(1,b,1,1,"ng-container")),2&Z){const I=G.XpG();G.Y8G("searchDnTypes",I.searchSystemExtensions)("nullIsIndeterminate",I.indeterminate)("indeterminatePlaceholder",I.indeterminatePlaceholder)("isForwarding",!0),G.R7$(),G.vxM(I.isSystemContactWithVoicemail?1:-1)}}function a(Z,N){1&Z&&(G.EFF(0),G.nI1(1,"translate")),2&Z&&G.JRh(G.bMT(1,1,"_i18n.InvalidDirectNumber"))}function W(Z,N){}function X(Z,N){1&Z&&G.eu8(0)}function U(Z,N){if(1&Z&&(G.j41(0,"field-input",15)(1,"val-errors",16),G.DNE(2,a,2,3,"ng-template",17)(3,W,0,0,"ng-template",9),G.k0s()(),G.DNE(4,X,1,0,"ng-container",13)),2&Z){const I=G.XpG(),$=G.sdS(13);G.Y8G("maxlength",50)("nullIsIndeterminate",I.indeterminate)("indeterminatePlaceholder",I.indeterminatePlaceholder),G.R7$(4),G.Y8G("ngTemplateOutlet",$)}}function oe(Z,N){1&Z&&G.eu8(0)}function H(Z,N){if(1&Z&&G.DNE(0,oe,1,0,"ng-container",13),2&Z){G.XpG();const I=G.sdS(13);G.Y8G("ngTemplateOutlet",I)}}function de(Z,N){if(1&Z&&G.nrm(0,"field-checkbox",19),2&Z){const I=G.XpG(2);G.Y8G("nullIsIndeterminate",I.indeterminate)}}function ve(Z,N){if(1&Z&&(G.nrm(0,"field-checkbox",18),G.nVh(1,de,1,1,"field-checkbox",19)),2&Z){const I=G.XpG();G.Y8G("nullIsIndeterminate",I.indeterminate),G.R7$(),G.vxM(I.enableUse302?1:-1)}}function ae(Z,N){if(1&Z&&G.nrm(0,"field-checkbox",20),2&Z){const I=G.XpG();G.Y8G("nullIsIndeterminate",I.indeterminate)}}function ue(Z,N){}function ee(Z,N){1&Z&&(G.EFF(0),G.nI1(1,"translate")),2&Z&&G.JRh(G.bMT(1,1,"_i18n.ForwardingToEmptyMyMobile"))}function k(Z,N){1&Z&&(G.EFF(0),G.nI1(1,"translate")),2&Z&&G.JRh(G.bMT(1,1,"_i18n.ForwardingToInvalidMyMobile"))}let te=(()=>{class Z extends h.z{contactSearcher=(0,y.WQX)(o.D);destroy$=(0,y.WQX)(y.abz);typeSelectId=(0,m.bn)("forward-destination-type");label;showSameAsAllCalls;isMcmMode;extensionInfo=i.hFB.required();enableUse302;showValidation;partialEdit=!1;indeterminatePlaceholder="_i18n.LeaveUnchanged";writtenValue$=new S.m(1);emptyMobile=(0,O.EW)(()=>!this.extensionInfo().MobileNumber);emptyMobile$=(0,ie.br)(this.emptyMobile);searchContactExtensions=[M.J.Extension];searchSystemExtensions=[M.J.Queue,M.J.RingGroup,M.J.Ivr,M.J.SpecialMenu,M.J.Conference,M.J.RoutePoint,M.J.Parking];ForwardDestinationViewType=p.z6;form=new v.gE({type:new v.MJ({value:null,disabled:!0},{validators:[I=>I.value===p.z6.MyMobile&&this.emptyMobile()?{myMobileIsForwardedToAndEmpty:!0}:null]}),number:new v.MJ({value:null,disabled:!0},r.sy),extensionContact:new v.MJ({value:null,disabled:!0}),systemContact:new v.MJ({value:null,disabled:!0}),rebound:new v.MJ(null),use302:new v.MJ(null),voicemail:new v.MJ(null)},I=>{const{controls:$,value:V}=I,A=!this.indeterminate;return(0,r.vT)($.type,{required:!0},A&&null==V.type),(0,r.vT)($.extensionContact,{required:!0},A&&null==V.extensionContact),(0,r.vT)($.systemContact,{required:!0},A&&null==V.systemContact),(0,r.vT)($.number,{required:!0},A&&null==V.number||""===V.number),V.rebound&&V.use302?{invalidMiddleState:!0}:null});get f(){return this.form.controls}get indeterminate(){return this.partialEdit&&!this.changed}isIndeterminate(I){return this.indeterminate&&null==I}get destinationTypes(){return[...this.showSameAsAllCalls?[p.z6.SameAsAllCalls]:[],...this.isMcmMode?[]:[p.z6.MyVoicemail],p.z6.Extension,...this.isMcmMode?[]:[p.z6.MyMobile,p.z6.Exter
1nal],p.z6.SystemExtension,p.z6.SendBusy,...this.isMcmMode?[p.z6.PlayAnnouncement]:[]]}get isSystemContactWithVoicemail(){return(0,p._D)(this.form.value.systemContact)}ngOnInit(){(0,E.h)(this.f.type.valueChanges.pipe((0,l.M)(()=>this.updateControlsEnabledState()),(0,u.T)(I=>{const{type:$,...V}=(0,p.ZG)({type:I});return V})),this.f.rebound.valueChanges.pipe((0,C.p)(Boolean),(0,u.T)(()=>({use302:!1}))),this.f.use302.valueChanges.pipe((0,C.p)(Boolean),(0,u.T)(()=>({rebound:!1}))),this.f.systemContact.valueChanges.pipe((0,C.p)(I=>!(0,p._D)(I)),(0,u.T)(()=>({voicemail:!1})))).pipe((0,ie.pQ)(this.destroy$)).subscribe(I=>{this.form.patchValue(I,{emitEvent:!1}),this.cd.markForCheck()}),this.writtenValue$.pipe((0,s.n)(I=>(0,p.fk)(this.contactSearcher,I,this.extensionInfo())),(0,ie.pQ)(this.destroy$)).subscribe(I=>{this.form.patchValue(I,{emitEvent:!1}),(0,m.TZ)(this.f.type,!0),this.updateControlsEnabledState(),this.form.invalid&&this.form.updateValueAndValidity(),this.cd.markForCheck()}),this.form.valueChanges.pipe((0,x.Z)(0),(0,ie.pQ)(this.destroy$)).subscribe(()=>{this.valueChanged((0,p.tf)(this.form.value,this.extensionInfo()))}),this.emptyMobile$.pipe((0,C.p)(I=>this.f.type.value===p.z6.MyMobile&&I!==this.f.type.hasError("myMobileIsForwardedToAndEmpty")),(0,ie.pQ)(this.destroy$)).subscribe(I=>{(0,r.vT)(this.f.type,{myMobileIsForwardedToAndEmpty:!0},I),this.form.updateValueAndValidity()}),this.syncControlState(this.form)}writeValue(I){super.writeValue(I??(this.partialEdit?null:{forwardDestination:{FwdType:K.Cvu.FD_Disconnect}})),this.writtenValue$.next(this.value)}updateControlsEnabledState(){const I=this.f.type.value,{extensionContact:$,systemContact:V,number:A}=this.f;(0,m.TZ)($,I===p.z6.Extension),(0,m.TZ)(V,I===p.z6.SystemExtension),(0,m.TZ)(A,I===p.z6.External)}validate=this.createComponentValidator(this.form);static \u0275fac=(()=>{let I;return function(V){return(I||(I=G.xGo(Z)))(V||Z)}})();static \u0275cmp=G.VBU({type:Z,selectors:[["app-forward-destination"]],inputs:{label:"label",showSameAsAllCalls:"showSameAsAllCalls",isMcmMode:"isMcmMode",extensionInfo:[1,"extensionInfo"],enableUse302:"enableUse302",showValidation:"showValidation",partialEdit:"partialEdit",indeterminatePlaceholder:"indeterminatePlaceholder"},features:[G.Jv_([{provide:v.kq,multi:!0,useExisting:Z},{provide:v.cz,multi:!0,useExisting:Z}]),G.Vt3],ngContentSelectors:q,decls:21,vars:10,consts:[["myMobileOrExternal",""],["voicemail",""],[3,"formGroup","label","labelFor"],[1,"row","row-gap-2"],[1,"col-md-6"],["formControlName","type","data-qa","type-select",3,"searchable","clearable","id","placeholder"],[3,"value"],[1,"col-md-6","forwarding-options"],["controlName","type","data-qa","type-validation"],["valError","required"],["valError","myMobileIsForwardedToAndEmpty"],["valError","myMobileIsForwardedToAndInvalid"],["formControlName","extensionContact","data-qa","extension-contact",3,"searchDnTypes","nullIsIndeterminate","indeterminatePlaceholder","isForwarding"],[4,"ngTemplateOutlet"],["formControlName","systemContact","data-qa","system-contact",3,"searchDnTypes","nullIsIndeterminate","indeterminatePlaceholder","isForwarding"],["formControlName","number","placeholder","_i18n.ExternalNum","data-qa","external-number",3,"maxlength","nullIsIndeterminate","indeterminatePlaceholder"],["controlName","number"],["valError","invalidDirectNumber"],["data-qa","checkbox-rebound","formControlName","rebound","label","_i18n.Rebound",3,"nullIsIndeterminate"],["data-qa","checkbox-use302","formControlName","use302","label","_i18n.Use302",3,"nullIsIndeterminate"],["data-qa","checkbox-voicemail","formControlName","voicemail","label","_i18n.VoiceMail",3,"nullIsIndeterminate"]],template:function($,V){if(1&$&&(G.NAR(he),G.j41(0,"field-wrapper",2)(1,"div",3)(2,"div",4)(3,"ng-select",5),G.nI1(4,"translate"),G.Z7z(5,fe,4,6,"ng-option",6,G.fX1),G.k0s()(),G.j41(7,"div",7),G.nVh(8,w,2,5)(9,c,2,5)(10,U,5,4)(11,H,1,1,"ng-container"),G.DNE(12,ve,2,2,"ng-template",null,0,G.C5r)(14,ae,1,1,"ng-template",null,1,G.C5r),G.SdG(16),G.k0s()(),G.j41(17,"val-errors",8),G.DNE(18,ue,0,0,"ng-template",9)(19,ee,2,3,"ng-template",10)(20,k,2,3,"ng-template",11),G.k0s()()),2&$){let A;G.Y8G("formGroup",V.form)("label",V.label)("labelFor",V.typeSelectId),G.R7$(3),G.Y8G("searchable",!1)("clearable",!1)("id",V.typeSelectId)("placeholder",V.isIndeterminate(V.f.type.value)?G.bMT(4,8,V.indeterminatePlaceholder):""),G.R7$(2),G.Dyx(V.destinationTypes),G.R7$(3),G.vxM((A=V.form.value.type)===V.ForwardDestinationViewType.Extension?8:A===V.ForwardDestinationViewType.SystemExtension?9:A===V.ForwardDestinationViewType.External?10:A===V.ForwardDestinationViewType.MyMobile?11:-1)}},dependencies:[Ee.T3,v.YN,v.BC,v.cb,v.tU,v.X1,v.j4,v.JD,f.t,T.m,_.z,R.c,Q.A,Ce.vr,re.N4,re.IH,re.VI,Ce.xt,B.A,ye.D9],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}}.forwarding-options[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--spacer-s)}.forwarding-options[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin:0}@media(min-width:768px){.forwarding-options[_ngcontent-%COMP%] field-checkbox:first-child{margin-top:var(--spacer-s)}}"],changeDetection:0})}return Z})()},31842(be,J,t){t.d(J,{Mo:()=>p,ZG:()=>s,_D:()=>R,fk:()=>M,tf:()=>h,z6:()=>x});var i=t(68739),y=t(1211),O=t(7673),v=t(96354),S=t(46062),E=t(71747),x=function(f){return f[f.SameAsAllCalls=1]="SameAsAllCalls",f[f.MyVoicemail=2]="MyVoicemail",f[f.Extension=3]="Extension",f[f.MyMobile=4]="MyMobile",f[f.External=5]="Exter
1nal",f[f.SystemExtension=6]="SystemExtension",f[f.SendBusy=7]="SendBusy",f[f.PlayAnnouncement=8]="PlayAnnouncement",f}(x||{});class l{type=null;number="";extensionContact=null;systemContact=null;rebound=!1;use302=!1;voicemail=!1;constructor(T){Object.assign(this,T)}}function C(f){switch(f){case y.Jhl.None:return E.J.None;case y.Jhl.Extension:return E.J.Extension;case y.Jhl.Queue:return E.J.Queue;case y.Jhl.RingGroup:return E.J.RingGroup;case y.Jhl.IVR:return E.J.Ivr;case y.Jhl.Fax:return E.J.Fax;case y.Jhl.Conference:return E.J.Conference;case y.Jhl.Parking:return E.J.Parking;case y.Jhl.ExternalLine:return E.J.ExternalLine;case y.Jhl.SpecialMenu:return E.J.SpecialMenu;case y.Jhl.Service:return E.J.RoutePoint;default:throw new Error(`DnType ${f} conversion to PbxPeerType is not supported`)}}function u(f){return f?{Tags:f.tags,Name:f.firstNameLastName,Number:f.nativeExtensionNumber,Type:C(f.dnType||y.Jhl.Extension)}:null}function s({extensionContact:f,systemContact:T,..._}){return{type:null,number:"",rebound:!1,use302:!1,voicemail:!1,..._,extensionContact:u(f),systemContact:u(T)}}function p(f,T,_){if(!T)return(0,O.of)(new l({}));if(T.sameAsAllCalls)return(0,O.of)(new l({type:x.SameAsAllCalls}));if(T.playAnnouncement)return(0,O.of)(new l({type:x.PlayAnnouncement}));const r=T.forwardDestination;if(!r)return(0,O.of)(new l({}));switch(r.FwdType){case y.Cvu.FD_Disconnect:return(0,O.of)(new l({type:x.SendBusy}));case y.Cvu.FD_VoiceMail:case y.Cvu.FD_Internal:if(r.Number){const Q=r.FwdType===y.Cvu.FD_VoiceMail;return Q&&_.Number===r.Number?(0,O.of)(new l({type:x.MyVoicemail,voicemail:!0})):function o(f,T,_){return T.requestContactByNumber(f.Number).pipe((0,v.T)(r=>new l(r&&r.type===S.eE.SystemExtension?{type:x.SystemExtension,systemContact:r,voicemail:_}:{type:x.Extension,extensionContact:r&&!r.isDummy?r:new i.KA("-1",S.eE.Extension,S.Ij,{nativeExtensionNumber:f.Number,tags:f.Tags,lastNameFirstName:f.PeerName??"",firstNameLastName:f.PeerName??""}),voicemail:_})))}(r,f,Q)}break;case y.Cvu.FD_External:case y.Cvu.FD_Rebound:case y.Cvu.FD_Deflect:{const Q=!0===r.ToMyMobile||!!r.Number&&_.MobileNumber===r.Number;return(0,O.of)(new l({type:Q?x.MyMobile:x.External,use302:r.FwdType===y.Cvu.FD_Deflect,rebound:r.FwdType===y.Cvu.FD_Rebound,number:Q?_.MobileNumber:r.Number}))}}return(0,O.of)(new l({}))}function M(f,T,_){return p(f,T,_).pipe((0,v.T)(s))}function m(f,T){let _,Q,r=y.Cvu.FD_Disconnect;switch(f.type){case x.SameAsAllCalls:case x.MyVoicemail:_=T.Number,r=y.Cvu.FD_VoiceMail;break;case x.MyMobile:case x.External:_=f.type===x.MyMobile?"":f.number,r=f.rebound?y.Cvu.FD_Rebound:r=f.use302?y.Cvu.FD_Deflect:y.Cvu.FD_External;break;case x.SystemExtension:case x.Extension:Q=f.type===x.SystemExtension?f.systemContact:f.extensionContact,_=Q?.Number,r=f.voicemail?y.Cvu.FD_VoiceMail:y.Cvu.FD_Internal}const B=new y.idX({Number:_||"",FwdType:r});return Q&&(B.PeerName=Q.Name??void 0,B.PeerType=Q.Type??void 0),B.ToMyMobile=f.type===x.MyMobile,B}function h(f,T){return null==f.type?null:{forwardDestination:m(f,T),sameAsAllCalls:f.type===x.SameAsAllCalls,playAnnouncement:f.type===x.PlayAnnouncement}}function R(f){switch(f?.Type){case E.J.Extension:case E.J.Queue:case E.J.RingGroup:return!0}return!1}},10854(be,J,t){t.d(J,{C_:()=>E,qz:()=>S});var i=t(1211),y=t(35547);const O={[i.AV4.AllHours]:"_i18n.AllHours",[i.AV4.OfficeHours]:"_i18n.OfficeHours",[i.AV4.OutOfOfficeHours]:"_i18n.OOOHours",[i.AV4.SpecificHours]:"_i18n.SpecificHours",[i.AV4.SpecificHoursExcludingHolidays]:"_i18n.SpecificHoursExclHolidays",[i.AV4.OutOfSpecificHours]:"_i18n.OOOSpecificHours",[i.AV4.OutOfSpecificHoursIncludingHolidays]:"_i18n.OOOSpecificHoursIncHolidays",[i.AV4.Never]:"_i18n.Never",[i.AV4.BreakTime]:"_i18n.BreakTime"},S=(new Date(0,0,0,8,0),new Date(0,0,0,18,0),[i.AV4.AllHours,i.AV4.OfficeHours,i.AV4.BreakTime,i.AV4.OutOfOfficeHours,i.AV4.SpecificHours].map(x=>({value:x,label:O[x]})));let E=(()=>{class x{transform(C){return O[C]||""}static \u0275fac=function(u){return new(u||x)};static \u0275pipe=y.EJ8({name:"appHoursType",type:x,pure:!0})}return x})()},74730(be,J,t){t.d(J,{TT:()=>S,ln:()=>v,ot:()=>u});var i=t(1211),y=t(96980),O=t(72107);function v(s){return{DayOfWeek:l(s.Day),Start:(0,y.vn)(E(s.From)),Stop:(0,y.vn)(E(s.To))}}function S(s){return{Day:C(s.DayOfWeek),From:x((0,y.Vd)(s.Start)),To:x((0,y.Vd)(s.Stop))}}function E(s){return new Date(0,0,1,s.Hour,s.Minute)}function x(s){return new i.c9I({Hour:s.getHours(),Minute:s.getMinutes()})}function l(s){switch(s){case i.obr.Monday:return O.K.Monday;case i.obr.Tuesday:return O.K.Tuesday;case i.obr.Wednesday:return O.K.Wednesday;case i.obr.Thursday:return O.K.Thursday;case i.obr.Friday:return O.K.Friday;case i.obr.Saturday:return O.K.Saturday;case i.obr.Sunday:return O.K.Sunday;default:return}}function C(s){switch(s){case O.K.Monday:return i.obr.Monday;case O.K.Tuesday:return i.obr.Tuesday;case O.K.Wednesday:return i.obr.Wednesday;case O.K.Thursday:return i.obr.Thursday;case O.K.Friday:return i.obr.Friday;case O.K.Saturday:return i.obr.Saturday;case O.K.Sunday:return i.obr.Sunday;default:return}}function u(s){switch(s){case i.AV4.SpecificHours:case i.AV4.OutOfSpecificHours:case i.AV4.SpecificHoursExcludingHolidays:case i.AV4.OutOfSpecificHoursIncludingHolidays:return!0}return!1}},65781(be,J,t){t.d(J,{b:()=>m});var i=t(17705),y=t(85802),O=t(66300),v=t(12419),S=t(68018),E=t(24708),x=t(74730),l=t(10854),C=t(89417),u=t(89079),s=t(84572),o=t(35547);function p(h,R){1&h&&(o.EFF(0),o.nI1(1,"translate")),2&h&&o.SpI(" ",o.bMT(1,1,"_i18n.EmptyHoursExceptionRuleMsg")," ")}function M(h,R){if(1&h&&(o.j41(0,"app-hours",2)(1,"val-errors",1),o.DNE(2,p,2,3,"ng-template",3),o.k0s()()),2&h){const f=o.XpG();o.Y8G("hours",f.ruleHoursDays)("partialEdit",f.partialEdit),o.R7$(),o.Y8G("control",f.ruleHoursDays)}}let m=(()=>{class h{destroyRef=(0,y.WQX)(y.abz);cd=(0,y.WQX)(i.gRc);isSpecificHours=x.ot;hoursTypeOptions=l.qz;label;ruleHoursType;ruleHoursDays;partialEdit;ngOnInit(){(0,s.z)([this.ruleHoursType.events,this.ruleHoursDays.events]).pipe((0,u.pQ)(this.destroyRef)).subscribe(()=>this.cd.markForCheck())}static \u0275fac=function(T){return new(T||h)};static \u0275cmp=o.VBU({type:h,selectors:[["app-hours-type"]],inputs:{label:"label",ruleHoursType:"ruleHoursType",ruleHoursDays:"ruleHoursDays",partialEdit:"partialEdit"},decls:3,vars:6,consts:[["data-qa","receive-during",3,"label","nullIsIndeterminate","options","formControl"],[3,"control"],["label","_i18n.ConfigureActiveHours","data-qa","specific-hours",3,"hours","partialEdit"],["valError","required"]],template:function(T,_){1&T&&(o.j41(0,"field-select",0),o.nrm(1,"val-errors",1),o.k0s(),o.nVh(2,M,3,3,"app-hours",2)),2&T&&(o.Y8G("label",_.label)("nullIsIndeterminate",_.partialEdit)("options",_.hoursTypeOptions)("formControl",_.ruleHoursType),o.R7$(),o.Y8G("control",_.ruleHoursType),o.R7$(),o.vxM(_.isSpecificHours(_.ruleHoursType.value)?2:-1))},dependencies:[O.q,v.L,E.VI,E.IH,C.X1,C.BC,C.l_,S.D9],encapsulation:2,changeDetection:0})}return h})()},87370(be,J,t){t.d(J,{X:()=>Ge});var i=t(85802),y=t(89417),O=t(49769),v=t(68018),S=t(72510),E=t(534),x=t(38601),l=t(96106),C=t(98352),u=t(56998),s=t(31755),o=t(34864),p=t.n(o),M=t(67374),m=t.n(M),h=t(18530),R=t(84412),f=t(7673),T=t(59030),_=t(19724),r=t(88141),Q=t(96354),B=t(99437);function ie(z){let Te=z;return z||(Te="00"),z<10&&(Te="0"+z),Te}let Ce=(()=>{class z{modalService=(0,i.WQX)(x.B);stream;recorder;stopRecordingTimeout;interval;startTime;_recorded=new h.B;_recordingTime=new R.t("");_recordingFinished=new h.B;recordedBlob$=this._recorded.asObservable();recordingTime$=this._recordingTime.asObservable();recordingFinished$=this._recordingFinished.asObservable();ngOnDestroy(){this.stopMedia()}startRecording$(F){return this.recorder?(0,f.of)(!1):(0,T.v)(()=>(0,_.H)(navigator.mediaDevices.getUserMedia({audio:!0})).pipe((0,r.M)(pe=>{this._recordingTime.next("00:00"),this.stream=pe,this.record(F)}),(0,Q.T)(()=>!0),(0,B.W)(pe=>(this._recordingFinished.next("Recording failed"),this.modalService.error(pe instanceof Error?"NotAllowedError"===pe.name?"_i18n.RecordingNotAllowedError":"NotFoundError"===pe.name?"_i18n.WebRtcNotFoundError":pe:pe),(0,f.of)(!1)))))}abortRecording(){this.stopMedia()}stopRecording(F){this.recorder&&this.recorder.stop(pe=>
1{if(this.startTime){const ce=F+".wav";this.stopMedia(),this._recorded.next({blob:pe,title:ce})}this._recordingFinished.next("Recording stopped")},()=>{this.stopMedia(),this._recordingFinished.next("Recording failed")})}record(F){this.stream&&(this.recorder=new(p().StereoAudioRecorder)(this.stream,{type:"audio",mimeType:"audio/wav",desiredSampRate:8e3,numberOfAudioChannels:1})),this.recorder.record(),this.startTime=m()(),this.stopRecordingTimeout=setTimeout(()=>{this.stopRecording(F)},12e4),this.interval=setInterval(()=>{const pe=m()(),ce=m().duration(pe.diff(this.startTime)),Se=ie(ce.minutes())+":"+ie(ce.seconds());this._recordingTime.next(Se)},1e3)}stopMedia(){this.recorder&&(this.recorder=null,void 0!==this.stopRecordingTimeout&&(clearTimeout(this.stopRecordingTimeout),this.stopRecordingTimeout=void 0),void 0!==this.interval&&(clearInterval(this.interval),this.interval=void 0),this.startTime=null,this.stream&&(this.stream.getAudioTracks().forEach(F=>F.stop()),this.stream=null))}static \u0275fac=function(pe){return new(pe||z)};static \u0275prov=i.jDH({token:z,factory:z.\u0275fac})}return z})();var re=t(25558),ye=t(96697),Ee=t(40953),G=t(22972),he=t(7881),q=t(24708),fe=t(74569),ne=t(89079),w=t(84460),D=t(54999),b=t(59453),c=t(8516),a=t(35547);function W(z,Te){1&z&&(a.j41(0,"p",3),a.EFF(1),a.k0s()),2&z&&(a.R7$(),a.JRh(Te))}function X(z,Te){if(1&z){const F=a.RV6();a.j41(0,"app-audio-player",7),a.bIt("upload",function(){i.eBV(F),a.XpG();const ce=a.sdS(1);return i.Njj(ce.submit())})("reset",function(){i.eBV(F);const ce=a.XpG();return i.Njj(ce.onReset())}),a.k0s()}2&z&&a.Y8G("src",Te.dataUrl)}function U(z,Te){if(1&z){const F=a.RV6();a.j41(0,"div",8),a.bIt("click",function(){i.eBV(F);const ce=a.XpG();return i.Njj(ce.stopRecording())}),a.nrm(1,"lucide-icon",9)(2,"lucide-icon",10),a.j41(3,"span"),a.EFF(4),a.k0s()()}if(2&z){const F=a.XpG();a.R7$(),a.Y8G("img",F.Mic),a.R7$(),a.Y8G("img",F.Square),a.R7$(2),a.JRh(F.recordingTime())}}function oe(z,Te){1&z&&(a.EFF(0),a.nI1(1,"translate")),2&z&&a.JRh(a.bMT(1,1,"_i18n.FileNameIsRequired"))}function H(z,Te){1&z&&(a.EFF(0),a.nI1(1,"translate")),2&z&&a.JRh(a.bMT(1,1,"_i18n.FileNameCannotContainFollowingCharacters"))}function de(z,Te){if(1&z){const F=a.RV6();a.j41(0,"field-input",6)(1,"button",11),a.bIt("click",function(){i.eBV(F);const ce=a.XpG();return i.Njj(ce.startRecording())}),a.nrm(2,"lucide-icon",12),a.k0s(),a.j41(3,"val-errors",13),a.DNE(4,oe,2,3,"ng-template",14)(5,H,2,3,"ng-template",15),a.k0s()()}if(2&z){const F=a.XpG();a.Y8G("formControl",F.recordFileName)("maxlength",45),a.R7$(),a.Y8G("disabled",F.recordFileName.invalid),a.R7$(),a.Y8G("img",F.Mic),a.R7$(),a.Y8G("control",F.recordFileName)}}let ve=(()=>{class z extends G.m{recordingService=(0,i.WQX)(Ce);buttons=D.P.Cancel;Mic=c.GOn;Square=c.M6A;record=(0,i.vPA)(null);isRecording=(0,i.vPA)(!1);error=(0,i.vPA)("");recordFileName=new y.MJ("",{nonNullable:!0,validators:[y.k0.required,y.k0.pattern(/^[^<>:"/\\?*|]*$/),y.k0.maxLength(45)]});recordingTime=(0,ne.ot)(this.recordingService.recordingTime$);constructor(){super(),this.recordingService.recordingFinished$.pipe((0,ne.pQ)()).subscribe(()=>this.isRecording.set(!1)),this.recordingService.recordedBlob$.pipe((0,re.n)(F=>(0,b.A)(F.blob).pipe((0,Q.T)(pe=>({audio:F,dataUrl:pe})),(0,B.W)(pe=>(this.error.set((0,he.PE)(pe)),(0,f.of)(null))))),(0,ne.pQ)()).subscribe(F=>this.record.set(F))}ngOnDestroy(){this.isRecording()&&this.recordingService.abortRecording()}startRecording(){!this.isRecording()&&this.recordFileName.valid&&(this.error.set(""),this.recordingService.startRecording$(this.recordFileName.value).pipe((0,ye.s)(1)).subscribe(F=>{this.isRecording.set(F)}))}stopRecording(){this.isRecording()&&(this.isRecording.set(!1),this.recordingService.stopRecording(this.recordFileName.value))}onReset(){this.isRecording.set(!1),this.record.set(null)}getPayload(){const F=this.record();if(!F)return;const{blob:pe,title:ce}=F.audio,Se=(new Date).getTime();return new File([pe],ce,{lastModified:Se,type:pe.type})}static \u0275fac=function(pe){return new(pe||z)};static \u0275cmp=a.VBU({type:z,selectors:[["app-prompt-recorder"]],features:[a.Jv_([Ce]),a.Vt3],decls:7,vars:4,consts:[["dialog",""],["header","_i18n.RecordMediaPromptFile",3,"submitted","buttons","disableSubmitOnEnter"],[1,"pb-2"],["data-qa","recording-error",1,"text-error"],[3,"src"],["role","button","data-qa","stop-record",1,"recording"],["label","_i18n.RecordMediaPromptFileInfo","data-qa","file-name-recording","placeholder","_i18n.AudioFileName",1,"mb-0",3,"formControl","maxlength"],[3,"upload","reset","src"],["role","button","data-qa","stop-record",1,"recording",3,"click"],[1,"in-progress",3,"img"],[1,"stop",3,"img"],["data-qa","btn","type","button",1,"btn","btn-plain","btn-icon",3,"click","disabled"],[3,"img"],[3,"control"],["valError","required"],["valError","pattern"]],template:function(pe,ce){if(1&pe&&(a.j41(0,"app-modal-dialog",1,0),a.bIt("submitted",function(){return ce.onSubmit()}),a.j41(2,"div",2),a.nVh(3,W,2,1,"p",3),a.nVh(4,X,1,1,"app-audio-player",4)(5,U,5,3,"div",5)(6,de,6,5,"field-input",6),a.k0s()()),2&pe){let Se,ze;a.Y8G("buttons",ce.buttons)("disableSubmitOnEnter",!0),a.R7$(3),a.vxM((Se=ce.error())?3:-1,Se),a.R7$(),a.vxM((ze=ce.record())?4:ce.isRecording()?5:6,ze)}},dependencies:[y.X1,y.BC,y.tU,y.l_,Ee.p,w.m,q.N4,q.IH,q.VI,fe.N,c.flO,c.WGl,v.D9],styles:[".recording[_ngcontent-%COMP%]{width:130px;height:130px;margin:0 auto;position:relative;border:1px solid var(--border-color);flex-direction:column;border-radius:50%;gap:var(--spacer-s);font-size:var(--font-size-lg);transition:.5s all;cursor:pointer;--svg-size: 45px}.recording[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;
1left:0;bottom:22px;width:100%;text-align:center;color:var(--text-hint)}.recording[_ngcontent-%COMP%] lucide-icon[_ngcontent-%COMP%]{position:absolute;top:22px;left:calc(50% - var(--svg-size) / 2);opacity:0;transition:.5s opacity ease-in-out}.recording[_ngcontent-%COMP%] .in-progress[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blinker 2s linear infinite}.recording[_ngcontent-%COMP%]:hover{background:var(--bg-primary-hover)}.recording[_ngcontent-%COMP%]:hover .in-progress[_ngcontent-%COMP%]{animation-iteration-count:1;animation-duration:.5s}.recording[_ngcontent-%COMP%]:hover .stop[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fadeIn .5s forwards}@keyframes _ngcontent-%COMP%_blinker{0%{opacity:0}50%{opacity:1}to{opacity:0}}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}to{opacity:1}}@keyframes _ngcontent-%COMP%_fadeOut{0%{opacity:1}to{opacity:0}}"],changeDetection:0})}return z})();var ae=t(21339),ue=t(13798),ee=t(91413),k=t(59882),te=t(48643),Z=t(17705),N=t(61851),I=t(18810),$=t(95847),V=t(19968),A=t(41029),L=t(16444),me=t(1211),ge=t(92996),xe=t(95604);const Pe=()=>["Extension"];function De(z,Te){1&z&&(a.EFF(0),a.nI1(1,"translate")),2&z&&a.JRh(a.bMT(1,1,"_i18n.FileNameIsRequired"))}function Me(z,Te){1&z&&(a.EFF(0),a.nI1(1,"translate")),2&z&&a.JRh(a.bMT(1,1,"_i18n.FileNameCannotContainFollowingCharacters"))}function We(z,Te){1&z&&(a.EFF(0),a.nI1(1,"translate")),2&z&&a.JRh(a.bMT(1,1,"_i18n.VoicemailGreetingsMsgInvalidFileName"))}function $e(z,Te){1&z&&(a.j41(0,"field-wrapper",7),a.nrm(1,"app-dn-select",8)(2,"val-errors",9),a.k0s()),2&z&&(a.R7$(),a.Y8G("isObject",!1)("searchDnTypes",a.lJ4(2,Pe)))}let Ye=(()=>{class z extends G.m{usersApiService=(0,i.WQX)($.u);customPromptsApiService=(0,i.WQX)(V.O);tokenInfoService=(0,i.WQX)(ge.Z);xapiErrorService=(0,i.WQX)(A.Ko);cd=(0,i.WQX)(Z.gRc);myPhoneSvc=(0,i.WQX)(L.gx);buttons=D.P.OkCancel;dn;userId;isAdminView;isCstaRecordingGlobal;recordingCstaForm;validateBeforeSubmit;constructor(){super(),this.recordingCstaForm=new y.gE({filename:new y.MJ("sample.wav",{nonNullable:!0,validators:[y.k0.required,y.k0.pattern('^[^<>:"/\\?*|]*$'),y.k0.maxLength(45)]}),dn:new y.MJ(null,{validators:[y.k0.required]})}),this.validateBeforeSubmit=this.createDialogValidate(this.recordingCstaForm,this.cd)}ngOnInit(){this.isAdminView?this.dn?this.recordingCstaForm.controls.dn?.patchValue(this.dn):this.tokenInfoService.myToken$.pipe((0,Q.T)(F=>F.userName)).subscribe(F=>{this.dn=F,this.recordingCstaForm.controls.dn?.patchValue(F)}):this.recordingCstaForm.controls.dn.disable()}submit$=()=>{const F=this.recordingCstaForm.value;return this.isAdminView?this.isCstaRecordingGlobal?this.customPromptsApiService.makeCallRecordCustomPrompt({customPromptsMakeCallRecordCustomPromptRequestBody:{dn:F.dn,filename:F.filename}}).pipe(this.handleError(this.xapiErrorService,this.cd,this.recordingCstaForm)):this.userId?this.usersApiService.makeCallUserRecordGreeting({id:this.userId,makeCallUserRecordGreetingRequestBody:{dn:F.dn,filename:F.filename}}).pipe(this.handleError(this.xapiErrorService,this.cd,this.recordingCstaForm)):(0,I.$)(()=>new Error("UserId is not provided to make request")):this.myPhoneSvc.get(new me.LYu({FileName:F.filename})).pipe(this.handleError(this.xapiErrorService,this.cd,this.recordingCstaForm))};static \u0275fac=function(pe){return new(pe||z)};static \u0275cmp=a.VBU({type:z,selectors:[["app-prompt-csta-recording"]],features:[a.Vt3],decls:10,vars:9,consts:[["header","_i18n.RecordMediaPromptFile",3,"submitted","formGroup","buttons","submit$","validateBeforeSubmit"],["data-qa","message"],["formControlName","filename","label","_i18n.RecordMediaPromptFileInfo","data-qa","file-name-recording","placeholder","_i18n.AudioFileName",3,"maxlength"],["controlName","filename"],["valError","required"],["valError","pattern"],["valError","invalid"],["label","_i18n.ExtensionNumber","data-qa","csta-dest-ext"],["formControlName","dn",3,"isObject","searchDnTypes"],["controlName","dn"]],template:function(pe,ce){1&pe&&(a.j41(0,"app-modal-dialog",0),a.bIt("submitted",function(){return ce.onSubmit()}),a.j41(1,"p",1),a.EFF(2),a.nI1(3,"translate"),a.k0s(),a.j41(4,"field-input",2)(5,"val-errors",3),a.DNE(6,De,2,3,"ng-template",4)(7,Me,2,3,"ng-template",5)(8,We,2,3,"ng-template",6),a.k0s()(),a.nVh(9,$e,3,3,"field-wrapper",7),a.k0s()),2&pe&&(a.Y8G("formGroup",ce.recordingCstaForm)("buttons",ce.buttons)("submit$",ce.submit$)("validateBeforeSubmit",ce.validateBeforeSubmit),a.R7$(2),a.SpI(" ",a.bMT(3,7,ce.isAdminView?"_i18n.RecordCstaPromptText":"_i18n.RecordCstaPromptTextSelf")," "),a.R7$(2),a.Y8G("maxlength",45),a.R7$(5),a.vxM(ce.isAdminView?9:-1))},dependencies:[Ee.p,w.m,xe.z,y.X1,y.BC,y.cb,y.tU,y.j4,y.JD,q.VI,q.IH,N.A,v.D9],encapsulation:2})}return z})();var Le=t(59053),He=t(8876),Qe=t(58689);const je=["file"],Ie=["ngSelect"],Oe=[[["val-errors"]]],Xe=["val-errors"],e=z=>({autocomplete:z});function nt(z,Te){if(1&z&&(a.j41(0,"span",11),a.EFF(1),a.nI1(2,"translate"),a.k0s()),2&z){const F=Te.item;a.R7$(),a.JRh(a.bMT(2,1,F))}}function ut(z,Te){if(1&z&&(a.EFF(0),a.nI1(1,"translate")),2&z){const F=Te.item,pe=a.XpG();a.SpI(" ",a.bMT(1,1,pe.getDisplayName(F))," ")}}function qe(z,Te){if(1&z){const F=a.RV6();a.j41(0,"a",16),a.bIt("click",function(ce){i.eBV(F);const Se=a.XpG().item,ze=a.XpG();return i.Njj(ze.downloadFile(Se,ce))}),a.nrm(1,"lucide-icon",17),a.k0s()}if(2&z){const F=a.XpG(2);a.AVh("px-1",F.isNewDesign()),a.R7$(),a.Y8G("img",F.Download)}}function et(z,Te){if(1&z){const F=a.RV6();a.j41(0,"a",18),a.bIt("click",function(ce){i.eBV(F);const Se=a.XpG().item,ze=a.XpG();return i.Njj(ze.deletePromptFromMenu(ce,Se))}),a.nrm(1,"lucide-icon",17),a.k0s()}if(2&z){const F=a.XpG(2);a.AVh("px-1",F.isNewDesign()),a.R7$(),a.Y8G("img",F.Trash2)}}function tt(z,Te){if(1&z&&(a.j41(0,"div",12)(1,"span",13),a.EFF(2),a.nI1(3,"translate"),a.k0s(),a.nVh(4,qe,2,3,"a",14),a.nVh(5,et,2,3,"a",15),a.k0s()),2&z){const F=Te.item,pe=a.XpG();a.R7$(2),a.JRh(a.bMT(3,3,pe.getDisplayName(F))),a.R7$(2),a.vxM(!pe.restrictedAccess&&F.FileLink?4:-1),a.R7$(),a.vxM(!pe.restrictedAccess&&F.CanBeDeleted?5:-1)}}function pt(z,Te){1&z&&(a.j41(0,"span"),a.EFF(1),a.nI1(2,"translate"),a.k0s()),2&z&&(a.R7$(),a.JRh(a.bMT(2,1,"_i18n.Upload")))}function ot(z,Te){1&z&&(a.j41(0,"span"),a.EFF(1),a.nI1(2,"translate"),a.k0s()),2&z&&(a.R7$(),a.JRh(a.bMT(2,1,"_i18n.Delete")))}function Fe(z,Te){1&z&&(a.j41(0,"span"),a.EFF(1),a.nI1(2,"translate"),a.k0s()),2&z&&(a.R7$(),a.JRh(a.bMT(2,1,"_i18n.Record")))}function it(z,Te){if(1&z){const F=a.RV6();a.j41(0,"div",20),a.nI1(1,"translate"),a.j41(2,"button",24),a.nI1(3,"translate"),a.bIt("click",function(){i.eBV(F);const ce=a.XpG(2);return i.Njj(ce.record())}),a.nrm(4,"lucide-icon",17),a.nVh(5,Fe,3,3,"span"),a.k0s()()}if(2&z){const F=a.XpG(2);a.Y8G("tooltip",a.bMT(1,9,"_i18n.MaxAmountOfPromptsReached"))("isDisabled",!F.maxPromptsReached),a.R7$(2),a.AVh("btn-icon",F.iconButtons),a.Y8G("title",a.mNQ(F.iconButtons?a.bMT(3,11,"_i18n.Record"):""))("disabled",F.disabled||F.maxPromptsReached),a.R7$(2),a.Y8G("img",F.Mic),a.R7$(),a.vxM(F.iconButtons?-1:5)}}function at(z,Te){1&z&&(a.j41(0,"span",29),a.EFF(1),a.nI1(2,"translate"),a.k0s()),2&z&&(a.R7$(),a.JRh(a.bMT(2,1,"_i18n.IpPhoneRecordLabel")))}function ft(z,Te){if(1&z){const F=a.RV6();a.j41(0,"button",25),a.nI1(1,"translate"),a.bIt("click",function(){i.eBV(F);const ce=a.XpG(2);return i.Njj(ce.recordCsta())}),a.j41(2,"div",26),a.nrm(3,"lucide-icon",27)(4,"lucide-icon",28),a.k0s(),a.nVh(5,at,3,3,"span",29),a.k0s()}if(2&z){const F=a.XpG(2);a.AVh("btn-icon",F.iconButtons&&F.isNewDesign()),a.Y8G("title",a.mNQ(F.iconButtons?a.bMT(1,8,"_i18n.IpPhoneRecordLabel"):""))("disabled",F.disabled||F.maxPromptsReached),a.R7$(3),a.Y8G("img",F.PhoneCall),a.R7$(),a.Y8G("img",F.Mic),a.R7$(),a.vxM(F.iconButtons?-1:5)}}function Ae(z,Te){if(1&z){const F=a.RV6();a.j41(0,"div",8)(1,"input",19,1),a.bIt("change",function(){i.eBV(F);const ce=a.sdS(2),Se=a.XpG();
1return i.Njj(Se.onFileSelected(ce.files))}),a.k0s(),a.j41(3,"div",20),a.nI1(4,"translate"),a.j41(5,"button",21),a.nI1(6,"translate"),a.bIt("click",function(){i.eBV(F);const ce=a.XpG();return i.Njj(ce.uploadPrompt())}),a.nrm(7,"lucide-icon",17),a.nVh(8,pt,3,3,"span"),a.k0s()(),a.j41(9,"button",22),a.nI1(10,"translate"),a.bIt("click",function(){i.eBV(F);const ce=a.XpG();return i.Njj(ce.deleteSelectedPrompt())}),a.nrm(11,"lucide-icon",17),a.nVh(12,ot,3,3,"span"),a.k0s(),a.nVh(13,it,6,13,"div",20),a.nVh(14,ft,6,10,"button",23),a.k0s()}if(2&z){const F=a.XpG();a.R7$(3),a.Y8G("tooltip",a.bMT(4,16,F.isUploadAllowed?"_i18n.MaxAmountOfPromptsReached":"_i18n.PromptExtensionIsNotSaved"))("isDisabled",F.isUploadAllowed&&!F.maxPromptsReached),a.R7$(2),a.AVh("btn-icon",F.iconButtons),a.Y8G("disabled",F.disabled||!F.isUploadAllowed||F.maxPromptsReached)("title",F.iconButtons?a.bMT(6,18,"_i18n.Upload"):""),a.R7$(2),a.Y8G("img",F.Upload),a.R7$(),a.vxM(F.iconButtons?-1:8),a.R7$(),a.AVh("btn-icon",F.iconButtons),a.Y8G("title",F.iconButtons?a.bMT(10,20,"_i18n.Delete"):"")("disabled",!F.canDeleteSelectedPrompt),a.R7$(2),a.Y8G("img",F.Trash2),a.R7$(),a.vxM(F.iconButtons?-1:12),a.R7$(),a.vxM(F.isRecordingAllowed?13:-1),a.R7$(),a.vxM(F.isCstaRecordingAllowed?14:-1)}}function Be(z,Te){1&z&&(a.EFF(0),a.nI1(1,"translate")),2&z&&a.JRh(a.bMT(1,1,"_i18n.PromptIsRequired"))}function we(z,Te){if(1&z&&(a.j41(0,"val-errors",9),a.DNE(1,Be,2,3,"ng-template",30),a.k0s()),2&z){const F=a.XpG();a.Y8G("control",F.formControl)}}function Ne(z,Te){1&z&&(a.qex(0,10),a.SdG(1),a.bVm())}let Ge=(()=>{class z extends C.z{service=(0,i.WQX)(ae.t);translate=(0,i.WQX)(v.c$);modalService=(0,i.WQX)(x.B);route=(0,i.WQX)(k.nX);fileDownloadService=(0,i.WQX)(te.y);label;inlineLabel;clearable;iconButtons=!0;restrictedAccess;description;isUploadAllowed=!0;isAdminView=!1;isRecordingAllowed=!0;isCstaRecordingAllowed=!0;isCstaRecordingGlobal=!1;maxPrompts;nullIsIndeterminate=!1;indeterminatePlaceholder="_i18n.LeaveUnchanged";fileUpload;selectComponent;id=(0,u.bn)("prompt-selector");formControl=new y.MJ(null);prompts$=this.service.availablePrompts$;prompts;isNewDesign=(0,i.WQX)(Qe.T);Upload=c._OO;Download=c.f5X;Trash2=c.TBR;Mic=c.GOn;PhoneCall=c.d3s;getDisplayName(F){return F.DisplayName?F.DisplayName:F.Filename?.startsWith("Custom/")?F.Filename?.replace(/^Custom\/.+\//,"Dep/"):F.Filename||""}get maxPromptsReached(){return this.maxPrompts&&this.prompts&&this.maxPrompts>0&&this.prompts.filter(F=>"DepFile"===F.PromptType).length>=this.maxPrompts}get indeterminate(){return this.nullIsIndeterminate&&null==this.value&&!this.changed}writeValue(F){super.writeValue(F??(this.nullIsIndeterminate?null:"")),this.formControl.setValue(this.value,{emitEvent:!1})}setDisabledState(F){super.setDisabledState(F),(0,u.TZ)(this.formControl,!this.disabled)}get isRequired(){return this.formControl.hasValidator(y.k0.required)}focus(){this.selectComponent.focus()}ngOnInit(){this.syncControlState(this.formControl),this.formControl.valueChanges.pipe((0,ne.pQ)(this.destroyRef)).subscribe(F=>this.valueChanged(F,!!F)),this.prompts$.pipe((0,ue.Z)(0),(0,ne.pQ)(this.destroyRef)).subscribe(F=>{this.prompts=F,this.cd.markForCheck()})}downloadFile(F,pe){pe.stopPropagation();const ce=F?.FileLink;ce&&this.fileDownloadService.download(ce,{addXapiPath:!1,filename:F.Filename})}record(){this.modalService.showComponent(ve).pipe((0,l.Sf)()).subscribe(F=>{this.uploadFile(F)})}recordCsta(){this.modalService.showComponent(Ye,{initialState:{dn:this.route.snapshot.data.myUser,userId:this.isCstaRecordingGlobal?0:+this.route.snapshot.params.id,isAdminView:this.isAdminView,isCstaRecordingGlobal:this.isCstaRecordingGlobal}}).subscribe()}get canDeleteSelectedPrompt(){return!(this.disabled||!this.value)&&this.prompts?.find(F=>F.Filename===this.value)?.CanBeDeleted}uploadPrompt(){this.fileUpload.nativeElement.value="",this.fileUpload.nativeElement.click()}onFileSelected(F){F&&F.length>0&&this.uploadFile(F[0])}deletePromptFromMenu(F,pe){F.stopPropagation(),this.selectComponent.close(),this.deletePbxPrompt(pe.Filename,pe.Filename===this.value)}deleteSelectedPrompt(){this.value&&this.deletePbxPrompt(this.value,!0)}deletePbxPrompt(F,pe){this.modalService.confirmDeletion("_i18n.AreYouSureYouWantToDeletePrompt").subscribe(()=>{this.handleDelete(F,pe)})}search=(F,pe)=>((pe.DisplayName?this.translate.instant(pe.DisplayName):null)??pe.Filename??"").toLowerCase().includes(F.trim().toLowerCase());validate=this.createComponentValidator(this.formControl);uploadFile(F){const pe=(0,Le.lj)(F);pe?this.modalService.error(pe):this.service.uploadPrompt$(F).subscribe({next:ce=>{this.formControl.setValue(ce)},error:ce=>{this.modalService.error(ce instanceof ee.yz?415===ce.status?"_i18n.IncorrectAudioFormat":"_i18n.UploadingAudioFailed":ce)}})}promptGroupValue(F){switch(F){case"File":return"_i18n.SharedPrompts";case"Playlist":return"_i18n.Playlists";default:return"_i18n.CompanyPrompts"}}handleDelete(F,pe){this.service.deletePrompt$(F).pipe((0,l.Tg)(this.modalService)).subscribe(()=>{pe&&this.formControl.setValue("")})}static \u0275fac=(()=>{let F;return function(ce){return(F||(F=a.xGo(z)))(ce||z)}})();static \u0275cmp=a.VBU({type:z,selectors:[["app-prompt-selector"]],viewQuery:function(pe,ce){if(1&pe&&a.GBs(je,5)(Ie,7),2&pe){let Se;a.mGM(Se=a.lsd())&&(ce.fileUpload=Se.first),a.mGM(Se=a.lsd())&&(ce.selectComponent=Se.first)}},hostVars:2,hostBindings:function(pe,ce){2&pe&&a.AVh("form-input",!0)},inputs:{label:"label",inlineLabel:"inlineLabel",clearable:"clearable",iconButtons:"iconButtons",restrictedAccess:"restrictedAccess",description:"description",isUploadAllowed:"isUploadAllowed",isAdminView:"isAdminView",isRecordingAllowed:"isRecordingAllowed",isCstaRecordingAllowed:"isCstaRecordingAllowed",isCstaRecordingGlobal:"isCstaRecordingGlobal",maxPrompts:"maxPrompts",nullIsIndeterminate:"nullIsIndeterminate",indeterminatePlaceholder:"indeterminatePlaceholder"},features:[a.Jv_([{provide:y.kq,multi:!0,useExisting:z},{provide:y.cz,multi:!0,useExisting:z},{provide:s.b,useExisting:z}]),a.Vt3],ngContentSelectors:Xe,decls:12,vars:24,consts:[["ngSelect",""],["file",""],["data-qa","prompt-selector",1,"mb-0",3,"description","label","inlineLabel","labelFor","required"],[1,"input-group","gap-2","mw-0"],["groupBy","PromptType","bindValue","Filename","data-qa","select",3,"groupValue","id","formControl","items","clearable","inputAttrs","searchable","searchFn","placeholder"],["ng-optgroup-tmp",""],["ng-label-tmp",""],["ng-option-tmp",""],[1,"buttons","d-flex","flex-row","gap-2"],[3,"control"],["ngProjectAs","val-errors",5,["val-errors"]],[1,"ng-option"],[1,"d-flex","align-items-center","gap-2"],[1,"flex-grow-1","text-truncate"],["data-qa","download-file","download","",1,"btn","btn-plain-sm",3,"px-1"],["data-qa","delete-file",1,"btn","btn-plain-sm",3,"px-1"],["data-qa","download-file","download","",1,"btn","btn-plain-sm",3,"click"],[3,"img"],["data-qa","delete-file",1,"btn","btn-plain-sm",3,"click"],["type","file","hidden","","accept","audio/x-wav",3,"change"],["triggers","pointerenter:pointerleave",3,"tooltip","isDisabled"],["type","button","data-qa","upload",1,"btn","btn-border",3,"click","disabled","title"],["type","button","data-qa","delete",1,"btn","btn-border",3,"click","title","disabled"],["type","button","data-qa","record_csta",1,"btn","btn-border","csta-record",3,"btn-icon","title","disabled"],["type","button","data-qa","record",1,"btn","btn-border",3,"click","disabled","title"],["type","button","data-qa","record_csta",1,"btn","btn-border","csta-record",3,"click","title","disabled"],[1,"position-relative"],[1,"svg-sm","phone-icon",3,"img"],[1,"svg-xs","mic-icon",3,"img"],[1,"ms-2"],["valError","required"]],template:function(pe,ce){1&pe&&(a.NAR(Oe),a.j41(0,"field-wrapper",2)(1,"div",3)(2,"ng-select",4,0),a.nI1(4,"async"),a.nI1(5,"translate"),a.DNE(6,nt,3,3,"ng-template",5)(7,ut,2,3,"ng-template",6)(8,tt,6,5,"ng-template",7),a.k0s(),a.nVh(9,Ae,15,22,"div",8),a.k0s(),a.nVh(10,we,2,1,"val-errors",9)(11,Ne,2,0,"ng-container",10),a.k0s()),2&pe&&(a.Y8G("description",ce.description)("label",ce.label)("inlineLabel",ce.inlineLabel)("labelFor",ce.id)("required",ce.isRequired),a.R7$(),a.AVh("iconic",ce.iconButtons&&!ce.restrictedAccess),a.R7$(),a.Y8G("groupValue",ce.promptGroupValue)("id",ce.id)("formControl",ce.formControl)("items",a.bMT(4,18,ce.prompts$))("clearable",ce.clearable&&!!ce.value)("inputAttrs",a.eq3(22,e,ce.id))("searchable",!0)("searchFn",ce.search)("placeholder",ce.indeterminate?a.bMT(5,20,ce.indeterminatePlaceholder):""),a.R7$(7),a.vxM(ce.restrictedAccess?-1:9),a.R7$(),a.vxM(ce.formControl.valid?11:10))},dependencies:[E.dg,S.MQ,S.vr,S.bh,S.Uq,S.ZZ,y.X1,y.BC,y.l_,q.N4,q.IH,q.VI,xe.z,He.c,c.flO,c.WGl,O.Jj,v.D9],styles:["field-wrapper[_ngcontent-%COMP%]{container-type:inline-size}.input-group.iconic[_ngcontent-%COMP%]{flex-wrap:nowrap}@container (width < 320px){.input-group.iconic[_ngcontent-%COMP%]{flex-direction:column}}ng-select[_ngcontent-%COMP%] .ng-option>div{flex:1;min-width:0}.buttons[_ngcontent-%COMP%]{flex-wrap:wrap;flex-basis:max-content;--svg-color: var(--text-primary)}.buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(.btn-icon){width:120px}.buttons[_ngcontent-%COMP%] .csta-record[_ngcontent-%COMP%]{--bs-btn-padding-x: 0;min-width:36px;width:160px}.buttons[_ngcontent-%COMP%] .csta-record[_ngcontent-%COMP%] .position-relative[_ngcontent-%COMP%]{width:24px;height:20px}.buttons[_ngcontent-%COMP%] .csta-record[_ngcontent-%COMP%] .phone-icon[_ngcontent-%COMP%]{position:absolute;top:1px;left:0}.buttons[_ngcontent-%COMP%] .csta-record[_ngcontent-%COMP%] .mic-icon[_ngcontent-%COMP%]{position:absolute;bottom:-1px;right:-2px}.iconic[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{flex-wrap:nowrap}.iconic[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .csta-record[_ngcontent-%COMP%]{width:auto}"],changeDetection:0})}return z})()},21339(be,J,t){t.d(J,{t:()=>y});const y=new(t(85802).nKC)("PROMPT_SERVICE")},19968(be,J,t){t.d(J,{O:()=>S});var i=t(97201),y=t(4499),O=t(35547),v=t(85802);let S=(()=>{class E extends y.d{deleteCustomPrompt(l,C="body"){const u=l?.filename;if(null==u)throw new Error("Required parameter filename was null or undefined when calling deleteCustomPrompt.");const s=l?.ifMatch;let o=this.defaultHeaders;null!=s&&(o=o.set("If-Match",String(s))),o=this.configuration.addCredentialToHeaders("Application","Authorization",o,"Bearer ");const p=this.configuration.selectHeaderAccept(["application/json"]);void 0!==p&&(o=o.set("Accept",p));let M="json";p&&(M=p.startsWith("text")?"text":this.configuration.isJsonMime(p)?"json":"blob");let m=`/CustomPrompts(${this.configuration.encodeParam({name:"filename",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:h,withCredentials:R}=this.configuration;return this.httpClient.request("delete",`${h}${m}`,{responseType:M,...R?{withCredentials:R}:{},headers:o,observe:C})}deleteCustomPromptQuery(l,C="body",u=!1,s){const o=l.filename;if(null==o)throw new Error("Required parameter filename was null or undefined when calling deleteCustomPrompt.");return`/CustomPrompts(${this.configuration.encodeParam({name:"filename",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`}listCustomPrompt(l,C="body"){const u=l?.$top,s=l?.$skip,o=l?.$search,p=l?.$filter,M=l?.$count,m=l?.$orderby,h=l?.$select,R=l?.$expand;let f=new i.rx(this.encoder);
1f=this.addToHttpParams(f,"$top",u,i.l2.Form,!1),f=this.addToHttpParams(f,"$skip",s,i.l2.Form,!1),f=this.addToHttpParams(f,"$search",o,i.l2.Form,!1),f=this.addToHttpParams(f,"$filter",p,i.l2.Form,!1),f=this.addToHttpParams(f,"$count",M,i.l2.Form,!1),f=this.addToHttpParams(f,"$orderby",m,i.l2.Form,!1),f=this.addToHttpParams(f,"$select",h,i.l2.Form,!1),f=this.addToHttpParams(f,"$expand",R,i.l2.Form,!1);let T=this.defaultHeaders;T=this.configuration.addCredentialToHeaders("Application","Authorization",T,"Bearer ");const _=this.configuration.selectHeaderAccept(["application/json"]);void 0!==_&&(T=T.set("Accept",_));let r="json";_&&(r=_.startsWith("text")?"text":this.configuration.isJsonMime(_)?"json":"blob");const{basePath:B,withCredentials:K}=this.configuration;return this.httpClient.request("get",`${B}/CustomPrompts`,{params:f.toHttpParams(),responseType:r,...K?{withCredentials:K}:{},headers:T,observe:C})}listCustomPromptQuery(l,C="body",u=!1,s){const o=l.$top,p=l.$skip,M=l.$search,m=l.$filter,h=l.$count,R=l.$orderby,f=l.$select,T=l.$expand;let _=new i.rx(this.encoder);return _=this.addToHttpParams(_,"$top",o,i.l2.Form,!1),_=this.addToHttpParams(_,"$skip",p,i.l2.Form,!1),_=this.addToHttpParams(_,"$search",M,i.l2.Form,!1),_=this.addToHttpParams(_,"$filter",m,i.l2.Form,!1),_=this.addToHttpParams(_,"$count",h,i.l2.Form,!1),_=this.addToHttpParams(_,"$orderby",R,i.l2.Form,!1),_=this.addToHttpParams(_,"$select",f,i.l2.Form,!1),_=this.addToHttpParams(_,"$expand",T,i.l2.Form,!1),"/CustomPrompts?"+_.toString()}makeCallRecordCustomPrompt(l,C="body"){const u=l?.customPromptsMakeCallRecordCustomPromptRequestBody;if(null==u)throw new Error("Required parameter customPromptsMakeCallRecordCustomPromptRequestBody was null or undefined when calling makeCallRecordCustomPrompt.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/CustomPrompts/Pbx.MakeCallRecordCustomPrompt`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}makeCallRecordCustomPromptQuery(l,C="body",u=!1,s){if(null==l.customPromptsMakeCallRecordCustomPromptRequestBody)throw new Error("Required parameter customPromptsMakeCallRecordCustomPromptRequestBody was null or undefined when calling makeCallRecordCustomPrompt.");return"/CustomPrompts/Pbx.MakeCallRecordCustomPrompt"}static \u0275fac=(()=>{let l;return function(u){return(l||(l=O.xGo(E)))(u||E)}})();static \u0275prov=v.jDH({token:E,factory:E.\u0275fac,providedIn:"root"})}return E})()},15989(be,J,t){t.d(J,{v:()=>S});var i=t(97201),y=t(4499),O=t(35547),v=t(85802);let S=(()=>{class E extends y.d{editLicenseInfo(l,C="body"){const u=l?.licenseStatusEditLicenseInfoRequestBody;if(null==u)throw new Error("Required parameter licenseStatusEditLicenseInfoRequestBody was null or undefined when calling editLicenseInfo.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/LicenseStatus/Pbx.EditLicenseInfo`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}editLicenseInfoQuery(l,C="body",u=!1,s){if(null==l.licenseStatusEditLicenseInfoRequestBody)throw new Error("Required parameter licenseStatusEditLicenseInfoRequestBody was null or undefined when calling editLicenseInfo.");return"/LicenseStatus/Pbx.EditLicenseInfo"}getLicenseStatus(l,C="body"){const u=l?.$select,s=l?.$expand;let o=new i.rx(this.encoder);o=this.addToHttpParams(o,"$select",u,i.l2.Form,!1),o=this.addToHttpParams(o,"$expand",s,i.l2.Form,!1);let p=this.defaultHeaders;p=this.configuration.addCredentialToHeaders("Application","Authorization",p,"Bearer ");const M=this.configuration.selectHeaderAccept(["application/json"]);void 0!==M&&(p=p.set("Accept",M));let m="json";M&&(m=M.startsWith("text")?"text":this.configuration.isJsonMime(M
1)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("get",`${R}/LicenseStatus`,{params:o.toHttpParams(),responseType:m,...f?{withCredentials:f}:{},headers:p,observe:C})}getLicenseStatusQuery(l,C="body",u=!1,s){const o=l.$select,p=l.$expand;let M=new i.rx(this.encoder);return M=this.addToHttpParams(M,"$select",o,i.l2.Form,!1),M=this.addToHttpParams(M,"$expand",p,i.l2.Form,!1),"/LicenseStatus?"+M.toString()}linkPartner(l,C="body"){const u=l?.licenseStatusLinkPartnerRequestBody;if(null==u)throw new Error("Required parameter licenseStatusLinkPartnerRequestBody was null or undefined when calling linkPartner.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/LicenseStatus/Pbx.LinkPartner`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}linkPartnerQuery(l,C="body",u=!1,s){if(null==l.licenseStatusLinkPartnerRequestBody)throw new Error("Required parameter licenseStatusLinkPartnerRequestBody was null or undefined when calling linkPartner.");return"/LicenseStatus/Pbx.LinkPartner"}partnerInfo(l,C="body"){const u=l?.resellerId;if(null==u)throw new Error("Required parameter resellerId was null or undefined when calling partnerInfo.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));let p="json";o&&(p=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");let M=`/LicenseStatus/Pbx.PartnerInfo(resellerId=${this.configuration.encodeParam({name:"resellerId",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:m,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${m}${M}`,{responseType:p,...h?{withCredentials:h}:{},headers:s,observe:C})}partnerInfoQuery(l,C="body",u=!1,s){const o=l.resellerId;if(null==o)throw new Error("Required parameter resellerId was null or undefined when calling partnerInfo.");return`/LicenseStatus/Pbx.PartnerInfo(resellerId=${this.configuration.encodeParam({name:"resellerId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`}refreshLicenseStatus(l="body"){let C=this.defaultHeaders;C=this.configuration.addCredentialToHeaders("Application","Authorization",C,"Bearer ");const u=this.configuration.selectHeaderAccept(["application/json"]);void 0!==u&&(C=C.set("Accept",u));let s="json";u&&(s=u.startsWith("text")?"text":this.configuration.isJsonMime(u)?"json":"blob");const{basePath:p,withCredentials:M}=this.configuration;return this.httpClient.request("post",`${p}/LicenseStatus/Pbx.RefreshLicenseStatus`,{responseType:s,...M?{withCredentials:M}:{},headers:C,observe:l})}refreshLicenseStatusQuery(l="body",C=!1,u){return"/LicenseStatus/Pbx.RefreshLicenseStatus"}replaceLicenseKey(l,C="body"){const u=l?.licenseStatusReplaceLicenseKeyRequestBody;if(null==u)throw new Error("Required parameter licenseStatusReplaceLicenseKeyRequestBody was null or undefined when calling replaceLicenseKey.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/LicenseStatus/Pbx.ReplaceLicenseKey`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}
1replaceLicenseKeyQuery(l,C="body",u=!1,s){if(null==l.licenseStatusReplaceLicenseKeyRequestBody)throw new Error("Required parameter licenseStatusReplaceLicenseKeyRequestBody was null or undefined when calling replaceLicenseKey.");return"/LicenseStatus/Pbx.ReplaceLicenseKey"}unlinkPartner(l="body"){let C=this.defaultHeaders;C=this.configuration.addCredentialToHeaders("Application","Authorization",C,"Bearer ");const u=this.configuration.selectHeaderAccept(["application/json"]);void 0!==u&&(C=C.set("Accept",u));let s="json";u&&(s=u.startsWith("text")?"text":this.configuration.isJsonMime(u)?"json":"blob");const{basePath:p,withCredentials:M}=this.configuration;return this.httpClient.request("post",`${p}/LicenseStatus/Pbx.UnlinkPartner`,{responseType:s,...M?{withCredentials:M}:{},headers:C,observe:l})}unlinkPartnerQuery(l="body",C=!1,u){return"/LicenseStatus/Pbx.UnlinkPartner"}static \u0275fac=(()=>{let l;return function(u){return(l||(l=O.xGo(E)))(u||E)}})();static \u0275prov=v.jDH({token:E,factory:E.\u0275fac,providedIn:"root"})}return E})()},98317(be,J,t){t.d(J,{r:()=>S});var i=t(97201),y=t(4499),O=t(35547),v=t(85802);let S=(()=>{class E extends y.d{getMyGroup(l,C="body"){const u=l?.$select,s=l?.$expand;let o=new i.rx(this.encoder);o=this.addToHttpParams(o,"$select",u,i.l2.Form,!1),o=this.addToHttpParams(o,"$expand",s,i.l2.Form,!1);let p=this.defaultHeaders;p=this.configuration.addCredentialToHeaders("Application","Authorization",p,"Bearer ");const M=this.configuration.selectHeaderAccept(["application/json"]);void 0!==M&&(p=p.set("Accept",M));let m="json";M&&(m=M.startsWith("text")?"text":this.configuration.isJsonMime(M)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("get",`${R}/MyGroup`,{params:o.toHttpParams(),responseType:m,...f?{withCredentials:f}:{},headers:p,observe:C})}getMyGroupQuery(l,C="body",u=!1,s){const o=l.$select,p=l.$expand;let M=new i.rx(this.encoder);return M=this.addToHttpParams(M,"$select",o,i.l2.Form,!1),M=this.addToHttpParams(M,"$expand",p,i.l2.Form,!1),"/MyGroup?"+M.toString()}getMyGroupPartnerInfo(l,C="body"){const u=l?.resellerId;if(null==u)throw new Error("Required parameter resellerId was null or undefined when calling getMyGroupPartnerInfo.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));let p="json";o&&(p=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");let M=`/MyGroup/Pbx.GetMyGroupPartnerInfo(resellerId=${this.configuration.encodeParam({name:"resellerId",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:m,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${m}${M}`,{responseType:p,...h?{withCredentials:h}:{},headers:s,observe:C})}getMyGroupPartnerInfoQuery(l,C="body",u=!1,s){const o=l.resellerId;if(null==o)throw new Error("Required parameter resellerId was null or undefined when calling getMyGroupPartnerInfo.");return`/MyGroup/Pbx.GetMyGroupPartnerInfo(resellerId=${this.configuration.encodeParam({name:"resellerId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`}getMyGroupRestrictions(l="body"){let C=this.defaultHeaders;C=this.configuration.addCredentialToHeaders("Application","Authorization",C,"Bearer ");const u=this.configuration.selectHeaderAccept(["application/json"]);void 0!==u&&(C=C.set("Accept",u));let s="json";u&&(s=u.startsWith("text")?"text":this.configuration.isJsonMime(u)?"json":"blob");const{basePath:p,withCredentials:M}=this.configuration;return this.httpClient.request("get",`${p}/MyGroup/Pbx.GetRestrictions()`,{responseType:s,...M?{withCredentials:M}:{},headers:C,observe:l})}getMyGroupRestrictionsQuery(l="body",C=!1,u){return"/MyGroup/Pbx.GetRestrictions()"}linkMyGroupPartner(l,C="body"){const u=l?.linkMyGroupPartnerRequestBody;if(null==u)throw new Error("Required parameter linkMyGroupPartnerRequestBody was null or undefined when calling linkMyGroupPartner.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/MyGroup/Pbx.LinkMyGroupPartner`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}
1linkMyGroupPartnerQuery(l,C="body",u=!1,s){if(null==l.linkMyGroupPartnerRequestBody)throw new Error("Required parameter linkMyGroupPartnerRequestBody was null or undefined when calling linkMyGroupPartner.");return"/MyGroup/Pbx.LinkMyGroupPartner"}listMyGroupMembers(l,C="body"){const u=l?.$top,s=l?.$skip,o=l?.$search,p=l?.$filter,M=l?.$count,m=l?.$orderby,h=l?.$select,R=l?.$expand;let f=new i.rx(this.encoder);f=this.addToHttpParams(f,"$top",u,i.l2.Form,!1),f=this.addToHttpParams(f,"$skip",s,i.l2.Form,!1),f=this.addToHttpParams(f,"$search",o,i.l2.Form,!1),f=this.addToHttpParams(f,"$filter",p,i.l2.Form,!1),f=this.addToHttpParams(f,"$count",M,i.l2.Form,!1),f=this.addToHttpParams(f,"$orderby",m,i.l2.Form,!1),f=this.addToHttpParams(f,"$select",h,i.l2.Form,!1),f=this.addToHttpParams(f,"$expand",R,i.l2.Form,!1);let T=this.defaultHeaders;T=this.configuration.addCredentialToHeaders("Application","Authorization",T,"Bearer ");const _=this.configuration.selectHeaderAccept(["application/json"]);void 0!==_&&(T=T.set("Accept",_));let r="json";_&&(r=_.startsWith("text")?"text":this.configuration.isJsonMime(_)?"json":"blob");const{basePath:B,withCredentials:K}=this.configuration;return this.httpClient.request("get",`${B}/MyGroup/Members`,{params:f.toHttpParams(),responseType:r,...K?{withCredentials:K}:{},headers:T,observe:C})}listMyGroupMembersQuery(l,C="body",u=!1,s){const o=l.$top,p=l.$skip,M=l.$search,m=l.$filter,h=l.$count,R=l.$orderby,f=l.$select,T=l.$expand;let _=new i.rx(this.encoder);return _=this.addToHttpParams(_,"$top",o,i.l2.Form,!1),_=this.addToHttpParams(_,"$skip",p,i.l2.Form,!1),_=this.addToHttpParams(_,"$search",M,i.l2.Form,!1),_=this.addToHttpParams(_,"$filter",m,i.l2.Form,!1),_=this.addToHttpParams(_,"$count",h,i.l2.Form,!1),_=this.addToHttpParams(_,"$orderby",R,i.l2.Form,!1),_=this.addToHttpParams(_,"$select",f,i.l2.Form,!1),_=this.addToHttpParams(_,"$expand",T,i.l2.Form,!1),"/MyGroup/Members?"+_.toString()}listMyGroupRights(l,C="body"){const u=l?.$top,s=l?.$skip,o=l?.$search,p=l?.$filter,M=l?.$count,m=l?.$orderby,h=l?.$select,R=l?.$expand;let f=new i.rx(this.encoder);f=this.addToHttpParams(f,"$top",u,i.l2.Form,!1),f=this.addToHttpParams(f,"$skip",s,i.l2.Form,!1),f=this.addToHttpParams(f,"$search",o,i.l2.Form,!1),f=this.addToHttpParams(f,"$filter",p,i.l2.Form,!1),f=this.addToHttpParams(f,"$count",M,i.l2.Form,!1),f=this.addToHttpParams(f,"$orderby",m,i.l2.Form,!1),f=this.addToHttpParams(f,"$select",h,i.l2.Form,!1),f=this.addToHttpParams(f,"$expand",R,i.l2.Form,!1);let T=this.defaultHeaders;T=this.configuration.addCredentialToHeaders("Application","Authorization",T,"Bearer ");const _=this.configuration.selectHeaderAccept(["application/json"]);void 0!==_&&(T=T.set("Accept",_));let r="json";_&&(r=_.startsWith("text")?"text":this.configuration.isJsonMime(_)?"json":"blob");const{basePath:B,withCredentials:K}=this.configuration;return this.httpClient.request("get",`${B}/MyGroup/Rights`,{params:f.toHttpParams(),responseType:r,...K?{withCredentials:K}:{},headers:T,observe:C})}listMyGroupRightsQuery(l,C="body",u=!1,s){const o=l.$top,p=l.$skip,M=l.$search,m=l.$filter,h=l.$count,R=l.$orderby,f=l.$select,T=l.$expand;let _=new i.rx(this.encoder);return _=this.addToHttpParams(_,"$top",o,i.l2.Form,!1),_=this.addToHttpParams(_,"$skip",p,i.l2.Form,!1),_=this.addToHttpParams(_,"$search",M,i.l2.Form,!1),_=this.addToHttpParams(_,"$filter",m,i.l2.Form,!1),_=this.addToHttpParams(_,"$count",h,i.l2.Form,!1),_=this.addToHttpParams(_,"$orderby",R,i.l2.Form,!1),_=this.addToHttpParams(_,"$select",f,i.l2.Form,!1),_=this.addToHttpParams(_,"$expand",T,i.l2.Form,!1),"/MyGroup/Rights?"+_.toString()}replaceMyGroupLicenseKey(l,C="body"){const u=l?.replaceMyGroupLicenseKeyRequestBody;if(null==u)throw new Error("Required parameter replaceMyGroupLicenseKeyRequestBody was null or undefined when calling replaceMyGroupLicenseKey.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/MyGroup/Pbx.ReplaceMyGroupLicenseKey`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}
1replaceMyGroupLicenseKeyQuery(l,C="body",u=!1,s){if(null==l.replaceMyGroupLicenseKeyRequestBody)throw new Error("Required parameter replaceMyGroupLicenseKeyRequestBody was null or undefined when calling replaceMyGroupLicenseKey.");return"/MyGroup/Pbx.ReplaceMyGroupLicenseKey"}unlinkMyGroupPartner(l="body"){let C=this.defaultHeaders;C=this.configuration.addCredentialToHeaders("Application","Authorization",C,"Bearer ");const u=this.configuration.selectHeaderAccept(["application/json"]);void 0!==u&&(C=C.set("Accept",u));let s="json";u&&(s=u.startsWith("text")?"text":this.configuration.isJsonMime(u)?"json":"blob");const{basePath:p,withCredentials:M}=this.configuration;return this.httpClient.request("post",`${p}/MyGroup/Pbx.UnlinkMyGroupPartner`,{responseType:s,...M?{withCredentials:M}:{},headers:C,observe:l})}unlinkMyGroupPartnerQuery(l="body",C=!1,u){return"/MyGroup/Pbx.UnlinkMyGroupPartner"}updateMyGroup(l,C="body"){const u=l?.pbxGroup;if(null==u)throw new Error("Required parameter pbxGroup was null or undefined when calling updateMyGroup.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("patch",`${R}/MyGroup`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}updateMyGroupQuery(l,C="body",u=!1,s){if(null==l.pbxGroup)throw new Error("Required parameter pbxGroup was null or undefined when calling updateMyGroup.");return"/MyGroup"}static \u0275fac=(()=>{let l;return function(u){return(l||(l=O.xGo(E)))(u||E)}})();static \u0275prov=v.jDH({token:E,factory:E.\u0275fac,providedIn:"root"})}return E})()},95847(be,J,t){t.d(J,{u:()=>S});var i=t(97201),y=t(4499),O=t(35547),v=t(85802);let S=(()=>{class E extends y.d{batchDelete(l,C="body"){const u=l?.usersBatchDeleteRequestBody;if(null==u)throw new Error("Required parameter usersBatchDeleteRequestBody was null or undefined when calling batchDelete.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/Users/Pbx.BatchDelete`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}batchDeleteQuery(l,C="body",u=!1,s){if(null==l.usersBatchDeleteRequestBody)throw new Error("Required parameter usersBatchDeleteRequestBody was null or undefined when calling batchDelete.");return"/Users/Pbx.BatchDelete"}bulkUpdate(l,C="body"){const u=l?.usersBulkUpdateRequestBody;if(null==u)throw new Error("Required parameter usersBulkUpdateRequestBody was null or undefined when calling bulkUpdate.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/Users/Pbx.BulkUpdate`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}bulkUpdateQuery(l,C="body",u=!1,s){if(null==l.usersBulkUpdateRequestBody)throw new Error("Required parameter usersBulkUpdateRequestBody was null or undefined when calling bulkUpdate.");return"/Users/Pbx.BulkUpdate"}createUser(l,C="body"){const u=l?.pbxUser;if(null==u)throw new Error("Required parameter pbxUser was null or undefined when calling createUser.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/Users`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}
1createUserQuery(l,C="body",u=!1,s){if(null==l.pbxUser)throw new Error("Required parameter pbxUser was null or undefined when calling createUser.");return"/Users"}deleteUser(l,C="body"){const u=l?.id;if(null==u)throw new Error("Required parameter id was null or undefined when calling deleteUser.");const s=l?.ifMatch;let o=this.defaultHeaders;null!=s&&(o=o.set("If-Match",String(s))),o=this.configuration.addCredentialToHeaders("Application","Authorization",o,"Bearer ");const p=this.configuration.selectHeaderAccept(["application/json"]);void 0!==p&&(o=o.set("Accept",p));let M="json";p&&(M=p.startsWith("text")?"text":this.configuration.isJsonMime(p)?"json":"blob");let m=`/Users(${this.configuration.encodeParam({name:"id",value:u,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:h,withCredentials:R}=this.configuration;return this.httpClient.request("delete",`${h}${m}`,{responseType:M,...R?{withCredentials:R}:{},headers:o,observe:C})}deleteUserQuery(l,C="body",u=!1,s){const o=l.id;if(null==o)throw new Error("Required parameter id was null or undefined when calling deleteUser.");return`/Users(${this.configuration.encodeParam({name:"id",value:o,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`}downloadGreeting(l,C="body"){const u=l?.userId;if(null==u)throw new Error("Required parameter userId was null or undefined when calling downloadGreeting.");const s=l?.fileName;if(null==s)throw new Error("Required parameter fileName was null or undefined when calling downloadGreeting.");let o=this.defaultHeaders;o=this.configuration.addCredentialToHeaders("Application","Authorization",o,"Bearer ");const p=this.configuration.selectHeaderAccept(["application/json"]);void 0!==p&&(o=o.set("Accept",p));let M="json";p&&(M=p.startsWith("text")?"text":this.configuration.isJsonMime(p)?"json":"blob");let m=`/Users/Pbx.DownloadGreeting(userId=${this.configuration.encodeParam({name:"userId",value:u,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},fileName=${this.configuration.encodeParam({name:"fileName",value:s,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:h,withCredentials:R}=this.configuration;return this.httpClient.request("get",`${h}${m}`,{responseType:M,...R?{withCredentials:R}:{},headers:o,observe:C})}downloadGreetingQuery(l,C="body",u=!1,s){const o=l.userId;if(null==o)throw new Error("Required parameter userId was null or undefined when calling downloadGreeting.");const p=l.fileName;if(null==p)throw new Error("Required parameter fileName was null or undefined when calling downloadGreeting.");return`/Users/Pbx.DownloadGreeting(userId=${this.configuration.encodeParam({name:"userId",value:o,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},fileName=${this.configuration.encodeParam({name:"fileName",value:p,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`}exportExtensions(l,C="body"){const u=l?.$top,s=l?.$skip,o=l?.$search,p=l?.$filter,M=l?.$count,m=l?.$select,h=l?.$orderby,R=l?.$expand;let f=new i.rx(this.encoder);f=this.addToHttpParams(f,"$top",u,i.l2.Form,!1),f=this.addToHttpParams(f,"$skip",s,i.l2.Form,!1),f=this.addToHttpParams(f,"$search",o,i.l2.Form,!1),f=this.addToHttpParams(f,"$filter",p,i.l2.Form,!1),f=this.addToHttpParams(f,"$count",M,i.l2.Form,!1),f=this.addToHttpParams(f,"$select",m,i.l2.Form,!1),f=this.addToHttpParams(f,"$orderby",h,i.l2.Form,!1),f=this.addToHttpParams(f,"$expand",R,i.l2.Form,!1);let T=this.defaultHeaders;T=this.configuration.addCredentialToHeaders("Application","Authorization",T,"Bearer ");const _=this.configuration.selectHeaderAccept(["application/json"]);void 0!==_&&(T=T.set("Accept",_));let r="json";_&&(r=_.startsWith("text")?"text":this.configuration.isJsonMime(_)?"json":"blob");const{basePath:B,withCredentials:K}=this.configuration;return this.httpClient.request("get",`${B}/Users/Pbx.ExportExtensions()`,{params:f.toHttpParams(),responseType:r,...K?{withCredentials:K}:{},headers:T,observe:C})}exportExtensionsQuery(l,C="body",u=!1,s){const o=l.$top,p=l.$skip,M=l.$search,m=l.$filter,h=l.$count,R=l.$select,f=l.$orderby,T=l.$expand;let _=new i.rx(this.encoder);return _=this.addToHttpParams(_,"$top",o,i.l2.Form,!1),_=this.addToHttpParams(_,"$skip",p,i.l2.Form,!1),_=this.addToHttpParams(_,"$search",M,i.l2.Form,!1),_=this.addToHttpParams(_,"$filter",m,i.l2.Form,!1),_=this.addToHttpParams(_,"$count",h,i.l2.Form,!1),_=this.addToHttpParams(_,"$select",R,i.l2.Form,!1),_=this.addToHttpParams(_,"$orderby",f,i.l2.Form,!1),_=this.addToHttpParams(_,"$expand",T,i.l2.Form,!1),"/Users/Pbx.ExportExtensions()?"+_.toString()}generateProvLink(l,C="body"){const u=l?.id;if(null==u)throw new Error("Required parameter id was null or undefined when calling generateProvLink.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));let p="json";o&&(p=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");let M=`/Users(${this.configuration.encodeParam({name:"id",value:u,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.GenerateProvLink()`;const{basePath:m,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${m}${M}`,{responseType:p,...h?{withCredentials:h}:{},headers:s,observe:C})}generateProvLinkQuery(l,C="body",u=!1,s){const o=l.id;if(null==o)throw new Error("Required parameter id was null or undefined when calling generateProvLink.");return`/Users(${this.configuration.encodeParam({name:"id",value:o,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.GenerateProvLink()`}getDuplicatedEmails(l,C="body"){const u=l?.usersGetDuplicatedEmailsRequestBody;if(null==u)throw new Error("Required parameter usersGetDuplicatedEmailsRequestBody was null or undefined when calling getDuplicatedEmails.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/Users/Pbx.GetDuplicatedEmails`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}
1getDuplicatedEmailsQuery(l,C="body",u=!1,s){if(null==l.usersGetDuplicatedEmailsRequestBody)throw new Error("Required parameter usersGetDuplicatedEmailsRequestBody was null or undefined when calling getDuplicatedEmails.");return"/Users/Pbx.GetDuplicatedEmails"}getFirstAvailableExtensionNumber(l="body"){let C=this.defaultHeaders;C=this.configuration.addCredentialToHeaders("Application","Authorization",C,"Bearer ");const u=this.configuration.selectHeaderAccept(["application/json"]);void 0!==u&&(C=C.set("Accept",u));let s="json";u&&(s=u.startsWith("text")?"text":this.configuration.isJsonMime(u)?"json":"blob");const{basePath:p,withCredentials:M}=this.configuration;return this.httpClient.request("get",`${p}/Users/Pbx.GetFirstAvailableExtensionNumber()`,{responseType:s,...M?{withCredentials:M}:{},headers:C,observe:l})}getFirstAvailableExtensionNumberQuery(l="body",C=!1,u){return"/Users/Pbx.GetFirstAvailableExtensionNumber()"}getFirstAvailableHotdeskingNumber(l="body"){let C=this.defaultHeaders;C=this.configuration.addCredentialToHeaders("Application","Authorization",C,"Bearer ");const u=this.configuration.selectHeaderAccept(["application/json"]);void 0!==u&&(C=C.set("Accept",u));let s="json";u&&(s=u.startsWith("text")?"text":this.configuration.isJsonMime(u)?"json":"blob");const{basePath:p,withCredentials:M}=this.configuration;return this.httpClient.request("get",`${p}/Users/Pbx.GetFirstAvailableHotdeskingNumber()`,{responseType:s,...M?{withCredentials:M}:{},headers:C,observe:l})}getFirstAvailableHotdeskingNumberQuery(l="body",C=!1,u){return"/Users/Pbx.GetFirstAvailableHotdeskingNumber()"}getMultiEditGreetings(l,C="body"){const u=l?.usersGetMultiEditGreetingsRequestBody;if(null==u)throw new Error("Required parameter usersGetMultiEditGreetingsRequestBody was null or undefined when calling getMultiEditGreetings.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/Users/Pbx.GetMultiEditGreetings`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}getMultiEditGreetingsQuery(l,C="body",u=!1,s){if(null==l.usersGetMultiEditGreetingsRequestBody)throw new Error("Required parameter usersGetMultiEditGreetingsRequestBody was null or undefined when calling getMultiEditGreetings.");return"/Users/Pbx.GetMultiEditGreetings"}getPhoneRegistrar(l,C="body"){const u=l?.mac;if(null==u)throw new Error("Required parameter mac was null or undefined when calling getPhoneRegistrar.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));let p="json";o&&(p=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");let M=`/Users/Pbx.GetPhoneRegistrar(mac=${this.configuration.encodeParam({name:"mac",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:m,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${m}${M}`,{responseType:p,...h?{withCredentials:h}:{},headers:s,observe:C})}getPhoneRegistrarQuery(l,C="body",u=!1,s){const o=l.mac;if(null==o)throw new Error("Required parameter mac was null or undefined when calling getPhoneRegistrar.");return`/Users/Pbx.GetPhoneRegistrar(mac=${this.configuration.encodeParam({name:"mac",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`}getPhoneRegistrars(l,C="body"){const u=l?.usersGetPhoneRegistrarsRequestBody;if(null==u)throw new Error("Required parameter usersGetPhoneRegistrarsRequestBody was null or undefined when calling getPhoneRegistrars.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/Users/Pbx.GetPhoneRegistrars`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}
1getPhoneRegistrarsQuery(l,C="body",u=!1,s){if(null==l.usersGetPhoneRegistrarsRequestBody)throw new Error("Required parameter usersGetPhoneRegistrarsRequestBody was null or undefined when calling getPhoneRegistrars.");return"/Users/Pbx.GetPhoneRegistrars"}getPhoneSecret(l,C="body"){const u=l?.id;if(null==u)throw new Error("Required parameter id was null or undefined when calling getPhoneSecret.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));let p="json";o&&(p=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");let M=`/Users(${this.configuration.encodeParam({name:"id",value:u,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.GetPhoneSecret()`;const{basePath:m,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${m}${M}`,{responseType:p,...h?{withCredentials:h}:{},headers:s,observe:C})}getPhoneSecretQuery(l,C="body",u=!1,s){const o=l.id;if(null==o)throw new Error("Required parameter id was null or undefined when calling getPhoneSecret.");return`/Users(${this.configuration.encodeParam({name:"id",value:o,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.GetPhoneSecret()`}getUser(l,C="body"){const u=l?.id;if(null==u)throw new Error("Required parameter id was null or undefined when calling getUser.");const s=l?.$select,o=l?.$expand;let p=new i.rx(this.encoder);p=this.addToHttpParams(p,"$select",s,i.l2.Form,!1),p=this.addToHttpParams(p,"$expand",o,i.l2.Form,!1);let M=this.defaultHeaders;M=this.configuration.addCredentialToHeaders("Application","Authorization",M,"Bearer ");const m=this.configuration.selectHeaderAccept(["application/json"]);void 0!==m&&(M=M.set("Accept",m));let h="json";m&&(h=m.startsWith("text")?"text":this.configuration.isJsonMime(m)?"json":"blob");let R=`/Users(${this.configuration.encodeParam({name:"id",value:u,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:f,withCredentials:T}=this.configuration;return this.httpClient.request("get",`${f}${R}`,{params:p.toHttpParams(),responseType:h,...T?{withCredentials:T}:{},headers:M,observe:C})}getUserQuery(l,C="body",u=!1,s){const o=l.id;if(null==o)throw new Error("Required parameter id was null or undefined when calling getUser.");const p=l.$select,M=l.$expand;let m=new i.rx(this.encoder);return m=this.addToHttpParams(m,"$select",p,i.l2.Form,!1),m=this.addToHttpParams(m,"$expand",M,i.l2.Form,!1),`/Users(${this.configuration.encodeParam({name:"id",value:o,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+m.toString()}getUserByNumber(l,C="body"){const u=l?.number;if(null==u)throw new Error("Required parameter number was null or undefined when calling getUserByNumber.");const s=l?.$select,o=l?.$expand;let p=new i.rx(this.encoder);p=this.addToHttpParams(p,"$select",s,i.l2.Form,!1),p=this.addToHttpParams(p,"$expand",o,i.l2.Form,!1);let M=this.defaultHeaders;M=this.configuration.addCredentialToHeaders("Application","Authorization",M,"Bearer ");const m=this.configuration.selectHeaderAccept(["application/json"]);void 0!==m&&(M=M.set("Accept",m));let h="json";m&&(h=m.startsWith("text")?"text":this.configuration.isJsonMime(m)?"json":"blob");let R=`/Users(Number=${this.configuration.encodeParam({name:"number",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:f,withCredentials:T}=this.configuration;return this.httpClient.request("get",`${f}${R}`,{params:p.toHttpParams(),responseType:h,...T?{withCredentials:T}:{},headers:M,observe:C})}getUserByNumberQuery(l,C="body",u=!1,s){const o=l.number;if(null==o)throw new Error("Required parameter number was null or undefined when calling getUserByNumber.");const p=l.$select,M=l.$expand;let m=new i.rx(this.encoder);return m=this.addToHttpParams(m,"$select",p,i.l2.Form,!1),m=this.addToHttpParams(m,"$expand",M,i.l2.Form,!1),`/Users(Number=${this.configuration.encodeParam({name:"number",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+m.toString()}
1hasDuplicatedEmail(l,C="body"){const u=l?.id;if(null==u)throw new Error("Required parameter id was null or undefined when calling hasDuplicatedEmail.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));let p="json";o&&(p=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");let M=`/Users(${this.configuration.encodeParam({name:"id",value:u,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.HasDuplicatedEmail()`;const{basePath:m,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${m}${M}`,{responseType:p,...h?{withCredentials:h}:{},headers:s,observe:C})}hasDuplicatedEmailQuery(l,C="body",u=!1,s){const o=l.id;if(null==o)throw new Error("Required parameter id was null or undefined when calling hasDuplicatedEmail.");return`/Users(${this.configuration.encodeParam({name:"id",value:o,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.HasDuplicatedEmail()`}installFirmware(l,C="body"){const u=l?.usersInstallFirmwareRequestBody;if(null==u)throw new Error("Required parameter usersInstallFirmwareRequestBody was null or undefined when calling installFirmware.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/Users/Pbx.InstallFirmware`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}installFirmwareQuery(l,C="body",u=!1,s){if(null==l.usersInstallFirmwareRequestBody)throw new Error("Required parameter usersInstallFirmwareRequestBody was null or undefined when calling installFirmware.");return"/Users/Pbx.InstallFirmware"}listForwardingProfiles(l,C="body"){const u=l?.id;if(null==u)throw new Error("Required parameter id was null or undefined when calling listForwardingProfiles.");const s=l?.$top,o=l?.$skip,p=l?.$search,M=l?.$filter,m=l?.$count,h=l?.$orderby,R=l?.$select,f=l?.$expand;let T=new i.rx(this.encoder);T=this.addToHttpParams(T,"$top",s,i.l2.Form,!1),T=this.addToHttpParams(T,"$skip",o,i.l2.Form,!1),T=this.addToHttpParams(T,"$search",p,i.l2.Form,!1),T=this.addToHttpParams(T,"$filter",M,i.l2.Form,!1),T=this.addToHttpParams(T,"$count",m,i.l2.Form,!1),T=this.addToHttpParams(T,"$orderby",h,i.l2.Form,!1),T=this.addToHttpParams(T,"$select",R,i.l2.Form,!1),T=this.addToHttpParams(T,"$expand",f,i.l2.Form,!1);let _=this.defaultHeaders;_=this.configuration.addCredentialToHeaders("Application","Authorization",_,"Bearer ");const r=this.configuration.selectHeaderAccept(["application/json"]);void 0!==r&&(_=_.set("Accept",r));let Q="json";r&&(Q=r.startsWith("text")?"text":this.configuration.isJsonMime(r)?"json":"blob");let B=`/Users(${this.configuration.encodeParam({name:"id",value:u,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/ForwardingProfiles`;const{basePath:K,withCredentials:ie}=this.configuration;return this.httpClient.request("get",`${K}${B}`,{params:T.toHttpParams(),responseType:Q,...ie?{withCredentials:ie}:{},headers:_,observe:C})}listForwardingProfilesQuery(l,C="body",u=!1,s){const o=l.id;if(null==o)throw new Error("Required parameter id was null or undefined when calling listForwardingProfiles.");const p=l.$top,M=l.$skip,m=l.$search,h=l.$filter,R=l.$count,f=l.$orderby,T=l.$select,_=l.$expand;let r=new i.rx(this.encoder);return r=this.addToHttpParams(r,"$top",p,i.l2.Form,!1),r=this.addToHttpParams(r,"$skip",M,i.l2.Form,!1),r=this.addToHttpParams(r,"$search",m,i.l2.Form,!1),r=this.addToHttpParams(r,"$filter",h,i.l2.Form,!1),r=this.addToHttpParams(r,"$count",R,i.l2.Form,!1),r=this.addToHttpParams(r,"$orderby",f,i.l2.Form,!1),r=this.addToHttpParams(r,"$select",T,i.l2.Form,!1),r=this.addToHttpParams(r,"$expand",_,i.l2.Form,!1),`/Users(${this.configuration.encodeParam({name:"id",value:o,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/ForwardingProfiles?`+r.toString()}listGreetings(l,C="body"){const u=l?.id;if(null==u)throw new Error("Required parameter id was null or undefined when calling listGreetings.");const s=l?.$top,o=l?.$skip,p=l?.$search,M=l?.$filter,m=l?.$count,h=l?.$orderby,R=l?.$select,f=l?.$expand;let T=new i.rx(this.encoder);T=this.addToHttpParams(T,"$top",s,i.l2.Form,!1),T=this.addToHttpParams(T,"$skip",o,i.l2.Form,!1),T=this.addToHttpParams(T,"$search",p,i.l2.Form,!1),T=this.addToHttpParams(T,"$filter",M,i.l2.Form,!1),T=this.addToHttpParams(T,"$count",m,i.l2.Form,!1),T=this.addToHttpParams(T,"$orderby",h,i.l2.Form,!1),T=this.addToHttpParams(T,"$select",R,i.l2.Form,!1),T=this.addToHttpParams(T,"$expand",f,i.l2.Form,!1);let _=this.defaultHeaders;_=this.configuration.addCredentialToHeaders("Application","Authorization",_,"Bearer ");const r=this.configuration.selectHeaderAccept(["application/json"]);void 0!==r&&(_=_.set("Accept",r));let Q="json";r&&(Q=r.startsWith("text")?"text":this.configuration.isJsonMime(r)?"json":"blob");let B=`/Users(${this.configuration.encodeParam({name:"id",value:u,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Greetings`;const{basePath:K,withCredentials:ie}=this.configuration;return this.httpClient.request("get",`${K}${B}`,{params:T.toHttpParams(),responseType:Q,...ie?{withCredentials:ie}:{},headers:_,observe:C})}listGreetingsQuery(l,C="body",u=!1,s){const o=l.id;if(null==o)throw new Error("Required parameter id was null or undefined when calling listGreetings.");const p=l.$top,M=l.$skip,m=l.$search,h=l.$filter,R=l.$count,f=l.$orderby,T=l.$select,_=l.$expand;let r=new i.rx(this.encoder);return r=this.addToHttpParams(r,"$top",p,i.l2.Form,!1),r=this.addToHttpParams(r,"$skip",M,i.l2.Form,!1),r=this.addToHttpParams(r,"$search",m,i.l2.Form,!1),r=this.addToHttpParams(r,"$filter",h,i.l2.Form,!1),r=this.addToHttpParams(r,"$count",R,i.l2.Form,!1),r=this.addToHttpParams(r,"$orderby",f,i.l2.Form,!1),r=this.addToHttpParams(r,"$select",T,i.l2.Form,!1),r=this.addToHttpParams(r,"$expand",_,i.l2.Form,!1),`/Users(${this.configuration.encodeParam({name:"id",value:o,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Greetings?`+r.toString()}listGroups(l,C="body"){const u=l?.id;if(null==u)throw new Error("Required parameter id was null or undefined when calling listGroups.");const s=l?.$top,o=l?.$skip,p=l?.$search,M=l?.$filter,m=l?.$count,h=l?.$orderby,R=l?.$select,f=l?.$expand;let T=new i.rx(this.encoder);T=this.addToHttpParams(T,"$top",s,i.l2.Form,!1),T=this.addToHttpParams(T,"$skip",o,i.l2.Form,!1),T=this.addToHttpParams(T,"$search",p,i.l2.Form,!1),T=this.addToHttpParams(T,"$filter",M,i.l2.Form,!1),T=this.addToHttpParams(T,"$count",m,i.l2.Form,!1),T=this.addToHttpParams(T,"$orderby",h,i.l2.Form,!1),T=this.addToHttpParams(T,"$select",R,i.l2.Form,!1),T=this.addToHttpParams(T,"$expand",f,i.l2.Form,!1);let _=this.defaultHeaders;_=this.configuration.addCredentialToHeaders("Application","Authorization",_,"Bearer ");const r=this.configuration.selectHeaderAccept(["application/json"]);void 0!==r&&(_=_.set("Accept",r));let Q="json";r&&(Q=r.startsWith("text")?"text":this.configuration.isJsonMime(r)?"json":"blob");let B=`/Users(${this.configuration.encodeParam({name:"id",value:u,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Groups`;const{basePath:K,withCredentials:ie}=this.configuration;return this.httpClient.request("get",`${K}${B}`,{params:T.toHttpParams(),responseType:Q,...ie?{withCredentials:ie}:{},headers:_,observe:C})}listGroupsQuery(l,C="body",u=!1,s){const o=l.id;if(null==o)throw new Error("Required parameter id was null or undefined when calling listGroups.");const p=l.$top,M=l.$skip,m=l.$search,h=l.$filter,R=l.$count,f=l.$orderby,T=l.$select,_=l.$expand;let r=new i.rx(this.encoder);return r=this.addToHttpParams(r,"$top",p,i.l2.Form,!1),r=this.addToHttpParams(r,"$skip",M,i.l2.Form,!1),r=this.addToHttpParams(r,"$search",m,i.l2.Form,!1),r=this.addToHttpParams(r,"$filter",h,i.l2.Form,!1),r=this.addToHttpParams(r,"$count",R,i.l2.Form,!1),r=this.addToHttpParams(r,"$orderby",f,i.l2.Form,!1),r=this.addToHttpParams(r,"$select",T,i.l2.Form,!1),r=this.addToHttpParams(r,"$expand",_,i.l2.Form,!1),`/Users(${this.configuration.encodeParam({name:"id",value:o,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Groups?`+r.toString()}listUser(l,C="body"){const u=l?.$top,s=l?.$skip,o=l?.$search,p=l?.$filter,M=l?.$count,m=l?.$orderby,h=l?.$select,R=l?.$expand;let f=new i.rx(this.encoder);
1f=this.addToHttpParams(f,"$top",u,i.l2.Form,!1),f=this.addToHttpParams(f,"$skip",s,i.l2.Form,!1),f=this.addToHttpParams(f,"$search",o,i.l2.Form,!1),f=this.addToHttpParams(f,"$filter",p,i.l2.Form,!1),f=this.addToHttpParams(f,"$count",M,i.l2.Form,!1),f=this.addToHttpParams(f,"$orderby",m,i.l2.Form,!1),f=this.addToHttpParams(f,"$select",h,i.l2.Form,!1),f=this.addToHttpParams(f,"$expand",R,i.l2.Form,!1);let T=this.defaultHeaders;T=this.configuration.addCredentialToHeaders("Application","Authorization",T,"Bearer ");const _=this.configuration.selectHeaderAccept(["application/json"]);void 0!==_&&(T=T.set("Accept",_));let r="json";_&&(r=_.startsWith("text")?"text":this.configuration.isJsonMime(_)?"json":"blob");const{basePath:B,withCredentials:K}=this.configuration;return this.httpClient.request("get",`${B}/Users`,{params:f.toHttpParams(),responseType:r,...K?{withCredentials:K}:{},headers:T,observe:C})}listUserQuery(l,C="body",u=!1,s){const o=l.$top,p=l.$skip,M=l.$search,m=l.$filter,h=l.$count,R=l.$orderby,f=l.$select,T=l.$expand;let _=new i.rx(this.encoder);return _=this.addToHttpParams(_,"$top",o,i.l2.Form,!1),_=this.addToHttpParams(_,"$skip",p,i.l2.Form,!1),_=this.addToHttpParams(_,"$search",M,i.l2.Form,!1),_=this.addToHttpParams(_,"$filter",m,i.l2.Form,!1),_=this.addToHttpParams(_,"$count",h,i.l2.Form,!1),_=this.addToHttpParams(_,"$orderby",R,i.l2.Form,!1),_=this.addToHttpParams(_,"$select",f,i.l2.Form,!1),_=this.addToHttpParams(_,"$expand",T,i.l2.Form,!1),"/Users?"+_.toString()}makeCall(l,C="body"){const u=l?.usersMakeCallRequestBody;if(null==u)throw new Error("Required parameter usersMakeCallRequestBody was null or undefined when calling makeCall.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/Users/Pbx.MakeCall`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}makeCallQuery(l,C="body",u=!1,s){if(null==l.usersMakeCallRequestBody)throw new Error("Required parameter usersMakeCallRequestBody was null or undefined when calling makeCall.");return"/Users/Pbx.MakeCall"}makeCallUserRecordGreeting(l,C="body"){const u=l?.id;if(null==u)throw new Error("Required parameter id was null or undefined when calling makeCallUserRecordGreeting.");const s=l?.makeCallUserRecordGreetingRequestBody;if(null==s)throw new Error("Required parameter makeCallUserRecordGreetingRequestBody was null or undefined when calling makeCallUserRecordGreeting.");let o=this.defaultHeaders;o=this.configuration.addCredentialToHeaders("Application","Authorization",o,"Bearer ");const p=this.configuration.selectHeaderAccept(["application/json"]);void 0!==p&&(o=o.set("Accept",p));const m=this.configuration.selectHeaderContentType(["application/json"]);
1void 0!==m&&(o=o.set("Content-Type",m));let h="json";p&&(h=p.startsWith("text")?"text":this.configuration.isJsonMime(p)?"json":"blob");let R=`/Users(${this.configuration.encodeParam({name:"id",value:u,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.MakeCallUserRecordGreeting`;const{basePath:f,withCredentials:T}=this.configuration;return this.httpClient.request("post",`${f}${R}`,{body:s,responseType:h,...T?{withCredentials:T}:{},headers:o,observe:C})}makeCallUserRecordGreetingQuery(l,C="body",u=!1,s){const o=l.id;if(null==o)throw new Error("Required parameter id was null or undefined when calling makeCallUserRecordGreeting.");if(null==l.makeCallUserRecordGreetingRequestBody)throw new Error("Required parameter makeCallUserRecordGreetingRequestBody was null or undefined when calling makeCallUserRecordGreeting.");return`/Users(${this.configuration.encodeParam({name:"id",value:o,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.MakeCallUserRecordGreeting`}multiDeleteGreeting(l,C="body"){const u=l?.usersMultiDeleteGreetingRequestBody;if(null==u)throw new Error("Required parameter usersMultiDeleteGreetingRequestBody was null or undefined when calling multiDeleteGreeting.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/Users/Pbx.MultiDeleteGreeting`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}multiDeleteGreetingQuery(l,C="body",u=!1,s){if(null==l.usersMultiDeleteGreetingRequestBody)throw new Error("Required parameter usersMultiDeleteGreetingRequestBody was null or undefined when calling multiDeleteGreeting.");return"/Users/Pbx.MultiDeleteGreeting"}multiUserUpdate(l,C="body"){const u=l?.usersMultiUserUpdateRequestBody;if(null==u)throw new Error("Required parameter usersMultiUserUpdateRequestBody was null or undefined when calling multiUserUpdate.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/Users/Pbx.MultiUserUpdate`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}multiUserUpdateQuery(l,C="body",u=!1,s){if(null==l.usersMultiUserUpdateRequestBody)throw new Error("Required parameter usersMultiUserUpdateRequestBody was null or undefined when calling multiUserUpdate.");return"/Users/Pbx.MultiUserUpdate"}rebootPhone(l,C="body"){const u=l?.usersRebootPhoneRequestBody;if(null==u)throw new Error("Required parameter usersRebootPhoneRequestBody was null or undefined when calling rebootPhone.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/Users/Pbx.RebootPhone`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}rebootPhoneQuery(l,C="body",u=!1,s){if(null==l.usersRebootPhoneRequestBody)throw new Error("Required parameter usersRebootPhoneRequestBody was null or undefined when calling rebootPhone.");return"/Users/Pbx.RebootPhone"}regenerate(l,C="body"){const u=l?.id;if(null==u)throw new Error("Required parameter id was null or undefined when calling regenerate.");const s=l?.regenerateRequestBody;if(null==s)throw new Error("Required parameter regenerateRequestBody was null or undefined when calling regenerate.");let o=this.defaultHeaders;o=this.configuration.addCredentialToHeaders("Application","Authorization",o,"Bearer ");const p=this.configuration.selectHeaderAccept(["application/json"]);void 0!==p&&(o=o.set("Accept",p));const m=this.configuration.selectHeaderContentType(["application/json"]);
1void 0!==m&&(o=o.set("Content-Type",m));let h="json";p&&(h=p.startsWith("text")?"text":this.configuration.isJsonMime(p)?"json":"blob");let R=`/Users(${this.configuration.encodeParam({name:"id",value:u,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.Regenerate`;const{basePath:f,withCredentials:T}=this.configuration;return this.httpClient.request("post",`${f}${R}`,{body:s,responseType:h,...T?{withCredentials:T}:{},headers:o,observe:C})}regenerateQuery(l,C="body",u=!1,s){const o=l.id;if(null==o)throw new Error("Required parameter id was null or undefined when calling regenerate.");if(null==l.regenerateRequestBody)throw new Error("Required parameter regenerateRequestBody was null or undefined when calling regenerate.");return`/Users(${this.configuration.encodeParam({name:"id",value:o,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.Regenerate`}regeneratePasswords(l,C="body"){const u=l?.usersRegeneratePasswordsRequestBody;if(null==u)throw new Error("Required parameter usersRegeneratePasswordsRequestBody was null or undefined when calling regeneratePasswords.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/Users/Pbx.RegeneratePasswords`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}regeneratePasswordsQuery(l,C="body",u=!1,s){if(null==l.usersRegeneratePasswordsRequestBody)throw new Error("Required parameter usersRegeneratePasswordsRequestBody was null or undefined when calling regeneratePasswords.");return"/Users/Pbx.RegeneratePasswords"}reprovisionAllPhones(l,C="body"){const u=l?.usersReprovisionAllPhonesRequestBody;if(null==u)throw new Error("Required parameter usersReprovisionAllPhonesRequestBody was null or undefined when calling reprovisionAllPhones.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/Users/Pbx.ReprovisionAllPhones`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}reprovisionAllPhonesQuery(l,C="body",u=!1,s){if(null==l.usersReprovisionAllPhonesRequestBody)throw new Error("Required parameter usersReprovisionAllPhonesRequestBody was null or undefined when calling reprovisionAllPhones.");return"/Users/Pbx.ReprovisionAllPhones"}reprovisionPhone(l,C="body"){const u=l?.usersReprovisionPhoneRequestBody;if(null==u)throw new Error("Required parameter usersReprovisionPhoneRequestBody was null or undefined when calling reprovisionPhone.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/Users/Pbx.ReprovisionPhone`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}reprovisionPhoneQuery(l,C="body",u=!1,s){if(null==l.usersReprovisionPhoneRequestBody)throw new Error("Required parameter usersReprovisionPhoneRequestBody was null or undefined when calling reprovisionPhone.");return"/Users/Pbx.ReprovisionPhone"}sendWelcomeEmail(l,C="body"){const u=l?.id;if(null==u)throw new Error("Required parameter id was null or undefined when calling sendWelcomeEmail.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));let p="json";o&&(p=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");let M=`/Users(${this.configuration.encodeParam({name:"id",value:u,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.SendWelcomeEmail`;const{basePath:m,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${m}${M}`,{responseType:p,...h?{withCredentials:h}:{},headers:s,observe:C})}sendWelcomeEmailQuery(l,C="body",u=!1,s){const o=l.id;if(null==o)throw new Error("Required parameter id was null or undefined when calling sendWelcomeEmail.");return`/Users(${this.configuration.encodeParam({name:"id",value:o,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.SendWelcomeEmail`}setMonitorStatus(l,C="body"){const u=l?.id;if(null==u)throw new Error("Required parameter id was null or undefined when calling setMonitorStatus.");const s=l?.setMonitorStatusRequestBody;if(null==s)throw new Error("Required parameter setMonitorStatusRequestBody was null or undefined when calling setMonitorStatus.");let o=this.defaultHeaders;o=this.configuration.addCredentialToHeaders("Application","Authorization",o,"Bearer ");const p=this.configuration.selectHeaderAccept(["application/json"]);void 0!==p&&(o=o.set("Accept",p));const m=this.configuration.selectHeaderContentType(["application/json"]);
1void 0!==m&&(o=o.set("Content-Type",m));let h="json";p&&(h=p.startsWith("text")?"text":this.configuration.isJsonMime(p)?"json":"blob");let R=`/Users(${this.configuration.encodeParam({name:"id",value:u,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.SetMonitorStatus`;const{basePath:f,withCredentials:T}=this.configuration;return this.httpClient.request("post",`${f}${R}`,{body:s,responseType:h,...T?{withCredentials:T}:{},headers:o,observe:C})}setMonitorStatusQuery(l,C="body",u=!1,s){const o=l.id;if(null==o)throw new Error("Required parameter id was null or undefined when calling setMonitorStatus.");if(null==l.setMonitorStatusRequestBody)throw new Error("Required parameter setMonitorStatusRequestBody was null or undefined when calling setMonitorStatus.");return`/Users(${this.configuration.encodeParam({name:"id",value:o,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.SetMonitorStatus`}updateUser(l,C="body"){const u=l?.id;if(null==u)throw new Error("Required parameter id was null or undefined when calling updateUser.");const s=l?.pbxUser;if(null==s)throw new Error("Required parameter pbxUser was null or undefined when calling updateUser.");let o=this.defaultHeaders;o=this.configuration.addCredentialToHeaders("Application","Authorization",o,"Bearer ");const p=this.configuration.selectHeaderAccept(["application/json"]);void 0!==p&&(o=o.set("Accept",p));const m=this.configuration.selectHeaderContentType(["application/json"]);
1void 0!==m&&(o=o.set("Content-Type",m));let h="json";p&&(h=p.startsWith("text")?"text":this.configuration.isJsonMime(p)?"json":"blob");let R=`/Users(${this.configuration.encodeParam({name:"id",value:u,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:f,withCredentials:T}=this.configuration;return this.httpClient.request("patch",`${f}${R}`,{body:s,responseType:h,...T?{withCredentials:T}:{},headers:o,observe:C})}updateUserQuery(l,C="body",u=!1,s){const o=l.id;if(null==o)throw new Error("Required parameter id was null or undefined when calling updateUser.");if(null==l.pbxUser)throw new Error("Required parameter pbxUser was null or undefined when calling updateUser.");return`/Users(${this.configuration.encodeParam({name:"id",value:o,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`}upgradePhone(l,C="body"){const u=l?.usersUpgradePhoneRequestBody;if(null==u)throw new Error("Required parameter usersUpgradePhoneRequestBody was null or undefined when calling upgradePhone.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(s=s.set("Accept",o));const M=this.configuration.selectHeaderContentType(["application/json"]);void 0!==M&&(s=s.set("Content-Type",M));let m="json";o&&(m=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");const{basePath:R,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${R}/Users/Pbx.UpgradePhone`,{body:u,responseType:m,...f?{withCredentials:f}:{},headers:s,observe:C})}upgradePhoneQuery(l,C="body",u=!1,s){if(null==l.usersUpgradePhoneRequestBody)throw new Error("Required parameter usersUpgradePhoneRequestBody was null or undefined when calling upgradePhone.");return"/Users/Pbx.UpgradePhone"}static \u0275fac=(()=>{let l;return function(u){return(l||(l=O.xGo(E)))(u||E)}})();static \u0275prov=v.jDH({token:E,factory:E.\u0275fac,providedIn:"root"})}return E})()},72107(be,J,t){t.d(J,{K:()=>i});const i={Sunday:"Sunday",Monday:"Monday",Tuesday:"Tuesday",Wednesday:"Wednesday",Thursday:"Thursday",Friday:"Friday",Saturday:"Saturday"}},12239(be,J,t){t.d(J,{n:()=>i});const i={AllCalls:"AllCalls",InternalCallsOnly:"InternalCallsOnly",ExternalCallsOnly:"ExternalCallsOnly"}},64385(be,J,t){t.d(J,{c:()=>i});
1const i={NoAnswer:"NoAnswer",PhoneBusy:"PhoneBusy",PhoneNotRegistered:"PhoneNotRegistered",ForwardAll:"ForwardAll",BasedOnCallerId:"BasedOnCallerID",BasedOnDid:"BasedOnDID"}},21599(be,J,t){t.d(J,{m:()=>i});const i={AllHours:"AllHours",OfficeHours:"OfficeHours",OutOfOfficeHours:"OutOfOfficeHours",SpecificHours:"SpecificHours",SpecificHoursExcludingHolidays:"SpecificHoursExcludingHolidays",OutOfSpecificHours:"OutOfSpecificHours",OutOfSpecificHoursIncludingHolidays:"OutOfSpecificHoursIncludingHolidays",Never:"Never",BreakTime:"BreakTime"}},34864(be,J){var i,b;function y(b,c){if(!b)throw"First parameter is required.";c=new O(b,c=c||{type:"video"});var a=this;function X(I){I&&(c.initCallback=function(){I(),I=c.initCallback=null});var $=new v(b,c);(te=new $(b,c)).record(),ue("recording"),c.disableLogs||console.log("Initialized recorderType:",te.constructor.name,"for output-type:",c.type)}function U(I){if(I=I||function(){},te){if("paused"===a.state)return a.resumeRecording(),void setTimeout(function(){U(I)},1);"recording"!==a.state&&!c.disableLogs&&console.warn('Recording state should be: "recording", however current state is: ',a.state),c.disableLogs||console.log("Stopped recording "+c.type+" stream."),"gif"!==c.type?te.stop($):(te.stop(),$()),ue("stopped")}else k();function $(V){if(te){Object.keys(te).forEach(function(me){"function"!=typeof te[me]&&(a[me]=te[me])});var A=te.blob;if(!A){if(!V)throw"Recording failed.";te.blob=A=V}if(A&&!c.disableLogs&&console.log(A.type,"->",f(A.size)),I){var L;try{L=s.createObjectURL(A)}catch{}"function"==typeof I.call?I.call(a,L):I(L)}c.autoWriteToDisk&&ve(function(me){var ge={};ge[c.type+"Blob"]=me,he.Store(ge)})}else"function"==typeof I.call?I.call(a,""):I("")}}function de(I){postMessage((new FileReaderSync).readAsDataURL(I))}function ve(I,$){if(!I)throw"Pass a callback function over getDataURL.";var V=$?$.blob:(te||{}).blob;if(!V)return c.disableLogs||console.warn("Blob encoder did not finish its job yet."),void setTimeout(function(){ve(I,$)},1e3);if(typeof Worker<"u"&&!navigator.mozGetUserMedia){var A=function me(ge){try{var xe=s.createObjectURL(new Blob([ge.toString(),"this.onmessage = function (eee) {"+ge.name+"(eee.data);}"],{type:"application/javascript"})),Pe=new Worker(xe);return s.revokeObjectURL(xe),Pe}catch{}}(de);A.onmessage=function(ge){I(ge.data)},A.postMessage(V)}else{var L=new FileReader;L.readAsDataURL(V),L.onload=function(ge){I(ge.target.result)}}}function ae(I){if(I=I||0,"paused"!==a.state){if("stopped"!==a.state){if(I>=a.recordingDuration)return void U(a.onRecordingStopped);I+=1e3,setTimeout(function(){ae(I)},1e3)}}else setTimeout(function(){ae(I)},1e3)}function ue(I){a&&(a.state=I,"function"==typeof a.onStateChanged.call?a.onStateChanged.call(a,I):a.onStateChanged(I))}var ee='It seems that recorder is destroyed or "startRecording" is not invoked for '+c.type+" recorder.";function k(){!0!==c.disableLogs&&console.warn(ee)}var te,Z={startRecording:function W(I){return c.disableLogs||console.log("RecordRTC version: ",a.version),I&&(c=new O(b,I)),c.disableLogs||console.log("started recording "+c.type+" stream."),te?(te.clearRecordedData(),te.record(),ue("recording"),a.recordingDuration&&ae(),a):(X(function(){a.recordingDuration&&ae()}),a)},stopRecording:U,pauseRecording:function oe(){te?"recording"===a.state?(ue("paused"),te.pause(),c.disableLogs||console.log("Paused recording.")):c.disableLogs||console.warn("Unable to pause the recording. Recording state: ",a.state):k()},resumeRecording:function H(){te?"paused"===a.state?(ue("recording"),te.resume(),c.disableLogs||console.log("Resumed recording.")):c.disableLogs||console.warn("Unable to resume the recording. Recording state: ",a.state):k()},initRecorder:X,setRecordingDuration:function(I,$){if(typeof I>"u")throw"recordingDuration is required.";if("number"!=typeof I)throw"recordingDuration must be a number.";return a.recordingDuration=I,a.onRecordingStopped=$||function(){},{onRecordingStopped:function(V){a.onRecordingStopped=V}}},clearRecordedData:function(){te?(te.clearRecordedData(),c.disableLogs||console.log("Cleared old recorded data.")):k()},getBlob:function(){if(te)return te.blob;k()},getDataURL:ve,toURL:function(){if(te)return s.createObjectURL(te.blob);k()},getInternalRecorder:function(){return te},save:function(I){te?T(te.blob,I):k()},getFromDisk:function(I){te?y.getFromDisk(c.type,I):k()}
1,setAdvertisementArray:function(I){c.advertisement=[];for(var $=I.length,V=0;V<$;V++)c.advertisement.push({duration:V,image:I[V]})},blob:null,bufferSize:0,sampleRate:0,buffer:null,reset:function(){"recording"===a.state&&!c.disableLogs&&console.warn("Stop an active recorder."),te&&"function"==typeof te.clearRecordedData&&te.clearRecordedData(),te=null,ue("inactive"),a.blob=null},onStateChanged:function(I){c.disableLogs||console.log("Recorder state changed:",I)},state:"inactive",getState:function(){return a.state},destroy:function(){var I=c.disableLogs;c={disableLogs:!0},a.reset(),ue("destroyed"),Z=a=null,K.AudioContextConstructor&&(K.AudioContextConstructor.close(),K.AudioContextConstructor=null),c.disableLogs=I,c.disableLogs||console.log("RecordRTC is destroyed.")},version:"5.6.2"};if(!this)return a=Z,Z;for(var N in Z)this[N]=Z[N];return a=this,Z}function O(b,c){return!c.recorderType&&!c.type&&(c.audio&&c.video?c.type="video":c.audio&&!c.video&&(c.type="audio")),c.recorderType&&!c.type&&(c.recorderType===Ee||c.recorderType===ye||c.recorderType===D?c.type="video":c.recorderType===q?c.type="gif":c.recorderType===re?c.type="audio":c.recorderType===Ce&&(r(b,"audio").length&&r(b,"video").length||!r(b,"audio").length&&r(b,"video").length?c.type="video":r(b,"audio").length&&!r(b,"video").length&&(c.type="audio"))),typeof MediaRecorder<"u"&&"requestData"in MediaRecorder.prototype&&(c.mimeType||(c.mimeType="video/webm"),c.type||(c.type=c.mimeType.split("/")[0])),c.type||(c.mimeType&&(c.type=c.mimeType.split("/")[0]),c.type||(c.type="audio")),c}function v(b,c){var a;return(m||o||p)&&(a=re),typeof MediaRecorder<"u"&&"requestData"in MediaRecorder.prototype&&!m&&(a=Ce),"video"===c.type&&(m||p)&&(a=Ee,typeof ReadableStream<"u"&&(a=D)),"gif"===c.type&&(a=q),"canvas"===c.type&&(a=ye),ie()&&a!==ye&&a!==q&&typeof MediaRecorder<"u"&&"requestData"in MediaRecorder.prototype&&(r(b,"video").length||r(b,"audio").length)&&("audio"===c.type?"function"==typeof MediaRecorder.isTypeSupported&&MediaRecorder.isTypeSupported("audio/webm")&&(a=Ce):"function"==typeof MediaRecorder.isTypeSupported&&MediaRecorder.isTypeSupported("video/webm")&&(a=Ce)),b instanceof Array&&b.length&&(a=ne),c.recorderType&&(a=c.recorderType),!c.disableLogs&&a&&a.name&&console.log("Using recorderType:",a.name||a.constructor.name),!a&&h&&(a=Ce),a}function S(b){this.addStream=function(c){c&&(b=c)},this.mediaType={audio:!0,video:!0},this.startRecording=function(){var a,c=this.mediaType,W=this.mimeType||{audio:null,video:null,gif:null};if("function"!=typeof c.audio&&ie()&&!r(b,"audio").length&&(c.audio=!1),"function"!=typeof c.video&&ie()&&!r(b,"video").length&&(c.video=!1),"function"!=typeof c.gif&&ie()&&!r(b,"video").length&&(c.gif=!1),!c.audio&&!c.video&&!c.gif)throw"MediaStream must have either audio or video tracks.";if(c.audio&&(a=null,"function"==typeof c.audio&&(a=c.audio),this.audioRecorder=new y(b,{type:"audio",bufferSize:this.bufferSize,sampleRate:this.sampleRate,numberOfAudioChannels:this.numberOfAudioChannels||2,disableLogs:this.disableLogs,recorderType:a,mimeType:W.audio,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp}),c.video||this.audioRecorder.startRecording()),c.video){a=null,"function"==typeof c.video&&(a=c.video);var X=b;if(ie()&&c.audio&&"function"==typeof c.audio){var U=r(b,"video")[0];M?((X=new R).addTrack(U),a&&a===Ee&&(a=Ce)):(X=new R).addTrack(U)}this.videoRecorder=new y(X,{type:"video",video:this.video,canvas:this.canvas,frameInterval:this.frameInterval||10,disableLogs:this.disableLogs,recorderType:a,mimeType:W.video,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp,workerPath:this.workerPath,webAssemblyPath:this.webAssemblyPath,frameRate:this.frameRate,bitrate:this.bitrate}),c.audio||this.videoRecorder.startRecording()}if(c.audio&&c.video){var oe=this,H=!0===ie();(c.audio instanceof re&&c.video||!0!==c.audio&&!0!==c.video&&c.audio!==c.video)&&(H=!1),!0===H?(oe.audioRecorder=null,oe.videoRecorder.startRecording()):oe.videoRecorder.initRecorder(function(){oe.audioRecorder.initRecorder(function(){oe.videoRecorder.startRecording(),oe.audioRecorder.startRecording()})})}c.gif&&(a=null,"function"==typeof c.gif&&(a=c.gif),this.gifRecorder=new y(b,{type:"gif",frameRate:this.frameRate||200,quality:this.qual
1ity||10,disableLogs:this.disableLogs,recorderType:a,mimeType:W.gif}),this.gifRecorder.startRecording())},this.stopRecording=function(c){c=c||function(){},this.audioRecorder&&this.audioRecorder.stopRecording(function(a){c(a,"audio")}),this.videoRecorder&&this.videoRecorder.stopRecording(function(a){c(a,"video")}),this.gifRecorder&&this.gifRecorder.stopRecording(function(a){c(a,"gif")})},this.pauseRecording=function(){this.audioRecorder&&this.audioRecorder.pauseRecording(),this.videoRecorder&&this.videoRecorder.pauseRecording(),this.gifRecorder&&this.gifRecorder.pauseRecording()},this.resumeRecording=function(){this.audioRecorder&&this.audioRecorder.resumeRecording(),this.videoRecorder&&this.videoRecorder.resumeRecording(),this.gifRecorder&&this.gifRecorder.resumeRecording()},this.getBlob=function(c){var a={};return this.audioRecorder&&(a.audio=this.audioRecorder.getBlob()),this.videoRecorder&&(a.video=this.videoRecorder.getBlob()),this.gifRecorder&&(a.gif=this.gifRecorder.getBlob()),c&&c(a),a},this.destroy=function(){this.audioRecorder&&(this.audioRecorder.destroy(),this.audioRecorder=null),this.videoRecorder&&(this.videoRecorder.destroy(),this.videoRecorder=null),this.gifRecorder&&(this.gifRecorder.destroy(),this.gifRecorder=null)},this.getDataURL=function(c){function a(X,U){if(typeof Worker<"u"){var oe=function W(X){var H,U=s.createObjectURL(new Blob([X.toString(),"this.onmessage = function (eee) {"+X.name+"(eee.data);}"],{type:"application/javascript"})),oe=new Worker(U);if(typeof s<"u")H=s;else{if(!(typeof webkitURL<"u"))throw"Neither URL nor webkitURL detected.";H=webkitURL}return H.revokeObjectURL(U),oe}(function(ve){postMessage((new FileReaderSync).readAsDataURL(ve))});oe.onmessage=function(de){U(de.data)},oe.postMessage(X)}else{var H=new FileReader;H.readAsDataURL(X),H.onload=function(de){U(de.target.result)}}}this.getBlob(function(X){X.audio&&X.video?a(X.audio,function(U){a(X.video,function(oe){c({audio:U,video:oe})})}):X.audio?a(X.audio,function(U){c({audio:U})}):X.video&&a(X.video,function(U){c({video:U})})})},this.writeToDisk=function(){y.writeToDisk({audio:this.audioRecorder,video:this.videoRecorder,gif:this.gifRecorder})},this.save=function(c){(c=c||{audio:!0,video:!0,gif:!0}).audio&&this.audioRecorder&&this.audioRecorder.save("string"==typeof c.audio?c.audio:""),c.video&&this.videoRecorder&&this.videoRecorder.save("string"==typeof c.video?c.video:""),c.gif&&this.gifRecorder&&this.gifRecorder.save("string"==typeof c.gif?c.gif:"")}}y.version="5.6.2",be.exports=y,void 0!==(i=function(){return y}.apply(J,[]))&&(be.exports=i),y.getFromDisk=function(b,c){if(!c)throw"callback is mandatory.";console.log("Getting recorded "+("all"===b?"blobs":b+" blob ")+" from disk!"),he.Fetch(function(a,W){"all"!==b&&W===b+"Blob"&&c&&c(a),"all"===b&&c&&c(a,W.replace("Blob",""))})},y.writeToDisk=function(b){console.log("Writing recorded blob(s) to disk!"),(b=b||{}).audio&&b.video&&b.gif?b.audio.getDataURL(function(c){b.video.getDataURL(function(a){b.gif.getDataURL(function(W){he.Store({audioBlob:c,videoBlob:a,gifBlob:W})})})}):b.audio&&b.video?b.audio.getDataURL(function(c){b.video.getDataURL(function(a){he.Store({audioBlob:c,videoBlob:a})})}):b.audio&&b.gif?b.audio.getDataURL(function(c){b.gif.getDataURL(function(a){he.Store({audioBlob:c,gifBlob:a})})}):b.video&&b.gif?b.video.getDataURL(function(c){b.gif.getDataURL(function(a){he.Store({videoBlob:c,gifBlob:a})})}):b.audio?b.audio.getDataURL(function(c){he.Store({audioBlob:c})}):b.video?b.video.getDataURL(function(c){he.Store({videoBlob:c})}):b.gif&&b.gif.getDataURL(function(c){he.Store({gifBlob:c})})},S.getFromDisk=y.getFromDisk,S.writeToDisk=y.writeToDisk,y.MRecordRTC=S,(b=typeof global<"u"?global:null)&&(typeof window<"u"||typeof global>"u"||(global.navigator={userAgent:"Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45",getUserMedia:function(){}},global.console||(global.console={}),(typeof global.console.log>"u"||typeof global.console.error>"u")&&(global.console.error=global.console.log=global.console.log||function(){console.log(arguments)}),typeof document>"u"&&(b.document={documentElement:{appendChild:function(){return""}}},document.createElement=document.captureStream=document.mozCaptureStream=function(){var c={getContext:function(){return c},play:function(){},pause:function(){},drawImage:function(){},toDataURL:function(){return""},style:{}};return c},b.HTMLVideoElement=function(){}),typeof location>"u"&&(b.location={protocol:"file:",href:"",hash:""}),typeof screen>"u"&&(b.screen={width:0,height:0}),typeof s>"u"&&(b.URL={createObjectURL:function(){return""},revokeObjectURL:function(){return""}}),b.window=global));var x=window.requestAnimationFrame;if(typeof x>"u")if(typeof webkitRequestAnimationFrame<"u")x=webkitRequestAnimationFrame;else if(typeof mozRequestAnimationFrame<"u")x=mozRequestAnimationFrame;else if(typeof msRequestAnimationFrame<"u")x=msRequestAnimationFrame;else if(typeof x>"u"){var l=0;x=function(b,c){var a=(new Date).getTime(),W=Math.max(0,16-(a-l)),X=setTimeout(function(){b(a+W)},W);return l=a+W,X}}var C=window.cancelAnimationFrame;typeof C>"u"&&(typeof webkitCancelAnimationFrame<"u"?C=webkitCancelAnimationFrame:typeof mozCancelAnimationFrame<"u"?C=mozCancelAnimationFrame:typeof msCancelAnimationFrame<"u"?C=msCancelAnimationFrame:typeof C>"u"&&(C=function(b){clearTimeout(b)}));var u=window.AudioContext;typeof u>"u"&&(typeof webkitAudioContext<"u"&&(u=webkitAudioContext),typeof mozAudioContext<"u"&&(u=mozAudioContext));var s=window.URL;typeof s>"u"&&typeof webkitURL<"u"&&(s=webkitURL),typeof navigator<"u"&&typeof navigator.getUserMedia>"u"&&(typeof navigator.webkitGetUserMedia<"u"&&(navigator.getUserMedia=navigator.webkitGetUserMedia),typeof navigator.mozGetUserMedia<"u"&&(navigator.getUserMedia=navigator.mozGetUserMedia));var o=!(-1===navigator.userAgent.indexOf("Edge")||!navigator.msSaveBlob&&!navigator.msSaveOrOpenBlob),p=!!window.opera||-1!==navigator.userAgent.indexOf("OPR/"),M=navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&"netscape"in window&&/ rv:/.test(navigator.userAgent),m=!p&&!o&&!!navigator.webkitGetUserMedia||_()||-1!==navigator.userAgent.toLowerCase().indexOf("chrome/"),h=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);h&&!m&&-1!==navigator.userAgent.indexOf("CriOS")&&(h=!1,m=!0);var R=window.MediaStream;function f(b){if(0===b)return"0 Bytes";var W=parseInt(Math.floor(Math.log(b)/Math.log(1e3)),10);return(b/Math.pow(1e3,W)).toPrecision(3)+" "+["Bytes","KB","MB","GB","TB"][W]}function T(b,c){if(!b)throw"Blob object is required.";if(!b.type)try{b.type="video/webm"}catch{}var a=(b.type||"video/webm").split("/")[1];if(-1!==a.indexOf(";")&&(a=a.split(";")[0]),c&&-1!==c.indexOf(".")){var W=c.split(".");c=W[0],a=W[1]}var X=(c||Math.round(9999999999*Math.random())+888888888)+"."+a;if(typeof navigator.msSaveOrOpenBlob<"u")return navigator.msSaveOrOpenBlob(b,X);if(typeof navigator.msSaveBlob<"u")return navigator.msSaveBlob(b,X);var U=document.createElement("a");U.href=s.createObjectURL(b),U.download=X,U.style="display:none;opacity:0;color:transparent;",(document.body||document.documentElement).appendChild(U),"function"==typeof U.click?U.click():(U.target="_blank",U.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))),s.revokeObjectURL(U.href)}function _(){return!!(typeof window<"u"&&"object"==typeof window.process&&"renderer"===window.process.type||typeof process<"u"&&"object"==typeof process.versions&&process.versions.electron||"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0)}function r(b,c){return b&&b.getTracks?b.getTracks().filter(function(a){return a.kind===(c||"audio")}):[]}function Q(b,c){"srcObject"in c?c.srcObject=b:"mozSrcObject"in c?c.mozSrcObject=b:c.srcObject=b}typeof R>"u"&&typeof webkitMediaStream<"u"&&(R=webkitMediaStream),typeof R<"u"&&typeof R.prototype.stop>
1"u"&&(R.prototype.stop=function(){this.getTracks().forEach(function(b){b.stop()})}),y.invokeSaveAsDialog=T,y.getTracks=r,y.getSeekableBlob=function B(b,c){if(typeof EBML>"u")throw new Error("Please link: https://www.webrtc-experiment.com/EBML.js");var a=new EBML.Reader,W=new EBML.Decoder,X=EBML.tools,U=new FileReader;U.onload=function(oe){W.decode(this.result).forEach(function(ue){a.read(ue)}),a.stop();var de=X.makeMetadataSeekable(a.metadatas,a.duration,a.cues),ve=this.result.slice(a.metadataSize),ae=new Blob([de,ve],{type:"video/webm"});c(ae)},U.readAsArrayBuffer(b)},y.bytesToSize=f,y.isElectron=_;var K={};function ie(){if(M||h||o)return!0;navigator;var U,oe,c=navigator.userAgent,a=""+parseFloat(navigator.appVersion),W=parseInt(navigator.appVersion,10);return(m||p)&&(U=c.indexOf("Chrome"),a=c.substring(U+7)),-1!==(oe=a.indexOf(";"))&&(a=a.substring(0,oe)),-1!==(oe=a.indexOf(" "))&&(a=a.substring(0,oe)),W=parseInt(""+a,10),isNaN(W)&&(a=""+parseFloat(navigator.appVersion),W=parseInt(navigator.appVersion,10)),W>=49}function Ce(b,c){var a,ae=this;if(typeof b>"u")throw'First argument "MediaStream" is required.';if(typeof MediaRecorder>"u")throw"Your browser does not support the Media Recorder API. Please try other modules e.g. WhammyRecorder or StereoAudioRecorder.";"audio"===(c=c||{mimeType:"video/webm"}).type&&(r(b,"video").length&&r(b,"audio").length&&(navigator.mozGetUserMedia?(a=new R).addTrack(r(b,"audio")[0]):a=new R(r(b,"audio")),b=a),(!c.mimeType||-1===c.mimeType.toString().toLowerCase().indexOf("audio"))&&(c.mimeType=m?"audio/webm":"audio/ogg"),c.mimeType&&"audio/ogg"!==c.mimeType.toString().toLowerCase()&&navigator.mozGetUserMedia&&(c.mimeType="audio/ogg"));var H,W=[];function X(){ae.timestamps.push((new Date).getTime()),"function"==typeof c.onTimeStamp&&c.onTimeStamp(ae.timestamps[ae.timestamps.length-1],ae.timestamps)}function U(ue){return H&&H.mimeType?H.mimeType:ue.mimeType||"video/webm"}function oe(){W=[],H=null,ae.timestamps=[]}this.getArrayOfBlobs=function(){return W},this.record=function(){ae.blob=null,ae.clearRecordedData(),ae.timestamps=[],ve=[],W=[];var ue=c;c.disableLogs||console.log("Passing following config over MediaRecorder API.",ue),H&&(H=null),m&&!ie()&&(ue="video/vp8"),"function"==typeof MediaRecorder.isTypeSupported&&ue.mimeType&&(MediaRecorder.isTypeSupported(ue.mimeType)||(c.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",ue.mimeType),ue.mimeType="audio"===c.type?"audio/webm":"video/webm"));try{H=new MediaRecorder(b,ue),c.mimeType=ue.mimeType}catch{H=new MediaRecorder(b)}ue.mimeType&&!MediaRecorder.isTypeSupported&&"canRecordMimeType"in H&&!1===H.canRecordMimeType(ue.mimeType)&&(c.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",ue.mimeType)),H.ondataavailable=function(ee){if(ee.data&&ve.push("ondataavailable: "+f(ee.data.size)),"number"!=typeof c.timeSlice)!ee.data||!ee.data.size||ee.data.size<100||ae.blob?ae.recordingCallback&&(ae.recordingCallback(new Blob([],{type:U(ue)})),ae.recordingCallback=null):(ae.blob=c.getNativeBlob?ee.data:new Blob([ee.data],{type:U(ue)}),ae.recordingCallback&&(ae.recordingCallback(ae.blob),ae.recordingCallback=null));else if(ee.data&&ee.data.size&&(W.push(ee.data),X(),"function"==typeof c.ondataavailable)){var k=c.getNativeBlob?ee.data:new Blob([ee.data],{type:U(ue)});c.ondataavailable(k)}},H.onstart=function(){ve.push("started")},H.onpause=function(){ve.push("paused")},H.onresume=function(){ve.push("resumed")},H.onstop=function(){ve.push("stopped")},H.onerror=function(ee){ee&&(ee.name||(ee.name="UnknownError"),ve.push("error: "+ee),c.disableLogs||(-1!==ee.name.toString().toLowerCase().indexOf("invalidstate")?console.error("The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.",ee):-1!==ee.name.toString().toLowerCase().indexOf("notsupported")?console.error("MIME type (",ue.mimeType,") is not supported.",ee):-1!==ee.name.toString().toLowerCase().indexOf("security")?console.error("MediaRecorder security error",ee):"OutOfMemory"===ee.name?console.error("The UA has exhaused the available memory. User agents SHOULD provide as much additional information as possible in the message attribute.",ee):"IllegalStreamModification"===ee.name?console.error("A modification to the stream has occurred that makes it impossible to continue recording. An example would be the addition of a Track
1while recording is occurring. User agents SHOULD provide as much additional information as possible in the message attribute.",ee):"OtherRecordingError"===ee.name?console.error("Used for an fatal error other than those listed above. User agents SHOULD provide as much additional information as possible in the message attribute.",ee):"GenericError"===ee.name?console.error("The UA cannot provide the codec or recording option that has been requested.",ee):console.error("MediaRecorder Error",ee)),function(){if(!ae.manuallyStopped&&H&&"inactive"===H.state)return delete c.timeslice,void H.start(6e5);setTimeout(void 0,1e3)}(),"inactive"!==H.state&&"stopped"!==H.state&&H.stop())},"number"==typeof c.timeSlice?(X(),H.start(c.timeSlice)):H.start(36e5),c.initCallback&&c.initCallback()},this.timestamps=[],this.stop=function(ue){ue=ue||function(){},ae.manuallyStopped=!0,H&&(this.recordingCallback=ue,"recording"===H.state&&H.stop(),"number"==typeof c.timeSlice&&setTimeout(function(){ae.blob=new Blob(W,{type:U(c)}),ae.recordingCallback(ae.blob)},100))},this.pause=function(){H&&"recording"===H.state&&H.pause()},this.resume=function(){H&&"paused"===H.state&&H.resume()},this.clearRecordedData=function(){H&&"recording"===H.state&&ae.stop(oe),oe()},this.getInternalRecorder=function(){return H},this.blob=null,this.getState=function(){return H&&H.state||"inactive"};var ve=[];this.getAllStates=function(){return ve},typeof c.checkForInactiveTracks>"u"&&(c.checkForInactiveTracks=!1),ae=this,function ue(){if(H&&!1!==c.checkForInactiveTracks){if(!1===function de(){if("active"in b){if(!b.active)return!1}else if("ended"in b&&b.ended)return!1;return!0}())return c.disableLogs||console.log("MediaStream seems stopped."),void ae.stop();setTimeout(ue,1e3)}}(),this.name="MediaStreamRecorder",this.toString=function(){return this.name}}function re(b,c){if(!r(b,"audio").length)throw"Your stream has no audio tracks.";var H,a=this,W=[],X=[],U=!1,oe=0,de=2,ve=(c=c||{}).desiredSampRate;function ae(){if(!1===c.checkForInactiveTracks)return!0;if("active"in b){if(!b.active)return!1}else if("ended"in b&&b.ended)return!1;return!0}function ue(Pe,De){function Me($e,Ye){var et,Le=$e.numberOfAudioChannels,He=$e.leftBuffers.slice(0),Qe=$e.rightBuffers.slice(0),je=$e.sampleRate,Ie=$e.internalInterleavedLength,Oe=$e.desiredSampRate;function Xe(Be,we,Ne){var Ge=Math.round(Be.length*(we/Ne)),z=[],Te=Number((Be.length-1)/(Ge-1));z[0]=Be[0];for(var F=1;F<Ge-1;F++){var pe=F*Te,ce=Number(Math.floor(pe)).toFixed(),Se=Number(Math.ceil(pe)).toFixed();z[F]=e(Be[ce],Be[Se],pe-ce)}return z[Ge-1]=Be[Be.length-1],z}function e(Be,we,Ne){return Be+(we-Be)*Ne}function nt(Be,we){for(var Ne=new Float64Array(we),Ge=0,z=Be.length,Te=0;Te<z;Te++){var F=Be[Te];Ne.set(F,Ge),Ge+=F.length}return Ne}function qe(Be,we,Ne){for(var Ge=Ne.length,z=0;z<Ge;z++)Be.setUint8(we+z,Ne.charCodeAt(z))}2===Le&&(He=nt(He,Ie),Qe=nt(Qe,Ie),Oe&&(He=Xe(He,Oe,je),Qe=Xe(Qe,Oe,je))),1===Le&&(He=nt(He,Ie),Oe&&(He=Xe(He,Oe,je))),Oe&&(je=Oe),2===Le&&(et=function ut(Be,we){for(var Ne=Be.length+we.length,Ge=new Float64Array(Ne),z=0,Te=0;Te<Ne;)Ge[Te++]=Be[z],Ge[Te++]=we[z],z++;return Ge}(He,Qe)),1===Le&&(et=He);var tt=et.length,ot=new ArrayBuffer(44+2*tt),Fe=new DataView(ot);qe(Fe,0,"RIFF"),Fe.setUint32(4,36+2*tt,!0),qe(Fe,8,"WAVE"),qe(Fe,12,"fmt "),Fe.setUint32(16,16,!0),Fe.setUint16(20,1,!0),Fe.setUint16(22,Le,!0),Fe.setUint32(24,je,!0),Fe.setUint32(28,je*Le*2,!0),Fe.setUint16(32,2*Le,!0),Fe.setUint16(34,16,!0),qe(Fe,36,"data"),Fe.setUint32(40,2*tt,!0);for(var it=tt,at=44,Ae=0;Ae<it;Ae++)Fe.setInt16(at,32767*et[Ae],!0),at+=2;if(Ye)return Ye({buffer:ot,view:Fe});postMessage({buffer:ot,view:Fe})}if(Pe.noWorker)Me(Pe,function($e){De($e.buffer,$e.view)});else{var We=function ee(Pe){var De=s.createObjectURL(new Blob([Pe.toString(),";this.onmessage = function (eee) {"+Pe.name+"(eee.data);}"],{type:"application/javascript"})),Me=new Worker(De);return Me.workerURL=De,Me}(Me);We.onmessage=function($e){De($e.data.buffer,$e.data.view),s.revokeObjectURL(We.workerURL),We.terminate()},We.postMessage(Pe)}}!0===c.leftChannel&&(de=1),1===c.numberOfAudioChannels&&(de=1),(!de||de<1)&&(de=2),c.disableLogs||console.log("StereoAudioRecorder is set to record number of channels: "+de),typeof c.checkForInactiveTracks>"u"&&(c.checkForInactiveTracks=!0),this.record=function(){if(!1===ae())throw"Please make sure MediaStream is active.";V(),L=$=!1,U=!0,typeof c.timeSlice<"u"&&xe()},this.stop=function(Pe){Pe=Pe||function(){}
1,U=!1,ue({desiredSampRate:ve,sampleRate:I,numberOfAudioChannels:de,internalInterleavedLength:oe,leftBuffers:W,rightBuffers:1===de?[]:X,noWorker:c.noWorker},function(De,Me){a.blob=new Blob([Me],{type:"audio/wav"}),a.buffer=new ArrayBuffer(Me.buffer.byteLength),a.view=Me,a.sampleRate=ve||I,a.bufferSize=N,a.length=oe,L=!1,Pe&&Pe(a.blob)})},typeof y.Storage>"u"&&(y.Storage={AudioContextConstructor:null,AudioContext:window.AudioContext||window.webkitAudioContext}),(!y.Storage.AudioContextConstructor||"closed"===y.Storage.AudioContextConstructor.state)&&(y.Storage.AudioContextConstructor=new y.Storage.AudioContext);var k=y.Storage.AudioContextConstructor,te=k.createMediaStreamSource(b),Z=[0,256,512,1024,2048,4096,8192,16384],N=typeof c.bufferSize>"u"?4096:c.bufferSize;if(-1===Z.indexOf(N)&&(c.disableLogs||console.log("Legal values for buffer-size are "+JSON.stringify(Z,null,"\t"))),k.createJavaScriptNode)H=k.createJavaScriptNode(N,de,de);else{if(!k.createScriptProcessor)throw"WebAudio API has no support on this browser.";H=k.createScriptProcessor(N,de,de)}te.connect(H),c.bufferSize||(N=H.bufferSize);var I=typeof c.sampleRate<"u"?c.sampleRate:k.sampleRate||44100;(I<22050||I>96e3)&&(c.disableLogs||console.log("sample-rate must be under range 22050 and 96000.")),c.disableLogs||c.desiredSampRate&&console.log("Desired sample-rate: "+c.desiredSampRate);var $=!1;function V(){X=[],oe=0,L=!1,U=!1,$=!1,k=null,a.leftchannel=W=[],a.rightchannel=X,a.numberOfAudioChannels=de,a.desiredSampRate=ve,a.sampleRate=I,a.recordingLength=oe,ge={left:[],right:[],recordingLength:0}}function A(){H&&(H.onaudioprocess=null,H.disconnect(),H=null),te&&(te.disconnect(),te=null),V()}this.pause=function(){$=!0},this.resume=function(){if(!1===ae())throw"Please make sure MediaStream is active.";if(!U)return c.disableLogs||console.log("Seems recording has been restarted."),void this.record();$=!1},this.clearRecordedData=function(){c.checkForInactiveTracks=!1,U&&this.stop(A),A()},this.name="StereoAudioRecorder",this.toString=function(){return this.name};var L=!1;H.onaudioprocess=function me(Pe){if(!$){if(!1===ae()&&(c.disableLogs||console.log("MediaStream seems stopped."),H.disconnect(),U=!1),!U)return void(te&&(te.disconnect(),te=null));L||(L=!0,c.onAudioProcessStarted&&c.onAudioProcessStarted(),c.initCallback&&c.initCallback());var De=Pe.inputBuffer.getChannelData(0),Me=new Float32Array(De);if(W.push(Me),2===de){var We=Pe.inputBuffer.getChannelData(1),$e=new Float32Array(We);X.push($e)}a.recordingLength=oe+=N,typeof c.timeSlice<"u"&&(ge.recordingLength+=N,ge.left.push(Me),2===de&&ge.right.push($e))}},H.connect(k.createMediaStreamDestination?k.createMediaStreamDestination():k.destination),this.leftchannel=W,this.rightchannel=X,this.numberOfAudioChannels=de,this.desiredSampRate=ve,this.sampleRate=I,a.recordingLength=oe;var ge={left:[],right:[],recordingLength:0};function xe(){!U||"function"!=typeof c.ondataavailable||typeof c.timeSlice>"u"||(ge.left.length?(ue({desiredSampRate:ve,sampleRate:I,numberOfAudioChannels:de,internalInterleavedLength:ge.recordingLength,leftBuffers:ge.left,rightBuffers:1===de?[]:ge.right},function(Pe,De){var Me=new Blob([De],{type:"audio/wav"});c.ondataavailable(Me),setTimeout(xe,c.timeSlice)}),ge={left:[],right:[],recordingLength:0}):setTimeout(xe,c.timeSlice))}}function ye(b,c){if(typeof html2canvas>"u")throw"Please link: https://www.webrtc-experiment.com/screenshot.js";(c=c||{}).frameInterval||(c.frameInterval=10);var a=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach(function(Z){Z in document.createElement("canvas")&&(a=!0)});var oe,H,de,W=!(!window.webkitRTCPeerConnection&&!window.webkitGetUserMedia||!window.chrome),X=50,U=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);if(W&&U&&U[2]&&(X=parseInt(U[2],10)),W&&X<52&&(a=!1),c.useWhammyRecorder&&(a=!1),a)if(c.disableLogs||console.log("Your browser supports both MediRecorder API and canvas.captureStream!"),b instanceof HTMLCanvasElement)oe=b;else{if(!(b instanceof CanvasRenderingContext2D))throw"Please pass either HTMLCanvasElement or CanvasRenderingContext2D.";oe=b.canvas}else navigator.mozGetUserMedia&&(c.disableLogs||console.error("Canvas recording is NOT supported in Firefox."));this.record=function(){if(de=!0,a&&!c.useWhammyRecorder){var Z;"captureStream"in oe?Z=oe.captureStream(25):"mozCaptureStream"in oe?Z=oe.mozCaptureStream(25):"webkitCaptureStream"in oe&&(Z=oe.webkitCaptureStream(25));try{var N=new R;N.addTrack(r(Z,"video")[0]),Z=N}catch{}if(!Z)throw"captureStream API are NOT available.";(H=new Ce(Z,{mimeType:c.mimeType||"video/webm"})).record()}else te.frames=[],k=(new Date).getTime(),ee();c.initCallback&&c.initCallback()},this.getWebPImages=function(Z){if("canvas"===b.nodeName.toLowerCase()){var N=te.frames.length;
1te.frames.forEach(function(I,$){var V=N-$;c.disableLogs||console.log(V+"/"+N+" frames remaining"),c.onEncodingCallback&&c.onEncodingCallback(V,N);var A=I.image.toDataURL("image/webp",1);te.frames[$].image=A}),c.disableLogs||console.log("Generating WebM"),Z()}else Z()},this.stop=function(Z){de=!1;var N=this;a&&H?H.stop(Z):this.getWebPImages(function(){te.compile(function(I){c.disableLogs||console.log("Recording finished!"),N.blob=I,N.blob.forEach&&(N.blob=new Blob([],{type:"video/webm"})),Z&&Z(N.blob),te.frames=[]})})};var ve=!1;function ae(){te.frames=[],de=!1,ve=!1}function ue(){var Z=document.createElement("canvas"),N=Z.getContext("2d");return Z.width=b.width,Z.height=b.height,N.drawImage(b,0,0),Z}function ee(){if(ve)return k=(new Date).getTime(),setTimeout(ee,500);if("canvas"===b.nodeName.toLowerCase()){var Z=(new Date).getTime()-k;return k=(new Date).getTime(),te.frames.push({image:ue(),duration:Z}),void(de&&setTimeout(ee,c.frameInterval))}html2canvas(b,{grabMouse:typeof c.showMousePointer>"u"||c.showMousePointer,onrendered:function(N){var I=(new Date).getTime()-k;if(!I)return setTimeout(ee,c.frameInterval);k=(new Date).getTime(),te.frames.push({image:N.toDataURL("image/webp",1),duration:I}),de&&setTimeout(ee,c.frameInterval)}})}this.pause=function(){ve=!0,H instanceof Ce&&H.pause()},this.resume=function(){ve=!1,H instanceof Ce?H.resume():de||this.record()},this.clearRecordedData=function(){de&&this.stop(ae),ae()},this.name="CanvasRecorder",this.toString=function(){return this.name};var k=(new Date).getTime(),te=new G.Video(100)}function Ee(b,c){function a(k){k=typeof k<"u"?k:10;var te=(new Date).getTime()-ue;return te?oe?(ue=(new Date).getTime(),setTimeout(a,100)):(ue=(new Date).getTime(),ae.paused&&ae.play(),ve.drawImage(ae,0,0,de.width,de.height),ee.frames.push({duration:te,image:de.toDataURL("image/webp")}),void(U||setTimeout(a,k,k))):setTimeout(a,k,k)}(c=c||{}).frameInterval||(c.frameInterval=10),c.disableLogs||console.log("Using frames-interval:",c.frameInterval),this.record=function(){c.width||(c.width=320),c.height||(c.height=240),c.video||(c.video={width:c.width,height:c.height}),c.canvas||(c.canvas={width:c.width,height:c.height}
1),de.width=c.canvas.width||320,de.height=c.canvas.height||240,ve=de.getContext("2d"),c.video&&c.video instanceof HTMLVideoElement?(ae=c.video.cloneNode(),c.initCallback&&c.initCallback()):(ae=document.createElement("video"),Q(b,ae),ae.onloadedmetadata=function(){c.initCallback&&c.initCallback()},ae.width=c.video.width,ae.height=c.video.height),ae.muted=!0,ae.play(),ue=(new Date).getTime(),ee=new G.Video,c.disableLogs||(console.log("canvas resolutions",de.width,"*",de.height),console.log("video width/height",ae.width||de.width,"*",ae.height||de.height)),a(c.frameInterval)};var U=!1;this.stop=function(k){k=k||function(){},U=!0;var te=this;setTimeout(function(){!function X(k,te,Z,N,I){var $=document.createElement("canvas");$.width=de.width,$.height=de.height;var V=$.getContext("2d"),A=[],L=-1===te,me=te&&te>0&&te<=k.length?te:k.length,xe=Math.sqrt(Math.pow(255,2)+Math.pow(255,2)+Math.pow(255,2)),Pe=Z&&Z>=0&&Z<=1?Z:0,De=N&&N>=0&&N<=1?N:0,Me=!1;!function W(k){var te=-1,Z=k.length;!function N(){++te!==Z?setTimeout(function(){k.functionToLoop(N,te)},1):k.callback()}()}({length:me,functionToLoop:function(We,$e){var Ye,Le,He,Qe=function(){!Me&&He-Ye<=He*De||(L&&(Me=!0),A.push(k[$e])),We()};if(Me)Qe();else{var je=new Image;je.onload=function(){V.drawImage(je,0,0,de.width,de.height);var Ie=V.getImageData(0,0,de.width,de.height);Ye=0,Le=Ie.data.length,He=Ie.data.length/4;for(var Oe=0;Oe<Le;Oe+=4){var Xe={r:Ie.data[Oe],g:Ie.data[Oe+1],b:Ie.data[Oe+2]};Math.sqrt(Math.pow(Xe.r-0,2)+Math.pow(Xe.g-0,2)+Math.pow(Xe.b-0,2))<=xe*Pe&&Ye++}Qe()},je.src=k[$e].image}},callback:function(){(A=A.concat(k.slice(me))).length<=0&&A.push(k[k.length-1]),I(A)}})}(ee.frames,-1,null,null,function(Z){ee.frames=Z,c.advertisement&&c.advertisement.length&&(ee.frames=c.advertisement.concat(ee.frames)),ee.compile(function(N){te.blob=N,te.blob.forEach&&(te.blob=new Blob([],{type:"video/webm"})),k&&k(te.blob)})})},10)};var oe=!1;function H(){ee.frames=[],U=!0,oe=!1}this.pause=function(){oe=!0},this.resume=function(){oe=!1,U&&this.record()},this.clearRecordedData=function(){U||this.stop(H),H()},this.name="WhammyRecorder",this.toString=function(){return this.name};var ae,ue,ee,de=document.createElement("canvas"),ve=de.getContext("2d")}typeof u<"u"?K.AudioContext=u:typeof webkitAudioContext<"u"&&(K.AudioContext=webkitAudioContext),y.Storage=K,y.MediaStreamRecorder=Ce,y.StereoAudioRecorder=re,y.CanvasRecorder=ye,y.WhammyRecorder=Ee;var G=function(){function b(W){this.frames=[],this.duration=W||1,this.quality=.8}function a(W){function U($,V,A){return[{data:$,id:231}].concat(A.map(function(L){var me=function ee($){var V=0;if($.keyframe&&(V|=128),$.invisible&&(V|=8),$.lacing&&(V|=$.lacing<<1),$.discardable&&(V|=1),$.trackNum>127)throw"TrackNumber > 127 not supported";var A=[128|$.trackNum,$.timecode>>8,255&$.timecode,V].map(function(L){return String.fromCharCode(L)}).join("")+$.frame;return A}({discardable:0,frame:L.data.slice(4),invisible:0,keyframe:1,lacing:0,trackNum:1,timecode:Math.round(V)});return V+=L.duration,{data:me,id:163}}))}function H($){for(var V=[];$>0;)V.push(255&$),$>>=8;return new Uint8Array(V.reverse())}function de($){return new Uint8Array($.split("").map(function(V){return V.charCodeAt(0)}))}function ve($){var V=[];$=($.length%8?new Array(9-$.length%8).join("0"):"")+$;for(var L=0;L<$.length;L+=8)V.push(parseInt($.substr(L,8),2));return new Uint8Array(V)}function ae($){for(var V=[],A=0;A<$.length;A++){var L=$[A].data;"object"==typeof L&&(L=ae(L)),"number"==typeof L&&(L=ve(L.toString(2))),"string"==typeof L&&(L=de(L));var me=L.size||L.byteLength||L.length,ge=Math.ceil(Math.ceil(Math.log(me)/Math.log(2))/8),xe=me.toString(2),Pe=new Array(7*ge+7+1-xe.length).join("0")+xe,De=new Array(ge).join("0")+"1"+Pe;V.push(H($[A].id)),V.push(ve(De)),V.push(L)}return new Blob(V,{type:"video/webm"})}function te($,V){return parseInt($.substr(V+4,4).split("").map(function(A){var L=A.charCodeAt(0).toString(2);return new Array(8-L.length+1).join("0")+L}).join(""),2)}function Z($){for(var V=0,A={};V<$.length;){var L=$.substr(V,4),me=te($,V),ge=$.substr(V+4+4,me);V+=8+me,A[L]=A[L]||[],A[L].push("RIFF"===L||"LIST"===L?Z(ge):ge)}return A}function N($){return[].slice.call(new Uint8Array(new Float64Array([$]).buffer),0).map(function(V){return String.fromCharCode(V)}).reverse().join("")}var I=new function X($){var V=function oe($){if($[0]){for(var V=$[0].width,A=$[0].height,L=$[0].duration,me=1;me<$.length;me++)L+=$[me].duration;return{duration:L,width:V,height:A}}postMessage({error:"Something went wrong. Maybe WebP format is not supported in the current browser."})}($);if(!V)return[];for(var L=[{id:440786851,data:[{data:1,id:17030},{data:1,id:17143},{data:4,id:17138},{data:8,id:17139},{data:"webm",id:17026},{data:2,id:17031},{data:2,id:17029}]},{id:408125543,data:[{id:357149030,data:[{data:1e6,id:2807729},{data:"whammy",id:19840},{data:"whammy",id:22337},{data:N(V.duration),id:17545}]},{id:374648427,data:[{id:174,data:[{data:1,id:215},{data:1,id:29637},{data:0,id:156},{data:"und",id:2274716},{data:"V_VP8",id:134},{data:"VP8",id:2459272},{data:1,id:131},{id:224,data:[{data:V.width,id:176},{data:V.height,id:186}]}]}]}]}],me=0,ge=0;me<$.length;){var xe=[],Pe=0;do{xe.push($[me]),Pe+=$[me].duration,me++}while(me<$.length&&Pe<3e4);var Me={id:524531317,data:U(ge,0,xe)};L[1].data.push(Me),ge+=Pe}return ae(L)}(W.map(function($){var V=function k($){for(var V=$.RIFF[0].WEBP[0],A=V.indexOf("\x9d\x01*"),L=0,me=[];L<4;L++)me[L]=V.charCodeAt(A+3+L);return{width:16383&(me[1]<<8|me[0]),height:16383&(me[3]<<8|me[2]),data:V,riff:$}}(Z(atob($.image.slice(23))));return V.duration=$.duration,V}));postMessage(I)}return b.prototype.add=function(W,X){if("canvas"in W&&(W=W.canvas),"toDataURL"in W&&(W=W.toDataURL("image/webp",this.qual
1ity)),!/^data:image\/webp;base64,/gi.test(W))throw"Input must be formatted properly as a base64 encoded DataURI of type image/webp";this.frames.push({image:W,duration:X||this.duration})},b.prototype.compile=function(W){var X=function c(W){var X=s.createObjectURL(new Blob([W.toString(),"this.onmessage = function (eee) {"+W.name+"(eee.data);}"],{type:"application/javascript"})),U=new Worker(X);return s.revokeObjectURL(X),U}(a);X.onmessage=function(U){U.data.error?console.error(U.data.error):W(U.data)},X.postMessage(this.frames)},{Video:b}}();y.Whammy=G;var he={init:function(){var b=this;if(typeof indexedDB>"u"||typeof indexedDB.open>"u")console.error("IndexedDB API are not available in this browser.");else{var W,a=this.dbName||location.href.replace(/\/|:|#|%|\.|\[|\]/g,""),X=indexedDB.open(a,1);X.onerror=b.onError,X.onsuccess=function(){(W=X.result).onerror=b.onError,W.setVersion&&1!==W.version?W.setVersion(1).onsuccess=function(){U(W),oe()}:oe()},X.onupgradeneeded=function(H){U(H.target.result)}}function U(H){H.createObjectStore(b.dataStoreName)}function oe(){var H=W.transaction([b.dataStoreName],"readwrite");function de(ve){H.objectStore(b.dataStoreName).get(ve).onsuccess=function(ae){b.callback&&b.callback(ae.target.result,ve)}}b.videoBlob&&H.objectStore(b.dataStoreName).put(b.videoBlob,"videoBlob"),b.gifBlob&&H.objectStore(b.dataStoreName).put(b.gifBlob,"gifBlob"),b.audioBlob&&H.objectStore(b.dataStoreName).put(b.audioBlob,"audioBlob"),de("audioBlob"),de("videoBlob"),de("gifBlob")}},Fetch:function(b){return this.callback=b,this.init(),this},Store:function(b){return this.audioBlob=b.audioBlob,this.videoBlob=b.videoBlob,this.gifBlob=b.gifBlob,this.init(),this},onError:function(b){console.error(JSON.stringify(b,null,"\t"))},dataStoreName:"recordRTC",dbName:null};function q(b,c){if(typeof GIFEncoder>"u"){var a=document.createElement("script");a.src="https://www.webrtc-experiment.com/gif-recorder.js",(document.body||document.documentElement).appendChild(a)}c=c||{};var W=b instanceof CanvasRenderingContext2D||b instanceof HTMLCanvasElement;this.record=function(){typeof GIFEncoder>"u"?setTimeout(Z.record,1e3):de?(W||(c.width||(c.width=ve.offsetWidth||320),c.height||(c.height=ve.offsetHeight||240),c.video||(c.video={width:c.width,height:c.height}),c.canvas||(c.canvas={width:c.width,height:c.height}
1),oe.width=c.canvas.width||320,oe.height=c.canvas.height||240,ve.width=c.video.width||320,ve.height=c.video.height||240),(te=new GIFEncoder).setRepeat(0),te.setDelay(c.frameRate||200),te.setQuality(c.quality||10),te.start(),"function"==typeof c.onGifRecordingStarted&&c.onGifRecordingStarted(),Date.now(),ae=x(function N(I){if(!0!==Z.clearedRecordedData){if(X)return setTimeout(function(){N(I)},100);ae=x(N),void 0===typeof k&&(k=I),!(I-k<90)&&(!W&&ve.paused&&ve.play(),W||H.drawImage(ve,0,0,oe.width,oe.height),c.onGifPreview&&c.onGifPreview(oe.toDataURL("image/png")),te.addFrame(H),k=I)}}),c.initCallback&&c.initCallback()):setTimeout(Z.record,1e3)},this.stop=function(N){N=N||function(){},ae&&C(ae),Date.now(),this.blob=new Blob([new Uint8Array(te.stream().bin)],{type:"image/gif"}),N(this.blob),te.stream().bin=[]};var X=!1;this.pause=function(){X=!0},this.resume=function(){X=!1},this.clearRecordedData=function(){Z.clearedRecordedData=!0,function U(){te&&(te.stream().bin=[])}()},this.name="GifRecorder",this.toString=function(){return this.name};var oe=document.createElement("canvas"),H=oe.getContext("2d");W&&(b instanceof CanvasRenderingContext2D?oe=(H=b).canvas:b instanceof HTMLCanvasElement&&(H=b.getContext("2d"),oe=b));var de=!0;if(!W){var ve=document.createElement("video");ve.muted=!0,ve.autoplay=!0,ve.playsInline=!0,de=!1,ve.onloadedmetadata=function(){de=!0},Q(b,ve),ve.play()}var k,te,ae=null,Z=this}function fe(b,c){typeof global<"u"&&global,c=c||"multi-streams-mixer";var W=[],X=!1,U=document.createElement("canvas"),oe=U.getContext("2d");U.style.opacity=0,U.style.position="absolute",U.style.zIndex=-1,U.style.top="-1000em",U.style.left="-1000em",U.className=c,(document.body||document.documentElement).appendChild(U),this.disableLogs=!1,this.frameInterval=10,this.width=360,this.height=240,this.useGainNode=!0;var H=this,de=window.AudioContext;typeof de>"u"&&(typeof webkitAudioContext<"u"&&(de=webkitAudioContext),typeof mozAudioContext<"u"&&(de=mozAudioContext));var ve=window.URL;typeof ve>"u"&&typeof webkitURL<"u"&&(ve=webkitURL),typeof navigator<"u"&&typeof navigator.getUserMedia>"u"&&(typeof navigator.webkitGetUserMedia<"u"&&(navigator.getUserMedia=navigator.webkitGetUserMedia),typeof navigator.mozGetUserMedia<"u"&&(navigator.getUserMedia=navigator.mozGetUserMedia));var ae=window.MediaStream;typeof ae>"u"&&typeof webkitMediaStream<"u"&&(ae=webkitMediaStream),typeof ae<"u"&&typeof ae.prototype.stop>"u"&&(ae.prototype.stop=function(){this.getTracks().forEach(function(A){A.stop()})});var ue={};function k(){if(!X){var A=W.length,L=!1,me=[];if(W.forEach(function(xe){xe.stream||(xe.stream={}),xe.stream.fullcanvas?L=xe:me.push(xe)}),L)U.width=L.stream.width,U.height=L.stream.height;else if(me.length){U.width=A>1?2*me[0].width:me[0].width;var ge=1;(3===A||4===A)&&(ge=2),(5===A||6===A)&&(ge=3),(7===A||8===A)&&(ge=4),(9===A||10===A)&&(ge=5),U.height=me[0].height*ge}else U.width=H.width||360,U.height=H.height||240;L&&L instanceof HTMLVideoElement&&te(L),me.forEach(function(xe,Pe){te(xe,Pe)}),setTimeout(k,H.frameInterval)}}function te(A,L){if(!X){var me=0,ge=0,xe=A.width,Pe=A.height;1===L&&(me=A.width),2===L&&(ge=A.height),3===L&&(me=A.width,ge=A.height),4===L&&(ge=2*A.height),5===L&&(me=A.width,ge=2*A.height),6===L&&(ge=3*A.height),7===L&&(me=A.width,ge=3*A.height),typeof A.stream.left<"u"&&(me=A.stream.left),typeof A.stream.top<"u"&&(ge=A.stream.top),typeof A.stream.width<"u"&&(xe=A.stream.width),typeof A.stream.height<"u"&&(Pe=A.stream.height),oe.drawImage(A,me,ge,xe,Pe),"function"==typeof A.stream.onRender&&A.stream.onRender(oe,me,ge,xe,Pe,L)}}function $(A){var L=document.createElement("video");return function ee(A,L){"srcObject"in L?L.srcObject=A:"mozSrcObject"in L?L.mozSrcObject=A:L.srcObject=A}(A,L),L.className=c,L.muted=!0,L.volume=0,L.width=A.width||H.width||360,L.height=A.height||H.height||240,L.play(),L}function V(A){W=[],(A=A||b).forEach(function(L){if(L.getTracks().filter(function(ge){return"video"===ge.kind}).length){var me=$(L);me.stream=L,W.push(me)}})}typeof de<"u"?ue.AudioContext=de:typeof webkitAudioContext<"u"&&(ue.AudioContext=webkitAudioContext),this.startDrawingFrames=function(){k()},this.appendStreams=function(A){if(!A)throw"First parameter is required.";A instanceof Array||(A=[A]),A.forEach(function(L){var me=new ae;if(L.getTracks().filter(function(Pe){return"video"===Pe.kind}).length){var ge=$(L);
1ge.stream=L,W.push(ge),me.addTrack(L.getTracks().filter(function(Pe){return"video"===Pe.kind})[0])}if(L.getTracks().filter(function(Pe){return"audio"===Pe.kind}).length){var xe=H.audioContext.createMediaStreamSource(L);H.audioDestination=H.audioContext.createMediaStreamDestination(),xe.connect(H.audioDestination),me.addTrack(H.audioDestination.stream.getTracks().filter(function(Pe){return"audio"===Pe.kind})[0])}b.push(me)})},this.releaseStreams=function(){W=[],X=!0,H.gainNode&&(H.gainNode.disconnect(),H.gainNode=null),H.audioSources.length&&(H.audioSources.forEach(function(A){A.disconnect()}),H.audioSources=[]),H.audioDestination&&(H.audioDestination.disconnect(),H.audioDestination=null),H.audioContext&&H.audioContext.close(),H.audioContext=null,oe.clearRect(0,0,U.width,U.height),U.stream&&(U.stream.stop(),U.stream=null)},this.resetVideoStreams=function(A){A&&!(A instanceof Array)&&(A=[A]),V(A)},this.name="MultiStreamsMixer",this.toString=function(){return this.name},this.getMixedStream=function Z(){X=!1;var A=function N(){var A;V(),"captureStream"in U?A=U.captureStream():"mozCaptureStream"in U?A=U.mozCaptureStream():H.disableLogs||console.error("Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features");var L=new ae;return A.getTracks().filter(function(me){return"video"===me.kind}).forEach(function(me){L.addTrack(me)}),U.stream=L,L}(),L=function I(){ue.AudioContextConstructor||(ue.AudioContextConstructor=new ue.AudioContext),H.audioContext=ue.AudioContextConstructor,H.audioSources=[],!0===H.useGainNode&&(H.gainNode=H.audioContext.createGain(),H.gainNode.connect(H.audioContext.destination),H.gainNode.gain.value=0);var A=0;if(b.forEach(function(L){if(L.getTracks().filter(function(ge){return"audio"===ge.kind}).length){A++;var me=H.audioContext.createMediaStreamSource(L);!0===H.useGainNode&&me.connect(H.gainNode),H.audioSources.push(me)}}),A)return H.audioDestination=H.audioContext.createMediaStreamDestination(),H.audioSources.forEach(function(L){L.connect(H.audioDestination)}),H.audioDestination.stream}();return L&&L.getTracks().filter(function(ge){return"audio"===ge.kind}).forEach(function(ge){A.addTrack(ge)}),b.forEach(function(ge){}),A}}function ne(b,c){b=b||[];var W,X,a=this;(c=c||{elementClass:"multi-streams-mixer",mimeType:"video/webm",video:{width:360,height:240}}).frameInterval||(c.frameInterval=10),c.video||(c.video={}),c.video.width||(c.video.width=360),c.video.height||(c.video.height=240),this.record=function(){W=new fe(b,c.elementClass||"multi-streams-mixer"),function U(){var oe=[];return b.forEach(function(H){r(H,"video").forEach(function(de){oe.push(de)})}),oe}().length&&(W.frameInterval=c.frameInterval||10,W.width=c.video.width||360,W.height=c.video.height||240,W.startDrawingFrames()),c.previewStream&&"function"==typeof c.previewStream&&c.previewStream(W.getMixedStream()),(X=new Ce(W.getMixedStream(),c)).record()},this.stop=function(oe){X&&X.stop(function(H){a.blob=H,oe(H),a.clearRecordedData()})},this.pause=function(){X&&X.pause()},this.resume=function(){X&&X.resume()},this.clearRecordedData=function(){X&&(X.clearRecordedData(),X=null),W&&(W.releaseStreams(),W=null)},this.addStreams=function(oe){if(!oe)throw"First parameter is required.";oe instanceof Array||(oe=[oe]),b.concat(oe),X&&W&&(W.appendStreams(oe),c.previewStream&&"function"==typeof c.previewStream&&c.previewStream(W.getMixedStream()))},this.resetVideoStreams=function(oe){W&&(oe&&!(oe instanceof Array)&&(oe=[oe]),W.resetVideoStreams(oe))},this.getMixer=function(){return W},this.name="MultiStreamRecorder",this.toString=function(){return this.name}}function D(b,c){var W,U,H;function oe(ae,ue){if(!c.workerPath&&!ue)return W=!1,void fetch("https://unpkg.com/webm-wasm@latest/dist/webm-worker.js").then(function(k){k.arrayBuffer().then(function(te){oe(ae,te)})});if(!c.workerPath&&ue instanceof ArrayBuffer){var ee=new Blob([ue],{type:"text/javascript"});c.workerPath=s.createObjectURL(ee)}c.workerPath||console.error("workerPath parameter is missing."),(U=new Worker(c.workerPath)).postMessage(c.webAssemblyPath||"https://unpkg.com/webm-wasm@latest/dist/webm-wasm.wasm"),U.addEventListener("message",function(k){"READY"===k.data?(U.postMessage({width:c.width,height:c.height,bitrate:c.bitrate||1200,timebaseDen:c.frameRate||30,realtime:c.realtime}),function X(){return new ReadableStream({start:function(ae){var ue=document.createElement("canvas"),ee=document.createElement("video"),k=!0;ee.srcObject=b,ee.muted=!0,ee.height=c.height,ee.width=c.width,ee.volume=0,ee.onplaying=function(){ue.width=c.width,ue.height=c.height;var te=ue.getContext("2d"),N=setInterval(function(){if(W&&(clearInterval(N),ae.close()),k&&(k=!1,c.onVideoProcessStarted&&c.onVideoProcessStarted()),te.drawImage(ee,0,0),"closed"!==ae._controlledReadableStream.state)try{ae.enqueue(te.getImageData(0,0,c.width,c.height))}catch{}},1e3/c.frameRate)},ee.play()}})}().pipeTo(new WritableStream({write:function(te){W?console.error("Got image, but recorder is finished!"):U.postMessage(te.data.buffer,[te.data.buffer])}}))):k.data&&(H||ve.push(k.data))})}(typeof ReadableStream>"u"||typeof WritableStream>"u")&&console.error("Following polyfill is strongly recommended: https://unpkg.com/@mattiasbuelens/web-streams-polyfill/dist/polyfill.min.js"),(c=c||{}).width=c.width||640,c.height=c.height||480,c.frameRate=c.frameRate||30,c.bitrate=c.bitrate||1200,c.realtime=c.realtime||!0,this.record=function(){ve=[],H=!1,this.blob=null,oe(b),"function"==typeof c.init
1Callback&&c.initCallback()},this.pause=function(){H=!0},this.resume=function(){H=!1};var ve=[];this.stop=function(ae){W=!0;var ue=this;!function de(ae){U?(U.addEventListener("message",function(ue){null===ue.data&&(U.terminate(),U=null,ae&&ae())}),U.postMessage(null)):ae&&ae()}(function(){ue.blob=new Blob(ve,{type:"video/webm"}),ae(ue.blob)})},this.name="WebAssemblyRecorder",this.toString=function(){return this.name},this.clearRecordedData=function(){ve=[],H=!1,this.blob=null},this.blob=null}y.DiskStorage=he,y.GifRecorder=q,y.MultiStreamRecorder=ne,y.RecordRTCPromisesHandler=function w(b,c){if(!this)throw'Use "new RecordRTCPromisesHandler()"';if(typeof b>"u")throw'First argument "MediaStream" is required.';var a=this;a.recordRTC=new y(b,c),this.startRecording=function(){return new Promise(function(W,X){try{a.recordRTC.startRecording(),W()}catch(U){X(U)}})},this.stopRecording=function(){return new Promise(function(W,X){try{a.recordRTC.stopRecording(function(U){a.blob=a.recordRTC.getBlob(),a.blob&&a.blob.size?W(U):X("Empty blob.",a.blob)})}catch(U){X(U)}})},this.pauseRecording=function(){return new Promise(function(W,X){try{a.recordRTC.pauseRecording(),W()}catch(U){X(U)}})},this.resumeRecording=function(){return new Promise(function(W,X){try{a.recordRTC.resumeRecording(),W()}catch(U){X(U)}})},this.getDataURL=function(W){return new Promise(function(X,U){try{a.recordRTC.getDataURL(function(oe){X(oe)})}catch(oe){U(oe)}})},this.getBlob=function(){return new Promise(function(W,X){try{W(a.recordRTC.getBlob())}catch(U){X(U)}})},this.getInternalRecorder=function(){return new Promise(function(W,X){try{W(a.recordRTC.getInternalRecorder())}catch(U){X(U)}})},this.reset=function(){return new Promise(function(W,X){try{W(a.recordRTC.reset())}catch(U){X(U)}})},this.destroy=function(){return new Promise(function(W,X){try{W(a.recordRTC.destroy())}catch(U){X(U)}})},this.getState=function(){return new Promise(function(W,X){try{W(a.recordRTC.getState())}catch(U){X(U)}})},this.blob=null,this.version="5.6.2"},y.WebAssemblyRecorder=D},33226(be){be.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M96 0C60.7 0 32 28.7 32 64V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H96zM208 288h64c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16H144c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80zm-32-96a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM512 80c0-8.8-7.2-16-16-16s-16 7.2-16 16v64c0 8.8 7.2 16 16 16s16-7.2 16-16V80zM496 192c-8.8 0-16 7.2-16 16v64c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm16 144c0-8.8-7.2-16-16-16s-16 7.2-16 16v64c0 8.8 7.2 16 16 16s16-7.2 16-16V336z"/></svg>\n'}}]);
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.